Skip to content
Snippets Groups Projects
Commit 3d32104f authored by John Hodge's avatar John Hodge
Browse files

Modules/FDD - Trying to fix fdd behavior

parent 1474ce5c
Branches
Tags
No related merge requests found
...@@ -712,6 +712,7 @@ int FDD_int_SendByte(int base, Uint8 byte) ...@@ -712,6 +712,7 @@ int FDD_int_SendByte(int base, Uint8 byte)
if( inb(base + PORT_MAINSTATUS) & 0x40 ) { if( inb(base + PORT_MAINSTATUS) & 0x40 ) {
Log_Warning("FDD", "FDD_int_SendByte: DIO set, is this ok?"); Log_Warning("FDD", "FDD_int_SendByte: DIO set, is this ok?");
return -2;
} }
if( now() < end ) if( now() < end )
...@@ -740,6 +741,7 @@ int FDD_int_GetByte(int base, Uint8 *value) ...@@ -740,6 +741,7 @@ int FDD_int_GetByte(int base, Uint8 *value)
if( !(inb(base + PORT_MAINSTATUS) & 0x40) ) { if( !(inb(base + PORT_MAINSTATUS) & 0x40) ) {
Log_Warning("FDD", "FDD_int_GetByte: DIO unset, is this ok?"); Log_Warning("FDD", "FDD_int_GetByte: DIO unset, is this ok?");
return -2;
} }
if( now() < end ) if( now() < end )
...@@ -842,11 +844,13 @@ int FDD_Reset(int id) ...@@ -842,11 +844,13 @@ int FDD_Reset(int id)
// Recalibrate disks // Recalibrate disks
LOG("Recalibrate disks (16x seek)"); LOG("Recalibrate disks (16x seek)");
retries = 16; retries = 16;
while(FDD_int_SeekTrack(0, 0, 1) == 0 && retries --); // set track while(FDD_int_SeekTrack(0, 0, 1) == 0 && retries --)
Threads_Yield(); // set track
if(retries < 0) LEAVE_RET('i', -1); if(retries < 0) LEAVE_RET('i', -1);
retries = 16; retries = 16;
while(FDD_int_SeekTrack(0, 1, 1) == 0 && retries --); // set track while(FDD_int_SeekTrack(0, 1, 1) == 0 && retries --)
Threads_Yield(); // set track
if(retries < 0) LEAVE_RET('i', -1); if(retries < 0) LEAVE_RET('i', -1);
LOG("Recalibrating Disk"); LOG("Recalibrating Disk");
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment