aboutsummaryrefslogtreecommitdiff
path: root/src-z80/player
diff options
context:
space:
mode:
Diffstat (limited to 'src-z80/player')
-rw-r--r--src-z80/player/fm.z8033
-rw-r--r--src-z80/player/freq.z8010
2 files changed, 11 insertions, 32 deletions
diff --git a/src-z80/player/fm.z80 b/src-z80/player/fm.z80
index fa86538..96c9f4c 100644
--- a/src-z80/player/fm.z80
+++ b/src-z80/player/fm.z80
@@ -489,7 +489,7 @@ LoadFMDirect:
;****************************************************************************
SetFMVolSFX:
- call SetFMVolEvent ; We're just a wrapper
+ call SetFMVolSFXEvent ; We're just a wrapper
jp ProcessSFXRun ; End of subroutine
SetFMVolBGM:
@@ -501,10 +501,7 @@ SetFMVolBGM:
push de
push bc
ld a, b
- ;ld de, RAM_BGMFMVol ; Store BGM volume
- ;add e
- ;ld e, a
- ld d, RAM_BGMFMVol>>8
+ ld d, RAM_BGMFMVol>>8 ; Store BGM volume
add RAM_BGMFMVol&$FF
ld e, a
PollPCM
@@ -544,28 +541,16 @@ SetFMVolBGM:
PollPCM
pop af
- ;call SetFMVolBGMEvent ; We're just a wrapper
call SetFMVolLoad ; We're just a wrapper
jp ProcessBGMRun ; End of subroutine
-SetFMVolEvent:
+SetFMVolSFXEvent:
push af
PollPCM
call GetParam ; Get new volume
PollPCM
pop af
-SetFMVolBGMEvent:
- ;push bc
- ;push de
- ;push hl
-
- ;ld hl, RAM_FMVolume ; Store new volume
- ;and $07
- ;add l
- ;ld l, a
- ;ld (hl), b
-
SetFMVolLoad:
push bc
push de
@@ -573,21 +558,15 @@ SetFMVolLoad:
and $07
- ;ex af, af'
- ;PollPCM
- ;ld a, l ; Get address of FM data
- ;add 8
- ;ld l, a
- ;ex af, af'
-
push af
ld h, RAM_FMData>>8 ; Get address of FM data
add RAM_FMData&$FF
ld l, a
+
+ ex af, af'
PollPCM
- pop af
+ ex af, af'
- push af
and $04 ; Determine which port to write
rrca
ld iyl, a
diff --git a/src-z80/player/freq.z80 b/src-z80/player/freq.z80
index a469c0b..d12ee2b 100644
--- a/src-z80/player/freq.z80
+++ b/src-z80/player/freq.z80
@@ -97,9 +97,9 @@ FMFreqTable:
;****************************************************************************
DummyFMInstr:
- db $7F ; $40..$4C
- db $1F ; $50..$5C
- db $1F ; $60..$6C
- db $1F ; $70..$7C
- db $0F ; $80..$8C
+ db $FF ; $40..$4C
+ db $FF ; $50..$5C
+ db $FF ; $60..$6C
+ db $FF ; $70..$7C
+ db $FF ; $80..$8C
db $00 ; $90..$9C