FDC does not work 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
stafe
Posts: 22
Joined: Fri Oct 29, 2004 11:00 pm

FDC does not work on real PC

Post by stafe »

Hello,

For short time I wrote a topic about the FAT12 problem ... now the FAT12 works fine in my OS, but yesterday I try to test my OS on the real PC and I saw that the FDC does not work well ... Is it important to do a delay if I read a sector in the memory ?? Mabey somebody had the same problem and solve the problem ... I hope somebody could tell me how to solve this problem ...

stafe
blackcatcoder
Member
Member
Posts: 132
Joined: Wed Nov 03, 2004 12:00 am
Location: Austria
Contact:

Re: FDC does not work on real PC

Post by blackcatcoder »

I've the same problem, I came through this problem after I implemented some other things into my kernel, I don't know yet why there is no data flow between kernel and floppy drive, before I did those impementations it wroked very fine but now ...

I will try to fix this, on the weekend!
blackcatcoder
Member
Member
Posts: 132
Joined: Wed Nov 03, 2004 12:00 am
Location: Austria
Contact:

Re: FDC does not work on real PC

Post by blackcatcoder »

ok, I've now debugged the whole thing:


I haven't got yet an solution but I know where the problem is!

After I send a read command to the fdc, the fdc returns this result :

st0= 0x40 (means, command started but abnormal termination, why?)
st1= 0x4 (means, cannot read out ID field, what the hell is this ?)
st2= 0x10 (means, the track field is different between those in the controller and the send one, but I send the right one ;-) )

if anyone has got a solution for this problem please post it here!

In the mean time I will try to fix it by myself ;-)
blackcatcoder
Member
Member
Posts: 132
Joined: Wed Nov 03, 2004 12:00 am
Location: Austria
Contact:

Re: FDC does not work on real PC

Post by blackcatcoder »

YEAH, solved!

I've solved this problem!

My mistake was a wait in the fdc_get_cmd_byte!
And I did a fdc_get_cmd_byte to many at the recal!

I will upload my source code on weekend, so everyone can check it out!

Ok, for the future now,

If anyone is getting the same problem with the floppy controller, don't recode the whole thing (as I did ;-)), just take a look on the SENSE INT and on the "get data" methods ;-).

I hope this will be useful!
Post Reply