Introduction
A TRD file is a copy of a floppy disk formatted by TR-DOS, the disk operating system of the Beta Disk interface, used on the Russian ZX Spectrum clones (Pentagon, Scorpion and others). The file holds every 256-byte sector of the disk in order; emulators mount it as a disk. Its sibling SCL holds only the files.
Standard images are 163,840, 327,680 or 655,360 bytes: 40 or 80 tracks, one or two sides, 16 sectors a track.
Structure
Track 0 holds the catalogue (128 descriptors of 16 bytes in sectors 0 to 7) and the disk information in sector 8. Files follow as runs of whole sectors from logical track 1 on. See Catalogue, information and files.
0Catalogue 128 descriptors of 16 bytes2,048 bytes2048Disk information free space, disk type, counts, label256 bytes2304Rest of track 0 not used1,792 bytes4096Files whole sectors, one after another, then free spaceto the end
Sizes
| Disk type byte | Disk | Bytes |
|---|---|---|
$16 | 80 tracks, double-sided | 655,360 |
$17 | 40 tracks, double-sided | 327,680 |
$18 | 80 tracks, single-sided | 327,680 |
$19 | 40 tracks, single-sided | 163,840 |
The sizes are our sums from the geometry (16 × 256 bytes a track side); the page we read gives no image sizes.
In the explorer
Drop a .trd file on the explorer to see:
- the tree: the catalogue with one node a descriptor and its fields, the disk information with its fields, and every file’s data, with the free space between;
- the disk (label, type, free space), a table of the files (name, type, load address, length, sectors, place), and the Z80 code of every CODE file disassembled at its load address with our decoder;
- every file to open as bytes;
- the problems found: a wrong ID or disk type, counts that disagree with the catalogue, a file outside the image or overlapping another, a length bigger than its sectors.
Not described
Known, not yet covered
- Viewer: BASIC files are not detokenised; the variables area and the start line stored after the program are not shown; array files are not decoded; the disassembly decodes every byte of a CODE file as an instruction.
- Reference: the TR-DOS boot behaviour, the order TR-DOS allocates sectors, files with a gap (MOVE) and non-standard disks (extra tracks, other sector sizes).
Unknown
- Reference: the exact meaning of the number of files (deleted ones counted or not) and the end-of-catalogue marker: the page we read marks the marker as uncertain, and the viewer’s checks of the counts and of the free sector number are our reading.
- Viewer: no real TRD image is on this Mac and none was fetched; the reading is checked on built images only.
Links
Software
- Fuse – ZX Spectrum emulator with Beta Disk support (Windows, macOS, Linux)
- Spectaculator – ZX Spectrum emulator (Windows, macOS)
Reference
- TR-DOS filesystem (Sinclair wiki) – the main source of these pages, read through a summarising fetch, so the numbers are “our words”