DI File Format Description

Programs

Used b
y disk drive emulators on STs.

Conventions


BEWORD - 16bit unsigned short (big endian)
BYTE - 8bit unsigned char

Header


 
Type Name Description
BYTE btMagic1 'D'
BYTE btMagic2 'I'
BYTE btVerLo (?) 0x20
BYTE btVerHi (?) 0x02
CHAR[] szCreator ascii string of creating program
BYTE ? ?
BYTE btTracks tracks
BEWORD wSecPerTrack sectors per track
BEWORD ? flags?
BEWORD wSecSize sector size
BYTE ? ?

Sector table

Then there is bytes table which is long (tracks * sec per track). In every byte is stored checksum of corresponding sector.

Body

Then there are continuous sectors. If the sector is empty, it's not stored in file. Upon reading, if the checksum byte is 0, corresponding sector is not read.
Algorithm is simple - adding the bytes together with the carry. (0xFF + 0x01 = 0x01)
First three sectors of DD disk have only 0x80 bytes stored. . Back (c) 1998-2004 Jindroush Last modified: Tue Feb 27 11:20:52 2001