Skip to content

Amiga Disk

Dirk Hoffmann edited this page Feb 24, 2019 · 3 revisions

Facts about a standard Amiga disk 3.5” DD

General

A 3.5” DD disk contais

  • 80 cyclinders
  • 160 tracks (2 tracks per cylinder, upper head and lower head)
  • 11 sectors per track

Data is MFM encoded which means that 8 bit is stored as 16 bit.

Sectors

A single sector consists of

  • a sector header build up from 64 MFM bytes,
  • 512 bytes of data (1024 MFM bytes). Hence,
  • a sector occupies 64 + 2*512 = 1088 MFM bytes on disk,
  • a track occupies at least 11 * 1088 = 11.968 MFM bytes on disk.
  • Note that a track is followed by a track gap which is about 696 bytes (varies with drive speed)
    Hence,
    • a track usually occupies 11968 + 696 = 12664 bytes
    • a disk usually occupies 80 * 2 * 12664 = 2.026.240 bytes

Physical layout and number schemes

  • Cylinders are numbers from 0 to 79 where

    • 0 is the outermost cylinder,
    • 79 is the innermost cylinder.
  • There is a lower drive head and an upper drive head where

    • the lower side is called side 0,
    • the upper side is called side 1.
  • Tracks are numbered from 0 to 159.

  • Sectors count up from cylinder 0 side 0 sector 0 (outermost cylinder, lower side).

    Track   Cylinder   Head   Sectors
    -------------------------------------
      0      0         0         0 -   10
      1      0         1        11 -   21
      2      1         0        22 -   32
      3      1         1        33 -   43
                  ...
    158     79         0      1738 - 1748
    159     79         1      1749 - 1759
    

Conversion is easy:

Cylinder     = track / 2
Head         = track % 2
Track        = 2 * cylinder + head 
Sector range = track * 11, …, track * 11 + 10 

Warning: The Hardware Reference Manual states that DSKSIDE*=0 implies the upper head. This is because the signal is inverted (like many other CIA signals, too). Hence, writing 1 into DSKSIDE* selects side 0 (lower head).

Amiga Disk Format

Note that ADF files are not a physical representation of a dis which means that they don’t store the MFM encoded bit stream. Compared with the well known C64 file formats, they are not G64 files. They are comparable to D64 file which simply store the (unencoded) contents of all sectors.

Without any encoding,

  • a sector consists of 512 data bytes,
  • a track consists of 11 * 512 = 5632 data bytes,
  • a disk consists of 2 * 80 * 5632 = 90.120 data bytes.

If you look at various ADF files, you'll see a size of 90.120 bytes. There is no file signature or header, just the plain data bytes.

I suppose, ADF files store tracks in increasing order: Track 0, 1, 2, …, 159, but I didn't find exact information about that yet.

Clone this wiki locally