Introduction
An SSD or DSD file is a copy of a floppy disc written by the Disc Filing System (DFS), the filing system Acorn sold with the BBC Micro. Emulators of the BBC Micro (A, B, B+ and Master, all with a 6502 or 65C02) load these files as discs, and most BBC software that survives on disc is kept in them.
The two names differ only in the order of the sectors. An .ssd is one side of a disc, sector after
sector. A .dsd is a double-sided disc: the two sides are interleaved track by track, track 0 of
side 0, then track 0 of side 1, then track 1 of side 0, and so on. Each side is a DFS disc with a catalogue of
its own. There is no header and no signature: the file is the sectors and nothing else.
Structure
Sectors are 256 bytes and there are 10 to a track. The first two sectors of a side hold the catalogue: the disc title, a count of the files, the boot option, the number of sectors, and for each of up to 31 files a name, a load address, an execution address, a length and a start sector. The files follow, each as a run of whole sectors (a file is never split). See geometry for the sizes and the DSD order and files for how a file is read out.
0Sector 0 first 8 characters of the title, then 31 name entries of 8 bytes256 bytes256Sector 1 last 4 characters of the title, cycle number, entry count, boot option, sector count, then 31 file entries of 8 bytes256 bytes512Sectors 2 and up the files, each a run of whole sectorsup to the end of the disc
Sizes
A DFS side has 40 or 80 tracks. The catalogue says how many sectors it has (400 or 800).
| Image | Sectors in the file | Bytes | Usually called |
|---|---|---|---|
| 40-track .ssd | 400 | 102,400 | 100K |
| 80-track .ssd, or 40-track .dsd | 800 | 204,800 | 200K |
| 80-track .dsd | 1600 | 409,600 | 400K |
Many images are shorter than the disc they describe: a file may stop after the last used track. The catalogue still says 400 or 800 sectors, so the explorer treats the sectors past the end of the file as missing, not as an error. Images of 800K and more that carry the same extensions are other filing systems (see other discs).
In the explorer
Drop an .ssd or .dsd file on the explorer to see:
- the tree: every track and, in it, every sector, labelled by what it is (a catalogue sector, sector n of a file, free, or beyond the end of a short image). The two catalogue sectors show their fields, entry by entry;
- a picture of the disc, one square a sector (a .dsd shows its two sides next to each other), the files as a table, and the sectors as a table;
- every file as something you can open: a BBC BASIC program as a detokenised listing, machine code disassembled at its load address with the BBC's operating system calls and hardware named, text as text, and the raw bytes of a text file;
- the machine code of the files that lie in one piece in the image, disassembled directly in the disc's own view;
- the problems found, listed, with the disc still opening: an entry count that is not a multiple of 8, a file past the end of the disc, a file inside the catalogue, two files sharing a sector, a file the short image does not hold.
A DFS catalogue holds no file type, so the viewer guesses from the bytes: a file whose lines read as tokenised BASIC from the first $0D to a $0D $FF end marker is BASIC, a file of printable characters and line breaks is text, anything else is machine code or data. The options bar sets the sides (detected from the extension, or for another file name from the sector count) and the processor the machine code is disassembled for, the 6502 of the BBC Micro A, B and B+ or the 65C02 of the Master.
Some tools keep a .INF sidecar beside each file they extract from a disc: a small text file named after the extracted file with its catalogue information, a line of the file's name and its load address, execution address and length in hexadecimal, often with a locked flag. It is a convention of those tools, not part of the disc image; the explorer does not read one, because an image already holds the same facts in its catalogue.
Not described
Known, not yet covered
- Viewer: the Watford DFS second catalogue (62 files) is only noticed, from eight
$AAbytes at the start of sector 2; its extra entries are not read (catalogue). - Viewer: other filing systems under the same extensions (ADFS, the CP/M discs of the Torch and Acorn CP/M, Opus DDOS and the like) are not read: they show as sectors with the catalogue refused (other discs).
- Viewer: sequential double-sided images (side 0 entirely, then side 1) and the 800K ADFS formats are not offered as layouts.
- Viewer: no BASIC V, BASIC I or Master BASIC 4 specific token differences are shown; the BASIC II table is used for every program (BBC BASIC).
Unknown
- Reference: bit 2-3 and bit 6-7 of byte 6 of sector 1 (the title/boot byte) have no known meaning here; the viewer ignores them.
- Viewer: all twelve real discs on the Mac are readable, but none is a protected disc, a 62-file Watford disc or a disc with a damaged catalogue, so those readings are checked on built images only. There is no emulator on the Mac that reads a DFS catalogue; the second routes were the geometry of the jsbeeb loader and an independent sector reader written for the tests.
Links
Software
Reference
- Stardot – the BBC Micro community site and forums, where DFS disc formats and tools are discussed