groenewo@fwi.uva.nl (Ferry van het Groenewoud) (05/03/91)
I have a simple question about something that wonders me for quite some time: Why are the floppy drives clicking to see if there is a disk in it? Isn't it easier, faster and more silent to use a lightbeam or some sort of sensor to see if there is a disk in the drive? Am I overlooking something? Probably, but what? -- Mac. The noise of a wrong calibration. PS/2. You can't see the new thing. IBM. The toys of a dead generation. Sun. You can't feel the beating. NeXT. The choice cause of bad information. Atari. You'll need some healing. Amiga. For boys with real imagination. __ Amiga. You can reach the ceiling. __/ / Ferry van het Groenewoud \__/ groenewo@fwi.uva.nl
johnhlee@CS.Cornell.EDU (John H. Lee) (05/04/91)
In article <1991May3.095011.4595@fwi.uva.nl> groenewo@fwi.uva.nl (Ferry van het Groenewoud) writes: >I have a simple question about something that wonders me >for quite some time: Why are the floppy drives clicking >to see if there is a disk in it? Isn't it easier, faster >and more silent to use a lightbeam or some sort of sensor >to see if there is a disk in the drive? Am I overlooking >something? Probably, but what? The problem isn't how the drive detects the whether or not a disk is loaded, but how it is communicated to the controller. The drive most likely uses a switch that's activated when a floppy pushes down on it. The diskchange signal is intended to inform the controller when the disk has been inserted or removed, and whether there is a disk currently loaded. Now the computer can't continuously poll the drive, so the user can switch disks between polls and the computer wouldn't know. The O/S would believe it still had the original disk and possibly corrupt the new disk. So the drive can't just supply a simple "disk loaded" signal. Instead, the DISKCHANGE signal is latched true when the disk is changed and the DISKCHANGE latch updated only after the drive is polled. If a disk is loaded before the poll, the DISKCHANGE latch is reset false and remains false after the poll. If the drive is still empty, the DISKCHANGE remains true. That way, the O/S can always tell that the disk in the drive was changed regardless of how many times the user switches floppies between polls. You can see that the DISKCHANGE latch needs to be reset only if the DISKCHANGE signal is true. Still with me? Okay, we finally get to why Amiga drives click. The floppy drive manufacturers decided that the computer can't reset the DISKCHANGE latch by simply selecting & deselecting the drive. I'm not sure why; perhaps some OEMs keep drives permanently selected for some applications or perhaps it's simpler (only takes one D flip-flop.) Instead the drive presents the DISKCHANGE signal whenever it is selected, but resets the DISKCHANGE latch only after the head is stepped. From the previous paragraph, you know that the drive doesn't provide a way to differentiate between a disk removal and a drive still empty since the previous reset, so the O/S must periodically reset the DISKCHANGE latch by stepping the head. And that is why Amiga drives click. It's (in my opinion) a faulty design of the diskchange handling. There's a problem in that aren't any more unused control lines in a floppy interace, but I think other control signals (that don't make noise) could have been used. I believe it was a design decision by the drive manufacturers, not Commodore, who set the diskchange interface before the Amiga was even designed. Floppy drives with the same diskchange interface are also used in IBM PC/AT's. and PS/2's. ------------------------------------------------------------------------------- The DiskDoctor threatens the crew! Next time on AmigaDos: The Next Generation. John Lee Internet: johnhlee@cs.cornell.edu The above opinions of those of the user, and not of this machine.