SCL format

From Sinclair Wiki
Revision as of 00:45, 10 May 2020 by Zub (talk | contribs) (Use proper multiplication symbols)
Jump to navigation Jump to search

The SCL format is a compact representation of TR-DOS filesystem content. It stores only the file headers and the used sectors.

It is conventional for emulators to build real disk images on the fly from SCL data to use for disk emulation.

SCL file structure

The file begins with a 8 byte 'magic': SINCLAIR, then the number of files, the file headers an after that all the data blocks.

Offset Length Comment
0x0000 9 SCL file header
0x0009 N × 14 File headers
0x0009 + N × 14 DATA LENGTH Sector data

SCL file header

Offset Length Comment
0x0000 8 Signature "SINCLAIR"
0x0008 1 Number of files (N)

File headers

Offset Length Comment
0x0000 14 1st file header entry
0x000e 14 2nd file header entry
... ... ...
0x0000 + (N-1) × 14 14 Nth file header entry

File header entry

The file headers structure is the same as in the TR-DOS filesystem, except the last two bytes (start sector, start track).

Offset Length Comment
0x0000 8 File name
0x0008 1 File type
0x0009 3 File parameters (based on type)
0x000d 1 File length in sectors

Files data

Offset Length Comment
0x0000 1st file length × 256 1st file data
0x0000 + 1st file length × 256 2nd file length × 256 2nd file header entry
... ... ...
0x0000 + .... last file length Nth file header entry

See also

TRD format