Page 2 of 2
Re: Why is the floppy driver always busy in seek mode ?
Posted: Thu Jul 30, 2009 2:55 pm
by Thor
No, my code clearly starts the motor through 0x3F2, sends the seek command to 0x3F5, and then polls 0x3F4...
I'm sick of this, I'm not trying to help you anymore with such an easy, insignificant problem. If you read something about the FDC for 5 seconds you could make this work. Just stop waiting for others to do the work for you and RTFM. Seriously, you've been waiting for a week for someone to tell you how to do it when you could have reached the wiki or any other of the millions of resources on the internet within 30 seconds and easily found the solution to your problem.
Re: Why is the floppy driver always busy in seek mode ?
Posted: Thu Jul 30, 2009 3:05 pm
by WhiteSpirit
Last edited by Thor on Thu Jul 30, 2009 9:56 pm, edited 1 time in total.
Hmm, yes ...
Well thanks for your help, I'm definitely an idiot because I avoid copying codes from other peoples sites .
Re: Why is the floppy driver always busy in seek mode ?
Posted: Thu Jul 30, 2009 3:06 pm
by Thor
That isn't what I meant at all. I'm done with you though, so... I'll just leave you with this link
FDC Datasheet
Re: Why is the floppy driver always busy in seek mode ?
Posted: Thu Jul 30, 2009 3:11 pm
by WhiteSpirit
And hey, your code still lets the MSR bit 0 ( Drive 0 Busy in Seek mode ) at 1, so it isn't improving anything here
The "test al, 0x11" is just "cheating" to get rid of the polling loop, nothing more .
And I've already visited that links and there's where I got the ports, thanks anyway .
EDIT :
another info, it's still blocked in the polling loop .
Re: Why is the floppy driver always busy in seek mode ?
Posted: Thu Jul 30, 2009 3:14 pm
by Thor
Test al, 0x11 masks all but the BSY and DRV0-BSY bits. If either of them is set (ie. zero flag IS NOT set) I loop. If they are both clear (ie, zero flag set) it will exit the loop and move on.
0x11 = 00010001
Re: Why is the floppy driver always busy in seek mode ?
Posted: Thu Jul 30, 2009 3:16 pm
by WhiteSpirit
Thor wrote:Test al, 0x11 masks all but the BSY and DRV0-BSY bits. If either of them is set (ie. zero flag IS NOT set) I loop. If they are both clear (ie, zero flag set) it will exit the loop and move on.
But you didn't change anything as the MSR bit 0 is still 1 and the code doesn't leave the polling loop .
Re: Why is the floppy driver always busy in seek mode ?
Posted: Thu Jul 30, 2009 3:23 pm
by WhiteSpirit
The only things that you changed on my code are :
Code: Select all
shl al, 4 ;; Checking CTRL BUSY ( bit 4 )
jc poll_seek
shl al, 4 ;; Checking DRV 0 BUSY ( bit 0 )
jc poll_seek
Replaced by
and you removed the poll_motor_start routine .
Only that ( which doesn't change anything, just code's size ), and you suggest me to read again Intel's docs ?
Re: Why is the floppy driver always busy in seek mode ?
Posted: Thu Jul 30, 2009 3:28 pm
by Thor
Look, just use the BIOS. The FDC needs a bunch of code to initialize it to get it working the way you want, not to mention you'll need to make a DMA driver as well. Write a floppy driver once you're in protected mode. If you REALLY WANT to make it in your bootsector, read the intel docs. Near the back it gives you step-by-step instructions of how to initialize, read, and write.
Re: Why is the floppy driver always busy in seek mode ?
Posted: Thu Jul 30, 2009 3:36 pm
by WhiteSpirit
Thor wrote:Look, just use the BIOS. The FDC needs a bunch of code to initialize it to get it working the way you want, not to mention you'll need to make a DMA driver as well. Write a floppy driver once you're in protected mode. If you REALLY WANT to make it in your bootsector, read the intel docs. Near the back it gives you step-by-step instructions of how to initialize, read, and write.
Why didn't you just say that before instead of saying "I made it work fine", "Understand how your own code works" etc... ?
You didn't make it working, and worse, you just changed/removed some lines .
But thanks, I'll look again at the Intel docs .