i got your floppy driver right here.....

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
ncsu121978

i got your floppy driver right here.....

Post by ncsu121978 »

[attachment deleted by admin]
ncsu121978

Re:i got your floppy driver right here.....

Post by ncsu121978 »

just wanted to know if anyone has found it useful ?
or if anyone else has gotten it to work or has had trouble with it ?
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:i got your floppy driver right here.....

Post by Pype.Clicker »

it seems fine, but i didn't found the time to test it in my OS already ...
anyway, it seems there's a missing stuff with include files (io.h, common_types.h, etc )
Tom

Re:i got your floppy driver right here.....

Post by Tom »

I might test it when I get my IDT working and my C++ kernel out the door ( changed plans... C++ first with a better printf and THEN a IDT. )
ncsu121978

Re:i got your floppy driver right here.....

Post by ncsu121978 »

you should have a working idt tom since you kept emailing me asking me for my code and i finally sent it to you
Tom

Re:i got your floppy driver right here.....

Post by Tom »

That's the one I'm about to test tonight! ;)
Zi

Re:i got your floppy driver right here.....

Post by Zi »

[attachment deleted by admin]
Zi

Re:i got your floppy driver right here.....

Post by Zi »

So what's the problem ncsu121978 ?????
ncsu121978

Re:i got your floppy driver right here.....

Post by ncsu121978 »

well you can tell me what it is doing (or not doing as the case may be).....b/c i am honestly not going to look through all those source files you put in that zip.

make sure you have interrupts enabled....
make sure you run floppy_init() somewhere before you try to use it.
make sure you install the floppy interrupt which is IRQ6 and from within the isr call the floppy_interrupt_handler().....because the init function doesnt install a handler for you.....either install the handler to be this function, or call this function from your own handler
Zi

Re:i got your floppy driver right here.....

Post by Zi »

I've putted the right functions in the interrupt handler. The floppy drive stops after 2 seconds (so that's ok). I'm trying to read a sector by :

y=(char*) kmalloc(512*sizeof(char));
floppy_read_block(0,1,y);

And there, there is nothing at y...
More;, I've found that the int floppy_getbyte() always returns -1 !!!
ncsu121978

Re:i got your floppy driver right here.....

Post by ncsu121978 »

make sure you set all the timeout values according to your timer interrupt frequency
right now mine runs at 100 Hz so alot of the values i set depend on that
also the getbyte always returning -1 means that the function timed-out before there was a byte to read....again this might have something to do with your timer running at a different frequency then mine
Zi

Re:i got your floppy driver right here.....

Post by Zi »

It doesn't work again... I've putted the same frequency as you, and putted all like in your OS, but floppy_getbyte() returns -1 again... Or do you have some documentation to make floppy drivers ?
Post Reply