Fix for MB type not being set to empty on a restart. (Broke during Config refactor)

This commit is contained in:
tomch 2012-08-12 11:03:38 +00:00
parent 64c92bc193
commit cdd669a26d
3 changed files with 26 additions and 4 deletions

View File

@ -24,6 +24,7 @@ Restrictions/bugs:
Changes:
. [Feature #4399] Allow Z80 SoftCard to be inserted into slot 4 or 5. (Allows CP/M v3 to work)
. Reworked Configuration (property sheets) to allow multiple hardware changes.
. Updated Help .chm with info on No-Slot clock.
Fixes:
. Floating bus not returned for empty slot $Cnxx addresses. Fixes:

View File

@ -541,6 +541,8 @@ void LoadConfiguration()
if (g_Slot4 == CT_MockingboardC || g_Slot4 == CT_Phasor)
MB_SetSoundcardType(g_Slot4);
else
MB_SetSoundcardType(CT_Empty);
//

View File

@ -1333,8 +1333,6 @@ void MB_Initialize()
MB_Reset();
}
g_bMB_Active = (g_SoundcardType != CT_Empty);
}
//-----------------------------------------------------------------------------
@ -1357,6 +1355,28 @@ void MB_Destroy()
//-----------------------------------------------------------------------------
static void ResetState()
{
g_n6522TimerPeriod = 0;
g_nMBTimerDevice = TIMERDEVICE_INVALID;
g_uLastCumulativeCycles = 0;
g_nSSI263Device = 0;
g_nCurrentActivePhoneme = -1;
g_bStopPhoneme = false;
g_bVotraxPhoneme = false;
g_nMB_InActiveCycleCount = 0;
g_bMB_RegAccessedFlag = false;
g_bMB_Active = false;
//g_bMBAvailable = false;
//g_SoundcardType = CT_Empty;
//g_bPhasorEnable = false;
g_nPhasorMode = 0;
}
void MB_Reset()
{
if(!g_bDSAvailable)
@ -1368,8 +1388,7 @@ void MB_Reset()
AY8910_reset(i);
}
g_bMB_Active = (g_SoundcardType != CT_Empty);
g_nPhasorMode = 0;
ResetState();
MB_Reinitialize(); // Reset CLK for AY8910s
}