Comment by Tuna-Fish

Comment by Tuna-Fish a day ago

2 replies

As soon as the motors used to spin drives were able to provide a once per rotation signal to replace the index hole, the hole was no longer used for anything. The detector and lamp used to detect the hole were more expensive than using a signal from the motor.

phire 13 hours ago

Motor rotation isn't quite enough, as it's not aligned to the sectors on the disk.

Drives which do skip indexing (Like Apple's Disk II) use the actual data on the disk for indexing. Each sector header has a track/sector/head ID, allowing the controller to know where it is on the disk without the need for indexing.

TBH, I'm not sure PC floppies even use the index pulse for anything other than formatting the disk. Once the disk is formatted, it's kind of redundant information. But it's required by the spec, forcing PC floppy drives to include the sensor.

  • Tuna-Fish 10 hours ago

    The motor signal not being aligned to sectors of the disk doesn't matter because the drive doesn't care about angular position. The track header is generally not used for anything, on PC drives it's ignored and can be left out if you want to fit a few more bytes on the drive.

    Unlike hard disk drives that use servo data to decide where to read and write, floppy disk drives generally don't know the angular position of either the drive or the sectors and use an extremely simple algorithm. In a very real way, they work like tape drives except they can freely choose one from a bunch of circular tapes to work on.

    When ordered to read a specific sector, the drive seeks to the track requested, and then reads the track continuously until it sees the sector header magic value. Then it compares the track and sector numbers after that header with the requested numbers, and if they match, it waits for the magic value (000000000000000000A1A1A1F{AB}) and then starts reading. The magic number is designed to reinitialize the PLL, and also give the drive electronics enough time to make the comparison and decision of whether to do anything. If the numbers didn't match what was requested, then it just keeps reading until it has received a defined amount of pulses from the motor, usually 2 or 3, at which point it returns an error.

    The sectors don't have any defined order on the track. You can do weird things like order your sectors linearly except have one specific one out of order, have multiple sectors with the same sector number on the same track (in which case which is returned on read depends on which you happen to hit first), have a sector with the wrong track id on a track (that gets ignored by normal read/write commands, but can be accessed with low-level ones), index your sectors with a set of random numbers between 1 and 255 instead of sticking to 1-18, and plenty more. All these have been used in various hare-brained copy protection schemes. The drive electronics are too simple to care, they just compare one number with another and do a single decision based on it.