Introduction
An ADF file is a copy of a Commodore Amiga floppy disk. Amiga emulators load ADF files in place of real disks, and most of the Amiga’s software survives today in this form.
An ADF holds the decoded data of every sector, in order. A standard double density disk gives a file of exactly 901,120 bytes, and a high density disk twice that. The format does not keep the raw signal from the disk, so copy-protected disks that rely on unusual tracks need a fuller format to work.
Structure
A double density disk has 80 cylinders, 2 heads and 11 sectors of 512 bytes per track, 1,760 blocks in all. The ADF stores them in order: cylinder 0 head 0, cylinder 0 head 1, cylinder 1 head 0 and so on.
The first two blocks are the boot
block. It starts with the letters DOS and a flag byte giving the file
system: 0 for the original file system (OFS), 1 for the fast file system (FFS), with
higher values adding international characters, directory caching (4 and 5) and long names (6 and 7). A checksum and
boot code follow. The root block
sits in the middle of the disk, at block 880, and holds the disk name and a hash table
that points to the files and directories at the top level. Every file has a
header block listing its data blocks.
OFS data blocks start with a 24-byte header, while FFS data blocks hold only data.
Most ADFs found today were unpacked from DMS files.
The explorer here opens an ADF as its blocks (boot block, root block, directory and file
headers) and lists every file, each of which opens on its own. A file that starts with an Amiga program header
(a command, a .library, .device or handler file) opens as an
Amiga HUNK file, with its hunks, relocations and symbols and its code disassembled.
A hard disk image (a Rigid Disk Block in its first blocks, usually named .hdf or .adf) lists its partitions, each of which opens as a volume of its own, and a hardfile (one volume in a file, no partition table) opens like a large floppy: see hard disk images.
0Boot blockDOS, file system flags, checksum, boot code1,024 bytes1024Blocks 2 to 879 file headers, directories and data512 bytes each450560Root block block 880: disk name and the top-level hash table512 bytes451072Blocks 881 to 1759 more headers, data and the free block bitmap512 bytes each
Not described
The reference and the viewer are both partial. The field-level pages follow Laurent Clévy’s description of the format (read raw from an Internet Archive copy on 2026-11-14) and are checked against Commodore’s own texts, ADFlib, the AROS file system, amitools, the Linux affs driver and 28 real floppy images. Commodore never published the format as one specification, but several of its texts cover parts of it
(see the sources below), and where they disagree with Clévy, with each other or with the disks, the pages say so.
Known, not yet covered
- Reference: the long-name file systems (DOS6, DOS7) are now written from Olaf Barthel’s own note and amitools, which agree (long names, and the used-blocks count and DOS type in the root block table); what is still not available is a real DOS6 or DOS7 disk, a drawing of a link block on such a volume (our inference puts the link fields where they are on other volumes), and an example showing whether the used-blocks count includes the boot blocks (Barthel: “allocated by bitmap”, so it does not).
- Reference: the hard disk images page now covers the Rigid Disk Block against Commodore’s own header and manual, the whole environment vector, what a driver does with the RDB, hardfiles and block sizes other than 512 (Commodore’s statement that only the first 256 bytes of a block are used, not a checked layout); no real RDB image was available, and no hardfile image.
- Reference: each place where a Commodore text differs from a table is now stated with both readings, the sources and the real-disk numbers (disk blocks, files and directories, hard disks), and every item no Commodore text covers is tabled as third-party source only with its sources (disk blocks, files and directories, hard disks). Whether sources of that kind are enough for
fullis not decided here. - Reference: source conflicts the pages state and do not decide: the Hold bit (Clévy’s rule against AROS’s and Commodore’s headers, which leave bit 7 undefined); the group and other delete bits 8 and 12 (Commodore’s
dos/dos.hcontradicts itself: “0 == not allowed” but “prevent file from being deleted”); whether a file header’s date is creation or last change; the OFS hash chain order (Commodore: new entries at the head; the other sources and every real disk read: ascending); which AmigaDOS release introduced FFS and international mode; Beats’ root block formula, which gives 878 where all real disks have 880. - Reference: settled from sources and recorded on the pages: the ADFlib labels of the root dates disagree with Commodore’s (Commodore’s names for
0x1A4,0x1D8,0x1E4are DirAltered, DiskAltered, DiskMade, and a real 1.3 disk has three different values); Clévy’s bitmap table is one bit off at its end; the bits past the last block and the 72 longs after the map carry no information; the standard boot routines (81 and 38 bytes) and how Kickstart calls them; the allocation order; the write order, deleting and renaming; the two ways to read an OFS file; the empty file; the 4 GB limit; and the name “DCFS” (Barthel’s note, which also says Commodore’s Randell Jesup added the mode in Kickstart 3.0). - Viewer: now done and checked: the bitmap against the tree (no difference on any of the 28 real floppies), directory cache blocks decoded and compared with their directory, bitmap, bitmap extension and comment blocks shown field by field, RDB partitions opened as volumes of their own,
.hdfhardfiles and RDB images recognised, the file system code of an FSHD offered as a HUNK file, high density images read, days of 0 and forbidden names reported, the protection bits the sources disagree about shown in both readings, the boot code disassembled (what each does: disk blocks, files and directories, hard disks). - Viewer: what was only tested on disks and images built from the documents, because no real one was available: DOS6 and DOS7 (no real long-name volume found), comment blocks on a real disk beyond the few in the real images, owners, hardfiles, volumes with more than 25 bitmap blocks and a hard disk image with a file system header or bad block list. Round 11 added 19 real images (
samples/adf/real, from the ADFlib and amitools test folders) and a test that opens each against an independent walk (test-adf-real-11.mjs): one RDB image with six partitions of DOS0 to DOS5 formatted by AmigaOS 3.1, real DOS4 and DOS5 volumes with directory cache blocks, hard and soft links of every kind, high density floppies, an AROS boot disk, a Fred Fish disk from 1987 and an image with a DOS\6 boot block that is really an OFS disk. The 28 real floppies from the DMS files are DOS0, DOS1 and DOS3 double density disks. - Viewer: now done, on built images only (no real hard disk, hardfile or non-512-byte volume was available): volumes with 1,024 to 65,536-byte blocks and partitions with more than one sector per block are opened, a hardfile with
Reserved1 whose block 1 belongs to the volume is read, bad block pairs are applied to the partition they fall in, OFS data blocks are verified,Reserved3 and 4 are boot areas of that many blocks, an image is read block by block up to 253 bytes (the old 4 GiB limit is gone), tested with sparse sources of 4 GiB, 8 GiB, 64 GiB and 3 TiB, and the OFS data blocks of a file left out of the open-time check are checked when that file is opened or read (what the viewer checks). Still not done, with the reasons on the disk blocks and hard disk pages: the DosEnvec as the source of the block size or the reserved count (it is read from the root block); a bad block whose replacement is also bad; a geometry in a unit other than the Rigid Disk Block’s blocks. - Viewer: the two things found in round 9 are dealt with in round 10. (1) The late check of an OFS file’s data blocks (a file left out of the open-time check) no longer stops at 500 faults: every fault is its own Problem and the Problems panel pages them (tested with 600 and 5,000 corrupt blocks, whole and windowed reads); the heading counts them, and the “Problems” figure in the statistics is the open-time count, because it is fixed when the file opens. The engine itself holds up to 50,000 late problems per opened file. (2) A file dropped immediately after closing a lazily read image stayed on “reading…” for good: the cause was in the explorer window (the dialog’s close event fired after a new file had reopened it and stopped the worker reading the new file), not in this viewer, which keeps no state between images and has no read that outlives its image (tested: an image abandoned in the middle of opening or of a file read, then another opened at once). The window was fixed by its owners; the browser retest is still to be done. A hash chain that leads into a block that is not a header is now one Problem instead of a junk entry (what the viewer checks).
Unknown
- Reference and viewer: disks with their own loader (NDOS, KICK, game formats) and copy-protected disks have no common published layout; the viewer shows their boot block and raw blocks only.
Links
Software
- WinUAE – Amiga emulator that loads ADF files as floppy disks (Windows)
- FS-UAE – Amiga emulator that loads ADF files as floppy disks (Windows, macOS, Linux)
- Amiga Forever – packaged Amiga emulation suite (Windows)
Documentation
- The .ADF (Amiga Disk File) format FAQ – Laurent Clévy’s description, the base of the field tables (Internet Archive copy)
- DCFS and LNFS Low Level Data Structures – Olaf Barthel on the directory cache and the long-name file systems (AmigaOS wiki)
- Low Level Differences Between FFS and the ROM Filing System – Steve Beats, Amiga Mail 1989 (Amiga Developer CD 2.1)
- AmigaDOS Technical Reference Manual – Commodore, 1985, the original file structure (Internet Archive)
- Amiga ROM Kernel Reference Manual: Devices – Commodore-Amiga, 3rd edition, the RDB and the boot sequence (Internet Archive)
- ADFlib – the C library written alongside Clévy’s document (GPL)
Developers
- amitools – Amiga tools whose xdftool reads and writes ADF files (Python)