TR-DOS filesystem
The filesystem described here is used with Technology Research Ltd's Beta Disc and Beta 128 Disc disk interfaces. The TR-DOS operating system uses this filesystem.
Floppy disks formatted to 16 sectors per track, with 256-byte sectors. Either single-sided or double-sided disks may be used, and 40 or 80 tracks may be used per side.
The first track of the disk (h0t0s1..h0t0s15) contains the file descriptors (h0t0s1..h0t0s8) and the disk info (h0t0s9). The remaining space on this track is unused.
Space from h0t1s1 on a single sided disk or from h1t0s1 on a double sided disk can be allocated to files. The files are not fragmented.
File descriptor format
A file descriptors are 16 bytes length, so a disk can hold maximum 128 files (8×256/16). The maximum size of a file is 65535 byte.
Offset (dec) | Offest (hex) | Length (dec) | Description |
---|---|---|---|
0 | 0x00 | 8 | Filename, padded with spaces. (If first byte is 0x01 then file is deleted.) |
8 | 0x08 | 1 | File type (extension) |
9 | 0x09 | 2 |
|
11 | 0x0b | 2 | File length in bytes |
13 | 0x0d | 1 | File length in sectors |
14 | 0x0e | 1 | Starting sector |
15 | 0x0f | 1 | Starting (logical) track |
Note1: logical track numbering schema for double sided disks: 0 - h0t0, 1 - h1t0, 2 - h0t1 ... 79 - h1t39, 80 - h0t40 ... 159 - h1t79.
Note2: start line for basic programs is not saved in header file, indeed, it is stored directly at the end of file: after end of basic program (symbol #80), could be placed token #AA followed by little-endian word that reflects start line.
File types
- B: Basic
- C: Code
- D: Data (array variable)
- #: Sequential or Random access file
Disc information
Information for disc is stored at h0t0s9:
Offset (dec) | Offest (hex) | Length (dec) | Description |
---|---|---|---|
0 | 0x00 | 1 | :=0 - Signals end of catalogue (?) |
1 | 0x01 | 224 | Unused (filled with zero - 0x00) |
225 | 0xe1 | 2 | First free sector address sec:track |
227 | 0xe3 | 1 | Disk type (0x16..0x19) |
228 | 0xe4 | 1 | Number of files on disk |
229 | 0xe5 | 2 | Number of free sectors on disk |
231 | 0xe7 | 1 | :=0x10 - TR-DOS ID |
232 | 0xe8 | 1 | Unused: 0x00 |
233 | 0xe9 | 9 | Unused: 0x20 (space) |
243 | 0xf3 | 1 | Unused: 0x00 |
244 | 0xf4 | 1 | Number of deleted files on disk |
245 | 0xf5 | 8 | Disk label |
253 | 0xfd | 3 | End of disk info, filled with 0x00 (Unused?) |
Disk types
- 0x16: 80 tracks, double side
- 0x17: 40 tracks, double side
- 0x18: 80 tracks, single side
- 0x19: 40 tracks, single side
See also
- TRD format, a disk image format typically used for images of TR-DOS filesystems
- SCL format, a compact representation of TR-DOS filesystem content