Advanced Disc Filing System


The Advanced Disc Filing System 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.
Acorn's original Disc Filing System was limited to 31 files per disk surface, 7 characters per file name and a single character for directory names, a format inherited from the earlier Atom and System 3–5 Eurocard computers. To overcome some of these restrictions Acorn developed ADFS. The most dramatic change was the introduction of a hierarchical directory structure. The filename length increased from 7 to 10 letters and the number of files in a directory expanded to 47. It retained some superficial attributes from DFS; the directory separator continued to be a dot and $ now indicated the hierarchical root of the filesystem. ^ was used to refer to the parent directory, @ the current directory, and \ was the previously-visited directory.
The BBC Master Compact contained ADFS Version 2.0, which provided the addition of format, verify and backup commands in ROM.

8-bit usage

ADFS on 8-bit systems required a WD1770 or later 1772-series floppy controller, owing to the inability of the original Intel 8271 chip to cope with the double-density format ADFS required. ADFS could however be used to support hard discs without a 1770 controller present; in development the use of hard discs was the primary goal, extension to handle floppies came later. The 1770 floppy controller was directly incorporated into the design of the Master Series and B+ models, and was available as an 'upgrade' board for the earlier Model B. The Acorn Electron's floppy interface was an add-on unit, initially available through Acorn and later Pres. The ACP implementation of ADFS fixed a flaw in the Acorn version v1.0, that required the use of a file named ZYSYSHELP. On the Electron, Disk corruption could also occur if attempting to use the *COMPACT command without disabling the blinking cursor. This was due to the fact that the *COMPACT command used screen memory as working space during the operation, and the blinking cursor corrupted that memory space.
ADFS supported hard discs, and 5¼" floppy discs formatted up to 640 KB capacity using double density MFM encoding and M format ). ADFS as implemented in the BBC microcomputer system never had support for single-density floppies.
Hard disc support in ADFS used the same format as L format floppies in terms of 256-byte
blocks;
only the underlying arrangement of tracks and sectors differed depending on the actual drive used, but this was managed by the SCSI controller. It interfaced to a ST506/ST412-based Winchester unit via the BBC Micro's 1 MHz Bus, an Acorn-designed interface card and an off-the-shelf Adaptec SCSI controller.
Support for IDE/ATAPI style drives has been added 'unofficially' by third parties in recent years.

32-bit usage (Arthur and RISC OS)

On 32-bit systems, a WD 1770 or 1772 was initially used as a floppy controller on the early machines of the range. Later models utilised a PC style multi-I/O controller requiring slight changes to ADFS. In addition to legacy support for the 'L'-type format, Arthur and later RISC OS provided enhanced formats which overcome the limitations of the BBC Micro.
Arthur added D format with 77 entries per directory as opposed to the previous 47, also usable on hard discs and a new 800 KB double-density floppy format. A per-file "type" attribute was added in space previously used to store Load and Execute addresses. The 12 bits of type information is used to denote the contents or intended use of a file, typically presented as three hexadecimal digits. This is similar to the 32-bit type attributes stored in Apple's HFS file system, and conceptually comparable to the more general use of MIME Types by the Be Operating System, or magic numbers in Unix systems.
RISC OS brought in E and F format for double-density discs and high-density discs/hard disc drives respectively. These formats support file fragmentation, storage of multiple files per fragment and storage of small files in directory tables. The allocation strategy is optimised to minimise fragmentation, and sometimes performs defragmentation as part of a file storage operation. RISC OS 4 added E+/F+ format which allowed for long filenames and more than 77 files per directory. More recent versions of RISC OS, including those for Iyonix, continue to provide ADFS, and have further extended it to cope with larger hard disc sizes.
Unlike the 8-bit implementation, ADFS as implemented on RISC OS is not monolithic. A system module called "ADFS" provides no more than the block driver and user interfaces, where the "FileCore" module contains the actual file system implementation, and FileSwitch contains the VFS and high-level file-access API implementations. This allows for other hardware to use the ADFS format easily, such as IDEFS, SCSIFS, and the network-aware AppFS. FileCore and FileSwitch's functions are in some ways similar to the IFS and IO system managers in Windows NT. This flexibility has allowed other filing systems to be implemented into RISC OS relatively easily.

Support for ADFS on other platforms

The Linux kernel has ADFS support for E format and later.
NetBSD has filecore support in NetBSD 1.4 onwards.
Tools such as Omniflop, and Libdsk support permit the 'physical' layout of ADFS floppies to be read on PC systems utilising an internal drive. However the logical structure remains unimplemented.