diff --git a/rpcs3/Emu/ARMv7/ARMv7Thread.cpp b/rpcs3/Emu/ARMv7/ARMv7Thread.cpp index e35e9c8f8d..876824b9c4 100644 --- a/rpcs3/Emu/ARMv7/ARMv7Thread.cpp +++ b/rpcs3/Emu/ARMv7/ARMv7Thread.cpp @@ -174,16 +174,17 @@ void ARMv7Thread::DoReset() void ARMv7Thread::DoRun() { + m_dec = nullptr; + switch(Ini.CPUDecoderMode.GetValue()) { case 0: - //m_dec = new ARMv7Decoder(*new ARMv7DisAsm()); - break; - case 1: - case 2: m_dec = new ARMv7Decoder(context); - break; + break; + default: + LOG_ERROR(PPU, "Invalid CPU decoder mode: %d", Ini.CPUDecoderMode.GetValue()); + Emu.Pause(); } } diff --git a/rpcs3/Emu/Cell/PPUThread.cpp b/rpcs3/Emu/Cell/PPUThread.cpp index 412937419e..5572e65abf 100644 --- a/rpcs3/Emu/Cell/PPUThread.cpp +++ b/rpcs3/Emu/Cell/PPUThread.cpp @@ -94,18 +94,21 @@ void PPUThread::CloseStack() void PPUThread::DoRun() { + m_dec = nullptr; + switch(Ini.CPUDecoderMode.GetValue()) { - case 0: - //m_dec = new PPUDecoder(*new PPUDisAsm()); - break; - - case 1: + case 0: // original interpreter { auto ppui = new PPUInterpreter(*this); m_dec = new PPUDecoder(ppui); + break; + } + + case 1: // alternative interpreter + { + break; } - break; case 2: #ifdef PPU_LLVM_RECOMPILER @@ -217,10 +220,14 @@ void PPUThread::Task() { custom_task(*this); } - else + else if (m_dec) { CPUThread::Task(); } + else + { + + } } ppu_thread::ppu_thread(u32 entry, const std::string& name, u32 stack_size, u32 prio) diff --git a/rpcs3/Gui/MainFrame.cpp b/rpcs3/Gui/MainFrame.cpp index 48c7cdc97f..d42f3a7886 100644 --- a/rpcs3/Gui/MainFrame.cpp +++ b/rpcs3/Gui/MainFrame.cpp @@ -437,6 +437,7 @@ void MainFrame::Config(wxCommandEvent& WXUNUSED(event)) wxCheckBox* chbox_dbg_ap_functioncall = new wxCheckBox(p_hle, wxID_ANY, "Auto Pause at Function Call"); cbox_cpu_decoder->Append("PPU Interpreter"); + cbox_cpu_decoder->Append("PPU Interpreter 2"); cbox_cpu_decoder->Append("PPU JIT (LLVM)"); cbox_spu_decoder->Append("SPU Interpreter"); @@ -531,7 +532,7 @@ void MainFrame::Config(wxCommandEvent& WXUNUSED(event)) chbox_dbg_ap_systemcall ->SetValue(Ini.DBGAutoPauseSystemCall.GetValue()); chbox_dbg_ap_functioncall->SetValue(Ini.DBGAutoPauseFunctionCall.GetValue()); - cbox_cpu_decoder ->SetSelection(Ini.CPUDecoderMode.GetValue() ? Ini.CPUDecoderMode.GetValue() - 1 : 0); + cbox_cpu_decoder ->SetSelection(Ini.CPUDecoderMode.GetValue() ? Ini.CPUDecoderMode.GetValue() : 0); cbox_spu_decoder ->SetSelection(Ini.SPUDecoderMode.GetValue() ? Ini.SPUDecoderMode.GetValue() - 1 : 0); cbox_gs_render ->SetSelection(Ini.GSRenderMode.GetValue()); cbox_gs_resolution ->SetSelection(ResolutionIdToNum(Ini.GSResolution.GetValue()) - 1); @@ -632,7 +633,7 @@ void MainFrame::Config(wxCommandEvent& WXUNUSED(event)) if(diag.ShowModal() == wxID_OK) { - Ini.CPUDecoderMode.SetValue(cbox_cpu_decoder->GetSelection() + 1); + Ini.CPUDecoderMode.SetValue(cbox_cpu_decoder->GetSelection()); Ini.SPUDecoderMode.SetValue(cbox_spu_decoder->GetSelection() + 1); Ini.GSRenderMode.SetValue(cbox_gs_render->GetSelection()); Ini.GSResolution.SetValue(ResolutionNumToId(cbox_gs_resolution->GetSelection() + 1)); diff --git a/rpcs3/Ini.h b/rpcs3/Ini.h index 6f2b9a7a11..d36f80c028 100644 --- a/rpcs3/Ini.h +++ b/rpcs3/Ini.h @@ -247,7 +247,7 @@ public: void Load() { // Core - CPUDecoderMode.Load(1); + CPUDecoderMode.Load(0); SPUDecoderMode.Load(1); // Graphics