The VAPI disk format is used to accurately preserve Atari disk images. This page attempts to capture what (incomplete) information has been released about the format thus far. If any inaccuracies or additional information is known, please let me know so this page can be updated.
The general structure of an ATX file is a file header followed by one or more track records.
The file header can vary but is usually 48 bytes:
'A' 1 byte | 'T' 1 byte | '8' 1 byte | 'X' 1 byte | version_number 2 bytes (little-endian) | reserved 22 bytes | size 4 bytes (little-endian) | reserved 16 bytes |
A track record is comprised of a track header (TH), a sector list (SL), sector data (SD) and optional extended sector data (XSD).
The track header can vary but is normally 32 bytes:
record_size 4 bytes (little-endian) | record_type 2 bytes (little-endian) | reserved 2 bytes | track_number 1 byte | reserved 1 byte | sector_count 2 bytes (little-endian) | reserved 8 bytes | header_size 4 bytes (little-endian) | reserved 8 bytes |
Value | Type |
---|---|
$00 | data track |
A sector list is comprised of a sector list header (SLH) and one or more sectors headers (SH).
The sector list header can vary but is normally 8 bytes:
size 4 bytes (little-endian) | record_type 1 byte | reserved 3 bytes |
Value | Type |
---|---|
$01 | sector list |
The sector header is 8 bytes:
sector_number 1 byte | sector_status 1 byte | sector_position 2 bytes (little-endian) | start_data 4 bytes (little-endian) |
Bit | Description |
---|---|
7 | Reserved (must be zero) |
6 | 1 = extended data present for sector |
5 | 1 = deleted sector (DAM $F8) |
4 | 1 = missing sector data |
3 | 1 = FDC CRC error |
2 | 1 = FDC lost data error |
1 | Reserved (must be zero) |
0 | Reserved (must be zero) |
The extended sector data is 8 bytes and repeats once for every sector in the track that had bit 6 set in the sector header:
size 4 bytes | type 1 byte | sector_index 1 byte | weak_offset 2 bytes (little-endian) |
Value | Description |
---|---|
$10 | weak sectors present |