From 48600b0595c6104b1afc96b87a570e99dc0ce69e Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Fri, 21 Mar 2025 14:59:20 +0100 Subject: title: Fix toggle with the Select button MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes: b3cb545c6ebc ("player: Update its sprites on heading and throttle") Signed-off-by: Miquel Sabaté Solà --- src/title.s | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/title.s b/src/title.s index 40b9352..1c4b361 100644 --- a/src/title.s +++ b/src/title.s @@ -61,24 +61,26 @@ @check_select: lda #Joypad::BUTTON_SELECT and Joypad::zp_buttons1 - beq @check_start + bne @do_select + ;; If none of the above has been pressed, our only possibility is the + ;; start button. If that's the case, jump there, otherwise quit. + lda #Joypad::BUTTON_START + and Joypad::zp_buttons1 + beq @end + JAL start + + @do_select: lda #SPRITE_Y_POSITION0 cmp $200 beq @down sta $200 - jmp @set_timer_and_end + bne @set_timer_and_end @down: lda #SPRITE_Y_POSITION1 sta $200 - @check_start: - lda #Joypad::BUTTON_START - and Joypad::zp_buttons1 - beq @end - JAL start - @set_timer_and_end: lda #TIMER_INIT_VALUE sta zp_title_timer -- cgit v1.2.3