dos33fsprogs/games/sb/play_asplode.s

62 lines
859 B
ArmAsm
Raw Permalink Normal View History

2023-06-05 20:29:18 +00:00
ASPLODE_SAMPLE = $D000
2023-06-09 20:16:43 +00:00
ASPLODE_LENGTH = 28 ; $1C
2023-05-31 05:15:43 +00:00
2023-06-05 20:29:18 +00:00
play_asplode:
2023-05-31 05:15:43 +00:00
; only avail if language card
lda SOUND_STATUS
and #SOUND_IN_LC
2023-06-05 20:29:18 +00:00
beq done_play_asplode
2023-05-31 05:15:43 +00:00
; switch in language card
; read/write RAM $d000 bank 1
bit $C083
bit $C083
; call the btc player
2023-06-05 20:29:18 +00:00
lda #<ASPLODE_SAMPLE
2023-05-31 05:15:43 +00:00
sta BTC_L
2023-06-09 20:16:43 +00:00
lda sound_parts,Y ; #>ASPLODE_SAMPLE
2023-05-31 05:15:43 +00:00
sta BTC_H
2023-06-09 20:16:43 +00:00
lda sound_len,Y
tax
;ldx #ASPLODE_LENGTH ; 28 pages long???
2023-05-31 05:15:43 +00:00
jsr play_audio
2023-05-31 21:06:35 +00:00
; read ROM/no-write
2023-05-31 05:15:43 +00:00
2023-05-31 21:06:35 +00:00
bit $c082
2023-05-31 05:15:43 +00:00
2023-06-05 20:29:18 +00:00
done_play_asplode:
2023-05-31 05:15:43 +00:00
rts
2023-06-11 06:06:45 +00:00
; in the game
; bim : bullet launch
; boom : bullet hit
; twang : while asploding
2023-06-09 20:16:43 +00:00
sound_parts:
.byte $D0 ; your
.byte $D8 ; head
.byte $E0 ; a
.byte $E1 ; splode
.byte $D0 ; whole thing
2023-06-11 06:06:45 +00:00
.byte $F0 ; bim
.byte $F4 ; boom
.byte $F8 ; twang
2023-06-09 20:16:43 +00:00
sound_len:
.byte $8
.byte $8
.byte $6
.byte $10
.byte 28
2023-06-11 06:06:45 +00:00
.byte $4
.byte $4
.byte $8