From 3aacf3d2cedfdeca49ceb57533389870bfc688a9 Mon Sep 17 00:00:00 2001 From: sik Date: Sun, 23 Jul 2017 03:20:35 -0300 Subject: Now with pausing and other niceties --- src-z80/player/fm.z80 | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) (limited to 'src-z80/player/fm.z80') diff --git a/src-z80/player/fm.z80 b/src-z80/player/fm.z80 index 505e849..d5d49ba 100644 --- a/src-z80/player/fm.z80 +++ b/src-z80/player/fm.z80 @@ -432,7 +432,13 @@ LoadFMDirect: ;**************************************************************************** SetFMVolSFX: - call SetFMVolSFXEvent ; We're just a wrapper + push af + PollPCM + call GetParam ; Get new volume + PollPCM + pop af + + call SetFMVolLoad ; We're just a wrapper jp ProcessSFXRun ; End of subroutine SetFMVolBGM: @@ -487,12 +493,21 @@ SetFMVolBGM: call SetFMVolLoad ; We're just a wrapper jp ProcessBGMRun ; End of subroutine -SetFMVolSFXEvent: - push af - PollPCM - call GetParam ; Get new volume - PollPCM - pop af +;---------------------------------------------------------------------------- +; input a = channel ID +; input b = new volume level +;---------------------------------------------------------------------------- + +SetFMVolTempLoad: + push bc + push de + push hl + jp SetFMVolDoIt + +;---------------------------------------------------------------------------- +; input a = channel ID (bottom 3 bits) +; input b = new volume level +;---------------------------------------------------------------------------- SetFMVolLoad: push bc @@ -508,6 +523,7 @@ SetFMVolLoad: ld (hl), b pop af +SetFMVolDoIt: push af ld h, RAM_FMData>>8 ; Get address of FM data add RAM_FMData&$FF -- cgit v1.2.3