- state = inb(base + PORT_MAINSTATUS);
- if ((state & 0xC0) == 0x80)
- {
- outb(base + PORT_DATA, byte);
- return;
- }
- inb(0x80); //Delay
+ #if 0 && DEBUG
+ static int totalTimeout = 0;
+ static int totalCount = 0;
+ totalTimeout += timeout;
+ totalCount ++;
+ LOG("timeout = %i, average %i", timeout, totalTimeout/totalCount);
+ #endif
+ outb(base + PORT_DATA, byte);
+ }
+ else
+ {
+ Log_Warning("FDD", "FDD_int_SendByte: Timeout sending byte 0x%x to base 0x%x\n", byte, base);