Page 1 of 1

Floppy disk controller results after a read instruction

Posted: Tue Nov 09, 2004 12:00 am
by Da_Maestro
Hey everyone!!

Can anyone tell me what the results returned by the FDC are after a read instruction.

In particular, what does it mean when ST0 = 0x40 and ST1 = 0x01

Thank you for any information!!!

Re: Floppy disk controller results after a read instruction

Posted: Wed Nov 10, 2004 12:00 am
by [AlAdDiN]

Re: Floppy disk controller results after a read instruction

Posted: Thu Nov 11, 2004 12:00 am
by Da_Maestro
Ok so my floppy drive is saying it can't find the track marker...

Why does my code work in Bochs but not on a real drive!!! Every drive I test my code on generates the same error.

I've tried recalibrating after each failure and it still wont work!

D:

Re: Floppy disk controller results after a read instruction

Posted: Thu Nov 11, 2004 12:00 am
by [AlAdDiN]
this is a "classic" problem ;) everyone encountered it one day

so :
1- you have to check that you respect wait dalays after each command
2- you MUST read status registers (st0, st1, st2 ...) after each read/write command (there is 7 registers to read), this can seam stupid but you must do it
3- make sure that you respect recomanded algorithms given by intel (second url i gived you)


if you still have some problems you can check my "vary basic" fdc driver here
http://xos.freezee.org/xos_floppy.c comments are in franch but variable names in english.

Re: Floppy disk controller results after a read instruction

Posted: Wed Nov 17, 2004 12:00 am
by yohacin
HI I have seen youyr floppy driver but i do not know how you trap the IRQ from the floppy in order to call FLOPPY_INT to put called to 1.

floppy irq is 6 an the port is 06h???

i can not trap the floppy IRQ??

Re: Floppy disk controller results after a read instruction

Posted: Fri Nov 19, 2004 12:00 am
by yohacin
Sorry for my las post!! >>>
my fault was programing the PIC I had problems traping the isr I have done it and it is working FINE.

i'm trying to read a sector right now bye and thanks for your help.

Re: Floppy disk controller results after a read instruction

Posted: Sat Nov 20, 2004 12:00 am
by Da_Maestro
My code is based on the floppy driver code in minix. I'm putting in wait states in all the nessesary locations and everything! I think I'll just rewrite it. I might have some stupid error somewhere that I'll never bloddy pick up. grrr

Re: Floppy disk controller results after a read instruction

Posted: Fri Mar 11, 2005 12:00 am
by frizzz
Your work is done already!
I just published my own OS, including a floppy-disk-driver, written new from scratch, working in PIO-mode (transfers directly above 1M!) and
protected mode. It is well commented in english and german.
(deutsch sprechende Leser finden in der deutschen Ver?ffentlichung eine sehr ausf?hrliche und fehlerfreie(!) Dokumentation)
Look at my homepage
www.rcfriz.de
contact me using
[email protected]