Modified Frequency Modulation

From Wikipedia, the free encyclopedia

This article is about Modified Frequency Modulation. For other uses of MFM, see the MFM (disambiguation).

Modified Frequency Modulation, commonly MFM, is a line coding scheme used to encode information on most floppy disk formats, which include the floppy disk formats used in most CP/M machines as well as PCs running DOS.

MFM is a modification to the original FM (frequency modulation) scheme for encoding data on single-density floppy disks. Because the minimum spacing between flux transitions 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¼" and 3½" 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 1.44 MB floppy disk drives, MFM encoding is obsolete.

[edit] Coding

MFM encoding can be thought of as having data bits separated by clock bits. The basic encoding rule is that (x, y) encodes to (x, x NOR y, y). On average this means that each data bit is encoded as two bits on disk, but some delimiters are required at the beginning and end of a sequence, so this limit is never quite reached in practice.

Data MFM Encoding
...00... ...?010?...
...01... ...?0010...
...10... ...0100?...
...11... ...01010...

Note that the surrounding clock bits are sometimes known, but sometimes require knowledge of the adjacent data bits. A longer example:

Data:     0 0 0 1 1 0 1 1
Encoded: ?0101001010001010

(The bold bits are the data bits, the others are the clock bits.)

Notice that 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. Thus, MFM is a (1,3) RLL code.

This bit stream is then NRZI encoded to be written to disk, a 1 bit representing a magnetic transition, and a 0 bit no transition.

A special "sync mark" is used to allow the disk controller to figure out where the data starts. This sync mark has two important properties: it has no runs of zeros shorter than 1 or longer than 3 (i.e. it follows the (1,3) RLL rules), and it will never occur in any bit position in any encoded data stream. The sync mark used is called an 'A1 sync' since it is similar to the encoding of the hexadecimal value A1 (10100001).

Data:      1 0 1 0 0 0 0 1
Encoded:   100010010101001
Sync Mark: 100010010001001
                    ^ Missing clock bit

[edit] MMFM

MMFM (or M²FM M2FM) (Modified Modified Frequency Modulation) is similar to MFM, but it has a longer run length limited distance.

[edit] See also


This article was originally based on material from the Free On-line Dictionary of Computing, which is licensed under the GFDL.