Introduction
An SCL file is a compact copy of the files on a TR-DOS disk: it keeps the descriptors and the files’ sectors and leaves out the empty disk, so it is much smaller than a TRD image. ZX Spectrum emulators read it as a disk (they lay the files out on a blank TR-DOS disk), and it is a common way to share Spectrum clone software.
Structure
The 8 bytes “SINCLAIR”, a byte with the number of files, one 14-byte descriptor for each file, the files’ sectors, and a 4-byte checksum. See Header, descriptors and checksum.
0Header “SINCLAIR” and the number of files9 bytes9Descriptors 14 bytes for each file14 × files9 + 14nFiles whole sectors, in the order of the descriptors256 × sectorsend − 4Checksum4 bytes
In the explorer
Drop a .scl file on the explorer to see the tree (header, every descriptor with its fields, every file’s data, the checksum), the list of files (name, type, load address, length, sectors), the Z80 code of every CODE file disassembled at its load address, every file to open as bytes, and the problems found
(wrong signature, a file count above 128, a length bigger than its sectors, a file cut short, extra bytes, a checksum that differs).
Not described
Known, not yet covered
- Viewer: the archive is not converted to a TRD image; BASIC files are not detokenised; the disassembly decodes every byte of a CODE file as an instruction.
Unknown
- Reference: the checksum’s byte order. Two sources (the Spectrum FAQ and a FlashFloppy issue) say the last 4 bytes are the sum of all the bytes before them; neither gives the byte order, so little-endian is our inference and a “differs” problem on a real file may mean big-endian.
- Viewer: no real SCL file is on this Mac and none was fetched; the reading is checked on built files only.
Links
Software
- Fuse – ZX Spectrum emulator (Windows, macOS, Linux)
Reference
- SCL format (Sinclair wiki) – the main source of these pages, read through a summarising fetch, so the numbers are “our words”