Introduction
An ATR file is a copy of a floppy disk for the Atari 8-bit computers: the 400, 800, XL and XE. It is the standard disk format of Atari emulators, and devices that connect a real Atari to a PC or memory card serve ATR files to it as if they were disks.
An ATR is a short header followed by every sector of the disk in order. It does not record timing or bad sectors, so some copy-protected disks need other formats.
Structure
The 16-byte header starts with the bytes 96 02. Then come the size of
the image in units of 16 bytes, split into a low word and a high byte, and the sector
size: 128 bytes for single and enhanced density, 256 for double density. The remaining
bytes are flags and unused space. All values are little-endian.
The sectors follow, numbered from 1. On a double density disk the first three sectors, which hold the boot code, are 128 bytes each, as the Atari reads them, and the rest are 256 bytes. A standard single density disk has 720 sectors, giving a 92,176-byte file.
0Header96 02, image size, sector size, flags16 bytes16Sectors 1 to 3 the boot sectors128 bytes each400Sectors 4 onwards in order128 or 256 bytes each