diff --git a/mist/link_book_mist_dock.s b/mist/link_book_mist_dock.s index 5b8b8860..9e3f7377 100644 --- a/mist/link_book_mist_dock.s +++ b/mist/link_book_mist_dock.s @@ -4,11 +4,13 @@ mist_link_book: ; turn off music -sei_smc: + lda SOUND_STATUS + and #SOUND_MOCKINGBOARD + beq skip_turn_off_music + sei - jsr clear_ay_both - +skip_turn_off_music: ; clear screen diff --git a/mist/mist_title.s b/mist/mist_title.s index 0879c225..fe759059 100644 --- a/mist/mist_title.s +++ b/mist/mist_title.s @@ -105,6 +105,10 @@ no_language_card: mockingboard_found: ; jsr mockingboard_patch ; patch to work in slots other than 4? + lda SOUND_STATUS + ora #SOUND_MOCKINGBOARD + sta SOUND_STATUS + ;======================= ; Set up 50Hz interrupt ;======================== @@ -129,11 +133,6 @@ mockingboard_found: mockingboard_notfound: - ; patch out cli/sei calls - - lda #$EA - sta cli_smc - sta sei_smc done_setup_sound: @@ -520,8 +519,13 @@ done_keyloop: get_mist_book: -cli_smc: + ; play music if mockingboard + + lda SOUND_STATUS + and #SOUND_MOCKINGBOARD + beq skip_start_music cli +skip_start_music: lda #TITLE_BOOK_CLOSED sta LOCATION diff --git a/mist/zp.inc b/mist/zp.inc index eebed978..4ed3e831 100644 --- a/mist/zp.inc +++ b/mist/zp.inc @@ -64,17 +64,7 @@ ENVELOPE_SHAPE = $7D PATTERN_L = $7E PATTERN_H = $7F -ORNAMENT_L = $D0 -ORNAMENT_H = $D1 -SAMPLE_L = $D2 -SAMPLE_H = $D3 -LOOP = $D4 -MB_VALUE = $D5 -MB_ADDR_L = $D6 -MB_ADDR_H = $D7 -DONE_PLAYING = $D8 -DONE_SONG = $D9 -PT3_TEMP = $DA +; note: rest are up at $d0 ; We have to save/restore the following values @@ -248,11 +238,25 @@ END_OF_SAVE = $C9 ; done game puzzle state +; rest of pt3_player +ORNAMENT_L = $D0 +ORNAMENT_H = $D1 +SAMPLE_L = $D2 +SAMPLE_H = $D3 +LOOP = $D4 +MB_VALUE = $D5 +MB_ADDR_L = $D6 +MB_ADDR_H = $D7 +DONE_PLAYING = $D8 +DONE_SONG = $D9 +PT3_TEMP = $DA + JOYSTICK_ENABLED= $DD SOUND_STATUS = $DE SOUND_DISABLED = $80 SOUND_IN_LC = $01 ; $01 sound effects in language card + SOUND_MOCKINGBOARD = $02 ; mockingboard detected GRID_PAGE = $DF ANIMATE_FRAME = $E0