mist: let ^T toggle sound

This commit is contained in:
Vince Weaver 2020-07-17 14:26:51 -04:00
parent 4f819068f6
commit 4e4736a19a
2 changed files with 27 additions and 9 deletions

View File

@ -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

View File

@ -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