Page 1 of 1

Is floppy disk inserted?

Posted: Sun Oct 11, 2009 4:35 am
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?

Re: Is floppy disk inserted?

Posted: Sun Oct 11, 2009 4:47 am
by nicesj
wow, Great....

How could you make it to work?
I couldn't make my FDC work yet.. :^(

Re: Is floppy disk inserted?

Posted: Sun Oct 11, 2009 4:42 pm
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.