IDE drives now return BUSY status in reset mode, and AT MFM and ESDI controllers now return the READY bit in the status register set also for the first sector of the WRITE command, fixes #1281.
This commit is contained in:
@@ -328,7 +328,7 @@ esdi_write(uint16_t port, uint8_t val, void *priv)
|
||||
esdi->command &= ~0x03;
|
||||
if (val & 0x02)
|
||||
fatal("Write with ECC\n");
|
||||
esdi->status = STAT_DRQ | STAT_DSC;
|
||||
esdi->status = STAT_READY | STAT_DRQ | STAT_DSC;
|
||||
esdi->pos = 0;
|
||||
break;
|
||||
|
||||
|
@@ -1338,6 +1338,20 @@ ide_write_devctl(uint16_t addr, uint8_t val, void *priv)
|
||||
ide->sc->callback = 0.0;
|
||||
ide_set_callback(ide, 0.0);
|
||||
ide_set_callback(ide_other, 0.0);
|
||||
|
||||
/* We must set set the status to busy in reset mode or
|
||||
some 286 and 386 machines error out. */
|
||||
if (ide->type != IDE_NONE) {
|
||||
ide->atastat = BSY_STAT;
|
||||
if (ide->type == IDE_ATAPI)
|
||||
ide->sc->status = BSY_STAT;
|
||||
}
|
||||
|
||||
if (ide_other->type != IDE_NONE) {
|
||||
ide_other->atastat = BSY_STAT;
|
||||
if (ide_other->type == IDE_ATAPI)
|
||||
ide_other->sc->status = BSY_STAT;
|
||||
}
|
||||
} else if (!(val & 4) && (ide->fdisk & 4)) {
|
||||
/* Reset toggled from 1 to 0. */
|
||||
if (!(ch & 1)) {
|
||||
|
@@ -125,7 +125,7 @@ static void mfm_write(uint16_t port, uint8_t val, void *priv);
|
||||
|
||||
|
||||
#ifdef ENABLE_ST506_AT_LOG
|
||||
int mfm_at_do_log = ENABLE_ST506_AT_LOG;
|
||||
int st506_at_do_log = ENABLE_ST506_AT_LOG;
|
||||
|
||||
|
||||
static void
|
||||
@@ -305,7 +305,7 @@ mfm_cmd(mfm_t *mfm, uint8_t val)
|
||||
mfm->command &= 0xfc;
|
||||
if (val & 2)
|
||||
fatal("WD1003: WRITE with ECC\n");
|
||||
mfm->status = STAT_DRQ|STAT_DSC;
|
||||
mfm->status = STAT_READY|STAT_DRQ|STAT_DSC;
|
||||
mfm->pos = 0;
|
||||
break;
|
||||
|
||||
|
Reference in New Issue
Block a user