From 8454eb6fcb30cddddfaf3b94a3618fe45ebd2c41 Mon Sep 17 00:00:00 2001 From: ksherlock Date: Sat, 16 Mar 2024 11:59:12 -0400 Subject: apple/apple2gs.cpp: Fixed c000_r to return joystick button states in bit 7 (fixes MT08736). (#12139) --- src/mame/apple/apple2gs.cpp | 8 ++++---- 1 file 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; -- cgit v1.2.3