<s>
Modified	B-Protocol
frequency	I-Protocol
modulation	I-Protocol
(	O
MFM	B-Protocol
)	O
is	O
a	O
run-length	B-Protocol
limited	I-Protocol
(	O
RLL	B-Protocol
)	O
line	B-Protocol
code	I-Protocol
used	O
to	O
encode	O
data	O
on	O
most	O
floppy	B-Device
disks	I-Device
and	O
some	O
hard	B-Device
disk	I-Device
drives	I-Device
.	O
</s>
<s>
It	O
was	O
first	O
introduced	O
on	O
hard	B-Device
disks	I-Device
in	O
1970	O
with	O
the	O
IBM	B-Device
3330	I-Device
and	O
then	O
in	O
floppy	B-Device
disk	I-Device
drives	I-Device
beginning	O
with	O
the	O
IBM	O
53FD	O
in	O
1976	O
.	O
</s>
<s>
MFM	B-Protocol
is	O
a	O
modification	O
to	O
the	O
original	O
frequency	B-Protocol
modulation	I-Protocol
encoding	I-Protocol
(	O
FM	B-Protocol
)	O
code	O
specifically	O
for	O
use	O
with	O
magnetic	B-Architecture
storage	I-Architecture
.	O
</s>
<s>
MFM	B-Protocol
allowed	O
devices	O
to	O
double	O
the	O
speed	O
data	O
was	O
written	O
to	O
the	O
media	O
as	O
the	O
code	O
guaranteed	O
only	O
one	O
polarity	O
change	O
per	O
encoded	O
data	O
bit	O
.	O
</s>
<s>
For	O
this	O
reason	O
,	O
MFM	B-Protocol
disks	O
are	O
typically	O
known	O
as	O
"	O
double	O
density	O
"	O
while	O
the	O
earlier	O
FM	B-Protocol
became	O
known	O
as	O
"	O
single	O
density	O
"	O
.	O
</s>
<s>
MFM	B-Protocol
is	O
used	O
with	O
a	O
data	O
rate	O
of	O
250	O
–	O
500kbit/s	O
(	O
500	O
–	O
1000kbit/s	O
encoded	O
)	O
on	O
industry-standard	O
-inch	O
and	O
-inch	O
ordinary	O
and	O
high-density	O
floppy	B-Device
diskettes	I-Device
.	O
</s>
<s>
MFM	B-Protocol
was	O
also	O
used	O
in	O
early	O
hard	B-Device
disk	I-Device
designs	O
,	O
before	O
the	O
advent	O
of	O
more	O
efficient	O
types	O
of	O
RLL	B-Protocol
codes	I-Protocol
.	O
</s>
<s>
Outside	O
of	O
niche	O
applications	O
,	O
MFM	B-Protocol
encoding	I-Protocol
is	O
obsolete	O
in	O
magnetic	B-Architecture
recording	I-Architecture
.	O
</s>
<s>
Magnetic	B-Architecture
storage	I-Architecture
devices	O
,	O
like	O
hard	B-Device
drives	I-Device
and	O
magnetic	O
tape	O
,	O
store	O
data	O
not	O
as	O
absolute	O
values	O
,	O
but	O
in	O
the	O
changes	O
in	O
polarity	O
.	O
</s>
<s>
By	O
sending	O
a	O
series	O
of	O
changing	O
currents	O
to	O
the	O
read/write	B-Device
head	I-Device
while	O
the	O
media	O
moves	O
past	O
it	O
,	O
the	O
result	O
will	O
be	O
a	O
pattern	O
of	O
magnetic	O
polarities	O
on	O
the	O
media	O
that	O
change	O
where	O
the	O
data	O
was	O
a	O
"	O
1	O
"	O
.	O
</s>
<s>
A	O
diverse	O
range	O
of	O
suitable	O
encodings	O
,	O
known	O
generally	O
as	O
line	B-Protocol
codes	I-Protocol
,	O
have	O
been	O
developed	O
for	O
this	O
purpose	O
.	O
</s>
<s>
Frequency	B-Protocol
modulation	I-Protocol
encoding	I-Protocol
(	O
FM	B-Protocol
)	O
was	O
the	O
first	O
widely	O
used	O
system	O
to	O
perform	O
this	O
operation	O
.	O
</s>
<s>
The	O
drive	B-General_Concept
controller	I-General_Concept
includes	O
an	O
accurate	O
clock	O
running	O
at	O
half	O
the	O
selected	O
data	O
rate	O
of	O
the	O
disk	O
media	O
.	O
</s>
<s>
The	O
upside	O
to	O
the	O
FM	B-Protocol
approach	O
is	O
that	O
it	O
is	O
extremely	O
easy	O
to	O
implement	O
the	O
writing	O
circuity	O
and	O
the	O
clock	O
recovery	O
on	O
reading	O
is	O
also	O
relatively	O
simple	O
.	O
</s>
<s>
Modified	B-Protocol
frequency	I-Protocol
modulation	I-Protocol
encodes	O
the	O
clock	O
signal	O
and	O
the	O
data	O
in	O
a	O
single	O
"	O
clock	O
window	O
"	O
.	O
</s>
<s>
Unlike	O
FM	B-Protocol
,	O
a	O
clock	O
bit	O
is	O
only	O
written	O
when	O
needed	O
to	O
achieve	O
synchronization	O
when	O
both	O
current	O
and	O
preceding	O
data	O
bits	O
are	O
not	O
set	O
.	O
</s>
<s>
On	O
average	O
,	O
MFM	B-Protocol
achieves	O
double	O
the	O
information	O
density	O
of	O
FM	B-Protocol
.	O
</s>
<s>
The	O
basic	O
encoding	O
rule	O
for	O
MFM	B-Protocol
is	O
that	O
(	O
x	O
,	O
y	O
,	O
z	O
,	O
...	O
)	O
encodes	O
to	O
(	O
x	O
,	O
x	O
NOR	O
y	O
,	O
y	O
,	O
y	O
NOR	O
z	O
,	O
z	O
,	O
z	O
NOR	O
...	O
)	O
.	O
</s>
<s>
FM	B-Protocol
encoded	O
:	O
10101011111011111	O
...	O
</s>
<s>
MFM	B-Protocol
clock	O
:	O
?	O
</s>
<s>
MFM	B-Protocol
encoded	O
:	O
?	O
0101001010001010	O
...	O
</s>
<s>
In	O
FM	B-Protocol
encoding	I-Protocol
,	O
the	O
number	O
of	O
0-bits	O
that	O
may	O
appear	O
between	O
consecutive	O
1-bits	O
is	O
either	O
0	O
or	O
1	O
.	O
</s>
<s>
In	O
MFM	B-Protocol
encoding	I-Protocol
there	O
is	O
a	O
minimum	O
of	O
1	O
zero	O
bit	O
between	O
adjacent	O
ones	O
(	O
there	O
are	O
never	O
two	O
adjacent	O
one	O
bits	O
)	O
,	O
and	O
the	O
maximum	O
number	O
of	O
zeros	O
in	O
a	O
row	O
is	O
3	O
.	O
</s>
<s>
Thus	O
,	O
FM	B-Protocol
is	O
a	O
(	O
0	O
,	O
1	O
)	O
RLL	B-Protocol
code	I-Protocol
,	O
while	O
MFM	B-Protocol
is	O
a	O
(	O
1	O
,	O
3	O
)	O
code	O
.	O
</s>
<s>
Because	O
the	O
MFM	B-Protocol
system	O
requires	O
more	O
accurate	O
timing	O
of	O
the	O
clock	O
signal	O
,	O
it	O
was	O
not	O
possible	O
economically	O
to	O
build	O
the	O
required	O
analog	O
and	O
digital	O
components	O
on	O
a	O
single	O
integrated	O
circuit	O
using	O
late	O
1970s	O
technology	O
.	O
</s>
<s>
Instead	O
,	O
MFM	B-Protocol
drivers	O
required	O
the	O
drive	O
vendor	O
to	O
design	O
their	O
own	O
clock	O
recovery	O
circuitry	O
,	O
a	O
system	O
known	O
as	O
the	O
data	O
separator	O
.	O
</s>
<s>
Among	O
the	O
most	O
widely	O
used	O
controllers	O
of	O
the	O
era	O
was	O
the	O
Western	B-Device
Digital	I-Device
FD1771	I-Device
series	O
.	O
</s>
<s>
The	O
original	O
FD1771	B-Device
supported	O
FM	B-Protocol
only	O
,	O
but	O
it	O
was	O
quickly	O
paired	O
with	O
the	O
FD1781	O
and	O
FD1791	B-Device
which	O
performed	O
MFM	B-Protocol
based	O
on	O
an	O
externally	O
provided	O
clock	O
signal	O
.	O
</s>
<s>
Implementing	O
MFM	B-Protocol
support	O
with	O
these	O
drivers	O
required	O
an	O
external	O
data	O
separator	O
.	O
</s>
<s>
Rapid	O
improvement	O
in	O
IC	B-Architecture
manufacturing	I-Architecture
in	O
the	O
late	O
1970s	O
and	O
early	O
1980s	O
led	O
to	O
the	O
first	O
low-cost	O
all-in-one	O
MFM	B-Protocol
drivers	O
in	O
the	O
early	O
1980s	O
.	O
</s>
<s>
The	O
WD2791	O
was	O
the	O
first	O
to	O
directly	O
support	O
MFM	B-Protocol
using	O
an	O
internal	O
analog	O
phase	O
locked	O
loop	O
,	O
but	O
it	O
required	O
a	O
number	O
of	O
simple	O
external	O
components	O
to	O
implement	O
a	O
complete	O
system	O
.	O
</s>
<s>
The	O
WD1770	B-Device
was	O
the	O
first	O
to	O
implement	O
a	O
complete	O
MFM	B-Protocol
solution	O
in	O
a	O
single	O
chip	O
.	O
</s>
<s>
FM	B-Protocol
and	O
MFM	B-Protocol
are	O
used	O
to	O
indicate	O
the	O
position	O
of	O
individual	O
bits	O
in	O
the	O
original	O
data	O
,	O
but	O
the	O
data	O
does	O
not	O
in	O
itself	O
have	O
any	O
higher	O
level	O
of	O
organization	O
like	O
"	O
files	O
"	O
.	O
</s>
<s>
This	O
is	O
accomplished	O
by	O
not	O
encoding	O
this	O
data	O
using	O
the	O
FM	B-Protocol
or	O
MFM	B-Protocol
encoding	I-Protocol
,	O
making	O
it	O
easy	O
for	O
the	O
driver	O
to	O
spot	O
it	O
.	O
</s>
<s>
The	O
sync	O
mark	O
that	O
is	O
commonly	O
used	O
in	O
MFM	B-Protocol
encoding	I-Protocol
is	O
known	O
as	O
the	O
"	O
A1	O
sync	O
"	O
since	O
the	O
data	O
bits	O
form	O
the	O
start	O
of	O
the	O
hexadecimal	O
value	O
A1	O
(	O
10100001	O
)	O
,	O
but	O
the	O
fifth	O
clock	O
bit	O
is	O
different	O
from	O
the	O
normal	O
encoding	O
of	O
the	O
A1	O
byte	O
.	O
</s>
<s>
MMFM	O
,	O
(	O
Modified	O
Modified	B-Protocol
Frequency	I-Protocol
Modulation	I-Protocol
)	O
,	O
also	O
abbreviated	O
M²FM	O
,	O
or	O
M2FM	O
,	O
is	O
similar	O
to	O
MFM	B-Protocol
,	O
but	O
suppresses	O
additional	O
clock	O
bits	O
,	O
producing	O
a	O
longer	O
maximum	O
run	O
length	O
(	O
a	O
(	O
1	O
,	O
4	O
)	O
RLL	B-Protocol
code	I-Protocol
)	O
.	O
</s>
<s>
In	O
the	O
example	O
below	O
,	O
clock	O
bits	O
that	O
would	O
have	O
been	O
present	O
in	O
MFM	B-Protocol
are	O
noted	O
in	O
bold	O
:	O
</s>
<s>
In	O
this	O
system	O
,	O
sync	O
marks	O
are	O
made	O
by	O
inserting	O
additional	O
clock	O
pulses	O
between	O
adjacent	O
zero	O
bits	O
(	O
following	O
the	O
MFM	B-Protocol
rule	O
)	O
where	O
they	O
would	O
normally	O
be	O
omitted	O
.	O
</s>
