diff --git a/.gitmodules b/.gitmodules index 911030051a..8bc866cb94 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,4 @@ [submodule "wxWidgets"] path = wxWidgets url = https://github.com/DHrpcs3/wxWidgets.git + ignore = dirty diff --git a/rpcs3/Emu/Cell/PPUInterpreter.h b/rpcs3/Emu/Cell/PPUInterpreter.h index b0bbb9043f..653e626ef5 100644 --- a/rpcs3/Emu/Cell/PPUInterpreter.h +++ b/rpcs3/Emu/Cell/PPUInterpreter.h @@ -69,7 +69,7 @@ private: { SysCalls::DoSyscall(CPU.GPR[11]); - if(enable_log) + if(Ini.HLELogging.GetValue()) { ConLog.Warning("SysCall[%lld] done with code [0x%llx]! #pc: 0x%llx", CPU.GPR[11], CPU.GPR[3], CPU.PC); if(CPU.GPR[11] > 1024) diff --git a/rpcs3/Emu/Cell/SPUThread.h b/rpcs3/Emu/Cell/SPUThread.h index 8603c33ed9..81450ad14b 100644 --- a/rpcs3/Emu/Cell/SPUThread.h +++ b/rpcs3/Emu/Cell/SPUThread.h @@ -514,7 +514,7 @@ public: case MFC_PUT_CMD: case MFC_GET_CMD: { - if (enable_log) ConLog.Write("DMA %s%s%s: lsa = 0x%x, ea = 0x%llx, tag = 0x%x, size = 0x%x, cmd = 0x%x", + if (Ini.HLELogging.GetValue()) ConLog.Write("DMA %s%s%s: lsa = 0x%x, ea = 0x%llx, tag = 0x%x, size = 0x%x, cmd = 0x%x", wxString(op & MFC_PUT_CMD ? "PUT" : "GET").wx_str(), wxString(op & MFC_BARRIER_MASK ? "B" : "").wx_str(), wxString(op & MFC_FENCE_MASK ? "F" : "").wx_str(), @@ -541,7 +541,7 @@ public: case MFC_PUTLLUC_CMD: case MFC_PUTQLLUC_CMD: { - if (enable_log) ConLog.Write("DMA %s: lsa=0x%x, ea = 0x%llx, (tag) = 0x%x, (size) = 0x%x, cmd = 0x%x", + if (Ini.HLELogging.GetValue()) ConLog.Write("DMA %s: lsa=0x%x, ea = 0x%llx, (tag) = 0x%x, (size) = 0x%x, cmd = 0x%x", wxString(op == MFC_GETLLAR_CMD ? "GETLLAR" : op == MFC_PUTLLC_CMD ? "PUTLLC" : op == MFC_PUTLLUC_CMD ? "PUTLLUC" : "PUTQLLUC").wx_str(), diff --git a/rpcs3/Emu/SysCalls/Modules.cpp b/rpcs3/Emu/SysCalls/Modules.cpp index 08d7b7c55b..bdecfc62b8 100644 --- a/rpcs3/Emu/SysCalls/Modules.cpp +++ b/rpcs3/Emu/SysCalls/Modules.cpp @@ -408,7 +408,7 @@ void Module::SetName(const std::string& name) void Module::Log(const u32 id, wxString fmt, ...) { - if(enable_log) + if(Ini.HLELogging.GetValue()) { va_list list; va_start(list, fmt); @@ -419,7 +419,7 @@ void Module::Log(const u32 id, wxString fmt, ...) void Module::Log(wxString fmt, ...) { - if(enable_log) + if(Ini.HLELogging.GetValue()) { va_list list; va_start(list, fmt); diff --git a/rpcs3/Emu/SysCalls/Modules/cellGame.cpp b/rpcs3/Emu/SysCalls/Modules/cellGame.cpp index 2c35a13bd4..d82f7a41fe 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellGame.cpp +++ b/rpcs3/Emu/SysCalls/Modules/cellGame.cpp @@ -118,12 +118,12 @@ int cellGameBootCheck(mem32_t type, mem32_t attributes, mem_ptr_thddFreeSizeKB = 40000000; //40 GB, TODO: Use the free space of the computer's HDD where RPCS3 is being run. - size->sizeKB = CELL_GAME_SIZEKB_NOTCALC; + size->sizeKB = 0; size->sysSizeKB = 0; Memory.WriteString(dirName.GetAddr(), dir); @@ -150,6 +150,8 @@ int cellGameContentPermit(mem_list_ptr_t contentInfoPath, mem_list_ptr_tSetMinSize(wxSize(495, 100)); m_regs->SetEditable(false); //Call Stack m_calls = new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_DONTWRAP|wxNO_BORDER|wxTE_RICH2); - m_calls->SetMinSize(wxSize(495, 100)); m_calls->SetEditable(false); m_list ->SetFont(wxFont(8, wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL)); diff --git a/rpcs3/Gui/MainFrame.cpp b/rpcs3/Gui/MainFrame.cpp index 64167b35ec..344ccb1592 100644 --- a/rpcs3/Gui/MainFrame.cpp +++ b/rpcs3/Gui/MainFrame.cpp @@ -356,13 +356,15 @@ void MainFrame::Config(wxCommandEvent& WXUNUSED(event)) wxStaticBoxSizer* s_round_gs_aspect( new wxStaticBoxSizer( wxVERTICAL, &diag, _("Default aspect ratio") ) ); wxStaticBoxSizer* s_round_io( new wxStaticBoxSizer( wxVERTICAL, &diag, _("IO") ) ); - wxStaticBoxSizer* s_round_pad_handler( new wxStaticBoxSizer( wxVERTICAL, &diag, _("Pad Handler") ) ); - wxStaticBoxSizer* s_round_keyboard_handler( new wxStaticBoxSizer( wxVERTICAL, &diag, _("Keyboard Handler") ) ); - wxStaticBoxSizer* s_round_mouse_handler( new wxStaticBoxSizer( wxVERTICAL, &diag, _("Mouse Handler") ) ); + wxStaticBoxSizer* s_round_io_pad_handler( new wxStaticBoxSizer( wxVERTICAL, &diag, _("Pad Handler") ) ); + wxStaticBoxSizer* s_round_io_keyboard_handler( new wxStaticBoxSizer( wxVERTICAL, &diag, _("Keyboard Handler") ) ); + wxStaticBoxSizer* s_round_io_mouse_handler( new wxStaticBoxSizer( wxVERTICAL, &diag, _("Mouse Handler") ) ); wxStaticBoxSizer* s_round_audio( new wxStaticBoxSizer( wxVERTICAL, &diag, _("Audio") ) ); wxStaticBoxSizer* s_round_audio_out( new wxStaticBoxSizer( wxVERTICAL, &diag, _("Audio Out") ) ); + wxStaticBoxSizer* s_round_hle( new wxStaticBoxSizer( wxVERTICAL, &diag, _("HLE") ) ); + wxComboBox* cbox_cpu_decoder = new wxComboBox(&diag, wxID_ANY); wxComboBox* cbox_gs_render = new wxComboBox(&diag, wxID_ANY); wxComboBox* cbox_gs_resolution = new wxComboBox(&diag, wxID_ANY); @@ -376,6 +378,7 @@ void MainFrame::Config(wxCommandEvent& WXUNUSED(event)) wxCheckBox* chbox_gs_dump_depth = new wxCheckBox(&diag, wxID_ANY, "Dump Depth Buffer"); wxCheckBox* chbox_gs_dump_color = new wxCheckBox(&diag, wxID_ANY, "Dump Color Buffers"); wxCheckBox* chbox_gs_vsync = new wxCheckBox(&diag, wxID_ANY, "VSync"); + wxCheckBox* chbox_hle_logging = new wxCheckBox(&diag, wxID_ANY, "Log all SysCalls"); //cbox_cpu_decoder->Append("DisAsm"); cbox_cpu_decoder->Append("Interpreter & DisAsm"); @@ -411,6 +414,7 @@ void MainFrame::Config(wxCommandEvent& WXUNUSED(event)) chbox_gs_dump_depth->SetValue(Ini.GSDumpDepthBuffer.GetValue()); chbox_gs_dump_color->SetValue(Ini.GSDumpColorBuffers.GetValue()); chbox_gs_vsync->SetValue(Ini.GSVSyncEnable.GetValue()); + chbox_hle_logging->SetValue(Ini.HLELogging.GetValue()); cbox_cpu_decoder->SetSelection(Ini.CPUDecoderMode.GetValue() ? Ini.CPUDecoderMode.GetValue() - 1 : 0); cbox_gs_render->SetSelection(Ini.GSRenderMode.GetValue()); @@ -435,16 +439,18 @@ void MainFrame::Config(wxCommandEvent& WXUNUSED(event)) s_round_gs->Add(chbox_gs_dump_color, wxSizerFlags().Border(wxALL, 5)); s_round_gs->Add(chbox_gs_vsync, wxSizerFlags().Border(wxALL, 5)); - s_round_pad_handler->Add(cbox_pad_handler, wxSizerFlags().Border(wxALL, 5).Expand()); - s_round_keyboard_handler->Add(cbox_keyboard_handler, wxSizerFlags().Border(wxALL, 5).Expand()); - s_round_mouse_handler->Add(cbox_mouse_handler, wxSizerFlags().Border(wxALL, 5).Expand()); - s_round_io->Add(s_round_pad_handler, wxSizerFlags().Border(wxALL, 5).Expand()); - s_round_io->Add(s_round_keyboard_handler, wxSizerFlags().Border(wxALL, 5).Expand()); - s_round_io->Add(s_round_mouse_handler, wxSizerFlags().Border(wxALL, 5).Expand()); + s_round_io_pad_handler->Add(cbox_pad_handler, wxSizerFlags().Border(wxALL, 5).Expand()); + s_round_io_keyboard_handler->Add(cbox_keyboard_handler, wxSizerFlags().Border(wxALL, 5).Expand()); + s_round_io_mouse_handler->Add(cbox_mouse_handler, wxSizerFlags().Border(wxALL, 5).Expand()); + s_round_io->Add(s_round_io_pad_handler, wxSizerFlags().Border(wxALL, 5).Expand()); + s_round_io->Add(s_round_io_keyboard_handler, wxSizerFlags().Border(wxALL, 5).Expand()); + s_round_io->Add(s_round_io_mouse_handler, wxSizerFlags().Border(wxALL, 5).Expand()); s_round_audio_out->Add(cbox_audio_out, wxSizerFlags().Border(wxALL, 5).Expand()); s_round_audio->Add(s_round_audio_out, wxSizerFlags().Border(wxALL, 5).Expand()); + s_round_hle->Add(chbox_hle_logging, wxSizerFlags().Border(wxALL, 5).Expand()); + wxBoxSizer* s_b_panel(new wxBoxSizer(wxHORIZONTAL)); s_b_panel->Add(new wxButton(&diag, wxID_OK), wxSizerFlags().Border(wxALL, 5).Center()); @@ -454,11 +460,11 @@ void MainFrame::Config(wxCommandEvent& WXUNUSED(event)) s_subpanel1->Add(s_round_cpu, wxSizerFlags().Border(wxALL, 5).Expand()); s_subpanel1->Add(s_round_gs, wxSizerFlags().Border(wxALL, 5).Expand()); + s_subpanel1->Add(s_b_panel, wxSizerFlags().Border(wxALL, 8).Expand()); s_subpanel2->Add(s_round_io, wxSizerFlags().Border(wxALL, 5).Expand()); s_subpanel2->Add(s_round_audio, wxSizerFlags().Border(wxALL, 5).Expand()); - s_subpanel1->Add(s_b_panel, wxSizerFlags().Border(wxALL, 8).Expand()); + s_subpanel2->Add(s_round_hle, wxSizerFlags().Border(wxALL, 5).Expand()); - s_subpanel2->AddSpacer(180); s_panel->Add(s_subpanel1, wxSizerFlags().Border(wxALL, 5).Expand()); s_panel->Add(s_subpanel2, wxSizerFlags().Border(wxALL, 5).Expand()); @@ -478,6 +484,7 @@ void MainFrame::Config(wxCommandEvent& WXUNUSED(event)) Ini.KeyboardHandlerMode.SetValue(cbox_keyboard_handler->GetSelection()); Ini.MouseHandlerMode.SetValue(cbox_mouse_handler->GetSelection()); Ini.AudioOutMode.SetValue(cbox_audio_out->GetSelection()); + Ini.HLELogging.SetValue(chbox_hle_logging->GetValue()); Ini.Save(); } diff --git a/rpcs3/Ini.h b/rpcs3/Ini.h index 88a05ccf82..1924aca8d9 100644 --- a/rpcs3/Ini.h +++ b/rpcs3/Ini.h @@ -104,6 +104,7 @@ public: IniEntry KeyboardHandlerMode; IniEntry MouseHandlerMode; IniEntry AudioOutMode; + IniEntry HLELogging; IniEntry PadHandlerLeft; IniEntry PadHandlerDown; @@ -164,6 +165,9 @@ public: path = DefPath + "\\" + "Audio"; AudioOutMode.Init("AudioOutMode", path); + + path = DefPath + "\\" + "HLE"; + HLELogging.Init("HLELogging", path); } void Load() @@ -180,6 +184,7 @@ public: KeyboardHandlerMode.Load(0); MouseHandlerMode.Load(0); AudioOutMode.Load(0); + HLELogging.Load(false); PadHandlerLeft.Load(static_cast('A')); PadHandlerDown.Load(static_cast('S')); @@ -213,6 +218,7 @@ public: KeyboardHandlerMode.Save(); MouseHandlerMode.Save(); AudioOutMode.Save(); + HLELogging.Save(); PadHandlerLeft.Save(); PadHandlerDown.Save();