diff --git a/games/mist/link_book_mist_dock.s b/games/mist/link_book_mist_dock.s index 39835c3a..f84e4d9a 100644 --- a/games/mist/link_book_mist_dock.s +++ b/games/mist/link_book_mist_dock.s @@ -8,12 +8,43 @@ mist_link_book: and #SOUND_MOCKINGBOARD beq skip_turn_off_music - sei ; disable interrupts + ; disable interrupts + jsr mockingboard_disable_interrupt + + sei jsr clear_ay_both skip_turn_off_music: + ; load sound effect into language card + ; do this late as IIc mockingboard support messes with language card + + ; update sound status + lda SOUND_STATUS + and #SOUND_IN_LC + beq skip_load_linking_noise + + ; load sounds into LC + + ; read ram, write ram, use $d000 bank1 + bit $C08B + bit $C08B + + lda #linking_noise_compressed + sta getsrc_smc+2 + + lda #$D0 ; decompress to $D000 + + jsr decompress_lzsa2_fast + + ; read rom, nowrite, use $d000 bank1 + bit $C08A + +skip_load_linking_noise: + ; clear screen lda #0 diff --git a/games/mist/mist_title.s b/games/mist/mist_title.s index d224dc5b..989ae725 100644 --- a/games/mist/mist_title.s +++ b/games/mist/mist_title.s @@ -104,33 +104,13 @@ yes_language_card: ora #SOUND_IN_LC sta SOUND_STATUS - ; load sounds into LC - - ; read ram, write ram, use $d000 bank1 - bit $C08B - bit $C08B - - lda #linking_noise_compressed - sta getsrc_smc+2 - - lda #$D0 ; decompress to $D000 - - jsr decompress_lzsa2_fast - -blah: - - ; read rom, nowrite, use $d000 bank1 - bit $C08A - no_language_card: ;=================================== ; Setup Mockingboard ;=================================== -PT3_ENABLE_APPLEIIC = 1 +PT3_ENABLE_APPLE_IIC = 1 lda #0 sta DONE_PLAYING @@ -811,7 +791,11 @@ get_mist_book: jsr mockingboard_init jsr reset_ay_both - jsr mockingboard_setup_interrupt + +; jsr mockingboard_setup_interrupt + + ; to make it work on IIc? + jsr done_iic_hack jsr pt3_init_song @@ -911,3 +895,4 @@ set_inverse: rts + diff --git a/games/mist/pt3_lib_mockingboard_detect.s b/games/mist/pt3_lib_mockingboard_detect.s index 8b0857c5..248ec96d 100644 --- a/games/mist/pt3_lib_mockingboard_detect.s +++ b/games/mist/pt3_lib_mockingboard_detect.s @@ -34,10 +34,17 @@ mockingboard_detect: - ; activate IIc mockingboard? - ; this might only be necessary to allow detection - ; I get the impression the Mockingboard 4c activates - ; when you access any of the 6522 ports in Slot 4 + ; activate Mockingboard IIc + ; + the Mockingboard has to take over Slot#4 (IIc has no slots) + ; in theory any write to the firmware area in $C400 will + ; activate it, but that might not be fast enough when detecting + ; so writing $FF to $C403/$C404 is official way to enable + ; + Note this disables permanently the mouse firmware in $C400 + ; so "normal" interrupts are broken :( The hack to fix things + ; is to switch in RAM for $F000 and just replace the IRQ + ; vectors at $FFFE/$FFFF instead of $3FE/$3FF but that makes + ; it difficult if you actually wanted to use any + ; Applesoft/Monitor ROM routines .ifdef PT3_ENABLE_APPLE_IIC lda APPLEII_MODEL @@ -46,10 +53,10 @@ mockingboard_detect: lda #$ff - ; don't bother patching these, IIc mockingboard always slot 4? + ; don't bother patching these, IIc mockingboard always slot 4 - sta MOCK_6522_DDRA1 - sta MOCK_6522_T1CL + sta MOCK_6522_DDRA1 ; $C403 + sta MOCK_6522_T1CL ; $C404 .endif not_iic: diff --git a/games/mist/pt3_lib_mockingboard_setup.s b/games/mist/pt3_lib_mockingboard_setup.s index 89a4cac0..b94a29b5 100644 --- a/games/mist/pt3_lib_mockingboard_setup.s +++ b/games/mist/pt3_lib_mockingboard_setup.s @@ -182,8 +182,6 @@ mockingboard_setup_interrupt: sei ; disable interrupts - - copy_rom_loop: lda $c089 ; read ROM, write RAM1 lda $c089 @@ -214,11 +212,12 @@ write_rom_loop: lda #>interrupt_handler sta $ffff - lda #$EA ; nop out the "lda $45" in the irq handler + + ; nop out the "lda $45" in the irq handler + lda #$EA sta interrupt_smc sta interrupt_smc+1 .endif - done_iic_hack: