sb: fix sound up

This commit is contained in:
Vince Weaver 2023-06-16 16:02:23 -04:00
parent c7ed743b17
commit 1496a99034
3 changed files with 23 additions and 53 deletions

File diff suppressed because one or more lines are too long

View File

@ -76,33 +76,10 @@ load_backgrounds:
;===================
; set up variables
.if 0
lda #16
sta STRONGBAD_X
sta PLAYER_X
lda #1
sta STRONGBAD_DIR
sta BULLET_YDIR
lda #SHIELD_DOWN
sta SHIELD_POSITION
sta SHIELD_COUNT
lda #0
sta BULLET_X_L
sta BULLET_X_VEL
sta HEAD_DAMAGE
lda #$80
sta BULLET_X_VEL_L
lda #20
sta BULLET_X
lda #0
sta BULLET_Y
.endif
;===================
; inline this?
jsr do_back_off
@ -226,7 +203,7 @@ sound_check_off:
sound_check_baby:
cpx #17
bne sound_check_done
ldy #3
ldy #2
do_play_asplode:
jsr play_back_off
@ -249,6 +226,11 @@ done_back_off:
bit KEYRESET ; clear any keypresses during asplode
lda #$A0
jsr hgr_copy
jsr flip_page
rts

View File

@ -1,12 +1,12 @@
ASPLODE_SAMPLE = $D000
ASPLODE_LENGTH = 28 ; $1C
BACK_SAMPLE = $D000
BACK_LENGTH = 30 ; $1E
play_back_off:
; only avail if language card
lda SOUND_STATUS
and #SOUND_IN_LC
beq done_play_asplode
beq done_play_back_off
; switch in language card
; read/write RAM $d000 bank 1
@ -17,45 +17,33 @@ play_back_off:
; call the btc player
lda #<ASPLODE_SAMPLE
lda #<BACK_SAMPLE
sta BTC_L
lda sound_parts,Y ; #>ASPLODE_SAMPLE
lda sound_parts,Y ; #>BACK_SAMPLE
sta BTC_H
lda sound_len,Y
tax
;ldx #ASPLODE_LENGTH ; 28 pages long???
;ldx #BACK_LENGTH ; 28 pages long???
jsr play_audio
; read ROM/no-write
bit $c082
done_play_asplode:
done_play_back_off:
rts
; in the game
; bim : bullet launch
; boom : bullet hit
; twang : while asploding
sound_parts:
.byte $D0 ; your
.byte $D8 ; head
.byte $E0 ; a
.byte $E1 ; splode
.byte $D0 ; whole thing
.byte $F0 ; bim
.byte $F4 ; boom
.byte $F8 ; twang
.byte $D0 ; back
.byte $D8 ; off
.byte $E0 ; baby
.byte $D0 ; all
sound_len:
.byte $8
.byte $8
.byte $6
.byte $10
.byte 28
.byte $4
.byte $4
.byte $8
.byte $E
.byte 30 ; $1E