Introduction
The extended DSK file is a copy of a 3-inch floppy disk of the Amstrad CPC or of the ZX Spectrum +3, in the format that was added to the original
CPCEMU DSK so that copy-protected disks with tracks of different sizes could be stored. It starts with
EXTENDED CPC DSK File. Instead of one track size for the whole disk it has a table with one byte for every track and side, and every sector
entry says how many bytes of the sector are stored.
Because the same extension is used for the standard file, for Apple II sector images and others, the explorer tells them apart by the first bytes of the file (EXTENDED for this one, the 8 characters the emulators check; the standard file starts MV - CPC).
Structure
A 256-byte disk information block, then the track blocks in the order track 0 side 0, track 0 side 1, track 1 side 0 and so on (one side only for a single-sided disk). A track whose table entry is 0 is not stored and takes no space. See Disk, track and sector blocks.
0Disk information block signature, creator, tracks, sides, track size table256 bytes256Track block one for each track and side with a non-zero table entrytable entry × 256 bytes+0Track information blockTrack-Info, sector size code and count, sector entries256 bytes+256Sector data in the order listed, each as long as its entry saysvaries
In the explorer
Drop a .dsk file that starts with EXTENDED on the explorer to see:
- the tree: the disk information block with its fields and the track size table, every stored track block with its track information block (each sector entry with its ID, status bytes and stored length) and every sector’s data, with several stored copies of a sector marked as a weak sector;
- the disk (creator, tracks, sides, how many track blocks are not stored, sectors and bytes), a table of the tracks and a table of the sectors with the status bits MAME uses named;
- the problems found: a track block that is not
Track-Infoor is cut short, track and side numbers that disagree with the place, more than 29 sectors, a stored length that is not a multiple of the size the size code gives, a table longer than its 204 entries, a track block beyond the end of the file, extra bytes.
Not described
Known, not yet covered
- Reference: the individual bits of the controller status registers ST1 and ST2 beyond the three MAME uses; the data rate and recording mode bytes some later writers store at track offsets
0x12and0x13; the “Offset-Info” blocks some later extensions add (not in the pages we read). - Viewer: the file system inside the disk (AMSDOS/CP/M directory, +3DOS) is not read, so no directory, files or BASIC programs are shown and nothing is disassembled; the weak-sector copies are not shown as separate nodes.
Unknown
- Reference: the sector ID ranges of non-+3 disks come from one wiki line (
$40-49,$C0-C9), not confirmed by a second source; the viewer’s “first sector ID” line is a hint built on it. - Viewer: one real file (an extended DSK written by Caprice32, 42 tracks of nine 512-byte sectors) is read and compared with an independent decoding; no copy-protected disk with weak sectors or unformatted tracks was available, so those branches are checked on built files only.
Also used for
- Amstrad CPC disk image (standard) – A CPC or Spectrum +3 floppy (MV - CPCEMU), track by track with each sector’s ID.
Links
Software
Reference
- DSK format (Sinclair wiki) and Format:DSK disk image file format (CPCwiki) – the sources of these pages, read through a summarising fetch tool, so the numbers are “our words”
- dsk_dsk.cpp (MAME) – the reader whose status bits the viewer names