aboutsummaryrefslogtreecommitdiff
path: root/src-z80
diff options
context:
space:
mode:
authorsik2016-06-06 18:11:45 -0300
committersik2016-06-06 18:11:45 -0300
commitf42cb51f0c85d94cb2992008b3f96534e351a2e1 (patch)
treece82fe108576a55a2afb2f149eb50fce63666caa /src-z80
parent8721b1d95511255613eda5da97ecc57d5bf6413a (diff)
Added ~ events
Diffstat (limited to 'src-z80')
-rw-r--r--src-z80/core/bgm.z803
-rw-r--r--src-z80/core/sfx.z803
-rw-r--r--src-z80/player/misc.z8017
3 files changed, 22 insertions, 1 deletions
diff --git a/src-z80/core/bgm.z80 b/src-z80/core/bgm.z80
index 2ef3aad..2f57a73 100644
--- a/src-z80/core/bgm.z80
+++ b/src-z80/core/bgm.z80
@@ -187,6 +187,9 @@ ProcessBGMSkip:
PollPCM
ld a, b
+ cp $E0 ; Events $D0-$DF: short set delay
+ jp c, SetDelayBGMShort
+
cp $F8 ; Events $F0-$F7: set FM parameters
jp c, SetFMParamBGM
diff --git a/src-z80/core/sfx.z80 b/src-z80/core/sfx.z80
index fc636e9..1c62873 100644
--- a/src-z80/core/sfx.z80
+++ b/src-z80/core/sfx.z80
@@ -133,6 +133,9 @@ ProcessSFXRun:
PollPCM
ld a, b
+ cp $E0 ; Events $D0-$DF: short set delay
+ jp c, SetDelaySFXShort
+
cp $E8
jp c, LockChannelFM ; Events $E0-$E7: lock FM channel
cp $EC
diff --git a/src-z80/player/misc.z80 b/src-z80/player/misc.z80
index 6373ab0..36be250 100644
--- a/src-z80/player/misc.z80
+++ b/src-z80/player/misc.z80
@@ -1,5 +1,5 @@
;****************************************************************************
-; SetDelay* [event $FE]
+; SetDelay* [event $FE, events $D0-$DF]
; Adds a delay in playback
;****************************************************************************
@@ -11,11 +11,26 @@ SetDelayBGM:
call SetDelay ; We're just a wrapper
jp DoTick_BGMSkip ; End of subroutine
+SetDelaySFXShort:
+ and $0F
+ inc a
+ ld b, a
+ call SetDelayShort ; We're just a wrapper
+ jp DoTick_SFXSkip ; End of subroutine
+
+SetDelayBGMShort:
+ and $0F
+ inc a
+ ld b, a
+ call SetDelayShort ; We're just a wrapper
+ jp DoTick_BGMSkip ; End of subroutine
+
SetDelay:
PollPCM
call GetParam ; Get delay
PollPCM
+SetDelayShort:
ex de, hl
ld (hl), d ; Store new address
dec l