Floppy Disk Controller Question
Posted: Mon Mar 03, 2014 5:29 pm
So, I'm reading through the wiki and taking notes Floppy_Disk_Controller
and I've come to this part:
Status Register A - 0x3F0
Status Register B - 0x3F1
Main Status Register - 0x3F4
what order are they in when stated in above quote? I prefer not to assume and/or randomly test.
OR did I miss something?
and I've come to this part:
now I know the three status registers are (as listed in the wiki):Status Registers
There are 3 registers that hold information about the last error encountered. The st0 register information is passed back with the result bytes of most commands. The st1 and st2 information is returned in the result bytes of read/write commands. They can also be retrieved with a Dumpreg command.
st0
The top 2 bits (value = 0xC0) are set after a reset procedure, with polling on. Either bit being set at any other time is an error indication. Bit 5 (value = 0x20) is set after every Recalibrate, Seek, or an implied seek. The other bits are not useful.
st1
The st1 register provides more detail about errors during read/write operations.
Bit 7 (value = 0x80) is set if the floppy had too few sectors on it to complete a read/write. This is often caused by not subtracting 1 when setting the DMA byte count. Bit 4 (value = 0x10) is set if your driver is too slow to get bytes in or out of the FIFO port in time. Bit 1 (value = 2) is set if the media is write protected. The rest of the bits are for various types of data errors; indicating bad media, or a bad drive.
st2
The st2 register provides more (useless) detail about errors during read/write operations.
The bits all indicate various types of data errors for either bad media, or a bad drive.
Status Register A - 0x3F0
Status Register B - 0x3F1
Main Status Register - 0x3F4
what order are they in when stated in above quote? I prefer not to assume and/or randomly test.
OR did I miss something?