summaryrefslogtreecommitdiff
path: root/audio/engine_3.asm
diff options
context:
space:
mode:
Diffstat (limited to 'audio/engine_3.asm')
-rw-r--r--audio/engine_3.asm17
1 files changed, 9 insertions, 8 deletions
diff --git a/audio/engine_3.asm b/audio/engine_3.asm
index bd784023..9a95f3e1 100644
--- a/audio/engine_3.asm
+++ b/audio/engine_3.asm
@@ -550,7 +550,7 @@ Audio3_executemusic:
Audio3_octave:
and $f0
cp $e0 ; is this command an octave?
- jr nz, Audio3_unknownsfx0x20 ; no
+ jr nz, Audio3_sfxnote ; no
ld hl, wChannelOctaves ; yes
ld b, $0
add hl, bc
@@ -559,17 +559,18 @@ Audio3_octave:
ld [hl], a ; store low nibble as octave
jp Audio3_endchannel
-Audio3_unknownsfx0x20:
- cp $20 ; is this command an unknownsfx0x20?
- jr nz, Audio3_unknownsfx0x10 ; no
+; sfxnote is either squarenote or noisenote depending on the channel
+Audio3_sfxnote:
+ cp $20 ; is this command an sfxnote?
+ jr nz, Audio3_pitchenvelope ; no
ld a, c
cp Ch3 ; is this a noise or sfx channel?
- jr c, Audio3_unknownsfx0x10 ; no
+ jr c, Audio3_pitchenvelope ; no
ld b, $0
ld hl, wChannelFlags2
add hl, bc
bit 0, [hl]
- jr nz, Audio3_unknownsfx0x10 ; no
+ jr nz, Audio3_pitchenvelope ; no
call Audio3_notelength ; yes
ld d, a
ld b, $0
@@ -604,12 +605,12 @@ Audio3_unknownsfx0x20:
call Audio3_7d6bf
ret
-Audio3_unknownsfx0x10:
+Audio3_pitchenvelope:
ld a, c
cp Ch4
jr c, Audio3_note ; if not a sfx
ld a, d
- cp $10 ; is this command an unknownsfx0x10?
+ cp $10 ; is this command an pitchenvelope?
jr nz, Audio3_note ; no
ld b, $0
ld hl, wChannelFlags2