• Please review our updated Terms and Rules here

RetroChallenge Jan 2016: Qualitative Floppy Disk Analysis


Veteran Member
Dec 28, 2011
Floppy Disk Operation Quick Reference
Something I should have went over last post were quick fundamentals of floppy disk operation: A floppy disk stores information in the form of magnetic flux transitions. Flux transitions occur when the magnetic field on a floppy surface changes in strength. A circuit known as a Read/Write head creates a voltage from sensing a change in flux. This voltage is maximized at the boundaries where the magnetic field completely changes polarity/direction. The points in time at which flux transitions occur, and amount of flux transitions from one magnetized direction to another, compared to a reference amount of elapsed time, determine whether binary 0's or 1's are read. During writes, the R/W coil is energized to create a magnetic flux which interacts with the disk material.

FM Encoding
Note the bold in the above paragraph. This reference amount of time is also stored on a floppy's magnetic material. In the earliest floppy disks, relative to a known starting position (we'll get to how the "starting position" is known in a later post), a floppy disk stores a magnetic flux reversal ("1") over a certain period of time followed by another flux reversal ("1") or lack of flux reversal ("0"), and the process repeats. Each pair of flux transitions, even if the latter transition (bit) is not actually written, is called a "bit cell". This is known as FM (Frequency Modulation) encoding. The flux reversal guaranteed to be present is called the clock bit, and the subsequent bit, if written, is a data bit; the clock and data are interleaved. The below figure illustrates how the data "C2" is encoded in FM. Pulse widths should be treated as symbolic; the positive edge of each pulse and their distances from each other are what's important:

As can be seen by the above image, it takes one or two flux transitions to encode a single bit of data that would be stored in computer RAM. We can in fact do better, and store a data bit in zero or one transitions, and double our storage space. This is what IBM PC-compatible disks tend to do, and the encoding is known as MFM (Modified Frequency Modulation). I will reference MFM further in the post, but will not discuss how it actually works until a later post.

A location on a floppy disk can be described by a head number (top or bottom material of disk), track number (how close to the center should the R/W head be positioned), and sector number (where shoul the R/W head start reading/writing, relative to a known starting position on the track). Tracks are ensured to be physically separate regions by having an erased- no effective magnetization) region between each track. How a floppy disk controller knows where to find data in a track/sector is deferred.

Some Vintage Documents and Models!
Okay, now that's out of the way... I'm not as smart as I like to think I am. My electromagnetics isn't as good as it once was, and even then, I should've known doing an analysis of disk media is going to be difficult. Hahaha, I thought it wouldn't take long to get back up to speed! In any case, I need to move forward, so here's a verbal description of my findings.

Some of the work has already been done for me. I would say that the canonical reference for Floppy Disk theory of operation is a 1976 document written by Shugart Technologies.

This document describes, among other things:
  • Stepper motor operation, including timing
  • FM encoding and bit cells
  • IBM track format
  • Read/Write circuitry block diagrams
  • How the data separation circuitry works
for their SA100 model.

The above document does not describe in detail:
  • MFM encoding
  • The need for a phase-locked loop with MFM encoding
  • The need for write precompensation (with MFM encoding only?)
  • Erase operation
  • The purpose of data windows

A real floppy controller (at least the IBM Double-Density kind :p) needs to account for these for proper operation.

All of the above topics can be visualized (as to why the need to be accounted for) with pretty graphs of read/write circuitry properties, such as the expected (simulated) waveforms at different stages between digital domain and analog domain. The above topics also tend to depend on one another. For instance, MFM encodes the same amount of data as FM in the same amount of bits, but does so in a way that only up to one flux transition is actually written per bit cell. This allows flux transitions on the floppy disk media to be twice as close to one another without causing reads to fail, thereby doubling the amount of bits that can be written per track.

An internal memo from Shugart is on bitsavers that consists of an analysis of the read channel for their SA450 and SA800 models. Even this document does not describe equations for the magnetic media or the erase, but a circuit analysis of the R/W head can give an idea as to the complexities involved in making sure the read signal from the magnetic media remains uncorrupted. The analysis, among other things, describes a frequency analysis of the read channel (both magnitude and phase), the general shape of the signal as read from the R/W coil (Gaussian- I'd love a mathematical equation for this), how channel noise can cause false transitions to occur and must be filtered out, and how the signal is amplified/further filtered in subsequent stages. The idea is to convert flux transitions to a TTL serial stream with timing information about where flux reversals occur.

I do have questions about the R/W head model, which is reproduced here for convenience:

A transfer function is nice to have, but why was does the AC circuit add a voltage source in the simplified model? I suspect the answer is that the voltage source models "voltage due to flux changes from the magnetic disk", whereas the inductor itself only models the "voltage due to change in current already present in the circuit". Recall that currents cause magnetic flux, and so changes in current also cause changes in magnetic flux. However, I recently re-learned that Kirchoff's Voltage Laws, and hence a linear freq. domain analysis, isn't valid in the presence of a time-varying magnetic field (Page 3). I hope that b/c the field is limited to the core of an inductor, treating the field as a proportional to a voltage source is a good approximation.

The simplified model seems to represent a R/W head as a lossy inductor in parallel w/ a damping resistance and in series with a voltage source as the input signal- fair enough! Now if only I could find a good equation for the voltage source; I do know my old textbooks have a treatment on magnetic materials, so if I so desired I could do read (and probably erase too) simulations.

These next few ideas are speculation based on what I've read, but I believe them to be accurate to the best of my knowledge. Corrections are welcome.
  • Data separation is required b/c the clock and data are sent in the same data stream.
  • Freq spectrum magnitude sets a fundamental limit on how fast the R/W head can react to flux transitions (and how long a zero crossing is delayed relative to when the R/W head senses it).
  • Freq spectrum phase separately affects the location of zero crossings as well as read signal shape.
  • A PLL is required to recover the timing information in MFM. In FM, the clock is always sent after a specific interval in time, no guarantee exists in MFM; the only guarantee is that a clock transition will be sent no later than a specific interval in time.

This I am less certain about/I could use some (vintage!) references.
  • Write precompensation affects the time bits are written to the disk in response to differences in bit density closer to the center of the disk, as a floppy disk is Constant Angular Velocity. I am not sure why this helps, but ChuckG notes that writes close to disk center can shift the flux transitions of already-written bits. Deramp5113 notes that closely packed bits also move the flux transition time; is this perhaps due to the R/W head bandwidth rather than the actual measured flux not decaying?
  • Data windows are required because the floppy disk's rotation itself actually sets the clock rate, and the rotation of a floppy disk can be as far as 10% (source: one of Tandon's old documents) from ideal. The windows give information when data is valid. I am speculating that this also helps with clock recovery in MFM; the expected clock is at a specific frequency, but can happily adapt to a clock that's off due to rotation speed (and not just absence :p).

The former four, I am fairly confident are true, but I could use some feedback on the latter three, as well as some old resources/more internal memos if anyone interested can find them :D. I hope to update this with better information. Until then, time to actually start making the controller!