[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

A new disk image format (.flp)



People have been tossing around the idea of a new disk image format for a
while now but no one seems to have tackled the job yet. I decided to when I
started working on my version of a IIe emulator. I knew I wanted to use a
new format because I didn't want to break any of the features of the IIe in
the emulator. This is what I have decided on so far:

Format Extension: ".FLP"

Header:
signature    -    ".FLP"    ;4 byte string
data_size    -    NNNN      ;DWORD in bytes (carrier size)
data_tracks  -    N         ;BYTE (usually 80)
data_sides   -    N         ;BYTE (usually 2)
data_start   -    NNNN      ;DWORD in bytes (offset of data area)
bad_ranges   -    NN        ;WORD (hopefully 0 ;-)
bad_table[NN]-    struct    ;list of up to 10240 bad ranges

Bad_Table Entry:
start        -    NNNN      ;DWORD in bytes
length       -    NNNN      ;DWORD in bytes

Note that the maximum size of the header is 81936 bytes or 80K + 16, but
since that would require the image to be of a completely corrupted 800K
disk, such headers should never happen. In the best of cases, the header
will only take up 16 bytes.

The data area starts immediately following the bad_table. It consists of the
RAW, untransformed bytes as they appear on the medium. This format should
accomodate all known A2 disk formats, including the customized
copy-protected formats that contained 1/2 tracked information and
intentionally damaged sectors.

This format should also allow for emulators to read, write and format these
images in the way that the various utilities expected to be able to.
Although the images can be created to smaller sizes, it is expected that a
5.25' image will use a 500K data area and a 3.5' image will use a 1000K data
area since those were the actual medium capacities. This expectation comes
because of differences in each drive unit. Some 5.25' units were built that
could even handle reading & writing consecutive 1/2 tracks as well as going
all the way out to track 40. Although such uses were rare, I intend for this
format to support it.

The floor is now open for suggestions.

Arkain