aboutsummaryrefslogtreecommitdiff
path: root/src-z80/core/bgm.z80
diff options
context:
space:
mode:
authorSik2019-03-31 19:27:51 -0300
committerSik2019-03-31 19:27:51 -0300
commite4da3571aa25e5798e1d96fe3df600bcd806403d (patch)
treee93b021ded2635ede409a7b0b86aed604f1e2e1f /src-z80/core/bgm.z80
parent46ce4f706ea47d16db70018baedd5eb6c691ef95 (diff)
Echo 1.64, random bugfixes
Diffstat (limited to 'src-z80/core/bgm.z80')
-rw-r--r--src-z80/core/bgm.z8018
1 files changed, 17 insertions, 1 deletions
diff --git a/src-z80/core/bgm.z80 b/src-z80/core/bgm.z80
index cb8439a..ddb9f74 100644
--- a/src-z80/core/bgm.z80
+++ b/src-z80/core/bgm.z80
@@ -45,6 +45,14 @@ PlayBGM:
ld hl, ProcessBGM ; Tell Echo to process BGM
ld (DoTick_BGM+1), hl
+ ld b, 8 ; Force BGM volume of all FM channels to $00
+ ld c, 0 ; (default value for older Echo versions)
+ ld hl, RAM_BGMFMVol
+.playunmute:
+ ld (hl), c
+ inc l
+ djnz .playunmute
+
jp EndOfCommand ; End of subroutine
;****************************************************************************
@@ -311,7 +319,15 @@ StopBGM:
ld (RAM_BGMPlaying), a
ld hl, DoTick_BGMSkip
ld (DoTick_BGM+1), hl
-
+
+ ld b, 8 ; Force BGM volume of all FM channels to $7F
+ ld c, $7F
+ ld hl, RAM_BGMFMVol
+.stopmute:
+ ld (hl), c
+ inc l
+ djnz .stopmute
+
ret ; End of subroutine
;****************************************************************************