meta data for this page
This is an old revision of the document!
Adding Support for a Hard Sectored Disk Format
Info how to do it.
Identification
name
String - Required
This is a descriptive name of the format. It is only used for informational purposes.
ex: “name”: “North Star”
settings
String - Required
This name is used by the Fast Imager to remember user preferences related to this format.
ex: “settings”: “525NorthStar_Hard10x256”
export
[String] - Required
An array of disk image format names that can be used to save images of this format. It uses the internal names of formats.
ex: “export”: [“northstar_nsi”]
Media and Geometry
media
String - Required
The physical type of media used.
Value | Description |
---|---|
5.25 | 5.25“ Floppy Disk |
3.5 | 3.5” Floppy Disk |
8 | 8“ Floppy Disk |
ex: “media”: “5.25”
encoding
String - Required
Encoding and bitrate used.
Value | Description |
---|---|
fm_250 | FM encoding with 250kbps (4µs cell window) |
fm_500 | FM encoding with 500kbps (2µs cell window) |
mfm_250 | MFM encoding with 250kbps (4µs cell window) |
mfm_500 | MFM encoding with 500kbps (2µs cell window) |
m2fm_500 | M2FM encoding with 500kbps (2µs cell window) |
ex: “encoding”: “fm_250”
bitOrder
String
Bytes stored on disk are most commonly stored in “most significant bit” order, although some platforms store bytes in “least significant bit” order. This value allows you to specify which order should be used. If no value is provided, then it defaults to msb
.
Value | Description |
---|---|
msb | Most significant bit comes first |
lsb | Least significant bit comes first |
ex: “bitOrder”: “lsb”
trackCount
String
Expected number of tracks per disk side (cylinders).
If this value is not provided, then the following values will be used based on the media type:
Media | Default Value |
---|---|
5.25” | 40 |
3.5“ | 80 |
8” | 77 |
ex: “trackCount”: 35
trackBase
Int
Logical track number of the first track on the disk (typically 0 or 1). If no value is provided, then it defaults to 0
.
ex: “trackBase”: 0
headCount
Int
Number of drive heads. If no value is provided, then it defaults to 2
.
ex: “headCount”: 1
sectorsPerTrack
Int - Required
Number of hard sectors of the media. This is used to help identify the format as well as for determining disk geometry.
ex: “sectorsPerTrack”: 10
sectorBase
Int
Logical sector number of the first sector on each track (typically 0 or 1). If no value is provided, then it defaults to 0
.
ex: “sectorBase”: 0
sideOrganization
String
This is the method of organization for double sided disks. If no value is provided, then it defaults to norm
.
Value | Description |
---|---|
norm | Track and Head values used as normal. Track number increments per cylinder and Head increments per side |
trks | Track value increments per side and Head is ignored |
sect+ | Side 1 sector numbers are a continuation of side 0 |
ex: “sideOrganization”: “norm”
Sector Structure and Synchronization
sectorFields
String - Required
This describes which structures/fields are used for recording sectors.
Value | Description |
---|---|
adda | Each sector consists of separate address and data fields |
blob | Each sector consists of a single blob of data |
ex: “sectorFields”: “blob”
syncPatterns
[String] - Required
All disk formats have sync pattern(s) that inform the disk controller about how to synchronize itself to the proper start of bytes. Applesauce uses a sequence of 48 bits (6 bytes) that are represented by their hex values. Please note that the values used here are the values physically on the media for FM or MFM encoding, so every logical byte (8 bits) is represented by 16 bits. The last value of the sync pattern is also typically used as a start marker for the disk controller. If there are multiple possible sync sequences, then include them all.
ex: “syncPatterns”: [“AAAAAAAAFFEF”]
Address Field Structure
If the disk uses address and data fields (and your sectorFields
is set to adda
), then the following settings allow you to specify how the address field is structured. If your sectorFields
is blob
, then you can skip this section.
Sector Identification
volumeDerived
String
Method that is to be used to determine the volume number for a sector. If no value is provided, then it defaults to none
.
Value | Description |
---|---|
none | This format does not use a volume number |
data | The volume number should be derived from data on the disk |
ex: “volumeDerived”: “data”
volumeBitIndex
Int - Required if volumeDerived is “data”
The bit index of the start of the volume number. This index is relative to the field marker with 0
being the first bit of the marker.
ex: “volumeBitIndex”: 8
volumeBitSize
Int - Only used if volumeDerived is “data”
The number of bits that comprise the volume number. If no value is provided, then it defaults to 8
.
ex: “volumeBitSize”: 8
trackDerived
String - Required
Method that is to be used to determine the track number for a sector.
Value | Description |
---|---|
data | The track number should be derived from data on the disk |
phys | The track number should be derived from the physical track |
ex: “trackDerived”: “phys”
trackBitIndex
Int - Required if trackDerived is “data”
The bit index of the start of the track number. This index is relative to the field marker with 0
being the first bit of the marker.
ex: “trackBitIndex”: 8
trackBitSize
Int - Only used if trackDerived is “data”
The number of bits that comprise the track number. If no value is provided, then it defaults to 8
.
ex: “trackBitSize”: 8
trackVerify
Boolean - Only used if trackDerived is “data”
Set to true if you would like to validate that the track number matches the physical track number. If no value is provided, then it defaults to false
.
ex: “trackVerify”: true
headDerived
String
Method that is to be used to determine the head number for a sector. If no value is provided, then it defaults to none
.
Value | Description |
---|---|
none | This format does not use a head number |
data | The head number should be derived from data on the disk |
phys | The head number should be derived from the physical head |
ex: “headDerived”: “data”
headBitIndex
Int - Required if headDerived is “data”
The bit index of the start of the head number. This index is relative to the field marker with 0
being the first bit of the marker.
ex: “headBitIndex”: 16
headBitSize
Int - Only used if headDerived is “data”
The number of bits that comprise the head number. If no value is provided, then it defaults to 8
.
ex: “headBitSize”: 8
sectorDerived
String - Required
Method that is to be used to determine the sector number for a sector.
Value | Description |
---|---|
data | The sector number should be derived from data on the disk |
phys | The sector number should be derived from the physical sector index holes |
ex: “sectorDerived”: “data”
sectorBitIndex
Int - Required if sectorDerived is “data”
The bit index of the start of the sector number. This index is relative to the field marker with 0
being the first bit of the marker.
ex: “sectorBitIndex”: 24
sectorBitSize
Int - Only used if sectorDerived is “data”
The number of bits that comprise the sector number. If no value is provided, then it defaults to 8
.
ex: “sectorBitSize”: 8