Page 1 of 1

why does bochs not call the interrupt!

Posted: Sun Aug 20, 2006 9:06 am
by earlz
well in my fdd driver I'm trying to make it work in bochs but on writes it neevr gives an interrupt; why!

Re:why does bochs not call the interrupt!

Posted: Sun Aug 20, 2006 10:20 am
by bluecode
Did you enable the interrupt in the PIC? Did you reset the fdc controller (perhaps the previous code did not catch an interrupt appropriatly)? Did you set the IRQ/DMA enable bit in the DOR (There's iirc also a bit in read/write sector commands which enables/disables DMA/IRQ)? Do you send an sense interrupt status command when needed?

Re:why does bochs not call the interrupt!

Posted: Sun Aug 20, 2006 2:55 pm
by earlz
yes @all
it didn't need a sense interrupt it needed an interrupt to tell when its done writing but bochs never does this, everything else does but not bochs

it really screws up my attempts at error checking

Re:why does bochs not call the interrupt!

Posted: Mon Aug 21, 2006 9:18 am
by Pype.Clicker
that suggests me that you've been missing something important on your initialization code, making bochs completely miss the fact that you're waiting for an interrupt.

The ultimate silver bullet would be to run Bochs itself in a debugger, here, and to breakpoint on all floppy-related methods.

Re:why does bochs not call the interrupt!

Posted: Tue Aug 22, 2006 6:10 am
by Pyr0Mathic
well in my fdd driver I'm trying to make it work in bochs but on writes it neevr gives an interrupt; why!
Not sure about the floppy-drive, but whit the hdd (in PIO mode, not sure about DMA mode, but should be the same.) you need to do the following:
1. give the write command (first set sector/cylinder/etc, so other port's)
2. start writing to the hdd-buffer
3. then wait for an interupt

if you dont write the data to the hdd buffer no interupt will ever be send. so that might be the problem.

this is assuming you are able to read data from the floppy drive? if you cant read whit interupts enabled, then i would first try to get that right.

Regards.
PyroMathic

Re:why does bochs not call the interrupt!

Posted: Tue Aug 22, 2006 6:55 am
by bluecode
You might want to post some code or you might want to change the bochs log options for the fdd, so that bochs reports everything related to the fdd. Then you could compare the bochs output to your code.