Disc Filing System

Last updated
DFS
Developer(s) Acorn Computers
Full nameDisc Filing System
Introduced1982;41 years ago (1982) with Acorn MOS
Partition IDs None
Structures
Directory contentsSingle catalogue of 31 fixed length records
File allocationStart-Length entries
Bad blocksNone
Limits
Max volume size256 KB
Max file size255½ KB
Max no. of files31
Max filename length7 characters
Allowed filename
characters
ASCII
Features
Dates recordedNone
Date rangeN/A
Forks No
AttributesDirectory character, Load address, Execution address, Locked
File system
permissions
No
Transparent
compression
No
Transparent
encryption
No
Other
Supported
operating systems
Acorn MOS

The Disc Filing System (DFS) is a computer file system developed by Acorn Computers, initially as an add-on to the Eurocard-based Acorn System 2.

Contents

In 1981, the Education Departments of Western Australia and South Australia announced joint tenders calling for the supply of personal computers to their schools. Acorn's Australian computer distributor, Barson Computers, convinced Joint Managing Directors Hermann Hauser and Chris Curry to allow the soon to be released Acorn BBC Microcomputer to be offered with disk storage as part of the bundle. They agreed on condition that Barson adapted the Acorn DFS from the System 2 without assistance from Acorn as they had no resources available. This required some minor hardware and software changes to make the DFS compatible with the BBC Micro.

Barson won the tenders for both states, with the DFS fitted, a year ahead of the UK. It was this early initiative that resulted in the BBC Micro being more heavily focused on the education market in Australia, with very little penetration of the home computer market until the arrival of the Acorn Electron.

The DFS shipped as a ROM and Disk Controller Chip fitted to the BBC Micro's motherboard. The filing system was of extremely limited functionality and storage capability, using a flat directory structure. Each filename can be up to seven letters long, plus one letter for the directory in which the file is stored. [1]

The DFS is remarkable in that unlike most filing systems, there was no single vendor or implementation. The original DFS was written by Acorn, who continued to maintain their own codebase, but various disc drive vendors wrote their own implementations. Companies who wrote their own DFS implementations included Cumana, Solidisk, Opus and Watford Electronics. The Watford Electronics implementation is notable for supporting 62 files per disc instead of the usual 31, using a non-standard disc format. Beyond that, the Solidisk implementation introduced proprietary "chained" catalogues which allowed unlimited files per disc (only constrained by the disk size). [2] Other features in third-party implementations included being able to review free space, and built-in FORMAT and VERIFY commands, which were shipped on a utility disc with the original Acorn DFS.

Acorn followed up their original DFS series with the Acorn 1770 DFS, which used the same disc format as the earlier version but added a set of extra commands and supported the improved WD1770 floppy drive controller chip.

Physical format

DFS conventionally uses one side of a double-density 5¼" floppy disc. Discs are formatted as either 40 or 80 track, giving a capacity of 100 or 200 KB per side (ten 256-byte sectors per track, with FM encoding).

The capacity is limited by the choice of the Intel 8271 controller in the original BBC Micro, which only supports FM encoding, not the MFM encoding which was already in common use by the time of the BBC Micro's launch. FM encoding gives half the recording capacity of MFM for a given physical disc density.

FM and MFM encoding are commonly referred to as "single density" and "double density", although the discs and drives are the same, unlike "high density", which uses different drives and discs.

Double-density 3½" discs can be formatted and used with 1770 DFS (the Intel 8271-based DFS has problems with many 3½" drives), giving the same "single-density" capacity with FM encoding, but this was not originally standard practice. 3½" discs were normally formatted as MFM "double density" using the later Advanced Disc Filing System, as this is present in all Acorn machines supplied with 3½" drives. As of 2009, 3½" drives are more commonly used with BBC Micros than in the past, including use with DFS, due to their greater availability and easier data interchange with more recent computers.

High-density 5¼" and 3½" discs are not supported by DFS.

Single- and double-sided operation

The DFS does not directly support double-sided discs; instead, the two heads of a double-sided drive are treated as two separate logical drives. The DFS can support up to four volumes, numbered from 0 to 3. Drive 0 is the default with drive 1 representing a second drive attached to the cable. "Drive" 2 referred to the reverse side of drive 0, and "drive" 3 was the reverse of drive 1. There is no support for more than two physical drives.

Due to the installed base of single-sided drives, commercial software was normally provided on single-sided discs, or as "flippy discs" that were manually reversed to access the other side.

40- and 80-track compatibility

Discs can be formatted using 40 or 80 tracks, using the *FORM40 or *FORM80 commands, and drives can be either 40 or 80 track. This is the most common compatibility issue for DFS users: 40-track discs were the norm for commercial software distribution, due to the installed base of 40-track drives, but 80-track drives became more common as prices dropped, allowing users to store more data. An 80-track drive will not automatically read 40-track discs.

The disc capacity is stored as a sector count in the catalogue on track zero. Track zero is located in the same place on both 40- and 80-track discs, allowing a disc file system to set the motor stepping accordingly. However, the Intel 8271-based Acorn DFS does not do so, and so dual-format capability was addressed in a number of ways:

Failure to use the correct setting would result in errors from the DFS such as Disk fault 18 at 01/00, [5] or damage to the disc drive by trying to step the heads beyond the physical end of the disc surface.

Switching to 80 tracks did not extend the catalogue in any way, leaving the user prone to running out of filename slots before running out of space on the disc. This situation resulted in a Cat full error.

File storage

Filenames

DFS is case-preserving but not case-sensitive. The prevalence of all-capitals filenames is most likely due to the BBC Micro defaulting to caps lock being enabled after a hard or soft reset. The character set is quite permissive, and all printable characters of 7-bit ASCII are allowed, including spaces, but excluding:

For the sake of portability to third-party DFS implementations, it is best to avoid : and . in leaf names.

Quotation marks are allowed, although BBC BASIC requires them to be escaped twice:

A fully qualified filename, or "file specification" ("fsp" for short) contains a colon then the drive number, a dot, then the directory letter, another dot, and the name. For example, a file in the default directory of "drive" 2 called BOB would have a complete specification of :2.$.BOB. The drive and directory specifiers are both optional.

Directories

"Directories" in the DFS are single character prefixes on filenames - such as F in F.BankLtr - used to group files. The arrangement is flat and a default directory of $ is used instead of a root directory. On requesting a catalogue of the disc (with the *CAT or *. commands), files in the current directory are shown with no directory prefix in one block, and below that are listed all other files in a second block, with their directory prefixes visible. For example, (from Acorn DFS - third party DFS implementations may vary slightly):

PROGRAM (12) Drive 0             Option 2 (RUN) Dir. :0.$           Lib. :0.$      !BOOT               HELLO     SUMS                TABLE     TEST                VECTORS     ZOMBIE    A.HELLO   L         B.SUMS   F.BankLtr

The top seven files are all in the current directory which is $ on drive 0. Below that are all the files in other directories, in this case A, B and F. An L after a filename (as with A.HELLO, above) shows the file is locked against modification or deletion. The first line contains the disc title and the modification count.

The DFS provides a working space, divided up into the directory and the library. The "directory" is the working directory on the current volume, much like the working directory on any other command line system. The "library" is a second, alternative working directory that functions more like PATH and had the benefit of being able to be on any volume. Requests to open files with unqualified names, will first be searched for in the working directory; failing this, the library directory will also be searched. The directory and library both default to the same directory.

Disc structure

The catalogue (file table) occupies the first two disc sectors: one for the names and directories of each file, and a matching sector holding the file locations, sizes and metadata. Eight bytes of each sector are used for each file. With a further eight bytes from each sector reserved for the 12-byte disc title and the volume information, the total number of files on the disc (irrespective of which directory each file is in) is limited to 31. In the interests of saving space, the most significant bit of the directory letter for a file is used as the locked (read-only) flag.

Volume size

Although physical disks are usually formatted as either 100 KB or 200 KB, DFS supports volume sizes up to 256 KB.

The largest DFS file size allowed is the volume size minus ½ KB for the catalogue, as file sizes are stored as an 18-bit quantity.

