From a679ba38190bfed6ae150a12e819ad7527c495d1 Mon Sep 17 00:00:00 2001 From: sik Date: Sun, 5 Mar 2017 20:57:11 -0300 Subject: Upgrade! --- src-z80/core/direct.z80 | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 src-z80/core/direct.z80 (limited to 'src-z80/core/direct.z80') diff --git a/src-z80/core/direct.z80 b/src-z80/core/direct.z80 new file mode 100644 index 0000000..d796ddf --- /dev/null +++ b/src-z80/core/direct.z80 @@ -0,0 +1,30 @@ +;**************************************************************************** +; ProcessDirect +; Processes the direct event stream. +;---------------------------------------------------------------------------- +; breaks: all +;**************************************************************************** + +ProcessDirect: + ld a, ($1F00) ; Are there even events to process? + inc a + ret z + + PollPCM + + ld hl, ProcessDirectEnd ; Override $FF event + ld (ProcessBGMEventFF+1), hl + + ld hl, $1F00 ; Where event data is stored + ld a, (RAM_LastBank) ; To avoid wasting time with bank + ld c, a ; switching + + jp ProcessBGMRun ; Start processing the event + +ProcessDirectEnd: + ld hl, StopBGMEvent ; Restore $FF event + ld (ProcessBGMEventFF+1), hl + ld a, $FF ; Reset the stream + ld ($1F00), a + + ret ; Return to the main loop -- cgit v1.2.3