diff options
| author | sik | 2017-07-23 03:20:35 -0300 |
|---|---|---|
| committer | sik | 2017-07-23 03:20:35 -0300 |
| commit | 3aacf3d2cedfdeca49ceb57533389870bfc688a9 (patch) | |
| tree | a46d166fa9270700e8e159ca9ae455ac24472771 /src-z80/player/misc.z80 | |
| parent | a679ba38190bfed6ae150a12e819ad7527c495d1 (diff) | |
Now with pausing and other niceties
Diffstat (limited to 'src-z80/player/misc.z80')
| -rw-r--r-- | src-z80/player/misc.z80 | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/src-z80/player/misc.z80 b/src-z80/player/misc.z80 index dee980e..56e11b4 100644 --- a/src-z80/player/misc.z80 +++ b/src-z80/player/misc.z80 @@ -1,6 +1,8 @@ ;**************************************************************************** ; SetDelay* [event $FE, events $D0-$DF] ; Adds a delay in playback +;---------------------------------------------------------------------------- +; breaks: c, de, hl ;**************************************************************************** SetDelaySFX: @@ -46,6 +48,58 @@ SetDelayShort: ret ; End of subroutine ;**************************************************************************** +; SetFlags [event $FA] +; Sets some of the flags. +;---------------------------------------------------------------------------- +; breaks: c, de, hl +;**************************************************************************** + +SetFlagsSFX: + call SetFlags + jp ProcessSFXRun + +SetFlagsBGM: + call SetFlags + jp ProcessBGMRun + +SetFlags: + PollPCM ; Get which flags to set + call GetParam + PollPCM + + ld a, (RAM_Flags) ; Set the flags + or b + ld (RAM_Flags), a + + ret ; End of subroutine + +;**************************************************************************** +; ClearFlags [event $FB] +; Clears some of the flags. +;---------------------------------------------------------------------------- +; breaks: c, de, hl +;**************************************************************************** + +ClearFlagsSFX: + call ClearFlags + jp ProcessSFXRun + +ClearFlagsBGM: + call ClearFlags + jp ProcessBGMRun + +ClearFlags: + PollPCM ; Get which flags to clear + call GetParam + PollPCM + + ld a, (RAM_Flags) ; Clear the flags + and b + ld (RAM_Flags), a + + ret ; End of subroutine + +;**************************************************************************** ; RefreshVolume ; Reloads the volume for all channels. ;---------------------------------------------------------------------------- @@ -69,6 +123,7 @@ RefreshVolume: inc l inc e dec c + PollPCM jr nz, .fixfmvol ld hl, $1FE8 ; Update PSG volume |
