Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add a fastmem option for enabling and disabling fastmem at runtime.
  • Loading branch information
Sonicadvance1 committed Apr 19, 2013
1 parent bf5a046 commit 47f1505
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 2 deletions.
2 changes: 2 additions & 0 deletions Source/Core/Core/Src/ConfigManager.cpp
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down
1 change: 1 addition & 0 deletions Source/Core/Core/Src/Core.cpp
Expand Up @@ -299,6 +299,7 @@ void CpuThread()
}

#if defined(_M_X64) || _M_ARM
if (_CoreParameter.bFastmem)
EMM::InstallExceptionHandler(); // Let's run under memory watch
#endif

Expand Down
1 change: 1 addition & 0 deletions Source/Core/Core/Src/CoreParameter.cpp
Expand Up @@ -60,6 +60,7 @@ void SCoreStartupParameter::LoadDefaults()
bRunCompareServer = false;
bDSPHLE = true;
bDSPThread = true;
bFastmem = true;
bEnableFPRF = false;
bMMU = false;
bDCBZOFF = false;
Expand Down
1 change: 1 addition & 0 deletions Source/Core/Core/Src/CoreParameter.h
Expand Up @@ -82,6 +82,7 @@ struct SCoreStartupParameter
bool bJITILTimeProfiling;
bool bJITILOutputIR;

bool bFastmem;
bool bEnableFPRF;

bool bCPUThread;
Expand Down
4 changes: 2 additions & 2 deletions Source/Core/Core/Src/PowerPC/JitCommon/Jit_Util.cpp
Expand Up @@ -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);
Expand Down

0 comments on commit 47f1505

Please sign in to comment.