diff options
| author | sik | 2017-03-05 20:57:11 -0300 |
|---|---|---|
| committer | sik | 2017-03-05 20:57:11 -0300 |
| commit | a679ba38190bfed6ae150a12e819ad7527c495d1 (patch) | |
| tree | ea4b189bce2732032998027f5dbcb75a1c0eea1d /src-z80/core/direct.z80 | |
| parent | 2ad500e6d8a24ca09cbfc6618aea9c1cd3cc0e93 (diff) | |
Upgrade!
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 |
