From b3d27a1c5f2596fcf215e8ad72fa7654ff1df0d0 Mon Sep 17 00:00:00 2001 From: Olivier Galibert Date: Mon, 22 Feb 2021 21:57:47 +0100 Subject: iwm/swim1: correct sense value when drive is not connectd --- src/devices/machine/iwm.cpp | 2 +- src/devices/machine/swim1.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/devices/machine/iwm.cpp b/src/devices/machine/iwm.cpp index 312d381717d..4a300ecfb81 100644 --- a/src/devices/machine/iwm.cpp +++ b/src/devices/machine/iwm.cpp @@ -276,7 +276,7 @@ u8 iwm_device::control(int offset, u8 data) switch(m_control & 0xc0) { case 0x00: return m_active ? m_data : 0xff; - case 0x40: return (m_status & 0x7f) | ((m_floppy && m_floppy->wpt_r()) ? 0x80 : 0x00); + case 0x40: return (m_status & 0x7f) | ((!m_floppy || m_floppy->wpt_r()) ? 0x80 : 0x00); case 0x80: return m_whd; case 0xc0: if(offset & 1) { if(m_active) data_w(data); else mode_w(data); } return 0xff; } diff --git a/src/devices/machine/swim1.cpp b/src/devices/machine/swim1.cpp index c145cc4bdf7..34f8f554ec6 100644 --- a/src/devices/machine/swim1.cpp +++ b/src/devices/machine/swim1.cpp @@ -544,7 +544,7 @@ u8 swim1_device::iwm_control(int offset, u8 data) switch(m_iwm_control & 0xc0) { case 0x00: return m_iwm_active ? m_iwm_data : 0xff; - case 0x40: return (m_iwm_status & 0x7f) | ((m_floppy && m_floppy->wpt_r()) ? 0x80 : 0x00); + case 0x40: return (m_iwm_status & 0x7f) | ((!m_floppy || m_floppy->wpt_r()) ? 0x80 : 0x00); case 0x80: return m_iwm_whd; case 0xc0: if(offset & 1) { if(m_iwm_active) iwm_data_w(data); else iwm_mode_w(data); } return 0xff; } -- cgit v1.2.3