mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-02-19 12:40:29 +00:00
Add SPU decoder mode selection to GUI/Config
This commit is contained in:
parent
0d7e45639a
commit
090f7f8cfb
@ -150,9 +150,15 @@ void PPUThread::DoRun()
|
||||
|
||||
case 1:
|
||||
case 2:
|
||||
{
|
||||
auto ppui = new PPUInterpreter(*this);
|
||||
m_dec = new PPUDecoder(ppui);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
ConLog.Error("Invalid CPU decoder mode: %d", Ini.CPUDecoderMode.GetValue());
|
||||
Emu.Pause();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -69,22 +69,19 @@ u64 SPUThread::GetFreeStackSize() const
|
||||
|
||||
void SPUThread::DoRun()
|
||||
{
|
||||
switch(Ini.CPUDecoderMode.GetValue())
|
||||
switch(Ini.SPUDecoderMode.GetValue())
|
||||
{
|
||||
case 0:
|
||||
//m_dec = new SPUDecoder(*new SPUDisAsm());
|
||||
break;
|
||||
|
||||
case 1:
|
||||
m_dec = new SPURecompilerCore(*this);
|
||||
break;
|
||||
case 2:
|
||||
m_dec = new SPUDecoder(*new SPUInterpreter(*this));
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
m_dec = new SPURecompilerCore(*this);
|
||||
break;
|
||||
|
||||
//Pause();
|
||||
//Emu.Pause();
|
||||
default:
|
||||
ConLog.Error("Invalid SPU decoder mode: %d", Ini.SPUDecoderMode.GetValue());
|
||||
Emu.Pause();
|
||||
}
|
||||
}
|
||||
|
||||
void SPUThread::DoResume()
|
||||
|
@ -333,8 +333,9 @@ void MainFrame::Config(wxCommandEvent& WXUNUSED(event))
|
||||
wxBoxSizer* s_subpanel_io(new wxBoxSizer(wxVERTICAL));
|
||||
wxBoxSizer* s_subpanel_hle(new wxBoxSizer(wxVERTICAL));
|
||||
|
||||
// CPU settings
|
||||
wxStaticBoxSizer* s_round_cpu_decoder( new wxStaticBoxSizer( wxVERTICAL, p_cpu, _("Decoder") ) );
|
||||
// CPU/SPU settings
|
||||
wxStaticBoxSizer* s_round_cpu_decoder( new wxStaticBoxSizer( wxVERTICAL, p_cpu, _("CPU") ) );
|
||||
wxStaticBoxSizer* s_round_spu_decoder( new wxStaticBoxSizer( wxVERTICAL, p_cpu, _("SPU") ) );
|
||||
|
||||
// Graphics
|
||||
wxStaticBoxSizer* s_round_gs_render( new wxStaticBoxSizer( wxVERTICAL, p_graphics, _("Render") ) );
|
||||
@ -356,6 +357,7 @@ void MainFrame::Config(wxCommandEvent& WXUNUSED(event))
|
||||
wxStaticBoxSizer* s_round_sys_lang( new wxStaticBoxSizer( wxVERTICAL, p_system, _("Language") ) );
|
||||
|
||||
wxComboBox* cbox_cpu_decoder = new wxComboBox(p_cpu, wxID_ANY);
|
||||
wxComboBox* cbox_spu_decoder = new wxComboBox(p_cpu, wxID_ANY);
|
||||
wxComboBox* cbox_gs_render = new wxComboBox(p_graphics, wxID_ANY);
|
||||
wxComboBox* cbox_gs_resolution = new wxComboBox(p_graphics, wxID_ANY);
|
||||
wxComboBox* cbox_gs_aspect = new wxComboBox(p_graphics, wxID_ANY);
|
||||
@ -381,6 +383,9 @@ void MainFrame::Config(wxCommandEvent& WXUNUSED(event))
|
||||
cbox_cpu_decoder->Append("Interpreter & DisAsm");
|
||||
cbox_cpu_decoder->Append("Interpreter");
|
||||
|
||||
cbox_spu_decoder->Append("Interpreter");
|
||||
cbox_spu_decoder->Append("Recompiler");
|
||||
|
||||
for(int i=1; i<WXSIZEOF(ResolutionTable); ++i)
|
||||
{
|
||||
cbox_gs_resolution->Append(wxString::Format("%dx%d", ResolutionTable[i].width.ToLE(), ResolutionTable[i].height.ToLE()));
|
||||
@ -447,6 +452,7 @@ void MainFrame::Config(wxCommandEvent& WXUNUSED(event))
|
||||
chbox_hle_exitonstop->SetValue(Ini.HLEExitOnStop.GetValue());
|
||||
|
||||
cbox_cpu_decoder->SetSelection(Ini.CPUDecoderMode.GetValue() ? Ini.CPUDecoderMode.GetValue() - 1 : 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);
|
||||
cbox_gs_aspect->SetSelection(Ini.GSAspectRatio.GetValue() - 1);
|
||||
@ -465,6 +471,7 @@ void MainFrame::Config(wxCommandEvent& WXUNUSED(event))
|
||||
|
||||
|
||||
s_round_cpu_decoder->Add(cbox_cpu_decoder, wxSizerFlags().Border(wxALL, 5).Expand());
|
||||
s_round_spu_decoder->Add(cbox_spu_decoder, wxSizerFlags().Border(wxALL, 5).Expand());
|
||||
|
||||
s_round_gs_render->Add(cbox_gs_render, wxSizerFlags().Border(wxALL, 5).Expand());
|
||||
s_round_gs_res->Add(cbox_gs_resolution, wxSizerFlags().Border(wxALL, 5).Expand());
|
||||
@ -482,7 +489,8 @@ void MainFrame::Config(wxCommandEvent& WXUNUSED(event))
|
||||
|
||||
// Core
|
||||
s_subpanel_cpu->Add(s_round_cpu_decoder, wxSizerFlags().Border(wxALL, 5).Expand());
|
||||
s_subpanel_cpu->Add(chbox_cpu_ignore_rwerrors, wxSizerFlags().Border(wxALL, 5).Expand());
|
||||
s_round_cpu_decoder->Add(chbox_cpu_ignore_rwerrors, wxSizerFlags().Border(wxALL, 5).Expand());
|
||||
s_subpanel_cpu->Add(s_round_spu_decoder, wxSizerFlags().Border(wxALL, 5).Expand());
|
||||
|
||||
// Graphics
|
||||
s_subpanel_graphics->Add(s_round_gs_render, wxSizerFlags().Border(wxALL, 5).Expand());
|
||||
@ -532,6 +540,7 @@ void MainFrame::Config(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
Ini.CPUDecoderMode.SetValue(cbox_cpu_decoder->GetSelection() + 1);
|
||||
Ini.CPUIgnoreRWErrors.SetValue(chbox_cpu_ignore_rwerrors->GetValue());
|
||||
Ini.SPUDecoderMode.SetValue(cbox_spu_decoder->GetSelection() + 1);
|
||||
Ini.GSRenderMode.SetValue(cbox_gs_render->GetSelection());
|
||||
Ini.GSResolution.SetValue(ResolutionNumToId(cbox_gs_resolution->GetSelection() + 1));
|
||||
Ini.GSAspectRatio.SetValue(cbox_gs_aspect->GetSelection() + 1);
|
||||
|
@ -97,6 +97,7 @@ private:
|
||||
|
||||
public:
|
||||
IniEntry<u8> CPUDecoderMode;
|
||||
IniEntry<u8> SPUDecoderMode;
|
||||
IniEntry<bool> CPUIgnoreRWErrors;
|
||||
IniEntry<u8> GSRenderMode;
|
||||
IniEntry<u8> GSResolution;
|
||||
@ -150,6 +151,7 @@ public:
|
||||
path = DefPath + "/" + "CPU";
|
||||
CPUDecoderMode.Init("DecoderMode", path);
|
||||
CPUIgnoreRWErrors.Init("IgnoreRWErrors", path);
|
||||
SPUDecoderMode.Init("SPUDecoderMode", path);
|
||||
|
||||
path = DefPath + "/" + "GS";
|
||||
GSRenderMode.Init("RenderMode", path);
|
||||
@ -211,6 +213,7 @@ public:
|
||||
{
|
||||
CPUDecoderMode.Load(2);
|
||||
CPUIgnoreRWErrors.Load(false);
|
||||
SPUDecoderMode.Load(1);
|
||||
GSRenderMode.Load(1);
|
||||
GSResolution.Load(4);
|
||||
GSAspectRatio.Load(2);
|
||||
@ -260,6 +263,7 @@ public:
|
||||
{
|
||||
CPUDecoderMode.Save();
|
||||
CPUIgnoreRWErrors.Save();
|
||||
SPUDecoderMode.Save();
|
||||
GSRenderMode.Save();
|
||||
GSResolution.Save();
|
||||
GSAspectRatio.Save();
|
||||
|
Loading…
x
Reference in New Issue
Block a user