Amiga Old File System
Encyclopedia
On the Amiga
Amiga
The Amiga is a family of personal computers that was sold by Commodore in the 1980s and 1990s. The first model was launched in 1985 as a high-end home computer and became popular for its graphical, audio and multi-tasking abilities...

, the Old File System was the filesystem for Amiga OS before the Amiga Fast File System
Amiga Fast File System
The Amiga Fast File System is a file system used on the Amiga personal computer. The previous Amiga filesystem upon the release of FFS became known as Amiga Old File System . OFS, while fine on floppy disk, soon proved too slow to keep up with era hard drives...

. Even though it used 512-byte blocks, it reserved the first small portion of each block
Block (data storage)
In computing , a block is a sequence of bytes or bits, having a nominal length . Data thus structured are said to be blocked. The process of putting data into blocks is called blocking. Blocking is used to facilitate the handling of the data-stream by the computer program receiving the data...

 for metadata, leaving an actual data block capacity of 488 bytes per block. It wasn't very suitable for anything except floppy disk
Floppy disk
A floppy disk is a disk storage medium composed of a disk of thin and flexible magnetic storage medium, sealed in a rectangular plastic carrier lined with fabric that removes dust particles...

s, and it was soon replaced.

History

Originally known as Amiga File System, the filesystem itself was very similar to that of Xerox
Xerox
Xerox Corporation is an American multinational document management corporation that produced and sells a range of color and black-and-white printers, multifunction systems, photo copiers, digital production printing presses, and related consulting services and supplies...

 Alto Filesystem. Development was from 1982 to 1985 as the filesystem of TripOS
TRIPOS
TRIPOS is a computer operating system. Development started in 1976 at the Computer Laboratory of Cambridge University and it was headed by Dr. Martin Richards. The first version appeared in January 1978 and it originally ran on a PDP-11. Later it was ported to the Computer Automation LSI4 and the...

. It received the nickname of "Old" or "Original" when Fast File System
Amiga Fast File System
The Amiga Fast File System is a file system used on the Amiga personal computer. The previous Amiga filesystem upon the release of FFS became known as Amiga Old File System . OFS, while fine on floppy disk, soon proved too slow to keep up with era hard drives...

 was released with Amiga OS 1.3.

OFS is very good for repairing the filesystem in the event of a problem, although the so called DiskDoctor provided by Commodore quickly earned the name DiskDestroyer, because it could not repair No-DOS type autostart disks provided by third-party software manufacturers as bootable disks for games. Interestingly, the idea to create non-standard autobootable disks was born in a primitive attempt to prevent copy of such disks and to avoid the loading and launch of Amiga DOS, in order to directly access the amiga graphic, audio and memory chipsets. DiskDoctor in fact changed autostart disks bootblocks into standard AmigaDOS-based ones, renaming a disk with "Lazarus" namedisk, and made the autostart disk unusable.

Metacomco, BSTRINGS, BPOINTERS, and family contained in the Amiga FS entered the scene when it was decided that the originally planned OS would take too long to be developed in time for the launch of Amiga. Consequently, Metacomco grafted onto the filesystem a lot of things that the old Amiga Inc. has changed.

Characteristics

Amiga uses MFM
Modified Frequency Modulation
Modified Frequency Modulation, commonly MFM, is a line coding scheme used to encode the actual data-bits on most floppy disk formats, hardware examples include Amiga, most CP/M machines as well as IBM PC compatibles. Early hard disk drives also used this coding.MFM is a modification to the original...

 encoding/decoding by default when handling floppy disk
Floppy disk
A floppy disk is a disk storage medium composed of a disk of thin and flexible magnetic storage medium, sealed in a rectangular plastic carrier lined with fabric that removes dust particles...

s. There are 80 cylinders on an Amiga floppy disk. Each cylinder has 2 MFM tracks, one on each side of the disk. Double density (DD) disks have 11 sectors per MFM track, high density (HD) disks have 22 sectors.

The geometry of an Amiga floppy disk is as follows:
  • DD disks: 512 bytes/sector, 11 sector/track, 2 track/cyl, 80 cyl/disk
  • HD disks: 512 bytes/sector, 22 sector/track, 2 track/cyl, 80 cyl/disk


The DD disk has 11 * 2 * 80 = 1760 (0 to 1759) blocks, while the HD disk has 22 * 2 * 80 = 3520 blocks.

Amiga stores 880 KiB
Kibibyte
The kibibyte is a multiple of the unit byte for quantities of digital information. The binary prefix kibi means 1024; therefore, 1 kibibyte is . The unit symbol for the kibibyte is KiB. The unit was established by the International Electrotechnical Commission in 1999 and has been accepted for use...

 on a DD disk and 1760 KiB on an HD floppy disk.

The standard Amiga filesystem has an internal 32 bit wide offset parameter (unsigned). It tells where to start the read/write operation. The biggest size for an Amiga disk is therefore 232 = 4 GiB
Gibibyte
The gibibyte is a standards-based binary multiple of the byte, a unit of digital information storage. The gibibyte unit symbol is GiB....

