Idle skipping in DC added (speedup). "Idle skipping" option in menu and ini
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@544 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
9323ec5df6
commit
e6a12b553b
|
@ -32,6 +32,7 @@ void SCoreStartupParameter::LoadDefaults()
|
|||
bEnableDebugging = false;
|
||||
bUseJIT = false;
|
||||
bUseDualCore = false;
|
||||
bSkipIdle = false;
|
||||
bRunCompareServer = false;
|
||||
bLockThreads = true;
|
||||
bWii = false;
|
||||
|
|
|
@ -37,6 +37,7 @@ struct SCoreStartupParameter
|
|||
bool bEnableDebugging;
|
||||
bool bUseJIT;
|
||||
bool bUseDualCore;
|
||||
bool bSkipIdle;
|
||||
bool bNTSC;
|
||||
bool bHLEBios;
|
||||
bool bUseFastMem;
|
||||
|
|
|
@ -80,20 +80,27 @@ namespace Jit64
|
|||
|
||||
// TODO(ector): Make it dynamically enable/disable idle skipping where appropriate
|
||||
// Will give nice boost to dual core mode
|
||||
// (mb2): I agree,
|
||||
// IMHO those Idles should be always skipped and replaced by a more controlable "native" Idle methode
|
||||
// ... maybe the throttle one already do that :p
|
||||
// if (CommandProcessor::AllowIdleSkipping() && PixelEngine::AllowIdleSkipping())
|
||||
if (!Core::GetStartupParameter().bUseDualCore &&
|
||||
if (Core::GetStartupParameter().bSkipIdle &&
|
||||
inst.OPCD == 32 &&
|
||||
(inst.hex & 0xFFFF0000) == 0x800D0000 &&
|
||||
Memory::ReadUnchecked_U32(js.compilerPC + 4) == 0x28000000 &&
|
||||
Memory::ReadUnchecked_U32(js.compilerPC + 8) == 0x4182fff8)
|
||||
{
|
||||
gpr.Flush(FLUSH_ALL);
|
||||
fpr.Flush(FLUSH_ALL);
|
||||
ABI_CallFunctionC((void *)&PowerPC::OnIdle, PowerPC::ppcState.gpr[a] + (s32)(s16)inst.SIMM_16);
|
||||
MOV(32, M(&PowerPC::ppcState.pc), Imm32(js.compilerPC + 12));
|
||||
JMP(Asm::testExceptions, true);
|
||||
js.compilerPC += 8;
|
||||
return;
|
||||
|
||||
gpr.Flush(FLUSH_ALL);
|
||||
fpr.Flush(FLUSH_ALL);
|
||||
if (Core::GetStartupParameter().bUseDualCore)
|
||||
CALL(&PowerPC::OnIdleDC);
|
||||
else
|
||||
ABI_CallFunctionC((void *)&PowerPC::OnIdle, PowerPC::ppcState.gpr[a] + (s32)(s16)inst.SIMM_16);
|
||||
MOV(32, M(&PowerPC::ppcState.pc), Imm32(js.compilerPC + 12));
|
||||
JMP(Asm::testExceptions, true);
|
||||
js.compilerPC += 8;
|
||||
return;
|
||||
}
|
||||
|
||||
s32 offset = (s32)(s16)inst.SIMM_16;
|
||||
|
|
|
@ -290,5 +290,10 @@ namespace PowerPC
|
|||
CoreTiming::Idle();
|
||||
}
|
||||
}
|
||||
//DualCore OnIdle
|
||||
void OnIdleDC(void)
|
||||
{
|
||||
CoreTiming::Idle();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -92,6 +92,7 @@ namespace PowerPC
|
|||
void Stop();
|
||||
|
||||
void OnIdle(u32 _uThreadAddr);
|
||||
void OnIdleDC(void);
|
||||
}
|
||||
|
||||
// Special registers
|
||||
|
|
|
@ -81,6 +81,7 @@ bool BootCore(const std::string& _rFilename)
|
|||
if (unique_id.size() == 6 && ini.Load(("Patches/" + unique_id + ".ini").c_str()))
|
||||
{
|
||||
ini.Get("Core", "UseDualCore", &StartUp.bUseDualCore, StartUp.bUseDualCore);
|
||||
ini.Get("Core", "SkipIdle", &StartUp.bSkipIdle, StartUp.bSkipIdle);
|
||||
ini.Get("Core", "OptimizeQuantizers", &StartUp.bOptimizeQuantizers, StartUp.bOptimizeQuantizers);
|
||||
}
|
||||
if(main_frame)
|
||||
|
|
|
@ -67,6 +67,7 @@ void SConfig::SaveSettings()
|
|||
ini.Set("Core", "HLEBios", m_LocalCoreStartupParameter.bHLEBios);
|
||||
ini.Set("Core", "UseDynarec", m_LocalCoreStartupParameter.bUseJIT);
|
||||
ini.Set("Core", "UseDualCore", m_LocalCoreStartupParameter.bUseDualCore);
|
||||
ini.Set("Core", "SkipIdle", m_LocalCoreStartupParameter.bSkipIdle);
|
||||
ini.Set("Core", "LockThreads", m_LocalCoreStartupParameter.bLockThreads);
|
||||
ini.Set("Core", "DefaultGCM", m_LocalCoreStartupParameter.m_strDefaultGCM);
|
||||
ini.Set("Core", "OptimizeQuantizers", m_LocalCoreStartupParameter.bOptimizeQuantizers);
|
||||
|
@ -118,6 +119,7 @@ void SConfig::LoadSettings()
|
|||
ini.Get("Core", "HLEBios", &m_LocalCoreStartupParameter.bHLEBios, true);
|
||||
ini.Get("Core", "UseDynarec", &m_LocalCoreStartupParameter.bUseJIT, true);
|
||||
ini.Get("Core", "UseDualCore", &m_LocalCoreStartupParameter.bUseDualCore, false);
|
||||
ini.Get("Core", "SkipIdle", &m_LocalCoreStartupParameter.bSkipIdle, true);
|
||||
ini.Get("Core", "LockThreads", &m_LocalCoreStartupParameter.bLockThreads, true);
|
||||
ini.Get("Core", "DefaultGCM", &m_LocalCoreStartupParameter.m_strDefaultGCM);
|
||||
ini.Get("Core", "OptimizeQuantizers", &m_LocalCoreStartupParameter.bOptimizeQuantizers, true);
|
||||
|
|
|
@ -96,6 +96,7 @@ EVT_MENU(IDM_BROWSE, CFrame::OnBrowse)
|
|||
EVT_MENU(IDM_MEMCARD, CFrame::OnMemcard)
|
||||
EVT_MENU(IDM_TOGGLE_FULLSCREEN, CFrame::OnToggleFullscreen)
|
||||
EVT_MENU(IDM_TOGGLE_DUALCORE, CFrame::OnToggleDualCore)
|
||||
EVT_MENU(IDM_TOGGLE_SKIPIDLE, CFrame::OnToggleSkipIdle)
|
||||
EVT_MENU(IDM_TOGGLE_TOOLBAR, CFrame::OnToggleToolbar)
|
||||
EVT_MENU(IDM_TOGGLE_STATUSBAR, CFrame::OnToggleStatusbar)
|
||||
EVT_MENU(IDM_LOADSLOT1, CFrame::OnLoadState)
|
||||
|
@ -222,6 +223,8 @@ void CFrame::CreateMenu()
|
|||
pOptionsMenu->Append(IDM_TOGGLE_FULLSCREEN, _T("&Fullscreen\tAlt+Enter"));
|
||||
pOptionsMenu->AppendCheckItem(IDM_TOGGLE_DUALCORE, _T("Dual-&core (unstable!)"));
|
||||
pOptionsMenu->Check(IDM_TOGGLE_DUALCORE, SConfig::GetInstance().m_LocalCoreStartupParameter.bUseDualCore);
|
||||
pOptionsMenu->AppendCheckItem(IDM_TOGGLE_SKIPIDLE, _T("Idle s&kipping"));
|
||||
pOptionsMenu->Check(IDM_TOGGLE_SKIPIDLE, SConfig::GetInstance().m_LocalCoreStartupParameter.bSkipIdle);
|
||||
m_pMenuBar->Append(pOptionsMenu, _T("&Options"));
|
||||
|
||||
// misc menu
|
||||
|
@ -555,6 +558,11 @@ void CFrame::OnToggleDualCore(wxCommandEvent& WXUNUSED (event))
|
|||
SConfig::GetInstance().m_LocalCoreStartupParameter.bUseDualCore = !SConfig::GetInstance().m_LocalCoreStartupParameter.bUseDualCore;
|
||||
SConfig::GetInstance().SaveSettings();
|
||||
}
|
||||
void CFrame::OnToggleSkipIdle(wxCommandEvent& WXUNUSED (event))
|
||||
{
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.bSkipIdle = !SConfig::GetInstance().m_LocalCoreStartupParameter.bSkipIdle;
|
||||
SConfig::GetInstance().SaveSettings();
|
||||
}
|
||||
|
||||
void CFrame::OnLoadState(wxCommandEvent& event)
|
||||
{
|
||||
|
|
|
@ -66,6 +66,7 @@ class CFrame
|
|||
void OnMemcard(wxCommandEvent& event);
|
||||
void OnToggleFullscreen(wxCommandEvent& event);
|
||||
void OnToggleDualCore(wxCommandEvent& event);
|
||||
void OnToggleSkipIdle(wxCommandEvent& event);
|
||||
void OnToggleThrottle(wxCommandEvent& event);
|
||||
void OnToggleToolbar(wxCommandEvent& event);
|
||||
void OnToggleStatusbar(wxCommandEvent& event);
|
||||
|
|
|
@ -57,6 +57,7 @@ enum
|
|||
IDM_CONFIG_PAD_PLUGIN,
|
||||
IDM_TOGGLE_FULLSCREEN,
|
||||
IDM_TOGGLE_DUALCORE,
|
||||
IDM_TOGGLE_SKIPIDLE,
|
||||
IDM_TOGGLE_TOOLBAR,
|
||||
IDM_TOGGLE_STATUSBAR,
|
||||
IDM_NOTIFYMAPLOADED,
|
||||
|
|
Loading…
Reference in New Issue