Clear DRQ line or NDMA mode bit if write command fails due to write protected

media (fixes SF bug #1338).
This commit is contained in:
Volker Ruppert 2017-02-10 21:28:05 +00:00
parent 0d3b5a129c
commit 72b2de2799

View File

@ -1403,6 +1403,11 @@ Bit16u bx_floppy_ctrl_c::dma_read(Bit8u *buffer, Bit16u maxlen)
BX_FD_THIS s.status_reg1 = 0x27; // 0010 0111
// ST2: CRCE=1, SERR=1, BCYL=1, NDAM=1.
BX_FD_THIS s.status_reg2 = 0x31; // 0011 0001
if (!(BX_FD_THIS s.main_status_reg & FD_MS_NDMA)) {
DEV_dma_set_drq(FLOPPY_DMA_CHAN, 0);
} else {
BX_FD_THIS s.main_status_reg &= ~FD_MS_NDMA;
}
enter_result_phase();
return 1;
}