# HG changeset patch # User Laurens Holst # Date 1604613177 -3600 # Thu Nov 05 22:52:57 2020 +0100 # Node ID 4da8602f3b21a937f0cb2f36a15a32a1db0317c9 # Parent 6eeb0d2178b35cad574e8be557ae3edeb8a33937 Audio: Fix issue with a 7FH wait being processed as end. diff --git a/src/audio/Audio.asm b/src/audio/Audio.asm --- a/src/audio/Audio.asm +++ b/src/audio/Audio.asm @@ -106,12 +106,12 @@ jr c,Audio_ProcessPSG cp 80H jr c,Audio_ProcessOPLL - cp 0FFH - jr c,Audio_ProcessWait - jr Audio_ProcessEnd + jr z,Audio_ProcessEnd + sub 80H + inc hl + ret ; hl = command list -; a <- wait ; hl <- next command Audio_ProcessPSG: ld c,PSG_DATA @@ -121,7 +121,6 @@ jr Audio_Process ; hl = command list -; a <- wait ; hl <- next command Audio_ProcessOPLL: sub 40H @@ -132,15 +131,6 @@ jr Audio_Process ; hl = command list -; a <- wait -; hl <- next command -Audio_ProcessWait: - sub 80H - inc hl - ret - -; hl = command list -; a <- wait ; hl <- next command Audio_ProcessEnd: inc hl diff --git a/src/audio/AudioTrack.asm b/src/audio/AudioTrack.asm --- a/src/audio/AudioTrack.asm +++ b/src/audio/AudioTrack.asm @@ -32,7 +32,7 @@ AudioCommandEnd: MACRO ?loop command: - AudioCommand 0FFH + AudioCommand 80H loop: dw ?loop & 1FFFH | 8000H ENDM