Why is the floppy driver always busy in seek mode ?
Re: Why is the floppy driver always busy in seek mode ?
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.
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.
Vancouver Canucks fan for life
- WhiteSpirit
- Posts: 16
- Joined: Sat Jul 18, 2009 2:53 pm
Re: Why is the floppy driver always busy in seek mode ?
Hmm, yes ...Last edited by Thor on Thu Jul 30, 2009 9:56 pm, edited 1 time in total.
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 ?
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
FDC Datasheet
Vancouver Canucks fan for life
- WhiteSpirit
- Posts: 16
- Joined: Sat Jul 18, 2009 2:53 pm
Re: Why is the floppy driver always busy in seek mode ?
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 .
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 .
Last edited by WhiteSpirit on Thu Jul 30, 2009 3:15 pm, edited 1 time in total.
Re: Why is the floppy driver always busy in seek mode ?
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
0x11 = 00010001
Last edited by Thor on Thu Jul 30, 2009 3:17 pm, edited 1 time in total.
Vancouver Canucks fan for life
- WhiteSpirit
- Posts: 16
- Joined: Sat Jul 18, 2009 2:53 pm
Re: Why is the floppy driver always busy in seek mode ?
But you didn't change anything as the MSR bit 0 is still 1 and the code doesn't leave the polling loop .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.
- WhiteSpirit
- Posts: 16
- Joined: Sat Jul 18, 2009 2:53 pm
Re: Why is the floppy driver always busy in seek mode ?
The only things that you changed on my code are :
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 ?
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
Code: Select all
test al, 0x11
jnz poll_seek
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 ?
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.
Vancouver Canucks fan for life
- WhiteSpirit
- Posts: 16
- Joined: Sat Jul 18, 2009 2:53 pm
Re: Why is the floppy driver always busy in seek mode ?
Why didn't you just say that before instead of saying "I made it work fine", "Understand how your own code works" etc... ?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.
You didn't make it working, and worse, you just changed/removed some lines .
But thanks, I'll look again at the Intel docs .