Slashdot Mirror


Windows 95 Almost Autodetected Floppy Disks

bonch writes "Windows 95 almost shipped with a technique for detecting whether a floppy disk was inserted without spinning up the drive. Microsoft's floppy driver developer discovered a sequence of commands that detected a disk without spinup — unfortunately, unspecified behavior in the floppy hardware specification meant that half the drives worked one way and half the other, each giving opposite results for the detection routine. Microsoft considered a dialog prompting the user to insert a disk to 'train' the routine, but the idea was scrapped."

18 of 334 comments (clear)

  1. Re:Um by joeware · · Score: 5, Informative

    I think you misunderstood linumax's comment. He is saying that instead of prompting the user to insert a floppy to train it, just automatically do the training behind the scenes the first time a floppy is inserted.

  2. I have my doubts... by cdrguru · · Score: 3, Informative

    One of the signficant problems with DOS and Windows 3 was what appeared to be a policy from Microsoft. They refused, for hardware compatibility reasons I am sure, to make use of DMA with floppy drives. Similarly, until Windows 95 there was no use of DMA except by third-party drivers at all.

    The result of this was that any Microsoft backup utility ran at half (or less) the speed3 of any DMA-using backup utility. Also, if you didn't have a third-party DMA driver, hard disk access was considerably slower.

    Windows 3.11 finally included what was apparently a licensed DMA driver for 32-bit hard disk access. It did not appear to have too many compatibility problems, but there were some. If anything, I would see this as reinforcing the idea of continuing to use BIOS access for the floppy drive and BIOS access only.

    There was some relaxation of this with Windows 95, but by no means was it complete. DMA continued to be under-utilized for I/O, partly because of kernel design and partly because of hardware compatibility issues. With more rigorous standards from Microsoft about how stuff is required to work, somewhere around 1999 we started getting more "standardized" hardware for the Windows world.

    Anyone comparing this to Apple doesn't understand the problem. With Apple there was one hardware standard and only one, since 1984.

  3. Re:Macs by Blakey+Rat · · Score: 3, Informative

    You can do a lot of stuff when you control the hardware as well as the software. Apple just installed the correct drive in all their machines in the first place.

    It has nothing to do with Microsoft "being stupid", it has to do with Microsoft having to run on shit hardware.

  4. I question this. by Jane+Q.+Public · · Score: 2, Informative

    I don't know who wrote this article, but I have questions about its veracity.

    5.25" floppy drives had two optical switches, one on either side of the disk. One detected the presence of the disk, the other was for the write-protect tab.

    Similarly, 3.5" disks had three switches. One detected the cutout that represented disk capacity (720K or 1.44M), one was for presence of the disk, the other for write-protection.

    The drives reported the status of these switches when queried by software.

  5. Re:Is it just me? by jonbryce · · Score: 4, Informative

    But Apple computers required you to unmount your floppies before you could get them back. Or if your computer crashed, you had to get it out with a paperclip.

  6. Re:Macs by ThrowAwaySociety · · Score: 2, Informative

    You recall incorrectly. There was a menu command called "eject disk" which did exactly what it was supposed to.

    Dragging the disk to the trash was a way to un-mount the volume, which (for floppy disks) also resulted in their being ejected.

    Having an eject button on the drive would make them like modern CD/DVD drives (which auto-detect and mount discs like TFA is discussing) where pushing the Eject button doesn't always eject the disc, since it may be in use.

  7. Re:Macs by Achromatic1978 · · Score: 2, Informative

    And it had nothing to do with being the 'correct' drive, either, just the 'same' drive. The problem was certain models responding one way, others responding differently.

  8. Re:Um by nacturation · · Score: 4, Informative

    On the contrary... from the follow-up article:

    On the almost-feature of floppy insertion detection in Windows 95

    Gosh, that floppy insertion article generated a lot of comments.

    First, to clarify the table: The table is trying to say that if you had a Style A floppy drive, then issuing the magic series of commands would return 1 if a floppy was present, or 0 if the floppy was not present. On the other hand, if you had a Style B floppy drive, then issuing the magic series of commands would return 0 if a floppy was present, or 1 if the floppy was not present. That's what I was trying to say in the table. The answer was consistent within a floppy style, but you first had to know what style you had.

    The downside of waiting until the user uses a floppy for the first time is that you have the it sometimes works and sometimes doesn't problem. Dad buys a new computer and a copy of the Happy Fun Ball game for his son. Dad turns on the computer, and then follows the instructions that come with the Happy Fun Ball package: "Just insert the floppy and follow the instructions on the screen." Dad inserts the floppy and... nothing happens because this is the first time Dad used the floppy, and he was expecting autodetection to work.

    Dad says, "Stupid program doesn't work."

    Dad complains to his co-workers at work. "He loves this game Happy Fun Ball when he visits his cousin's house, so I bought a computer and a copy of Happy Fun Ball, and it doesn't work!"

    Dad tries again that evening and this time it works, because in the meantime, he inserted a floppy to do something else (say, create an emergency boot disk). Bizarre. This just reinforces Dad's impression that computers are unpredictable and he will never understand how to use them.

    One could say that a feature that mysteriously turns itself on and off is worse than a feature that simply doesn't work. At least when it doesn't work, it predictably doesn't work. Human beings value predictability.

    You can't perform the test "the first time the drive is installed" because there is no way to tell that a drive has been installed. (Classic floppy drives are not Plug-and-Play.) Even worse, you can't tell that the user has replaced the Style A floppy drive with a Style B floppy drive. The user will see that floppy insertion detection stopped working and return the drive to the store. "This drive is broken. Floppy insertion detection doesn't work."

    It is also not the case that the ambiguity in the specification indicated a flaw in the specification. The C++ language specification, for example, leaves a lot of behaviors at the discretion of the implementation. This allows implementations to choose a behavior that works best for them. The no-spin-up floppy presence detection algorithm relied on several behaviors which were covered by the specification, and one that was not. It was not part of the original charter for the floppy specification committee to support spinless presence detection; it's just something that my colleague discovered over a decade after the specification was written.

    But the main reason for not bothering is that the benefit was minuscule compared to the cost. Nobody wants floppy drives to spin up as soon as a disk is inserted. That just makes them think they've been attacked by a computer virus. It'd all just be a lot of work for a feature nobody wants. And then you'd all be posting, "I can't believe Microsoft wasted all this effort on floppy insertion detection when they should have fixed insert favorite bug here."

    --
    Want to improve your Karma? Instead of "Post Anonymously", try the "Post Humously" option.
  9. Re:Um by Anonymous Coward · · Score: 2, Informative

    Really? I liked how I could insert a floppy into my Mac, there was a firm ka-thunk that the disk was inserted, and then like magic, the floppy icon appeared on my desktop to indicate that the computer was ready for you to use it (or it would pop up a 'could not recognize this disk').

    Apple controlled 100% of the hardware and could guarantee that behavior.

  10. Re:Um by R.Mo_Robert · · Score: 3, Informative

    Problem: floppy drives were not plug-and-play, so the computer could not tell when one was swapped for another. In fact, I think Windows only gets information about whether there is or is not a floppy drive (but no more information) from the BIOS. Anyway, suppose you have a (let's call it) "Type A" drive on which Windows was trained and then replaced it with a "Type B" one that reported disk status differently. Now all of a sudden Windows thinks you have a disk in when you don't and thinks you don't when you do. The user will then complain about how Windows is broken and can't recognize that a floppy disk is inserted.

    About the only thing this would have been useful for is "autorun" like what they did with CDs. But given the prevalance of floppy-transmitted viruses in this day, this probably ended up being a good thing!

    --
    R.Mo
  11. Re:Obligatory Linux Comment by xanadu-xtroot.com · · Score: 3, Informative

    Just out of curiosity, what mechanism does Linux use to do this?

    The same one that Apple did 20 years ago. The same one that Microsoft bagged 15+ years ago. The some one discussed in the article.

    If you're asking how it does it without "training", then you could read some of the other posts for solutions. Easiest being when the user clicks on the drive and there's a floppy in there, remember which flag meant a disc is there and do it from then on. Not perfect at first, but for the rest of the time (assuming no hardware change) it will be. If there's a hardware change, then remember that flag instead.

    --
    I'm not a prophet or a stone-age man,
    I'm just a mortal with potential of a super man.
  12. Re:Um by Jamie's+Nightmare · · Score: 5, Informative

    You're a bit out of focus here. It worked well on the Mac and the Amiga because the floppy drives themselves were different. The hardware was designed to signal the machine when a disk was inserted via a switch/sensor inside the drive that was depressed when the disk was inserted. Similar, but in a different location than the "write protect" and "high density" sensors. This method is simple and it works. The only real point of failure is the possibility of the switch going bad, but I can't say that I've ever seen that personally.

    The method from Microsoft was a way to do the same thing in a way that wouldn't always work. Do you remember Floppy Drives? Remember how cheap and shitty they were? They were not very reliable to begin with, and it's likely that even if it worked before there might still be mysterious times when a disk was inserted and this method wouldn't work. Microsoft made a good choice here, but rather than acknowledge that you'll just bitch more and fish more crap from the excuse box.

    --
    "When you see a unixer brainwashed beyond saving, kick him out of the door." - Xah Lee
  13. Re:Macs by PRMan · · Score: 2, Informative

    Actually, funnily enough, I remember a guy that replaced his floppy on a Mac with a PC drive and had this exact problem (had to manually detect floppies after that).

    --
    Peter predicted that you would "deliberately forget" creation 2000 years ago...
  14. Re:Um by coryking · · Score: 3, Informative

    You can even plug a floppy into the Motherboard after boot and it will work

    Indeed you can. Little known to most, the floppy drive was hot-swap :-)

  15. Re:Still was unable to use a floppy and multitask. by Rod+Beauvex · · Score: 2, Informative

    2000 can do it too, and I think the earlier NTs could also.

  16. Diskette change line... by Antony+T+Curtis · · Score: 2, Informative

    Ever since the first IBM PCs, there was a specific data line in the ribbon cable dedicated for disc-change sense.

    The real problem was that IBM never specified in the spec what voltage level it should be for when there is a disc in the drive and when it is out.

    IBM PC-DOS (which had IBM's own IBMBIO.SYS instead of Microsoft's one) behaved differently on the original IBM I had years ago. When there was no diskette in the drive, attempts to use it immediately failed. However, it could not detect if I had not closed the gate so if the diskette was in but the gate open, the drive motor would spin but the floppy couldn't spin. If you ever look at the insides of those old 5.25" full height floppy drives, you'd notice that there are 2 opto-switches: One to detect the write-protect tab, the other was deep in the drive to detect if a floppy was pushed all the way in.

    I recall that most 3.5" drives have two microswitches inside them right next to each other - one for the write-protect and the other simply to detect disk presence. Some of them won't even bother spinning the drive motor if unless that switch was depressed.

    --
    No sig. Move along - nothing to see here.
  17. Re:Um by kitgerrits · · Score: 3, Informative

    The floppy icon is there by default because the BIOS tells Windows it is installed and Windows has no way of checking wether this is true.
    The way to remove this icon is by going into your BIOS and telling it there is no floppy drive installed. (it' the option with the 3.5" 1.44M floppy)

    --
    "I was in love with a beautiful blonde once, dear. She drove me to drink. It's the one thing I am indebted to her for."