File allocation

The DFS does not support data fragmentation, meaning a file's data must be stored in a single run of consecutive sectors, but free space is prone to becoming fragmented. Random-access file writes fail when the end of the file reaches the beginning of the next, even though there may be free sectors elsewhere on the disc. In such cases the DFS aborts with a Can't extend error. SAVE is also unable to split a file to fit the available space, but as the failure occurs at the sector allocation stage, the error returned is Disk full.

The *COMPACT command is provided to relocate all files on disc to a solid block, placing all the free space after it in a second block. This allows the next file created to fill the disc, but only the last existing file can be extended without being moved. SAVE deletes any existing file and copies the specified block of memory to wherever there is space on the disc. In contrast the *COMPACT command uses program memory as a buffer to relocate the files, overwriting any program and data in memory.

Metadata

Like the cassette filing system, the Acorn DFS supports the BBC Micro's standard file metadata: load address and execution address, required because Acorn MOS (the operating system used by the BBC Micro) does not support relocation of binary code. A file should be loaded to the address the programmer intended, as the contents may refer to internal locations by absolute addresses. An execution address is also recorded as the entry point is not necessarily at the beginning, or even within the file.

File attributes are limited to a single bit: Locked. When set, an L appears to the right of the file's name in the catalogue and the file may not be altered, overwritten or deleted.

Dates

DFS discs do not track any dates (because Acorn MOS prior to version 3 did not maintain a real-time clock) but instead offer a peculiar feature: a modification count. Every time the catalogue is updated, the count increments. The count is shown in parentheses after the title in the first line of the disc catalogue, such as the 12 in the catalogue listing shown earlier.

Other features

The DFS also supports a means to start up disc software based on a key sequence. If the shift key is held while the machine is soft or hard reset, the DFS checks drive 0 for a disc containing a positive boot flag. The boot flag is either 0 (ignore), 1 (load file), 2 (run machine code file) or 3 ("execute" script). If the boot flag is positive, a file called $.!BOOT is looked for and loaded into memory (1), loaded and executed as machine code (2) or fed into the keyboard buffer (3). Option 3 reads "EXEC" files, text macro files used as primitive shell scripts. These are not true shell scripts but simply a series of keys to be typed, like a recording to play back. Thus, they cannot loop or branch unless they input such code into the BASIC interpreter. As well as being used during a reset, they can be executed at any time with the operating system's *EXEC command. EXEC files are file system independent.

Alternatives

There was a variant of the DFS called the DNFS, or Disc/Network Filing System, that contained the Econet Network Filing System (NFS), standard Disc Filing System and Tube co-processor support software on a single ROM; this ROM installed two filing systems into the OS at once.

The initial design for the DFS was based around an Intel Corporation FDC 8271 disc drive controller, the immediate predecessor of the 8272 design found in the IBM Personal Computer. The 8271 controller was of limited functionality and obsolete, and later versions of the file system from various vendors including Solidisk, Acorn and Watford Electronics were based on the later WD1770 and WD1772 drive controllers. The 1770 controller quickly became the standard controller in the Acorn range following the advent of ADFS.

The DFS was superseded by the Advanced Disc Filing System (ADFS) which was fully hierarchical and was suitable for running hard drives on the BBC Micro. The ADFS was the default filing system on the BBC Master but most users are likely to have reverted to the DFS for compatibility reasons; ADFS could not read DFS discs. The ADFS was also chosen as the standard filing system for RISC OS.

Related Research Articles

<span class="mw-page-title-main">Acorn Electron</span> Personal computer sold in Britain

The Acorn Electron was a lower-cost alternative to the BBC Micro educational/home computer, also developed by Acorn Computers Ltd, to provide many of the features of that more expensive machine at a price more competitive with that of the ZX Spectrum. It had 32 kilobytes of RAM, and its ROM included BBC BASIC II together with the operating system. Announced in 1982 for a possible release the same year, it was eventually introduced on 25 August 1983 priced at £199.

<span class="mw-page-title-main">Commodore 1581</span>

