From 8e96c87f2d2bac7207718fd211f29fc085d31bc3 Mon Sep 17 00:00:00 2001 From: Sik Date: Sun, 7 Jul 2019 03:35:06 -0300 Subject: Fixing bugs with Echo_PlayDirect (oof) --- src-z80/core/direct.z80 | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src-z80/core/direct.z80') diff --git a/src-z80/core/direct.z80 b/src-z80/core/direct.z80 index d796ddf..570175f 100644 --- a/src-z80/core/direct.z80 +++ b/src-z80/core/direct.z80 @@ -10,6 +10,9 @@ ProcessDirect: inc a ret z + ld a, $FF ; Put bogus length for direct stream + ld (RAM_DirectLen), a ; so 68000 knows to wait + PollPCM ld hl, ProcessDirectEnd ; Override $FF event @@ -24,7 +27,10 @@ ProcessDirect: ProcessDirectEnd: ld hl, StopBGMEvent ; Restore $FF event ld (ProcessBGMEventFF+1), hl + ld a, $FF ; Reset the stream ld ($1F00), a + inc a + ld (RAM_DirectLen), a ret ; Return to the main loop -- cgit v1.2.3