small code cleanup: rename "dual core" stuff to CPUThread, bOnThread, etc.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4455 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
d538a09942
commit
ac157105c5
|
@ -69,22 +69,20 @@ void SConfig::SaveSettings()
|
||||||
ini.Set("General", "RecersiveGCMPaths", m_RecursiveISOFolder);
|
ini.Set("General", "RecersiveGCMPaths", m_RecursiveISOFolder);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
{
|
{
|
||||||
// Interface
|
// Interface
|
||||||
ini.Set("Interface", "ConfirmStop", m_LocalCoreStartupParameter.bConfirmStop);
|
ini.Set("Interface", "ConfirmStop", m_LocalCoreStartupParameter.bConfirmStop);
|
||||||
ini.Set("Interface", "UsePanicHandlers", m_LocalCoreStartupParameter.bUsePanicHandlers);
|
ini.Set("Interface", "UsePanicHandlers", m_LocalCoreStartupParameter.bUsePanicHandlers);
|
||||||
ini.Set("Interface", "HideCursor", m_LocalCoreStartupParameter.bHideCursor);
|
ini.Set("Interface", "HideCursor", m_LocalCoreStartupParameter.bHideCursor);
|
||||||
ini.Set("Interface", "AutoHideCursor", m_LocalCoreStartupParameter.bAutoHideCursor);
|
ini.Set("Interface", "AutoHideCursor", m_LocalCoreStartupParameter.bAutoHideCursor);
|
||||||
ini.Set("Interface", "Theme", m_LocalCoreStartupParameter.iTheme);
|
ini.Set("Interface", "Theme", m_LocalCoreStartupParameter.iTheme);
|
||||||
ini.Set("Interface", "ShowWiimoteLeds", m_LocalCoreStartupParameter.bWiiLeds);
|
ini.Set("Interface", "ShowWiimoteLeds", m_LocalCoreStartupParameter.bWiiLeds);
|
||||||
ini.Set("Interface", "ShowWiimoteSpeakers", m_LocalCoreStartupParameter.bWiiSpeakers);
|
ini.Set("Interface", "ShowWiimoteSpeakers", m_LocalCoreStartupParameter.bWiiSpeakers);
|
||||||
// interface(UI) language
|
ini.Set("Interface", "Language", m_InterfaceLanguage);
|
||||||
ini.Set("Interface", "Language", m_InterfaceLanguage);
|
ini.Set("Interface", "ShowToolbar", m_InterfaceToolbar);
|
||||||
ini.Set("Interface", "ShowToolbar", m_InterfaceToolbar);
|
ini.Set("Interface", "ShowStatusbar", m_InterfaceStatusbar);
|
||||||
ini.Set("Interface", "ShowStatusbar", m_InterfaceStatusbar);
|
ini.Set("Interface", "ShowLogWindow", m_InterfaceLogWindow);
|
||||||
ini.Set("Interface", "ShowLogWindow", m_InterfaceLogWindow);
|
ini.Set("Interface", "ShowConsole", m_InterfaceConsole);
|
||||||
ini.Set("Interface", "ShowConsole", m_InterfaceConsole);
|
|
||||||
|
|
||||||
// Game List Control
|
// Game List Control
|
||||||
ini.Set("GameList", "ListDrives", m_ListDrives);
|
ini.Set("GameList", "ListDrives", m_ListDrives);
|
||||||
|
@ -98,7 +96,7 @@ void SConfig::SaveSettings()
|
||||||
// Core
|
// Core
|
||||||
ini.Set("Core", "HLE_BS2", m_LocalCoreStartupParameter.bHLE_BS2);
|
ini.Set("Core", "HLE_BS2", m_LocalCoreStartupParameter.bHLE_BS2);
|
||||||
ini.Set("Core", "UseDynarec", m_LocalCoreStartupParameter.bUseJIT);
|
ini.Set("Core", "UseDynarec", m_LocalCoreStartupParameter.bUseJIT);
|
||||||
ini.Set("Core", "UseDualCore", m_LocalCoreStartupParameter.bUseDualCore);
|
ini.Set("Core", "GPUThread", m_LocalCoreStartupParameter.bCPUThread);
|
||||||
ini.Set("Core", "DSPThread", m_LocalCoreStartupParameter.bDSPThread);
|
ini.Set("Core", "DSPThread", m_LocalCoreStartupParameter.bDSPThread);
|
||||||
ini.Set("Core", "SkipIdle", m_LocalCoreStartupParameter.bSkipIdle);
|
ini.Set("Core", "SkipIdle", m_LocalCoreStartupParameter.bSkipIdle);
|
||||||
ini.Set("Core", "LockThreads", m_LocalCoreStartupParameter.bLockThreads);
|
ini.Set("Core", "LockThreads", m_LocalCoreStartupParameter.bLockThreads);
|
||||||
|
@ -121,16 +119,16 @@ void SConfig::SaveSettings()
|
||||||
|
|
||||||
ini.Set("Core", "RunCompareServer", m_LocalCoreStartupParameter.bRunCompareServer);
|
ini.Set("Core", "RunCompareServer", m_LocalCoreStartupParameter.bRunCompareServer);
|
||||||
ini.Set("Core", "RunCompareClient", m_LocalCoreStartupParameter.bRunCompareClient);
|
ini.Set("Core", "RunCompareClient", m_LocalCoreStartupParameter.bRunCompareClient);
|
||||||
ini.Set("Core", "FrameLimit", m_Framelimit);
|
ini.Set("Core", "FrameLimit", m_Framelimit);
|
||||||
|
|
||||||
// Plugins
|
// Plugins
|
||||||
ini.Set("Core", "GFXPlugin", m_LocalCoreStartupParameter.m_strVideoPlugin);
|
ini.Set("Core", "GFXPlugin", m_LocalCoreStartupParameter.m_strVideoPlugin);
|
||||||
ini.Set("Core", "DSPPlugin", m_LocalCoreStartupParameter.m_strDSPPlugin);
|
ini.Set("Core", "DSPPlugin", m_LocalCoreStartupParameter.m_strDSPPlugin);
|
||||||
ini.Set("Core", "Pad1Plugin", m_LocalCoreStartupParameter.m_strPadPlugin[0]);
|
ini.Set("Core", "Pad1Plugin", m_LocalCoreStartupParameter.m_strPadPlugin[0]);
|
||||||
ini.Set("Core", "Pad2Plugin", m_LocalCoreStartupParameter.m_strPadPlugin[1]);
|
ini.Set("Core", "Pad2Plugin", m_LocalCoreStartupParameter.m_strPadPlugin[1]);
|
||||||
ini.Set("Core", "Pad3Plugin", m_LocalCoreStartupParameter.m_strPadPlugin[2]);
|
ini.Set("Core", "Pad3Plugin", m_LocalCoreStartupParameter.m_strPadPlugin[2]);
|
||||||
ini.Set("Core", "Pad4Plugin", m_LocalCoreStartupParameter.m_strPadPlugin[3]);
|
ini.Set("Core", "Pad4Plugin", m_LocalCoreStartupParameter.m_strPadPlugin[3]);
|
||||||
ini.Set("Core", "WiiMote1Plugin", m_LocalCoreStartupParameter.m_strWiimotePlugin[0]);
|
ini.Set("Core", "WiiMote1Plugin",m_LocalCoreStartupParameter.m_strWiimotePlugin[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(__APPLE__)
|
#if defined(__APPLE__)
|
||||||
|
@ -179,52 +177,51 @@ void SConfig::LoadSettings()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ini.Get("General", "RecersiveGCMPaths", &m_RecursiveISOFolder, false);
|
ini.Get("General", "RecersiveGCMPaths", &m_RecursiveISOFolder, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
// Interface
|
// Interface
|
||||||
ini.Get("Interface", "ConfirmStop", &m_LocalCoreStartupParameter.bConfirmStop, false);
|
ini.Get("Interface", "ConfirmStop", &m_LocalCoreStartupParameter.bConfirmStop, false);
|
||||||
ini.Get("Interface", "UsePanicHandlers", &m_LocalCoreStartupParameter.bUsePanicHandlers, true);
|
ini.Get("Interface", "UsePanicHandlers", &m_LocalCoreStartupParameter.bUsePanicHandlers, true);
|
||||||
ini.Get("Interface", "HideCursor", &m_LocalCoreStartupParameter.bHideCursor, false);
|
ini.Get("Interface", "HideCursor", &m_LocalCoreStartupParameter.bHideCursor, false);
|
||||||
ini.Get("Interface", "AutoHideCursor", &m_LocalCoreStartupParameter.bAutoHideCursor, false);
|
ini.Get("Interface", "AutoHideCursor", &m_LocalCoreStartupParameter.bAutoHideCursor, false);
|
||||||
ini.Get("Interface", "Theme", &m_LocalCoreStartupParameter.iTheme, 0);
|
ini.Get("Interface", "Theme", &m_LocalCoreStartupParameter.iTheme, 0);
|
||||||
ini.Get("Interface", "ShowWiimoteLeds", &m_LocalCoreStartupParameter.bWiiLeds, false);
|
ini.Get("Interface", "ShowWiimoteLeds", &m_LocalCoreStartupParameter.bWiiLeds, false);
|
||||||
ini.Get("Interface", "ShowWiimoteSpeakers", &m_LocalCoreStartupParameter.bWiiSpeakers, false);
|
ini.Get("Interface", "ShowWiimoteSpeakers", &m_LocalCoreStartupParameter.bWiiSpeakers, false);
|
||||||
// interface(UI) language
|
ini.Get("Interface", "Language", (int*)&m_InterfaceLanguage, 0);
|
||||||
ini.Get("Interface", "Language", (int*)&m_InterfaceLanguage, 0);
|
ini.Get("Interface", "ShowToolbar", &m_InterfaceToolbar, true);
|
||||||
ini.Get("Interface", "ShowToolbar", &m_InterfaceToolbar, true);
|
ini.Get("Interface", "ShowStatusbar", &m_InterfaceStatusbar, true);
|
||||||
ini.Get("Interface", "ShowStatusbar", &m_InterfaceStatusbar, true);
|
ini.Get("Interface", "ShowLogWindow", &m_InterfaceLogWindow, false);
|
||||||
ini.Get("Interface", "ShowLogWindow", &m_InterfaceLogWindow, false);
|
ini.Get("Interface", "ShowConsole", &m_InterfaceConsole, false);
|
||||||
ini.Get("Interface", "ShowConsole", &m_InterfaceConsole, false);
|
|
||||||
|
|
||||||
// Game List Control
|
// Game List Control
|
||||||
ini.Get("GameList", "ListDrives", &m_ListDrives, false);
|
ini.Get("GameList", "ListDrives", &m_ListDrives, false);
|
||||||
ini.Get("GameList", "ListWad", &m_ListWad, true);
|
ini.Get("GameList", "ListWad", &m_ListWad, true);
|
||||||
ini.Get("GameList", "ListWii", &m_ListWii, true);
|
ini.Get("GameList", "ListWii", &m_ListWii, true);
|
||||||
ini.Get("GameList", "ListGC", &m_ListGC, true);
|
ini.Get("GameList", "ListGC", &m_ListGC, true);
|
||||||
ini.Get("GameList", "ListJap", &m_ListJap, true);
|
ini.Get("GameList", "ListJap", &m_ListJap, true);
|
||||||
ini.Get("GameList", "ListPal", &m_ListPal, true);
|
ini.Get("GameList", "ListPal", &m_ListPal, true);
|
||||||
ini.Get("GameList", "ListUsa", &m_ListUsa, true);
|
ini.Get("GameList", "ListUsa", &m_ListUsa, true);
|
||||||
|
|
||||||
// Core
|
// Core
|
||||||
ini.Get("Core", "HLE_BS2", &m_LocalCoreStartupParameter.bHLE_BS2, true);
|
ini.Get("Core", "HLE_BS2", &m_LocalCoreStartupParameter.bHLE_BS2, true);
|
||||||
ini.Get("Core", "UseDynarec", &m_LocalCoreStartupParameter.bUseJIT, true);
|
ini.Get("Core", "UseDynarec", &m_LocalCoreStartupParameter.bUseJIT, true);
|
||||||
ini.Get("Core", "DSPThread", &m_LocalCoreStartupParameter.bDSPThread, true);
|
ini.Get("Core", "DSPThread", &m_LocalCoreStartupParameter.bDSPThread, true);
|
||||||
ini.Get("Core", "UseDualCore", &m_LocalCoreStartupParameter.bUseDualCore, true);
|
ini.Get("Core", "GPUThread", &m_LocalCoreStartupParameter.bCPUThread, true);
|
||||||
ini.Get("Core", "SkipIdle", &m_LocalCoreStartupParameter.bSkipIdle, true);
|
ini.Get("Core", "SkipIdle", &m_LocalCoreStartupParameter.bSkipIdle, true);
|
||||||
ini.Get("Core", "LockThreads", &m_LocalCoreStartupParameter.bLockThreads, false);
|
ini.Get("Core", "LockThreads", &m_LocalCoreStartupParameter.bLockThreads, false);
|
||||||
ini.Get("Core", "DefaultGCM", &m_LocalCoreStartupParameter.m_strDefaultGCM);
|
ini.Get("Core", "DefaultGCM", &m_LocalCoreStartupParameter.m_strDefaultGCM);
|
||||||
ini.Get("Core", "DVDRoot", &m_LocalCoreStartupParameter.m_strDVDRoot);
|
ini.Get("Core", "DVDRoot", &m_LocalCoreStartupParameter.m_strDVDRoot);
|
||||||
ini.Get("Core", "OptimizeQuantizers", &m_LocalCoreStartupParameter.bOptimizeQuantizers, true);
|
ini.Get("Core", "OptimizeQuantizers", &m_LocalCoreStartupParameter.bOptimizeQuantizers, true);
|
||||||
ini.Get("Core", "EnableCheats", &m_LocalCoreStartupParameter.bEnableCheats, false);
|
ini.Get("Core", "EnableCheats", &m_LocalCoreStartupParameter.bEnableCheats, false);
|
||||||
ini.Get("Core", "SelectedLanguage", &m_LocalCoreStartupParameter.SelectedLanguage, 0);
|
ini.Get("Core", "SelectedLanguage", &m_LocalCoreStartupParameter.SelectedLanguage, 0);
|
||||||
ini.Get("Core", "MemcardA", &m_strMemoryCardA);
|
ini.Get("Core", "MemcardA", &m_strMemoryCardA);
|
||||||
ini.Get("Core", "MemcardB", &m_strMemoryCardB);
|
ini.Get("Core", "MemcardB", &m_strMemoryCardB);
|
||||||
ini.Get("Core", "SlotA", (int*)&m_EXIDevice[0], EXIDEVICE_MEMORYCARD_A);
|
ini.Get("Core", "SlotA", (int*)&m_EXIDevice[0], EXIDEVICE_MEMORYCARD_A);
|
||||||
ini.Get("Core", "SlotB", (int*)&m_EXIDevice[1], EXIDEVICE_MEMORYCARD_B);
|
ini.Get("Core", "SlotB", (int*)&m_EXIDevice[1], EXIDEVICE_MEMORYCARD_B);
|
||||||
ini.Get("Core", "SerialPort1", (int*)&m_EXIDevice[2], EXIDEVICE_NONE);
|
ini.Get("Core", "SerialPort1", (int*)&m_EXIDevice[2], EXIDEVICE_NONE);
|
||||||
ini.Get("Core", "ProfiledReJIT", &m_LocalCoreStartupParameter.bJITProfiledReJIT, false);
|
ini.Get("Core", "ProfiledReJIT",&m_LocalCoreStartupParameter.bJITProfiledReJIT, false);
|
||||||
char sidevicenum[16];
|
char sidevicenum[16];
|
||||||
for (int i = 0; i < 4; ++i)
|
for (int i = 0; i < 4; ++i)
|
||||||
{
|
{
|
||||||
|
@ -232,24 +229,25 @@ void SConfig::LoadSettings()
|
||||||
ini.Get("Core", sidevicenum, (u32*)&m_SIDevice[i], i==0 ? SI_GC_CONTROLLER:SI_DUMMY);
|
ini.Get("Core", sidevicenum, (u32*)&m_SIDevice[i], i==0 ? SI_GC_CONTROLLER:SI_DUMMY);
|
||||||
}
|
}
|
||||||
|
|
||||||
ini.Get("Core", "RunCompareServer", &m_LocalCoreStartupParameter.bRunCompareServer, false);
|
ini.Get("Core", "RunCompareServer", &m_LocalCoreStartupParameter.bRunCompareServer, false);
|
||||||
ini.Get("Core", "RunCompareClient", &m_LocalCoreStartupParameter.bRunCompareClient, false);
|
ini.Get("Core", "RunCompareClient", &m_LocalCoreStartupParameter.bRunCompareClient, false);
|
||||||
ini.Get("Core", "TLBHack", &m_LocalCoreStartupParameter.iTLBHack, 0);
|
ini.Get("Core", "TLBHack", &m_LocalCoreStartupParameter.iTLBHack, 0);
|
||||||
ini.Get("Core", "FrameLimit", &m_Framelimit, 1);
|
ini.Get("Core", "FrameLimit", &m_Framelimit, 1);
|
||||||
|
|
||||||
// Plugins
|
// Plugins
|
||||||
ini.Get("Core", "GFXPlugin", &m_LocalCoreStartupParameter.m_strVideoPlugin, m_DefaultGFXPlugin.c_str());
|
ini.Get("Core", "GFXPlugin", &m_LocalCoreStartupParameter.m_strVideoPlugin, m_DefaultGFXPlugin.c_str());
|
||||||
ini.Get("Core", "DSPPlugin", &m_LocalCoreStartupParameter.m_strDSPPlugin, m_DefaultDSPPlugin.c_str());
|
ini.Get("Core", "DSPPlugin", &m_LocalCoreStartupParameter.m_strDSPPlugin, m_DefaultDSPPlugin.c_str());
|
||||||
for (int i = 0; i < MAXPADS; i++)
|
for (int i = 0; i < MAXPADS; i++)
|
||||||
{
|
{
|
||||||
std::string TmpName = StringFromFormat("Pad%iPlugin", (i + 1));
|
std::string TmpName = StringFromFormat("Pad%iPlugin", (i + 1));
|
||||||
ini.Get("Core", TmpName.c_str(), &m_LocalCoreStartupParameter.m_strPadPlugin[i], m_DefaultPADPlugin.c_str());
|
ini.Get("Core", TmpName.c_str(), &m_LocalCoreStartupParameter.m_strPadPlugin[i], m_DefaultPADPlugin.c_str());
|
||||||
}
|
}
|
||||||
ini.Get("Core", "WiiMote1Plugin", &m_LocalCoreStartupParameter.m_strWiimotePlugin[0], m_DefaultWiiMotePlugin.c_str());
|
ini.Get("Core", "WiiMote1Plugin", &m_LocalCoreStartupParameter.m_strWiimotePlugin[0], m_DefaultWiiMotePlugin.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
m_SYSCONF = new SysConf();
|
m_SYSCONF = new SysConf();
|
||||||
}
|
}
|
||||||
|
|
||||||
void SConfig::LoadSettingsHLE()
|
void SConfig::LoadSettingsHLE()
|
||||||
{
|
{
|
||||||
IniFile ini;
|
IniFile ini;
|
||||||
|
|
|
@ -243,7 +243,7 @@ void Stop() // - Hammertime!
|
||||||
CPluginManager::GetInstance().GetDSP()->DSP_StopSoundStream();
|
CPluginManager::GetInstance().GetDSP()->DSP_StopSoundStream();
|
||||||
|
|
||||||
// If dual core mode, the CPU thread should immediately exit here.
|
// If dual core mode, the CPU thread should immediately exit here.
|
||||||
if (_CoreParameter.bUseDualCore) {
|
if (_CoreParameter.bCPUThread) {
|
||||||
NOTICE_LOG(CONSOLE, "%s", StopMessage(true, "Wait for Video Loop to exit ...").c_str());
|
NOTICE_LOG(CONSOLE, "%s", StopMessage(true, "Wait for Video Loop to exit ...").c_str());
|
||||||
CPluginManager::GetInstance().GetVideo()->Video_ExitLoop();
|
CPluginManager::GetInstance().GetVideo()->Video_ExitLoop();
|
||||||
}
|
}
|
||||||
|
@ -292,7 +292,7 @@ THREAD_RETURN CpuThread(void *pArg)
|
||||||
CPluginManager &Plugins = CPluginManager::GetInstance();
|
CPluginManager &Plugins = CPluginManager::GetInstance();
|
||||||
const SCoreStartupParameter& _CoreParameter = SConfig::GetInstance().m_LocalCoreStartupParameter;
|
const SCoreStartupParameter& _CoreParameter = SConfig::GetInstance().m_LocalCoreStartupParameter;
|
||||||
|
|
||||||
if (_CoreParameter.bUseDualCore)
|
if (_CoreParameter.bCPUThread)
|
||||||
{
|
{
|
||||||
Common::SetCurrentThreadName("CPU thread");
|
Common::SetCurrentThreadName("CPU thread");
|
||||||
}
|
}
|
||||||
|
@ -325,7 +325,7 @@ THREAD_RETURN CpuThread(void *pArg)
|
||||||
gpuShutdownCall.Wait();
|
gpuShutdownCall.Wait();
|
||||||
|
|
||||||
// Call video shutdown from the video thread in single core mode, which is the cpuThread
|
// Call video shutdown from the video thread in single core mode, which is the cpuThread
|
||||||
if (!_CoreParameter.bUseDualCore)
|
if (!_CoreParameter.bCPUThread)
|
||||||
Plugins.ShutdownVideoPlugin();
|
Plugins.ShutdownVideoPlugin();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -350,7 +350,7 @@ THREAD_RETURN EmuThread(void *pArg)
|
||||||
Common::Thread::SetCurrentThreadAffinity(2); // Force to second core
|
Common::Thread::SetCurrentThreadAffinity(2); // Force to second core
|
||||||
|
|
||||||
INFO_LOG(OSREPORT, "Starting core = %s mode", _CoreParameter.bWii ? "Wii" : "Gamecube");
|
INFO_LOG(OSREPORT, "Starting core = %s mode", _CoreParameter.bWii ? "Wii" : "Gamecube");
|
||||||
INFO_LOG(OSREPORT, "Dualcore = %s", _CoreParameter.bUseDualCore ? "Yes" : "No");
|
INFO_LOG(OSREPORT, "CPU Thread seperate = %s", _CoreParameter.bCPUThread ? "Yes" : "No");
|
||||||
|
|
||||||
HW::Init();
|
HW::Init();
|
||||||
|
|
||||||
|
@ -373,33 +373,33 @@ THREAD_RETURN EmuThread(void *pArg)
|
||||||
VideoInitialize.pMemoryBase = Memory::base;
|
VideoInitialize.pMemoryBase = Memory::base;
|
||||||
VideoInitialize.pKeyPress = Callback_KeyPress;
|
VideoInitialize.pKeyPress = Callback_KeyPress;
|
||||||
VideoInitialize.bWii = _CoreParameter.bWii;
|
VideoInitialize.bWii = _CoreParameter.bWii;
|
||||||
VideoInitialize.bUseDualCore = _CoreParameter.bUseDualCore;
|
VideoInitialize.bOnThread = _CoreParameter.bCPUThread;
|
||||||
VideoInitialize.Fifo_CPUBase = &ProcessorInterface::Fifo_CPUBase;
|
VideoInitialize.Fifo_CPUBase = &ProcessorInterface::Fifo_CPUBase;
|
||||||
VideoInitialize.Fifo_CPUEnd = &ProcessorInterface::Fifo_CPUEnd;
|
VideoInitialize.Fifo_CPUEnd = &ProcessorInterface::Fifo_CPUEnd;
|
||||||
VideoInitialize.Fifo_CPUWritePointer = &ProcessorInterface::Fifo_CPUWritePointer;
|
VideoInitialize.Fifo_CPUWritePointer = &ProcessorInterface::Fifo_CPUWritePointer;
|
||||||
|
|
||||||
Plugins.GetVideo()->Initialize(&VideoInitialize); // Call the dll
|
Plugins.GetVideo()->Initialize(&VideoInitialize); // Call the dll
|
||||||
|
|
||||||
// Under linux, this is an X11 Display, not an HWND!
|
// Under linux, this is an X11 Display, not a HWND!
|
||||||
g_pWindowHandle = (HWND)VideoInitialize.pWindowHandle;
|
g_pWindowHandle = (HWND)VideoInitialize.pWindowHandle;
|
||||||
Callback_PeekMessages = VideoInitialize.pPeekMessages;
|
Callback_PeekMessages = VideoInitialize.pPeekMessages;
|
||||||
g_pUpdateFPSDisplay = VideoInitialize.pUpdateFPSDisplay;
|
g_pUpdateFPSDisplay = VideoInitialize.pUpdateFPSDisplay;
|
||||||
|
|
||||||
// Load and init DSPPlugin
|
// Load and init DSPPlugin
|
||||||
DSPInitialize dspInit;
|
DSPInitialize dspInit;
|
||||||
dspInit.hWnd = g_pWindowHandle;
|
dspInit.hWnd = g_pWindowHandle;
|
||||||
dspInit.pARAM_Read_U8 = (u8 (__cdecl *)(const u32))DSP::ReadARAM;
|
dspInit.pARAM_Read_U8 = (u8 (__cdecl *)(const u32))DSP::ReadARAM;
|
||||||
dspInit.pARAM_Write_U8 = (void (__cdecl *)(const u8, const u32))DSP::WriteARAM;
|
dspInit.pARAM_Write_U8 = (void (__cdecl *)(const u8, const u32))DSP::WriteARAM;
|
||||||
dspInit.pGetARAMPointer = DSP::GetARAMPtr;
|
dspInit.pGetARAMPointer = DSP::GetARAMPtr;
|
||||||
dspInit.pGetMemoryPointer = Memory::GetPointer;
|
dspInit.pGetMemoryPointer = Memory::GetPointer;
|
||||||
dspInit.pLog = Callback_DSPLog;
|
dspInit.pLog = Callback_DSPLog;
|
||||||
dspInit.pName = Callback_ISOName;
|
dspInit.pName = Callback_ISOName;
|
||||||
dspInit.pDebuggerBreak = Callback_DebuggerBreak;
|
dspInit.pDebuggerBreak = Callback_DebuggerBreak;
|
||||||
dspInit.pGenerateDSPInterrupt = Callback_DSPInterrupt;
|
dspInit.pGenerateDSPInterrupt = Callback_DSPInterrupt;
|
||||||
dspInit.pGetAudioStreaming = AudioInterface::Callback_GetStreaming;
|
dspInit.pGetAudioStreaming = AudioInterface::Callback_GetStreaming;
|
||||||
dspInit.pEmulatorState = (int *)PowerPC::GetStatePtr();
|
dspInit.pEmulatorState = (int *)PowerPC::GetStatePtr();
|
||||||
dspInit.bWii = _CoreParameter.bWii;
|
dspInit.bWii = _CoreParameter.bWii;
|
||||||
dspInit.bOnThread = _CoreParameter.bDSPThread;
|
dspInit.bOnThread = _CoreParameter.bDSPThread;
|
||||||
|
|
||||||
Plugins.GetDSP()->Initialize((void *)&dspInit);
|
Plugins.GetDSP()->Initialize((void *)&dspInit);
|
||||||
|
|
||||||
|
@ -407,9 +407,9 @@ THREAD_RETURN EmuThread(void *pArg)
|
||||||
for (int i = 0; i < MAXPADS; i++)
|
for (int i = 0; i < MAXPADS; i++)
|
||||||
{
|
{
|
||||||
SPADInitialize PADInitialize;
|
SPADInitialize PADInitialize;
|
||||||
PADInitialize.hWnd = g_pWindowHandle;
|
PADInitialize.hWnd = g_pWindowHandle;
|
||||||
PADInitialize.pLog = Callback_PADLog;
|
PADInitialize.pLog = Callback_PADLog;
|
||||||
PADInitialize.padNumber = i;
|
PADInitialize.padNumber = i;
|
||||||
// This is may be needed to avoid a SDL problem
|
// This is may be needed to avoid a SDL problem
|
||||||
//Plugins.FreeWiimote();
|
//Plugins.FreeWiimote();
|
||||||
// Check if we should init the plugin
|
// Check if we should init the plugin
|
||||||
|
@ -431,11 +431,10 @@ THREAD_RETURN EmuThread(void *pArg)
|
||||||
if (_CoreParameter.bWii)
|
if (_CoreParameter.bWii)
|
||||||
{
|
{
|
||||||
SWiimoteInitialize WiimoteInitialize;
|
SWiimoteInitialize WiimoteInitialize;
|
||||||
WiimoteInitialize.hWnd = g_pWindowHandle;
|
WiimoteInitialize.hWnd = g_pWindowHandle;
|
||||||
// Add the ISO Id
|
WiimoteInitialize.ISOId = Ascii2Hex(_CoreParameter.m_strUniqueID);
|
||||||
WiimoteInitialize.ISOId = Ascii2Hex(_CoreParameter.m_strUniqueID);
|
WiimoteInitialize.pLog = Callback_WiimoteLog;
|
||||||
WiimoteInitialize.pLog = Callback_WiimoteLog;
|
WiimoteInitialize.pWiimoteInput = Callback_WiimoteInput;
|
||||||
WiimoteInitialize.pWiimoteInput = Callback_WiimoteInput;
|
|
||||||
// Wait for Wiiuse to find the number of connected Wiimotes
|
// Wait for Wiiuse to find the number of connected Wiimotes
|
||||||
Plugins.GetWiimote(0)->Initialize((void *)&WiimoteInitialize);
|
Plugins.GetWiimote(0)->Initialize((void *)&WiimoteInitialize);
|
||||||
}
|
}
|
||||||
|
@ -467,7 +466,7 @@ THREAD_RETURN EmuThread(void *pArg)
|
||||||
Common::Thread *cpuThread = NULL;
|
Common::Thread *cpuThread = NULL;
|
||||||
|
|
||||||
// ENTER THE VIDEO THREAD LOOP
|
// ENTER THE VIDEO THREAD LOOP
|
||||||
if (_CoreParameter.bUseDualCore) // DualCore mode
|
if (_CoreParameter.bCPUThread)
|
||||||
{
|
{
|
||||||
// This thread, after creating the EmuWindow, spawns a CPU thread,
|
// This thread, after creating the EmuWindow, spawns a CPU thread,
|
||||||
// and then takes over and becomes the video thread
|
// and then takes over and becomes the video thread
|
||||||
|
@ -524,7 +523,7 @@ THREAD_RETURN EmuThread(void *pArg)
|
||||||
|
|
||||||
// Call video shutdown from the video thread, in dual core mode it's the EmuThread
|
// Call video shutdown from the video thread, in dual core mode it's the EmuThread
|
||||||
// Or set an event in Single Core mode, to call the shutdown from the cpuThread
|
// Or set an event in Single Core mode, to call the shutdown from the cpuThread
|
||||||
if (_CoreParameter.bUseDualCore)
|
if (_CoreParameter.bCPUThread)
|
||||||
Plugins.ShutdownVideoPlugin();
|
Plugins.ShutdownVideoPlugin();
|
||||||
#else
|
#else
|
||||||
// On unix platforms, the EmuThread is ALWAYS the video thread
|
// On unix platforms, the EmuThread is ALWAYS the video thread
|
||||||
|
@ -773,7 +772,7 @@ void Callback_VideoCopiedToXFB(bool video_update)
|
||||||
_CoreParameter.bUseJIT ? "JIT64" : "Int64",
|
_CoreParameter.bUseJIT ? "JIT64" : "Int64",
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
_CoreParameter.bUseDualCore ? "DC" : "SC");
|
_CoreParameter.bCPUThread ? "DC" : "SC");
|
||||||
|
|
||||||
#ifdef EXTENDED_INFO
|
#ifdef EXTENDED_INFO
|
||||||
std::string SFPS = StringFromFormat("FPS: %4.1f - VPS: %i/%i (%3.0f%%)",
|
std::string SFPS = StringFromFormat("FPS: %4.1f - VPS: %i/%i (%3.0f%%)",
|
||||||
|
|
|
@ -38,7 +38,7 @@ void SCoreStartupParameter::LoadDefaults()
|
||||||
{
|
{
|
||||||
bEnableDebugging = false;
|
bEnableDebugging = false;
|
||||||
bUseJIT = false;
|
bUseJIT = false;
|
||||||
bUseDualCore = false;
|
bCPUThread = false;
|
||||||
bSkipIdle = false;
|
bSkipIdle = false;
|
||||||
bRunCompareServer = false;
|
bRunCompareServer = false;
|
||||||
bDSPThread = true;
|
bDSPThread = true;
|
||||||
|
|
|
@ -56,7 +56,7 @@ struct SCoreStartupParameter
|
||||||
|
|
||||||
bool bEnableFPRF;
|
bool bEnableFPRF;
|
||||||
|
|
||||||
bool bUseDualCore;
|
bool bCPUThread;
|
||||||
bool bDSPThread;
|
bool bDSPThread;
|
||||||
bool bSkipIdle;
|
bool bSkipIdle;
|
||||||
bool bNTSC;
|
bool bNTSC;
|
||||||
|
|
|
@ -291,7 +291,7 @@ void Init()
|
||||||
CoreTiming::ScheduleEvent(CPU_CORE_CLOCK / (32000 * 4 / 32), et_AudioFifo);
|
CoreTiming::ScheduleEvent(CPU_CORE_CLOCK / (32000 * 4 / 32), et_AudioFifo);
|
||||||
|
|
||||||
// For DC watchdog hack
|
// For DC watchdog hack
|
||||||
if (Core::GetStartupParameter().bUseDualCore)
|
if (Core::GetStartupParameter().bCPUThread)
|
||||||
{
|
{
|
||||||
CoreTiming::ScheduleEvent(FAKE_GP_WATCHDOG_PERIOD, et_FakeGPWD);
|
CoreTiming::ScheduleEvent(FAKE_GP_WATCHDOG_PERIOD, et_FakeGPWD);
|
||||||
}
|
}
|
||||||
|
|
|
@ -81,7 +81,7 @@ bool BootCore(const std::string& _rFilename)
|
||||||
#if defined(HAVE_WX) && HAVE_WX
|
#if defined(HAVE_WX) && HAVE_WX
|
||||||
if (main_frame->g_pCodeWindow)
|
if (main_frame->g_pCodeWindow)
|
||||||
{
|
{
|
||||||
//StartUp.bUseDualCore = code_frame->UseDualCore();
|
//StartUp.bCPUThread = code_frame->UseDualCore();
|
||||||
StartUp.bUseJIT = !main_frame->g_pCodeWindow->UseInterpreter();
|
StartUp.bUseJIT = !main_frame->g_pCodeWindow->UseInterpreter();
|
||||||
StartUp.bBootToPause = main_frame->g_pCodeWindow->BootToPause();
|
StartUp.bBootToPause = main_frame->g_pCodeWindow->BootToPause();
|
||||||
StartUp.bAutomaticStart = main_frame->g_pCodeWindow->AutomaticStart();
|
StartUp.bAutomaticStart = main_frame->g_pCodeWindow->AutomaticStart();
|
||||||
|
@ -90,7 +90,7 @@ bool BootCore(const std::string& _rFilename)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//StartUp.bUseDualCore = false;
|
//StartUp.bCPUThread = false;
|
||||||
//StartUp.bUseJIT = true;
|
//StartUp.bUseJIT = true;
|
||||||
}
|
}
|
||||||
StartUp.bEnableDebugging = main_frame->g_pCodeWindow ? true : false; // RUNNING_DEBUG
|
StartUp.bEnableDebugging = main_frame->g_pCodeWindow ? true : false; // RUNNING_DEBUG
|
||||||
|
@ -120,11 +120,11 @@ bool BootCore(const std::string& _rFilename)
|
||||||
if (unique_id.size() == 6 && game_ini.Load(StartUp.m_strGameIni.c_str()))
|
if (unique_id.size() == 6 && game_ini.Load(StartUp.m_strGameIni.c_str()))
|
||||||
{
|
{
|
||||||
// General settings
|
// General settings
|
||||||
game_ini.Get("Core", "UseDualCore", &StartUp.bUseDualCore, StartUp.bUseDualCore);
|
game_ini.Get("Core", "CPUOnThread", &StartUp.bCPUThread, StartUp.bCPUThread);
|
||||||
game_ini.Get("Core", "SkipIdle", &StartUp.bSkipIdle, StartUp.bSkipIdle);
|
game_ini.Get("Core", "SkipIdle", &StartUp.bSkipIdle, StartUp.bSkipIdle);
|
||||||
game_ini.Get("Core", "OptimizeQuantizers", &StartUp.bOptimizeQuantizers, StartUp.bOptimizeQuantizers);
|
game_ini.Get("Core", "OptimizeQuantizers", &StartUp.bOptimizeQuantizers, StartUp.bOptimizeQuantizers);
|
||||||
game_ini.Get("Core", "EnableFPRF", &StartUp.bEnableFPRF, StartUp.bEnableFPRF);
|
game_ini.Get("Core", "EnableFPRF", &StartUp.bEnableFPRF, StartUp.bEnableFPRF);
|
||||||
game_ini.Get("Core", "TLBHack", &StartUp.iTLBHack, StartUp.iTLBHack);
|
game_ini.Get("Core", "TLBHack", &StartUp.iTLBHack, StartUp.iTLBHack);
|
||||||
// Wii settings
|
// Wii settings
|
||||||
if (StartUp.bWii)
|
if (StartUp.bWii)
|
||||||
{
|
{
|
||||||
|
|
|
@ -63,7 +63,7 @@ EVT_CHOICE(ID_INTERFACE_LANG, CConfigMain::CoreSettingsChanged)
|
||||||
EVT_CHECKBOX(ID_ALLWAYS_HLE_BS2, CConfigMain::CoreSettingsChanged)
|
EVT_CHECKBOX(ID_ALLWAYS_HLE_BS2, CConfigMain::CoreSettingsChanged)
|
||||||
EVT_RADIOBUTTON(ID_RADIOJIT, CConfigMain::CoreSettingsChanged)
|
EVT_RADIOBUTTON(ID_RADIOJIT, CConfigMain::CoreSettingsChanged)
|
||||||
EVT_RADIOBUTTON(ID_RADIOINT, CConfigMain::CoreSettingsChanged)
|
EVT_RADIOBUTTON(ID_RADIOINT, CConfigMain::CoreSettingsChanged)
|
||||||
EVT_CHECKBOX(ID_USEDUALCORE, CConfigMain::CoreSettingsChanged)
|
EVT_CHECKBOX(ID_CPUTHREAD, CConfigMain::CoreSettingsChanged)
|
||||||
EVT_CHECKBOX(ID_DSPTHREAD, CConfigMain::CoreSettingsChanged)
|
EVT_CHECKBOX(ID_DSPTHREAD, CConfigMain::CoreSettingsChanged)
|
||||||
EVT_CHECKBOX(ID_LOCKTHREADS, CConfigMain::CoreSettingsChanged)
|
EVT_CHECKBOX(ID_LOCKTHREADS, CConfigMain::CoreSettingsChanged)
|
||||||
EVT_CHECKBOX(ID_OPTIMIZEQUANTIZERS, CConfigMain::CoreSettingsChanged)
|
EVT_CHECKBOX(ID_OPTIMIZEQUANTIZERS, CConfigMain::CoreSettingsChanged)
|
||||||
|
@ -136,7 +136,7 @@ void CConfigMain::UpdateGUI()
|
||||||
AlwaysHLE_BS2->Disable();
|
AlwaysHLE_BS2->Disable();
|
||||||
m_RadioJIT->Disable();
|
m_RadioJIT->Disable();
|
||||||
m_RadioInt->Disable();
|
m_RadioInt->Disable();
|
||||||
UseDualCore->Disable();
|
CPUThread->Disable();
|
||||||
DSPThread->Disable();
|
DSPThread->Disable();
|
||||||
LockThreads->Disable();
|
LockThreads->Disable();
|
||||||
OptimizeQuantizers->Disable();
|
OptimizeQuantizers->Disable();
|
||||||
|
@ -208,8 +208,8 @@ void CConfigMain::CreateGUIControls()
|
||||||
// General page
|
// General page
|
||||||
|
|
||||||
// Core Settings - Basic
|
// Core Settings - Basic
|
||||||
UseDualCore = new wxCheckBox(GeneralPage, ID_USEDUALCORE, wxT("Enable Dual Core (speedup)"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
CPUThread = new wxCheckBox(GeneralPage, ID_CPUTHREAD, wxT("Enable Dual Core (speedup)"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||||
UseDualCore->SetValue(SConfig::GetInstance().m_LocalCoreStartupParameter.bUseDualCore);
|
CPUThread->SetValue(SConfig::GetInstance().m_LocalCoreStartupParameter.bCPUThread);
|
||||||
SkipIdle = new wxCheckBox(GeneralPage, ID_IDLESKIP, wxT("Enable Idle Skipping (speedup)"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
SkipIdle = new wxCheckBox(GeneralPage, ID_IDLESKIP, wxT("Enable Idle Skipping (speedup)"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||||
SkipIdle->SetValue(SConfig::GetInstance().m_LocalCoreStartupParameter.bSkipIdle);
|
SkipIdle->SetValue(SConfig::GetInstance().m_LocalCoreStartupParameter.bSkipIdle);
|
||||||
EnableCheats = new wxCheckBox(GeneralPage, ID_ENABLECHEATS, wxT("Enable Cheats"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
EnableCheats = new wxCheckBox(GeneralPage, ID_ENABLECHEATS, wxT("Enable Cheats"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||||
|
@ -286,7 +286,7 @@ void CConfigMain::CreateGUIControls()
|
||||||
WiimoteStatusLEDs->SetToolTip(wxT("Show which wiimotes are connected in the statusbar."));
|
WiimoteStatusLEDs->SetToolTip(wxT("Show which wiimotes are connected in the statusbar."));
|
||||||
WiimoteStatusSpeakers->SetToolTip(wxT("Show wiimote speaker status in the statusbar."));
|
WiimoteStatusSpeakers->SetToolTip(wxT("Show wiimote speaker status in the statusbar."));
|
||||||
DSPThread->SetToolTip(wxT("This should be on when using HLE and off when using LLE."));
|
DSPThread->SetToolTip(wxT("This should be on when using HLE and off when using LLE."));
|
||||||
UseDualCore->SetToolTip(wxT("This splits the Video and CPU threads, so they can be run on separate cores.")
|
CPUThread->SetToolTip(wxT("This splits the Video and CPU threads, so they can be run on separate cores.")
|
||||||
wxT("\nCauses major speed improvements on PCs with more than one core,")
|
wxT("\nCauses major speed improvements on PCs with more than one core,")
|
||||||
wxT("\nbut can also cause occasional crashes/glitches."));
|
wxT("\nbut can also cause occasional crashes/glitches."));
|
||||||
|
|
||||||
|
@ -302,7 +302,7 @@ void CConfigMain::CreateGUIControls()
|
||||||
// Populate the settings
|
// Populate the settings
|
||||||
sCore = new wxBoxSizer(wxHORIZONTAL);
|
sCore = new wxBoxSizer(wxHORIZONTAL);
|
||||||
sbBasic = new wxStaticBoxSizer(wxVERTICAL, GeneralPage, wxT("Basic Settings"));
|
sbBasic = new wxStaticBoxSizer(wxVERTICAL, GeneralPage, wxT("Basic Settings"));
|
||||||
sbBasic->Add(UseDualCore, 0, wxALL, 5);
|
sbBasic->Add(CPUThread, 0, wxALL, 5);
|
||||||
sbBasic->Add(SkipIdle, 0, wxALL, 5);
|
sbBasic->Add(SkipIdle, 0, wxALL, 5);
|
||||||
sbBasic->Add(EnableCheats, 0, wxALL, 5);
|
sbBasic->Add(EnableCheats, 0, wxALL, 5);
|
||||||
wxBoxSizer *sFramelimit = new wxBoxSizer(wxHORIZONTAL);
|
wxBoxSizer *sFramelimit = new wxBoxSizer(wxHORIZONTAL);
|
||||||
|
@ -679,8 +679,8 @@ void CConfigMain::CoreSettingsChanged(wxCommandEvent& event)
|
||||||
case ID_RADIOINT:
|
case ID_RADIOINT:
|
||||||
SConfig::GetInstance().m_LocalCoreStartupParameter.bUseJIT = false;
|
SConfig::GetInstance().m_LocalCoreStartupParameter.bUseJIT = false;
|
||||||
break;
|
break;
|
||||||
case ID_USEDUALCORE:
|
case ID_CPUTHREAD:
|
||||||
SConfig::GetInstance().m_LocalCoreStartupParameter.bUseDualCore = UseDualCore->IsChecked();
|
SConfig::GetInstance().m_LocalCoreStartupParameter.bCPUThread = CPUThread->IsChecked();
|
||||||
break;
|
break;
|
||||||
case ID_DSPTHREAD:
|
case ID_DSPTHREAD:
|
||||||
SConfig::GetInstance().m_LocalCoreStartupParameter.bDSPThread = DSPThread->IsChecked();
|
SConfig::GetInstance().m_LocalCoreStartupParameter.bDSPThread = DSPThread->IsChecked();
|
||||||
|
|
|
@ -65,7 +65,7 @@ private:
|
||||||
wxCheckBox* AlwaysHLE_BS2;
|
wxCheckBox* AlwaysHLE_BS2;
|
||||||
wxRadioButton* m_RadioJIT;
|
wxRadioButton* m_RadioJIT;
|
||||||
wxRadioButton* m_RadioInt;
|
wxRadioButton* m_RadioInt;
|
||||||
wxCheckBox* UseDualCore;
|
wxCheckBox* CPUThread;
|
||||||
wxCheckBox* DSPThread;
|
wxCheckBox* DSPThread;
|
||||||
wxCheckBox* LockThreads;
|
wxCheckBox* LockThreads;
|
||||||
wxCheckBox* OptimizeQuantizers;
|
wxCheckBox* OptimizeQuantizers;
|
||||||
|
@ -157,7 +157,7 @@ private:
|
||||||
ID_ALLWAYS_HLE_BS2,
|
ID_ALLWAYS_HLE_BS2,
|
||||||
ID_RADIOJIT,
|
ID_RADIOJIT,
|
||||||
ID_RADIOINT,
|
ID_RADIOINT,
|
||||||
ID_USEDUALCORE,
|
ID_CPUTHREAD,
|
||||||
ID_DSPTHREAD,
|
ID_DSPTHREAD,
|
||||||
ID_LOCKTHREADS,
|
ID_LOCKTHREADS,
|
||||||
ID_OPTIMIZEQUANTIZERS,
|
ID_OPTIMIZEQUANTIZERS,
|
||||||
|
|
|
@ -786,7 +786,7 @@ void CFrame::OnToggleFullscreen(wxCommandEvent& WXUNUSED (event))
|
||||||
|
|
||||||
void CFrame::OnToggleDualCore(wxCommandEvent& WXUNUSED (event))
|
void CFrame::OnToggleDualCore(wxCommandEvent& WXUNUSED (event))
|
||||||
{
|
{
|
||||||
SConfig::GetInstance().m_LocalCoreStartupParameter.bUseDualCore = !SConfig::GetInstance().m_LocalCoreStartupParameter.bUseDualCore;
|
SConfig::GetInstance().m_LocalCoreStartupParameter.bCPUThread = !SConfig::GetInstance().m_LocalCoreStartupParameter.bCPUThread;
|
||||||
SConfig::GetInstance().SaveSettings();
|
SConfig::GetInstance().SaveSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -289,7 +289,7 @@ void CISOProperties::CreateGUIControls(bool IsWad)
|
||||||
OverrideText = new wxStaticText(m_GameConfig, ID_OVERRIDE_TEXT, _("These settings override core Dolphin settings.\nUndetermined means the game uses Dolphin's setting."), wxDefaultPosition, wxDefaultSize);
|
OverrideText = new wxStaticText(m_GameConfig, ID_OVERRIDE_TEXT, _("These settings override core Dolphin settings.\nUndetermined means the game uses Dolphin's setting."), wxDefaultPosition, wxDefaultSize);
|
||||||
// Core
|
// Core
|
||||||
sbCoreOverrides = new wxStaticBoxSizer(wxVERTICAL, m_GameConfig, _("Core"));
|
sbCoreOverrides = new wxStaticBoxSizer(wxVERTICAL, m_GameConfig, _("Core"));
|
||||||
UseDualCore = new wxCheckBox(m_GameConfig, ID_USEDUALCORE, _("Enable Dual Core"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER, wxDefaultValidator);
|
CPUThread = new wxCheckBox(m_GameConfig, ID_USEDUALCORE, _("Enable Dual Core"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER, wxDefaultValidator);
|
||||||
SkipIdle = new wxCheckBox(m_GameConfig, ID_IDLESKIP, _("Enable Idle Skipping"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER, wxDefaultValidator);
|
SkipIdle = new wxCheckBox(m_GameConfig, ID_IDLESKIP, _("Enable Idle Skipping"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER, wxDefaultValidator);
|
||||||
OptimizeQuantizers = new wxCheckBox(m_GameConfig, ID_OPTIMIZEQUANTIZERS, _("Optimize Quantizers"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER, wxDefaultValidator);
|
OptimizeQuantizers = new wxCheckBox(m_GameConfig, ID_OPTIMIZEQUANTIZERS, _("Optimize Quantizers"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER, wxDefaultValidator);
|
||||||
TLBHack = new wxCheckBox(m_GameConfig, ID_TLBHACK, _("TLB Hack"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER, wxDefaultValidator);
|
TLBHack = new wxCheckBox(m_GameConfig, ID_TLBHACK, _("TLB Hack"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER, wxDefaultValidator);
|
||||||
|
@ -344,7 +344,7 @@ void CISOProperties::CreateGUIControls(bool IsWad)
|
||||||
wxBoxSizer* sConfigPage;
|
wxBoxSizer* sConfigPage;
|
||||||
sConfigPage = new wxBoxSizer(wxVERTICAL);
|
sConfigPage = new wxBoxSizer(wxVERTICAL);
|
||||||
sbGameConfig->Add(OverrideText, 0, wxEXPAND|wxALL, 5);
|
sbGameConfig->Add(OverrideText, 0, wxEXPAND|wxALL, 5);
|
||||||
sbCoreOverrides->Add(UseDualCore, 0, wxEXPAND|wxLEFT, 5);
|
sbCoreOverrides->Add(CPUThread, 0, wxEXPAND|wxLEFT, 5);
|
||||||
sbCoreOverrides->Add(SkipIdle, 0, wxEXPAND|wxLEFT, 5);
|
sbCoreOverrides->Add(SkipIdle, 0, wxEXPAND|wxLEFT, 5);
|
||||||
sbCoreOverrides->Add(TLBHack, 0, wxEXPAND|wxLEFT, 5);
|
sbCoreOverrides->Add(TLBHack, 0, wxEXPAND|wxLEFT, 5);
|
||||||
sbCoreOverrides->Add(OptimizeQuantizers, 0, wxEXPAND|wxLEFT, 5);
|
sbCoreOverrides->Add(OptimizeQuantizers, 0, wxEXPAND|wxLEFT, 5);
|
||||||
|
@ -765,10 +765,10 @@ void CISOProperties::LoadGameConfig()
|
||||||
int iTemp;
|
int iTemp;
|
||||||
std::string sTemp;
|
std::string sTemp;
|
||||||
|
|
||||||
if (GameIni.Get("Core", "UseDualCore", &bTemp))
|
if (GameIni.Get("Core", "CPUThread", &bTemp))
|
||||||
UseDualCore->Set3StateValue((wxCheckBoxState)bTemp);
|
CPUThread->Set3StateValue((wxCheckBoxState)bTemp);
|
||||||
else
|
else
|
||||||
UseDualCore->Set3StateValue(wxCHK_UNDETERMINED);
|
CPUThread->Set3StateValue(wxCHK_UNDETERMINED);
|
||||||
|
|
||||||
if (GameIni.Get("Core", "SkipIdle", &bTemp))
|
if (GameIni.Get("Core", "SkipIdle", &bTemp))
|
||||||
SkipIdle->Set3StateValue((wxCheckBoxState)bTemp);
|
SkipIdle->Set3StateValue((wxCheckBoxState)bTemp);
|
||||||
|
@ -850,10 +850,10 @@ void CISOProperties::LoadGameConfig()
|
||||||
|
|
||||||
bool CISOProperties::SaveGameConfig()
|
bool CISOProperties::SaveGameConfig()
|
||||||
{
|
{
|
||||||
if (UseDualCore->Get3StateValue() == wxCHK_UNDETERMINED)
|
if (CPUThread->Get3StateValue() == wxCHK_UNDETERMINED)
|
||||||
GameIni.DeleteKey("Core", "UseDualCore");
|
GameIni.DeleteKey("Core", "CPUThread");
|
||||||
else
|
else
|
||||||
GameIni.Set("Core", "UseDualCore", UseDualCore->Get3StateValue());
|
GameIni.Set("Core", "CPUThread", CPUThread->Get3StateValue());
|
||||||
|
|
||||||
if (SkipIdle->Get3StateValue() == wxCHK_UNDETERMINED)
|
if (SkipIdle->Get3StateValue() == wxCHK_UNDETERMINED)
|
||||||
GameIni.DeleteKey("Core", "SkipIdle");
|
GameIni.DeleteKey("Core", "SkipIdle");
|
||||||
|
|
|
@ -81,7 +81,7 @@ class CISOProperties : public wxDialog
|
||||||
|
|
||||||
wxStaticText *OverrideText;
|
wxStaticText *OverrideText;
|
||||||
// Core
|
// Core
|
||||||
wxCheckBox *UseDualCore, *SkipIdle, *OptimizeQuantizers, *TLBHack;
|
wxCheckBox *CPUThread, *SkipIdle, *OptimizeQuantizers, *TLBHack;
|
||||||
// Wii
|
// Wii
|
||||||
wxCheckBox *EnableProgressiveScan, *EnableWideScreen;
|
wxCheckBox *EnableProgressiveScan, *EnableWideScreen;
|
||||||
// Video
|
// Video
|
||||||
|
|
|
@ -76,11 +76,11 @@ std::string Summarize_Settings()
|
||||||
"[Wii]Progressive Scan: %s\n",
|
"[Wii]Progressive Scan: %s\n",
|
||||||
Core::GetStartupParameter().bHLE_BS2?"True":"False",
|
Core::GetStartupParameter().bHLE_BS2?"True":"False",
|
||||||
Core::GetStartupParameter().bUseJIT?"True":"False",
|
Core::GetStartupParameter().bUseJIT?"True":"False",
|
||||||
Core::GetStartupParameter().bUseDualCore?"True":"False",
|
Core::GetStartupParameter().bCPUThread?"True":"False",
|
||||||
Core::GetStartupParameter().bDSPThread?"True":"False",
|
Core::GetStartupParameter().bDSPThread?"True":"False",
|
||||||
Core::GetStartupParameter().bSkipIdle?"True":"False",
|
Core::GetStartupParameter().bSkipIdle?"True":"False",
|
||||||
Core::GetStartupParameter().bLockThreads?"True":"False",
|
Core::GetStartupParameter().bLockThreads?"True":"False",
|
||||||
Core::GetStartupParameter().bUseDualCore?"True":"False",
|
Core::GetStartupParameter().bCPUThread?"True":"False",
|
||||||
Core::GetStartupParameter().m_strDefaultGCM.c_str(),
|
Core::GetStartupParameter().m_strDefaultGCM.c_str(),
|
||||||
Core::GetStartupParameter().m_strDVDRoot.c_str(),
|
Core::GetStartupParameter().m_strDVDRoot.c_str(),
|
||||||
Core::GetStartupParameter().bOptimizeQuantizers?"True":"False",
|
Core::GetStartupParameter().bOptimizeQuantizers?"True":"False",
|
||||||
|
|
|
@ -344,7 +344,7 @@ void Read16(u16& _rReturnValue, const u32 _Address)
|
||||||
|
|
||||||
bool AllowIdleSkipping()
|
bool AllowIdleSkipping()
|
||||||
{
|
{
|
||||||
return !g_VideoInitialize.bUseDualCore || (!m_CPCtrlReg.CPIntEnable && !m_CPCtrlReg.BPEnable);
|
return !g_VideoInitialize.bOnThread || (!m_CPCtrlReg.CPIntEnable && !m_CPCtrlReg.BPEnable);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Write16(const u16 _Value, const u32 _Address)
|
void Write16(const u16 _Value, const u32 _Address)
|
||||||
|
@ -354,7 +354,7 @@ void Write16(const u16 _Value, const u32 _Address)
|
||||||
//Spin until queue is empty - it WILL become empty because this is the only thread
|
//Spin until queue is empty - it WILL become empty because this is the only thread
|
||||||
//that submits data
|
//that submits data
|
||||||
|
|
||||||
if (g_VideoInitialize.bUseDualCore)
|
if (g_VideoInitialize.bOnThread)
|
||||||
{
|
{
|
||||||
// Force complete fifo flush if we attempt to set/reset the fifo (API GXSetGPFifo or equivalent)
|
// Force complete fifo flush if we attempt to set/reset the fifo (API GXSetGPFifo or equivalent)
|
||||||
// It's kind of an API hack but it works for lots of games... and I hope it's the same way for every games.
|
// It's kind of an API hack but it works for lots of games... and I hope it's the same way for every games.
|
||||||
|
@ -566,7 +566,7 @@ void Write16(const u16 _Value, const u32 _Address)
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO(mb2): better. Check if it help: avoid CPReadPointer overwrites when stupidly done like in Super Monkey Ball
|
// TODO(mb2): better. Check if it help: avoid CPReadPointer overwrites when stupidly done like in Super Monkey Ball
|
||||||
if ((!fifo.bFF_GPReadEnable && fifo.CPReadIdle) || !g_VideoInitialize.bUseDualCore) // TOCHECK(mb2): check again if thread safe?
|
if ((!fifo.bFF_GPReadEnable && fifo.CPReadIdle) || !g_VideoInitialize.bOnThread) // TOCHECK(mb2): check again if thread safe?
|
||||||
UpdateFifoRegister();
|
UpdateFifoRegister();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -587,7 +587,7 @@ void STACKALIGN GatherPipeBursted()
|
||||||
if (!fifo.bFF_GPLinkEnable)
|
if (!fifo.bFF_GPLinkEnable)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (g_VideoInitialize.bUseDualCore)
|
if (g_VideoInitialize.bOnThread)
|
||||||
{
|
{
|
||||||
// update the fifo-pointer
|
// update the fifo-pointer
|
||||||
fifo.CPWritePointer += GATHER_PIPE_SIZE;
|
fifo.CPWritePointer += GATHER_PIPE_SIZE;
|
||||||
|
@ -716,7 +716,7 @@ void UpdateFifoRegister()
|
||||||
|
|
||||||
Common::AtomicStore(fifo.CPReadWriteDistance, dist);
|
Common::AtomicStore(fifo.CPReadWriteDistance, dist);
|
||||||
|
|
||||||
if (!g_VideoInitialize.bUseDualCore)
|
if (!g_VideoInitialize.bOnThread)
|
||||||
CatchUpGPU();
|
CatchUpGPU();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -302,7 +302,7 @@ void Write32(const u32 _iValue, const u32 _iAddress)
|
||||||
|
|
||||||
bool AllowIdleSkipping()
|
bool AllowIdleSkipping()
|
||||||
{
|
{
|
||||||
return !g_VideoInitialize.bUseDualCore|| (!m_Control.PETokenEnable && !m_Control.PEFinishEnable);
|
return !g_VideoInitialize.bOnThread|| (!m_Control.PETokenEnable && !m_Control.PEFinishEnable);
|
||||||
}
|
}
|
||||||
|
|
||||||
void UpdateInterrupts()
|
void UpdateInterrupts()
|
||||||
|
|
|
@ -84,7 +84,7 @@ typedef struct
|
||||||
TKeyPressed pKeyPress;
|
TKeyPressed pKeyPress;
|
||||||
void *pMemoryBase;
|
void *pMemoryBase;
|
||||||
bool bWii;
|
bool bWii;
|
||||||
bool bUseDualCore;
|
bool bOnThread;
|
||||||
u32 *Fifo_CPUBase;
|
u32 *Fifo_CPUBase;
|
||||||
u32 *Fifo_CPUEnd;
|
u32 *Fifo_CPUEnd;
|
||||||
u32 *Fifo_CPUWritePointer;
|
u32 *Fifo_CPUWritePointer;
|
||||||
|
|
|
@ -355,7 +355,7 @@ void Video_BeginField(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight)
|
||||||
{
|
{
|
||||||
|
|
||||||
// Make sure previous swap request has made it to the screen
|
// Make sure previous swap request has made it to the screen
|
||||||
if (g_VideoInitialize.bUseDualCore)
|
if (g_VideoInitialize.bOnThread)
|
||||||
{
|
{
|
||||||
// It seems to be working fine in this way for now without using AtomicLoadAcquire
|
// It seems to be working fine in this way for now without using AtomicLoadAcquire
|
||||||
// ector, please check here
|
// ector, please check here
|
||||||
|
@ -450,7 +450,7 @@ u32 Video_AccessEFB(EFBAccessType type, u32 x, u32 y)
|
||||||
|
|
||||||
Common::AtomicStoreRelease(s_efbAccessRequested, TRUE);
|
Common::AtomicStoreRelease(s_efbAccessRequested, TRUE);
|
||||||
|
|
||||||
if (g_VideoInitialize.bUseDualCore)
|
if (g_VideoInitialize.bOnThread)
|
||||||
{
|
{
|
||||||
while (Common::AtomicLoadAcquire(s_efbAccessRequested))
|
while (Common::AtomicLoadAcquire(s_efbAccessRequested))
|
||||||
Common::YieldCPU();
|
Common::YieldCPU();
|
||||||
|
|
|
@ -511,9 +511,8 @@ void Video_BeginField(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight)
|
||||||
if (s_PluginInitialized)
|
if (s_PluginInitialized)
|
||||||
{
|
{
|
||||||
// Make sure previous swap request has made it to the screen
|
// Make sure previous swap request has made it to the screen
|
||||||
if (g_VideoInitialize.bUseDualCore)
|
if (g_VideoInitialize.bOnThread)
|
||||||
{
|
{
|
||||||
|
|
||||||
while (Common::AtomicLoadAcquire(s_swapRequested))
|
while (Common::AtomicLoadAcquire(s_swapRequested))
|
||||||
Common::YieldCPU();
|
Common::YieldCPU();
|
||||||
}
|
}
|
||||||
|
@ -565,7 +564,7 @@ u32 Video_AccessEFB(EFBAccessType type, u32 x, u32 y)
|
||||||
|
|
||||||
Common::AtomicStoreRelease(s_efbAccessRequested, TRUE);
|
Common::AtomicStoreRelease(s_efbAccessRequested, TRUE);
|
||||||
|
|
||||||
if (g_VideoInitialize.bUseDualCore)
|
if (g_VideoInitialize.bOnThread)
|
||||||
{
|
{
|
||||||
while (Common::AtomicLoadAcquire(s_efbAccessRequested))
|
while (Common::AtomicLoadAcquire(s_efbAccessRequested))
|
||||||
Common::YieldCPU();
|
Common::YieldCPU();
|
||||||
|
|
|
@ -120,7 +120,7 @@ void Read16(u16& _rReturnValue, const u32 _Address)
|
||||||
|
|
||||||
void RunGpu()
|
void RunGpu()
|
||||||
{
|
{
|
||||||
if (!g_VideoInitialize.bUseDualCore)
|
if (!g_VideoInitialize.bOnThread)
|
||||||
{
|
{
|
||||||
// We are going to do FP math on the main thread so have to save the current state
|
// We are going to do FP math on the main thread so have to save the current state
|
||||||
SaveSSEState();
|
SaveSSEState();
|
||||||
|
|
|
@ -114,7 +114,7 @@ void Write16(const u16 _iValue, const u32 _iAddress)
|
||||||
|
|
||||||
bool AllowIdleSkipping()
|
bool AllowIdleSkipping()
|
||||||
{
|
{
|
||||||
return !g_VideoInitialize.bUseDualCore || (!pereg.ctrl.PETokenEnable && !pereg.ctrl.PEFinishEnable);
|
return !g_VideoInitialize.bOnThread || (!pereg.ctrl.PETokenEnable && !pereg.ctrl.PEFinishEnable);
|
||||||
}
|
}
|
||||||
|
|
||||||
void UpdateInterrupts()
|
void UpdateInterrupts()
|
||||||
|
|
Loading…
Reference in New Issue