| abstract
| - The filesystem described here is used with the MGT DISCiPLE, +D and SAM Coupé. There are several DOSes which use this filesystem (and extensions thereof), including: Floppy-based
* GDOS (DISCiPLE)
* G+DOS (+D)
* SAMDOS (SAM Coupé)
* UniDOS (DISCiPLE / +D)
* Beta DOS (DISCiPLE / +D)
* Master DOS (SAM Coupé) Hard-disk-based
* B-DOS (SAM Coupé with Atom)
* HDOS (SAM Coupé with SD IDE)
* EDOS (SAM Coupé with Entropy IDE interface — abandoned)
* +DivIDE (ZX Spectrum with DivIDE)
* Plus D'lux patched GDOS/Uni-DOS (ZX Spectrum with Plus D'lux) Disks must be formatted to 10 sectors per track, with 512-byte sectors. Either single-sided or double-sided disks may be used, and up to 80 tracks may be used per side. Sectors are numbered 1..10, and tracks are tagged on disk as 0..79 on both sides. However, within sector addresses stored in the filesystem, the most significant bit of the track number selects the side of the disk to use, meaning that tracks on the first side of the disk are numbered 0..79, and tracks on the second side are numbered 128..207. The disk is divided in two parts. The first is a root directory (consisting of at least the first four tracks on side one). Each directory entry occupies 256 bytes, which gives a minimum of 80 entries (slots) on a disk. Beta DOS and Master DOS allow the root directory to be extended by up to 35 tracks, giving a maximum of 780 slots in Beta DOS. On the SAM, the first sector of track four is used as a boot sector and is (usually) allocated to the first file written to the disk — for this reason, only 78 additional slots can be used in track 4, giving a maximum of 778 slots in Master DOS. The remaining space on the disk can be allocated to files. In UniDOS, contiguous sectors can also be allocated to subdirectories which use the directory entry system described above. In almost all cases, the last two bytes in any sector used by a file contain the address (track number, followed by sector number) of the next sector in that file (although this does not apply to UniDOS subdirectories). For the last sector in a file, the track number and address at the end of that sector are set to 0. Files of certain types include a 9-byte header, and a small amount of special file information is also stored in each file's directory entry. The format of this data varies depending on the file's type. Some extra information may be stored in the very first directory entry. This includes the number of additional tracks reserved for the directory entry (under Beta DOS and Master DOS), a disk label (Master DOS) and a randomly generated disk ID (Master DOS). While Beta DOS and Master DOS may read GDOS and SAMDOS disks, it is best to avoid writing to Beta DOS and Master DOS disks under GDOS or SAMDOS. For instance, SAMDOS will judge any additional tracks used for directory entries to be free for allocation to files. Also, when overwriting slot 1, the additional tracks field, disk label and random ID will be erased. The boot sector on the SAM must contain the text "BOOT" at offset $100 — bits 5 and 7 are ignored when checking this string.
|