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:
|
||||
|
||||
; load sound effect into language card
|
||||
; do this late as IIc mockingboard support messes with language card
|
||||
; load link noise if IIc
|
||||
; 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 SOUND_STATUS
|
||||
and #SOUND_IN_LC
|
||||
beq skip_load_linking_noise
|
||||
lda APPLEII_MODEL
|
||||
cmp #'C'
|
||||
bne link_noise_already_loaded
|
||||
|
||||
; 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
|
||||
|
||||
|
|
|
@ -194,10 +194,17 @@ ssi_not_found:
|
|||
|
||||
|
||||
mockingboard_notfound:
|
||||
|
||||
|
||||
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
|
||||
;==========================
|
||||
|
@ -324,19 +331,19 @@ cyan_title_nomb:
|
|||
; First
|
||||
ldx #<cyan1_lzsa
|
||||
ldy #>cyan1_lzsa
|
||||
lda #20
|
||||
lda #5
|
||||
jsr draw_and_wait
|
||||
|
||||
; Second
|
||||
ldx #<cyan2_lzsa
|
||||
ldy #>cyan2_lzsa
|
||||
lda #20
|
||||
lda #5
|
||||
jsr draw_and_wait
|
||||
|
||||
; Third
|
||||
ldx #<cyan3_lzsa
|
||||
ldy #>cyan3_lzsa
|
||||
lda #40
|
||||
lda #30
|
||||
jsr draw_and_wait
|
||||
cyan_title_done:
|
||||
|
||||
|
@ -539,6 +546,17 @@ written_no_speech:
|
|||
lda #50
|
||||
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:
|
||||
|
||||
|
@ -579,7 +597,6 @@ game_loop:
|
|||
;=================
|
||||
; reset things
|
||||
;=================
|
||||
|
||||
lda #0
|
||||
sta IN_SPECIAL
|
||||
sta IN_RIGHT
|
||||
|
@ -896,3 +913,34 @@ set_inverse:
|
|||
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:
|
||||
sei
|
||||
|
||||
jsr ssi263_disable
|
||||
|
||||
rts
|
||||
|
||||
|
||||
|
@ -193,6 +195,27 @@ no_oflo:
|
|||
|
||||
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
|
||||
|
||||
; Toggle CTL while DR set to disable A/!R
|
||||
|
@ -220,21 +243,8 @@ speech_end:
|
|||
ldx #VIA6522_IER2
|
||||
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_playing: .byte $00
|
||||
|
|
Loading…
Reference in New Issue