TR-DOS filesystem: Difference between revisions
No edit summary Tags: Mobile edit Mobile web edit |
Tags: Mobile edit Mobile web edit |
||
Line 55: | Line 55: | ||
| Starting (logical) track | | Starting (logical) track | ||
|} | |} | ||
Note: logical track numbering schema for doubke sided disks: 0 - h0t0, 1 - h1t0, 2 - h0t1 ... 79 - h1t39, 80 - h0t40 ... 159 - h1t79. | |||
== File types == | == File types == |
Revision as of 15:36, 8 September 2016
[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.
One disk can hold 128 files maximum. The maximum size of a file is 65535 byte (?).
File descriptor format
A file descriptors are 16 bytes length, so a disk can hold maximum 128 files (8×256/16).
Offset (dec) | Offest (hex) | Length (dec) | Description |
---|---|---|---|
0 | 0x00 | 7 | Filename, padded with spaces. (If first byte is 0x01 then file is deleted.) |
8 | 0x08 | 1 | File type (extension) |
9 | 0x09 | 2 | File start address little-endian format |
10 | 0x0a | 2 | File length in bytes |
13 | 0x0c | 1 | File length in sectors |
14 | 0x0e | 1 | Starting sector |
15 | 0x0f | 1 | Starting (logical) track |
Note: logical track numbering schema for doubke sided disks: 0 - h0t0, 1 - h1t0, 2 - h0t1 ... 79 - h1t39, 80 - h0t40 ... 159 - h1t79.
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