From f1d1d0efee9faa3067f7b0fc8b9a2aebb17f1ccd Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Sun, 8 Mar 2026 22:09:31 +0100 Subject: Support reading from the second controller MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miquel Sabaté Solà --- src/jetpac.s | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/jetpac.s') diff --git a/src/jetpac.s b/src/jetpac.s index 25fdf5a..5fdd01f 100644 --- a/src/jetpac.s +++ b/src/jetpac.s @@ -125,8 +125,8 @@ ;; variables defined before sta Globals::zp_flags sta Globals::zp_multiplayer - sta Joypad::zp_buttons1 - sta Joypad::zp_buttons2 + sta Joypad::zp_buttons + sta Joypad::zp_prev sta Player::zp_state ;; Initialize the level. We allow the build system to pass its own value for @@ -187,7 +187,11 @@ sta PPU::m_mask @main_game_loop: - READ_JOYPAD1 + ;; Select the joypad from the active player and read it. + lda Globals::zp_multiplayer + and #$01 + tax + READ_JOYPAD_X lda Globals::zp_flags and #%00000011 -- cgit v1.2.3