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.z8039
1 files changed, 3 insertions, 36 deletions
diff --git a/src-z80/core/sfx.z80 b/src-z80/core/sfx.z80
index 0e140e8..fc636e9 100644
--- a/src-z80/core/sfx.z80
+++ b/src-z80/core/sfx.z80
@@ -264,44 +264,11 @@ ClearSFX:
PollPCM
- dec b
-
- ld a, b ; Restore BGM FM instrument
- ld h, RAM_BGMFMInstr>>8
- add RAM_BGMFMInstr&$FF
- ld l, a
-
- push bc
- ld a, b
- ld b, (hl)
- call LoadFMDirect
- pop bc
-
- PollPCM
-
- push bc
- ld a, l ; Restore BGM FM volume
- add 8
- ld l, a
- ld a, b
- ld b, (hl)
- call SetFMVolLoad
- pop bc
-
- ld a, l ; Restore BGM FM panning
- add 8
- ld l, a
- ld a, b
- and $03
- add $B4
- ld (iy+0), a
- ld a, (hl)
- ld (iy+1), a
-
- PollPCM
+ dec b ; Restore FM channel
+ call RestoreFM
inc b
+
.fmfree:
- PollPCM
dec e ; Go for next FM channel to unlock
dec b
jp nz, .unlockfm