mist: think I have IIc support straightened out
This commit is contained in:
parent
6b3f31412c
commit
72ea4da48e
|
@ -17,33 +17,18 @@ mist_link_book:
|
||||||
|
|
||||||
skip_turn_off_music:
|
skip_turn_off_music:
|
||||||
|
|
||||||
; load sound effect into language card
|
; load link noise if IIc
|
||||||
; do this late as IIc mockingboard support messes with language card
|
; we have to load it late due to IIc needing ROM copy in AUX
|
||||||
|
; until done playing music
|
||||||
|
; this makes an awkward pause but seems best compromise
|
||||||
|
|
||||||
; update sound status
|
lda APPLEII_MODEL
|
||||||
lda SOUND_STATUS
|
cmp #'C'
|
||||||
and #SOUND_IN_LC
|
bne link_noise_already_loaded
|
||||||
beq skip_load_linking_noise
|
|
||||||
|
|
||||||
; load sounds into LC
|
jsr load_linking_noise
|
||||||
|
link_noise_already_loaded:
|
||||||
|
|
||||||
; 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
|
||||||
|
|
||||||
|
|
|
@ -194,10 +194,17 @@ ssi_not_found:
|
||||||
|
|
||||||
|
|
||||||
mockingboard_notfound:
|
mockingboard_notfound:
|
||||||
|
|
||||||
|
|
||||||
done_setup_sound:
|
done_setup_sound:
|
||||||
|
|
||||||
|
|
||||||
|
lda APPLEII_MODEL
|
||||||
|
cmp #'C'
|
||||||
|
beq link_noise_not_yet
|
||||||
|
|
||||||
|
jsr load_linking_noise
|
||||||
|
link_noise_not_yet:
|
||||||
|
|
||||||
|
|
||||||
;==========================
|
;==========================
|
||||||
; wait a bit at text title
|
; wait a bit at text title
|
||||||
;==========================
|
;==========================
|
||||||
|
@ -324,19 +331,19 @@ cyan_title_nomb:
|
||||||
; First
|
; First
|
||||||
ldx #<cyan1_lzsa
|
ldx #<cyan1_lzsa
|
||||||
ldy #>cyan1_lzsa
|
ldy #>cyan1_lzsa
|
||||||
lda #20
|
lda #5
|
||||||
jsr draw_and_wait
|
jsr draw_and_wait
|
||||||
|
|
||||||
; Second
|
; Second
|
||||||
ldx #<cyan2_lzsa
|
ldx #<cyan2_lzsa
|
||||||
ldy #>cyan2_lzsa
|
ldy #>cyan2_lzsa
|
||||||
lda #20
|
lda #5
|
||||||
jsr draw_and_wait
|
jsr draw_and_wait
|
||||||
|
|
||||||
; Third
|
; Third
|
||||||
ldx #<cyan3_lzsa
|
ldx #<cyan3_lzsa
|
||||||
ldy #>cyan3_lzsa
|
ldy #>cyan3_lzsa
|
||||||
lda #40
|
lda #30
|
||||||
jsr draw_and_wait
|
jsr draw_and_wait
|
||||||
cyan_title_done:
|
cyan_title_done:
|
||||||
|
|
||||||
|
@ -539,6 +546,17 @@ written_no_speech:
|
||||||
lda #50
|
lda #50
|
||||||
jsr draw_and_wait
|
jsr draw_and_wait
|
||||||
|
|
||||||
|
;================================
|
||||||
|
; shut off speech if still going
|
||||||
|
;================================
|
||||||
|
|
||||||
|
lda SOUND_STATUS
|
||||||
|
and #SOUND_SSI263
|
||||||
|
beq no_not_speeking
|
||||||
|
|
||||||
|
jsr ssi263_speech_shutdown
|
||||||
|
no_not_speeking:
|
||||||
|
|
||||||
|
|
||||||
done_intro:
|
done_intro:
|
||||||
|
|
||||||
|
@ -579,7 +597,6 @@ game_loop:
|
||||||
;=================
|
;=================
|
||||||
; reset things
|
; reset things
|
||||||
;=================
|
;=================
|
||||||
|
|
||||||
lda #0
|
lda #0
|
||||||
sta IN_SPECIAL
|
sta IN_SPECIAL
|
||||||
sta IN_RIGHT
|
sta IN_RIGHT
|
||||||
|
@ -787,7 +804,7 @@ get_mist_book:
|
||||||
|
|
||||||
jsr decompress_lzsa2_fast
|
jsr decompress_lzsa2_fast
|
||||||
|
|
||||||
; re-enable interrupts as SSI code probably broke things
|
; re-enable interrupts as SSI code probably broke things
|
||||||
|
|
||||||
jsr mockingboard_init
|
jsr mockingboard_init
|
||||||
jsr reset_ay_both
|
jsr reset_ay_both
|
||||||
|
@ -896,3 +913,34 @@ set_inverse:
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
load_linking_noise:
|
||||||
|
; 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:
|
||||||
|
rts
|
||||||
|
|
|
@ -82,6 +82,8 @@ ssi263_speech_init:
|
||||||
ssi263_speech_shutdown:
|
ssi263_speech_shutdown:
|
||||||
sei
|
sei
|
||||||
|
|
||||||
|
jsr ssi263_disable
|
||||||
|
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
|
||||||
|
@ -193,6 +195,27 @@ no_oflo:
|
||||||
|
|
||||||
speech_end:
|
speech_end:
|
||||||
|
|
||||||
|
jsr ssi263_disable
|
||||||
|
|
||||||
|
end_interrupt:
|
||||||
|
|
||||||
|
pla
|
||||||
|
tay ; restore Y
|
||||||
|
pla
|
||||||
|
tax ; restore X
|
||||||
|
|
||||||
|
pla ; restore A
|
||||||
|
|
||||||
|
ssi_interrupt_smc:
|
||||||
|
lda $45 ; restore A (II+/IIe)
|
||||||
|
|
||||||
|
plp ; restore flags
|
||||||
|
|
||||||
|
rti ; return from interrupt
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
ssi263_disable:
|
||||||
; If at the end, turn everything off
|
; If at the end, turn everything off
|
||||||
|
|
||||||
; Toggle CTL while DR set to disable A/!R
|
; Toggle CTL while DR set to disable A/!R
|
||||||
|
@ -220,21 +243,8 @@ speech_end:
|
||||||
ldx #VIA6522_IER2
|
ldx #VIA6522_IER2
|
||||||
jsr ssi263_write_chip
|
jsr ssi263_write_chip
|
||||||
|
|
||||||
end_interrupt:
|
rts
|
||||||
|
|
||||||
pla
|
|
||||||
tay ; restore Y
|
|
||||||
pla
|
|
||||||
tax ; restore X
|
|
||||||
|
|
||||||
pla ; restore A
|
|
||||||
|
|
||||||
ssi_interrupt_smc:
|
|
||||||
lda $45 ; restore A (II+/IIe)
|
|
||||||
|
|
||||||
plp ; restore flags
|
|
||||||
|
|
||||||
rti ; return from interrupt
|
|
||||||
|
|
||||||
speech_busy: .byte $00
|
speech_busy: .byte $00
|
||||||
speech_playing: .byte $00
|
speech_playing: .byte $00
|
||||||
|
|
Loading…
Reference in New Issue