module
31

The .dsk file around an Einstein disc, as a reference. Offsets in hex. Sections in brackets.

disk-info header 256 bytes
track 0 block size from the header
track 1 block
...
track 39 block
The track blocks follow one another with nothing between them. For an Einstein disc every block is 5,376 bytes and the file is 256 + 40 x 5,376 = 215,296 bytes.
| Offset | Size | Extended variant | Standard variant |
|---|---|---|---|
00 | 16 / 8 | EXTENDED CPC DSK - check these 16 bytes only; what follows varies | MV - CPC - check these 8 (STANDARD.DSK has MV - CPCEMU Disk-File\r\nDisk-Info\r\n) |
22 | 14 | Name of the program that made the image - not read | same |
30 | 1 | Number of tracks: 40 | same |
31 | 1 | Number of sides: 1 | same |
32 | 2 | not used | Size of every track block, low byte first: 00 15 = 5,376 |
34 | 1 per track | Size of each track block in 256-byte units: 15 = 5,376 | not used |
Find a track by adding up the sizes before it, starting at 256. Always use the sizes - never assume 5,376.
At the start of each track block, 256 bytes:
| Offset | Size | Holds | Einstein value |
|---|---|---|---|
00 | 12 | Track-Info\r\n | |
10 | 1 | Track number | 0-39 |
11 | 1 | Side | 0 |
14 | 1 | Sector size code, N | 2 (512 bytes) |
15 | 1 | Number of sectors | 10 |
16 | 1 | Gap 3 | 2A or 4E seen; not used by a reader |
17 | 1 | Filler | E5 |
18 | 8 per sector | Sector list | |
100 | 512 per sector | Sector data, in sector-list order |
| Offset | Size | Holds |
|---|---|---|
| +0 | 1 | C - track |
| +1 | 1 | H - side |
| +2 | 1 | R - sector ID, 0-9 |
| +3 | 1 | N - size code, 2 |
| +4 | 1 | ST1 - 0 |
| +5 | 1 | ST2 - 0 |
| +6 | 2 | Data length, low byte first: 00 02 = 512 |
To find a sector (S11): take the track block's start, add 0x100, and add 512 x the position of the sector's ID in the list.
0 1 2 3 4 5 6 7 8 9
5 6 7 8 9 0 1 2 3 4
0 5 1 6 2 7 3 8 4 9
A writer may use any order, as long as the list matches the data; edisc.py create uses 0-9.
This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.