.ADF
Amiga Disk File
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.
Software
- WinUAE, an Amiga emulator (Windows)
- FS-UAE, an Amiga emulator (Windows, macOS, Linux)
- Amiga Forever, a packaged Amiga emulation suite (Windows)
- amitools, whose xdftool reads and writes ADF files (Windows, macOS, Linux)
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 and directory
caching. 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.
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