[Haven't located my old files yet, so here's a quick discussion]
FM
FM (AKA Single Density) simply has a regular clock pulse. In between
clock pulses there is either a pulse to represent a ONE, or no pulse to
represent a ZERO. If you look at a long string of ZERO bits, all you
will see will be clock pulses, at the clock pulse rate. For 8" disks,
that is typically 250K. For 5.25" that is typically 125K. If you look
at a stream of ONE bits, you have the same clock pulses, with a data
pulse between each of them, thereby making the combined signal have
pulses at twice the frequency of the ZERO bit stream. Thus, the two
frequencies give rise to the name Frequency modulation. It wasn't until
MUCH later that it got the name "SINGLE DENSITY" - that only came about
because the marketing people chose to call MFM "Double density", after
which they needed a name for the "NON-double density". Very similar to
the way that World War I was NOT called that until there was already
substantial talk about a World War II.
MFM
A fundamental problem with trying to pack data onto a drive is that the
bits (whether data or clock) can not be squeezed too close together. If
they COULD, then all that would be needed would be to increase the data
transfer rate to increase the density. THAT is the only difference
between "Double Density" and "High Density".
With some minor improvements in Data Separation, drive quality, and
media quality, another solution opened up. Although we can't go very
far between pulses (data or clock) without getting out of synch, it could
be possible to leave out some of the clock pulses, so long as either the
previous bit cell or the following bit cell contains a data pulse. That
results in each bit cell needing EITHER a clock pulse OR a data pulse,
but NOT needing both. That spreads the pulses out to about half the
density. By then doubling the data transfer rate, we end up with
approximately the same physical density of pulses (flux transitions) on
the track, but representing twice as much data.
"Quad" density was a marketing term for ordinary MFM double density with
tracks closer together, at 96TPI instead of 48 TPI.
"High" density is MFM double density with twice the data transfer rate
(500K v 250K), providing 15 SPT on 5.25", and 18 SPT on 3.5", instead of
9 SPT. They couldn't quite double the number of sectors on the 5.25"
because they were running at 360RPM instead of 300RPM. They ALSO went
to 96 TPI on the 5.25" (1.2M)
Track Layout
MOST (except Amiga) MFM or FM disk formats use "IBM style" sectors. That
name preceded the PC, and refers to their original use on 3740!
Each sector, whose size must be a power of 2, starting at 128 bytes per
sector, has a header, and some interesting gaps and other overhead. The
header contains four numbers, plus a CRC. The four numbers are the
Cylinder number, the Head number, the sector size (where 0 represents
128, 1 is 256, 2 is 512, 3 is 1024, etc.), and the sector number. Even
though the drive presumably knows which track and head it is on, it uses
the sector number in the header to find the right sector, and can use the
rest of the header data for confirmation. "Sector Not Found" means that
on the track the computer could not find any sector with the header that
it was looking for. "Seek error" means that it found sector headers with
track (cylinder) numbers other than what it expected. Occasionally a
format will have "creative" values in the headers. For example, the
double sided Kaypro formats used a WD FDC chip, and ignored parts of the
header. BOTH sides of the disk that they format put a 0 in the head
number field! That means that a PC trying to read a Kaypro DOUBLE SIDED
disk MUST go below the BIOS level, in order to be looking for a header
that conflicts with the physical location.
Gaps (MFM)
It is a BAD idea to begin a track too soon after the index that marks the
beginning. Therefore, the first part of any track is a gap.
Then we get to the first sector. There are about a dozen bytes to get
synchronized. (We're not sure EXACTLY where it started to read, and it
wouldn't do to be out of synch and using the last half of one byte with
the beginning of the next.) Then there is a "corruption" of the MFM
encoding to mark the boundary. That is called the Index Address Mark.
It consists of three A1 bytes with the clock pulse between bits 4 and 5
missing, followed by an FE byte. Then we have the C,H,R,N data of the
header, followed by a 16 bit CRC just to be sure that that data hadn't
been corrupted. Then there is another gap - if we were going to be
writing a sector, we would need to READ the header to find the right one,
and then get ready to write. So, therefore, we'll need another set of
synch bytes, and another address mark for marking the exact beginning of
the data. The DATA ADDRESS MARK is an FB. Then we have the sector
data. Then we have another 16 bit CRC to make sure that the data wasn't
corrupted. Then we have a moderately substantial gap of at least a
few dozen bytes before the next sector. Each sector repeats that sequence.
Then, after the last sector, there is a gap until the end of the track.
Size on it will be different, of course, for different formats, and it
can vary a bit in length due to variations in rotational speed, etc.
FM diskettes are essentially the same, except for the sizes of the gaps.
And FM supports a few additional Address Marks. F8, F9, FA, and FB ??
Tandy (and Randy Cook) chose to use the special "Deleted Data" address
marks for their DIRectory track on the TRS-80! To compound it, the
address mark that they chose was one that could be read, but not written
by the 179x FDC chips, resulting in a situation that their own Model 3
could not write a valid Model 1 diskette, and they had to change operating
systems on the model 1. But that's another story.
All of those "bizarre" gaps and structures are necessary to be able to
read and write a single sector without disturbing the rest of the sectors
on the disk. An alternative possibility would be to read and write the
entire track at a time, and parse the sectors from a track image in
memory. That software intensive system is what the Amiga does. It
therefore doesn't NEED those gaps, and can therefore squeeze more sectors
onto a track. It also means that the Amiga could read a track into an
image in memory from some other format and attempt to make sense out of
it. That's why the Amiga is hardware capable of reading a PC diskette,
but it is IMPOSSIBLE for a PC (unless with a completely different
non-standard FDC) to read an Amiga diskette.
Due to the use of the FDC chip on the disk controller, PCs can NOT read
any format that does NOT have sectors with such structures and gaps.
But, since that is what is "normally" wanted, it works just fine, and it
IS capable, with appropriate software (what I do), to read a LOT of other
"alien" formats. If it is necessary to read something without such
sector structures and gaps, then it requires different controller
circuitry, such as the Option Board, or maybe CatWeasel (I haven't seen
one yet, and understand that there are currently some software deficiencies.)
--
Fred Cisin cisin(a)xenosoft.com
XenoSoft
http://www.xenosoft.com
2210 Sixth St. (510) 644-9366
Berkeley, CA 94710-2219