Recent from talks
Contribute something
Nothing was collected or created yet.
Modified frequency modulation
View on WikipediaThis article needs additional citations for verification. (June 2023) |
Modified frequency modulation (MFM) is a run-length limited (RLL) line code[1] used to encode data on most floppy disks and some hard disk drives. It was first introduced on hard disks in 1970 with the IBM 3330 and then in floppy disk drives beginning with the IBM 53FD in 1976.
MFM is a modification to the original frequency modulation encoding (FM) code specifically for use with magnetic storage. MFM allowed devices to double the speed data was written to the media as the code guaranteed only one polarity change per encoded data bit. For this reason, MFM disks are typically known as "double density", while the earlier FM became known as "single density".
MFM is used with a data rate of 250–500 kbit/s (500–1000 kbit/s encoded) on industry-standard 5+1⁄4-inch and 3+1⁄2-inch ordinary and high-density floppy diskettes. MFM was also used in early hard disk designs, before the advent of more efficient types of RLL codes. Outside of niche applications, MFM encoding is obsolete in magnetic recording.
Magnetic storage
[edit]Magnetic storage devices, like hard drives and magnetic tape, store data not as absolute values, but in the changes in polarity. This is because a changing magnetic field will induce an electrical current in a nearby wire, and vice versa. By sending a series of changing currents to the read/write head while the media moves past it, the result will be a pattern of magnetic polarities on the media that change where the data was a "1". The exact nature of the media determines how many of these changes can occur within a given surface area, and when this is combined with the nominal speed of movement, it produces the maximum data rate for that system.
Disk drives are subject to a variety of mechanical and materials effects that cause the original pattern of data to "jitter" in time. MFM as a run-length limited code limits the distance between recorded transitions so the jitter does not cause a transition to be misaligned in time, thereby causing a data error. Other limitations defined by the media place additional constraints on the way the data is recorded. A diverse range of suitable encodings, known generally as line codes, have been developed for this purpose. Their suitability depends on the media or transmission mechanism being used.
Frequency modulation
[edit]Frequency modulation encoding (FM) was the first widely used system to perform this operation on disk drives. The drive controller includes an accurate clock running at half the selected data rate of the disk media. When data is written to the disk, the clock signal is interleaved with the data. On reading, the clock signals are used as short-term triggers to time the presence or lack of a following signal that represents the data bits.[2]
The upside to the FM approach is that it is extremely easy to implement the writing circuitry, and the clock recovery on reading is also relatively simple. The downside is that it uses up half of the disk surface for the clock signal, thus halving the total amount of data the disk can store. This led to the development of new forms of encoding that were more efficient.
MFM coding
[edit]
Modified frequency modulation encodes the clock signal and the data in a single "clock window". Unlike FM, a clock bit is only written when needed to achieve synchronization when both current and preceding data bits are not set. On average, MFM achieves double the information density of FM.[3]
The basic encoding rule for MFM is that (x, y, z, ...) encodes to (x, x NOR y, y, y NOR z, z, z NOR...). A zero bit is encoded as 10 if preceded by a zero bit in the input stream, and 00 if preceded by a one; a one bit is always encoded as 01. The number of magnetic transitions per one bit of encoded data is on average 0.75 to 1.[4]
| Data | ... 0 0 ... | ... 0 1 ... | ... 1 0 ... | ... 1 1 ... |
|---|---|---|---|---|
| MFM clock bits | ...? 1 ?... | ...? 0 0... | ...0 0 ?... | ...0 0 0... |
| MFM encoding | ...?010?... | ...?0010... | ...0100?... | ...01010... |
Note that the surrounding clock bits are sometimes known, but sometimes require knowledge of the adjacent data bits.[citation needed] A longer example:
Data: 0 0 0 1 1 0 1 1 ... FM encoded: 10101011111011111... MFM clock: ? 1 1 0 0 0 0 0 0... MFM encoded: ?0101001010001010...
(The bold bits are the data bits, the others are the clock bits.)
In FM encoding, the number of 0-bits that may appear between consecutive 1-bits is either 0 or 1. In MFM encoding there is a minimum of 1 zero bit between adjacent ones (there are never two adjacent one bits), and the maximum number of zeros in a row is 3.[citation needed] Thus, FM is a (0,1) RLL code, while MFM is a (1,3) code.
Data separator
[edit]Because the MFM system requires more accurate timing of the clock signal, it was not possible economically to build the required analog and digital components on a single integrated circuit using late 1970s technology. Instead, MFM drivers required the drive vendor to design their own clock recovery circuitry, a system known as the data separator. Data separator design was an art form of its own.[5]
Among the most widely used controllers of the era was the Western Digital FD1771 series. The original FD1771 supported FM only, but it was quickly paired with the FD1781 and FD1791 which performed MFM based on an externally provided clock signal. Implementing MFM support with these drivers required an external data separator. Rapid improvement in IC manufacturing in the late 1970s and early 1980s led to the first low-cost all-in-one MFM drivers in the early 1980s. The WD2791 was the first to directly support MFM using an internal analog phase-locked loop, but it required a number of simple external components to implement a complete system. The WD1770 was the first to implement a complete MFM solution in a single chip.
Overall format
[edit]FM and MFM are used to indicate the position of individual bits in the original data, but the data does not in itself have any higher level of organization like "files". This is the purpose of the format of the disk. Disks are typically formatted into fixed-sized sectors which contain additional header information to link them back to files.
In the IBM formats, the start of a sector's header information and the start of the data itself are indicated with special "sync mark", a pattern of 0s and 1s that cannot appear in the data itself (an "illegal" encoding). This is accomplished by not encoding this data using the FM or MFM encoding, making it easy for the driver to spot it. The sync mark that is commonly used in MFM encoding is known as the "A1 sync" since the data bits form the start of the hexadecimal value A1 (10100001), but the fifth clock bit is different from the normal encoding of the A1 byte.
Data: 1 0 1 0 0 0 0 1
Clock: 0 0 0 1 1 1 0
Encoded: 100010010101001
Sync clock: 0 0 0 1 0 1 0
Sync Mark: 100010010001001
^ Missing clock bit
In some older disk formats this same problem was solved by the index hole, of which there was one for each sector, all positioned at the same radius (on one "track") beyond the innermost data track. A signal could be generated via a phototransistor when the start of each sector passed below the read head. No illegal encoding was thus necessary to distinguish data from the sync word. Later diskettes were manufactured with one index hole sufficient to indicate one particular sector, but they were mostly ignored with the sector number instead being part of the sector header.
MMFM
[edit]MMFM (modified modified frequency modulation), also abbreviated M²FM or M2FM, is similar to MFM, but suppresses additional clock bits, producing a longer maximum run length (a (1,4) RLL code). In particular, a clock pulse is only inserted between a pair of adjacent 0-bits if the first bit of the pair did not have a clock pulse inserted before it.[6] In the example below, clock bits that would have been present in MFM are noted in bold:
Data: 1 1 0 1 0 0 1 0 0 0 1 0 0 0 0 1 0 0 0 0 0 1 Clock: 0 0 0 0 0 1 0 0 1 0 0 0 1 0 1 0 0 1 0 1 0 0 Encoded: 01010001001001001000010010001001001000100001
In this system, sync marks are made by inserting additional clock pulses between adjacent zero bits (following the MFM rule) where they would normally be omitted. In particular, the data bit pattern "100001" has a clock pulse inserted in the middle, where it would normally be omitted:
Data: 1 0 0 0 0 1 Normal: 0 1 0 1 0 Sync: 0 1 1 1 0
See also
[edit]- Group coded recording (GCR)
References
[edit]- ^ Kees Schouhamer Immink (December 1990). "Runlength-Limited Sequences". Proceedings of the IEEE. 78 (11): 1745–1759. doi:10.1109/5.63306.
A detailed description is furnished of the limiting properties of runlength limited sequences.
- ^ Hecht, M.; Guida, A. (July 1969). "Delay Modulation". Proceedings of the IEEE. 57 (7). IEEE: 1314–1316. doi:10.1109/PROC.1969.7249.
- ^ Sammes, Anthony; Jenkinson, Brian (18 August 2007). Forensic Computing. Springer Science & Business Media. p. 109. ISBN 978-1-84628-732-9.
- ^ Prosise, Jeff (30 October 1990). "Choosing a Hard Disk". PC Magazine. p. 427.
- ^ Lutz, Bob; Melloni, Paolo; Wakeman, Larry (1982). Floppy Disk Data Separator Design Guide for the DP8473 (Technical report). National Semiconductor.
- ^ Intel Corporation (1977). SBC 202 Double Density Diskette Controller Hardware Reference Manual (PDF). pp. 4–26. Archived (PDF) from the original on 2017-06-18.
This article incorporates public domain material from Federal Standard 1037C. General Services Administration. Archived from the original on 2022-01-22.
Further reading
[edit]- Savard, John J. G. (2018) [2006]. "Digital Magnetic Tape Recording". quadibloc. Archived from the original on 2018-07-02. Retrieved 2018-07-16.
External links
[edit]- Johnson, Herbert R. (2016-07-06). "M2FM or MMFM diskette format". Archived from the original on 2017-06-18. Retrieved 2017-06-19.
- The PC Guide Frequency Modulation
Modified frequency modulation
View on GrokipediaBackground and Context
Origins in Magnetic Storage
Magnetic storage technologies rely on the principle of encoding digital data through localized magnetic flux reversals on a rotating medium, such as coated disks in floppy drives or rigid platters in hard disk drives (HDDs). These reversals, created by a write head that alternates the polarity of magnetic domains on the media, represent binary states: a transition indicates a '1' bit, while the absence or positioning of transitions denotes '0' bits, with the read head detecting variations in the magnetic field to recover the data.[4] This flux-based approach enabled non-volatile, removable storage but faced density limitations in early systems due to the need for frequent clock synchronization pulses that consumed media space.[5] Modified frequency modulation (MFM) emerged in the late 1960s and early 1970s as an advancement over basic frequency modulation (FM) encoding, which served as its precursor by using dedicated clock bits alongside data bits. Developed to address the density constraints of emerging digital storage needs, MFM was first implemented by IBM in the 3330 series HDD, introduced in 1970, marking a shift toward more efficient run-length limited coding schemes.[6] By the mid-1970s, as floppy disk adoption grew for microcomputer and minicomputer applications, MFM was adapted for flexible media; IBM's 53FD 8-inch double-density floppy drive, released in 1976, utilized MFM to achieve capacities up to 1.2 MB per disk, doubling the effective storage over single-density FM formats.[7] MFM became the dominant encoding method for subsequent generations of floppy disks, particularly in the 5.25-inch and 3.5-inch formats that standardized personal computing storage. It powered the IBM PC's double-density floppy configurations starting in 1981, supporting up to 360 KB on 5.25-inch disks and 1.44 MB on 3.5-inch high-density variants, which were ubiquitous in systems from IBM, Apple, and others through the 1980s and 1990s.[8] In rigid media, MFM underpinned early HDD interfaces, including Seagate's ST-506 standard introduced in 1980, which delivered 5 MB capacities and set benchmarks for PC-compatible drives with transfer rates of 5 Mbit/s.[9] Compared to non-encoded or FM methods, MFM's key advantage lies in halving the number of required flux transitions by embedding clock information within data patterns, thereby doubling areal data density without altering media or head technology. This efficiency reduced overhead from unnecessary clock pulses, enabling higher bit rates and storage capacities in an era when magnetic media constraints limited system performance.[1]Frequency Modulation Fundamentals
Frequency modulation (FM), also known as single-density encoding, is a line code developed for magnetic storage media, where each data bit is represented by clock and data pulses manifested as flux transitions on the recording surface. In this scheme, the clock information is embedded directly into the data stream, eliminating the need for a separate clock track and enabling self-synchronization during read operations. Flux transitions occur to encode both timing and data content, with a logical 1 represented by transitions at both the clock edge and the bit cell center, while a logical 0 is encoded by a transition only at the clock edge.[1][10] The encoding process operates on bit cells of fixed duration, typically 4 μs in standard implementations, where the clock transition marks the start of each cell, and the optional data transition appears 2 μs later. This results in binary patterns such as "10" for a 0 (clock transition followed by no data transition) and "11" for a 1 (clock plus data transitions), ensuring a transition occurs at least every bit cell to maintain clock recovery. The embedded clock simplifies circuitry but doubles the number of transitions compared to data-only encoding, as every bit cell includes at least one flux change for timing.[1][10][1] FM's structure imposes a maximum of two flux transitions per bit cell, yielding a transition density of up to 2/T, where T is the bit period. This leads to a Nyquist-limited frequency of 1/T for the encoded signal, constraining the overall bandwidth and storage efficiency. In practice, this limits areal density, with typical data rates around 250 kbit/s on early media, as the frequent transitions increase susceptibility to media noise and require precise head positioning to avoid bit-shift errors.[1][1] The high overhead of dedicated clock pulses in FM, combined with its vulnerability to clock drift without robust synchronization circuits, caps achievable densities at approximately 250 kbit/s, beyond which signal integrity degrades due to intersymbol interference. This encoding was foundational in early magnetic storage applications, such as 8-inch floppy disks.[1][11]Core Encoding Principles
MFM Coding Rules
Modified frequency modulation (MFM) encoding follows three core rules to map binary data bits into magnetic flux transitions within fixed-duration bit cells on storage media. First, there is no transition at the start (clock half) of a bit cell unless required for clocking. Second, a transition is placed in the middle (data half) of the bit cell if the data bit is 1. Third, if the data bit is 0 and the immediately preceding data bit was also 0, a transition is inserted at the start of the current bit cell to provide clock synchronization; otherwise, no such clock transition occurs for an isolated 0 (following a 1). These rules embed clock information directly into the data stream, eliminating the need for separate clock pulses in FM encoding.[12][13] The encoding process depends on the current data bit and the previous data bit, producing a sequence of channel bits where 1 indicates a flux transition and 0 indicates none. The clock bit for a given cell is 1 only if both the previous and current data bits are 0; the data bit matches the input data bit directly. This dependency ensures self-clocking while adhering to run-length limited (RLL(1,3)) constraints: transitions must be separated by at least 2 half-cells (minimum 1 intervening 0 in the channel stream) and at most 4 half-cells (maximum 3 consecutive 0s), limiting gaps to prevent clock drift. By suppressing clock transitions for isolated 0s—unlike FM, which requires a clock pulse for every 0—MFM effectively doubles the data density, allowing one data bit per full bit cell instead of one per two cells.[12][13] The following table illustrates the output channel bits for each combination of previous and current data bits:| Previous Data Bit | Current Data Bit | Clock Bit | Data Bit (Channel Output) |
|---|---|---|---|
| 0 | 0 | 1 | 0 |
| 0 | 1 | 0 | 1 |
| 1 | 0 | 0 | 0 |
| 1 | 1 | 0 | 1 |
Flux Transition Patterns
In Modified Frequency Modulation (MFM), magnetic flux reversals on storage media define the encoded bit cells, where each cell spans a fixed 2T units of time (with T representing the nominal half-cell interval and minimum transition spacing). A logical '1' bit produces a flux transition at the midpoint of its 2T cell, while a logical '0' bit lacks a midpoint transition but may include a clocking transition at the cell boundary if the preceding bit was also '0', ensuring no more than three consecutive '0's to limit run lengths. This mechanism guarantees a flux transition at least every 4T, enabling self-clocking by providing regular timing references for data recovery without dedicated clock tracks.[16][17] Representative flux transition patterns illustrate these principles through timing diagrams. For a sequence of four '1' bits (1111), dense transitions occur at the midpoint of each 2T cell, resulting in flux reversals every 2T across the entire sequence, maximizing recording density with closely spaced pulses. In contrast, a sequence of four '0' bits (0000) produces clock transitions at the boundary between the first and second cells, between the second and third, and between the third and fourth (with no transition in the first cell), creating 2T intervals between subsequent reversals while adhering to the (1,3) run-length limited constraint to prevent excessive gaps. These patterns can be visualized as follows in a simplified timing diagram (where vertical lines denote cell boundaries and arrows indicate flux transitions):- 1111: |→ (mid) |→ (mid) |→ (mid) |→ (mid) | (transitions every 2T)
- 0000: | → (clock) | → (clock) | → (clock) | (transitions every 2T after the initial cell, no mids)
