mirror of
https://github.com/joncampbell123/dosbox-x.git
synced 2025-05-10 04:08:57 +08:00
Fix PC-98 FM synthesis not to re-register itself again if you reboot in PC-98 mode. Prior to this fix, rebooting in PC-98 mode resulted in garbled FM music.
This commit is contained in:
parent
645f2cdcc2
commit
d394ec5dae
@ -3981,7 +3981,12 @@ static void pc98_mix_CallBack(Bitu len) {
|
|||||||
pc98_mixer->AddSamples_s32(s, (Bit32s*)MixTemp);
|
pc98_mixer->AddSamples_s32(s, (Bit32s*)MixTemp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static bool pc98fm_init = false;
|
||||||
|
|
||||||
void PC98_FM_OnEnterPC98(Section *sec) {
|
void PC98_FM_OnEnterPC98(Section *sec) {
|
||||||
|
if (!pc98fm_init) {
|
||||||
|
pc98fm_init = true;
|
||||||
|
|
||||||
// TODO:
|
// TODO:
|
||||||
// - Give the user an option in dosbox.conf to enable/disable FM emulation
|
// - Give the user an option in dosbox.conf to enable/disable FM emulation
|
||||||
// - Give the user a choice which board to emulate (the borrowed code can emulate 10 different cards)
|
// - Give the user a choice which board to emulate (the borrowed code can emulate 10 different cards)
|
||||||
@ -4012,9 +4017,9 @@ void PC98_FM_OnEnterPC98(Section *sec) {
|
|||||||
fmboard_reset(NULL, 0x14);
|
fmboard_reset(NULL, 0x14);
|
||||||
fmboard_extenable(true);
|
fmboard_extenable(true);
|
||||||
|
|
||||||
// fddmtrsnd_initialize(rate);
|
// fddmtrsnd_initialize(rate);
|
||||||
// beep_initialize(rate);
|
// beep_initialize(rate);
|
||||||
// beep_setvol(3);
|
// beep_setvol(3);
|
||||||
tms3631_initialize(rate);
|
tms3631_initialize(rate);
|
||||||
tms3631_setvol(vol14);
|
tms3631_setvol(vol14);
|
||||||
opngen_initialize(rate);
|
opngen_initialize(rate);
|
||||||
@ -4029,5 +4034,6 @@ void PC98_FM_OnEnterPC98(Section *sec) {
|
|||||||
pcm86gen_setvol(128);
|
pcm86gen_setvol(128);
|
||||||
|
|
||||||
board86c_bind();
|
board86c_bind();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user