mirror of
https://github.com/deater/dos33fsprogs.git
synced 2024-06-13 03:29:32 +00:00
mist: have IIc mockingboard support in theory working
This commit is contained in:
parent
c508b0d3cd
commit
6b3f31412c
|
@ -8,12 +8,43 @@ mist_link_book:
|
||||||
and #SOUND_MOCKINGBOARD
|
and #SOUND_MOCKINGBOARD
|
||||||
beq skip_turn_off_music
|
beq skip_turn_off_music
|
||||||
|
|
||||||
sei ; disable interrupts
|
; disable interrupts
|
||||||
|
jsr mockingboard_disable_interrupt
|
||||||
|
|
||||||
|
sei
|
||||||
|
|
||||||
jsr clear_ay_both
|
jsr clear_ay_both
|
||||||
|
|
||||||
skip_turn_off_music:
|
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+1
|
||||||
|
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
|
; clear screen
|
||||||
|
|
||||||
lda #0
|
lda #0
|
||||||
|
|
|
@ -104,33 +104,13 @@ yes_language_card:
|
||||||
ora #SOUND_IN_LC
|
ora #SOUND_IN_LC
|
||||||
sta SOUND_STATUS
|
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+1
|
|
||||||
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:
|
no_language_card:
|
||||||
|
|
||||||
;===================================
|
;===================================
|
||||||
; Setup Mockingboard
|
; Setup Mockingboard
|
||||||
;===================================
|
;===================================
|
||||||
|
|
||||||
PT3_ENABLE_APPLEIIC = 1
|
PT3_ENABLE_APPLE_IIC = 1
|
||||||
|
|
||||||
lda #0
|
lda #0
|
||||||
sta DONE_PLAYING
|
sta DONE_PLAYING
|
||||||
|
@ -811,7 +791,11 @@ get_mist_book:
|
||||||
|
|
||||||
jsr mockingboard_init
|
jsr mockingboard_init
|
||||||
jsr reset_ay_both
|
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
|
jsr pt3_init_song
|
||||||
|
|
||||||
|
@ -911,3 +895,4 @@ set_inverse:
|
||||||
|
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -34,10 +34,17 @@
|
||||||
|
|
||||||
mockingboard_detect:
|
mockingboard_detect:
|
||||||
|
|
||||||
; activate IIc mockingboard?
|
; activate Mockingboard IIc
|
||||||
; this might only be necessary to allow detection
|
; + the Mockingboard has to take over Slot#4 (IIc has no slots)
|
||||||
; I get the impression the Mockingboard 4c activates
|
; in theory any write to the firmware area in $C400 will
|
||||||
; when you access any of the 6522 ports in Slot 4
|
; 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
|
.ifdef PT3_ENABLE_APPLE_IIC
|
||||||
lda APPLEII_MODEL
|
lda APPLEII_MODEL
|
||||||
|
@ -46,10 +53,10 @@ mockingboard_detect:
|
||||||
|
|
||||||
lda #$ff
|
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_DDRA1 ; $C403
|
||||||
sta MOCK_6522_T1CL
|
sta MOCK_6522_T1CL ; $C404
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
not_iic:
|
not_iic:
|
||||||
|
|
|
@ -182,8 +182,6 @@ mockingboard_setup_interrupt:
|
||||||
|
|
||||||
sei ; disable interrupts
|
sei ; disable interrupts
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
copy_rom_loop:
|
copy_rom_loop:
|
||||||
lda $c089 ; read ROM, write RAM1
|
lda $c089 ; read ROM, write RAM1
|
||||||
lda $c089
|
lda $c089
|
||||||
|
@ -214,11 +212,12 @@ write_rom_loop:
|
||||||
lda #>interrupt_handler
|
lda #>interrupt_handler
|
||||||
sta $ffff
|
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
|
||||||
sta interrupt_smc+1
|
sta interrupt_smc+1
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
done_iic_hack:
|
done_iic_hack:
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user