The Commodore 1581 is a 3½-inch double-sided double-density floppy disk drive that was released by Commodore Business Machines (CBM) in 1987, primarily for its C64 and C128 home/personal computers. The drive stores 800 kilobytes using an MFM encoding but formats different from the MS-DOS, Amiga, and Mac Plus formats. With special software it's possible to read C1581 disks on an x86 PC system, and likewise, read MS-DOS and other formats of disks in the C1581, provided that the PC or other floppy handles the "720 kB" size format. This capability was most frequently used to read MS-DOS disks. The drive was released in the summer of 1987 and quickly became popular with bulletin board system (BBS) operators and other users.

<span class="mw-page-title-main">Commodore 1571</span> Floppy disk drive

The Commodore 1571 is Commodore's high-end 5¼" floppy disk drive, announced in the summer of 1985. With its double-sided drive mechanism, it has the ability to use double-sided, double-density (DS/DD) floppy disks, storing a total of 360 kB per floppy. It also implemented a "burst mode" that improved transfer speeds, helping address the very slow performance of previous Commodore drives.

A disk operating system (DOS) is a computer operating system that resides on and can use a disk storage device, such as a floppy disk, hard disk drive, or optical disc. A disk operating system provides a file system for organizing, reading, and writing files on the storage disk, and a means for loading and running programs stored on that disk. Strictly, this definition does not include any other functionality, so it does not apply to more complex OSes, such as Microsoft Windows, and is more appropriately used only for older generations of operating systems.

<span class="mw-page-title-main">Floppy disk</span> Removable disk storage medium

A floppy disk or floppy diskette is a type of disk storage composed of a thin and flexible disk of a magnetic storage medium in a square or nearly square plastic enclosure lined with a fabric that removes dust particles from the spinning disk. Floppy disks store digital data which can be read and written when the disk is inserted into a floppy disk drive (FDD) connected to or inside a computer or other device.

<span class="mw-page-title-main">TRSDOS</span> Operating system for Tandy TRS-80 computers

TRSDOS is the operating system for the Tandy TRS-80 line of eight-bit Zilog Z80 microcomputers that were sold through Radio Shack from 1977 through 1991. Tandy's manuals recommended that it be pronounced triss-doss. TRSDOS should not be confused with Tandy DOS, a version of MS-DOS licensed from Microsoft for Tandy's x86 line of personal computers (PCs).

The Amiga Fast File System is a file system used on the Amiga personal computer. The previous Amiga filesystem was never given a specific name and known originally simply as "DOS" or AmigaDOS. Upon the release of FFS, the original filesystem became known as Amiga Old File System (OFS). OFS, which was primarily designed for use with floppy disks, had been proving slow to keep up with hard drives of the era. FFS was designed as a full replacement for the original Amiga filesystem. FFS differs from its predecessor mainly in the removal of redundant information. Data blocks contain nothing but data, allowing the filesystem to manage the transfer of large chunks of data directly from the host adapter to the final destination.

On the Amiga, the Old File System was the filesystem for AmigaOS before the Amiga Fast File System. Even though it used 512-byte blocks, it reserved the first small portion of each block for metadata, leaving an actual data block capacity of 488 bytes per block. It wasn't very suitable for anything except floppy disks, and it was soon replaced.

<span class="mw-page-title-main">BBC Master</span> Microcomputer

The BBC Master is a home computer released by Acorn Computers in early 1986. It was designed and built for the British Broadcasting Corporation (BBC) and was the successor to the BBC Micro Model B. The Master 128 remained in production until 1993.

<span class="mw-page-title-main">Western Digital FD1771</span> Floppy disk controller

The FD1771, sometimes WD1771, is the first in a line of floppy disk controllers produced by Western Digital. It uses single density FM encoding introduced in the IBM 3740. Later models in the series added support for MFM encoding and increasingly added onboard circuitry that formerly had to be implemented in external components. Originally packaged as 40-pin dual in-line package (DIP) format, later models moved to a 28-pin format that further lowered implementation costs.

