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.

ValueDescription
5.255.25“ Floppy Disk
3.53.5” Floppy Disk
88“ Floppy Disk

ex: “media”: “5.25”

encoding

String - Required
Encoding and bitrate used.

ValueDescription
fm_250FM encoding with 250kbps (4µs cell window)
fm_500FM encoding with 500kbps (2µs cell window)
mfm_250MFM encoding with 250kbps (4µs cell window)
mfm_500MFM encoding with 500kbps (2µs cell window)
m2fm_500M2FM 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.

ValueDescription
msbMost significant bit comes first
lsbLeast 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:

MediaDefault 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.

ValueDescription
normTrack and Head values used as normal. Track number increments per cylinder and Head increments per side
trksTrack 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.

ValueDescription
addaEach sector consists of separate address and data fields
blobEach 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


Data Field Structure