Introduction
This DSK format is a copy of a 3-inch floppy disk for the Amstrad CPC. It was created for the CPCEMU emulator and is used by every CPC emulator since. The ZX Spectrum +3, which used the same disk drive, uses it too.
Unlike a plain sector dump, a DSK file records each track’s layout: how many sectors
it has, their IDs and sizes, and any errors the disk controller reported. That lets it
hold the unusual tracks of copy-protected disks. The extension .dsk is also
used for unrelated disk images of other computers, such as the Apple II.
Structure
There are two versions, told apart by the first bytes of the file. The original starts
with MV - CPCEMU Disk-File and gives one track size for the whole disk. The
extended version starts with EXTENDED CPC DSK File and gives a size for each
track, so that tracks can differ and unformatted tracks take no space.
The file begins with a 256-byte disk information block: the signature, the name of the
program that made it, the number of tracks and sides, and the track sizes. Track blocks
follow, one per track and side. Each starts with a 256-byte track information block
beginning Track-Info, which gives the track and side numbers, the sector size
and count, the gap length and filler byte, and an 8-byte entry per sector with its ID
(track, side, sector, size) and the controller’s status bytes. The sector data follows
in that order.
0Disk information block signature, creator, tracks, sides, track sizes256 bytes256Track block one per track and siderepeated+0Track information blockTrack-Info, sector size and count, sector IDs256 bytes+256Sector data in the order listedvaries