Acorn Filing Systems

Cassette Filing System

There are three Cassette Formats used by Acorn Computers.

The most basic is that used by the Acorn System 1, it is simply a string of bytes preceded by a start and end address.  In the System 2 Cassette Format the data is formatted into blocks of up to 256 data bytes each with a Filename and other header information at the start of each block.  The integrity of the data is improved by inclusion of a checksum on each block.

The BBC Computer goes a step further by separating the header and data information into separate blocks each with their own checksum.

The following diagrams which show the details of the three Cassette Formats:

The Atom Computer supports both Acorn System 1 and 2 formats though is normally used with the latter.  There is a small difference between the System COS and Atom COS implementations - the filename lengths differ.  System COS filenames can be up to 16 characters whilst Atom COS only allows 13 characters.  I'm not sure how this works, what happens if you load a System COS file with a 16 character filename on an Atom ? (something to try sometime).  The BBC Computer is also capable of reading and writing in the System 1 and 2 formats though I'm not sure how it handles long filenames as it limits filenames to 10 characters.

The System 1 Monitor program provides user commands for saving and loading memory to/from cassette.  Acorn System COS and the Atom OS (which is essentially the same) takes this further and provides user commands for saving and loading memory/programs using named files, further it includes a set of standard OS calls to routines which enable programs to interface with the cassette filing system:

These OS calls are documented in Chapter 9 of the System 2 Technical Manual.

Disk Filing System

The biggest hurdle with the cassettes tape is that tape is serial, to get a particular byte of data requires reading all the preceding data on the tape, the Floppy Disk is a two dimensional device enabling random access to any location on the disk by positioning of the read/write head.

A Floppy Disk is laid out as a series of Tracks split into Sectors.

The System Disk Operating System (DOS) uses single sided, single density disks with 40 or 80 tracks.  Each track is split into 10 sectors each holding 256 bytes.

The total capacity of a disk is therefore either 40 x 10 x 256 = 100K (1K = 1024 bytes)
or 80 x 10 x 256 = 200K

Note: this is not the stored data capacity as some of this is required for a catalogue.

Double sided disks are treated as two separate Volumes in DOS so giving a total disk capacity of up to 400K.

A physical hole punched near the center of the disk is used as a reference to determine Sector 0 as the disk rotates.

Originally the Acorn System was only provided with 5.25" Floppy Disks (Mini Disks) as these were all that was available at the time however the format can also be used with 3.5" Disks (Micro Disks), note though that it may be necessary to modify the 8271 Disk Interface Controller to work correctly with 3.5" drives, see details here.
Floppy Disk Image

Each disk or side of a disk, known as a Volume, can hold a total of 31 files.

 File header information and the location of the file on the disk are stored in a Catalogue which is held in Sectors 0 and 1 of Track 0:

Track 0 Sector 0 (256 bytes) Track 0 Sector 1 (256 bytes)
Byte File Contents Byte File Contents
0 Volume First 8 characters of Volume Title 0 Volume Last 4 characters of Volume Title
1 1
2 2
3 3
4 4 BCD catalogue cycle number *
5 5 Number of catalogue entries x 8 (i.e. 0 to &F8 in increments of 8
6 6 bits 0,1: MS bits of number of (256 byte) sectors on disk (40t = 01, 80t = 11)
bits 4,5: disk boot option (00:no action, 01: load, 10: run, 11: exec)
bits 2,3,6,7 are unused and set to 0
7 7 low byte of number of (256 byte) sectors on disk, (40t = $90, 80t = $20)
8 1 7 character Filename 8 1 Load address
9 9
A A Execute address
B B
C C File Length in bytes
D D
E E bits 0,1 MS bits of Start Sector
bits 2,3 MS bits of Load Address, set to 0 *
bits 4,5 MS bits of File Length
bits 6,7 MS bits of Execute Address, set to 0 *
F Qualifier F Start Sector (LS byte)
10 2 7 character Filename 10 2 Load Address
11 11
12 12 Execute Address
13 13
14 14 File Length in bytes
15 15
16 16 bits 0,1 MS bits of Start Sector
bits 2,3 MS bits of Load Address, set to 0 *
bits 4,5 MS bits of File Length
bits 6,7 MS bits of Execute Address, set to 0 *
17 Qualifier 17 Start Sector (LS byte)
18-1F 3 Filename & Qualifier 18-1F 3 File Attributes
20-27 4 Filename & Qualifier 20-27 4 File Attributes
28-2F 5 Filename & Qualifier 28-2F 5 File Attributes
30-37 6 Filename & Qualifier 30-37 6 File Attributes
38-3F 7 Filename & Qualifier 38-3F 7 File Attributes
40-47 8 Filename & Qualifier 40-47 8 File Attributes
48-4F 9 Filename & Qualifier 48-4F 9 File Attributes
50-57 A Filename & Qualifier 50-57 A File Attributes
58-5F B Filename & Qualifier 58-5F B File Attributes
60-67 C Filename & Qualifier 60-67 C File Attributes
68-6F D Filename & Qualifier 68-6F D File Attributes
70-77 E Filename & Qualifier 70-77 E File Attributes
78-7F F Filename & Qualifier 78-7F F File Attributes
80-87 10 Filename & Qualifier 80-87 10 File Attributes
88-8F 11 Filename & Qualifier 88-8F 11 File Attributes
90-97 12 Filename & Qualifier 90-97 12 File Attributes
98-9F 13 Filename & Qualifier 98-9F 13 File Attributes
A0-A7 14 Filename & Qualifier A0-A7 14 File Attributes
A8-AF 15 Filename & Qualifier A8-AF 15 File Attributes
B0-B7 16 Filename & Qualifier B0-B7 16 File Attributes
B8-BF 17 Filename & Qualifier B8-BF 17 File Attributes
C0-C7 18 Filename & Qualifier C0-C7 18 File Attributes
C8-CF 19 Filename & Qualifier C8-CF 19 File Attributes
D0-D7 1A Filename & Qualifier D0-D7 1A File Attributes
D8-DF 1B Filename & Qualifier D8-DF 1B File Attributes
E0-E7 1C Filename & Qualifier E0-E7 1C File Attributes
E8-EF 1D Filename & Qualifier E8-EF 1D File Attributes
F0-F7 1E Filename & Qualifier F0-F7 1E File Attributes
F8-FF 1F Filename & Qualifier F8-FF 1F File Attributes

Volume Title is padded with NULs or spaces
Filenames are padded with spaces
Addresses and other 2-byte word length values are stored low byte first
* not used by System DOS

The files in the catalogue are sorted by Start Sector starting with the highest Sector and then in descending order, empty files are given a Start Sector of value 2.  In this simple disk filing files cannot be fragmented though there may be free sectors between files.

There is no concept of directories or folders, files are stored 'flat' however each file has a Qualifier assigned which effectively provides a method for separating file types e.g. a source file and object file.

The default Qualifier is '_' (space), note the BBC Computer uses '$'

System DOS (and Atom DOS which is the same) provide commands for saving and loading files.  The basic set of OS calls provided by COS are supplemented by additional routines which make full use of the random access nature of disk storage:

These OS calls are documented from page 19 of the DOS Manual.

Network Filing System

To follow.

Acorn Home Page