HOS wrote:
Aha! its amazing how we forget the little things when concentrating so hard on details... a simple call to eoi() enabled me to get results every time i sent a command. eoi() just sends 0x20 to 0x20. is this sufficient? also, it still seems that my readSector function is not working correctly. could be my dma initialization. could you confirm my numbers for floppy disks (of the 1.40 meg 3.5" variety):
head: 0 or 1
cylinder: 1 to 80
sector: 1 to 18
sectors per track: 18
this could also be causing me some problems...
No, from what I know that is not sufficient. You should send EOI to both PICs (0x20 and 0xA0). At least this is the way I have understood it.
The cylinder number should be 0 to 79.
In non-DMA, the interrupt should be triggered (once) when the drive has completed (when it is ready to send data).