Save-state: Explicitly init MB SoundcardType when loading state. (Fixes #609)
This commit is contained in:
parent
11137cbc44
commit
f998c7ddb2
4 changed files with 16 additions and 10 deletions
|
@ -1663,9 +1663,10 @@ void MemInitializeIO(void)
|
||||||
{
|
{
|
||||||
ConfigureSoftcard(pCxRomPeripheral, 5); // $C500 : Z80 card
|
ConfigureSoftcard(pCxRomPeripheral, 5); // $C500 : Z80 card
|
||||||
}
|
}
|
||||||
else
|
else if (g_Slot5 == CT_SAM)
|
||||||
if (g_Slot5 == CT_SAM)
|
{
|
||||||
ConfigureSAM(pCxRomPeripheral, 5); // $C500 : Z80 card
|
ConfigureSAM(pCxRomPeripheral, 5); // $C500 : Z80 card
|
||||||
|
}
|
||||||
|
|
||||||
DiskLoadRom(pCxRomPeripheral, 6); // $C600 : Disk][ f/w
|
DiskLoadRom(pCxRomPeripheral, 6); // $C600 : Disk][ f/w
|
||||||
HD_Load_Rom(pCxRomPeripheral, 7); // $C700 : HDD f/w
|
HD_Load_Rom(pCxRomPeripheral, 7); // $C700 : HDD f/w
|
||||||
|
|
|
@ -1376,13 +1376,20 @@ static void MB_DSUninit()
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
|
|
||||||
|
void MB_InitSoundcardType(void) // GH#609
|
||||||
|
{
|
||||||
|
g_SoundcardType = CT_Empty; // Use CT_Empty to mean: no soundcard
|
||||||
|
g_bPhasorEnable = false;
|
||||||
|
}
|
||||||
|
|
||||||
void MB_Initialize()
|
void MB_Initialize()
|
||||||
{
|
{
|
||||||
|
MB_InitSoundcardType();
|
||||||
|
|
||||||
LogFileOutput("MB_Initialize: g_bDisableDirectSound=%d, g_bDisableDirectSoundMockingboard=%d\n", g_bDisableDirectSound, g_bDisableDirectSoundMockingboard);
|
LogFileOutput("MB_Initialize: g_bDisableDirectSound=%d, g_bDisableDirectSoundMockingboard=%d\n", g_bDisableDirectSound, g_bDisableDirectSoundMockingboard);
|
||||||
if (g_bDisableDirectSound || g_bDisableDirectSoundMockingboard)
|
if (g_bDisableDirectSound || g_bDisableDirectSoundMockingboard)
|
||||||
{
|
{
|
||||||
MockingboardVoice.bMute = true;
|
MockingboardVoice.bMute = true;
|
||||||
g_SoundcardType = CT_Empty;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -2108,9 +2115,7 @@ bool MB_LoadSnapshot(YamlLoadHelper& yamlLoadHelper, UINT slot, UINT version)
|
||||||
|
|
||||||
AY8910_InitClock((int)CLK_6502);
|
AY8910_InitClock((int)CLK_6502);
|
||||||
|
|
||||||
// Setup in MB_InitializeIO() -> MB_SetSoundcardType()
|
// NB. g_SoundcardType & g_bPhasorEnable setup in MB_InitializeIO() -> MB_SetSoundcardType()
|
||||||
g_SoundcardType = CT_Empty;
|
|
||||||
g_bPhasorEnable = false;
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -2233,9 +2238,7 @@ bool Phasor_LoadSnapshot(YamlLoadHelper& yamlLoadHelper, UINT slot, UINT version
|
||||||
|
|
||||||
AY8910_InitClock((int)(CLK_6502 * g_PhasorClockScaleFactor));
|
AY8910_InitClock((int)(CLK_6502 * g_PhasorClockScaleFactor));
|
||||||
|
|
||||||
// Setup in MB_InitializeIO() -> MB_SetSoundcardType()
|
// NB. g_SoundcardType & g_bPhasorEnable setup in MB_InitializeIO() -> MB_SetSoundcardType()
|
||||||
g_SoundcardType = CT_Empty;
|
|
||||||
g_bPhasorEnable = false;
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,7 @@ void MB_Initialize();
|
||||||
void MB_Reinitialize();
|
void MB_Reinitialize();
|
||||||
void MB_Destroy();
|
void MB_Destroy();
|
||||||
void MB_Reset();
|
void MB_Reset();
|
||||||
|
void MB_InitSoundcardType(void);
|
||||||
void MB_InitializeIO(LPBYTE pCxRomPeripheral, UINT uSlot4, UINT uSlot5);
|
void MB_InitializeIO(LPBYTE pCxRomPeripheral, UINT uSlot4, UINT uSlot5);
|
||||||
void MB_Mute();
|
void MB_Mute();
|
||||||
void MB_Demute();
|
void MB_Demute();
|
||||||
|
|
|
@ -405,6 +405,7 @@ static void Snapshot_LoadState_v2(void)
|
||||||
KeybReset();
|
KeybReset();
|
||||||
VideoResetState();
|
VideoResetState();
|
||||||
MB_Reset();
|
MB_Reset();
|
||||||
|
MB_InitSoundcardType(); // GH#609
|
||||||
sg_SSC.CommReset();
|
sg_SSC.CommReset();
|
||||||
#ifdef USE_SPEECH_API
|
#ifdef USE_SPEECH_API
|
||||||
g_Speech.Reset();
|
g_Speech.Reset();
|
||||||
|
|
Loading…
Add table
Reference in a new issue