Floppy disk format and density refer to the logical and physical layout of data stored on a floppy disk. Since their introduction, there have been many popular and rare floppy disk types, densities, and formats used in computing, leading to much confusion over their differences. In the early 2000s, most floppy disk types and formats became obsolete, leaving the 3+12-inch disk, using an IBM PC compatible format of 1440 KB, as the only remaining popular format.

Unified Emulator Format (UEF) is a container format for the compressed storage of audio tapes, ROMs, floppy discs and machine state snapshots for the 8-bit range of computers manufactured by Acorn Computers. First implemented by Thomas Harte's ElectrEm emulator and related tools, it is now supported by major emulators of Acorn machines and carried by two online archives of Acorn software numbering thousands of titles.

<span class="mw-page-title-main">Floppy-disk controller</span> Circuitry that controls reading from and writing to a computers floppy disk drive

A floppy-disk controller (FDC) has evolved from a discrete set of components on one or more circuit boards to a special-purpose integrated circuit or a component thereof. An FDC directs and controls reading from and writing to a computer's floppy disk drive (FDD). The FDC is responsible for reading data presented from the host computer and converting it to the drive's on-disk format using one of a number of encoding schemes, like FM encoding or MFM encoding, and reading those formats and returning it to its original binary values.

<span class="mw-page-title-main">MK-DOS</span> Operating system

MK-DOS was one of the most widespread operating systems for Elektronika BK personal computers, developed by Mikhail Korolev and Dmitriy Butyrskiy from 1993. Like ANDOS, the system provided full compatibility for all models, emulating the BK-0010 environments on the more modern BK-0011 and BK-0011M machines. All program requests to a magnetic tape were redirected to the disk.

<span class="mw-page-title-main">BBC Micro</span> Series of British microcomputers by Acorn

The British Broadcasting Corporation Microcomputer System, or BBC Micro, is a series of Microcomputers designed and built by Acorn Computers Limited in the 1980s for Computer Literacy Project of the BBC. Designed with an emphasis on education, it was notable for its ruggedness, expandability, and the quality of its operating system. An accompanying 1982 television series, The Computer Programme, featuring Chris Serle learning to use the machine, was broadcast on BBC2.

The Advanced Disc Filing System (ADFS) is a computing file system unique to the Acorn computer range and RISC OS-based successors. Initially based on the rare Acorn Winchester Filing System, it was renamed to the Advanced Disc Filing System when support for floppy discs was added and on later 32-bit systems a variant of a PC-style floppy controller.

<span class="mw-page-title-main">Floppy disk variants</span> Types of floppy disk formats

The floppy disk is a data storage and transfer medium that was ubiquitous from the mid-1970s well into the 2000s. Besides the 3½-inch and 5¼-inch formats used in IBM PC compatible systems, or the 8-inch format that preceded them, many proprietary floppy disk formats were developed, either using a different disk design or special layout and encoding methods for the data held on the disk.

The FAT file system is a file system used on MS-DOS and Windows 9x family of operating systems. It continues to be used on mobile devices and embedded systems, and thus is a well suited file system for data exchange between computers and devices of almost any type and age from 1981 through the present.

<span class="mw-page-title-main">Commodore D9060</span>

The Commodore D9060/D9090 Hard Disks were the only family of hard drives that Commodore made for both the home and business market. The electronics are identical in the D9060 and the larger D9090 unit; the only difference is the size of the installed hard drive, with a jumper set to distinguish between 4 or 6 disk heads. Originally intended for the metal-cased PET/CBM series of computers, they are compatible with the VIC-20, Commodore 64 and later models with an adapter.

References

  1. "Chriswhy.co.uk" (PDF).
  2. "MMB/SSD Utils in perl".
  3. Cook, Mike (October 1985). "Downgrading your system? Yes, it can make sense". The Micro User . Stockport, UK: Database Publications. 3 (8): 125–127. ISSN   0265-4040.
  4. Nixon, Chris (April 1987). "DIY dual format discs". The Micro User . Stockport, UK: Database Publications. 5 (2): 43–44. ISSN   0265-4040.
  5. Acorn Disc Filing System User Guide, issue no.2, July 1983, page 84. "Disk" is spelled with a "k" in error messages, but "c" in the name of the filing system.