Return IDE status as busy when drive is held in reset. Fixes hard drive issues on MegaPC.

This commit is contained in:
SarahW 2017-02-01 19:59:57 +00:00
commit 4a36365044

View file

@ -1093,6 +1093,14 @@ void writeide(int ide_board, uint16_t addr, uint8_t val)
ide->atastat = ide_other->atastat = BUSY_STAT;
// pclog("IDE Reset %i\n", ide_board);
}
if (val & 4)
{
/*Drive held in reset*/
timer_process();
idecallback[ide_board] = 0;
timer_update_outstanding();
ide->atastat = ide_other->atastat = BUSY_STAT;
}
ide->fdisk = ide_other->fdisk = val;
ide_irq_update(ide);
return;