Forgot your password?
typodupeerror
Windows Operating Systems Software Technology

Windows 95 Almost Autodetected Floppy Disks 334

Posted by timothy
from the be-nearly-nostalgic dept.
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."
This discussion has been archived. No new comments can be posted.

Windows 95 Almost Autodetected Floppy Disks

Comments Filter:
  • Um (Score:5, Insightful)

    by linumax (910946) on Saturday April 04, 2009 @02:22PM (#27459099)
    Why not do the behavior detection on first instance a floppy disk was used?
    • That was the most common comment on the blog post. His answer [msdn.com] makes sense, basically saying that it would be confusing for the user that it not work the first time they put the disk in the drive but it would every time thereafter. In addition, if the disk drive were switched out for another one of the opposite type, then the user would return it with the statement that it was broken. Overall, it would cause more confusion than the training option, which had already been discarded as too onerous.
    • Re:Um (Score:4, Informative)

      by R.Mo_Robert (737913) on Saturday April 04, 2009 @07:59PM (#27461313)

      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!

  • Floppy? (Score:5, Funny)

    by TheKidWho (705796) on Saturday April 04, 2009 @02:23PM (#27459103)

    What's a Floppy?

  • Detection via delta? (Score:3, Interesting)

    by Ryvar (122400) on Saturday April 04, 2009 @02:27PM (#27459141) Homepage

    Couldn't you perform the detection by measuring the delta of the state?

    On booting Windows 95, attempt to read from the floppy drive. If there's no disk, then take whatever that hardware state is - whether 1 or 0 - as the 'base' value, and periodically check to see if that value has changed.

    I may be missing something but it seems like the appropriate trigger isn't the specific value of the flag, but rather the setting of said flag.

    --Ryvar

    • by ushering05401 (1086795) on Saturday April 04, 2009 @02:54PM (#27459355) Journal

      Reading would require a spin-up.

      The article only says that the non spin up method was an extremely clever chain of commands so..

      We are sitting here talking about MS tech for no apparent reason with no apparent hope of arriving at any sort of conclusion...

      Why am I here again?

      • Re: (Score:3, Insightful)

        by adolf (21054)

        Because some of us elder geeks like learning about clever and functional hardware tricks, I suppose. It's always interesting to me when a piece of hardware learns a new trick which its designers never intended, with software alone. Using the PC speaker for digital audio is one. Data acquisition with a parallel port is another.

        Central Point's PC Tools Backup program used to do floppy detection, but it kept the motor spinning the whole time. So, doing this same trick without spinning the motor is interest

    • by Ironsides (739422)
      That wasn't Win95 attempting to read, that was the BIOS. The BIOS boot order was generally Floppy, HD, SCSI.
      • Re: (Score:2, Insightful)

        Yes, and that's been a danger since day one. The removable media should _never_ have been the default: it should have been the fallthrough boot medium, to keep idiots from booting with floppies or later CD's and USB devices automatically to take control of your hardware.

        • You can't fallthrough if there is a HDD with no OS is installed, the default setting allows you to install an OS on 1st run, which is normally what you need to do! Later you should change that setting when you no longer need to install the OS.

        • by drsmithy (35869) <drsmithy@@@gmail...com> on Saturday April 04, 2009 @05:18PM (#27460255)

          Yes, and that's been a danger since day one. The removable media should _never_ have been the default: it should have been the fallthrough boot medium, to keep idiots from booting with floppies or later CD's and USB devices automatically to take control of your hardware.

          On "day one" the *ONLY* option was "removable media". If you were lucky, you might even have had drive A: _and_ drive B:.

    • I mean this was "who cares?" ten years ago. Now it's well beyond that.
    • by GuldKalle (1065310) on Saturday April 04, 2009 @03:36PM (#27459645)

      Hopefully far away.
      To ordinary people, this is indeed a non-story. But to a true nerd, a story about an undocumented feature in a (once) popular tech almost being implemented in a (once) popular OS is interesting reading.
      It may not be "news for nerds, stuff that matters" but it's definitely "stuff for nerds".

  • by Zero_DgZ (1047348) on Saturday April 04, 2009 @02:29PM (#27459163)

    Just out of curiosity, what mechanism does Linux use to do this? In Ubuntu both on my laptop and desktop it magically detects floppies when they're inserted seemingly without spinning the drive. My laptop uses an external USB drive, but my desktop has a bog standard internal drive circa 1992.

    But on a different note, if you want Windows to autodetect floppies for you... Buy an LS-120 drive.

    • by xanadu-xtroot.com (450073) <xanadu.inorbit@com> on Saturday April 04, 2009 @08:13PM (#27461419) Homepage Journal

      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.

  • by Narnie (1349029) on Saturday April 04, 2009 @02:36PM (#27459215)
    So, you're telling me that this might be ready by the time Windows 7 is released?
  • maaaan, i could have saved HOURS OF LABOUR. HOURS!!!!!! Thanks, Micro$oft. Just another failure in your long list of FAILURES.
  • And you find your new drive doesn't work... because it's the opposite.

    Hmmm.

    However, you could record the state of last insert
    And then when the use attempts to read the disk, if you read it successfully, then have it.
    And it would have been self healing.

    So then the only issue would be two different drives in the same system (we used to have them you know-- to copy floppies easily) which had different types of insert.

    • Really..?

      IMHE - floppy drives are on of those things you could salvage even from a case that was partially burned or submerged in water.
      Only things in the case that are more robust and/or reusable are cables, case itself and the screws.

  • Macs (Score:3, Interesting)

    by Ukab the Great (87152) on Saturday April 04, 2009 @02:44PM (#27459275)

    I never imagined that MS developers were smart enough to actually to think of something like this. We in Macintosh land where auto-detection of floppies was standard from the beginning had simply chalked it up to a simple case of microsoft being microsoft.

    • Re:Macs (Score:5, Interesting)

      by Antique Geekmeister (740220) on Saturday April 04, 2009 @02:56PM (#27459373)

      You had something resembling a hardware spec, you lucky beggars. One thing that has slowed Linux development has been the plethora of weird hardware specs that Microsoft and their partners designed and supported, and people in Linux-land are expected to have "just work" despite this kind of specification insanity. In fact, when I can, I prefer to buy hardware that is listed as "Macintosh compatible" because the specs are so much more reliable and the quality is generally higher.

    • Re:Macs (Score:4, Informative)

      by Blakey Rat (99501) on Saturday April 04, 2009 @03:00PM (#27459407)

      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.

      • Re: (Score:3, 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.
      • Re:Macs (Score:5, Interesting)

        by coryking (104614) * on Saturday April 04, 2009 @06:13PM (#27460603) Homepage Journal

        Microsoft having to run on shit hardware.

        Floppys were the worst too. There was like no standard way to put in the ribbon cable so that Pin-1 on the cable hit Pin-1 on the drive. Some of the ribbons had a filled hole to act as a key--some of the disks had a pin there so that cable didn't work. Some of the disks were designed for the key'd ribbon, but all you had on hand were non-keyed cabling. Some of them had a plastic key on the ribbon so they wouldn't work on the drive missing the slot for the key.

        None of the disks had a plastic mold that surrounded the pins. That lead to you connecting the ribbon so the pins were all off by a row. Then when you pulled out the ribbon, it was very easy to bend all the pins.

        Keep in mind you were usually doing all this while the disk was screwed into the case and tucked into some god-awful location too. So you'd be inserting this ribbon essentially blind. As a result, every drive I owned had pins that were bent to shit because it would take like 4 try's to get the damn thing working. And worse, you'd never know if you didn't hook it up right until you booted the box and tried to read from the drive.

        Oh and if you did manage to get them working, the media was so unreliable that sometimes you could take a brand new disk, write to it, carry it to class and find all your data corrupt. Woe is the fool who didn't write the same file to two disks, lest he arrive with nothing but a bad disk.

        Floppy disks sucked. There was nothing good about them. Slow, unreliable and ill designed. Fuck them and the free AOL disks they wrote on.

        • Re: (Score:3, Interesting)

          There was a very well adhered to de-facto standard which applied to floppy drives, the early MFM/RLL ST501 style hard drives and even the later IDE drives:

          Pin one (red stripe on ribbon cable) is always closest to the power connector.

          Very rarely did anything not adhere to that.

      • Re: (Score:3, Informative)

        by PRMan (959735)
        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).
    • by Joce640k (829181)

      Macs were ten times worse - no eject button on the drive. IIRC the way to get your floppy was to drag the floppy disk icon to the trashcan.

      Totally intuitive gesture, that one. I guess this is the "easy to use" interface that Mac fans are always sighing over.

      • Re: (Score:3, 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.

      • by Viol8 (599362)

        Oh it got better than that. On the very old macs which booted off a floppy - if that floppy was corrupted and the machine crashed you'd have to go find a paperclip to get the damn thing out because resetting the machine was a waste of time - it would just attempt to boot of the disk and crash again. Yeah , well thought out that one Apple.

        • by HAKdragon (193605)

          I know on newer Macs you can just hold down the mouse button (or left mouse button if you're using a multi-button mouse) at boot to eject CDs and DVDs. Was this not the case for floppies?

          • by adamstew (909658)

            This was the case for Macs since ATLEAST the Mac Plus. I remember having to do this. You could, infact, delay boot by holding down the mouse button, because the computer was trying to eject a disk that wasn't in the drive.

          • Re:Macs (Score:5, Interesting)

            by Blakey Rat (99501) on Saturday April 04, 2009 @07:46PM (#27461225)

            Yah.

            You have to remember, a lot of people on Slashdot posting about Classic MacOS never actually used it. Most of them only adopted Macs after OS X came out, but they like to pretend they were part of the "Classic Club" by giving us little gems like the post you replied to.

            If you even slightly think something said on Slashdot might be wrong, go with your gut.

    • by denzacar (181829)

      I never imagined that MS developers were smart enough to actually to think of something like this. We in Macintosh land where auto-detection of floppies was standard from the beginning had simply chalked it up to a simple case of microsoft being microsoft

      Such small things as having your hardware custom built, instead of dealing with gazillion different models and manufacturers, have probably made implementation of such a feature far simpler.

      Oh... and that electronic floppy ejection system, which was controlled by the OS, might have had a part in that too.

  • Read the original link. In the end, they figured out that users were not trained to expect a floppy to spin immediately upon insertion, and would suspect they unleashed a virus or something even nastier.

    Their decision was a good one, for once.

    • No, re-read it yourself. They're were not talking about auto-run, they were talking about detecting the disk in the drive without reading from it:

      ... if you issued just the right extremely clever sequence of commands, you could determine whether a disk was in the floppy drive without spinning up the drive.

      • But if you read the follow-up, [msdn.com] they talk about having a game autorun as a feature they planned to implement.
        The "no-spinning-up" was probably just to avoid your machine go "Bzzt" every two seconds.

    • Many anti-virus software spun up the floopy drive when Windows 95 was starting up, and when it was shutting down. The way I see it, Windows 95 could do a read with or without the floppy at start up. If an error is returned, it would indicate whether there is a disk or not or if that's a different kind of error. Compare the result with the algorithm that detects presence of a disk without spinning up. Just need to do this once during boot time. Don't even bother caching the result in the registry since a use

  • I have my doubts... (Score:4, Informative)

    by cdrguru (88047) on Saturday April 04, 2009 @02:52PM (#27459331) Homepage

    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.

  • It's not like it's 1995 anymore....

  • by anexanhume (1375619) on Saturday April 04, 2009 @03:00PM (#27459411)
    I know what it's like to not have your floppy detected upon insertion.
  • I question this. (Score:3, Informative)

    by Jane Q. Public (1010737) on Saturday April 04, 2009 @03:03PM (#27459429)
    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.
  • The article's author, Raymond Chen, posted a follow-up article [msdn.com] to the one linked in the summary that answers some of the questions people had about it. Why that didn't make it into the summary, I don't know.

    • by bonch (38532)

      The followup article didn't exist yet when I submitted the story on Thursday.

  • ok, but... (Score:2, Insightful)

    by yup2000 (182755)

    Why didn't they spin up the drive to check for a disk, run the routine that doesn't spin the drive up and based on the results, adapt the result to the computer...

  • I got a first post. Why didn't anyone tell me?

  • I vaguely remember back then with at least the first release of Windows 95 where if you used a floppy to read or save a file, then you were cursed by having the floppy drive accessed a couple of times every time you would go to open or save a file from either a particular application or however else the "Recently used" file information was shared. It was actually worse if you had a floppy in the drive, because it would then read the contents as well.

    Also new in Win95 was that you could read/write to a flop

  • For of all sad words of tongue or pen,
    The saddest are these: "It might have been!"
    - John Greenleaf Whittier

    More sad are these we daily see:
    "It is, but hadn't ought to be."
    - Bret Harte
  • to add it to Windows 7. Now that's an upgrade worth paying for!
  • Big deal (Score:4, Insightful)

    by AmigaMMC (1103025) on Saturday April 04, 2009 @04:11PM (#27459859)
    AmigaOS 1.0 did that
    • by British (51765)

      I'm not surprised. For all computer platforms that used floppy disks, the MS-DOS world seemingly got the shaft. Amigas and Macs had utilities that could read MS-DOS disks and such, but with the way MS-DOS did disks(correct me if I'm wrong), they couldn't read any other format. Putting long filename support aside, eh, it just wasn't that great. A hardware-level detection if a floppy disk is inserted would have been welcome. Autorun? No(but that's software).

    • Click (Score:3, Insightful)

      by Dan East (318230)

      AmigaOS 1.0 did that

      Click. Click. Click. Click. Click.

  • It could detect when an user is just watching the screen, coloring it blue to show that was successful. Was impressive how reliable worked that.
  • I would have absolutely loved that feature. I hated it when I would open up My Computer (or what ever the various drives display window was called at the time), and it would freeze for a few seconds while my floppy drive would spin up. I think this feature could have been included as an option. Basically, by default use the spin up method, but if an exploratory individual went into the floppy drive properties, there was a training button sitting there waiting for them.
  • by alexandre (53) * on Saturday April 04, 2009 @05:28PM (#27460315) Homepage Journal
    Meanwhile it was unable to copy to/from a floppy without slowing down to a halt... go figure as in linux it didn't affect the computer at all!
  • by Antony T Curtis (89990) on Sunday April 05, 2009 @01:07AM (#27462941) Homepage Journal

    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.

  • by binarybum (468664) on Sunday April 05, 2009 @03:54PM (#27467737) Homepage

    ...but they've worked it out and plan to release it in Windows7 as a key selling point. I'm pumped, this will make installing kings quest 1-4 much easier.

The clearest way into the Universe is through a forest wilderness. -- John Muir

Working...