Floppy disk controller results after a read instruction

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
Da_Maestro
Member
Member
Posts: 144
Joined: Tue Oct 26, 2004 11:00 pm
Location: Australia

Floppy disk controller results after a read instruction

Post 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!!!
[AlAdDiN]
Member
Member
Posts: 107
Joined: Fri Oct 22, 2004 11:00 pm
Contact:

Re: Floppy disk controller results after a read instruction

Post by [AlAdDiN] »

-----------------------
There are 10 types of people in this world... those that understand binary, and those that don't.
Da_Maestro
Member
Member
Posts: 144
Joined: Tue Oct 26, 2004 11:00 pm
Location: Australia

Re: Floppy disk controller results after a read instruction

Post 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:
Two things are infinite: The universe and human stupidity. But I'm not quite sure about the universe.
--- Albert Einstein
[AlAdDiN]
Member
Member
Posts: 107
Joined: Fri Oct 22, 2004 11:00 pm
Contact:

Re: Floppy disk controller results after a read instruction

Post 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.
-----------------------
There are 10 types of people in this world... those that understand binary, and those that don't.
yohacin
Posts: 4
Joined: Thu Nov 04, 2004 12:00 am

Re: Floppy disk controller results after a read instruction

Post 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??
YIREO OS is BACK
yohacin
Posts: 4
Joined: Thu Nov 04, 2004 12:00 am

Re: Floppy disk controller results after a read instruction

Post 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.
YIREO OS is BACK
Da_Maestro
Member
Member
Posts: 144
Joined: Tue Oct 26, 2004 11:00 pm
Location: Australia

Re: Floppy disk controller results after a read instruction

Post 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
Two things are infinite: The universe and human stupidity. But I'm not quite sure about the universe.
--- Albert Einstein
frizzz
Member
Member
Posts: 36
Joined: Sat Oct 30, 2004 11:00 pm
Location: Germany
Contact:

Re: Floppy disk controller results after a read instruction

Post 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]
Post Reply