aboutsummaryrefslogtreecommitdiff
path: root/src-z80/player/fm.z80
diff options
context:
space:
mode:
Diffstat (limited to 'src-z80/player/fm.z80')
-rw-r--r--src-z80/player/fm.z8030
1 files changed, 23 insertions, 7 deletions
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