mirror of
https://github.com/pret/pokepinball.git
synced 2024-11-23 13:49:42 +00:00
Split out audio engine copies
This commit is contained in:
parent
e935cd885b
commit
09db40d83e
2733
audio/engine_0f.asm
Executable file
2733
audio/engine_0f.asm
Executable file
File diff suppressed because it is too large
Load Diff
19
audio/engine_10.asm
Executable file
19
audio/engine_10.asm
Executable file
@ -0,0 +1,19 @@
|
||||
dr $40000, $40ca2
|
||||
|
||||
SongHeaderPointers10: ; 0x40ca2
|
||||
dw Music_Nothing10
|
||||
dw Music_RedField
|
||||
dw Music_CatchEmBlue
|
||||
dw Music_HurryUpBlue
|
||||
dw Music_HiScore
|
||||
dw Music_GameOver
|
||||
; 0x40cae
|
||||
|
||||
INCLUDE "audio/music/nothing10.asm"
|
||||
INCLUDE "audio/music/redfield.asm"
|
||||
INCLUDE "audio/music/catchemblue.asm"
|
||||
INCLUDE "audio/music/hiscore.asm"
|
||||
INCLUDE "audio/music/gameover.asm"
|
||||
INCLUDE "audio/music/hurryupblue.asm"
|
||||
|
||||
dr $4255b, $44000
|
17
audio/engine_11.asm
Executable file
17
audio/engine_11.asm
Executable file
@ -0,0 +1,17 @@
|
||||
dr $44000, $44ca2
|
||||
|
||||
SongHeaderPointers11: ; 0x44ca2
|
||||
dw Music_Nothing11
|
||||
dw Music_WhackTheDiglett
|
||||
dw Music_WhackTheDugtrio
|
||||
dw Music_SeelStage
|
||||
dw Music_Title
|
||||
; 0x44cac
|
||||
|
||||
INCLUDE "audio/music/nothing11.asm"
|
||||
INCLUDE "audio/music/whackthediglett.asm"
|
||||
INCLUDE "audio/music/whackthedugtrio.asm"
|
||||
INCLUDE "audio/music/seelstage.asm"
|
||||
INCLUDE "audio/music/title.asm"
|
||||
|
||||
dr $462d3, $48000
|
17
audio/engine_12.asm
Executable file
17
audio/engine_12.asm
Executable file
@ -0,0 +1,17 @@
|
||||
dr $48000, $48ca2
|
||||
|
||||
SongHeaderPointers12: ; 0x48ca2
|
||||
dw Music_Nothing12
|
||||
dw Music_MewtwoStage
|
||||
dw Music_Options
|
||||
dw Music_FieldSelect
|
||||
dw Music_MeowthStage
|
||||
; 0x48cac
|
||||
|
||||
INCLUDE "audio/music/nothing12.asm"
|
||||
INCLUDE "audio/music/mewtwostage.asm"
|
||||
INCLUDE "audio/music/options.asm"
|
||||
INCLUDE "audio/music/fieldselect.asm"
|
||||
INCLUDE "audio/music/meowthstage.asm"
|
||||
|
||||
dr $49c04, $4c000
|
13
audio/engine_13.asm
Executable file
13
audio/engine_13.asm
Executable file
@ -0,0 +1,13 @@
|
||||
dr $4c000, $4cca2
|
||||
|
||||
SongHeaderPointers13: ; 0x4cca2
|
||||
dw Music_Nothing13
|
||||
dw Music_EndCredits
|
||||
dw Music_NameEntry
|
||||
; 0x4cca8
|
||||
|
||||
INCLUDE "audio/music/nothing13.asm"
|
||||
INCLUDE "audio/music/endcredits.asm"
|
||||
INCLUDE "audio/music/nameentry.asm"
|
||||
|
||||
dr $4def4, $50000
|
141
audio/pikapcm.asm
Executable file
141
audio/pikapcm.asm
Executable file
@ -0,0 +1,141 @@
|
||||
PlayPikachuSoundClip: ; 0x50000
|
||||
; Plays the pcm (pulse-code modulation) sound clip of one of the pikachu noises.
|
||||
sla a
|
||||
ld c, a
|
||||
ld b, $0
|
||||
ld hl, PikachuSoundClipPointers
|
||||
add hl, bc
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
push hl
|
||||
di
|
||||
ld b, $4
|
||||
.asm_50010
|
||||
ld a, [rLY]
|
||||
and a
|
||||
jr nz, .asm_50010
|
||||
dec b
|
||||
jr nz, .asm_50010
|
||||
xor a
|
||||
ld [rNR50], a
|
||||
ld [rNR51], a
|
||||
ld a, $80
|
||||
ld [rNR52], a
|
||||
xor a
|
||||
ld [rNR30], a
|
||||
ld hl, wd84b
|
||||
ld c, $30
|
||||
ld b, $10
|
||||
.asm_5002b
|
||||
ld a, [$ff00+c]
|
||||
ld [hli], a
|
||||
ld a, $ff
|
||||
ld [$ff00+c], a
|
||||
inc c
|
||||
dec b
|
||||
jr nz, .asm_5002b
|
||||
ld a, $80
|
||||
ld [rNR30], a
|
||||
ld a, $ff
|
||||
ld [rNR31], a
|
||||
ld a, $20
|
||||
ld [rNR32], a
|
||||
ld a, $ff
|
||||
ld [rNR33], a
|
||||
ld a, $87
|
||||
ld [rNR34], a
|
||||
ld a, $77
|
||||
ld [rNR50], a
|
||||
ld a, $44
|
||||
ld [rNR51], a
|
||||
pop hl
|
||||
call PlayPikachuPCM
|
||||
xor a
|
||||
ld [rNR50], a
|
||||
ld [rNR51], a
|
||||
ld [rNR52], a
|
||||
ld hl, wd84b
|
||||
ld c, $30
|
||||
ld b, $10
|
||||
.asm_50062
|
||||
ld a, [hli]
|
||||
ld [$ff00+c], a
|
||||
inc c
|
||||
dec b
|
||||
jr nz, .asm_50062
|
||||
ld a, $77
|
||||
ld [rNR50], a
|
||||
ld a, $ff
|
||||
ld [rNR51], a
|
||||
ld a, $80
|
||||
ld [rNR52], a
|
||||
ei
|
||||
ret
|
||||
|
||||
PikachuSoundClipPointers: ; 0x50076
|
||||
dw PikachuBillboardBonusSoundClip
|
||||
dw PikachuThundershockSoundClip
|
||||
|
||||
PikachuBillboardBonusSoundClip: ; 0x5007a
|
||||
dw $caf ; length of the pcm data (todo: there is probably a way to do this dynamically with rgbds)
|
||||
INCBIN "audio/sound_clips/pi_ka_chu.pcm"
|
||||
|
||||
db $1f ; unused
|
||||
|
||||
PikachuThundershockSoundClip: ; 0x50d2c
|
||||
dw $1227 ; length of the pcm data (todo: there is probably a way to do this dynamically with rgbds)
|
||||
INCBIN "audio/sound_clips/piiiiikaaaa.pcm"
|
||||
|
||||
db $f0, $00, $00 ; unused
|
||||
|
||||
PlayPikachuPCM: ; 0x51f56
|
||||
; Plays the audio PCM at [hl]
|
||||
ld a, [hli]
|
||||
ld c, a
|
||||
ld a, [hli]
|
||||
ld b, a
|
||||
; bc = number of bytes in the sound clip's PCM (pulse-code modulation)
|
||||
.loop
|
||||
ld a, [hli]
|
||||
ld d, a
|
||||
ld a, $3
|
||||
.playSingleSample
|
||||
dec a
|
||||
jr nz, .playSingleSample
|
||||
call LoadNextSoundClipSample
|
||||
call PlaySoundClipSample
|
||||
call LoadNextSoundClipSample
|
||||
call PlaySoundClipSample
|
||||
call LoadNextSoundClipSample
|
||||
call PlaySoundClipSample
|
||||
call LoadNextSoundClipSample
|
||||
call PlaySoundClipSample
|
||||
call LoadNextSoundClipSample
|
||||
call PlaySoundClipSample
|
||||
call LoadNextSoundClipSample
|
||||
call PlaySoundClipSample
|
||||
call LoadNextSoundClipSample
|
||||
call PlaySoundClipSample
|
||||
call LoadNextSoundClipSample
|
||||
dec bc
|
||||
ld a, c
|
||||
or b
|
||||
jr nz, .loop
|
||||
ret
|
||||
|
||||
LoadNextSoundClipSample: ; 0x51f94
|
||||
ld a, d
|
||||
and $80
|
||||
srl a
|
||||
srl a
|
||||
ld [rNR32], a
|
||||
sla d
|
||||
ret
|
||||
|
||||
PlaySoundClipSample: ; 0x51fa0
|
||||
ld a, $3
|
||||
.loop
|
||||
dec a
|
||||
jr nz, .loop
|
||||
ret
|
@ -1,3 +1,13 @@
|
||||
channelcount: MACRO
|
||||
nchannels = \1 - 1
|
||||
ENDM
|
||||
|
||||
channel: MACRO
|
||||
db (nchannels << 6) | \1
|
||||
dw \2
|
||||
nchannels = 0
|
||||
ENDM
|
||||
|
||||
note: MACRO
|
||||
dn (\1), (\2) - 1
|
||||
ENDM
|
||||
@ -227,4 +237,3 @@ callchannel: macro
|
||||
endchannel: macro
|
||||
db $ff
|
||||
endm
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user