. This limit was changed with Amiga OS 3.5 and 3.9 and now is 264 = 4 EiB
Exbibyte
The exbibyte is a standards-based binary multiple of the byte, a unit of digital information storage. The exbibyte unit symbol is EiB....

.

An OFS datablock stores block size BSIZE-24 bytes (i.e. normally 488 bytes at most frequently used BSIZE of 512 bytes), FFS stores BSIZE bytes (512 bytes per block).
FFS supports directory caching, links and international mode. The FFS is also faster than OFS.

The rootblock is located at the physical middle of the media: block number 880 for DD disks, block 1760 for HDs.

The exact calculation for where it is stored is as follows:

numCyls = highCyl - lowCyl + 1

highKey = numCyls * numSurfaces * numBlocksPerTrack - 1

rootKey = INT (numReserved + highKey) / 2


The rootblock contains information about the disk: its name, its formatting date, etc. It also contains information on accessing the files/directories/links located at the uppermost (root) directory.

The characters '/' and ':' are forbidden in file and volume names, but *!@#$%|^+&_=\-[]{}';",<>.? and letters with diacritical marks like âè are allowed.

The date fields in the root block (and other blocks) are structured in the form of DAYS, MINS and TICKS. The DAYS field contains the number of days since January 1. 1978. MINS is the number of minutes that have passed since midnight and TICKS are expressed in 1/50s of a second. A day value of zero is considered illegal by most programs. Since the DAYS value is stored as a 32-bit number, the Amiga filesystem does not have an inherent Year 2000 problem
Year 2000 problem
The Year 2000 problem was a problem for both digital and non-digital documentation and data storage situations which resulted from the practice of abbreviating a four-digit year to two digits.In computer programs, the practice of representing the year with two...

 or Year 2038 problem
Year 2038 problem
The year 2038 problem may cause some computer software to fail at some point near the year 2038...

.

To reach a file, directory or link in a removable media, Amiga has to compute its hash value with an algorithm often called a hash function
Hash function
A hash function is any algorithm or subroutine that maps large data sets to smaller data sets, called keys. For example, a single integer can serve as an index to an array...

. After having computed the hash value, this is then used to access HashTable ('ht' field in Rootblock/Directory block). The HashTable[ HashValue ] contains the number of the first block of the object (File header block, Directory block or Link block).

It happens that different names can result in the same HashValue. If more than one name has the same HashValue, the other blocks (for files and directory only) are stored in a chained list. This linked list starts at the 'next_hash' field of the file header or directory block.
For example: file_1a, file_24 and file_5u have the same hash value.

There was a bug in the old AmigaDOS versions when applying the hash function to international characters (ASCII codes > 128). Consequently, FFS was then created with the 'international mode' (INTL). Filename characters can be lowercase and uppercase, but are not case sensitive when accessed. That is to say, "MyFile" and "myfile" in the same directory refer to the same file.

Files are composed of a file header block, which contains information about the file (size, last access time, data block pointers, etc), and the data blocks, which contain the actual data. The file header block contains up to BSIZE/4-56 data block pointers (which amounts to 72 entries with the usual 512 byte blocks). If a file is larger than that, file extension blocks will be allocated to hold the data block pointers. File extension blocks are organised in a linked list, which starts in the file header block ('extension' field).

See also

  • Amiga Fast File System
    Amiga Fast File System
    The Amiga Fast File System is a file system used on the Amiga personal computer. The previous Amiga filesystem upon the release of FFS became known as Amiga Old File System . OFS, while fine on floppy disk, soon proved too slow to keep up with era hard drives...

  • Professional File System
    Professional File System
    The Professional File System is a filesystem originally developed commercially for the Amiga, it is now distributed on Aminet with a 4-clause BSD license. PFS tends to perform very well, due to the simplicity of design. Compatible successor of Ami-FileSafe....

  • Smart File System
    Smart File System
    The Smart File System is a journaling filesystem used on Amiga computers. It is designed for performance, scalability and integrity...

  • List of file systems
  • Rigid Disk Block
    Amiga Rigid Disk Block
    In computing, a rigid disk block is the block on a hard disk where the Amiga series of computers store the disk's partition and filesystem information. The PC equivalent of the Amiga's RDB is the master boot record ....


External links

  • The ADFlib Page and precisely ADF File specs
  • [ftp://it.aminet.net/pub/aminet/disk/misc/ADFlib.lha The ADF specs] in LHA
    LHA (file format)
    LHA is a freeware compression utility and associated file format. It was created in 1988 by , and originally named LHarc. A complete rewrite of LHarc, tentatively named LHx, was eventually released as LH. It was then renamed to LHA to avoid conflicting with the then-new MS-DOS 5.0 LH command...

     format, from Aminet
    Aminet
    Aminet is the world's largest archive of Amiga-related software and files. Aminet was originally hosted by several universities' FTP sites, and is now available on CD-ROM and on the web.-History:...

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK