Hi, This is My Floppy Driver. I need corection Since the working function is only the Motor On/Off. Thanks.
Posted on 2003-12-09 22:07:49 by realvampire
Too many errors to mention all here:

Some of them:

->After "Seek" you must do "Sense Interupt" status command

->If Seek fails you must Recalibrate (twice on some drives) since you do not know where the head is located, BTW recalibrate also needs Sense Interupt

I love the "allmost finished" info at startup :grin:
Posted on 2003-12-09 23:40:37 by BogdanOntanu

I love the "allmost finished" info at startup :grin:



Ahumm...,:grin: :o :tongue: .

OK I try it now. Thanks.
Posted on 2003-12-10 00:33:27 by realvampire
I have try it to here. Whats next and what is Wrong?




Call FDC_Specify
call FDC_Sense_Interupt
call FDC_Recalibrate

; 2. Perform seek Operation
pushad
push [ebp+4] ;Drive
push [ebp+8] ; Track
add ebp,#64
call FDC_Seek
popad
call FDC_Sense_Interupt

Posted on 2003-12-15 03:55:12 by realvampire
I do not know what :

"FDC_Specify"
"FDC_Sense_Interupt"
"FDC_Recalibrate"
"FDC_Seek"

procedures called there really do...

But i do know that you should only call Sense Interupt after and IRQ6 has arrived
and you should have a valid IRQ6 handler somewhere in there ... that IRQ handler should at least setup a flag like "interupt was here", or LilyAnne was here to make a joke....

You should wait for that flag to get signalized before calling SENSEI...
IMHO bluntly calling SENSEI just after the command phase of Seek/Recalibrate will just confuse the FDC :grin:

Interaction with FDC has its rules, you are not allowed to ask it whatever you want whenever you want to :P

(well to be honest you could use NON Interupt and NON DMA modes for FDC, in pooling mode but i doubt you want that or understand how to do that)

Also i find it very hard to read your code in the parts that deal with sending parameter relative to ebp.
I prefer to read clear LOCAL variables than to do the arithmetic myself (i am not good at counting with my fingers)

I assume that is because you use your own assembler and it is not able to handle LOCAL varisables and ARG stack parameters?

Whatever it is... i find it very hard to read your parameters and i can not check if they are ok (or actually i am too lazy to do the arithmetics myself)..

so if there is an error in the parameters transfer code...you are on your own
Posted on 2003-12-15 04:26:48 by BogdanOntanu

I do not know what :

(well to be honest you could use NON Interupt and NON DMA modes for FDC, in pooling mode but i doubt you want that or understand how to do that)



Yes. can you give me a link for this?. Or a Article?



But i do know that you should only call Sense Interupt after and IRQ6 has arrived


From which port IRQ6 is signed?
Posted on 2003-12-15 17:09:05 by realvampire
Here is the File. But it confuse me. I hope there would be someone Hash-ing it.
Posted on 2003-12-19 21:55:04 by realvampire
Hehe
That is Charles Moore's COLOR FORTH's boot :grin:
And indeed trying to use FDC without Interupts :D
Posted on 2003-12-20 08:43:21 by BogdanOntanu
Yes it is,
he is trying? you mean it not working? I think it is the only one FDC source code without interrupt available on The net.
Posted on 2003-12-21 00:11:39 by realvampire
Heh.... well, i do not know if he did succeed

I remember i did it for SolOS in it's initial stages and it was working ok
I recall i wanted to send it to Charles but i think i just forgot to do this (uncertain now) .... Damn stupid i am ;)

However there is little use for this in a real PC because the IRQ6 and DMA2 are hardware wired to FDC controller and not using Interupts/DMA brings you no advantage at all , actually you are waisting and IRQ and a DMA channel
---
well it might be a little simpler and a good tutorial to understand FDC, also might be usefull on a custon design machine without IRQ's
-- but that is all

In the end, on a PC i see little use for non IRQ / non DMA FDC driver
; it also has some subtle problems at the end of operations, becaus eyou do not have the IRQ to signal that to you so on error you might get the FDC controller in an wrong state
Posted on 2003-12-21 06:57:13 by BogdanOntanu