Inside the Einstein: The Disc, a TatungBytes course: XtalDOS listing the first practice disc image, on a rainbow sunburst
← Back to Modules
module
31

Appendix IV: The Container Format

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

A disc image, from its first byte to its last

The File

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.

Disk-Info Header (S8)

OffsetSizeExtended variantStandard variant
0016 / 8EXTENDED CPC DSK - check these 16 bytes only; what follows variesMV - CPC - check these 8 (STANDARD.DSK has MV - CPCEMU Disk-File\r\nDisk-Info\r\n)
2214Name of the program that made the image - not readsame
301Number of tracks: 40same
311Number of sides: 1same
322not usedSize of every track block, low byte first: 00 15 = 5,376
341 per trackSize of each track block in 256-byte units: 15 = 5,376not used

Find a track by adding up the sizes before it, starting at 256. Always use the sizes - never assume 5,376.

Track-Info Header (S9)

At the start of each track block, 256 bytes:

OffsetSizeHoldsEinstein value
0012Track-Info\r\n
101Track number0-39
111Side0
141Sector size code, N2 (512 bytes)
151Number of sectors10
161Gap 32A or 4E seen; not used by a reader
171FillerE5
188 per sectorSector list
100512 per sectorSector data, in sector-list order

Sector-List Entry (S10)

OffsetSizeHolds
+01C - track
+11H - side
+21R - sector ID, 0-9
+31N - size code, 2
+41ST1 - 0
+51ST2 - 0
+62Data 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.

Sector Orders Seen On Real Einstein Discs

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.

Get the Newsletter

New guides, disk images and community finds, roughly once a quarter. No spam, we promise, this isn't Tatung's marketing department.
Your subscription could not be saved. Please try again.
Your subscription has been successful.

Newsletter

Subscribe to our newsletter and stay updated.

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.