aboutsummaryrefslogtreecommitdiff
path: root/src-z80/core/sfx.z80
diff options
context:
space:
mode:
Diffstat (limited to 'src-z80/core/sfx.z80')
-rw-r--r--src-z80/core/sfx.z8018
1 files changed, 18 insertions, 0 deletions
diff --git a/src-z80/core/sfx.z80 b/src-z80/core/sfx.z80
index d008f0b..6eb844d 100644
--- a/src-z80/core/sfx.z80
+++ b/src-z80/core/sfx.z80
@@ -299,6 +299,24 @@ ClearSFX:
ld b, (hl)
call SetFMVolLoad
pop bc
+
+ ld a, b
+ and $04
+ rrca
+ ld iyl, a
+
+ push bc ; Restore BGM FM panning
+ ld a, b
+ ld h, RAM_BGMFMPan>>8
+ add RAM_BGMFMPan&$FF
+ ld l, a
+ ld a, b
+ ld b, (hl)
+ and $03
+ add $B4
+ ld (iy+0), b
+ ld (iy+1), a
+ pop bc
PollPCM
inc b