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."
Why not do the behavior detection on first instance a floppy disk was used?
What's a Floppy?
... good job he didn't detect it, else the Internet would have been infected with MS Windows virus/trojans from day #1.
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
???
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.
Hmm... I was going to make a comment on archeo-tech, but then I remembered the computer I'm typing on still has a DVD drive/burner. In any case, wouldn't the obvious solution have been using the inefficient spin-up method to check "for sure" if there is a floppy or not, and using that info and the "no spin up" code, figure out which of the 2 drive types it was, and use that going forward?
...I'd always thought this was impossible with basic FDD tech. How wrong was I. :)
(AND I run Linux. I just haven't used an actual FDD with a mainstream distro since I switched. Kinda glad it's that way around, actually!)
I clearly remember that one of the very first releases of NT 3.0 had a feature like that. You could insert a floppy and automatically the OS was trying to read/detect the content of it.
So, you're telling me that this might be ready by the time Windows 7 is released?
greed@All_Evils:~#
maaaan, i could have saved HOURS OF LABOUR. HOURS!!!!!! Thanks, Micro$oft. Just another failure in your long list of FAILURES.
WÌÌfÍ--ÍSÌÒÍ...Í...ÌHÌÍfÍÍÍ--ÍÍÍ
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.
She was like chocolate when she drank... semi-sweet at first and then increasingly bitter.
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.
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.
Karma cannot be described by words alone.
I mean this was "who cares?" ten years ago. Now it's well beyond that.
Democracy Now! - your daily, uncensored, corporate-free
This was on OSnews two days ago. Hurry up ./!!!
"sudo rm -rf your-face"
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....
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.
Mit der Dummheit kämpfen Götter selbst vergebens
Systems that relied on specific hardware (i.e. Acorn, Amiga, Atari, etc) were capable of this feature. It's nothing special.
I know what it's like to not have your floppy detected upon insertion.
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.
Typical narrow-minded Microsoft thinking. Couldn't they have just done the autodetect, then immediately tried to read from it, remember which result was correct?
The article's author, Raymond Chen, posted a follow-up article 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.
GLaDOS for President 2016! "Well here we are again. It's always such a pleasure." -- GLaDOS, 2011
http://www.youtube.com/watch?v=Sn9VkoOO3EA
I'd go on a Vegan diet but the delivery time from Vega is too long. --brownkitty
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?
The Admin and the Engineer
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 floppy and barely multitask while waiting for the read/write to finish. Most all OSes sucked at the time in different ways regarding removable media.
I'll take my 2GB USB thumbdrive over a floppy any day. Actually, my 2GB thumdrive is almost 3x the size of my harddisk back then. My how things change.
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
Prisencolinensinainciusol. Ol Rait!
I had a DOS virus once and it did this so that any disk in the drive while the virus was in memory would become immediately infected.
So viruses were doing this years before Windows 95.
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 user could have replaced a floppy drive with an "opposite" one.
Another idea is to always show the floopy disk icon when the system first starts, regardless whether there is a disk in the drive. If the user clicks on the icon, attempts a read. Determine the polarity of the spinless floppy presence algorithm at this point and compare the result. If read succeeds, keep the icon. If the read fails, ask the user to insert a disk to try again or cancel. If the user cancels, remove the icon. You have now determined the polarity and can do spinless detection reliably.
I once had a signature.
I wonder if some of the pre-release versions had this feature.
so you confuse the shit out of the user by having ghost floppies show up every boot?
Snowden and Manning are heroes.
Wow a news article about floppies and an acient operating system.. good find slashdot..
to add it to Windows 7. Now that's an upgrade worth paying for!
AmigaOS 1.0 did that
The reason reason this feature was removed was to keep from having a thread repeatedly checking the floppy drive. I'm sure CD-ROMs and such send an interupt when discs are inserted, but not the floppy drive.
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.
Congratulations; the Amiga and the Mac were already doing that in 1987 (or earlier).
-b
myselfmusic
Good solutions to the problem can be found in the comment thread of Raymond's article, although Raymond pretends not to have read those here. On the one hand, I really love his insights in Windows' architecture, but on the other hand I must admit that he can really be an ass when he knows he's right and closes his mind to all possible evidence to the contrary.
...and?
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!
Comment removed based on user account deletion
Considering the only way most software was installed on a machine was via a floppy disk, wasn't your example the most common case? Unless you mean they basically implemented the "detect disk /w-out spinning up and if disk is in, write crap?"
You could have taken the cheap shot by slightly altering your sentence to:
Much more colourful.
IIRC, didn't they also have one of those pinholes somewhere on the case so you could do a hard-reset on it? I forget...
If the computer can detect and spin up a cdrom drive, what's wrong with doing the same thing for a floppy? This would be a great feature to add to Linux. Yes, everything is moving away from floppies, but there is a *ton* of legacy systems that still require a floppy for one reason or another.
Take the cheese to sickbay, the doctor should see it as soon as possible - B'Elanna Torres, "Learning Curve"
Congratulations on not reading the article or summary.
First, this feature was talking about checking if a disk is present without spinning up the disk. To boot from a floppy, a computer spins up the disk and looks for a boot sector.
Second, that would be the BIOS, not Windows, checking the floppy during the boot process. It checks the devices in the order it's set to. Back in the mid 90s, this was generally floppy, then IDE, then SCSI. A few people with good hardware had CD-ROM in there, too.
GLaDOS for President 2016! "Well here we are again. It's always such a pleasure." -- GLaDOS, 2011
to trigger audio samples from radio version of "The Hitchhiker's Guide". It would play "Thank You" when a floppy was inserted and "Glad to be of service" when it was ejected. If I remember correctly those were the doors in the Heart of Gold.
AmigaOS 1.0 did that
Click. Click. Click. Click. Click.
Better known as 318230.
The way I see it, Windows 95 could do a read with or without the floppy at start up.
That's the very first thing that popped into my head when I finished reading the article. I wish that we'd get all of the context behind the situation to understand why these obviously good ideas aren't implemented.
The computer was not detecting a floppy, rather it was using a bios routine on startup to seek for a floppy assuming there was one in the drive to boot from and spinning it up no matter what. If the drive returned a false on being able to read the floppy for whatever reason then the bios would try to read the boot sector of a hard drive and boot from that instead. This hails from the days of DOS when not everyone could afford one of those fancy $900 10 megabyte winchester hard drives. Of course with most modern motherboards this is now adjustable and completely removable.
Some early Linux versions did this (I think Suse may have had this once) which would occasionally spin up the drive and try to read it so that a windows user would not have to deal with the concept of "mounting." However it was annoying to me to hear the floppy drive trying to be accessed every five minutes.
you are arguing for a closed spec (Apple), and against the open IBM PC architecture, which was a legacy of its open ISA beginnings, where anyone could build an addon card in their garage.
i find it hilarious on to find such a sentiment on slashdot. if here is a gene for revolution it must be closely related to the gene for hypocrisy.
But it failed miserably at everything.
Never quite made it, really.
Huh?
But I wager most kids under the age of 15 have never actually seen a floppy drive. In addition, I doubt they've seen a cassette tape and I bet many have never seen a video using VHS.
What is funny is I bet when those kids have children of their own, the record player will still be used.
What is really nuts though, is our kids will be doing crazy shit we never dreamed of because unlike us, they grew up with cell phones, the internet and the web. Wait until they come of age and things will really get interesting.
if anyone remembers installing Trumpet tcp/ip stack in windows 3.11 to get on the internet........ well.... i for one, was very happy with this fancy new windows 95 thing that had it included in the operating system.
and the 'start' menu was great. not that linux didnt have it already in some window manager, but it has been copied over and over because it works pretty damn well, both from a mouse jockey and a keyboard jockey perspective.
Say what you want about Windows and how this sucks, and that sucks, but Raymond is an awesome guy.
Comment removed based on user account deletion
Why do we care?
"There ought to be limits to freedom." -George W. Bush
Until the user replaces the drive with a different one.
Two different cases of casings.
One was inside the storage area that caught on fire.
Not particularly big fire, and the case itself was only "licked" by flames before the fire was put out - but the plastic on/off and reset buttons on the front of it melted and the case was to be written off and thrown out.
Since it was an old Pentium - no great loss. Floppy drive worked though. Kept it and years later when a friend needed a floppy drive, I dug it out of a box - and it worked.
Similar story with the other box - only different storage room and this time it was bad drainage and couple of days of rain.
Water was simply coming out of a wall the whole night. Quite a sight to see in the morning.
This floppy also worked - but it smelled bad. Ended up throwing it away in the end as I already had couple of spares.
Mit der Dummheit kämpfen Götter selbst vergebens
I want my computer to do nothing until I *tell* it to mount the floppy (or whatever) device. I want it to obey my subsequent commands and then unmount the floppy (or whatever) device *only* when I tell it to.
That says a lot about the attitude toward Apple when the major point of criticism is over style points.
I had the original fat Mac (512KB) with two floppy drives. There was no internal hard drive and not really anywhere to put it. IIRC, I priced a 10MB hard drive in the range of $1500 with the necessary case mods. Whatever the price, it was a sizable fraction of the purchase of a new-fangled IBM AT. (If you don't know what fangled means, assume the worst.)
The dual floppy fat Mac was pretty much a write-off for coding in C. My Unix-like C environment required at least three active floppy drives to get anything accomplished.
Fortunately, Apple had implemented an auto-eject whenever the unmounted floppy was required. Invariably, it chose to eject the disk you would immediately need next. I muttered so many times to myself "no, you stupid POS, suck that diskette back in and eject the *other* one". Apple provided no convenient way to override this mistake. I had a lot of bent paper clips on my desk.
Apple's philosophy then, which has ever-so-slowly evolved over two decades was "if this bothers you that much, spend half the price of a new machine on a short-sighted upgrade to an internal 10MB hard drive, which was never built to accommodate this". (You still won't have a proper LAN.) Or better yet, buy the Lisa.
I would have loved to drag Apple's entire floppy disk interface into the trash can.
Another thing about Apple back in the day was the rumour that Mac OS would support true virtual memory "real soon now" once hard drives became a standard feature. Apparently they were too busy crowing about the lack of 8.3 to pull this off. It didn't come true until the first release of OS X. Thus the nearly twenty year gap between my first Mac purchase and my second one.
Well, my first Mac was an Amiga - so there!
-- thinkyhead software and media
The floppy disk format that the PC //supposedly// used (which I think might originally have been a general Sony specification) included parameters for things like number of sectors and number of tracks, and other OSes like the Atari ST would tend to handle these details correctly, but PCs wouldn't.
PCs would always assume that the number of tracks was (eighty?) and the number of sectors was (something), regardless of what was actually written into a floppy's format descriptor thingy.
So if you formatted a floppy on a PC, you could usually use it on just about any other computer, but if you formatted the disc on a non-PC, you often had to use a special utility to make sure that the disc was formatted with the particular "special" version of the format that a PC would be guaranteed to be able to read. It was a pain in the arse.
Eric Baird
So the nightmare of autodetect/autostart could have being started way before?
Not a good idea...
... why was this story even run?
An article about a feature that a 14-year-old operating system didn't have?
Slow news day much, Slashdot?
I stole this sig from someone cleverer than me.
Yes, otherwise I wouldn't be mentioning it here :). In fact I discovered the virus because the 5.25" drive light would come on when a disk was inserted before the drive was even closed.
Almost? This is news? Almost doesn't count for anything!
14 years from now: Vista almost autodetected common hardware without freezing.
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.
Consistency in an operating is indeed a high priority, but the designers at Microsoft think they know better and suggest "Because Windows adapts to how you use your computer, the menu items you use most will be automatically displayed in the future. So the next time you open the menu, you might not need to expand it."
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.
If only they had remembered this lesson. Some years later they considered it vastly different to spin up a CD upon insertion. Then they figured they'd not only do that, but also trust the media enough to blindly start executing code from it.
2000 can do it too, and I think the earlier NTs could also.
Vendors were building drives in both ways, that was the mistake. That's a good reason why we have "standards", so thing like this wont happen... much...
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.
What kept them from auto-detecting floppies during a Windows session?
Example:
1. insert floppy, do something, detect mechanism
2. request disk2
3. auto-detect that disk2 has been inserted
4. keep auto-detection during the Windows session
5. after Windows restart goto 1
That sounds seamless to me, is easy to understand and doesn't cause any trouble. (I guess the few people that swapped their floppy drives during a Windows session are negligible.)
... they almost managed to achieve Amiga 1985?
I run: Windows, OS X, Linux, FreeBSD. Just because you have a hammer, doesn't mean everything is a nail.
...and this is where Clippy was born:
"I see you have just inserted a floppy disk in the drive. Would you like me to completely fuck it up for you?"
There was an Amiga utility called NoClick that could stop the clicking but it looks like it had some risks with 3rd party disk drives. It worked well on my Amiga A1200's internal drive though.
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."
Clearly wrong reasoning here.
This is exactly how MS defined how a cd would react to a drive insertion. About now there is a problem that the autorun stuff is an inidation of a virus. PTrue: people worries a lot because the hard disk was showing all kind of activity wihtout they doing something. But extending that behaviour to floppy would be no problem.
At least they should have had an option to enable autodetection somewhere in the settings.
So they almost developed something that was done with the SAME hardware 10 years prior to releasing Windows 95. That was one thing I loved from Amiga - no "Inset disk X and press enter". I had fun installing extra (generic) floppy drives and converting a standard 25 pin d-sub to work with the 23 pin custom d-sub that the Amiga used.
"problem: some users are idiots
solution: treat all users like idiots"
Close but not quite. That should be:
Problem: Almost all users are idiots
As soon as you come to grips with that, many large organization decisions make sense. If they can help 80% of the customer base at the cost of annoying 5% of the customer base, they'll do it, every time. (The 15% margin is for people aren't total morons and might fall on either side.)
dragonhawk@iname.microsoft.com
I do not like Microsoft. Remove them from my email address.
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,
On "day one" the *ONLY* option was "removable media".
Oh, I beg to differ. On "day one" the only option was no media.
The original consumer-market home micros (e.g., Apple ][, Commodore 64) didn't even come with a floppy drive. You had RAM and that was it. Maybe an audio cassette interface if you were lucky (I never could get that to work). I clearly remember being envious of the handful of Apple ]['s at school that had the floppy drive option kit (controller card and drive).
I'm sure I'm not the only one here on Slashdot who remembers spending hours typing in BASIC programs from source code listings in magazines, debugging the typos, and then finally getting the thing working, and then leave a note on the computer saying not to turn it off or reboot it, since there was no way to save all that work.
(I'm sure someone will want to come in here and belittle me for having the luxury of audio cassettes, or RAM, or electricity, or paper, or whatever. Folks, it's been done. At least provide an original anecdote if you must play the grandpa game.)
I remember getting my Tandy 1000 SL and being uber-impressed that it came with the MS-DOS core in ROM, so you could boot to a command prompt without even a floppy diskette. I never got asked to insert the disk with the command interpreter, thanks to that.
I also worked out that when working in the DeskMate word processor, if I wanted to open a file, I could type-ahead during program load to execute the File -> Open command, and send the "Retry diskette read" command three times. You see, if I sent a retry three times, that kept the floppy disk spindle motor going long enough while I was changing diskettes (switching from program disk to data disk). Retaining that angular momentum shaved a good 0.75 seconds off the time it took to load the directory from my data diskette. Whoo-who! Now we're flying...
dragonhawk@iname.microsoft.com
I do not like Microsoft. Remove them from my email address.
"PCs would always assume that the number of tracks was (eighty?) and the number of sectors was (something), regardless of what was actually written into a floppy's format descriptor thingy. "
That's because that's the only format stock MS-DOS could cope with. There wasn't any point in doing detection if it couldn't read such a diskette anyway.
Not everything bad in MS-DOS is due to brain damage; much of it is due to its incredibly limited functional capabilities. (This is not a complement.)
dragonhawk@iname.microsoft.com
I do not like Microsoft. Remove them from my email address.
"AmigaOS 1.0 did that"
Big deal. Could AmigaOS run x86 code without a bridge board? I didn't think so.
What's that? I'm asking for capabilities that don't exist in the hardware?
Thanks for making my point for me.
dragonhawk@iname.microsoft.com
I do not like Microsoft. Remove them from my email address.
...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.
ôó
http://aminet.net/search?query=noclick
In the eye of the beholder, I suppose. From HCI expert Donald Norman:
A simple example of a good design is the 3½-inch magnetic diskette for computers, a small circle of "floppy" magnetic material encased in hard plastic. Earlier types of floppy disks did not have this plastic case, which protects the magnetic material from abuse and damage. A sliding metal cover protects the delicate magnetic surface when the diskette is not in use and automatically opens when the diskette is inserted into the computer. The diskette has a square shape: there are apparently eight possible ways to insert it into the machine, only one of which is correct. What happens if I do it wrong? I try inserting the disk sideways. Ah, the designer thought of that. A little study shows that the case really isn't square: it's rectangular, so you can't insert a longer side. I try backward. The diskette goes in only part of the way. Small protrusions, indentations, and cutouts, prevent the diskette from being inserted backward or upside down: of the eight ways one might try to insert the diskette, only one is correct, and only that one will fit. An excellent design.
Without an auto-eject feature, even auto-detect wouldn't have made floppies under Windows any more streamlined. You still had to push a button every time you ejected a disk.
The fact is, the CD-ROM standard was much better thought-out, and made it easy for Microsoft to implement autorun. The industry learns from it's mistakes (eventually).
Man is the animal that laughs.
And occasionally whores for Karma.
When it was directed to the floppy and saw data there it could have ran the routine and seen which call found a disk in the drive and then remembered that.