Table of Contents

Thomson floppy formats

Bad news first: over the existence of the Thomson computer range, various disk formats were used. While they all work the same way, the format was extended several times to work with new floppies:

The disk directory is always on track 20. The structure is as follows:

File directory

Each entry is 32 bytes wide, which makes it possible to store at most 112 files per DD disk side (56 per SD disk).

TypeDescription
0BASIC file
1ASCII text file
2Binary executable
3Assembler source
4Paragraphe (TO9 built-in word processor) text

* 12th byte is an application-specific flag. For BASIC files (type 0), it is set to 0 for tokenized files, and FF for ASCII listings.

Block allocation table

The floppy is allocated by units of 8 sectors (half a track). This is 1KiB on SD disks, and 2KiB on DD disks. The FAT sector stores one byte for each block, starting at byte 1 (byte 0 is unused). A 80 track floppy can only store up to 320KiB of data, so not all the sector is used.

The bytes are valued as follows:

ValueMeaning
FFFree block
FEReserved block (probably belongs to track 20)
00 to BFBlock number of next block in file
C1 to C8File end marker (the low nyble is the number of sectors actually used by the file)

In-memory representation

When working with the filesystem sectors (block table and file directory), the floppy controller ROM uses the 6809 8-bit offset addressing mode. This relative addressing is signed, so things happens as follows:

Since the floppy ROM code always access these sectors using the same addressing mode, including when writing them back to disk, everything stays in the right order on disk. SD disks aren't affected by this, as they use only 128 byte long sectors.

File access procedures

The floppy ROM entry points are rather low-level. Here are some hints on how to perform some basic disk operations.

Reading a file

Saving a file

If you need to remember the exact file size:

Erasing a file