diff options
Diffstat (limited to 'audio/engine_1.asm')
-rw-r--r-- | audio/engine_1.asm | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/audio/engine_1.asm b/audio/engine_1.asm index f762da29..bab1be55 100644 --- a/audio/engine_1.asm +++ b/audio/engine_1.asm @@ -563,7 +563,7 @@ Audio1_executemusic: Audio1_octave: and $f0 cp $e0 ; is this command an octave? - jr nz, Audio1_unknownsfx0x20 ; no + jr nz, Audio1_sfxnote ; no ld hl, wChannelOctaves ld b, 0 add hl, bc @@ -572,17 +572,18 @@ Audio1_octave: ld [hl], a ; store low nibble as octave jp Audio1_endchannel -Audio1_unknownsfx0x20: - cp $20 ; is this command an unknownsfx0x20? - jr nz, Audio1_unknownsfx0x10 +; sfxnote is either squarenote or noisenote depending on the channel +Audio1_sfxnote: + cp $20 ; is this command a sfxnote? + jr nz, Audio1_pitchenvelope ld a, c cp Ch3 ; is this a noise or sfx channel? - jr c, Audio1_unknownsfx0x10 ; no + jr c, Audio1_pitchenvelope ; no ld b, 0 ld hl, wChannelFlags2 add hl, bc bit BIT_EXECUTE_MUSIC, [hl] ; is executemusic being used? - jr nz, Audio1_unknownsfx0x10 ; yes + jr nz, Audio1_pitchenvelope ; yes call Audio1_notelength ; This code seems to do the same thing as what Audio1_ApplyDutyAndSoundLength @@ -624,12 +625,12 @@ Audio1_unknownsfx0x20: call Audio1_ApplyWavePatternAndFrequency ret -Audio1_unknownsfx0x10: +Audio1_pitchenvelope: ld a, c cp Ch4 jr c, Audio1_note ; if not a sfx ld a, d - cp $10 ; is this command a unknownsfx0x10? + cp $10 ; is this command a pitchenvelope? jr nz, Audio1_note ; no ld b, $0 ld hl, wChannelFlags2 |