diff options
author | luckytyphlosion <alan.rj.huang@gmail.com> | 2015-10-03 17:44:40 -0400 |
---|---|---|
committer | luckytyphlosion <alan.rj.huang@gmail.com> | 2015-10-03 17:44:40 -0400 |
commit | 79aa0bfbc6d11532129d1457545eebd88ea7b70a (patch) | |
tree | 79f5bc6378a3fbe9436bbe807493994758dbc1a2 /yellow | |
parent | fbeac8adb657c01192d2c755a45005b0f0f3c332 (diff) |
bank1f audio.
Also move yellow/audio.asm to audio.asm
Diffstat (limited to 'yellow')
-rwxr-xr-x | yellow/audio.asm | 455 | ||||
-rwxr-xr-x | yellow/main.asm | 7 |
2 files changed, 1 insertions, 461 deletions
diff --git a/yellow/audio.asm b/yellow/audio.asm index 3313f764..b61fccd8 100755 --- a/yellow/audio.asm +++ b/yellow/audio.asm @@ -1,455 +1,2 @@ -AUDIO_1 EQU $2 -AUDIO_2 EQU $8 -AUDIO_3 EQU $1f - -INCLUDE "constants.asm" INCLUDE "charmap.asm" - -SECTION "Sound Effect Headers 1", ROMX, BANK[AUDIO_1] -INCLUDE "audio/headers/sfxheaders1.asm" - -SECTION "Sound Effect Headers 2", ROMX, BANK[AUDIO_2] -INCLUDE "audio/headers/sfxheaders2.asm" - -SECTION "Music Headers 1", ROMX, BANK[AUDIO_1] -INCLUDE "audio/headers/musicheaders1.asm" - -SECTION "Music Headers 2", ROMX, BANK[AUDIO_2] -INCLUDE "audio/headers/musicheaders2.asm" - -SECTION "Sound Effects 1", ROMX, BANK[AUDIO_1] - -INCLUDE "audio/sfx/snare1_1.asm" -INCLUDE "audio/sfx/snare2_1.asm" -INCLUDE "audio/sfx/snare3_1.asm" -INCLUDE "audio/sfx/snare4_1.asm" -INCLUDE "audio/sfx/snare5_1.asm" -INCLUDE "audio/sfx/triangle1_1.asm" -INCLUDE "audio/sfx/triangle2_1.asm" -INCLUDE "audio/sfx/snare6_1.asm" -INCLUDE "audio/sfx/snare7_1.asm" -INCLUDE "audio/sfx/snare8_1.asm" -INCLUDE "audio/sfx/snare9_1.asm" -INCLUDE "audio/sfx/cymbal1_1.asm" -INCLUDE "audio/sfx/cymbal2_1.asm" -INCLUDE "audio/sfx/cymbal3_1.asm" -INCLUDE "audio/sfx/muted_snare1_1.asm" -INCLUDE "audio/sfx/triangle3_1.asm" -INCLUDE "audio/sfx/muted_snare2_1.asm" -INCLUDE "audio/sfx/muted_snare3_1.asm" -INCLUDE "audio/sfx/muted_snare4_1.asm" - -INCLUDE "audio/sfx/start_menu_1.asm" -INCLUDE "audio/sfx/pokeflute.asm" -INCLUDE "audio/sfx/cut_1.asm" -INCLUDE "audio/sfx/go_inside_1.asm" -INCLUDE "audio/sfx/swap_1.asm" -INCLUDE "audio/sfx/tink_1.asm" -INCLUDE "audio/sfx/59_1.asm" -INCLUDE "audio/sfx/purchase_1.asm" -INCLUDE "audio/sfx/collision_1.asm" -INCLUDE "audio/sfx/go_outside_1.asm" -INCLUDE "audio/sfx/press_ab_1.asm" -INCLUDE "audio/sfx/save_1.asm" -INCLUDE "audio/sfx/heal_hp_1.asm" -INCLUDE "audio/sfx/poisoned_1.asm" -INCLUDE "audio/sfx/heal_ailment_1.asm" -INCLUDE "audio/sfx/trade_machine_1.asm" -INCLUDE "audio/sfx/turn_on_pc_1.asm" -INCLUDE "audio/sfx/turn_off_pc_1.asm" -INCLUDE "audio/sfx/enter_pc_1.asm" -INCLUDE "audio/sfx/shrink_1.asm" -INCLUDE "audio/sfx/switch_1.asm" -INCLUDE "audio/sfx/healing_machine_1.asm" -INCLUDE "audio/sfx/teleport_exit1_1.asm" -INCLUDE "audio/sfx/teleport_enter1_1.asm" -INCLUDE "audio/sfx/teleport_exit2_1.asm" -INCLUDE "audio/sfx/ledge_1.asm" -INCLUDE "audio/sfx/teleport_enter2_1.asm" -INCLUDE "audio/sfx/fly_1.asm" -INCLUDE "audio/sfx/denied_1.asm" -INCLUDE "audio/sfx/arrow_tiles_1.asm" -INCLUDE "audio/sfx/push_boulder_1.asm" -INCLUDE "audio/sfx/ss_anne_horn_1.asm" -INCLUDE "audio/sfx/withdraw_deposit_1.asm" -INCLUDE "audio/sfx/safari_zone_pa.asm" -INCLUDE "audio/sfx/unused_1.asm" -INCLUDE "audio/sfx/cry09_1.asm" -INCLUDE "audio/sfx/cry23_1.asm" -INCLUDE "audio/sfx/cry24_1.asm" -INCLUDE "audio/sfx/cry11_1.asm" -INCLUDE "audio/sfx/cry25_1.asm" -INCLUDE "audio/sfx/cry03_1.asm" -INCLUDE "audio/sfx/cry0f_1.asm" -INCLUDE "audio/sfx/cry10_1.asm" -INCLUDE "audio/sfx/cry00_1.asm" -INCLUDE "audio/sfx/cry0e_1.asm" -INCLUDE "audio/sfx/cry06_1.asm" -INCLUDE "audio/sfx/cry07_1.asm" -INCLUDE "audio/sfx/cry05_1.asm" -INCLUDE "audio/sfx/cry0b_1.asm" -INCLUDE "audio/sfx/cry0c_1.asm" -INCLUDE "audio/sfx/cry02_1.asm" -INCLUDE "audio/sfx/cry0d_1.asm" -INCLUDE "audio/sfx/cry01_1.asm" -INCLUDE "audio/sfx/cry0a_1.asm" -INCLUDE "audio/sfx/cry08_1.asm" -INCLUDE "audio/sfx/cry04_1.asm" -INCLUDE "audio/sfx/cry19_1.asm" -INCLUDE "audio/sfx/cry16_1.asm" -INCLUDE "audio/sfx/cry1b_1.asm" -INCLUDE "audio/sfx/cry12_1.asm" -INCLUDE "audio/sfx/cry13_1.asm" -INCLUDE "audio/sfx/cry14_1.asm" -INCLUDE "audio/sfx/cry1e_1.asm" -INCLUDE "audio/sfx/cry15_1.asm" -INCLUDE "audio/sfx/cry17_1.asm" -INCLUDE "audio/sfx/cry1c_1.asm" -INCLUDE "audio/sfx/cry1a_1.asm" -INCLUDE "audio/sfx/cry1d_1.asm" -INCLUDE "audio/sfx/cry18_1.asm" -INCLUDE "audio/sfx/cry1f_1.asm" -INCLUDE "audio/sfx/cry20_1.asm" -INCLUDE "audio/sfx/cry21_1.asm" -INCLUDE "audio/sfx/cry22_1.asm" - -SECTION "Sound Effects 2", ROMX, BANK[AUDIO_2] - -INCLUDE "audio/sfx/snare1_2.asm" -INCLUDE "audio/sfx/snare2_2.asm" -INCLUDE "audio/sfx/snare3_2.asm" -INCLUDE "audio/sfx/snare4_2.asm" -INCLUDE "audio/sfx/snare5_2.asm" -INCLUDE "audio/sfx/triangle1_2.asm" -INCLUDE "audio/sfx/triangle2_2.asm" -INCLUDE "audio/sfx/snare6_2.asm" -INCLUDE "audio/sfx/snare7_2.asm" -INCLUDE "audio/sfx/snare8_2.asm" -INCLUDE "audio/sfx/snare9_2.asm" -INCLUDE "audio/sfx/cymbal1_2.asm" -INCLUDE "audio/sfx/cymbal2_2.asm" -INCLUDE "audio/sfx/cymbal3_2.asm" -INCLUDE "audio/sfx/muted_snare1_2.asm" -INCLUDE "audio/sfx/triangle3_2.asm" -INCLUDE "audio/sfx/muted_snare2_2.asm" -INCLUDE "audio/sfx/muted_snare3_2.asm" -INCLUDE "audio/sfx/muted_snare4_2.asm" - -INCLUDE "audio/sfx/press_ab_2.asm" -INCLUDE "audio/sfx/start_menu_2.asm" -INCLUDE "audio/sfx/tink_2.asm" -INCLUDE "audio/sfx/heal_hp_2.asm" -INCLUDE "audio/sfx/heal_ailment_2.asm" -INCLUDE "audio/sfx/silph_scope.asm" -INCLUDE "audio/sfx/ball_toss.asm" -INCLUDE "audio/sfx/ball_poof.asm" -INCLUDE "audio/sfx/faint_thud.asm" -INCLUDE "audio/sfx/run.asm" -INCLUDE "audio/sfx/dex_page_added.asm" -INCLUDE "audio/sfx/swap_2.asm" ; added in yellow -INCLUDE "audio/sfx/pokeflute_ch3.asm" -INCLUDE "audio/sfx/peck.asm" -INCLUDE "audio/sfx/faint_fall.asm" -INCLUDE "audio/sfx/battle_09.asm" -INCLUDE "audio/sfx/pound.asm" -INCLUDE "audio/sfx/battle_0b.asm" -INCLUDE "audio/sfx/battle_0c.asm" -INCLUDE "audio/sfx/battle_0d.asm" -INCLUDE "audio/sfx/battle_0e.asm" -INCLUDE "audio/sfx/battle_0f.asm" -INCLUDE "audio/sfx/damage.asm" -INCLUDE "audio/sfx/not_very_effective.asm" -INCLUDE "audio/sfx/battle_12.asm" -INCLUDE "audio/sfx/battle_13.asm" -INCLUDE "audio/sfx/battle_14.asm" -INCLUDE "audio/sfx/vine_whip.asm" -INCLUDE "audio/sfx/battle_16.asm" -INCLUDE "audio/sfx/battle_17.asm" -INCLUDE "audio/sfx/battle_18.asm" -INCLUDE "audio/sfx/battle_19.asm" -INCLUDE "audio/sfx/super_effective.asm" -INCLUDE "audio/sfx/battle_1b.asm" -INCLUDE "audio/sfx/battle_1c.asm" -INCLUDE "audio/sfx/doubleslap.asm" -INCLUDE "audio/sfx/battle_1e.asm" -INCLUDE "audio/sfx/horn_drill.asm" -INCLUDE "audio/sfx/battle_20.asm" -INCLUDE "audio/sfx/battle_21.asm" -INCLUDE "audio/sfx/battle_22.asm" -INCLUDE "audio/sfx/battle_23.asm" -INCLUDE "audio/sfx/battle_24.asm" -INCLUDE "audio/sfx/battle_25.asm" -INCLUDE "audio/sfx/battle_26.asm" -INCLUDE "audio/sfx/battle_27.asm" -INCLUDE "audio/sfx/battle_28.asm" -INCLUDE "audio/sfx/battle_29.asm" -INCLUDE "audio/sfx/battle_2a.asm" -INCLUDE "audio/sfx/battle_2b.asm" -INCLUDE "audio/sfx/battle_2c.asm" -INCLUDE "audio/sfx/psybeam.asm" -INCLUDE "audio/sfx/battle_2e.asm" -INCLUDE "audio/sfx/battle_2f.asm" -INCLUDE "audio/sfx/psychic_m.asm" -INCLUDE "audio/sfx/battle_31.asm" -INCLUDE "audio/sfx/battle_32.asm" -INCLUDE "audio/sfx/battle_33.asm" -INCLUDE "audio/sfx/battle_34.asm" -INCLUDE "audio/sfx/battle_35.asm" -INCLUDE "audio/sfx/battle_36.asm" -INCLUDE "audio/sfx/unused_2.asm" -INCLUDE "audio/sfx/cry09_2.asm" -INCLUDE "audio/sfx/cry23_2.asm" -INCLUDE "audio/sfx/cry24_2.asm" -INCLUDE "audio/sfx/cry11_2.asm" -INCLUDE "audio/sfx/cry25_2.asm" -INCLUDE "audio/sfx/cry03_2.asm" -INCLUDE "audio/sfx/cry0f_2.asm" -INCLUDE "audio/sfx/cry10_2.asm" -INCLUDE "audio/sfx/cry00_2.asm" -INCLUDE "audio/sfx/cry0e_2.asm" -INCLUDE "audio/sfx/cry06_2.asm" -INCLUDE "audio/sfx/cry07_2.asm" -INCLUDE "audio/sfx/cry05_2.asm" -INCLUDE "audio/sfx/cry0b_2.asm" -INCLUDE "audio/sfx/cry0c_2.asm" -INCLUDE "audio/sfx/cry02_2.asm" -INCLUDE "audio/sfx/cry0d_2.asm" -INCLUDE "audio/sfx/cry01_2.asm" -INCLUDE "audio/sfx/cry0a_2.asm" -INCLUDE "audio/sfx/cry08_2.asm" -INCLUDE "audio/sfx/cry04_2.asm" -INCLUDE "audio/sfx/cry19_2.asm" -INCLUDE "audio/sfx/cry16_2.asm" -INCLUDE "audio/sfx/cry1b_2.asm" -INCLUDE "audio/sfx/cry12_2.asm" -INCLUDE "audio/sfx/cry13_2.asm" -INCLUDE "audio/sfx/cry14_2.asm" -INCLUDE "audio/sfx/cry1e_2.asm" -INCLUDE "audio/sfx/cry15_2.asm" -INCLUDE "audio/sfx/cry17_2.asm" -INCLUDE "audio/sfx/cry1c_2.asm" -INCLUDE "audio/sfx/cry1a_2.asm" -INCLUDE "audio/sfx/cry1d_2.asm" -INCLUDE "audio/sfx/cry18_2.asm" -INCLUDE "audio/sfx/cry1f_2.asm" -INCLUDE "audio/sfx/cry20_2.asm" -INCLUDE "audio/sfx/cry21_2.asm" -INCLUDE "audio/sfx/cry22_2.asm" -;Audio2_WavePointers: INCLUDE "audio/wave_instruments.asm" - -SECTION "Audio Engine 1", ROMX, BANK[AUDIO_1] - -PlayBattleMusic:: ; 9064 (2:5064) - xor a - ld [wAudioFadeOutControl], a - ld [wLowHealthAlarm], a - call StopAllMusic - call DelayFrame - ld c, $8 ; BANK(Music_GymLeaderBattle) - ld a, [W_GYMLEADERNO] - and a - jr z, .notGymLeaderBattle - ld a, $ea ; MUSIC_GYM_LEADER_BATTLE - jr .playSong -.notGymLeaderBattle - ld a, [W_CUROPPONENT] - cp 200 - jr c, .wildBattle - cp OPP_SONY3 - jr z, .finalBattle - cp OPP_LANCE - jr nz, .normalTrainerBattle - ld a, $ea ; MUSIC_GYM_LEADER_BATTLE ; lance also plays gym leader theme - jr .playSong -.normalTrainerBattle - ld a, $ed ; MUSIC_TRAINER_BATTLE - jr .playSong -.finalBattle - ld a, $f3 ; MUSIC_FINAL_BATTLE - jr .playSong -.wildBattle - ld a, $f0 ; MUSIC_WILD_BATTLE -.playSong - jp PlayMusic - - -INCLUDE "audio/engine_1.asm" - - -; an alternate start for MeetRival which has a different first measure -Music_RivalAlternateStart:: ; 99bd (2:59bd) - ld c, BANK(Music_MeetRival) - ld a, MUSIC_MEET_RIVAL - call PlayMusic - ld hl, wChannelCommandPointers - ld de, Music_MeetRival_branch_b1a2 - call Audio1_OverwriteChannelPointer - ld de, Music_MeetRival_branch_b21d - call Audio1_OverwriteChannelPointer - ld de, Music_MeetRival_branch_b2b5 - -Audio1_OverwriteChannelPointer: ; 99d6 (2:59d6) - ld a, e - ld [hli], a - ld a, d - ld [hli], a - ret - -; an alternate tempo for MeetRival which is slightly slower -Music_RivalAlternateTempo:: ; 99db (2:59db) - ld c, BANK(Music_MeetRival) - ld a, MUSIC_MEET_RIVAL - call PlayMusic - ld de, Music_MeetRival_branch_b119 - jr asm_99ed - -; applies both the alternate start and alternate tempo -Music_RivalAlternateStartAndTempo:: ; 99e7 (2:59e7) - call Music_RivalAlternateStart - ld de, Music_MeetRival_branch_b19b -asm_99ed: ; 99ed (2:59ed) - ld hl, wChannelCommandPointers - jp Audio1_OverwriteChannelPointer - ret - -; an alternate tempo for Cities1 which is used for the Hall of Fame room -Music_Cities1AlternateTempo:: ; 99f4 (2:59f4) - ld a, 10 - ld [wAudioFadeOutCounterReloadValue], a - ld [wAudioFadeOutCounter], a - ld a, $ff ; stop playing music after the fade-out is finished - ld [wAudioFadeOutControl], a - ld c, 100 - call DelayFrames ; wait for the fade-out to finish - ld c, BANK(Music_Cities1) - ld a, $c3 ; MUSIC_CITIES1 - call PlayMusic - ld hl, wChannelCommandPointers - ld de, Music_Cities1_branch_aa6f - jp Audio1_OverwriteChannelPointer - -SECTION "Audio Engine 2", ROMX, BANK[AUDIO_2] - -Music_DoLowHealthAlarm:: ; 2131e (8:531e) - ld a, [wLowHealthAlarm] - cp $ff - jr z, .disableAlarm - - bit 7, a ;alarm enabled? - ret z ;nope - - and $7f ;low 7 bits are the timer. - jr nz, .asm_21383 ;if timer > 0, play low tone. - - call .playToneHi - ld a, 30 ;keep this tone for 30 frames. - jr .asm_21395 ;reset the timer. - -.asm_21383 - cp 20 - jr nz, .asm_2138a ;if timer == 20, - call .playToneLo ;actually set the sound registers. - -.asm_2138a - ld a, $86 - ld [wChannelSoundIDs + CH4], a ;disable sound channel? - ld a, [wLowHealthAlarm] - and $7f ;decrement alarm timer. - dec a - -.asm_21395 - ; reset the timer and enable flag. - set 7, a - ld [wLowHealthAlarm], a - ret - -.disableAlarm - xor a - ld [wLowHealthAlarm], a ;disable alarm - ld [wChannelSoundIDs + CH4], a ;re-enable sound channel? - ld de, .toneDataSilence - jr .playTone - -;update the sound registers to change the frequency. -;the tone set here stays until we change it. -.playToneHi - ld de, .toneDataHi - jr .playTone - -.playToneLo - ld de, .toneDataLo - -;update sound channel 1 to play the alarm, overriding all other sounds. -.playTone - ld hl, rNR10 ;channel 1 sound register - ld c, $5 - xor a - -.copyLoop - ld [hli], a - ld a, [de] - inc de - dec c - jr nz, .copyLoop - ret - -;bytes to write to sound channel 1 registers for health alarm. -;starting at FF11 (FF10 is always zeroed), so these bytes are: -;length, envelope, freq lo, freq hi -.toneDataHi - db $A0,$E2,$50,$87 - -.toneDataLo - db $B0,$E2,$EE,$86 - -;written to stop the alarm -.toneDataSilence - db $00,$00,$00,$80 - -INCLUDE "engine/menu/bills_pc.asm" - -INCLUDE "audio/engine_2.asm" - -SECTION "Music 1", ROMX, BANK[AUDIO_1] - -Audio1_WavePointers: INCLUDE "audio/wave_instruments.asm" - -INCLUDE "audio/music/pkmnhealed.asm" -INCLUDE "audio/music/routes1.asm" -INCLUDE "audio/music/routes2.asm" -INCLUDE "audio/music/routes3.asm" -INCLUDE "audio/music/routes4.asm" -INCLUDE "audio/music/indigoplateau.asm" -INCLUDE "audio/music/pallettown.asm" -INCLUDE "audio/music/unusedsong.asm" -INCLUDE "audio/music/cities1.asm" -INCLUDE "audio/sfx/get_item1_1.asm" -INCLUDE "audio/music/museumguy.asm" -INCLUDE "audio/music/meetprofoak.asm" -INCLUDE "audio/music/meetrival.asm" -INCLUDE "audio/sfx/pokedex_rating_1.asm" -INCLUDE "audio/sfx/get_item2_1.asm" -INCLUDE "audio/sfx/get_key_item_1.asm" -INCLUDE "audio/music/ssanne.asm" -INCLUDE "audio/music/cities2.asm" -INCLUDE "audio/music/celadon.asm" -INCLUDE "audio/music/cinnabar.asm" -INCLUDE "audio/music/vermilion.asm" -INCLUDE "audio/music/lavender.asm" -INCLUDE "audio/music/safarizone.asm" -INCLUDE "audio/music/gym.asm" -INCLUDE "audio/music/pokecenter.asm" - -SECTION "Music 2", ROMX, BANK[AUDIO_2] - -INCLUDE "audio/sfx/unused2_2.asm" -INCLUDE "audio/music/gymleaderbattle.asm" -INCLUDE "audio/music/trainerbattle.asm" -INCLUDE "audio/music/wildbattle.asm" -INCLUDE "audio/music/finalbattle.asm" -INCLUDE "audio/sfx/level_up.asm" -INCLUDE "audio/sfx/get_item2_2.asm" -INCLUDE "audio/sfx/caught_mon.asm" -INCLUDE "audio/music/defeatedtrainer.asm" -INCLUDE "audio/music/defeatedwildmon.asm" -INCLUDE "audio/music/defeatedgymleader.asm"
\ No newline at end of file +INCLUDE "audio.asm"
\ No newline at end of file diff --git a/yellow/main.asm b/yellow/main.asm index 77dcc839..ed853b80 100755 --- a/yellow/main.asm +++ b/yellow/main.asm @@ -1139,13 +1139,6 @@ RedFishingRodTiles: INCBIN "gfx/red_fishingrod_tiles.2bpp" dr $7a22a,$7c000 - -SECTION "bank1F",ROMX,BANK[$1F] - - dr $7c000,$7d10d -Func_7d10d: ; 7d10d (1f:510d) - dr $7d10d,$80000 - SECTION "bank20",ROMX,BANK[$20] dr $80000,$80f14 |