Add a fastmem option for enabling and disabling fastmem at runtime.

This commit is contained in:
Ryan Houdek 2013-04-19 07:50:33 -05:00
parent bf5a046b82
commit 47f1505499
5 changed files with 7 additions and 2 deletions

View File

@ -201,6 +201,7 @@ void SConfig::SaveSettings()
// Core
ini.Set("Core", "HLE_BS2", m_LocalCoreStartupParameter.bHLE_BS2);
ini.Set("Core", "CPUCore", m_LocalCoreStartupParameter.iCPUCore);
ini.Set("Core", "Fastmem", m_LocalCoreStartupParameter.bFastmem);
ini.Set("Core", "CPUThread", m_LocalCoreStartupParameter.bCPUThread);
ini.Set("Core", "DSPThread", m_LocalCoreStartupParameter.bDSPThread);
ini.Set("Core", "DSPHLE", m_LocalCoreStartupParameter.bDSPHLE);
@ -354,6 +355,7 @@ void SConfig::LoadSettings()
#else
ini.Get("Core", "CPUCore", &m_LocalCoreStartupParameter.iCPUCore, 1);
#endif
ini.Get("Core", "Fastmem", &m_LocalCoreStartupParameter.bFastmem, true);
ini.Get("Core", "DSPThread", &m_LocalCoreStartupParameter.bDSPThread, false);
ini.Get("Core", "DSPHLE", &m_LocalCoreStartupParameter.bDSPHLE, true);
ini.Get("Core", "CPUThread", &m_LocalCoreStartupParameter.bCPUThread, true);

View File

@ -299,6 +299,7 @@ void CpuThread()
}
#if defined(_M_X64) || _M_ARM
if (_CoreParameter.bFastmem)
EMM::InstallExceptionHandler(); // Let's run under memory watch
#endif

View File

@ -60,6 +60,7 @@ void SCoreStartupParameter::LoadDefaults()
bRunCompareServer = false;
bDSPHLE = true;
bDSPThread = true;
bFastmem = true;
bEnableFPRF = false;
bMMU = false;
bDCBZOFF = false;

View File

@ -82,6 +82,7 @@ struct SCoreStartupParameter
bool bJITILTimeProfiling;
bool bJITILOutputIR;
bool bFastmem;
bool bEnableFPRF;
bool bCPUThread;

View File

@ -111,9 +111,9 @@ void EmuCodeBlock::SafeLoadToEAX(const Gen::OpArg & opAddress, int accessSize, s
{
#if defined(_M_X64)
#ifdef ENABLE_MEM_CHECK
if (!Core::g_CoreStartupParameter.bMMU && !Core::g_CoreStartupParameter.bEnableDebugging)
if (!Core::g_CoreStartupParameter.bMMU && !Core::g_CoreStartupParameter.bEnableDebugging && Core::g_CoreStartupParameter.bFastmem)
#else
if (!Core::g_CoreStartupParameter.bMMU)
if (!Core::g_CoreStartupParameter.bMMU && Core::g_CoreStartupParameter.bFastmem)
#endif
{
UnsafeLoadToEAX(opAddress, accessSize, offset, signExtend);