second: add another sound sample

this one is tricky as we only have room to load it in advance, to
the language card, and hope it's still there later
This commit is contained in:
Vince Weaver 2023-11-03 10:54:09 -04:00
parent b6df18f37e
commit 8b0b4c6291
6 changed files with 76 additions and 9 deletions

View File

@ -24,6 +24,14 @@ fake_bios.o: fake_bios.s \
###
fonts/a2_cga_thin.inc:
cd fonts && make
graphics/a2_energy.hgr.zx02:
cd graphics && make
###
clean:
rm -f *~ *.o *.lst FAKE_BIOS
cd graphics && make clean
cd fonts && make clean

View File

@ -19,6 +19,7 @@ gorilla.o: gorilla.s \
../hgr_copy_fast.s \
tv_effect.s \
../zp.inc ../hardware.inc ../qload.inc \
audio/a_pboy.btc.zx02 \
graphics/mntscrl3.hgr.zx02
ca65 -o gorilla.o gorilla.s -l gorilla.lst
@ -27,9 +28,14 @@ gorilla.o: gorilla.s \
graphics/mntscrl3.hgr.zx02:
cd graphics && make
audio/a_pboy.btc.zx02:
cd audio && make
###
clean:
rm -f *~ *.o *.lst GORILLA
cd graphics && make clean
cd audio && make clean

View File

@ -68,6 +68,37 @@ gorilla_wait:
jsr tv_effect
;============================
; decompress sound for later
;============================
; decompress audio to $D000
lda #<transmission_data
sta zx_src_l+1
lda #>transmission_data
sta zx_src_h+1
sei ; disable interrupts
jsr mute_ay_both
; swap in language card Page1
lda $C08B
lda $C08B
lda #$D0
jsr zx02_full_decomp
; swap back language card Page2
lda $C083
lda $C083
jsr unmute_ay_both
cli ; re-enable interrupts
gorilla_wait2:
lda #30
jsr wait_for_pattern
@ -92,3 +123,5 @@ gorilla_done:
gorilla_data:
.incbin "graphics/mntscrl3.hgr.zx02"
transmission_data:
.incbin "audio/a_pboy.btc.zx02"

View File

@ -92,17 +92,37 @@ load_background:
; play audio
; lda #$00
; sta BTC_L
; lda #$60
; sta BTC_H
lda #$00
sta BTC_L
lda #$D0
sta BTC_H
; sei ; stop music
sei ; stop music
jsr mute_ay_both ; disable audio
; ldx #11
; jsr play_audio
; switch to language card Page 1
; cli
lda $C08B
lda $C08B
ldy #0
lda (BTC_L),Y
cmp #$AA ; check if our audio was loaded
bne skip_audio
ldx #14
jsr play_audio
skip_audio:
; switch back to language card Page 2
lda $C083
lda $C083
jsr unmute_ay_both ; re-enable audio
cli ; re-enable music
;===============================