Different Encoding Methods for Magnetic Media
In order for data to be stored onto, and later retrieved from, magnetic media such as a floppy disk or hard disk platter, the 'controller' employs an encoding scheme. When writing data, the information is "encoded" into electrical pulses which are then passed along the interface to the drive which turns these pulses into flux transitions. When the data needs to be read, the reverse process takes place (the flux transitions are converted into pulses by the drive, which are then "decoded" back into the original information).
MFM (Modified Frequency Modulation)
Modified Frequency Modulation, commonly "MFM", is a run-length limited (RLL) coding scheme used to encode the actual data-bits on most floppy disks. It was first introduced in disk drives with the IBM 3330 hard disk drive in 1970. Floppy disk drive hardware examples that use the MFM encoding scheme include Amiga, most CP/M machines as well as IBM PC compatibles.
MFM is a modification to the original digital FM (digital frequency modulation also known as delay coding) scheme for encoding data on single-density floppy disks and some early hard disk drives. Due to the minimum spacing between flux transitions that is a property of the disk and head design, MFM, which guarantees at most one flux transition per data bit, can be written at higher density than FM, which can require two transitions per data bit. It is used with a data rate of 250–500 kbit/s (500–1000 kbit/s encoded) on industry standard 5¼-inch and 3½-inch ordinary and high density diskettes. MFM was also used in early hard disk designs, before the advent of more efficient types of run-length limited (RLL) coding. Except for the steadily disappearing 360 KiB/1.2 MiB (5.25-inch) and 720~880 KiB/1.4~1.6 MiB (3.5-inch) floppy disk formats, MFM encoding is now obsolete in magnetic recording.
RLL (Run Length Limited)
Run-length limited or RLL coding is a line coding technique that is used to send arbitrary data over a communications channel with bandwidth limits. RLL codes are defined by four main parameters: m, n, d, k. The first two, m/n, refer to the rate of the code, while the remaining two specify the minimal d and maximal k number of zeroes between consecutive ones. This is used in both telecommunication and storage systems that move a medium past a fixed recording head.
Early disk drives used very simple encoding schemes, such as RLL (0,1) FM code, followed by RLL (1,3) MFM code which were widely used in hard disk drives until the mid-1980s and are still used in digital optical discs such as CD, DVD, MD, Hi-MD and Blu-ray. Higher density RLL (2,7) and RLL (1,7) codes became the de facto industry standard for hard disks by the early 1990s.
The early Amstrad PCs such as the PC1512 and PC1640 made use of RLL hard disk drives and most "hardcards" (hard disk drives sideways-mounted directly onto an expansion card) used RLL encoding. To an extent you could get an MFM drive to work with an RLL hard disk controller, but there is a risk of data loss, as RLL drives are manufactured to tougher specifications than MFM drives (MFM is encoded at 5.0 Megabits per second whereas RLL is encoded at 7.5 Megabits per second). Due to RLL hard drives supporting tighter timing margins they can store more data in a smaller surface area on the disk.
GCR (Group Coded Recording)
Commodore Business Machines (CBM) created a group coded recording (GCR) scheme for their Commodore 2040 floppy disk drive (launched in the spring of 1979). The relevant constraints on the 2040 drive were that no more than two zero bits could occur in a row, and no more than eight one bits in a row; the drive imposed no special constraint on the first bit in a byte. This allowed the use of a scheme similar to that used in 6250 bpi tape drives. Every four bits of data are translated into five bits on disk, according to the following table:
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
In here, no code starts with two zero bits, nor ends with two zero bits. This ensures that regardless of the input data, the encoded data will never contain more than two zero bits in a row. With this encoding not more than eight one bits in a row are possible. Therefore, Commodore used sequences of ten or more one bits in a row as synchronization mark.
This more efficient GCR scheme, combined with an approach at constant bit-density recording by gradually increasing the clock rate (zone constant angular velocity, ZCAV) and storing more physical sectors on the outer tracks than on the inner ones (zone bit recording, ZBR), enabled Commodore to fit 170 kB on a standard single-sided single-density 5.25-inch floppy, where Apple fit 140 kB (with 6-and-2 encoding) or 114 kB (with 5-and-3 encoding) and an FM-encoded floppy held only 88 kB.
Other manufacturers employed slightly different versions of GCR encoding, including Apple (for the Apple II floppy disk drive), Sirius/Victor, Brother, Sharp, Micropolis, and Micro Peripherals.
