This page gives the blocks of the extended file. The track information block and the sector entries are the same fields as in the standard format’s page, which also lists the status bits MAME uses and the sector ID ranges; what the extended format changes is in the disk information block (a table in place of one track size) and in the sector entries (the stored length is used). Sources: the Sinclair wiki DSK page and the CPCwiki page, through summarising fetch tools (“our words”). Numbers are little-endian.
Disk information block
The first 256 bytes of the file.
| Offset | Size | Field | Description |
|---|---|---|---|
0x00 | 34 | Signature | EXTENDED CPC DSK File, CR LF, Disk-Info, CR LF. Readers check only EXTENDED, and so does this site’s test; the viewer notes a signature text that is not exact. |
0x22 | 14 | Creator | The name of the program that made the file, padded. |
0x30 | 1 | Tracks | The number of tracks. |
0x31 | 1 | Sides | 1 or 2. |
0x32 | 2 | Unused | The standard format keeps the track size here. |
0x34 | 204 | Track size table | One byte for each track and side, in the order track 0 side 0, track 0 side 1, track 1 side 0 … (one side only on a single-sided disk): the size of the track block divided by 256, including its 256-byte track information block. 0 means the track is not stored. |
The block of a track starts at 256 plus the sizes of all the tracks before it. The table has room for 204 entries, so tracks × sides above 204 cannot be described; the viewer reports it. The viewer’s check that the sizes of the stored tracks lead exactly to the end of the file reports extra bytes after the last track.
Track information block
The first 256 bytes of each stored track block; the sector data follows at +256. The fields are those of the standard page: Track-Info and CR LF at 0, the track at 0x10, the side at
0x11, the size code N at 0x14, the number of sectors at 0x15, gap 3 at 0x16, the filler byte at 0x17, then 8 bytes for each sector from 0x18. At most 29 entries fit (232 bytes after the 24-byte header). In the extended format the
size code at 0x14 describes the track as it was formatted; the length of every sector is read from its own entry.
Sector entries
| Offset | Size | Field | Description |
|---|---|---|---|
0 | 1 | C | Track number in the sector ID. |
1 | 1 | H | Side number in the ID. |
2 | 1 | R | Sector number in the ID. |
3 | 1 | N | Size code in the ID: the sector is 128 × 2N bytes. |
4 | 1 | ST1 | Controller status register 1 after reading the sector. |
5 | 1 | ST2 | Status register 2. |
6 | 2 | Data length | The bytes stored for this sector (extended format only). The sector data follow the 256-byte track information block one after another, each with the length its entry gives. |
Weak sectors. A copy-protection sector whose data changes on each read is stored as several copies one after another; the length is then a multiple of the size N gives (CPCwiki). The viewer marks a sector whose length is a larger multiple as “N copies (weak sector)” and reports a length that is not a multiple. The status bits ST1 and ST2 the viewer names are the ones MAME uses, listed on the standard page.