RECORDING METHODS – FM and MFM
The method of representing data as a stream of bits to be recorded on a floppy disk is up to the disk controller. All that the drive does is faithfully record the pulses that are sent to it and reproduce them on demand. Due to the size of the head gap, there is a lower limit to the size of the pulse that can be recorded reliably using a given drive. The size of the pulse obviously determines how much data can be recorded on the disk, and disk drives are made in two types – single density and double density.
The only difference between a single and double density drive is the size of the head gap. You can use a double density drive in a single density application but, obviously, not vice versa.
Fortunately, apart from one or two exceptions (such as Apple), most computers use either the FM (Frequency Modulation) and the MFM (Modified Frequency Modulation) method of recording data. All that is needed is a representation of 0 and 1 that can be easily decoded. The FM method is generally used for single density recording and it works by recording the data and a stream of clock pulses. The clock and data pulses are easily recovered from the data stream using either a simple mono-stable or a phase locked loop. The MFM method is a little more complicated in that no clock pulses are recorded unless a pair of zeros occur together.

Formatting and Soft Sectoring
Now that we have a method of recording information on a disk, the next question is how to organize the storage data. Each track could be treated as a unit of data storage and one complete track read and written to at a time, but this involves a large amount of data (approximately 2K). A better method is to divide each track into a number of smaller units called sectors.
The number of sectors into which a track is divided varies between systems. Typical sector sizes are 128, 256 or 512 bytes. Using a sectored disk any data can be found by giving two pieces of information – its track number and its sector number. (The track and sector numbers are often quoted together and referred to as a “disk address”.)
It is easy to see how the drive can find any given track: starting from a known track – say, track zero (T00) – it simply steps in the required number of tracks. But how does it find a given sector?
There are two methods of indicating which sector is about to pass under the read head: hard sectoring and soft sectoring. A hard sector uses “sector holes” to mark the start of each sector in the same way that the index hole marks the start of each track. Finding a given sector is simply a matter of counting the number of sector holes that have passed under the index sensor since the last index pulse. For various reasons hard sectored disks are not used very much these days and most systems use soft sectoring.
A soft sectored disk has information recorded on each track that allows the drive to read the number of the data sectors about to pass under the read head. Each sector is made up of two portions, an ID field and a data field. The ID field contains unchanging information about the nature of the sector and is not re-written during normal disk operations. To create the pattern of ID and data fields on a diskette it has to be formatted, and the format program is generally the only software that writes ID fields. You can think of ID fields as sort of a magnetic equivalent of the sector holes used by hard sectored disks, but ID fields are more versatile because they can be read to discover the sector number of the data about to pass under the read head.
There are a number of different ways to format a disk but nearly every system either uses or can use a format that is close to the IBM 3470 standard. You can see the exact construction of both the ID and data fields that make up a sector in the diagram on the next page. The track number is also recorded in each ID field to enable the head’s current position to be verified. The length of the data portion of the sector is also recorded as a simple code: 00 = 128 bytes; 01 = 256 bytes; 02 = 512 bytes; 03 = 1024 bytes.
For synchronization purposes, there are a number of special data patterns or address marks that are recorded on the disk. These address marks correspond to sequences of pulses that can’t normally occur because they lack various clock pulses. In that way the disk hardware can identify an address mark without any doubt. Different address marks are used to signify the start of the ID field (the ID address mark) and the data field (the data address mark). At the end of each of the ID and data fields are two Cyclic Redundancy Check (CRC) bytes, used to make sure that data has been read without error. CRC bytes are computed when any field is written and recomputed when any field is read. If the recomputed values don’t match the recorded values then the data has changed since it was written to and a read error should be reported.
As well as address marks signifing the start of each field, there must also be gaps between fields and between the sectors to allow for timing inaccuracies. There must also be a gap following the index hole at the start of a track and a gap after the last sector before the index hole. Thus there are four types of gaps and each has a unique format to help with the detection of the address marks. The complete format of a track follows below the sector format diagram. The standard IBM 5 1/4 inch format gaps are made up as follows:
1. Post index 22 bytes made up of 16 FFH followed
by 600H
2. ID 17 bytes made up of 11 FFH followed
by 600H
3. Data 32 bytes made up of 26 FFH followed
by 600H
4. Pre-index 274 bytes made up of FFH

Acknowledgement: Electronics & Computing Monthly – Mike James
Next month we will cover the disk controller in part 3 of Disk Drive Control and Interfacing.
…………Bob Gilder