From 4e4736a19a67af9655fb624d105445dda24fa5ec Mon Sep 17 00:00:00 2001 From: Vince Weaver Date: Fri, 17 Jul 2020 14:26:51 -0400 Subject: [PATCH] mist: let ^T toggle sound --- mist/common_routines.inc | 18 +++++++++--------- mist/keyboard.s | 18 ++++++++++++++++++ 2 files changed, 27 insertions(+), 9 deletions(-) diff --git a/mist/common_routines.inc b/mist/common_routines.inc index 2957ff80..3dc09d77 100644 --- a/mist/common_routines.inc +++ b/mist/common_routines.inc @@ -38,17 +38,17 @@ psc_smc2 =$19d3 ; keyboard.s handle_keypress =$1a54 -change_direction =$1afc -change_location =$1b35 +change_direction =$1b16 +change_location =$1b4f ; text_print.s -move_and_print =$1bcd -ps_smc1 =$1bfa +move_and_print =$1be7 +ps_smc1 =$1c14 ; page_sprites.inc -blue_page_sprite =$1ce2 -red_page_sprite =$1cf8 -white_page_sprite =$1d0e -blue_page_small_sprite =$1d24 -red_page_small_sprite =$1d2c +blue_page_sprite =$1cfc +red_page_sprite =$1d12 +white_page_sprite =$1d28 +blue_page_small_sprite =$1d3e +red_page_small_sprite =$1d46 diff --git a/mist/keyboard.s b/mist/keyboard.s index 0798c463..449cbf6b 100644 --- a/mist/keyboard.s +++ b/mist/keyboard.s @@ -12,6 +12,24 @@ handle_keypress: keypress: and #$7f ; clear high bit +check_sound: + cmp #$14 ; control-T + bne check_joystick + + lda SOUND_STATUS + eor #SOUND_DISABLED + sta SOUND_STATUS + jmp done_keypress + +check_joystick: + cmp #$A ; control-J + bne check_load + + lda JOYSTICK_ENABLED + eor #1 + sta JOYSTICK_ENABLED + jmp done_keypress + check_load: cmp #$C ; control-L bne check_save