Format:Amiga ADF disk image
| Platforms | Platform:Amiga |
|---|---|
| Magic | 44 4F 53 xx ("DOS" + flags) at offset 0 of bootable/AmigaDOS disks |
| Extensions | .adf |
| On this wiki | Facts · Code · Notes · Topics |
Raw sector dump of an AmigaDOS floppy: 880 KiB (901120 bytes, 80 cylinders x 2 sides x 11 sectors of 512 bytes) for double density, 1760 KiB for high density; the first two sectors are the bootblock starting "DOS" and the root block is in the middle of the disk.
Identification
An ADF has no header. MAME accepts the sizes 901120 (80 tracks), 912384 (81 tracks) and 1802240 (high density, 22 sectors per track). Sector n is at n x 512, ordered cylinder by cylinder, side 0 then side 1 (offset (track*2 + side) x 11 x 512).
Filesystem
Bootblock: sectors 0-1 (1024 bytes), bytes 0-2 "DOS", byte 3 flags (bit 0 FFS, bit 1 international mode, bit 2 directory cache; 0 is OFS), a checksum at 4 and a root block pointer at 8, then boot code. ADFlib computes the root block as (lastBlock - firstBlock + 1) / 2, which is sector 880 on a double-density disk (1760 on high density; its bootblock writer stores 880); the root block has type 2 at offset 0 and secondary type 1 at 0x1FC, a hash table from 0x18, the bitmap flag (-1 = valid) at 0x138 and the volume name length and name at 0x1B0; OFS data blocks carry a 24-byte header (type 8, header key, sequence number, data size, next block, checksum) and 488 data bytes, FFS blocks are pure data. Facts: Fact:Amiga ADF disk image/struct/AmigaDOS bootblock header, Fact:Amiga ADF disk image/behavior/ADF root block position.
Other containers
IPF (SPS/CAPS) and flux images (Format:SCP flux image, Format:HFE image (HxC)) keep copy-protection that a plain ADF loses. Greaseweazle treats .adf as the generic IMG class with default format amiga.amigados.
Sources
MAME src/lib/formats/ami_dsk.cpp lines 40-97, commit 1d7a454ed79e97d35d2a9f127ac029ead94711d6; keirf/greaseweazle src/greaseweazle/image/adf.py, commit 26690f89967d519e0106ab9566019a026b920bb4.
ADFlib (adflib/ADFlib, LGPL-2.1) src/adf_blk.h 40-57, 123-124, 142-179, 296-308, src/adf_vol.h 124-128, src/adf_vol.c 413, commit 73880de78bf472a1cc7d60f07fc217e02d571268.
Code & repositories
- https://github.com/mamedev/mame @
1d7a454ed79e97d35d2a9f127ac029ead94711d6· license: BSD-3-Clause (declared by the contributor; GitHub's detector did not recognize COPYING)
MAME src/lib/formats/*_dsk.cpp and tzx_cas.cpp: floppy and tape image loaders
Tested on: source read, not run: source reading only · checked 2026-10-18; last activity 2026-10-18; Note: the latest release ships binaries; the wiki links only the source, never the binaries - https://github.com/keirf/greaseweazle @
26690f89967d519e0106ab9566019a026b920bb4· license: Unlicense
Greaseweazle host tools: src/greaseweazle/image/scp.py, hfe.py, adf.py (Unlicense)
Tested on: source read, not run: source reading only · checked 2026-10-18; last activity 2026-06-16; Note: the latest release ships binaries; the wiki links only the source, never the binaries - https://github.com/adflib/ADFlib @
73880de78bf472a1cc7d60f07fc217e02d571268· license: LGPL-2.1 (declared by the contributor; GitHub's detector did not recognize COPYING)
ADFlib: src/adf_blk.h (bootblock and root block structures), adf_vol.h (root block position)
Tested on: source read, not run: source reading only · checked 2026-10-18