I'm finding what appear to be two different descriptions of how FM encoding on early floppies worked.

In this description (see page 2 if it didn't go there directly) it appears that FM is nothing more than a clock pulse plus another pulse for a 1 and no pulse for a 0. So at the end of every window, the disk is in the "low state" and ready to encode the next window's clock as a rising edge.

However, Wikipedia's description appears different. It has a clock pulse wither rising or falling at the leading edge of the window, based on the result of the last bit. So in the case of a 1, you might get a rise-then-fall, or a fall-the-rise, depending on what preceded it.

I'm not sure the two are even illustrating the same thing, but I'm confused in any event. Can anyone clarify?

Actually both are correct, but represent a different thing.

One diagram is the actual pulses on wire, the other diagram is the actual magnetic polarity stored on disk. Each pulse generates a single magnetic transition from one state to another, or in reverse, a single magnetic transition generates a pulse on wire.

So the FDC communicates with the drive with pulses of data stream. The floppy drive stores them as magnetic transitions.

So if FDC creates only one pulse for every logic 0 bit, then magnetic polarity toggles once per bit, so consecutive 0 bits on disk toggle between two magnetic polarities. For every logic 1 bit, two pulses are generated, so magnetic polarity toggles twice per bit.

Same when reading data back. Every magnetic transition on disk generates a single pulse to FDC. Therefore, as continuous stream of logic 0 bits toggle polarity once for each bit, there is one pulse for every zero bit, and continuous stream of logic 1 bits toggle polarity twice per bit, so there is two pulses for every bit.

• Spot on. It's the fine line that magnetic recording is inherently different than people assume. It's all about change, not level. Commented Mar 25, 2022 at 1:50
• So then I assume the first reference is the FDC pulses and the second diagram is the resulting fields. Commented Mar 25, 2022 at 13:33
• On the Apple Disk II/Disk Controller II, software writes 1 bits to indicate flux reversals, but the signals from the controller card to the drive represent the flux state to be written. When in one of the two "writing" modes, the state machine within the Disk Controller II will, once every eight ticks (about four microseconds), either shift the bit pattern in the register by one place or load a new pattern and then flip state if the upper bit of the shift register is set. Commented Mar 25, 2022 at 17:34
• @Raffzahn, Re "all about change, not level." Not disputing that, but the read heads of modern disk drives are level sensitive even if that's not pertinent to how the data are decoded. en.wikipedia.org/wiki/… Commented Mar 29, 2022 at 18:25
• @SolomonSlow Sure, modern heads, but the question is about "FM encoding on early floppies", isn't it? And for that it's about detecting a flux change, not a level, as decoding is essentially about edges and their timing. Commented Mar 29, 2022 at 21:51

The process is well documented. A simple explanation is described in a Wikipedia page about floppy drive emulation. More detailed descriptions are explained in the open source project FluxEngine:

• nominal rotation speed is 300 rpm, or 5Hz. The period is 200ms.
• a pulse, as generated by the floppy drive electronics, is 150ns to 800ns long.
• a 12MHz tick is 83ns.
• MFM HD encoding uses a clock of 500kHz. This makes each recording cell 2us, or 24 ticks. For DD it’s 4us and 48 ticks.
• a short transition is one cell (2us == 24 ticks). A medium is a cell and a half (3us == 36 ticks). A long is two cells (4us == 48 ticks). Double that for DD.
• pulses are detected with +/- 350ns error for HD and 700ns for DD. That’s 4 ticks and 8 ticks. That seems to be about what we’re seeing.
• in real life, pulses start going astray on a 3.5” drive after about 128 ticks == 10us. I haven’t tried with a 5.25” drive yet as I don’t have a 5.25” scratch disk.

More detailed magnetic flux theory can be found by exploring the FluxEngine website and wiki, and it should be noted that the use of the word "cell" on the FluxEngine site could be misleading, as noted in the following comments I've roughly quoted here from @Raffzahn:

There are no cells on magnetic media. The problem with the term 'cell' is that it is commonly associated with a predefined fixed item. That's as well the image above description invokes. Except there are no predefined cells on magnetic media. It's continuous. Nor does writing create them, as all magnetic media is about timing, and timing varies within a drive and between drives. What is written in 2µs in one drive may presented as 2.1µs in another or 1.9 while still being within spec. Varying time means varying length as well. All of this will add up over the length of a track, and items may cover more or less than one of these cells. Some learners may be confused when magnetic media is described as cells, as they assume them to be something like a bit cell in a RAM or FLASH. The description would have been more accurate if he had simply abstained from introducing that term and stayed with duration in µs or maybe ticks/clock duration(s). Cells are an unnecessary addition.

• Except, there are no cells on magnetic media. Commented Mar 28, 2022 at 1:19
• @Raffzahn -Yea, he doesn't appear to define what a "cell" means in the short screen cap that I posted. It's been a few years since I went down the rabbit hole on his website, but I do recall reading info on there that went specifically into the magnetic fluctuations that are written to and read from the disk. Perhaps I should remove the screen shot, and leave the digging to the adventurous reader? I know my response was late, and would be too minimal without the posted screen shot, but I felt this valuable resource shouldn't be left out of the discussion... Commented Mar 28, 2022 at 1:59
• @Raffzahn - I feel as if your comments would be valuable to anyone perusing the website I linked, so it seems like I should append selections from your comments to my original answer, giving you credit of course... Commented Mar 30, 2022 at 23:32
• @Raffzahn - ...With your permission. Commented Mar 30, 2022 at 23:36
• @Raffzahn - Yea, I guess me being used to the historical usage is why I sort of gloss past the term without a second thought, since I am well familiar with magnetic technologies(I actually used to repair reel to reels lol) and realize that "cell" is an awful term to use when applied to analog technology of any sort. I guess I've always felt as if the use of the term was just used to help make it easier to understand for those more familiar with the digital-only world. Will add selected text, and feel free to edit yourself as you see fit. Thanks! Commented Mar 31, 2022 at 0:29

Some descriptions of magnetic formats regard areas of the disk that are magnetized in one direction as a 1, and those magnetized in the other direction as a zero, while others interpret a time slice in which a transition occurs as a 1, and a time slice in which no transition occurs as a zero.

The latter interpretation is more common, and in many cases describes how data is communicated over the cable between a floppy drive and a controller, but the former describes how data is physically stored on disk. Interestingly, the Apple Disk Controller II sends the former kind of signalling to the drive when writing data, but expects to receive the latter form from the drive when reading.