diff options
author | MetalliC <0vetal0@gmail.com> | 2020-06-02 13:58:57 +0300 |
---|---|---|
committer | MetalliC <0vetal0@gmail.com> | 2020-06-02 13:58:57 +0300 |
commit | 28108a27b98bad1b266971ff1432be1710e47a2e (patch) | |
tree | 1815b4b1aac5e9f3db7a3443ddb870b0d6687957 /src/devices/machine | |
parent | 5d4b8530d126d52e5eec7306e62b6665b4c5ef20 (diff) |
wd_fdc.cpp honor write protection (nw)
Diffstat (limited to 'src/devices/machine')
-rw-r--r-- | src/devices/machine/wd_fdc.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/devices/machine/wd_fdc.cpp b/src/devices/machine/wd_fdc.cpp index 94bd7a1cdb7..4111c09d6a9 100644 --- a/src/devices/machine/wd_fdc.cpp +++ b/src/devices/machine/wd_fdc.cpp @@ -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); |