Floppy Driver not worling on Real PC

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
prajwal
Member
Member
Posts: 154
Joined: Sat Oct 23, 2004 11:00 pm
Contact:

Floppy Driver not worling on Real PC

Post 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... ;)
blackcatcoder
Member
Member
Posts: 132
Joined: Wed Nov 03, 2004 12:00 am
Location: Austria
Contact:

Re: Floppy Driver not worling on Real PC

Post by blackcatcoder »

check if you have reenabled ints after initializing the dma controller!
User avatar
prajwal
Member
Member
Posts: 154
Joined: Sat Oct 23, 2004 11:00 pm
Contact:

Re: Floppy Driver not worling on Real PC

Post 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
blackcatcoder
Member
Member
Posts: 132
Joined: Wed Nov 03, 2004 12:00 am
Location: Austria
Contact:

Re: Floppy Driver not worling on Real PC

Post by blackcatcoder »

hmm...

strange, do you also do the specify command ??
and tell the fdc the times and the dma bit ?
User avatar
prajwal
Member
Member
Posts: 154
Joined: Sat Oct 23, 2004 11:00 pm
Contact:

Re: Floppy Driver not worling on Real PC

Post by prajwal »

Hey.... the problem is sovled :)...

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