Advanced Disc Filing System: Difference between revisions

Content deleted Content added
Nick Reeves design document
8-bit usage: Removed "citation needed" for ZYSYSHELP remarks since they are supported by the existing source.
 
(40 intermediate revisions by 32 users not shown)
Line 1:
{{how-to|date=August 2018}}
{{infobox filesystem
|name = ADFS
|full_name = Advanced Disc Filing System
|developer = Hugo Tyson, Nick Reeves ([[Acorn Computers]])
|introduction_os = [[Acorn MOS]]
|introduction_date = {{Start date and age|1983}}
|partition_id = <ttcode>Hugo</ttcode> or <ttcode>Nick</ttcode> (Directory header/footer)
|directory_struct = Hierarchical fixed-length tables
|file_struct = One range per file plus table of free-space ranges (L), bitmap with embedded file IDs (E)
|bad_blocks_struct = none (L),<ref name="reeves-efmt"/>, marked in bitmap (E)
|max_filename_size = 10 characters
|max_files_no = 47 per directory (L), 77 per directory (E)
|max_volume_size = 512 [[mibibytemegabyte|MiBMB]]
|max_file_size = 512 [[mibibytemegabyte|MiBMB]]
|filename_character_set = [[ASCII]] (Acorn&nbsp;MOS), {{nowraplinks|[[ISO 8859-1]]}} (RISC&nbsp;OS)
|dates_recorded = Modification
Line 18 ⟶ 19:
|date_resolution = 10 ms
|forks_streams = no
|attributes = Load andaddress, executionexecute addressesaddress and file cycle number (Acorn MOS),; File type and modification time (RISC OS); User read/write/execute-only; public read/write/execute-only; Deletion lock
|file_system_permissions = None
|compression = No
Line 25 ⟶ 26:
|OS = [[Acorn MOS]], [[RISC OS]]
}}
The '''Advanced Disc Filing System''' ('''ADFS''') is a computing [[file system]] particularunique to the [[Acorn Computers Ltd|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 discsdisc]]s was added (utilisingusing a [[Western Digital FD1771|WD1770 floppy disc controller]]) and on later [[32-bit]] systems a variant of a PC-style floppy controller.<ref>{{ cite book | url=http://acornchrisacorns.chriswhycomputinghistory.coorg.uk/docs/Acorn/Manuals/Acorn_ADFSUG.pdf | title=Advanced Disc Filing System: User Guide | publisher=Acorn Computers Limited | date=September 1985 | issue=1 | access-date=1 August 2016 }}</ref>
 
Acorn's original [[Disc Filing System]] was rather limited into that few31 files couldper bedisk stored on a disksurface, and7 directorycharacters andper file names were restricted to a minimum of 1name and a maximumsingle ofcharacter 7for characters.directory Thenames, Disca Filingformat System'sinherited limitations were in part due to its basis on the disc firmware used infrom the earlier Acorn Atom and System 3–5 [[Eurocard (printed circuit board)|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 <code>$</code> now indicated the hierarchical root of the filesystem. "<code>^</code>" (minus the quotes) was used to refer to the parent directory, <code>@</code> the current directory, and "<code>\</code>" was the previously- visited directory.
 
The BBC Master Compact contained ADFS Versionversion 2.0, which provided the addition of format, verify and backup commands in ROM, but omitted support for hard discs.<ref name="acornuser198610a">[{{cite news |url=https://archive.org/details/AcornUser051-Oct86/page/n16/mode/1up |work=Acorn User |title=Taking the lid off the Master Compact |date=October 1986 |access-date=5 Review -September Page2020 |pages=17]}}</ref>
 
== 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.{{citation needed|date=March 2021}} The 1770 floppy controller was directly incorporated into the design of the Master Series and B+ models,<ref name="acornuser198507">{{ cite news | url=https://archive.org/details/AcornUser036-Jul85/page/n161/mode/2up | title=B+ Grading | work=Acorn User | date=July 1985 | access-date=18 October 2020 | last1=Smith | first1=Bruce | pages=160–161 }}</ref> and was available as an upgrade board for the earlier Model B.<ref name="1770_disc_interface">{{ cite book | url=http://chrisacorns.computinghistory.org.uk/docs/Acorn/Misc/Acorn_1770DiscIF.pdf | title=1770 Disc Interface | publisher=Acorn Computers Limited | access-date=6 March 2021 }}</ref><ref name="1770_disc_upgrade_kit">{{ cite book | title=1770 Disc Interface Upgrade Kit Fitting Instructions | url=http://chrisacorns.computinghistory.org.uk/docs/Acorn/Tech/Acorn_1770DiscIFUpgradeKit.pdf | publisher=Acorn Computers Limited | date=August 1985 | issue=1 | access-date=11 March 2021 }}</ref> ADFS could be added to Model B and B+ systems with an additional upgrade.<ref name="adfs_upgrade">{{ cite book | url=http://chrisacorns.computinghistory.org.uk/docs/Acorn/Misc/Acorn_ADFSUpgrade.pdf | title=ADFS upgrade | publisher=Acorn Computers Limited | access-date=6 March 2021 }}</ref>
 
The [[Acorn Electron#Acorn Plus 3|Acorn Plus 3]], Acorn's official disc expansion for the Acorn Electron, was supplied with ADFS as standard, but this implementation featured various notable bugs. A file called {{mono|ZYSYSHELP}} was "required by the system" and created during formatting.<ref name="plus3ug">{{ cite book | url=http://chrisacorns.computinghistory.org.uk/docs/Acorn/Manuals/Acorn_Plus3UG.pdf | title=The Electron Plus 3 User Guide | publisher=Acorn Computers Limited | date=October 1984 | issue=1 | access-date=6 March 2021 }}</ref>{{rp|pages=7}} This was a kludge. Acorn's original ADFS implementation on the Electron was unreliable when writing to the first few tracks of a floppy disc, so this was a "fix" and simply involved writing a file full of garbage to the suspect part. The ADFS would then skip it. Disc corruption could also occur if attempting to use the {{kbd|*COMPACT}} command without disabling the blinking text cursor.<ref name="electronuser198808">{{ cite news | url=https://archive.org/details/ElectronUserVolume5/Electron-User-05-11/page/n8/mode/1up | title=Improving on perfection | work=Electron User | volume=5 | issue=11 | date=August 1988 | access-date=20 January 2021 | last1=Waddilove | first1=Roland | pages=9 }}</ref><ref group=note>This was due to the fact that the {{kbd|*COMPACT}} command used screen memory (by default) as working space during the operation, and the software-implemented blinking cursor corrupted that memory space. An alternative would be to give arguments to make it use non-screen memory for workspace, for example {{kbd|*COMPACT 40 20}} in screen mode 6. On the BBC Micro, the blinking cursor, if enabled, was superimposed onto the display output by the 6845 CRTC and Acorn's video ULA, without changing any screen memory. The Acorn Electron did not have this extra hardware and had to alter screen memory in software to blink the cursor.</ref> Hugo Tyson, principal ADFS developer, recalls that this bug was found during late testing but not fixed in the initial ROM release in order to avoid late changes, as workarounds exist.
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 a hard disc without a 1770 controller present. The 1770 floppy controller was directly incorporated into the design of the Master Series and B+ models{{Citation needed|date=June 2007}}, and was available as an 'upgrade' board for the earlier Model B. The Acorn Electron's floppy interface (Acorn Plus 3) was an add-on unit, initially available through Acorn and later Pres (aka Advanced Computer Products). 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 <tt>*COMPACT</tt> command without disabling the blinking cursor. This was due to the fact that the <tt>*COMPACT</tt> command used screen memory as working space during the operation, and the blinking cursor corrupted that memory space.<ref>http://www.portices.fr/formation/Res/Info/Dimet/Ordinateurs/AcornBBC/www.stairwaytohell.com/Ressources/r-EU-ACP-E00ADFS.html</ref>
 
On the Electron, disc formatting was done via the {{kbd|*EFORM}} command instead of the established {{kbd|*FORM40}}/{{kbd|*FORM80}} DFS commands. Note additionally that the {{kbd|*EFORM}} command differs from the equivalent {{kbd|*AFORM}} command for the 1770 ADFS on the BBC Microcomputer. This is possibly as a result of needing to create the {{mono|ZYSYSHELP}} file on the Electron. The {{kbd|*EFORM}} command was only supplied on the Welcome disc that was shipped with the Plus3, and was not included in the ROM.<ref name="plus3ug" />{{rp|pages=48}}
ADFS supported hard discs, and 3½" [[floppy disc]]s formatted up to 640&nbsp;KB capacity using double density [[Modified Frequency Modulation|MFM]] encoding (''L'' format; single-sided disks were supported with the ''S'' format (160&nbsp;KB) and ''M'' format (320&nbsp;KB)). ADFS as implemented in the BBC microcomputer system (and later RISC OS) never had support for single-density floppies.
 
ADFS supported hard discs, and 5¼" and 3½" [[floppy disc]]s formatted up to 640&nbsp;KB capacity using double density [[Modified Frequency Modulation|MFM]] encoding (''L'' format; single-sided disks were supported with the ''S'' format (160&nbsp;KB) and ''M'' format (320&nbsp;KB)). ADFS as implemented in the BBC microcomputer system (and later RISC OS) never had support for single-density floppies.
Hard disc support in ADFS used a modified format, and interfaced to a SCSI-based Winchester unit via the BBC Micro's 1&nbsp;MHz Bus.{{Citation needed|date=June 2007}} Support for [[Advanced Technology Attachment|IDE]]/[[ATAPI]] style drives has been added 'unofficially' by third parties in recent years.<ref>[http://mdfs.net/Info/Comp/BBC/IDE BBC IDE Interface]</ref>
 
Hard disc support in ADFS used the same format as ''L'' format floppies in terms of 256-byte
== 32-bit usage (Arthur and RISC OS) ==
blocks;<ref>{{cite web|url=http://mdfs.net/Docs/Comp/Disk/Format/ADFS |format=TXT |title=Acorn 8-Bit ADFS Filesystem Structure |website=Mdfs.net |access-date=2016-08-01}}</ref>
only the underlying arrangement of tracks and sectors differed depending on the actual drive used, but this was managed by the [[Small Computer System Interface|SCSI]] controller. It interfaced to a [[ST-506|ST506/ST412]]-based Winchester unit via the BBC Micro's 1&nbsp;MHz Bus, an Acorn-designed interface card (1&nbsp;MHz Bus to SCSI adapter) and an off-the-shelf [[Adaptec]] SCSI controller (SCSI to ST-506 adapter).
 
Hard disc support in ADFS used a modified format, and interfaced to a SCSI-based Winchester unit via the BBC Micro's 1&nbsp;MHz Bus.{{Citation needed|date=June 2007}} Support for [[Advanced Technology Attachment|IDE]]/[[ATAPI]] style drives has been added 'unofficially' by third parties in recent years.<ref>[{{cite web|url=http://mdfs.net/Info/Comp/BBC/IDE |title=BBC IDE Interface] - MDFS::Info.Comp.BBC.IDE |website=MDFS.net |access-date=2016-08-01}}</ref>
 
The ADFS file format used the ASCII bytes {{mono|Hugo}} to delimit the directory names on the disc, named after ADFS author Hugo Tyson.
 
== 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 (operating system)|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&nbsp;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 [[Hierarchical File System (Apple)|HFS]] file system, and conceptually comparable to the more general use of [[MIME#Content-Type media type|MIME Types]] by the [[BeOS|Be Operating System]] (BeOS), or [[Magic number (programming)#Format indicator|magic number]]s in Unix systems (though the latter is stored as part of the file, not as metadata).
 
RISC OS brought in ''E'' (and later ''F'') format for double-density discs and high-density discs/hard disc drives respectively. These formats support file fragmentation (with the so-called "new map"), 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.<ref name="reeves-efmt">{{Citecite web|last=Reeves|first=Nick|date=26 October 1990|title=E format design document|url=http://www.chiark.greenend.org.uk/~theom/riscos/docs/ultimate/a252efmt.txt|accessdateaccess-date=24 May 2013}}<!-- see exception clause in WP:USENET --></ref> RISC OS 4 added ''E+/F+'' format which allowed for long filenames and more than 77 files per directory.{{Citation needed|date=June 2007}} 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 (commonly used for IDE add-on cards), 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<ref>{{cite web|url=http://www.netbsd.org/changes/1998.html#filecorefs filecore|title=Changes support]and NetBSD News in 1998 |website=Netbsd.org |access-date=2016-08-01}}</ref> in NetBSD 1.4 onwards.
 
Tools such as Omniflop (in Windows 2000 and later), 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.
 
== Notes References==
{{reflistReflist}}
 
== References ==
{{refbegin}}
* Watford Electronics, "The Advanced Reference Manual for the BBC Master Series", 1988 (p169p.&nbsp;169)
* Acorn Computers Ltd, "The BBC Microcomputer System Master Series Reference Manual Part1Part 1", Part No, 0443-0010443–001, Issue 1, March 1986 - (Pages (J.10-1 to J10-3)
{{refend}}
 
==Notes==
{{reflist|group=note}}
 
==External links==
Line 73 ⟶ 83:
 
[[Category:Acorn Computers]]
[[Category:RISC OS]]
[[Category:Disk file systems]]
[[Category:Disk operating systems]]