mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-20 11:36:13 +00:00
RPCS3 arguments, TTY to file & sceNpTrophy stuff
This commit is contained in:
parent
6a15351363
commit
cd10dca71f
7 changed files with 54 additions and 3 deletions
|
@ -8,6 +8,7 @@ END_EVENT_TABLE()
|
|||
DbgConsole::DbgConsole()
|
||||
: FrameBase(nullptr, wxID_ANY, "DbgConsole", wxEmptyString, wxDefaultSize, wxDefaultPosition, wxDEFAULT_FRAME_STYLE, true)
|
||||
, ThreadBase("DbgConsole thread")
|
||||
, m_output(nullptr)
|
||||
{
|
||||
m_console = new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition,
|
||||
wxSize(500, 500), wxTE_MULTILINE | wxTE_READONLY | wxTE_RICH2);
|
||||
|
@ -16,6 +17,9 @@ DbgConsole::DbgConsole()
|
|||
|
||||
m_color_white = new wxTextAttr(wxColour(255, 255, 255));
|
||||
m_color_red = new wxTextAttr(wxColour(255, 0, 0));
|
||||
|
||||
if (Ini.HLESaveTTY.GetValue())
|
||||
m_output = new wxFile("tty.log", wxFile::write);
|
||||
}
|
||||
|
||||
DbgConsole::~DbgConsole()
|
||||
|
@ -52,6 +56,9 @@ void DbgConsole::Task()
|
|||
m_console->SetInsertionPointEnd();
|
||||
m_console->WriteText(packet.m_text);
|
||||
|
||||
if (m_output && Ini.HLESaveTTY.GetValue())
|
||||
m_output->Write(packet.m_text);
|
||||
|
||||
if(!DbgConsole::IsShown()) Show();
|
||||
}
|
||||
}
|
||||
|
@ -60,5 +67,12 @@ void DbgConsole::OnQuit(wxCloseEvent& event)
|
|||
{
|
||||
ThreadBase::Stop(false);
|
||||
Hide();
|
||||
|
||||
if (m_output)
|
||||
{
|
||||
m_output->Close();
|
||||
m_output = nullptr;
|
||||
}
|
||||
|
||||
//event.Skip();
|
||||
}
|
|
@ -72,6 +72,7 @@ class DbgConsole
|
|||
: public FrameBase
|
||||
, public ThreadBase
|
||||
{
|
||||
wxFile* m_output;
|
||||
wxTextCtrl* m_console;
|
||||
wxTextAttr* m_color_white;
|
||||
wxTextAttr* m_color_red;
|
||||
|
|
|
@ -188,9 +188,20 @@ int sceNpTrophySetSoundLevel()
|
|||
return CELL_OK;
|
||||
}
|
||||
|
||||
int sceNpTrophyGetRequiredDiskSpace()
|
||||
int sceNpTrophyGetRequiredDiskSpace(u32 context, u32 handle, mem64_t reqspace, u64 options)
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(sceNpTrophy);
|
||||
sceNpTrophy.Warning("sceNpTrophyGetRequiredDiskSpace(context=%d, handle=%d, reqspace_addr=0x%x, options=0x%llx)",
|
||||
context, handle, reqspace.GetAddr(), options);
|
||||
|
||||
if (!s_npTrophyInstance.m_bInitialized)
|
||||
return SCE_NP_TROPHY_ERROR_NOT_INITIALIZED;
|
||||
if (!reqspace.IsGood())
|
||||
return SCE_NP_TROPHY_ERROR_INVALID_ARGUMENT;
|
||||
// TODO: There are other possible errors
|
||||
|
||||
sceNpTrophyInternalContext& ctxt = s_npTrophyInstance.contexts[context];
|
||||
reqspace = ctxt.trp_stream->GetSize(); // TODO: This is not accurate. It's just an approximation of the real value
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -363,6 +363,7 @@ void MainFrame::Config(wxCommandEvent& WXUNUSED(event))
|
|||
wxCheckBox* chbox_gs_vsync = new wxCheckBox(&diag, wxID_ANY, "VSync");
|
||||
wxCheckBox* chbox_audio_dump = new wxCheckBox(&diag, wxID_ANY, "Dump to file");
|
||||
wxCheckBox* chbox_hle_logging = new wxCheckBox(&diag, wxID_ANY, "Log all SysCalls");
|
||||
wxCheckBox* chbox_hle_savetty = new wxCheckBox(&diag, wxID_ANY, "Save TTY output to file");
|
||||
|
||||
//cbox_cpu_decoder->Append("DisAsm");
|
||||
cbox_cpu_decoder->Append("Interpreter & DisAsm");
|
||||
|
@ -401,6 +402,7 @@ void MainFrame::Config(wxCommandEvent& WXUNUSED(event))
|
|||
chbox_gs_vsync->SetValue(Ini.GSVSyncEnable.GetValue());
|
||||
chbox_audio_dump->SetValue(Ini.AudioDumpToFile.GetValue());
|
||||
chbox_hle_logging->SetValue(Ini.HLELogging.GetValue());
|
||||
chbox_hle_savetty->SetValue(Ini.HLESaveTTY.GetValue());
|
||||
|
||||
chbox_audio_dump->Enable(Emu.IsStopped());
|
||||
chbox_hle_logging->Enable(Emu.IsStopped());
|
||||
|
@ -441,6 +443,7 @@ void MainFrame::Config(wxCommandEvent& WXUNUSED(event))
|
|||
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());
|
||||
s_round_hle->Add(chbox_hle_savetty, wxSizerFlags().Border(wxALL, 5).Expand());
|
||||
|
||||
wxBoxSizer* s_b_panel(new wxBoxSizer(wxHORIZONTAL));
|
||||
|
||||
|
@ -478,6 +481,7 @@ void MainFrame::Config(wxCommandEvent& WXUNUSED(event))
|
|||
Ini.AudioOutMode.SetValue(cbox_audio_out->GetSelection());
|
||||
Ini.AudioDumpToFile.SetValue(chbox_audio_dump->GetValue());
|
||||
Ini.HLELogging.SetValue(chbox_hle_logging->GetValue());
|
||||
Ini.HLESaveTTY.SetValue(chbox_hle_savetty->GetValue());
|
||||
|
||||
Ini.Save();
|
||||
}
|
||||
|
|
|
@ -107,6 +107,7 @@ public:
|
|||
IniEntry<u8> AudioOutMode;
|
||||
IniEntry<bool> AudioDumpToFile;
|
||||
IniEntry<bool> HLELogging;
|
||||
IniEntry<bool> HLESaveTTY;
|
||||
|
||||
IniEntry<int> PadHandlerLeft;
|
||||
IniEntry<int> PadHandlerDown;
|
||||
|
@ -172,6 +173,7 @@ public:
|
|||
|
||||
path = DefPath + "\\" + "HLE";
|
||||
HLELogging.Init("HLELogging", path);
|
||||
HLESaveTTY.Init("HLESaveTTY", path);
|
||||
}
|
||||
|
||||
void Load()
|
||||
|
@ -191,6 +193,7 @@ public:
|
|||
AudioOutMode.Load(0);
|
||||
AudioDumpToFile.Load(0);
|
||||
HLELogging.Load(false);
|
||||
HLESaveTTY.Load(false);
|
||||
|
||||
PadHandlerLeft.Load(static_cast<int>('A'));
|
||||
PadHandlerDown.Load(static_cast<int>('S'));
|
||||
|
@ -227,6 +230,7 @@ public:
|
|||
AudioOutMode.Save();
|
||||
AudioDumpToFile.Save();
|
||||
HLELogging.Save();
|
||||
HLESaveTTY.Save();
|
||||
|
||||
PadHandlerLeft.Save();
|
||||
PadHandlerDown.Save();
|
||||
|
|
|
@ -27,9 +27,25 @@ bool Rpcs3App::OnInit()
|
|||
m_MainFrame->Show();
|
||||
m_MainFrame->DoSettings(true);
|
||||
|
||||
OnArguments();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void Rpcs3App::OnArguments()
|
||||
{
|
||||
// Usage:
|
||||
// rpcs3-*.exe Initializes RPCS3
|
||||
// rpcs3-*.exe [(S)ELF] Initializes RPCS3, then loads and runs the specified (S)ELF file.
|
||||
|
||||
if (Rpcs3App::argc > 1)
|
||||
{
|
||||
Emu.SetPath(argv[1]);
|
||||
Emu.Load();
|
||||
Emu.Run();
|
||||
}
|
||||
}
|
||||
|
||||
void Rpcs3App::Exit()
|
||||
{
|
||||
Emu.Stop();
|
||||
|
|
|
@ -54,7 +54,8 @@ class Rpcs3App : public wxApp
|
|||
public:
|
||||
MainFrame* m_MainFrame;
|
||||
|
||||
virtual bool OnInit();
|
||||
virtual bool OnInit(); // RPCS3's entry point
|
||||
virtual void OnArguments(); // Handle arguments: Rpcs3App::argc, Rpcs3App::argv
|
||||
virtual void Exit();
|
||||
|
||||
void SendDbgCommand(DbgCommand id, CPUThread* thr=nullptr);
|
||||
|
|
Loading…
Add table
Reference in a new issue