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/engine_3.asm | 450 ++++++++++++++++++++++++++--------------------------- 1 file changed, 225 insertions(+), 225 deletions(-) (limited to 'audio/engine_3.asm') diff --git a/audio/engine_3.asm b/audio/engine_3.asm index 3d5ee66f..d215c56d 100644 --- a/audio/engine_3.asm +++ b/audio/engine_3.asm @@ -4,7 +4,7 @@ Func_7d177:: ; 7d177 (1f:5177) ld c, CH0 .loop ld b, $0 - ld hl, $c026 + ld hl, wc026 add hl, bc ld a, [hl] and a @@ -12,13 +12,13 @@ Func_7d177:: ; 7d177 (1f:5177) ld a, c cp CH4 jr nc, .applyAffects ; if sfx channel - ld a, [$c002] + ld a, [wc002] and a jr z, .applyAffects bit 7, a jr nz, .nextChannel set 7, a - ld [$c002], a + ld [wc002], a xor a ld [$ff25], a ld [$ff1a], a @@ -36,14 +36,14 @@ Func_7d177:: ; 7d177 (1f:5177) ; this routine checks flags for music effects currently applied ; to the channel and calls certain functions based on flags. -; known flags for $c02e: +; known flags for wc02e: ; 1: call has been used ; 3: a toggle used only by this routine for vibrato ; 4: pitchbend flag ; 6: dutycycle flag Music1f_Music2_ApplyMusicAffects: ; 7d1ac (1f:51ac) ld b, $0 - ld hl, $c0b6 ; delay until next note + ld hl, wc0b6 ; delay until next note add hl, bc ld a, [hl] cp $1 ; if delay is 1, play next note @@ -53,36 +53,36 @@ Music1f_Music2_ApplyMusicAffects: ; 7d1ac (1f:51ac) ld a, c cp CH4 jr nc, .startChecks ; if a sfx channel - ld hl, $c02a + ld hl, wc02a add hl, bc ld a, [hl] and a jr z, .startChecks ret .startChecks - ld hl, $c02e + ld hl, wc02e add hl, bc bit 6, [hl] ; dutycycle jr z, .checkForExecuteMusic call Music1f_ApplyDutyCycle .checkForExecuteMusic ld b, $0 - ld hl, $c036 + ld hl, wc036 add hl, bc bit 0, [hl] jr nz, .checkForPitchBend - ld hl, $c02e + ld hl, wc02e add hl, bc bit 2, [hl] jr nz, .disablePitchBendVibrato .checkForPitchBend - ld hl, $c02e + ld hl, wc02e add hl, bc bit 4, [hl] ; pitchbend jr z, .checkVibratoDelay jp Music1f_ApplyPitchBend .checkVibratoDelay - ld hl, $c04e ; vibrato delay + ld hl, wc04e ; vibrato delay add hl, bc ld a, [hl] and a ; check if delay is over @@ -91,7 +91,7 @@ Music1f_Music2_ApplyMusicAffects: ; 7d1ac (1f:51ac) .disablePitchBendVibrato ret .checkForVibrato - ld hl, $c056 ; vibrato rate + ld hl, wc056 ; vibrato rate add hl, bc ld a, [hl] and a @@ -99,7 +99,7 @@ Music1f_Music2_ApplyMusicAffects: ; 7d1ac (1f:51ac) ret ; no vibrato .vibrato ld d, a - ld hl, $c05e + ld hl, wc05e add hl, bc ld a, [hl] and $f @@ -112,10 +112,10 @@ Music1f_Music2_ApplyMusicAffects: ; 7d1ac (1f:51ac) swap [hl] or [hl] ld [hl], a ; reset the vibrato value and start again - ld hl, $c066 + ld hl, wc066 add hl, bc ld e, [hl] ; get note pitch - ld hl, $c02e + ld hl, wc02e add hl, bc bit 3, [hl] ; this is the only code that sets/resets bit three so jr z, .unset ; it continuously alternates which path it takes @@ -148,13 +148,13 @@ Music1f_Music2_ApplyMusicAffects: ; 7d1ac (1f:51ac) ; like tempo changes, duty changes etc. and doesn't return ; until the first note is reached Music1f_Music2_PlayNextNote: ; 7d244 (1f:5244) - ld hl, $c06e + ld hl, wc06e add hl, bc ld a, [hl] - ld hl, $c04e + ld hl, wc04e add hl, bc ld [hl], a - ld hl, $c02e + ld hl, wc02e add hl, bc res 4, [hl] res 5, [hl] @@ -167,7 +167,7 @@ Music1f_endchannel: ; 7d25a (1f:525a) cp $ff ; is this command an endchannel? jp nz, Music1f_callchannel ; no ld b, $0 ; yes - ld hl, $c02e + ld hl, wc02e add hl, bc bit 1, [hl] jr nz, .returnFromCall @@ -177,7 +177,7 @@ Music1f_endchannel: ; 7d25a (1f:525a) jr .asm_7d2b3 .noiseOrSfxChannel res 2, [hl] - ld hl, $c036 + ld hl, wc036 add hl, bc res 0, [hl] cp CH6 @@ -188,11 +188,11 @@ Music1f_endchannel: ; 7d25a (1f:525a) ld [$ff1a], a .notSfxChannel3 jr nz, .asm_7d296 - ld a, [$c003] + ld a, [wc003] and a jr z, .asm_7d296 xor a - ld [$c003], a + ld [wc003], a jr .asm_7d2b3 .asm_7d296 jr .asm_7d2bc @@ -202,10 +202,10 @@ Music1f_endchannel: ; 7d25a (1f:525a) ld a, c add a ld e, a - ld hl, $c006 + ld hl, wc006 add hl, de push hl ; store current channel address - ld hl, $c016 + ld hl, wc016 add hl, de ld e, l ld d, h @@ -223,12 +223,12 @@ Music1f_endchannel: ; 7d25a (1f:525a) and [hl] ld [$ff25], a .asm_7d2bc - ld a, [$c02a] + ld a, [wc02a] cp $14 jr nc, .asm_7d2c5 jr .asm_7d2e2 .asm_7d2c5 - ld a, [$c02a] + ld a, [wc02a] cp $86 jr z, .asm_7d2e2 jr c, .asm_7d2d0 @@ -240,12 +240,12 @@ Music1f_endchannel: ; 7d25a (1f:525a) call Func_7d73b ret c .asm_7d2d9 - ld a, [$c005] + ld a, [wc005] ld [$ff24], a xor a - ld [$c005], a + ld [wc005], a .asm_7d2e2 - ld hl, $c026 + ld hl, wc026 add hl, bc ld [hl], b ret @@ -264,10 +264,10 @@ Music1f_callchannel: ; 7d2e8 (1f:52e8) ld a, c add a ld e, a - ld hl, $c006 + ld hl, wc006 add hl, de push hl - ld hl, $c016 + ld hl, wc016 add hl, de ld e, l ld d, h @@ -282,7 +282,7 @@ Music1f_callchannel: ; 7d2e8 (1f:52e8) inc hl ld [hl], d ; overwrite current address with pointer ld b, $0 - ld hl, $c02e + ld hl, wc02e add hl, bc set 1, [hl] ; set the call flag jp Music1f_endchannel @@ -295,7 +295,7 @@ Music1f_loopchannel: ; 7d31d (1f:531d) and a jr z, .infiniteLoop ld b, $0 - ld hl, $c0be + ld hl, wc0be add hl, bc ld a, [hl] cp e @@ -318,7 +318,7 @@ Music1f_loopchannel: ; 7d31d (1f:531d) ld a, c add a ld e, a - ld hl, $c006 + ld hl, wc006 add hl, de pop af ld [hli], a @@ -332,7 +332,7 @@ Music1f_notetype: ; 7d358 (1f:5358) ld a, d ; yes and $f ld b, $0 - ld hl, $c0c6 + ld hl, wc0c6 add hl, bc ld [hl], a ; store low nibble as speed ld a, c @@ -345,10 +345,10 @@ Music1f_notetype: ; 7d358 (1f:5358) jr z, .musicChannel3 cp CH6 jr nz, .notChannel3 - ld hl, $c0e7 + ld hl, wc0e7 jr .sfxChannel3 .musicChannel3 - ld hl, $c0e6 + ld hl, wc0e6 .sfxChannel3 ld a, d and $f @@ -363,7 +363,7 @@ Music1f_notetype: ; 7d358 (1f:5358) ; else, store volume (high nibble) and fade (low nibble) .notChannel3 ld b, $0 - ld hl, $c0de + ld hl, wc0de add hl, bc ld [hl], d .noiseChannel @@ -374,11 +374,11 @@ Music1f_togglecall: ; 7d397 (1f:5397) cp $e8 ; is this command an togglecall? jr nz, Music1f_vibrato ; no ld b, $0 ; yes - ld hl, $c02e + ld hl, wc02e add hl, bc ld a, [hl] xor $1 - ld [hl], a ; flip bit 0 of $c02e (toggle returning from call) + ld [hl], a ; flip bit 0 of wc02e (toggle returning from call) jp Music1f_endchannel Music1f_vibrato: ; 7d3a9 (1f:53a9) @@ -386,10 +386,10 @@ Music1f_vibrato: ; 7d3a9 (1f:53a9) jr nz, Music1f_pitchbend ; no call Music1f_GetNextMusicByte ; yes ld b, $0 - ld hl, $c04e + ld hl, wc04e add hl, bc ld [hl], a ; store delay - ld hl, $c06e + ld hl, wc06e add hl, bc ld [hl], a ; store delay call Music1f_GetNextMusicByte @@ -397,7 +397,7 @@ Music1f_vibrato: ; 7d3a9 (1f:53a9) and $f0 swap a ld b, $0 - ld hl, $c056 + ld hl, wc056 add hl, bc srl a ld e, a @@ -408,7 +408,7 @@ Music1f_vibrato: ; 7d3a9 (1f:53a9) ld a, d and $f ld d, a - ld hl, $c05e + ld hl, wc05e add hl, bc swap a or d @@ -420,7 +420,7 @@ Music1f_pitchbend: ; 7d3e1 (1f:53e1) jr nz, Music1f_duty ; no call Music1f_GetNextMusicByte ; yes ld b, $0 - ld hl, $c076 + ld hl, wc076 add hl, bc ld [hl], a ; store first param call Music1f_GetNextMusicByte @@ -432,14 +432,14 @@ Music1f_pitchbend: ; 7d3e1 (1f:53e1) and $f call Func_7d8cc ld b, $0 - ld hl, $c0a6 + ld hl, wc0a6 add hl, bc ld [hl], d ; store unknown part of second param - ld hl, $c0ae + ld hl, wc0ae add hl, bc ld [hl], e ; store unknown part of second param ld b, $0 - ld hl, $c02e + ld hl, wc02e add hl, bc set 4, [hl] ; set pitchbend flag call Music1f_GetNextMusicByte @@ -454,7 +454,7 @@ Music1f_duty: ; 7d419 (1f:5419) rrca and $c0 ld b, $0 - ld hl, $c03e + ld hl, wc03e add hl, bc ld [hl], a ; store duty jp Music1f_endchannel @@ -466,25 +466,25 @@ Music1f_tempo: ; 7d42e (1f:542e) cp CH4 jr nc, .sfxChannel call Music1f_GetNextMusicByte - ld [$c0e8], a ; store first param + ld [wc0e8], a ; store first param call Music1f_GetNextMusicByte - ld [$c0e9], a ; store second param + ld [wc0e9], a ; store second param xor a - ld [$c0ce], a ; clear RAM - ld [$c0cf], a - ld [$c0d0], a - ld [$c0d1], a + ld [wc0ce], a ; clear RAM + ld [wc0cf], a + ld [wc0d0], a + ld [wc0d1], a jr .musicChannelDone .sfxChannel call Music1f_GetNextMusicByte - ld [$c0ea], a ; store first param + ld [wc0ea], a ; store first param call Music1f_GetNextMusicByte - ld [$c0eb], a ; store second param + ld [wc0eb], a ; store second param xor a - ld [$c0d2], a ; clear RAM - ld [$c0d3], a - ld [$c0d4], a - ld [$c0d5], a + ld [wc0d2], a ; clear RAM + ld [wc0d3], a + ld [wc0d4], a + ld [wc0d5], a .musicChannelDone jp Music1f_endchannel @@ -492,7 +492,7 @@ Music1f_unknownmusic0xee: ; 7d46e (1f:546e) cp $ee ; is this command an unknownmusic0xee? jr nz, Music1f_unknownmusic0xef ; no call Music1f_GetNextMusicByte ; yes - ld [$c004], a ; store first param + ld [wc004], a ; store first param jp Music1f_endchannel ; this appears to never be used @@ -503,13 +503,13 @@ Music1f_unknownmusic0xef: ; 7d47b (1f:547b) push bc call Func_7d8ea pop bc - ld a, [$c003] + ld a, [wc003] and a jr nz, .skip - ld a, [$c02d] - ld [$c003], a + ld a, [wc02d] + ld [wc003], a xor a - ld [$c02d], a + ld [wc02d], a .skip jp Music1f_endchannel @@ -518,14 +518,14 @@ Music1f_dutycycle: ; 7d49a (1f:549a) jr nz, Music1f_stereopanning ; no call Music1f_GetNextMusicByte ; yes ld b, $0 - ld hl, $c046 + ld hl, wc046 add hl, bc ld [hl], a ; store full cycle and $c0 - ld hl, $c03e + ld hl, wc03e add hl, bc ld [hl], a ; store first duty - ld hl, $c02e + ld hl, wc02e add hl, bc set 6, [hl] ; set duty flag jp Music1f_endchannel @@ -541,7 +541,7 @@ Music1f_executemusic: ; 7d4c4 (1f:54c4) cp $f8 ; is this command an executemusic? jr nz, Music1f_octave ; no ld b, $0 ; yes - ld hl, $c036 + ld hl, wc036 add hl, bc set 0, [hl] jp Music1f_endchannel @@ -550,7 +550,7 @@ Music1f_octave: ; 7d4d3 (1f:54d3) and $f0 cp $e0 ; is this command an octave? jr nz, Music1f_unknownsfx0x20 ; no - ld hl, $c0d6 ; yes + ld hl, wc0d6 ; yes ld b, $0 add hl, bc ld a, d @@ -565,14 +565,14 @@ Music1f_unknownsfx0x20: ; 7d4e6 (1f:54e6) cp CH3 ; is this a noise or sfx channel? jr c, Music1f_unknownsfx0x10 ; no ld b, $0 - ld hl, $c036 + ld hl, wc036 add hl, bc bit 0, [hl] jr nz, Music1f_unknownsfx0x10 ; no call Music1f_notelength ; yes ld d, a ld b, $0 - ld hl, $c03e + ld hl, wc03e add hl, bc ld a, [hl] or d @@ -611,7 +611,7 @@ Music1f_unknownsfx0x10 ; 7d533 (1f:5533) cp $10 ; is this command an unknownsfx0x10? jr nz, Music1f_note ; no ld b, $0 - ld hl, $c036 + ld hl, wc036 add hl, bc bit 0, [hl] jr nz, Music1f_note ; no @@ -646,7 +646,7 @@ Music1f_dnote: ; 7d569 (1f:5569) call Music1f_GetNextMusicByte ; get dnote instrument asm_7d571 ld d, a - ld a, [$c003] + ld a, [wc003] and a jr nz, .asm_7d57c ld a, d @@ -663,7 +663,7 @@ Music1f_notelength: ; 7d57e (1f:557e) ld b, $0 ld e, a ; store note length (in 16ths) ld d, b - ld hl, $c0c6 + ld hl, wc0c6 add hl, bc ld a, [hl] ld l, b @@ -671,9 +671,9 @@ Music1f_notelength: ; 7d57e (1f:557e) ld a, c cp CH4 jr nc, .sfxChannel - ld a, [$c0e8] + ld a, [wc0e8] ld d, a - ld a, [$c0e9] + ld a, [wc0e9] ld e, a jr .skip .sfxChannel @@ -682,31 +682,31 @@ Music1f_notelength: ; 7d57e (1f:557e) cp CH7 jr z, .skip ; if noise channel call Func_7d707 - ld a, [$c0ea] + ld a, [wc0ea] ld d, a - ld a, [$c0eb] + ld a, [wc0eb] ld e, a .skip ld a, l ld b, $0 - ld hl, $c0ce + ld hl, wc0ce add hl, bc ld l, [hl] call Func_7d8bb ld e, l ld d, h - ld hl, $c0ce + ld hl, wc0ce add hl, bc ld [hl], e ld a, d - ld hl, $c0b6 + ld hl, wc0b6 add hl, bc ld [hl], a - ld hl, $c036 + ld hl, wc036 add hl, bc bit 0, [hl] jr nz, Music1f_notepitch - ld hl, $c02e + ld hl, wc02e add hl, bc bit 2, [hl] jr z, Music1f_notepitch @@ -721,7 +721,7 @@ Music1f_notepitch: ; 7d5dc (1f:55dc) ld a, c cp CH4 jr nc, .sfxChannel - ld hl, $c02a + ld hl, wc02a add hl, bc ld a, [hl] and a @@ -754,12 +754,12 @@ Music1f_notepitch: ; 7d5dc (1f:55dc) .notRest swap a ld b, $0 - ld hl, $c0d6 + ld hl, wc0d6 add hl, bc ld b, [hl] call Func_7d8cc ld b, $0 - ld hl, $c02e + ld hl, wc02e add hl, bc bit 4, [hl] jr z, .asm_7d62c @@ -769,7 +769,7 @@ Music1f_notepitch: ; 7d5dc (1f:55dc) ld a, c cp CH4 jr nc, .skip ; if sfx Channel - ld hl, $c02a + ld hl, wc02a ld d, $0 ld e, a add hl, de @@ -782,7 +782,7 @@ Music1f_notepitch: ; 7d5dc (1f:55dc) ret .skip ld b, $0 - ld hl, $c0de + ld hl, wc0de add hl, bc ld d, [hl] ld b, $2 @@ -792,7 +792,7 @@ Music1f_notepitch: ; 7d5dc (1f:55dc) call Func_7d66c pop de ld b, $0 - ld hl, $c02e + ld hl, wc02e add hl, bc bit 0, [hl] jr z, .asm_7d663 @@ -800,7 +800,7 @@ Music1f_notepitch: ; 7d5dc (1f:55dc) jr nc, .asm_7d663 inc d .asm_7d663 - ld hl, $c066 + ld hl, wc066 add hl, bc ld [hl], e call Func_7d6bf @@ -818,13 +818,13 @@ Func_7d66c: ; 7d66c (1f:566c) jr z, .sfxNoiseChannel cp CH4 jr nc, .skip ; if sfx channel - ld hl, $c02a + ld hl, wc02a add hl, bc ld a, [hl] and a jr nz, .skip .sfxNoiseChannel - ld a, [$c004] + ld a, [wc004] ld hl, Unknown_7db9b add hl, bc and [hl] @@ -842,7 +842,7 @@ Func_7d66c: ; 7d66c (1f:566c) Func_7d69d: ; 7d69d (1f:569d) ld b, $0 - ld hl, $c0b6 + ld hl, wc0b6 add hl, bc ld d, [hl] ld a, c @@ -853,7 +853,7 @@ Func_7d69d: ; 7d69d (1f:569d) ld a, d and $3f ld d, a - ld hl, $c03e + ld hl, wc03e add hl, bc ld a, [hl] or d @@ -873,10 +873,10 @@ Func_7d6bf: ; 7d6bf (1f:56bf) ; fall through .channel3 push de - ld de, $c0e6 + ld de, wc0e6 cp CH2 jr z, .musicChannel3 - ld de, $c0e7 + ld de, wc0e7 .musicChannel3 ld a, [de] add a @@ -919,27 +919,27 @@ Func_7d707: ; 7d707 (1f:5707) call Func_7d759 jr nc, .asm_7d71f ld d, $0 - ld a, [$c0f2] + ld a, [wc0f2] add $80 jr nc, .asm_7d716 inc d .asm_7d716 - ld [$c0eb], a + ld [wc0eb], a ld a, d - ld [$c0ea], a + ld [wc0ea], a jr .asm_7d728 .asm_7d71f xor a - ld [$c0eb], a + ld [wc0eb], a ld a, $1 - ld [$c0ea], a + ld [wc0ea], a .asm_7d728 ret Func_7d729: ; 7d729 (1f:5729) call Func_7d759 jr nc, .asm_7d73a - ld a, [$c0f1] + ld a, [wc0f1] add e jr nc, .asm_7d735 inc d @@ -955,7 +955,7 @@ Func_7d729: ; 7d729 (1f:5729) Func_7d73b: ; 7d73b (1f:573b) call Func_7d759 jr nc, .asm_7d756 - ld hl, $c006 + ld hl, wc006 ld e, c ld d, $0 sla e @@ -976,7 +976,7 @@ Func_7d73b: ; 7d73b (1f:573b) ret Func_7d759: ; 7d759 (1f:5759) - ld a, [$c02a] + ld a, [wc02a] cp $14 jr nc, .asm_7d762 jr .asm_7d768 @@ -993,27 +993,27 @@ Func_7d759: ; 7d759 (1f:5759) ret Music1f_ApplyPitchBend: ; 7d76d (1f:576d) - ld hl, $c02e + ld hl, wc02e add hl, bc bit 5, [hl] jp nz, .asm_7d7b4 - ld hl, $c09e + ld hl, wc09e add hl, bc ld e, [hl] - ld hl, $c096 + ld hl, wc096 add hl, bc ld d, [hl] - ld hl, $c07e + ld hl, wc07e add hl, bc ld l, [hl] ld h, b add hl, de ld d, h ld e, l - ld hl, $c08e + ld hl, wc08e add hl, bc push hl - ld hl, $c086 + ld hl, wc086 add hl, bc ld a, [hl] pop hl @@ -1025,26 +1025,26 @@ Music1f_ApplyPitchBend: ; 7d76d (1f:576d) ld a, $0 adc d ld d, a - ld hl, $c0a6 + ld hl, wc0a6 add hl, bc ld a, [hl] cp d jp c, .asm_7d7fa jr nz, .asm_7d7e7 - ld hl, $c0ae + ld hl, wc0ae add hl, bc ld a, [hl] cp e jp c, .asm_7d7fa jr .asm_7d7e7 .asm_7d7b4 - ld hl, $c09e + ld hl, wc09e add hl, bc ld a, [hl] - ld hl, $c096 + ld hl, wc096 add hl, bc ld d, [hl] - ld hl, $c07e + ld hl, wc07e add hl, bc ld e, [hl] sub e @@ -1052,7 +1052,7 @@ Music1f_ApplyPitchBend: ; 7d76d (1f:576d) ld a, d sbc b ld d, a - ld hl, $c086 + ld hl, wc086 add hl, bc ld a, [hl] add a @@ -1063,22 +1063,22 @@ Music1f_ApplyPitchBend: ; 7d76d (1f:576d) ld a, d sbc b ld d, a - ld hl, $c0a6 + ld hl, wc0a6 add hl, bc ld a, d cp [hl] jr c, .asm_7d7fa jr nz, .asm_7d7e7 - ld hl, $c0ae + ld hl, wc0ae add hl, bc ld a, e cp [hl] jr c, .asm_7d7fa .asm_7d7e7 - ld hl, $c09e + ld hl, wc09e add hl, bc ld [hl], e - ld hl, $c096 + ld hl, wc096 add hl, bc ld [hl], d ld b, $3 @@ -1088,54 +1088,54 @@ Music1f_ApplyPitchBend: ; 7d76d (1f:576d) ld [hl], d ret .asm_7d7fa - ld hl, $c02e + ld hl, wc02e add hl, bc res 4, [hl] res 5, [hl] ret Func_7d803: ; 7d803 (1f:5803) - ld hl, $c096 + ld hl, wc096 add hl, bc ld [hl], d - ld hl, $c09e + ld hl, wc09e add hl, bc ld [hl], e - ld hl, $c0b6 + ld hl, wc0b6 add hl, bc ld a, [hl] - ld hl, $c076 + ld hl, wc076 add hl, bc sub [hl] jr nc, .asm_7d81b ld a, $1 .asm_7d81b ld [hl], a - ld hl, $c0ae + ld hl, wc0ae add hl, bc ld a, e sub [hl] ld e, a ld a, d sbc b - ld hl, $c0a6 + ld hl, wc0a6 add hl, bc sub [hl] jr c, .asm_7d837 ld d, a ld b, $0 - ld hl, $c02e + ld hl, wc02e add hl, bc set 5, [hl] jr .asm_7d85a .asm_7d837 - ld hl, $c096 + ld hl, wc096 add hl, bc ld d, [hl] - ld hl, $c09e + ld hl, wc09e add hl, bc ld e, [hl] - ld hl, $c0ae + ld hl, wc0ae add hl, bc ld a, [hl] sub e @@ -1143,17 +1143,17 @@ Func_7d803: ; 7d803 (1f:5803) ld a, d sbc b ld d, a - ld hl, $c0a6 + ld hl, wc0a6 add hl, bc ld a, [hl] sub d ld d, a ld b, $0 - ld hl, $c02e + ld hl, wc02e add hl, bc res 5, [hl] .asm_7d85a - ld hl, $c076 + ld hl, wc076 add hl, bc .asm_7d85e inc b @@ -1172,20 +1172,20 @@ Func_7d803: ; 7d803 (1f:5803) add [hl] ld d, b ld b, $0 - ld hl, $c07e + ld hl, wc07e add hl, bc ld [hl], d - ld hl, $c086 + ld hl, wc086 add hl, bc ld [hl], a - ld hl, $c08e + ld hl, wc08e add hl, bc ld [hl], a ret Music1f_ApplyDutyCycle: ; 7d881 (1f:5881) ld b, $0 - ld hl, $c046 + ld hl, wc046 add hl, bc ld a, [hl] rlca @@ -1206,7 +1206,7 @@ Music1f_GetNextMusicByte: ; 7d899 (1f:5899) ld a, c add a ld e, a - ld hl, $c006 + ld hl, wc006 add hl, de ld a, [hli] ld e, a @@ -1274,7 +1274,7 @@ Func_7d8cc: ; 7d8cc (1f:58cc) ret Func_7d8ea:: ; 7d8ea (1f:58ea) - ld [$c001], a + ld [wc001], a cp $ff jp z, Func_7daa8 cp $c2 @@ -1285,63 +1285,63 @@ Func_7d8ea:: ; 7d8ea (1f:58ea) jp nc, Func_7d9c2 .asm_7d901 xor a - ld [$c000], a - ld [$c003], a - ld [$c0e9], a - ld [$c0e6], a - ld [$c0e7], a + ld [wc000], a + ld [wc003], a + ld [wc0e9], a + ld [wc0e6], a + ld [wc0e7], a ld d, $8 - ld hl, $c016 + ld hl, wc016 call FillMusicRAM1f - ld hl, $c006 + ld hl, wc006 call FillMusicRAM1f ld d, $4 - ld hl, $c026 + ld hl, wc026 call FillMusicRAM1f - ld hl, $c02e + ld hl, wc02e call FillMusicRAM1f - ld hl, $c03e + ld hl, wc03e call FillMusicRAM1f - ld hl, $c046 + ld hl, wc046 call FillMusicRAM1f - ld hl, $c04e + ld hl, wc04e call FillMusicRAM1f - ld hl, $c056 + ld hl, wc056 call FillMusicRAM1f - ld hl, $c05e + ld hl, wc05e call FillMusicRAM1f - ld hl, $c066 + ld hl, wc066 call FillMusicRAM1f - ld hl, $c06e + ld hl, wc06e call FillMusicRAM1f - ld hl, $c036 + ld hl, wc036 call FillMusicRAM1f - ld hl, $c076 + ld hl, wc076 call FillMusicRAM1f - ld hl, $c07e + ld hl, wc07e call FillMusicRAM1f - ld hl, $c086 + ld hl, wc086 call FillMusicRAM1f - ld hl, $c08e + ld hl, wc08e call FillMusicRAM1f - ld hl, $c096 + ld hl, wc096 call FillMusicRAM1f - ld hl, $c09e + ld hl, wc09e call FillMusicRAM1f - ld hl, $c0a6 + ld hl, wc0a6 call FillMusicRAM1f - ld hl, $c0ae + ld hl, wc0ae call FillMusicRAM1f ld a, $1 - ld hl, $c0be + ld hl, wc0be call FillMusicRAM1f - ld hl, $c0b6 + ld hl, wc0b6 call FillMusicRAM1f - ld hl, $c0c6 + ld hl, wc0c6 call FillMusicRAM1f - ld [$c0e8], a + ld [wc0e8], a ld a, $ff - ld [$c004], a + ld [wc004], a xor a ld [$ff24], a ld a, $8 @@ -1366,9 +1366,9 @@ Func_7d9c2: ; 7d9c2 (1f:59c2) ld de, SFX_Headers_1f add hl, de ld a, h - ld [$c0ec], a + ld [wc0ec], a ld a, l - ld [$c0ed], a + ld [wc0ed], a ld a, [hl] and $c0 rlca @@ -1381,9 +1381,9 @@ Func_7d9c2: ; 7d9c2 (1f:59c2) add c ld c, a ld b, $0 - ld a, [$c0ec] + ld a, [wc0ec] ld h, a - ld a, [$c0ed] + ld a, [wc0ed] ld l, a add hl, bc ld c, d @@ -1391,7 +1391,7 @@ Func_7d9c2: ; 7d9c2 (1f:59c2) and $f ld e, a ld d, $0 - ld hl, $c026 + ld hl, wc026 add hl, de ld a, [hl] and a @@ -1399,7 +1399,7 @@ Func_7d9c2: ; 7d9c2 (1f:59c2) ld a, e cp $7 jr nz, .asm_7da0e - ld a, [$c001] + ld a, [wc001] cp $14 jr nc, .asm_7da07 ret @@ -1409,7 +1409,7 @@ Func_7d9c2: ; 7d9c2 (1f:59c2) jr z, .asm_7da17 jr c, .asm_7da17 .asm_7da0e - ld a, [$c001] + ld a, [wc001] cp [hl] jr z, .asm_7da17 jr c, .asm_7da17 @@ -1422,77 +1422,77 @@ Func_7d9c2: ; 7d9c2 (1f:59c2) add hl, hl ld d, h ld e, l - ld hl, $c016 + ld hl, wc016 add hl, de ld [hli], a ld [hl], a - ld hl, $c006 + ld hl, wc006 add hl, de ld [hli], a ld [hl], a pop de - ld hl, $c026 + ld hl, wc026 add hl, de ld [hl], a - ld hl, $c02e + ld hl, wc02e add hl, de ld [hl], a - ld hl, $c03e + ld hl, wc03e add hl, de ld [hl], a - ld hl, $c046 + ld hl, wc046 add hl, de ld [hl], a - ld hl, $c04e + ld hl, wc04e add hl, de ld [hl], a - ld hl, $c056 + ld hl, wc056 add hl, de ld [hl], a - ld hl, $c05e + ld hl, wc05e add hl, de ld [hl], a - ld hl, $c066 + ld hl, wc066 add hl, de ld [hl], a - ld hl, $c06e + ld hl, wc06e add hl, de ld [hl], a - ld hl, $c076 + ld hl, wc076 add hl, de ld [hl], a - ld hl, $c07e + ld hl, wc07e add hl, de ld [hl], a - ld hl, $c086 + ld hl, wc086 add hl, de ld [hl], a - ld hl, $c08e + ld hl, wc08e add hl, de ld [hl], a - ld hl, $c096 + ld hl, wc096 add hl, de ld [hl], a - ld hl, $c09e + ld hl, wc09e add hl, de ld [hl], a - ld hl, $c0a6 + ld hl, wc0a6 add hl, de ld [hl], a - ld hl, $c0ae + ld hl, wc0ae add hl, de ld [hl], a - ld hl, $c036 + ld hl, wc036 add hl, de ld [hl], a ld a, $1 - ld hl, $c0be + ld hl, wc0be add hl, de ld [hl], a - ld hl, $c0b6 + ld hl, wc0b6 add hl, de ld [hl], a - ld hl, $c0c6 + ld hl, wc0c6 add hl, de ld [hl], a ld a, e @@ -1526,24 +1526,24 @@ Func_7daa8: ; 7daa8 (1f:5aa8) ld a, $77 ld [$ff24], a xor a - ld [$c000], a - ld [$c003], a - ld [$c002], a - ld [$c0e9], a - ld [$c0eb], a - ld [$c0e6], a - ld [$c0e7], a + ld [wc000], a + ld [wc003], a + ld [wc002], a + ld [wc0e9], a + ld [wc0eb], a + ld [wc0e6], a + ld [wc0e7], a ld d, $a0 - ld hl, $c006 + ld hl, wc006 call FillMusicRAM1f ld a, $1 ld d, $18 - ld hl, $c0b6 + ld hl, wc0b6 call FillMusicRAM1f - ld [$c0e8], a - ld [$c0ea], a + ld [wc0e8], a + ld [wc0ea], a ld a, $ff - ld [$c004], a + ld [wc004], a ret ; fills d bytes at hl with a @@ -1556,7 +1556,7 @@ FillMusicRAM1f: ; 7dafd (1f:5afd) ret Func_7db03: ; 7db03 (1f:5b03) - ld a, [$c001] + ld a, [wc001] ld l, a ld e, a ld h, $0 @@ -1567,7 +1567,7 @@ Func_7db03: ; 7db03 (1f:5b03) add hl, de ld e, l ld d, h - ld hl, $c006 + ld hl, wc006 ld a, [de] ; get channel number ld b, a rlca @@ -1593,14 +1593,14 @@ Func_7db03: ; 7db03 (1f:5b03) push af ld b, $0 ld c, a - ld hl, $c026 + ld hl, wc026 add hl, bc - ld a, [$c001] + ld a, [wc001] ld [hl], a pop af cp $3 jr c, .asm_7db46 - ld hl, $c02e + ld hl, wc02e add hl, bc set 2, [hl] .asm_7db46 @@ -1619,32 +1619,32 @@ Func_7db03: ; 7db03 (1f:5b03) ld a, [de] inc de jr nz, .asm_7db25 - ld a, [$c001] + ld a, [wc001] cp $14 jr nc, .asm_7db5f jr .asm_7db89 .asm_7db5f - ld a, [$c001] + ld a, [wc001] cp $86 jr z, .asm_7db89 jr c, .asm_7db6a jr .asm_7db89 .asm_7db6a - ld hl, $c02a + ld hl, wc02a ld [hli], a ld [hli], a ld [hli], a ld [hl], a - ld hl, $c012 ; sfx noise channel pointer + ld hl, wc012 ; sfx noise channel pointer ld de, Noise1f_endchannel ld [hl], e inc hl ld [hl], d ; overwrite pointer to point to endchannel - ld a, [$c005] + ld a, [wc005] and a jr nz, .asm_7db89 ld a, [$ff24] - ld [$c005], a + ld [wc005], a ld a, $77 ld [$ff24], a .asm_7db89 -- cgit v1.3.1-sl0p From 0c7ed80e8f0db0e0a908e372a1bcd11ab7c06e0b Mon Sep 17 00:00:00 2001 From: "U-Fish-PC\\Daniel" Date: Mon, 9 Jun 2014 13:22:35 -0400 Subject: Improve music command names --- audio/engine_1.asm | 65 +++++++++++++++--------------- audio/engine_2.asm | 65 +++++++++++++++--------------- audio/engine_3.asm | 71 +++++++++++++++++---------------- audio/music/bikeriding.asm | 8 ++-- audio/music/celadon.asm | 6 +-- audio/music/cinnabar.asm | 6 +-- audio/music/cinnabarmansion.asm | 6 +-- audio/music/cities1.asm | 8 ++-- audio/music/cities2.asm | 6 +-- audio/music/credits.asm | 6 +-- audio/music/defeatedgymleader.asm | 8 ++-- audio/music/defeatedtrainer.asm | 12 +++--- audio/music/defeatedwildmon.asm | 8 ++-- audio/music/dungeon1.asm | 10 ++--- audio/music/dungeon2.asm | 6 +-- audio/music/dungeon3.asm | 24 +++++------ audio/music/finalbattle.asm | 6 +-- audio/music/gamecorner.asm | 6 +-- audio/music/gym.asm | 6 +-- audio/music/gymleaderbattle.asm | 6 +-- audio/music/halloffame.asm | 6 +-- audio/music/indigoplateau.asm | 6 +-- audio/music/introbattle.asm | 6 +-- audio/music/jigglypuffsong.asm | 6 +-- audio/music/lavender.asm | 6 +-- audio/music/meeteviltrainer.asm | 6 +-- audio/music/meetfemaletrainer.asm | 6 +-- audio/music/meetmaletrainer.asm | 6 +-- audio/music/meetprofoak.asm | 6 +-- audio/music/meetrival.asm | 16 ++++---- audio/music/museumguy.asm | 6 +-- audio/music/oakslab.asm | 6 +-- audio/music/pallettown.asm | 4 +- audio/music/pkmnhealed.asm | 6 +-- audio/music/pokecenter.asm | 6 +-- audio/music/pokemontower.asm | 6 +-- audio/music/routes1.asm | 6 +-- audio/music/routes2.asm | 4 +- audio/music/routes3.asm | 6 +-- audio/music/routes4.asm | 6 +-- audio/music/safarizone.asm | 6 +-- audio/music/silphco.asm | 26 ++++++------ audio/music/ssanne.asm | 6 +-- audio/music/surfing.asm | 6 +-- audio/music/titlescreen.asm | 4 +- audio/music/trainerbattle.asm | 6 +-- audio/music/unusedsong.asm | 10 ++--- audio/music/vermilion.asm | 6 +-- audio/music/wildbattle.asm | 6 +-- audio/music/yellow/meetjessiejames.asm | 4 +- audio/music/yellow/surfingpikachu.asm | 4 +- audio/music/yellow/yellowintro.asm | 4 +- audio/music/yellow/yellowunusedsong.asm | 4 +- audio/sfx/sfx_02_3a.asm | 6 +-- audio/sfx/sfx_02_3b.asm | 6 +-- audio/sfx/sfx_02_41.asm | 4 +- audio/sfx/sfx_02_42.asm | 6 +-- audio/sfx/sfx_08_3a.asm | 6 +-- audio/sfx/sfx_08_3b.asm | 6 +-- audio/sfx/sfx_08_46.asm | 6 +-- audio/sfx/sfx_08_pokeflute.asm | 2 +- audio/sfx/sfx_08_unused2.asm | 6 +-- audio/sfx/sfx_1f_3a.asm | 6 +-- audio/sfx/sfx_1f_3b.asm | 6 +-- audio/sfx/sfx_1f_41.asm | 4 +- audio/sfx/sfx_1f_42.asm | 6 +-- macros.asm | 12 +++--- 67 files changed, 321 insertions(+), 318 deletions(-) (limited to 'audio/engine_3.asm') diff --git a/audio/engine_1.asm b/audio/engine_1.asm index 774374f5..14733513 100644 --- a/audio/engine_1.asm +++ b/audio/engine_1.asm @@ -37,13 +37,14 @@ Func_9103:: ; 0x9103 ; this routine checks flags for music effects currently applied ; to the channel and calls certain functions based on flags. ; known flags for wc02e: +; 0: toggleperfectpitch has been used ; 1: call has been used ; 3: a toggle used only by this routine for vibrato ; 4: pitchbend flag ; 6: dutycycle flag Music2_ApplyMusicAffects: ; 0x9138 ld b, $0 - ld hl, wc0b6 ; delay unitl next note + ld hl, wc0b6 ; delay until next note add hl, bc ld a, [hl] cp $1 ; if the delay is 1, play next note @@ -328,7 +329,7 @@ Music2_loopchannel: ; 0x92a9 Music2_notetype: ; 0x92e4 and $f0 cp $d0 ; is this command a notetype? - jp nz, Music2_togglecall ; no + jp nz, Music2_toggleperfectpitch ; no ld a, d ; yes and $f ld b, $0 @@ -369,16 +370,16 @@ Music2_notetype: ; 0x92e4 .noiseChannel jp Music2_endchannel -Music2_togglecall: ; 0x9323 +Music2_toggleperfectpitch: ; 0x9323 ld a, d - cp $e8 ; is this command an togglecall? + cp $e8 ; is this command a toggleperfectpitch? jr nz, Music2_vibrato ; no ld b, $0 ; yes ld hl, wc02e add hl, bc ld a, [hl] xor $1 - ld [hl], a ; flip bit 0 of wc02e (toggle returning from call) + ld [hl], a ; flip bit 0 of wc02e jp Music2_endchannel Music2_vibrato: ; 0x9335 @@ -461,7 +462,7 @@ Music2_duty: ; 0x93a5 Music2_tempo: ; 0x93ba cp $ed ; is this command a tempo? - jr nz, Music2_unknownmusic0xee ; no + jr nz, Music2_stereopanning ; no ld a, c ; yes cp CH4 jr nc, .sfxChannel @@ -488,11 +489,11 @@ Music2_tempo: ; 0x93ba .musicChannelDone jp Music2_endchannel -Music2_unknownmusic0xee: ; 0x93fa - cp $ee ; is this command an unknownmusic0xee? +Music2_stereopanning: ; 0x93fa + cp $ee ; is this command a stereopanning? jr nz, Music2_unknownmusic0xef ; no call Music2_GetNextMusicByte ; yes - ld [wc004], a ; store first param + ld [wc004], a ; store panning jp Music2_endchannel ; this appears to never be used @@ -515,7 +516,7 @@ Music2_unknownmusic0xef ; 0x9407 Music2_dutycycle: ; 0x9426 cp $fc ; is this command a dutycycle? - jr nz, Music2_stereopanning ; no + jr nz, Music2_volume ; no call Music2_GetNextMusicByte ; yes ld b, $0 ld hl, wc046 @@ -530,11 +531,11 @@ Music2_dutycycle: ; 0x9426 set 6, [hl] ; set dutycycle flag jp Music2_endchannel -Music2_stereopanning: ; 0x9444 - cp $f0 ; is this command a stereopanning? +Music2_volume: ; 0x9444 + cp $f0 ; is this command a volume? jr nz, Music2_executemusic ; no call Music2_GetNextMusicByte ; yes - ld [$ff24], a ; store stereopanning + ld [$ff24], a ; store volume jp Music2_endchannel Music2_executemusic: ; 0x9450 @@ -794,12 +795,12 @@ Music2_notepitch: ; 0x9568 ld b, $0 ld hl, wc02e add hl, bc - bit 0, [hl] - jr z, .asm_95ef - inc e - jr nc, .asm_95ef + bit 0, [hl] ; has toggleperfectpitch been used? + jr z, .skip2 + inc e ; if yes, increment the pitch by 1 + jr nc, .skip2 inc d -.asm_95ef +.skip2 ld hl, wc066 add hl, bc ld [hl], e @@ -1254,7 +1255,7 @@ Func_9858: ; 0x9858 add hl, hl ld d, h ld e, l - ld hl, Unknown_9b2f + ld hl, Music2_Pitches add hl, de ld e, [hl] inc hl @@ -1665,18 +1666,18 @@ Unknown_9b27: ; 0x9b27 db $11, $22, $44, $88 ; channels 0-3 db $11, $22, $44, $88 ; channels 4-7 -Unknown_9b2f: ; 0x9b2f - dw $F82C - dw $F89D - dw $F907 - dw $F96B - dw $F9CA - dw $FA23 - dw $FA77 - dw $FAC7 - dw $FB12 - dw $FB58 - dw $FB9B - dw $FBDA +Music2_Pitches: ; 0x9b2f + dw $F82C ; C_ + dw $F89D ; C# + dw $F907 ; D_ + dw $F96B ; D# + dw $F9CA ; E_ + dw $FA23 ; F_ + dw $FA77 ; F# + dw $FAC7 ; G_ + dw $FB12 ; G# + dw $FB58 ; A_ + dw $FB9B ; A# + dw $FBDA ; B_ diff --git a/audio/engine_2.asm b/audio/engine_2.asm index 68a905c3..8052a393 100644 --- a/audio/engine_2.asm +++ b/audio/engine_2.asm @@ -37,13 +37,14 @@ Func_21879:: ; 21879 (8:5879) ; this routine checks flags for music effects currently applied ; to the channel and calls certain functions based on flags. ; known flags for wc02e: +; 0: toggleperfectpitch has been used ; 1: call has been used ; 3: a toggle used only by this routine for vibrato ; 4: pitchbend flag ; 6: dutycycle flag Music8_ApplyMusicAffects: ; 218ae (8:58ae) ld b, $0 - ld hl, wc0b6 ; delay unitl next note + ld hl, wc0b6 ; delay until next note add hl, bc ld a, [hl] cp $1 ; if the delay is 1, play next note @@ -335,7 +336,7 @@ Music8_loopchannel: ; 21a2a (8:5a2a) Music8_notetype: ; 21a65 (8:5a65) and $f0 cp $d0 ; is this command a notetype? - jp nz, Music8_togglecall ; no + jp nz, Music8_toggleperfectpitch ; no ld a, d ; yes and $f ld b, $0 @@ -376,16 +377,16 @@ Music8_notetype: ; 21a65 (8:5a65) .noiseChannel jp Music8_endchannel -Music8_togglecall: ; 21aa4 (8:5aa4) +Music8_toggleperfectpitch: ; 21aa4 (8:5aa4) ld a, d - cp $e8 ; is this command an togglecall? + cp $e8 ; is this command a toggleperfectpitch? jr nz, Music8_vibrato ; no ld b, $0 ; yes ld hl, wc02e add hl, bc ld a, [hl] xor $1 - ld [hl], a ; flip bit 0 of wc02e (toggle returning from call) + ld [hl], a ; flip bit 0 of wc02e jp Music8_endchannel Music8_vibrato: ; 21ab6 (8:5ab6) @@ -468,7 +469,7 @@ Music8_duty: ; 21b26 (8:5b26) Music8_tempo: ; 21b3b (8:5b3b) cp $ed ; is this command a tempo? - jr nz, Music8_unknownmusic0xee ; no + jr nz, Music8_stereopanning ; no ld a, c ; yes cp CH4 jr nc, .sfxChannel @@ -495,11 +496,11 @@ Music8_tempo: ; 21b3b (8:5b3b) .musicChannelDone jp Music8_endchannel -Music8_unknownmusic0xee: ; 21b7b (8:5b7b) - cp $ee ; is this command an unknownmusic0xee? +Music8_stereopanning: ; 21b7b (8:5b7b) + cp $ee ; is this command a stereopanning? jr nz, Music8_unknownmusic0xef ; no call Music8_GetNextMusicByte ; yes - ld [wc004], a ; store first param + ld [wc004], a ; store panning jp Music8_endchannel ; this appears to never be used @@ -522,7 +523,7 @@ Music8_unknownmusic0xef: ; 21b88 (8:5b88) Music8_dutycycle: ; 21ba7 (8:5ba7) cp $fc ; is this command a dutycycle? - jr nz, Music8_stereopanning ; no + jr nz, Music8_volume ; no call Music8_GetNextMusicByte ; yes ld b, $0 ld hl, wc046 @@ -537,11 +538,11 @@ Music8_dutycycle: ; 21ba7 (8:5ba7) set 6, [hl] ; set dutycycle flag jp Music8_endchannel -Music8_stereopanning: ; 21bc5 (8:5bc5) - cp $f0 ; is this command a stereopanning? +Music8_volume: ; 21bc5 (8:5bc5) + cp $f0 ; is this command a volume? jr nz, Music8_executemusic ; no call Music8_GetNextMusicByte ; yes - ld [$ff24], a + ld [$ff24], a ; store volume jp Music8_endchannel Music8_executemusic: ; 21bd1 (8:5bd1) @@ -801,12 +802,12 @@ Music8_notepitch: ; 21ce9 (8:5ce9) ld b, $0 ld hl, wc02e add hl, bc - bit 0, [hl] - jr z, .asm_21d70 - inc e - jr nc, .asm_21d70 + bit 0, [hl] ; has toggleperfectpitch been used? + jr z, .skip2 + inc e ; if yes, increment the pitch by 1 + jr nc, .skip2 inc d -.asm_21d70 +.skip2 ld hl, wc066 add hl, bc ld [hl], e @@ -1305,7 +1306,7 @@ Func_22017: ; 22017 (8:6017) add hl, hl ld d, h ld e, l - ld hl, Unknown_222ee + ld hl, Music8_Pitches add hl, de ld e, [hl] inc hl @@ -1716,18 +1717,18 @@ Unknown_222e6: ; 222e6 (8:62e6) db $11, $22, $44, $88 ; channels 0-3 db $11, $22, $44, $88 ; channels 4-7 -Unknown_222ee: ; 222ee (8:62ee) - dw $F82C - dw $F89D - dw $F907 - dw $F96B - dw $F9CA - dw $FA23 - dw $FA77 - dw $FAC7 - dw $FB12 - dw $FB58 - dw $FB9B - dw $FBDA +Music8_Pitches: ; 222ee (8:62ee) + dw $F82C ; C_ + dw $F89D ; C# + dw $F907 ; D_ + dw $F96B ; D# + dw $F9CA ; E_ + dw $FA23 ; F_ + dw $FA77 ; F# + dw $FAC7 ; G_ + dw $FB12 ; G# + dw $FB58 ; A_ + dw $FB9B ; A# + dw $FBDA ; B_ diff --git a/audio/engine_3.asm b/audio/engine_3.asm index d215c56d..27b49860 100644 --- a/audio/engine_3.asm +++ b/audio/engine_3.asm @@ -26,7 +26,7 @@ Func_7d177:: ; 7d177 (1f:5177) ld [$ff1a], a jr .nextChannel .applyAffects - call Music1f_Music2_ApplyMusicAffects + call Music1f_ApplyMusicAffects .nextChannel ld a, c inc c ; inc channel number @@ -37,17 +37,18 @@ Func_7d177:: ; 7d177 (1f:5177) ; this routine checks flags for music effects currently applied ; to the channel and calls certain functions based on flags. ; known flags for wc02e: +; 0: toggleperfectpitch has been used ; 1: call has been used ; 3: a toggle used only by this routine for vibrato ; 4: pitchbend flag ; 6: dutycycle flag -Music1f_Music2_ApplyMusicAffects: ; 7d1ac (1f:51ac) +Music1f_ApplyMusicAffects: ; 7d1ac (1f:51ac) ld b, $0 ld hl, wc0b6 ; delay until next note add hl, bc ld a, [hl] cp $1 ; if delay is 1, play next note - jp z, Music1f_Music2_PlayNextNote + jp z, Music1f_PlayNextNote dec a ; otherwise, decrease the delay timer ld [hl], a ld a, c @@ -147,7 +148,7 @@ Music1f_Music2_ApplyMusicAffects: ; 7d1ac (1f:51ac) ; this routine executes all music commands that take up no time, ; like tempo changes, duty changes etc. and doesn't return ; until the first note is reached -Music1f_Music2_PlayNextNote: ; 7d244 (1f:5244) +Music1f_PlayNextNote: ; 7d244 (1f:5244) ld hl, wc06e add hl, bc ld a, [hl] @@ -328,7 +329,7 @@ Music1f_loopchannel: ; 7d31d (1f:531d) Music1f_notetype: ; 7d358 (1f:5358) and $f0 cp $d0 ; is this command a notetype? - jp nz, Music1f_togglecall ; no + jp nz, Music1f_toggleperfectpitch ; no ld a, d ; yes and $f ld b, $0 @@ -369,16 +370,16 @@ Music1f_notetype: ; 7d358 (1f:5358) .noiseChannel jp Music1f_endchannel -Music1f_togglecall: ; 7d397 (1f:5397) +Music1f_toggleperfectpitch: ; 7d397 (1f:5397) ld a, d - cp $e8 ; is this command an togglecall? + cp $e8 ; is this command a toggleperfectpitch? jr nz, Music1f_vibrato ; no ld b, $0 ; yes ld hl, wc02e add hl, bc ld a, [hl] xor $1 - ld [hl], a ; flip bit 0 of wc02e (toggle returning from call) + ld [hl], a ; flip bit 0 of wc02e jp Music1f_endchannel Music1f_vibrato: ; 7d3a9 (1f:53a9) @@ -461,7 +462,7 @@ Music1f_duty: ; 7d419 (1f:5419) Music1f_tempo: ; 7d42e (1f:542e) cp $ed ; is this command a tempo? - jr nz, Music1f_unknownmusic0xee ; no + jr nz, Music1f_stereopanning ; no ld a, c ; yes cp CH4 jr nc, .sfxChannel @@ -488,11 +489,11 @@ Music1f_tempo: ; 7d42e (1f:542e) .musicChannelDone jp Music1f_endchannel -Music1f_unknownmusic0xee: ; 7d46e (1f:546e) - cp $ee ; is this command an unknownmusic0xee? +Music1f_stereopanning: ; 7d46e (1f:546e) + cp $ee ; is this command a stereopanning? jr nz, Music1f_unknownmusic0xef ; no call Music1f_GetNextMusicByte ; yes - ld [wc004], a ; store first param + ld [wc004], a ; store panning jp Music1f_endchannel ; this appears to never be used @@ -515,7 +516,7 @@ Music1f_unknownmusic0xef: ; 7d47b (1f:547b) Music1f_dutycycle: ; 7d49a (1f:549a) cp $fc ; is this command a dutycycle? - jr nz, Music1f_stereopanning ; no + jr nz, Music1f_volume ; no call Music1f_GetNextMusicByte ; yes ld b, $0 ld hl, wc046 @@ -530,11 +531,11 @@ Music1f_dutycycle: ; 7d49a (1f:549a) set 6, [hl] ; set duty flag jp Music1f_endchannel -Music1f_stereopanning: ; 7d4b8 (1f:54b8) - cp $f0 ; is this command a stereopanning? +Music1f_volume: ; 7d4b8 (1f:54b8) + cp $f0 ; is this command a volume? jr nz, Music1f_executemusic ; no call Music1f_GetNextMusicByte ; yes - ld [$ff24], a ; store stereopanning + ld [$ff24], a ; store volume jp Music1f_endchannel Music1f_executemusic: ; 7d4c4 (1f:54c4) @@ -794,12 +795,12 @@ Music1f_notepitch: ; 7d5dc (1f:55dc) ld b, $0 ld hl, wc02e add hl, bc - bit 0, [hl] - jr z, .asm_7d663 - inc e - jr nc, .asm_7d663 + bit 0, [hl] ; has toggleperfectpitch been used? + jr z, .skip2 + inc e ; if yes, increment the pitch by 1 + jr nc, .skip2 inc d -.asm_7d663 +.skip2 ld hl, wc066 add hl, bc ld [hl], e @@ -1254,7 +1255,7 @@ Func_7d8cc: ; 7d8cc (1f:58cc) add hl, hl ld d, h ld e, l - ld hl, Unknown_7dba3 + ld hl, Music1f_Pitches add hl, de ld e, [hl] inc hl @@ -1665,18 +1666,18 @@ Unknown_7db9b: ; 7db9b (1f:5b9b) db $11, $22, $44, $88 ; channels 0-3 db $11, $22, $44, $88 ; channels 4-7 -Unknown_7dba3: ; 7dba3 (1f:5ba3) - dw $F82C - dw $F89D - dw $F907 - dw $F96B - dw $F9CA - dw $FA23 - dw $FA77 - dw $FAC7 - dw $FB12 - dw $FB58 - dw $FB9B - dw $FBDA +Music1f_Pitches: ; 7dba3 (1f:5ba3) + dw $F82C ; C_ + dw $F89D ; C# + dw $F907 ; D_ + dw $F96B ; D# + dw $F9CA ; E_ + dw $FA23 ; F_ + dw $FA77 ; F# + dw $FAC7 ; G_ + dw $FB12 ; G# + dw $FB58 ; A_ + dw $FB9B ; A# + dw $FBDA ; B_ diff --git a/audio/music/bikeriding.asm b/audio/music/bikeriding.asm index 13776fe1..dded207e 100644 --- a/audio/music/bikeriding.asm +++ b/audio/music/bikeriding.asm @@ -1,6 +1,6 @@ Music_BikeRiding_Ch1:: ; 7dbbb (1f:5bbb) - tempo 0, 144 - stereopanning 119 + tempo 144 + volume 7, 7 duty 3 vibrato 8, 1, 4 notetype 12, 11, 5 @@ -47,7 +47,7 @@ Music_BikeRiding_branch_7dbc9:: note D_, 2 note E_, 2 note F_, 6 - togglecall + toggleperfectpitch notetype 12, 11, 3 note E_, 2 note D_, 2 @@ -56,7 +56,7 @@ Music_BikeRiding_branch_7dbc9:: note F_, 2 note E_, 1 note F_, 1 - togglecall + toggleperfectpitch notetype 12, 11, 5 note G_, 6 note G_, 6 diff --git a/audio/music/celadon.asm b/audio/music/celadon.asm index a965bc80..e07d8fef 100644 --- a/audio/music/celadon.asm +++ b/audio/music/celadon.asm @@ -1,8 +1,8 @@ Music_Celadon_Ch1:: ; b6c7 (2:76c7) - tempo 0, 144 - stereopanning 119 + tempo 144 + volume 7, 7 duty 3 - togglecall + toggleperfectpitch notetype 12, 2, 15 rest 8 octave 3 diff --git a/audio/music/cinnabar.asm b/audio/music/cinnabar.asm index db344c64..12048703 100644 --- a/audio/music/cinnabar.asm +++ b/audio/music/cinnabar.asm @@ -1,9 +1,9 @@ Music_Cinnabar_Ch1:: ; b86d (2:786d) - tempo 0, 144 - stereopanning 119 + tempo 144 + volume 7, 7 duty 3 vibrato 12, 3, 4 - togglecall + toggleperfectpitch Music_Cinnabar_branch_b878:: notetype 12, 11, 5 diff --git a/audio/music/cinnabarmansion.asm b/audio/music/cinnabarmansion.asm index 1560e89d..3a5ec6e3 100644 --- a/audio/music/cinnabarmansion.asm +++ b/audio/music/cinnabarmansion.asm @@ -1,6 +1,6 @@ Music_CinnabarMansion_Ch1:: ; 7ed0f (1f:6d0f) - tempo 0, 144 - stereopanning 119 + tempo 144 + volume 7, 7 vibrato 11, 2, 5 duty 2 @@ -40,7 +40,7 @@ Music_CinnabarMansion_branch_7ed19:: Music_CinnabarMansion_Ch2:: ; 7ed40 (1f:6d40) duty 2 - togglecall + toggleperfectpitch vibrato 10, 2, 4 notetype 12, 12, 2 diff --git a/audio/music/cities1.asm b/audio/music/cities1.asm index f7b9cc81..03ac21e0 100644 --- a/audio/music/cities1.asm +++ b/audio/music/cities1.asm @@ -1,12 +1,12 @@ Music_Cities1_branch_aa6f:: - tempo 0, 232 + tempo 232 loopchannel 0, Music_Cities1_branch_aa79 Music_Cities1_Ch1:: ; aa76 (2:6a76) - tempo 0, 144 + tempo 144 Music_Cities1_branch_aa79:: - stereopanning 119 + volume 7, 7 vibrato 8, 2, 4 duty 3 @@ -403,7 +403,7 @@ Music_Cities1_branch_ac00:: Music_Cities1_Ch3:: ; ac32 (2:6c32) notetype 12, 1, 1 - togglecall + toggleperfectpitch Music_Cities1_branch_ac35:: vibrato 0, 0, 0 diff --git a/audio/music/cities2.asm b/audio/music/cities2.asm index 97eadde8..3f5f8c28 100644 --- a/audio/music/cities2.asm +++ b/audio/music/cities2.asm @@ -1,9 +1,9 @@ Music_Cities2_Ch1:: ; b504 (2:7504) - tempo 0, 148 - stereopanning 119 + tempo 148 + volume 7, 7 duty 3 vibrato 8, 3, 2 - togglecall + toggleperfectpitch notetype 12, 11, 6 rest 8 octave 3 diff --git a/audio/music/credits.asm b/audio/music/credits.asm index cdedef62..e057730d 100644 --- a/audio/music/credits.asm +++ b/audio/music/credits.asm @@ -1,9 +1,9 @@ Music_Credits_Ch1:: ; 7fc1f (1f:7c1f) - tempo 0, 140 - stereopanning 119 + tempo 140 + volume 7, 7 duty 3 vibrato 8, 3, 4 - togglecall + toggleperfectpitch notetype 12, 11, 5 octave 4 note E_, 6 diff --git a/audio/music/defeatedgymleader.asm b/audio/music/defeatedgymleader.asm index 0e24d904..b5bf18d9 100644 --- a/audio/music/defeatedgymleader.asm +++ b/audio/music/defeatedgymleader.asm @@ -1,10 +1,10 @@ Music_DefeatedGymLeader_Ch1:: ; 23cad (8:7cad) - tempo 0, 112 - stereopanning 119 + tempo 112 + volume 7, 7 duty 3 vibrato 18, 3, 1 - togglecall - tempo 0, 112 + toggleperfectpitch + tempo 112 notetype 12, 10, 6 octave 4 note D_, 6 diff --git a/audio/music/defeatedtrainer.asm b/audio/music/defeatedtrainer.asm index 5585066a..0f7a91dc 100644 --- a/audio/music/defeatedtrainer.asm +++ b/audio/music/defeatedtrainer.asm @@ -1,13 +1,13 @@ Music_DefeatedTrainer_Ch1:: ; 23a53 (8:7a53) - tempo 0, 224 - stereopanning 119 + tempo 224 + volume 7, 7 duty 2 - togglecall - tempo 0, 224 + toggleperfectpitch + tempo 224 notetype 4, 10, 2 octave 4 note D_, 2 - tempo 0, 224 + tempo 224 notetype 4, 10, 2 note D_, 2 note D_, 2 @@ -19,7 +19,7 @@ Music_DefeatedTrainer_Ch1:: ; 23a53 (8:7a53) notetype 4, 11, 3 note F#, 12 duty 1 - tempo 0, 224 + tempo 224 Music_DefeatedTrainer_branch_23a76:: notetype 4, 6, 3 diff --git a/audio/music/defeatedwildmon.asm b/audio/music/defeatedwildmon.asm index c56c6471..6340afd3 100644 --- a/audio/music/defeatedwildmon.asm +++ b/audio/music/defeatedwildmon.asm @@ -1,11 +1,11 @@ Music_DefeatedWildMon_Ch1:: ; 23b74 (8:7b74) - tempo 0, 112 - stereopanning 119 + tempo 112 + volume 7, 7 executemusic duty 3 vibrato 6, 3, 4 - togglecall - tempo 0, 112 + toggleperfectpitch + tempo 112 notetype 12, 11, 7 octave 3 note B_, 1 diff --git a/audio/music/dungeon1.asm b/audio/music/dungeon1.asm index c9bf6dba..bebb6091 100644 --- a/audio/music/dungeon1.asm +++ b/audio/music/dungeon1.asm @@ -1,15 +1,15 @@ Music_Dungeon1_Ch1:: ; 7ded1 (1f:5ed1) - tempo 0, 144 - stereopanning 119 + tempo 144 + volume 7, 7 duty 3 - togglecall + toggleperfectpitch vibrato 10, 1, 4 notetype 12, 4, 13 rest 8 - unknownmusic0xee 237 + stereopanning 237 octave 4 note F#, 8 - unknownmusic0xee 255 + stereopanning 255 Music_Dungeon1_branch_7dee5:: notetype 12, 11, 2 diff --git a/audio/music/dungeon2.asm b/audio/music/dungeon2.asm index 028d6785..98e39dcf 100644 --- a/audio/music/dungeon2.asm +++ b/audio/music/dungeon2.asm @@ -1,8 +1,8 @@ Music_Dungeon2_Ch1:: ; 7e887 (1f:6887) - tempo 0, 144 - stereopanning 119 + tempo 144 + volume 7, 7 duty 3 - togglecall + toggleperfectpitch vibrato 10, 1, 4 Music_Dungeon2_branch_7e892:: diff --git a/audio/music/dungeon3.asm b/audio/music/dungeon3.asm index dd4acc4c..8d13d5c7 100644 --- a/audio/music/dungeon3.asm +++ b/audio/music/dungeon3.asm @@ -1,8 +1,8 @@ Music_Dungeon3_Ch1:: ; 7e9f1 (1f:69f1) - tempo 0, 160 - stereopanning 119 + tempo 160 + volume 7, 7 duty 3 - togglecall + toggleperfectpitch vibrato 8, 1, 4 Music_Dungeon3_branch_7e9fc:: @@ -243,7 +243,7 @@ Music_Dungeon3_branch_7eaf7:: endchannel Music_Dungeon3_branch_7eafc:: - tempo 0, 168 + tempo 168 octave 1 note A#, 1 note B_, 1 @@ -254,7 +254,7 @@ Music_Dungeon3_branch_7eafc:: note D#, 1 note E_, 1 note F_, 1 - tempo 0, 176 + tempo 176 octave 1 note A#, 1 note B_, 1 @@ -265,7 +265,7 @@ Music_Dungeon3_branch_7eafc:: note D#, 1 note E_, 1 note F_, 1 - tempo 0, 184 + tempo 184 octave 1 note A#, 1 note B_, 1 @@ -276,7 +276,7 @@ Music_Dungeon3_branch_7eafc:: note D#, 1 note E_, 1 note F_, 1 - tempo 0, 192 + tempo 192 octave 1 note A_, 1 note A#, 1 @@ -287,7 +287,7 @@ Music_Dungeon3_branch_7eafc:: note D_, 1 note D#, 1 note E_, 1 - tempo 0, 200 + tempo 200 octave 1 note G#, 1 note A_, 1 @@ -298,7 +298,7 @@ Music_Dungeon3_branch_7eafc:: note C#, 1 note D_, 1 note D#, 1 - tempo 0, 208 + tempo 208 octave 1 note G_, 1 note G#, 1 @@ -309,7 +309,7 @@ Music_Dungeon3_branch_7eafc:: note C_, 1 note C#, 1 note D_, 1 - tempo 0, 216 + tempo 216 octave 1 note F#, 1 note G_, 1 @@ -320,7 +320,7 @@ Music_Dungeon3_branch_7eafc:: octave 2 note C_, 1 note C#, 1 - tempo 0, 224 + tempo 224 octave 1 note F_, 1 note F#, 1 @@ -331,7 +331,7 @@ Music_Dungeon3_branch_7eafc:: note B_, 1 octave 2 note C_, 1 - tempo 0, 160 + tempo 160 endchannel diff --git a/audio/music/finalbattle.asm b/audio/music/finalbattle.asm index c0b7e144..80882db7 100644 --- a/audio/music/finalbattle.asm +++ b/audio/music/finalbattle.asm @@ -1,9 +1,9 @@ Music_FinalBattle_Ch1:: ; 233a6 (8:73a6) - tempo 0, 112 - stereopanning 119 + tempo 112 + volume 7, 7 duty 3 vibrato 6, 3, 4 - togglecall + toggleperfectpitch notetype 12, 11, 2 octave 3 note F#, 1 diff --git a/audio/music/gamecorner.asm b/audio/music/gamecorner.asm index ea89ff2f..33a49243 100644 --- a/audio/music/gamecorner.asm +++ b/audio/music/gamecorner.asm @@ -1,9 +1,9 @@ Music_GameCorner_Ch1:: ; 7e20b (1f:620b) - tempo 0, 120 - stereopanning 119 + tempo 120 + volume 7, 7 duty 3 vibrato 12, 3, 4 - togglecall + toggleperfectpitch notetype 12, 11, 5 octave 3 note A_, 6 diff --git a/audio/music/gym.asm b/audio/music/gym.asm index b846ca73..44cc0cb8 100644 --- a/audio/music/gym.asm +++ b/audio/music/gym.asm @@ -1,9 +1,9 @@ Music_Gym_Ch1:: ; bcbb (2:7cbb) - tempo 0, 138 - stereopanning 119 + tempo 138 + volume 7, 7 duty 3 vibrato 8, 2, 2 - togglecall + toggleperfectpitch notetype 12, 11, 5 octave 3 note G_, 6 diff --git a/audio/music/gymleaderbattle.asm b/audio/music/gymleaderbattle.asm index 97162408..edd73717 100644 --- a/audio/music/gymleaderbattle.asm +++ b/audio/music/gymleaderbattle.asm @@ -1,9 +1,9 @@ Music_GymLeaderBattle_Ch1:: ; 22370 (8:6370) - tempo 0, 104 - stereopanning 119 + tempo 104 + volume 7, 7 duty 3 vibrato 8, 3, 4 - togglecall + toggleperfectpitch notetype 12, 11, 3 rest 6 octave 3 diff --git a/audio/music/halloffame.asm b/audio/music/halloffame.asm index 2900cec7..e9df42e4 100644 --- a/audio/music/halloffame.asm +++ b/audio/music/halloffame.asm @@ -1,9 +1,9 @@ Music_HallOfFame_Ch1:: ; 7fbaf (1f:7baf) - tempo 0, 112 - stereopanning 119 + tempo 112 + volume 7, 7 duty 3 vibrato 12, 2, 2 - togglecall + toggleperfectpitch notetype 12, 11, 3 rest 16 rest 16 diff --git a/audio/music/indigoplateau.asm b/audio/music/indigoplateau.asm index e0ea6ff3..28f40cec 100644 --- a/audio/music/indigoplateau.asm +++ b/audio/music/indigoplateau.asm @@ -1,9 +1,9 @@ Music_IndigoPlateau_Ch1:: ; a5f0 (2:65f0) - tempo 0, 132 - stereopanning 119 + tempo 132 + volume 7, 7 duty 3 vibrato 6, 3, 4 - togglecall + toggleperfectpitch notetype 12, 11, 2 octave 2 note A_, 8 diff --git a/audio/music/introbattle.asm b/audio/music/introbattle.asm index 81730736..1297ddf4 100644 --- a/audio/music/introbattle.asm +++ b/audio/music/introbattle.asm @@ -1,9 +1,9 @@ Music_IntroBattle_Ch1:: ; 7f844 (1f:7844) - tempo 0, 98 - stereopanning 119 + tempo 98 + volume 7, 7 duty 3 vibrato 6, 3, 4 - togglecall + toggleperfectpitch notetype 12, 11, 1 rest 8 octave 2 diff --git a/audio/music/jigglypuffsong.asm b/audio/music/jigglypuffsong.asm index b3c6fb4b..216a3166 100644 --- a/audio/music/jigglypuffsong.asm +++ b/audio/music/jigglypuffsong.asm @@ -1,10 +1,10 @@ Music_JigglypuffSong_Ch1:: ; 7fb7d (1f:7b7d) - tempo 0, 144 - stereopanning 119 + tempo 144 + volume 7, 7 vibrato 8, 2, 4 duty 2 dutycycle 165 - togglecall + toggleperfectpitch notetype 13, 6, 7 octave 4 note E_, 8 diff --git a/audio/music/lavender.asm b/audio/music/lavender.asm index 318da8a8..b506508a 100644 --- a/audio/music/lavender.asm +++ b/audio/music/lavender.asm @@ -1,8 +1,8 @@ Music_Lavender_Ch1:: ; bb58 (2:7b58) - tempo 0, 152 - stereopanning 119 + tempo 152 + volume 7, 7 duty 1 - togglecall + toggleperfectpitch vibrato 0, 8, 8 notetype 12, 8, 7 rest 16 diff --git a/audio/music/meeteviltrainer.asm b/audio/music/meeteviltrainer.asm index 46385127..b8266fd7 100644 --- a/audio/music/meeteviltrainer.asm +++ b/audio/music/meeteviltrainer.asm @@ -1,8 +1,8 @@ Music_MeetEvilTrainer_Ch1:: ; 7f69d (1f:769d) - tempo 0, 124 - stereopanning 119 + tempo 124 + volume 7, 7 duty 2 - togglecall + toggleperfectpitch notetype 12, 11, 1 rest 4 octave 3 diff --git a/audio/music/meetfemaletrainer.asm b/audio/music/meetfemaletrainer.asm index 1b097f58..69130fb3 100644 --- a/audio/music/meetfemaletrainer.asm +++ b/audio/music/meetfemaletrainer.asm @@ -1,8 +1,8 @@ Music_MeetFemaleTrainer_Ch1:: ; 7f6f9 (1f:76f9) - tempo 0, 124 - stereopanning 119 + tempo 124 + volume 7, 7 duty 1 - togglecall + toggleperfectpitch notetype 12, 11, 2 octave 3 note G#, 6 diff --git a/audio/music/meetmaletrainer.asm b/audio/music/meetmaletrainer.asm index 3c56aca6..f3b19ab5 100644 --- a/audio/music/meetmaletrainer.asm +++ b/audio/music/meetmaletrainer.asm @@ -1,9 +1,9 @@ Music_MeetMaleTrainer_Ch1:: ; 7f77b (1f:777b) - tempo 0, 112 - stereopanning 119 + tempo 112 + volume 7, 7 duty 3 vibrato 20, 3, 3 - togglecall + toggleperfectpitch notetype 12, 11, 4 octave 3 note C#, 1 diff --git a/audio/music/meetprofoak.asm b/audio/music/meetprofoak.asm index 303dd2f7..35d4ccdb 100644 --- a/audio/music/meetprofoak.asm +++ b/audio/music/meetprofoak.asm @@ -1,8 +1,8 @@ Music_MeetProfOak_Ch1:: ; af59 (2:6f59) - tempo 0, 112 - stereopanning 119 + tempo 112 + volume 7, 7 duty 3 - togglecall + toggleperfectpitch notetype 12, 11, 4 octave 3 note F#, 1 diff --git a/audio/music/meetrival.asm b/audio/music/meetrival.asm index 1e45ba42..8d956626 100644 --- a/audio/music/meetrival.asm +++ b/audio/music/meetrival.asm @@ -1,15 +1,15 @@ Music_MeetRival_branch_b119:: - tempo 0, 100 + tempo 100 loopchannel 0, Music_MeetRival_branch_b123 Music_MeetRival_Ch1:: ; b120 (2:7120) - tempo 0, 112 + tempo 112 Music_MeetRival_branch_b123:: - stereopanning 119 + volume 7, 7 duty 3 vibrato 6, 3, 4 - togglecall + toggleperfectpitch notetype 12, 11, 3 octave 4 note D_, 1 @@ -120,17 +120,17 @@ Music_MeetRival_branch_b140:: loopchannel 0, Music_MeetRival_branch_b140 Music_MeetRival_branch_b19b:: - tempo 0, 100 + tempo 100 loopchannel 0, Music_MeetRival_branch_b1a5 Music_MeetRival_branch_b1a2:: - tempo 0, 112 + tempo 112 Music_MeetRival_branch_b1a5:: - stereopanning 119 + volume 7, 7 duty 3 vibrato 6, 3, 4 - togglecall + toggleperfectpitch notetype 12, 11, 3 octave 3 note D_, 1 diff --git a/audio/music/museumguy.asm b/audio/music/museumguy.asm index 0f3b266f..083222c0 100644 --- a/audio/music/museumguy.asm +++ b/audio/music/museumguy.asm @@ -1,8 +1,8 @@ Music_MuseumGuy_Ch1:: ; adae (2:6dae) - tempo 0, 128 - stereopanning 119 + tempo 128 + volume 7, 7 duty 2 - togglecall + toggleperfectpitch notetype 12, 11, 1 octave 3 note B_, 2 diff --git a/audio/music/oakslab.asm b/audio/music/oakslab.asm index f7302471..92ed2be4 100644 --- a/audio/music/oakslab.asm +++ b/audio/music/oakslab.asm @@ -1,9 +1,9 @@ Music_OaksLab_Ch1:: ; 7eeb9 (1f:6eb9) - tempo 0, 140 - stereopanning 119 + tempo 140 + volume 7, 7 duty 3 vibrato 16, 1, 2 - togglecall + toggleperfectpitch notetype 12, 11, 3 octave 2 note B_, 1 diff --git a/audio/music/pallettown.asm b/audio/music/pallettown.asm index 15162c3a..1a185d72 100644 --- a/audio/music/pallettown.asm +++ b/audio/music/pallettown.asm @@ -1,6 +1,6 @@ Music_PalletTown_Ch1:: ; a7c5 (2:67c5) - tempo 0, 160 - stereopanning 119 + tempo 160 + volume 7, 7 duty 2 notetype 12, 12, 3 diff --git a/audio/music/pkmnhealed.asm b/audio/music/pkmnhealed.asm index 9a16b435..61e7fea8 100644 --- a/audio/music/pkmnhealed.asm +++ b/audio/music/pkmnhealed.asm @@ -1,8 +1,8 @@ Music_PkmnHealed_Ch1:: ; 9ba3 (2:5ba3) - tempo 0, 144 - stereopanning 119 + tempo 144 + volume 7, 7 duty 2 - togglecall + toggleperfectpitch notetype 12, 8, 1 rest 2 pitchbend 0, 75 diff --git a/audio/music/pokecenter.asm b/audio/music/pokecenter.asm index 4e139b9a..5c74592e 100644 --- a/audio/music/pokecenter.asm +++ b/audio/music/pokecenter.asm @@ -1,9 +1,9 @@ Music_Pokecenter_Ch1:: ; be56 (2:7e56) - tempo 0, 144 - stereopanning 119 + tempo 144 + volume 7, 7 duty 3 vibrato 10, 2, 2 - togglecall + toggleperfectpitch Music_Pokecenter_branch_be61:: notetype 12, 10, 3 diff --git a/audio/music/pokemontower.asm b/audio/music/pokemontower.asm index 915c656d..68651f38 100644 --- a/audio/music/pokemontower.asm +++ b/audio/music/pokemontower.asm @@ -1,8 +1,8 @@ Music_PokemonTower_Ch1:: ; 7f04a (1f:704a) - tempo 0, 152 - stereopanning 119 + tempo 152 + volume 7, 7 duty 3 - togglecall + toggleperfectpitch vibrato 12, 2, 3 notetype 12, 8, 0 rest 4 diff --git a/audio/music/routes1.asm b/audio/music/routes1.asm index a5c1b40d..bf425b5a 100644 --- a/audio/music/routes1.asm +++ b/audio/music/routes1.asm @@ -1,9 +1,9 @@ Music_Routes1_Ch1:: ; 9bde (2:5bde) - tempo 0, 152 - stereopanning 119 + tempo 152 + volume 7, 7 vibrato 4, 2, 3 duty 2 - togglecall + toggleperfectpitch Music_Routes1_branch_9be9:: notetype 12, 10, 1 diff --git a/audio/music/routes2.asm b/audio/music/routes2.asm index a1362569..732396c0 100644 --- a/audio/music/routes2.asm +++ b/audio/music/routes2.asm @@ -1,6 +1,6 @@ Music_Routes2_Ch1:: ; 9db9 (2:5db9) - tempo 0, 152 - stereopanning 119 + tempo 152 + volume 7, 7 vibrato 9, 2, 5 duty 1 diff --git a/audio/music/routes3.asm b/audio/music/routes3.asm index 781d5c32..b8cd4b47 100644 --- a/audio/music/routes3.asm +++ b/audio/music/routes3.asm @@ -1,9 +1,9 @@ Music_Routes3_Ch1:: ; 9fad (2:5fad) - tempo 0, 148 - stereopanning 119 + tempo 148 + volume 7, 7 duty 3 vibrato 6, 3, 4 - togglecall + toggleperfectpitch notetype 12, 11, 5 octave 3 note E_, 1 diff --git a/audio/music/routes4.asm b/audio/music/routes4.asm index 3f0858be..b897e3d6 100644 --- a/audio/music/routes4.asm +++ b/audio/music/routes4.asm @@ -1,9 +1,9 @@ Music_Routes4_Ch1:: ; a26a (2:626a) - tempo 0, 148 - stereopanning 119 + tempo 148 + volume 7, 7 duty 3 vibrato 10, 3, 4 - togglecall + toggleperfectpitch notetype 12, 10, 2 octave 2 note G#, 4 diff --git a/audio/music/safarizone.asm b/audio/music/safarizone.asm index 679ba0bd..69d97a49 100644 --- a/audio/music/safarizone.asm +++ b/audio/music/safarizone.asm @@ -1,8 +1,8 @@ Music_SafariZone_Ch1:: ; bc2e (2:7c2e) - tempo 0, 132 - stereopanning 119 + tempo 132 + volume 7, 7 vibrato 6, 3, 4 - togglecall + toggleperfectpitch duty 2 notetype 12, 9, 2 octave 3 diff --git a/audio/music/silphco.asm b/audio/music/silphco.asm index b6c70ec7..2906ac4c 100644 --- a/audio/music/silphco.asm +++ b/audio/music/silphco.asm @@ -1,8 +1,8 @@ Music_SilphCo_Ch1:: ; 7f243 (1f:7243) - tempo 0, 160 - stereopanning 119 + tempo 160 + volume 7, 7 duty 3 - togglecall + toggleperfectpitch vibrato 8, 2, 2 notetype 6, 11, 3 octave 2 @@ -129,7 +129,7 @@ Music_SilphCo_branch_7f26d:: notetype 6, 11, 0 octave 3 note E_, 8 - tempo 0, 124 + tempo 124 notetype 6, 11, 3 octave 2 note B_, 2 @@ -320,29 +320,29 @@ Music_SilphCo_branch_7f26d:: note D_, 11 rest 4 rest 4 - tempo 0, 128 + tempo 128 rest 4 rest 4 - tempo 0, 136 + tempo 136 rest 4 rest 4 - tempo 0, 144 + tempo 144 rest 4 rest 4 - tempo 0, 160 + tempo 160 rest 4 rest 4 - tempo 0, 192 + tempo 192 rest 4 rest 4 - tempo 1, 32 + tempo 288 rest 4 rest 4 - tempo 1, 160 + tempo 416 rest 4 - tempo 4, 0 + tempo 1024 rest 4 - tempo 0, 160 + tempo 160 rest 4 notetype 6, 4, 3 octave 2 diff --git a/audio/music/ssanne.asm b/audio/music/ssanne.asm index 675b67d1..f1f92ad9 100644 --- a/audio/music/ssanne.asm +++ b/audio/music/ssanne.asm @@ -1,9 +1,9 @@ Music_SSAnne_Ch1:: ; b3a7 (2:73a7) - tempo 0, 128 - stereopanning 119 + tempo 128 + volume 7, 7 duty 1 vibrato 8, 3, 4 - togglecall + toggleperfectpitch Music_SSAnne_branch_b3b2:: notetype 12, 10, 4 diff --git a/audio/music/surfing.asm b/audio/music/surfing.asm index c96e796a..a309a7ef 100644 --- a/audio/music/surfing.asm +++ b/audio/music/surfing.asm @@ -1,9 +1,9 @@ Music_Surfing_Ch1:: ; 7fa19 (1f:7a19) - tempo 0, 160 - stereopanning 119 + tempo 160 + volume 7, 7 duty 3 vibrato 12, 3, 4 - togglecall + toggleperfectpitch notetype 12, 11, 5 rest 6 octave 2 diff --git a/audio/music/titlescreen.asm b/audio/music/titlescreen.asm index a3ab8031..e4c46df4 100644 --- a/audio/music/titlescreen.asm +++ b/audio/music/titlescreen.asm @@ -1,6 +1,6 @@ Music_TitleScreen_Ch1:: ; 7e4c0 (1f:64c0) - tempo 0, 144 - stereopanning 119 + tempo 144 + volume 7, 7 vibrato 9, 3, 4 duty 3 notetype 12, 12, 1 diff --git a/audio/music/trainerbattle.asm b/audio/music/trainerbattle.asm index 2e4bcdaf..be5f12ce 100644 --- a/audio/music/trainerbattle.asm +++ b/audio/music/trainerbattle.asm @@ -1,9 +1,9 @@ Music_TrainerBattle_Ch1:: ; 22919 (8:6919) - tempo 0, 112 - stereopanning 119 + tempo 112 + volume 7, 7 duty 3 vibrato 6, 3, 4 - togglecall + toggleperfectpitch notetype 12, 11, 2 rest 8 octave 3 diff --git a/audio/music/unusedsong.asm b/audio/music/unusedsong.asm index ee73de3f..4e021fd8 100644 --- a/audio/music/unusedsong.asm +++ b/audio/music/unusedsong.asm @@ -1,6 +1,6 @@ Music_UnusedSong_Ch1:: ; a913 (2:6913) - tempo 0, 144 - stereopanning 119 + tempo 144 + volume 7, 7 vibrato 5, 1, 6 Music_UnusedSong_branch_a91b:: @@ -183,9 +183,9 @@ Music_UnusedSong_branch_a91b:: Music_UnusedSong_Ch2:: ; a9cf (2:69cf) - tempo 0, 144 - stereopanning 119 - togglecall + tempo 144 + volume 7, 7 + toggleperfectpitch vibrato 6, 1, 5 Music_UnusedSong_branch_a9d8:: diff --git a/audio/music/vermilion.asm b/audio/music/vermilion.asm index 4d358528..eab17a08 100644 --- a/audio/music/vermilion.asm +++ b/audio/music/vermilion.asm @@ -1,9 +1,9 @@ Music_Vermilion_Ch1:: ; b9eb (2:79eb) - tempo 0, 156 - stereopanning 119 + tempo 156 + volume 7, 7 duty 3 vibrato 12, 3, 4 - togglecall + toggleperfectpitch Music_Vermilion_branch_b9f6:: notetype 12, 11, 5 diff --git a/audio/music/wildbattle.asm b/audio/music/wildbattle.asm index b2b80e6e..e94c6a07 100644 --- a/audio/music/wildbattle.asm +++ b/audio/music/wildbattle.asm @@ -1,9 +1,9 @@ Music_WildBattle_Ch1:: ; 23099 (8:7099) - tempo 0, 104 - stereopanning 119 + tempo 104 + volume 7, 7 duty 3 vibrato 6, 3, 4 - togglecall + toggleperfectpitch notetype 12, 11, 3 octave 4 note C_, 1 diff --git a/audio/music/yellow/meetjessiejames.asm b/audio/music/yellow/meetjessiejames.asm index eeff798b..cd749f91 100644 --- a/audio/music/yellow/meetjessiejames.asm +++ b/audio/music/yellow/meetjessiejames.asm @@ -1,6 +1,6 @@ Music_MeetJessieJames_Ch1: ; 8316d (20:716d) - tempo 0, 144 - stereopanning 119 + tempo 144 + volume 7, 7 duty 3 vibrato 8, 1, 4 notetype 12, 11, 2 diff --git a/audio/music/yellow/surfingpikachu.asm b/audio/music/yellow/surfingpikachu.asm index 46bec7c3..632da3c5 100644 --- a/audio/music/yellow/surfingpikachu.asm +++ b/audio/music/yellow/surfingpikachu.asm @@ -1,6 +1,6 @@ Music_SurfingPikachu_Ch1: ; 82ce8 (20:6ce8) - tempo 0, 117 - stereopanning 119 + tempo 117 + volume 7, 7 duty 3 vibrato 8, 1, 4 notetype 12, 11, 3 diff --git a/audio/music/yellow/yellowintro.asm b/audio/music/yellow/yellowintro.asm index ee716901..a5e1ba24 100644 --- a/audio/music/yellow/yellowintro.asm +++ b/audio/music/yellow/yellowintro.asm @@ -1,6 +1,6 @@ Music_YellowIntro_Ch1: ; 7f65c (1f:765c) - tempo 0, 116 - stereopanning 119 + tempo 116 + volume 7, 7 duty 3 vibrato 8, 1, 4 notetype 12, 11, 2 diff --git a/audio/music/yellow/yellowunusedsong.asm b/audio/music/yellow/yellowunusedsong.asm index 9c5c0aa6..0198c17e 100644 --- a/audio/music/yellow/yellowunusedsong.asm +++ b/audio/music/yellow/yellowunusedsong.asm @@ -1,6 +1,6 @@ Music_YellowUnusedSong_Ch1: ; 82fbe (20:6fbe) - tempo 0, 140 - stereopanning 119 + tempo 140 + volume 7, 7 duty 3 vibrato 8, 1, 4 notetype 8, 11, 2 diff --git a/audio/sfx/sfx_02_3a.asm b/audio/sfx/sfx_02_3a.asm index 35808c35..5dc9a318 100644 --- a/audio/sfx/sfx_02_3a.asm +++ b/audio/sfx/sfx_02_3a.asm @@ -1,10 +1,10 @@ SFX_02_3a_Ch1: ; ad77 (2:6d77) executemusic - tempo 1, 0 - stereopanning 119 + tempo 256 + volume 7, 7 vibrato 6, 2, 6 duty 2 - togglecall + toggleperfectpitch notetype 4, 11, 1 octave 3 note G#, 2 diff --git a/audio/sfx/sfx_02_3b.asm b/audio/sfx/sfx_02_3b.asm index 538f2462..efe43b48 100644 --- a/audio/sfx/sfx_02_3b.asm +++ b/audio/sfx/sfx_02_3b.asm @@ -1,9 +1,9 @@ SFX_02_3b_Ch1: ; b316 (2:7316) executemusic - tempo 1, 0 - stereopanning 119 + tempo 256 + volume 7, 7 duty 2 - togglecall + toggleperfectpitch notetype 5, 11, 4 octave 4 note D_, 4 diff --git a/audio/sfx/sfx_02_41.asm b/audio/sfx/sfx_02_41.asm index 4ba0eb14..0a261b84 100644 --- a/audio/sfx/sfx_02_41.asm +++ b/audio/sfx/sfx_02_41.asm @@ -1,7 +1,7 @@ SFX_02_41_Ch1: ; b2c8 (2:72c8) executemusic - tempo 1, 0 - stereopanning 119 + tempo 256 + volume 7, 7 duty 2 notetype 5, 11, 1 octave 3 diff --git a/audio/sfx/sfx_02_42.asm b/audio/sfx/sfx_02_42.asm index e9112a02..c2f3f8a4 100644 --- a/audio/sfx/sfx_02_42.asm +++ b/audio/sfx/sfx_02_42.asm @@ -1,9 +1,9 @@ SFX_02_42_Ch1: ; b362 (2:7362) executemusic - tempo 1, 0 - stereopanning 119 + tempo 256 + volume 7, 7 duty 2 - togglecall + toggleperfectpitch notetype 5, 10, 4 octave 3 note A#, 4 diff --git a/audio/sfx/sfx_08_3a.asm b/audio/sfx/sfx_08_3a.asm index b7791942..a81d8775 100644 --- a/audio/sfx/sfx_08_3a.asm +++ b/audio/sfx/sfx_08_3a.asm @@ -1,9 +1,9 @@ SFX_08_3a_Ch1: ; 2397d (8:797d) executemusic - tempo 1, 0 - stereopanning 119 + tempo 256 + volume 7, 7 duty 2 - togglecall + toggleperfectpitch notetype 6, 11, 4 octave 4 note F_, 4 diff --git a/audio/sfx/sfx_08_3b.asm b/audio/sfx/sfx_08_3b.asm index cd123b01..a829a112 100644 --- a/audio/sfx/sfx_08_3b.asm +++ b/audio/sfx/sfx_08_3b.asm @@ -1,9 +1,9 @@ SFX_08_3b_Ch1: ; 239c7 (8:79c7) executemusic - tempo 1, 0 - stereopanning 119 + tempo 256 + volume 7, 7 duty 2 - togglecall + toggleperfectpitch notetype 5, 11, 4 octave 4 note D_, 4 diff --git a/audio/sfx/sfx_08_46.asm b/audio/sfx/sfx_08_46.asm index 5f2b9d33..33a5ab25 100644 --- a/audio/sfx/sfx_08_46.asm +++ b/audio/sfx/sfx_08_46.asm @@ -1,9 +1,9 @@ SFX_08_46_Ch1: ; 23a13 (8:7a13) executemusic - tempo 1, 0 - stereopanning 119 + tempo 256 + volume 7, 7 duty 3 - togglecall + toggleperfectpitch notetype 6, 11, 2 octave 3 note E_, 2 diff --git a/audio/sfx/sfx_08_pokeflute.asm b/audio/sfx/sfx_08_pokeflute.asm index 3160f87c..103e2d56 100755 --- a/audio/sfx/sfx_08_pokeflute.asm +++ b/audio/sfx/sfx_08_pokeflute.asm @@ -1,5 +1,5 @@ SFX_08_PokeFlute_Ch1: ; 22322 (8:6322) - tempo 1, 0 + tempo 256 SFX_08_PokeFlute_Ch2: ; 22325 (8:6325) diff --git a/audio/sfx/sfx_08_unused2.asm b/audio/sfx/sfx_08_unused2.asm index be887476..c0e2ce76 100755 --- a/audio/sfx/sfx_08_unused2.asm +++ b/audio/sfx/sfx_08_unused2.asm @@ -1,10 +1,10 @@ SFX_08_unused2_Ch1: ; 2232f (8:632f) executemusic - tempo 1, 0 - stereopanning 119 + tempo 256 + volume 7, 7 vibrato 6, 2, 6 duty 2 - togglecall + toggleperfectpitch notetype 6, 11, 1 octave 3 note G#, 2 diff --git a/audio/sfx/sfx_1f_3a.asm b/audio/sfx/sfx_1f_3a.asm index 2f7f3045..45fcecca 100644 --- a/audio/sfx/sfx_1f_3a.asm +++ b/audio/sfx/sfx_1f_3a.asm @@ -1,10 +1,10 @@ SFX_1f_3a_Ch1: ; 7e850 (1f:6850) executemusic - tempo 1, 0 - stereopanning 119 + tempo 256 + volume 7, 7 vibrato 6, 2, 6 duty 2 - togglecall + toggleperfectpitch notetype 4, 11, 1 octave 3 note G#, 2 diff --git a/audio/sfx/sfx_1f_3b.asm b/audio/sfx/sfx_1f_3b.asm index a167d4cf..16507623 100644 --- a/audio/sfx/sfx_1f_3b.asm +++ b/audio/sfx/sfx_1f_3b.asm @@ -1,9 +1,9 @@ SFX_1f_3b_Ch1: ; 7ee28 (1f:6e28) executemusic - tempo 1, 0 - stereopanning 119 + tempo 256 + volume 7, 7 duty 2 - togglecall + toggleperfectpitch notetype 5, 11, 4 octave 4 note D_, 4 diff --git a/audio/sfx/sfx_1f_41.asm b/audio/sfx/sfx_1f_41.asm index 62153990..d5564ddd 100644 --- a/audio/sfx/sfx_1f_41.asm +++ b/audio/sfx/sfx_1f_41.asm @@ -1,7 +1,7 @@ SFX_1f_41_Ch1: ; 7edda (1f:6dda) executemusic - tempo 1, 0 - stereopanning 119 + tempo 256 + volume 7, 7 duty 2 notetype 5, 11, 1 octave 3 diff --git a/audio/sfx/sfx_1f_42.asm b/audio/sfx/sfx_1f_42.asm index c0805196..bf231d23 100644 --- a/audio/sfx/sfx_1f_42.asm +++ b/audio/sfx/sfx_1f_42.asm @@ -1,9 +1,9 @@ SFX_1f_42_Ch1: ; 7ee74 (1f:6e74) executemusic - tempo 1, 0 - stereopanning 119 + tempo 256 + volume 7, 7 duty 2 - togglecall + toggleperfectpitch notetype 5, 10, 4 octave 3 note A#, 4 diff --git a/macros.asm b/macros.asm index 2a7c8d47..b2eb15ab 100644 --- a/macros.asm +++ b/macros.asm @@ -247,7 +247,7 @@ octave: MACRO db $E8 - \1 ENDM -togglecall: MACRO +toggleperfectpitch: MACRO db $E8 ENDM @@ -271,18 +271,18 @@ ENDM tempo: MACRO db $ED - db \1 - db \2 + db \1 / $100 + db \1 % $100 ENDM -unknownmusic0xee: MACRO +stereopanning: MACRO db $EE db \1 ENDM -stereopanning: MACRO +volume: MACRO db $F0 - db \1 + db (\1 << 4) | \2 ENDM executemusic: MACRO -- 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/engine_3.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 From fadac928bccb9be1010e73df3253021312f5a2fb Mon Sep 17 00:00:00 2001 From: "U-Fish-PC\\Daniel" Date: Mon, 9 Jun 2014 16:18:29 -0400 Subject: Clean up music bank references --- audio/engine_1.asm | 2 +- audio/engine_2.asm | 2 +- audio/engine_3.asm | 2 +- engine/intro.asm | 2 +- engine/overworld/healing_machine.asm | 2 +- engine/overworld/npc_movement.asm | 4 ++-- engine/titlescreen.asm | 2 +- home/audio.asm | 16 ++++++++-------- home/init.asm | 2 +- home/vblank.asm | 10 +++++----- 10 files changed, 22 insertions(+), 22 deletions(-) (limited to 'audio/engine_3.asm') diff --git a/audio/engine_1.asm b/audio/engine_1.asm index c1c4999b..4177e14d 100644 --- a/audio/engine_1.asm +++ b/audio/engine_1.asm @@ -1,6 +1,6 @@ ; The first of three duplicated sound engines. -Func_9103:: ; 0x9103 +Music2_UpdateMusic:: ; 0x9103 ld c, CH0 .loop ld b, $0 diff --git a/audio/engine_2.asm b/audio/engine_2.asm index b5a07c0f..037c8741 100644 --- a/audio/engine_2.asm +++ b/audio/engine_2.asm @@ -1,6 +1,6 @@ ; The second of three duplicated sound engines. -Func_21879:: ; 21879 (8:5879) +Music8_UpdateMusic:: ; 21879 (8:5879) ld c, CH0 .loop ld b, $0 diff --git a/audio/engine_3.asm b/audio/engine_3.asm index 45f890df..fabdecef 100644 --- a/audio/engine_3.asm +++ b/audio/engine_3.asm @@ -1,6 +1,6 @@ ; The third of three duplicated sound engines. -Func_7d177:: ; 7d177 (1f:5177) +Music1f_UpdateMusic:: ; 7d177 (1f:5177) ld c, CH0 .loop ld b, $0 diff --git a/engine/intro.asm b/engine/intro.asm index 8e344e48..00907065 100755 --- a/engine/intro.asm +++ b/engine/intro.asm @@ -322,7 +322,7 @@ PlayShootingStar: ; 4188a (10:588a) ld c, $28 call DelayFrames .asm_418d0 - ld a, Bank(Func_7d8ea) + ld a, BANK(Music_IntroBattle) ld [wc0ef], a ld [wc0f0], a ld a, MUSIC_INTRO_BATTLE diff --git a/engine/overworld/healing_machine.asm b/engine/overworld/healing_machine.asm index f9636fcb..a30a5dff 100755 --- a/engine/overworld/healing_machine.asm +++ b/engine/overworld/healing_machine.asm @@ -41,7 +41,7 @@ AnimateHealingMachine: ; 70433 (1c:4433) ld a, $ff ld [wc0ee], a call PlaySound - ld a, Bank(Func_9876) + ld a, BANK(Music_PkmnHealed) ld [wc0ef], a .asm_70495 ld a, MUSIC_PKMN_HEALED diff --git a/engine/overworld/npc_movement.asm b/engine/overworld/npc_movement.asm index 234b7645..260dafd9 100755 --- a/engine/overworld/npc_movement.asm +++ b/engine/overworld/npc_movement.asm @@ -158,7 +158,7 @@ PointerTable_1a510: ; 1a510 (6:6510) dw Func_1a56b Func_1a514: ; 1a514 (6:6514) - ld a, Bank(Func_9876) + ld a, BANK(Music_MuseumGuy) ld [wc0ef], a ld [wc0f0], a ld a, MUSIC_MUSEUM_GUY @@ -215,7 +215,7 @@ PointerTable_1a57d: ; 1a57d (6:657d) dw Func_1a56b Func_1a581: ; 1a581 (6:6581) - ld a, Bank(Func_9876) + ld a, BANK(Music_MuseumGuy) ld [wc0ef], a ld [wc0f0], a ld a, MUSIC_MUSEUM_GUY diff --git a/engine/titlescreen.asm b/engine/titlescreen.asm index 10081d63..e281af31 100755 --- a/engine/titlescreen.asm +++ b/engine/titlescreen.asm @@ -17,7 +17,7 @@ SetDefaultNamesBeforeTitlescreen: ; 42b7 (1:42b7) ld [hli], a ld [hli], a ld [hl], a - ld a, Bank(Func_7d8ea) + ld a, BANK(Music_TitleScreen) ld [wc0ef], a ld [wc0f0], a diff --git a/home/audio.asm b/home/audio.asm index 724b8c5f..fa62cc8a 100644 --- a/home/audio.asm +++ b/home/audio.asm @@ -30,7 +30,7 @@ asm_2324:: ; 2324 (0:2324) ld b, a ld a, d and a - ld a, Bank(Func_7d8ea) + ld a, BANK(Music_BikeRiding) jr nz, .asm_233e ld [wc0ef], a .asm_233e @@ -56,19 +56,19 @@ asm_2324:: ; 2324 (0:2324) Func_235f:: ; 235f (0:235f) ld a, [wc0ef] ld b, a - cp $2 + cp BANK(Music2_UpdateMusic) jr nz, .checkForBank08 .bank02 - ld hl, Func_9103 + ld hl, Music2_UpdateMusic jr .asm_2378 .checkForBank08 - cp $8 + cp BANK(Music8_UpdateMusic) jr nz, .bank1F .bank08 - ld hl, Func_21879 + ld hl, Music8_UpdateMusic jr .asm_2378 .bank1F - ld hl, Func_7d177 + ld hl, Music1f_UpdateMusic .asm_2378 ld c, $6 .asm_237a @@ -147,14 +147,14 @@ PlaySound:: ; 23b1 (0:23b1) ld a, [wc0ef] ld [H_LOADEDROMBANK], a ld [$2000], a - cp $2 + cp BANK(Func_9876) jr nz, .checkForBank08 .bank02 ld a, b call Func_9876 jr .asm_240b .checkForBank08 - cp $8 + cp BANK(Func_22035) jr nz, .bank1F .bank08 ld a, b diff --git a/home/init.asm b/home/init.asm index 939e81b5..ef5b5bb9 100644 --- a/home/init.asm +++ b/home/init.asm @@ -128,7 +128,7 @@ ClearVram: StopAllSounds:: - ld a, Bank(Func_9876) + ld a, BANK(Music2_UpdateMusic) ld [wc0ef], a ld [wc0f0], a xor a diff --git a/home/vblank.asm b/home/vblank.asm index ec82eb7d..15f91437 100644 --- a/home/vblank.asm +++ b/home/vblank.asm @@ -56,20 +56,20 @@ VBlank:: ld [H_LOADEDROMBANK], a ld [MBC3RomBank], a - cp BANK(Func_9103) + cp BANK(Music2_UpdateMusic) jr nz, .notbank2 .bank2 - call Func_9103 + call Music2_UpdateMusic jr .afterMusic .notbank2 - cp 8 + cp BANK(Music8_UpdateMusic) jr nz, .bank1F .bank8 call Func_2136e - call Func_21879 + call Music8_UpdateMusic jr .afterMusic .bank1F - call Func_7d177 + call Music1f_UpdateMusic .afterMusic callba Func_18dee ; keep track of time played -- cgit v1.3.1-sl0p