wd_fdc.cpp honor write protection (nw)

This commit is contained in:
MetalliC 2020-06-02 13:58:57 +03:00
parent 5d4b8530d1
commit 28108a27b9

View File

@ -784,6 +784,12 @@ void wd_fdc_device_base::write_track_continue()
case SETTLE_DONE:
LOGSTATE("SETTLE_DONE\n");
if (floppy && floppy->wpt_r()) {
LOGSTATE("WRITE_PROT\n");
status |= S_WP;
command_end();
return;
}
set_drq();
sub_state = DATA_LOAD_WAIT;
delay_cycles(t_gen, 192);
@ -890,6 +896,12 @@ void wd_fdc_device_base::write_sector_continue()
case SETTLE_DONE:
LOGSTATE("SETTLE_DONE\n");
if (floppy && floppy->wpt_r()) {
LOGSTATE("WRITE_PROT\n");
status |= S_WP;
command_end();
return;
}
sub_state = SCAN_ID;
counter = 0;
live_start(SEARCH_ADDRESS_MARK_HEADER);