ATR Disk File

An ATR disk file is an Atari 8-bit computer disk image file. The format was created by Nick Kennedy for use with his SIO2PC. It is the most common Atari disk image format and is supported by APE and all Atari 8-bit computer emulators.

The file begins with a 16 byte header, described below. There are minor differences in the header format between SIO2PC and APE, but the images remain compatible regardless of what program created them. After the header is a continuous string of bytes, with the first 128 bytes being the contents of disk sector 1, the second being sector 2, etc. The first three sectors of a disk are always 128 bytes long.

Note: Some ATR files are incorrect, they have the first three sectors as the same size reported in the header.

Header

Offset Size Description (from Nick Kennedy's SIO2PC FAQ)
0 2 Special code ($0296) indicating this is an Atari disk file.
The code is the 16 bit sum of the individual ASCII values of the string of bytes: "NICKATARI".
2 2 Size of this disk image, in paragraphs. A paragraph is 16 bytes.
4 2 Sector size. (128 or 256) bytes/sector.
6 2 High part of size, in paragraphs (added by REV 3.00).
8 1 Disk flags such as copy protection and write protect.
Bit 4 = 1 means the disk image is treated as copy protected (has bad sectors).
Bit 5 = 1 means the disk is write protected.
9 2 First (or typical) bad sector.
See Copy Protected Disk Support in SIO2PC's ReadMe.txt
11 5 Unused (contains zeroes).
Offset Size Description (APE uses the following bytes differently)
8 4 32-bit CRC for authentication.
See specification.
15 1 Disk flags.
Bit 0 = 1 means write protected.
Bit 1 = 1 means sealed/authenticated.