diff options
| author | 2024-03-16 11:59:12 -0400 | |
|---|---|---|
| committer | 2024-03-17 02:59:12 +1100 | |
| commit | 8454eb6fcb30cddddfaf3b94a3618fe45ebd2c41 (patch) | |
| tree | 0be3c70117de054f3045da0e3f1545ef10004c75 | |
| parent | 38c63b2567b0f1f3aadfc88ce4fbf5e7c909f712 (diff) | |
apple/apple2gs.cpp: Fixed c000_r to return joystick button states in bit 7 (fixes MT08736). (#12139)
| -rw-r--r-- | src/mame/apple/apple2gs.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mame/apple/apple2gs.cpp b/src/mame/apple/apple2gs.cpp index 272dea42b08..9895d9dd301 100644 --- a/src/mame/apple/apple2gs.cpp +++ b/src/mame/apple/apple2gs.cpp @@ -1681,18 +1681,18 @@ u8 apple2gs_state::c000_r(offs_t offset) return read_floatingbus(); case 0x60: // button 3 on IIgs - return m_gameio->sw3_r() | uFloatingBus7; + return (m_gameio->sw3_r() ? 0x80 : 0x00) | uFloatingBus7; case 0x61: // button 0 or Open Apple // HACK/TODO: the 65816 loses a race to the microcontroller on reset if (m_adb_reset_freeze > 0) m_adb_reset_freeze--; - return m_gameio->sw0_r() | uFloatingBus7 | ((m_adb_p3_last & 0x20) ? 0x80 : 0); + return ((m_gameio->sw0_r() || (m_adb_p3_last & 0x20)) ? 0x80 : 0) | uFloatingBus7; case 0x62: // button 1 or Option - return m_gameio->sw1_r() | uFloatingBus7 | ((m_adb_p3_last & 0x10) ? 0x80 : 0); + return ((m_gameio->sw1_r() || (m_adb_p3_last & 0x10)) ? 0x80 : 0) | uFloatingBus7; case 0x63: // button 2 or SHIFT key - return m_gameio->sw2_r() | uFloatingBus7; + return (m_gameio->sw2_r() ? 0x80 : 0x00) | uFloatingBus7; case 0x64: // joy 1 X axis if (!m_gameio->is_device_connected()) return 0x80 | uFloatingBus7; |
