diff options
Diffstat (limited to 'src-z80/core/direct.z80')
| -rw-r--r-- | src-z80/core/direct.z80 | 30 |
1 files changed, 30 insertions, 0 deletions
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 |
