Is floppy disk inserted?

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
User avatar
AlfaOmega08
Member
Member
Posts: 226
Joined: Wed Nov 07, 2007 12:15 pm
Location: Italy

Is floppy disk inserted?

Post by AlfaOmega08 »

I've completed a FD controller driver for my OS. It reads flawlessly a floppy disk. The only problem is when you try to read a floppy disk when it's not inserted. On VirtualBox, I just get a bunch of 0s. On bochs it panics:

Code: Select all

00028686400p[FDD  ] >>PANIC<< floppy_command(): read/write: bad drive #0
So I suppose that there is a method to check wheter the floppy is into the device or not? Am I wrong?
If not what is this method?
Please, correct my English...
Motherboard: ASUS Rampage II Extreme
CPU: Core i7 950 @ 3.06 GHz OC at 3.6 GHz
RAM: 4 GB 1600 MHz DDR3
Video: nVidia GeForce 210 GTS... it sucks...
User avatar
nicesj
Member
Member
Posts: 27
Joined: Fri May 06, 2005 11:00 pm
Location: South Korea
Contact:

Re: Is floppy disk inserted?

Post by nicesj »

wow, Great....

How could you make it to work?
I couldn't make my FDC work yet.. :^(
http://nicesj.com
With the software, What You Think Is What You Get.(WYTIWYG)
User avatar
djsilence
Member
Member
Posts: 70
Joined: Wed Oct 01, 2008 11:18 am
Location: Ukraine, Kiev
Contact:

Re: Is floppy disk inserted?

Post by djsilence »

is it PANIC on bochs while doing any operation? I mean that you could just to try reset fdc, and if get unpleaserable result make your decision that floppy is not inserted...

see where is a problem: floppy drive do not know such as cd drive when floppy is inserted, so it try to read it, while getting an error it makes decision that floppy isn't inserted...

and nicesj, look at this tutorial: http://www.brokenthorn.com/Resources/OSDev20.html, it is great FDC programming tutorial.

Daniel.
Don't think a ****, but in ukrainian schools English is TOO BAD!
Post Reply