LOG("Sending command");
- //Threads_Wait(100); // Wait for Head to settle
- Time_Delay(100);
-
for( i = 0; i < FDD_MAX_READWRITE_ATTEMPTS; i ++ )
{
if( Write )
// Set Track in structure
gFDD_Devices[disk].track[head] = track;
+
+ // Wait for Head to settle
+// Threads_Wait(100);
+ Time_Delay(100);
+
return 1;
}
void FDD_SensInt(int base, Uint8 *sr0, Uint8 *cyl)
{
+ Uint8 byte;
FDD_int_SendByte(base, CHECK_INTERRUPT_STATUS);
- if(sr0) *sr0 = FDD_int_GetByte(base);
- else FDD_int_GetByte(base);
- if(cyl) *cyl = FDD_int_GetByte(base);
- else FDD_int_GetByte(base);
+ byte = FDD_int_GetByte(base);
+ if(sr0) *sr0 = byte;
+ byte = FDD_int_GetByte(base);
+ if(cyl) *cyl = byte;
}
/**
if( timeout >= 0 )
{
+ #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
if( timeout >= 0 )
{
+ #if 0 && DEBUG
+ static int totalTimeout = 0;
+ static int totalCount = 0;
+ totalTimeout += timeout;
+ totalCount ++;
+ LOG("timeout = %i, average %i", timeout, totalTimeout/totalCount);
+ #endif
return inb(base + PORT_DATA);
}
else