diff --git a/rpcs3/Emu/RSX/RSXThread.cpp b/rpcs3/Emu/RSX/RSXThread.cpp index 9d5c60a3df..ca9b35cca0 100644 --- a/rpcs3/Emu/RSX/RSXThread.cpp +++ b/rpcs3/Emu/RSX/RSXThread.cpp @@ -2231,6 +2231,10 @@ void RSXThread::Task() const u32 cmd = ReadIO32(get); const u32 count = (cmd >> 18) & 0x7ff; //if(cmd == 0) continue; + + if (Ini.RSXLogging.GetValue()) + LOG_NOTICE(Log::RSX, "%s (cmd=0x%x)", GetMethodName(cmd & 0xffff).c_str(), cmd); + //LOG_NOTICE(Log::RSX, "put=0x%x, get=0x%x, cmd=0x%x (%s)", put, get, cmd, GetMethodName(cmd & 0xffff).c_str()); if(cmd & CELL_GCM_METHOD_FLAG_JUMP) diff --git a/rpcs3/Emu/SysCalls/Modules/cellSail.cpp b/rpcs3/Emu/SysCalls/Modules/cellSail.cpp index 262eca19b1..323e33a172 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellSail.cpp +++ b/rpcs3/Emu/SysCalls/Modules/cellSail.cpp @@ -595,7 +595,7 @@ int cellSailPlayerAddDescriptor(vm::ptr pSelf, vm::ptrWarning("cellSailPlayerAddDescriptor(pSelf_addr=0x%x, pDesc_addr=0x%x)", pSelf.addr(), pDesc.addr()); - if (pSelf->descriptors < 3) + if (pSelf->descriptors < 3 && pDesc) { pSelf->descriptors++; pSelf->registeredDescriptors[pSelf->descriptors] = pDesc; @@ -603,7 +603,7 @@ int cellSailPlayerAddDescriptor(vm::ptr pSelf, vm::ptrError("Descriptor limit reached! This should never happen, report this to a developer."); + cellSail->Error("Descriptor limit reached or the descriptor is unspecified! This should never happen, report this to a developer."); } return CELL_OK; diff --git a/rpcs3/Emu/SysCalls/Modules/cellSail.h b/rpcs3/Emu/SysCalls/Modules/cellSail.h index 18c244ab3a..052133beaa 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellSail.h +++ b/rpcs3/Emu/SysCalls/Modules/cellSail.h @@ -1100,6 +1100,6 @@ struct CellSailPlayer vm::ptr resource; vm::ptr playbackCommand; be_t repeatMode; - be_t descriptors; + be_t descriptors; vm::ptr registeredDescriptors[2]; }; \ No newline at end of file diff --git a/rpcs3/Gui/MainFrame.cpp b/rpcs3/Gui/MainFrame.cpp index d287702250..b3e5da35ad 100644 --- a/rpcs3/Gui/MainFrame.cpp +++ b/rpcs3/Gui/MainFrame.cpp @@ -410,6 +410,7 @@ void MainFrame::Config(wxCommandEvent& WXUNUSED(event)) wxCheckBox* chbox_audio_dump = new wxCheckBox(p_audio, wxID_ANY, "Dump to file"); wxCheckBox* chbox_audio_conv = new wxCheckBox(p_audio, wxID_ANY, "Convert to 16 bit"); wxCheckBox* chbox_hle_logging = new wxCheckBox(p_hle, wxID_ANY, "Log all SysCalls"); + wxCheckBox* chbox_rsx_logging = new wxCheckBox(p_hle, wxID_ANY, "RSX Logging"); wxCheckBox* chbox_hle_hook_stfunc = new wxCheckBox(p_hle, wxID_ANY, "Hook static functions"); wxCheckBox* chbox_hle_savetty = new wxCheckBox(p_hle, wxID_ANY, "Save TTY output to file"); wxCheckBox* chbox_hle_exitonstop = new wxCheckBox(p_hle, wxID_ANY, "Exit RPCS3 when process finishes"); @@ -496,6 +497,7 @@ void MainFrame::Config(wxCommandEvent& WXUNUSED(event)) chbox_audio_dump ->SetValue(Ini.AudioDumpToFile.GetValue()); chbox_audio_conv ->SetValue(Ini.AudioConvertToU16.GetValue()); chbox_hle_logging ->SetValue(Ini.HLELogging.GetValue()); + chbox_rsx_logging ->SetValue(Ini.RSXLogging.GetValue()); chbox_hle_hook_stfunc ->SetValue(Ini.HLEHookStFunc.GetValue()); chbox_hle_savetty ->SetValue(Ini.HLESaveTTY.GetValue()); chbox_hle_exitonstop ->SetValue(Ini.HLEExitOnStop.GetValue()); @@ -523,6 +525,7 @@ void MainFrame::Config(wxCommandEvent& WXUNUSED(event)) chbox_audio_dump->Enable(Emu.IsStopped()); chbox_audio_conv->Enable(Emu.IsStopped()); chbox_hle_logging->Enable(Emu.IsStopped()); + chbox_rsx_logging->Enable(Emu.IsStopped()); chbox_hle_hook_stfunc->Enable(Emu.IsStopped()); s_round_cpu_decoder->Add(cbox_cpu_decoder, wxSizerFlags().Border(wxALL, 5).Expand()); @@ -576,6 +579,7 @@ void MainFrame::Config(wxCommandEvent& WXUNUSED(event)) // HLE / Misc. s_subpanel_hle->Add(s_round_hle_log_lvl, wxSizerFlags().Border(wxALL, 5).Expand()); s_subpanel_hle->Add(chbox_hle_logging, wxSizerFlags().Border(wxALL, 5).Expand()); + s_subpanel_hle->Add(chbox_rsx_logging, wxSizerFlags().Border(wxALL, 5).Expand()); s_subpanel_hle->Add(chbox_hle_hook_stfunc, wxSizerFlags().Border(wxALL, 5).Expand()); s_subpanel_hle->Add(chbox_hle_savetty, wxSizerFlags().Border(wxALL, 5).Expand()); s_subpanel_hle->Add(chbox_hle_exitonstop, wxSizerFlags().Border(wxALL, 5).Expand()); @@ -626,6 +630,7 @@ void MainFrame::Config(wxCommandEvent& WXUNUSED(event)) Ini.Camera.SetValue(cbox_camera->GetSelection()); Ini.CameraType.SetValue(cbox_camera_type->GetSelection()); Ini.HLELogging.SetValue(chbox_hle_logging->GetValue()); + Ini.RSXLogging.SetValue(chbox_rsx_logging->GetValue()); Ini.HLEHookStFunc.SetValue(chbox_hle_hook_stfunc->GetValue()); Ini.HLESaveTTY.SetValue(chbox_hle_savetty->GetValue()); Ini.HLEExitOnStop.SetValue(chbox_hle_exitonstop->GetValue()); diff --git a/rpcs3/Ini.h b/rpcs3/Ini.h index 7c2e61172f..cbfc6d9fe4 100644 --- a/rpcs3/Ini.h +++ b/rpcs3/Ini.h @@ -149,11 +149,12 @@ public: IniEntry PadHandlerRStickUp; // HLE/Miscs + IniEntry HLELogLvl; IniEntry HLELogging; + IniEntry RSXLogging; IniEntry HLEHookStFunc; IniEntry HLESaveTTY; IniEntry HLEExitOnStop; - IniEntry HLELogLvl; IniEntry HLEAlwaysStart; //Auto Pause @@ -224,6 +225,7 @@ public: // HLE/Misc HLELogging.Init("HLE_HLELogging", path); + RSXLogging.Init("RSX_Logging", path); HLEHookStFunc.Init("HLE_HLEHookStFunc", path); HLESaveTTY.Init("HLE_HLESaveTTY", path); HLEExitOnStop.Init("HLE_HLEExitOnStop", path); @@ -294,6 +296,7 @@ public: // HLE/Miscs HLELogging.Load(false); + RSXLogging.Load(false); HLEHookStFunc.Load(false); HLESaveTTY.Load(false); HLEExitOnStop.Load(false); @@ -365,6 +368,7 @@ public: // HLE/Miscs HLELogging.Save(); + RSXLogging.Save(); HLEHookStFunc.Save(); HLESaveTTY.Save(); HLEExitOnStop.Save(); diff --git a/rpcs3/rpcs3.cpp b/rpcs3/rpcs3.cpp index dc40edfd17..65867c0320 100644 --- a/rpcs3/rpcs3.cpp +++ b/rpcs3/rpcs3.cpp @@ -165,6 +165,10 @@ void Rpcs3App::Exit() Ini.Save(); wxApp::Exit(); + +#ifdef _WIN32 + timeEndPeriod(1); +#endif } void Rpcs3App::SendDbgCommand(DbgCommand id, CPUThread* thr) @@ -176,6 +180,10 @@ void Rpcs3App::SendDbgCommand(DbgCommand id, CPUThread* thr) Rpcs3App::Rpcs3App() { +#ifdef _WIN32 + timeBeginPeriod(1); +#endif + #if defined(__unix__) && !defined(__APPLE__) XInitThreads(); #endif