Merge pull request #574 from dolphin-emu/revert-328-enum_cpubackend

Revert "Don't add segfault handler in interpreter mode"
This commit is contained in:
Pierre Bourdon 2014-07-07 05:32:44 +02:00
commit 59c938d3a7
23 changed files with 66 additions and 80 deletions

View File

@ -113,7 +113,7 @@ unsigned int CMixer::Mix(short* samples, unsigned int num_samples, bool consider
memset(samples, 0, num_samples * 2 * sizeof(short)); memset(samples, 0, num_samples * 2 * sizeof(short));
if (PowerPC::GetState() != PowerPC::STATE_RUNNING) if (PowerPC::GetState() != PowerPC::CPU_RUNNING)
{ {
// Silence // Silence
return num_samples; return num_samples;
@ -138,7 +138,7 @@ void CMixer::MixerFifo::PushSamples(const short *samples, unsigned int num_sampl
// The auto throttle function. This loop will put a ceiling on the CPU MHz. // The auto throttle function. This loop will put a ceiling on the CPU MHz.
while (num_samples * 2 + ((indexW - Common::AtomicLoad(m_indexR)) & INDEX_MASK) >= MAX_SAMPLES * 2) while (num_samples * 2 + ((indexW - Common::AtomicLoad(m_indexR)) & INDEX_MASK) >= MAX_SAMPLES * 2)
{ {
if (*PowerPC::GetStatePtr() != PowerPC::STATE_RUNNING || soundStream->IsMuted()) if (*PowerPC::GetStatePtr() != PowerPC::CPU_RUNNING || soundStream->IsMuted())
break; break;
// Shortcut key for Throttle Skipping // Shortcut key for Throttle Skipping
if (Core::GetIsFramelimiterTempDisabled()) if (Core::GetIsFramelimiterTempDisabled())

View File

@ -49,8 +49,7 @@ struct ConfigCache
{ {
bool valid, bCPUThread, bSkipIdle, bEnableFPRF, bMMU, bDCBZOFF, m_EnableJIT, bDSPThread, bool valid, bCPUThread, bSkipIdle, bEnableFPRF, bMMU, bDCBZOFF, m_EnableJIT, bDSPThread,
bVBeamSpeedHack, bSyncGPU, bFastDiscSpeed, bMergeBlocks, bDSPHLE, bHLE_BS2, bTLBHack, bProgressive; bVBeamSpeedHack, bSyncGPU, bFastDiscSpeed, bMergeBlocks, bDSPHLE, bHLE_BS2, bTLBHack, bProgressive;
CPUBackend iCPUCore; int iCPUCore, Volume;
int Volume;
int iWiimoteSource[MAX_BBMOTES]; int iWiimoteSource[MAX_BBMOTES];
SIDevices Pads[MAX_SI_CHANNELS]; SIDevices Pads[MAX_SI_CHANNELS];
unsigned int framelimit, frameSkip; unsigned int framelimit, frameSkip;
@ -155,7 +154,7 @@ bool BootCore(const std::string& _rFilename)
core_section->Get("DSPHLE", &StartUp.bDSPHLE, StartUp.bDSPHLE); core_section->Get("DSPHLE", &StartUp.bDSPHLE, StartUp.bDSPHLE);
core_section->Get("DSPThread", &StartUp.bDSPThread, StartUp.bDSPThread); core_section->Get("DSPThread", &StartUp.bDSPThread, StartUp.bDSPThread);
core_section->Get("GFXBackend", &StartUp.m_strVideoBackend, StartUp.m_strVideoBackend); core_section->Get("GFXBackend", &StartUp.m_strVideoBackend, StartUp.m_strVideoBackend);
core_section->Get("CPUCore", (int*)&StartUp.iCPUCore, StartUp.iCPUCore); core_section->Get("CPUCore", &StartUp.iCPUCore, StartUp.iCPUCore);
core_section->Get("HLE_BS2", &StartUp.bHLE_BS2, StartUp.bHLE_BS2); core_section->Get("HLE_BS2", &StartUp.bHLE_BS2, StartUp.bHLE_BS2);
core_section->Get("ProgressiveScan", &StartUp.bProgressive, StartUp.bProgressive); core_section->Get("ProgressiveScan", &StartUp.bProgressive, StartUp.bProgressive);
if (core_section->Get("FrameLimit", &SConfig::GetInstance().m_Framelimit, SConfig::GetInstance().m_Framelimit)) if (core_section->Get("FrameLimit", &SConfig::GetInstance().m_Framelimit, SConfig::GetInstance().m_Framelimit))

View File

@ -479,11 +479,11 @@ void SConfig::LoadCoreSettings(IniFile& ini)
core->Get("HLE_BS2", &m_LocalCoreStartupParameter.bHLE_BS2, false); core->Get("HLE_BS2", &m_LocalCoreStartupParameter.bHLE_BS2, false);
#ifdef _M_X86 #ifdef _M_X86
core->Get("CPUCore", (int*)&m_LocalCoreStartupParameter.iCPUCore, CPU_JIT_X64); core->Get("CPUCore", &m_LocalCoreStartupParameter.iCPUCore, 1);
#elif _M_ARM_32 #elif _M_ARM_32
core->Get("CPUCore", (int*)&m_LocalCoreStartupParameter.iCPUCore, CPU_JIT_ARM); core->Get("CPUCore", &m_LocalCoreStartupParameter.iCPUCore, 3);
#else #else
core->Get("CPUCore", (int*)&m_LocalCoreStartupParameter.iCPUCore, CPU_INTERPRETER); core->Get("CPUCore", &m_LocalCoreStartupParameter.iCPUCore, 0);
#endif #endif
core->Get("Fastmem", &m_LocalCoreStartupParameter.bFastmem, true); core->Get("Fastmem", &m_LocalCoreStartupParameter.bFastmem, true);
core->Get("DSPThread", &m_LocalCoreStartupParameter.bDSPThread, false); core->Get("DSPThread", &m_LocalCoreStartupParameter.bDSPThread, false);

View File

@ -226,7 +226,7 @@ bool Init()
// Called from GUI thread // Called from GUI thread
void Stop() // - Hammertime! void Stop() // - Hammertime!
{ {
if (PowerPC::GetState() == PowerPC::STATE_POWERDOWN) if (PowerPC::GetState() == PowerPC::CPU_POWERDOWN)
{ {
if (g_EmuThread.joinable()) if (g_EmuThread.joinable())
g_EmuThread.join(); g_EmuThread.join();
@ -299,8 +299,7 @@ void CpuThread()
} }
#if _M_X86_64 || _M_ARM_32 #if _M_X86_64 || _M_ARM_32
// No need to install the segfault handler when using the interpreter backend. if (_CoreParameter.bFastmem)
if (_CoreParameter.bFastmem && _CoreParameter.iCPUCore != CPU_INTERPRETER)
EMM::InstallExceptionHandler(); // Let's run under memory watch EMM::InstallExceptionHandler(); // Let's run under memory watch
#endif #endif
@ -425,16 +424,11 @@ void EmuThread()
CBoot::BootUp(); CBoot::BootUp();
// Setup our core, but can't use dynarec if we are compare server // Setup our core, but can't use dynarec if we are compare server
if (_CoreParameter.iCPUCore != CPU_INTERPRETER && if (_CoreParameter.iCPUCore && (!_CoreParameter.bRunCompareServer ||
(!_CoreParameter.bRunCompareServer || _CoreParameter.bRunCompareClient))
_CoreParameter.bRunCompareClient))
{
PowerPC::SetMode(PowerPC::MODE_JIT); PowerPC::SetMode(PowerPC::MODE_JIT);
}
else else
{
PowerPC::SetMode(PowerPC::MODE_INTERPRETER); PowerPC::SetMode(PowerPC::MODE_INTERPRETER);
}
// Update the window again because all stuff is initialized // Update the window again because all stuff is initialized
Host_UpdateDisasmDialog(); Host_UpdateDisasmDialog();
@ -477,7 +471,7 @@ void EmuThread()
// Spawn the CPU+GPU thread // Spawn the CPU+GPU thread
g_cpu_thread = std::thread(cpuThreadFunc); g_cpu_thread = std::thread(cpuThreadFunc);
while (PowerPC::GetState() != PowerPC::STATE_POWERDOWN) while (PowerPC::GetState() != PowerPC::CPU_POWERDOWN)
{ {
g_video_backend->PeekMessages(); g_video_backend->PeekMessages();
Common::SleepCurrentThread(20); Common::SleepCurrentThread(20);

View File

@ -65,7 +65,7 @@ void SCoreStartupParameter::LoadDefaults()
iGDBPort = -1; iGDBPort = -1;
#endif #endif
iCPUCore = CPU_JIT_X64; iCPUCore = 1;
bCPUThread = false; bCPUThread = false;
bSkipIdle = false; bSkipIdle = false;
bRunCompareServer = false; bRunCompareServer = false;

View File

@ -83,15 +83,6 @@ enum Hotkey
NUM_HOTKEYS, NUM_HOTKEYS,
}; };
enum CPUBackend : u8
{
CPU_INTERPRETER = 0,
CPU_JIT_X64 = 1,
CPU_JIT_IL_X64 = 2,
CPU_JIT_ARM = 3,
CPU_JIT_IL_ARM = 4,
};
struct SCoreStartupParameter struct SCoreStartupParameter
{ {
void* hInstance; // HINSTANCE but we don't want to include <windows.h> void* hInstance; // HINSTANCE but we don't want to include <windows.h>
@ -104,7 +95,11 @@ struct SCoreStartupParameter
bool bAutomaticStart; bool bAutomaticStart;
bool bBootToPause; bool bBootToPause;
CPUBackend iCPUCore; // 0 = Interpreter
// 1 = Jit
// 2 = JitIL
// 3 = JIT ARM
int iCPUCore;
// JIT (shared between JIT and JITIL) // JIT (shared between JIT and JITIL)
bool bJITNoBlockCache, bJITBlockLinking; bool bJITNoBlockCache, bJITBlockLinking;

View File

@ -18,8 +18,7 @@
void PPCDebugInterface::Disassemble(unsigned int address, char *dest, int max_size) void PPCDebugInterface::Disassemble(unsigned int address, char *dest, int max_size)
{ {
// Memory::ReadUnchecked_U32 seemed to crash on shutdown // Memory::ReadUnchecked_U32 seemed to crash on shutdown
if (PowerPC::GetState() == PowerPC::STATE_POWERDOWN) if (PowerPC::GetState() == PowerPC::CPU_POWERDOWN) return;
return;
if (Core::GetState() != Core::CORE_UNINITIALIZED) if (Core::GetState() != Core::CORE_UNINITIALIZED)
{ {

View File

@ -64,9 +64,9 @@ bool FifoPlayer::Play()
LoadMemory(); LoadMemory();
// This loop replaces the CPU loop that occurs when a game is run // This loop replaces the CPU loop that occurs when a game is run
while (PowerPC::GetState() != PowerPC::STATE_POWERDOWN) while (PowerPC::GetState() != PowerPC::CPU_POWERDOWN)
{ {
if (PowerPC::GetState() == PowerPC::STATE_RUNNING) if (PowerPC::GetState() == PowerPC::CPU_RUNNING)
{ {
if (m_CurrentFrame >= m_FrameRangeEnd) if (m_CurrentFrame >= m_FrameRangeEnd)
{ {

View File

@ -47,21 +47,21 @@ void CCPU::Run()
reswitch: reswitch:
switch (PowerPC::GetState()) switch (PowerPC::GetState())
{ {
case PowerPC::STATE_RUNNING: case PowerPC::CPU_RUNNING:
//1: enter a fast runloop //1: enter a fast runloop
PowerPC::RunLoop(); PowerPC::RunLoop();
break; break;
case PowerPC::STATE_STEPPING: case PowerPC::CPU_STEPPING:
m_csCpuOccupied.unlock(); m_csCpuOccupied.unlock();
//1: wait for step command.. //1: wait for step command..
m_StepEvent.Wait(); m_StepEvent.Wait();
m_csCpuOccupied.lock(); m_csCpuOccupied.lock();
if (PowerPC::GetState() == PowerPC::STATE_POWERDOWN) if (PowerPC::GetState() == PowerPC::CPU_POWERDOWN)
return; return;
if (PowerPC::GetState() != PowerPC::STATE_STEPPING) if (PowerPC::GetState() != PowerPC::CPU_STEPPING)
goto reswitch; goto reswitch;
//3: do a step //3: do a step
@ -76,7 +76,7 @@ reswitch:
Host_UpdateDisasmDialog(); Host_UpdateDisasmDialog();
break; break;
case PowerPC::STATE_POWERDOWN: case PowerPC::CPU_POWERDOWN:
//1: Exit loop!! //1: Exit loop!!
return; return;
} }
@ -91,7 +91,7 @@ void CCPU::Stop()
bool CCPU::IsStepping() bool CCPU::IsStepping()
{ {
return PowerPC::GetState() == PowerPC::STATE_STEPPING; return PowerPC::GetState() == PowerPC::CPU_STEPPING;
} }
void CCPU::Reset() void CCPU::Reset()
@ -102,7 +102,7 @@ void CCPU::Reset()
void CCPU::StepOpcode(Common::Event *event) void CCPU::StepOpcode(Common::Event *event)
{ {
m_StepEvent.Set(); m_StepEvent.Set();
if (PowerPC::GetState() == PowerPC::STATE_STEPPING) if (PowerPC::GetState() == PowerPC::CPU_STEPPING)
{ {
m_SyncEvent = event; m_SyncEvent = event;
} }

View File

@ -61,7 +61,7 @@ u64 g_recordingStartTime; // seconds since 1970 that recording started
bool bSaveConfig = false, bSkipIdle = false, bDualCore = false, bProgressive = false, bDSPHLE = false, bFastDiscSpeed = false; bool bSaveConfig = false, bSkipIdle = false, bDualCore = false, bProgressive = false, bDSPHLE = false, bFastDiscSpeed = false;
bool g_bClearSave = false, bSyncGPU = false, bNetPlay = false; bool g_bClearSave = false, bSyncGPU = false, bNetPlay = false;
std::string videoBackend = "unknown"; std::string videoBackend = "unknown";
CPUBackend iCPUCore = CPU_JIT_X64; int iCPUCore = 1;
bool g_bDiscChange = false; bool g_bDiscChange = false;
std::string g_discChange = ""; std::string g_discChange = "";
std::string author = ""; std::string author = "";
@ -143,9 +143,9 @@ void FrameUpdate()
} }
// ("framestop") the only purpose of this is to cause interpreter/jit Run() to return temporarily. // ("framestop") the only purpose of this is to cause interpreter/jit Run() to return temporarily.
// after that we set it back to STATE_RUNNING and continue as normal. // after that we set it back to CPU_RUNNING and continue as normal.
if (g_bFrameStop) if (g_bFrameStop)
*PowerPC::GetStatePtr() = PowerPC::STATE_STEPPING; *PowerPC::GetStatePtr() = PowerPC::CPU_STEPPING;
if (g_framesToSkip) if (g_framesToSkip)
FrameSkipping(); FrameSkipping();
@ -356,7 +356,7 @@ bool IsFastDiscSpeed()
return bFastDiscSpeed; return bFastDiscSpeed;
} }
CPUBackend GetCPUMode() int GetCPUMode()
{ {
return iCPUCore; return iCPUCore;
} }

View File

@ -8,7 +8,7 @@
#include "Common/ChunkFile.h" #include "Common/ChunkFile.h"
#include "Common/Common.h" #include "Common/Common.h"
#include "Core/CoreParameter.h"
#include "InputCommon/GCPadStatus.h" #include "InputCommon/GCPadStatus.h"
namespace WiimoteEmu namespace WiimoteEmu
@ -99,7 +99,7 @@ struct DTMHeader
bool bProgressive; bool bProgressive;
bool bDSPHLE; bool bDSPHLE;
bool bFastDiscSpeed; bool bFastDiscSpeed;
CPUBackend CPUCore; u8 CPUCore; // 0 = interpreter, 1 = JIT, 2 = JITIL
bool bEFBAccessEnable; bool bEFBAccessEnable;
bool bEFBCopyEnable; bool bEFBCopyEnable;
bool bCopyEFBToTexture; bool bCopyEFBToTexture;
@ -144,7 +144,7 @@ bool IsProgressive();
bool IsSkipIdle(); bool IsSkipIdle();
bool IsDSPHLE(); bool IsDSPHLE();
bool IsFastDiscSpeed(); bool IsFastDiscSpeed();
CPUBackend GetCPUMode(); int GetCPUMode();
bool IsStartingFromClearSave(); bool IsStartingFromClearSave();
bool IsUsingMemcard(int memcard); bool IsUsingMemcard(int memcard);
bool IsSyncGPU(); bool IsSyncGPU();

View File

@ -266,7 +266,7 @@ unsigned int NetPlayClient::OnData(sf::Packet& packet)
std::lock_guard<std::recursive_mutex> lkg(m_crit.game); std::lock_guard<std::recursive_mutex> lkg(m_crit.game);
packet >> m_current_game; packet >> m_current_game;
packet >> g_NetPlaySettings.m_CPUthread; packet >> g_NetPlaySettings.m_CPUthread;
packet >> (u8&)g_NetPlaySettings.m_CPUcore; packet >> g_NetPlaySettings.m_CPUcore;
packet >> g_NetPlaySettings.m_DSPEnableJIT; packet >> g_NetPlaySettings.m_DSPEnableJIT;
packet >> g_NetPlaySettings.m_DSPHLE; packet >> g_NetPlaySettings.m_DSPHLE;
packet >> g_NetPlaySettings.m_WriteToMemcard; packet >> g_NetPlaySettings.m_WriteToMemcard;

View File

@ -6,13 +6,13 @@
#include "Common/Common.h" #include "Common/Common.h"
#include "Common/CommonTypes.h" #include "Common/CommonTypes.h"
#include "Core/CoreParameter.h"
#include "Core/HW/EXI_Device.h" #include "Core/HW/EXI_Device.h"
struct NetSettings struct NetSettings
{ {
bool m_CPUthread; bool m_CPUthread;
CPUBackend m_CPUcore; int m_CPUcore;
bool m_DSPHLE; bool m_DSPHLE;
bool m_DSPEnableJIT; bool m_DSPEnableJIT;
bool m_WriteToMemcard; bool m_WriteToMemcard;
@ -28,7 +28,7 @@ struct Rpt : public std::vector<u8>
typedef std::vector<u8> NetWiimote; typedef std::vector<u8> NetWiimote;
#define NETPLAY_VERSION "Dolphin NetPlay 2014-06-13" #define NETPLAY_VERSION "Dolphin NetPlay 2014-01-08"
const int NETPLAY_INITIAL_GCTIME = 1272737767; const int NETPLAY_INITIAL_GCTIME = 1272737767;

View File

@ -548,7 +548,7 @@ bool NetPlayServer::StartGame(const std::string &path)
spac << (MessageId)NP_MSG_START_GAME; spac << (MessageId)NP_MSG_START_GAME;
spac << m_current_game; spac << m_current_game;
spac << m_settings.m_CPUthread; spac << m_settings.m_CPUthread;
spac << (u8)m_settings.m_CPUcore; spac << m_settings.m_CPUcore;
spac << m_settings.m_DSPEnableJIT; spac << m_settings.m_DSPEnableJIT;
spac << m_settings.m_DSPHLE; spac << m_settings.m_DSPHLE;
spac << m_settings.m_WriteToMemcard; spac << m_settings.m_WriteToMemcard;

View File

@ -409,7 +409,7 @@ const u8* Jit64::DoJit(u32 em_address, PPCAnalyst::CodeBuffer *code_buf, JitBloc
// Comment out the following to disable breakpoints (speed-up) // Comment out the following to disable breakpoints (speed-up)
if (!Profiler::g_ProfileBlocks) if (!Profiler::g_ProfileBlocks)
{ {
if (GetState() == STATE_STEPPING) if (GetState() == CPU_STEPPING)
blockSize = 1; blockSize = 1;
Trace(); Trace();
} }
@ -583,7 +583,7 @@ const u8* Jit64::DoJit(u32 em_address, PPCAnalyst::CodeBuffer *code_buf, JitBloc
SetJumpTarget(clearInt); SetJumpTarget(clearInt);
} }
if (Core::g_CoreStartupParameter.bEnableDebugging && breakpoints.IsAddressBreakPoint(ops[i].address) && GetState() != STATE_STEPPING) if (Core::g_CoreStartupParameter.bEnableDebugging && breakpoints.IsAddressBreakPoint(ops[i].address) && GetState() != CPU_STEPPING)
{ {
gpr.Flush(); gpr.Flush();
fpr.Flush(); fpr.Flush();

View File

@ -54,7 +54,7 @@ void Jit64AsmRoutineManager::Generate()
if (Core::g_CoreStartupParameter.bEnableDebugging) if (Core::g_CoreStartupParameter.bEnableDebugging)
{ {
TEST(32, M((void*)PowerPC::GetStatePtr()), Imm32(PowerPC::STATE_STEPPING)); TEST(32, M((void*)PowerPC::GetStatePtr()), Imm32(PowerPC::CPU_STEPPING));
FixupBranch notStepping = J_CC(CC_Z); FixupBranch notStepping = J_CC(CC_Z);
ABI_CallFunction(reinterpret_cast<void *>(&PowerPC::CheckBreakPoints)); ABI_CallFunction(reinterpret_cast<void *>(&PowerPC::CheckBreakPoints));
TEST(32, M((void*)PowerPC::GetStatePtr()), Imm32(0xFFFFFFFF)); TEST(32, M((void*)PowerPC::GetStatePtr()), Imm32(0xFFFFFFFF));

View File

@ -508,7 +508,7 @@ const u8* JitIL::DoJit(u32 em_address, PPCAnalyst::CodeBuffer *code_buf, JitBloc
// Comment out the following to disable breakpoints (speed-up) // Comment out the following to disable breakpoints (speed-up)
if (!Profiler::g_ProfileBlocks) if (!Profiler::g_ProfileBlocks)
{ {
if (GetState() == STATE_STEPPING) if (GetState() == CPU_STEPPING)
blockSize = 1; blockSize = 1;
Trace(); Trace();
} }
@ -642,7 +642,7 @@ const u8* JitIL::DoJit(u32 em_address, PPCAnalyst::CodeBuffer *code_buf, JitBloc
ibuild.EmitExtExceptionCheck(ibuild.EmitIntConst(ops[i].address)); ibuild.EmitExtExceptionCheck(ibuild.EmitIntConst(ops[i].address));
} }
if (Core::g_CoreStartupParameter.bEnableDebugging && breakpoints.IsAddressBreakPoint(ops[i].address) && GetState() != STATE_STEPPING) if (Core::g_CoreStartupParameter.bEnableDebugging && breakpoints.IsAddressBreakPoint(ops[i].address) && GetState() != CPU_STEPPING)
{ {
ibuild.EmitBreakPointCheck(ibuild.EmitIntConst(ops[i].address)); ibuild.EmitBreakPointCheck(ibuild.EmitIntConst(ops[i].address));
} }

View File

@ -30,7 +30,7 @@ namespace PowerPC
// STATE_TO_SAVE // STATE_TO_SAVE
PowerPCState GC_ALIGNED16(ppcState); PowerPCState GC_ALIGNED16(ppcState);
volatile CPUState state = STATE_STEPPING; volatile CPUState state = CPU_STEPPING;
Interpreter * const interpreter = Interpreter::getInstance(); Interpreter * const interpreter = Interpreter::getInstance();
CoreMode mode; CoreMode mode;
@ -135,7 +135,7 @@ void Init(int cpu_core)
switch (cpu_core) switch (cpu_core)
{ {
case CPU_INTERPRETER: case 0:
{ {
cpu_core_base = interpreter; cpu_core_base = interpreter;
break; break;
@ -158,7 +158,7 @@ void Init(int cpu_core)
{ {
mode = MODE_INTERPRETER; mode = MODE_INTERPRETER;
} }
state = STATE_STEPPING; state = CPU_STEPPING;
ppcState.iCache.Init(); ppcState.iCache.Init();
} }
@ -168,7 +168,7 @@ void Shutdown()
JitInterface::Shutdown(); JitInterface::Shutdown();
interpreter->Shutdown(); interpreter->Shutdown();
cpu_core_base = nullptr; cpu_core_base = nullptr;
state = STATE_POWERDOWN; state = CPU_POWERDOWN;
} }
CoreMode GetMode() CoreMode GetMode()
@ -205,7 +205,7 @@ void SingleStep()
void RunLoop() void RunLoop()
{ {
state = STATE_RUNNING; state = CPU_RUNNING;
cpu_core_base->Run(); cpu_core_base->Run();
Host_UpdateDisasmDialog(); Host_UpdateDisasmDialog();
} }
@ -222,19 +222,19 @@ volatile CPUState *GetStatePtr()
void Start() void Start()
{ {
state = STATE_RUNNING; state = CPU_RUNNING;
Host_UpdateDisasmDialog(); Host_UpdateDisasmDialog();
} }
void Pause() void Pause()
{ {
state = STATE_STEPPING; state = CPU_STEPPING;
Host_UpdateDisasmDialog(); Host_UpdateDisasmDialog();
} }
void Stop() void Stop()
{ {
state = STATE_POWERDOWN; state = CPU_POWERDOWN;
Host_UpdateDisasmDialog(); Host_UpdateDisasmDialog();
} }

View File

@ -75,9 +75,9 @@ struct GC_ALIGNED64(PowerPCState)
enum CPUState enum CPUState
{ {
STATE_RUNNING = 0, CPU_RUNNING = 0,
STATE_STEPPING = 2, CPU_STEPPING = 2,
STATE_POWERDOWN = 3, CPU_POWERDOWN = 3,
}; };
extern PowerPCState ppcState; extern PowerPCState ppcState;

View File

@ -32,7 +32,6 @@
#include "Core/ConfigManager.h" #include "Core/ConfigManager.h"
#include "Core/Core.h" #include "Core/Core.h"
#include "Core/CoreParameter.h"
#include "Core/Movie.h" #include "Core/Movie.h"
#include "Core/NetPlayProto.h" #include "Core/NetPlayProto.h"
#include "Core/HW/EXI.h" #include "Core/HW/EXI.h"
@ -58,17 +57,17 @@
struct CPUCore struct CPUCore
{ {
CPUBackend CPUid; int CPUid;
const char *name; const char *name;
}; };
const CPUCore CPUCores[] = { const CPUCore CPUCores[] = {
{CPU_INTERPRETER, wxTRANSLATE("Interpreter (VERY slow)")}, {0, wxTRANSLATE("Interpreter (VERY slow)")},
#ifdef _M_ARM #ifdef _M_ARM
{CPU_JIT_ARM, wxTRANSLATE("Arm JIT (experimental)")}, {3, wxTRANSLATE("Arm JIT (experimental)")},
{CPU_JIT_IL_ARM, wxTRANSLATE("Arm JITIL (experimental)")}, {4, wxTRANSLATE("Arm JITIL (experimental)")},
#else #else
{CPU_JIT_X64, wxTRANSLATE("JIT Recompiler (recommended)")}, {1, wxTRANSLATE("JIT Recompiler (recommended)")},
{CPU_JIT_IL_X64, wxTRANSLATE("JITIL Recompiler (slower, experimental)")}, {2, wxTRANSLATE("JITIL Recompiler (slower, experimental)")},
#endif #endif
}; };
@ -908,7 +907,7 @@ void CConfigMain::CoreSettingsChanged(wxCommandEvent& event)
SConfig::GetInstance().m_LocalCoreStartupParameter.iCPUCore = CPUCores[CPUEngine->GetSelection()].CPUid; SConfig::GetInstance().m_LocalCoreStartupParameter.iCPUCore = CPUCores[CPUEngine->GetSelection()].CPUid;
if (main_frame->g_pCodeWindow) if (main_frame->g_pCodeWindow)
main_frame->g_pCodeWindow->GetMenuBar()->Check(IDM_INTERPRETER, main_frame->g_pCodeWindow->GetMenuBar()->Check(IDM_INTERPRETER,
SConfig::GetInstance().m_LocalCoreStartupParameter.iCPUCore == CPU_INTERPRETER); SConfig::GetInstance().m_LocalCoreStartupParameter.iCPUCore?false:true);
break; break;
case ID_NTSCJ: case ID_NTSCJ:
SConfig::GetInstance().m_LocalCoreStartupParameter.bForceNTSCJ = _NTSCJ->IsChecked(); SConfig::GetInstance().m_LocalCoreStartupParameter.bForceNTSCJ = _NTSCJ->IsChecked();

View File

@ -369,7 +369,7 @@ void CCodeWindow::CreateMenu(const SCoreStartupParameter& _LocalCoreStartupParam
" and stepping to work as explained in the Developer Documentation. But it can be very" " and stepping to work as explained in the Developer Documentation. But it can be very"
" slow, perhaps slower than 1 fps."), " slow, perhaps slower than 1 fps."),
wxITEM_CHECK); wxITEM_CHECK);
interpreter->Check(_LocalCoreStartupParameter.iCPUCore == CPU_INTERPRETER); interpreter->Check(_LocalCoreStartupParameter.iCPUCore == 0);
pCoreMenu->AppendSeparator(); pCoreMenu->AppendSeparator();
pCoreMenu->Append(IDM_JITBLOCKLINKING, _("&JIT Block Linking off"), pCoreMenu->Append(IDM_JITBLOCKLINKING, _("&JIT Block Linking off"),

View File

@ -370,7 +370,7 @@ JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_Run(JNIEnv *
// No use running the loop when booting fails // No use running the loop when booting fails
if ( BootManager::BootCore( g_filename.c_str() ) ) if ( BootManager::BootCore( g_filename.c_str() ) )
while (PowerPC::GetState() != PowerPC::STATE_POWERDOWN) while (PowerPC::GetState() != PowerPC::CPU_POWERDOWN)
updateMainFrameEvent.Wait(); updateMainFrameEvent.Wait();
WiimoteReal::Shutdown(); WiimoteReal::Shutdown();

View File

@ -380,7 +380,7 @@ int main(int argc, char* argv[])
[event release]; [event release];
[pool release]; [pool release];
#else #else
while (PowerPC::GetState() != PowerPC::STATE_POWERDOWN) while (PowerPC::GetState() != PowerPC::CPU_POWERDOWN)
updateMainFrameEvent.Wait(); updateMainFrameEvent.Wait();
#endif #endif
} }