From 40c17c906b2b3f65b3b04b1933b90238a7ac5566 Mon Sep 17 00:00:00 2001 From: yenatch Date: Mon, 26 May 2014 14:04:56 -0700 Subject: Remove most static wram addresses. Use labels instead. For unknown addresses, use "w
". Label overleads are still an issue. --- audio.asm | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'audio.asm') diff --git a/audio.asm b/audio.asm index 47769fce..0f0f2b26 100644 --- a/audio.asm +++ b/audio.asm @@ -365,9 +365,9 @@ SECTION "Audio Engine 1", ROMX, BANK[AUDIO_1] PlayBattleMusic:: ; 0x90c6 xor a ld [wMusicHeaderPointer], a - ld [$d083], a + ld [wd083], a dec a - ld [$c0ee], a + ld [wc0ee], a call PlaySound ; stop music call DelayFrame ld c, BANK(Music_GymLeaderBattle) @@ -406,7 +406,7 @@ Music_RivalAlternateStart:: ; 0x9b47 ld c, BANK(Music_MeetRival) ld a, MUSIC_MEET_RIVAL call PlayMusic - ld hl, $c006 + ld hl, wc006 ld de, Music_MeetRival_branch_b1a2 call Music2_OverwriteChannelPointer ld de, Music_MeetRival_branch_b21d @@ -425,22 +425,22 @@ Music_RivalAlternateTempo:: ; 0x9b65 ld c, BANK(Music_MeetRival) ld a, MUSIC_MEET_RIVAL call PlayMusic - ld hl, $c006 + ld hl, wc006 ld de, Music_MeetRival_branch_b119 jp Music2_OverwriteChannelPointer ; applies both the alternate start and alternate tempo Music_RivalAlternateStartAndTempo:: ; 0x9b75 call Music_RivalAlternateStart - ld hl, $c006 + ld hl, wc006 ld de, Music_MeetRival_branch_b19b jp Music2_OverwriteChannelPointer ; an alternate tempo for Cities1 which is used for the Hall of Fame room Music_Cities1AlternateTempo:: ; 0x9b81 ld a, $a - ld [$cfc8], a - ld [$cfc9], a + ld [wcfc8], a + ld [wcfc9], a ld a, $ff ld [wMusicHeaderPointer], a ld c, $64 @@ -448,7 +448,7 @@ Music_Cities1AlternateTempo:: ; 0x9b81 ld c, BANK(Music_Cities1) ld a, MUSIC_CITIES1 call PlayMusic - ld hl, $c006 + ld hl, wc006 ld de, Music_Cities1_branch_aa6f jp Music2_OverwriteChannelPointer @@ -456,7 +456,7 @@ Music_Cities1AlternateTempo:: ; 0x9b81 SECTION "Audio Engine 2", ROMX, BANK[AUDIO_2] Func_2136e:: ; 2136e (8:536e) - ld a, [$d083] + ld a, [wd083] cp $ff jr z, .asm_2139b bit 7, a @@ -472,18 +472,18 @@ Func_2136e:: ; 2136e (8:536e) call Func_213ac .asm_2138a ld a, $86 - ld [$c02a], a - ld a, [$d083] + ld [wc02a], a + ld a, [wd083] and $7f dec a .asm_21395 set 7, a - ld [$d083], a + ld [wd083], a ret .asm_2139b xor a - ld [$d083], a - ld [$c02a], a + ld [wd083], a + ld [wc02a], a ld de, Unknown_213c4 ; $53c4 jr asm_213af @@ -523,7 +523,7 @@ INCLUDE "audio/engine_2.asm" Music_PokeFluteInBattle:: ; 22306 (8:6306) ld a, (SFX_08_46 - SFX_Headers_08) / 3 ; PokeFlute outside of battle call PlaySoundWaitForCurrent - ld hl, $c00e + ld hl, wc00e ld de, SFX_08_PokeFlute_Ch1 call Music8_OverwriteChannelPointer ld de, SFX_08_PokeFlute_Ch2 @@ -553,7 +553,7 @@ Func_7d13b:: ; 7d13b (1f:513b) .gotSfxPointer push bc ld a, $ff - ld [$c0ee], a + ld [wc0ee], a call PlaySoundWaitForCurrent pop bc ld b, $0 -- cgit v1.3.1-sl0p From 683a62cc1cb7d07b4c88eeec9333c415da8f0bdc Mon Sep 17 00:00:00 2001 From: "U-Fish-PC\\Daniel" Date: Mon, 9 Jun 2014 14:20:28 -0400 Subject: Combine wave files --- audio.asm | 6 +++--- audio/duty_1.asm | 33 --------------------------------- audio/duty_2.asm | 32 -------------------------------- audio/duty_3.asm | 33 --------------------------------- audio/engine_1.asm | 2 +- audio/engine_2.asm | 2 +- audio/engine_3.asm | 2 +- audio/wave_instruments.asm | 32 ++++++++++++++++++++++++++++++++ 8 files changed, 38 insertions(+), 104 deletions(-) delete mode 100644 audio/duty_1.asm delete mode 100644 audio/duty_2.asm delete mode 100644 audio/duty_3.asm create mode 100644 audio/wave_instruments.asm (limited to 'audio.asm') diff --git a/audio.asm b/audio.asm index 0f0f2b26..6dffd23a 100644 --- a/audio.asm +++ b/audio.asm @@ -50,7 +50,7 @@ INCLUDE "audio/sfx/sfx_02_11.asm" INCLUDE "audio/sfx/sfx_02_12.asm" INCLUDE "audio/sfx/sfx_02_13.asm" -INCLUDE "audio/duty_1.asm" +Music2_WavePointers: INCLUDE "audio/wave_instruments.asm" INCLUDE "audio/sfx/sfx_02_3f.asm" INCLUDE "audio/sfx/sfx_02_5e.asm" @@ -149,7 +149,7 @@ INCLUDE "audio/sfx/sfx_08_11.asm" INCLUDE "audio/sfx/sfx_08_12.asm" INCLUDE "audio/sfx/sfx_08_13.asm" -INCLUDE "audio/duty_2.asm" +Music8_WavePointers: INCLUDE "audio/wave_instruments.asm" INCLUDE "audio/sfx/sfx_08_40.asm" INCLUDE "audio/sfx/sfx_08_3f.asm" @@ -274,7 +274,7 @@ INCLUDE "audio/sfx/sfx_1f_11.asm" INCLUDE "audio/sfx/sfx_1f_12.asm" INCLUDE "audio/sfx/sfx_1f_13.asm" -INCLUDE "audio/duty_3.asm" +Music1f_WavePointers: INCLUDE "audio/wave_instruments.asm" INCLUDE "audio/sfx/sfx_1f_3f.asm" INCLUDE "audio/sfx/sfx_1f_56.asm" diff --git a/audio/duty_1.asm b/audio/duty_1.asm deleted file mode 100644 index 2c650ac1..00000000 --- a/audio/duty_1.asm +++ /dev/null @@ -1,33 +0,0 @@ -Music2_Channel3DutyPointers: ; 0x8361 - dw Music2_Channel3Duty0 - dw Music2_Channel3Duty1 - dw Music2_Channel3Duty2 - dw Music2_Channel3Duty3 - dw Music2_Channel3Duty4 - dw Music2_Channel3Duty5 ; used in the Lavender Town theme - dw Music2_Channel3Duty5 ; unused - dw Music2_Channel3Duty5 ; unused - dw Music2_Channel3Duty5 ; unused - -; these are the definitions for the channel 3 instruments -; each instrument definition is made up of 32 points (nibbles) that form -; the graph of the wave -; the current instrument is copied to $FF30 -Music2_Channel3Duty0: ; 0x8373 - db $02,$46,$8A,$CE,$FF,$FE,$ED,$DC,$CB,$A9,$87,$65,$44,$33,$22,$11 - -Music2_Channel3Duty1: ; 0x8383 - db $02,$46,$8A,$CE,$EF,$FF,$FE,$EE,$DD,$CB,$A9,$87,$65,$43,$22,$11 - -Music2_Channel3Duty2: ; 0x8393 - db $13,$69,$BD,$EE,$EE,$FF,$FF,$ED,$DE,$FF,$FF,$EE,$EE,$DB,$96,$31 - -Music2_Channel3Duty3: ; 0x83a3 - db $02,$46,$8A,$CD,$EF,$FE,$DE,$FF,$EE,$DC,$BA,$98,$76,$54,$32,$10 - -Music2_Channel3Duty4: ; 0x83b3 - db $01,$23,$45,$67,$8A,$CD,$EE,$F7,$7F,$EE,$DC,$A8,$76,$54,$32,$10 - -; duty 5 reads from sfx data -Music2_Channel3Duty5: ; 0x83c3 - diff --git a/audio/duty_2.asm b/audio/duty_2.asm deleted file mode 100644 index b4561091..00000000 --- a/audio/duty_2.asm +++ /dev/null @@ -1,32 +0,0 @@ -Music8_Channel3DutyPointers: ; 20361 (8:4361) - dw Music8_Channel3Duty0 - dw Music8_Channel3Duty1 - dw Music8_Channel3Duty2 - dw Music8_Channel3Duty3 - dw Music8_Channel3Duty4 - dw Music8_Channel3Duty5 ; unused - dw Music8_Channel3Duty5 ; unused - dw Music8_Channel3Duty5 ; unused - dw Music8_Channel3Duty5 ; unused - -; these are the definitions for the channel 3 instruments -; each instrument definition is made up of 32 points (nibbles) that form -; the graph of the wave -; the current instrument is copied to $FF30 -Music8_Channel3Duty0: ; 20373 (8:4373) - db $02,$46,$8A,$CE,$FF,$FE,$ED,$DC,$CB,$A9,$87,$65,$44,$33,$22,$11 - -Music8_Channel3Duty1: ; 20383 (8:4383) - db $02,$46,$8A,$CE,$EF,$FF,$FE,$EE,$DD,$CB,$A9,$87,$65,$43,$22,$11 - -Music8_Channel3Duty2: ; 20393 (8:4393) - db $13,$69,$BD,$EE,$EE,$FF,$FF,$ED,$DE,$FF,$FF,$EE,$EE,$DB,$96,$31 - -Music8_Channel3Duty3: ; 203a3 (8:43a3) - db $02,$46,$8A,$CD,$EF,$FE,$DE,$FF,$EE,$DC,$BA,$98,$76,$54,$32,$10 - -Music8_Channel3Duty4: ; 203b3 (8:43b3) - db $01,$23,$45,$67,$8A,$CD,$EE,$F7,$7F,$EE,$DC,$A8,$76,$54,$32,$10 - -Music8_Channel3Duty5: - diff --git a/audio/duty_3.asm b/audio/duty_3.asm deleted file mode 100644 index b9702a7f..00000000 --- a/audio/duty_3.asm +++ /dev/null @@ -1,33 +0,0 @@ -Music1f_Channel3DutyPointers: ; 7c361 (1f:4361) - dw Music1f_Channel3Duty0 - dw Music1f_Channel3Duty1 - dw Music1f_Channel3Duty2 - dw Music1f_Channel3Duty3 - dw Music1f_Channel3Duty4 - dw Music1f_Channel3Duty5 ; used in the Pokemon Tower theme - dw Music1f_Channel3Duty5 ; unused - dw Music1f_Channel3Duty5 ; unused - dw Music1f_Channel3Duty5 ; unused - -; these are the definitions for the channel 3 instruments -; each instrument definition is made up of 32 points (nibbles) that form -; the graph of the wave -; the current instrument is copied to $FF30 -Music1f_Channel3Duty0: ; 7c373 (1f:4373) - db $02,$46,$8A,$CE,$FF,$FE,$ED,$DC,$CB,$A9,$87,$65,$44,$33,$22,$11 - -Music1f_Channel3Duty1: ; 7c383 (1f:4383) - db $02,$46,$8A,$CE,$EF,$FF,$FE,$EE,$DD,$CB,$A9,$87,$65,$43,$22,$11 - -Music1f_Channel3Duty2: ; 7c393 (1f:4393) - db $13,$69,$BD,$EE,$EE,$FF,$FF,$ED,$DE,$FF,$FF,$EE,$EE,$DB,$96,$31 - -Music1f_Channel3Duty3: ; 7c3a3 (1f:43a3) - db $02,$46,$8A,$CD,$EF,$FE,$DE,$FF,$EE,$DC,$BA,$98,$76,$54,$32,$10 - -Music1f_Channel3Duty4: ; 7c3b3 (1f:43b3) - db $01,$23,$45,$67,$8A,$CD,$EE,$F7,$7F,$EE,$DC,$A8,$76,$54,$32,$10 - -; duty 5 reads from sfx data -Music1f_Channel3Duty5: ; 7c3c3 (1f:43c3) - diff --git a/audio/engine_1.asm b/audio/engine_1.asm index 14733513..c1c4999b 100644 --- a/audio/engine_1.asm +++ b/audio/engine_1.asm @@ -883,7 +883,7 @@ Func_964b: ; 0x964b add a ld d, $0 ld e, a - ld hl, Music2_Channel3DutyPointers + ld hl, Music2_WavePointers add hl, de ld e, [hl] inc hl diff --git a/audio/engine_2.asm b/audio/engine_2.asm index 8052a393..b5a07c0f 100644 --- a/audio/engine_2.asm +++ b/audio/engine_2.asm @@ -890,7 +890,7 @@ Func_21dcc: ; 21dcc (8:5dcc) add a ld d, $0 ld e, a - ld hl, Music8_Channel3DutyPointers + ld hl, Music8_WavePointers add hl, de ld e, [hl] inc hl diff --git a/audio/engine_3.asm b/audio/engine_3.asm index 27b49860..45f890df 100644 --- a/audio/engine_3.asm +++ b/audio/engine_3.asm @@ -883,7 +883,7 @@ Func_7d6bf: ; 7d6bf (1f:56bf) add a ld d, $0 ld e, a - ld hl, Music1f_Channel3DutyPointers + ld hl, Music1f_WavePointers add hl, de ld e, [hl] inc hl diff --git a/audio/wave_instruments.asm b/audio/wave_instruments.asm new file mode 100644 index 00000000..fede06af --- /dev/null +++ b/audio/wave_instruments.asm @@ -0,0 +1,32 @@ + dw .wave0 + dw .wave1 + dw .wave2 + dw .wave3 + dw .wave4 + dw .wave5 ; used in the Lavender Town and Pokemon Tower themes + dw .wave5 ; unused + dw .wave5 ; unused + dw .wave5 ; unused + +; these are the definitions for the channel 3 instruments +; each instrument definition is made up of 32 points (nibbles) that form +; the graph of the wave +; the current instrument is copied to $FF30 +.wave0 + db $02,$46,$8A,$CE,$FF,$FE,$ED,$DC,$CB,$A9,$87,$65,$44,$33,$22,$11 + +.wave1 + db $02,$46,$8A,$CE,$EF,$FF,$FE,$EE,$DD,$CB,$A9,$87,$65,$43,$22,$11 + +.wave2 + db $13,$69,$BD,$EE,$EE,$FF,$FF,$ED,$DE,$FF,$FF,$EE,$EE,$DB,$96,$31 + +.wave3 + db $02,$46,$8A,$CD,$EF,$FE,$DE,$FF,$EE,$DC,$BA,$98,$76,$54,$32,$10 + +.wave4 + db $01,$23,$45,$67,$8A,$CD,$EE,$F7,$7F,$EE,$DC,$A8,$76,$54,$32,$10 + +; duty 5 reads from sfx data +.wave5 + -- cgit v1.3.1-sl0p