Page 1 of 1

Floppy Driver not worling on Real PC

Posted: Sun Jan 22, 2006 12:00 am
by prajwal
Hi... My problem is a repost of an already posted topic long back by "mk"
however, the solution is not available in that post....

Here's the problem...

I'm using bochs emulator.. the Floppy Read Data works fine on Bochs
but hangs on Real PC...

I follow the steps mentioned in Intel doc for floppy controller...

1. Motor On
2. Set Data Rate
3. Wait for Int (Int occurs both on Real & bochs)
4. Recaliberate (Int occurs both on Real & bochs)
5. sleep for 500 ms
6. Init DMA
7. Series of commands for Read.... as mention by doc
which end with sending a DTL = 0xFF if N > 1 (in my case n = 2 => 512 byte block size)
8. Wait for Int..... ----> here's the problem... on bochs Int occurs but on real pc int doesn't occur and the task enters infinite loop waiting for the interrupt....

Can any one please help me in understanding what could be wrong here...

In the old post by "mk"... he has posted similar prob but He has then replied that the prob was solved... and didn't mention whats the solution... just said that it was a problem with his DMA init code....

Thanks for any sort of help in advance... ;)

Re: Floppy Driver not worling on Real PC

Posted: Sun Jan 22, 2006 12:00 am
by blackcatcoder
check if you have reenabled ints after initializing the dma controller!

Re: Floppy Driver not worling on Real PC

Posted: Sun Jan 22, 2006 12:00 am
by prajwal
Yes... ints are enabled after DMA init.... furthur Such kind of problems would be surely caught in bochs itself....

Theres one more topic running on similar lines where u have replied that u are Getting Result Status 0x40, 0x4 and 0x10..... That means u are getting a Floppy IRQ after sending 0xFF (DTL) (the last read command).... right?

but i'm not getting it on the real PC..... i'm stuck at that point

hope u can find whats the problem..... Thanks

Re: Floppy Driver not worling on Real PC

Posted: Wed Jan 25, 2006 12:00 am
by blackcatcoder
hmm...

strange, do you also do the specify command ??
and tell the fdc the times and the dma bit ?

Re: Floppy Driver not worling on Real PC

Posted: Wed Jan 25, 2006 12:00 am
by prajwal
Hey.... the problem is sovled :)...

it was a problem with the command is was sending to start (enable) motor drive....