From 6fd824fccab9b2ba97a002a7cb9836973338ec64 Mon Sep 17 00:00:00 2001 From: Cornee Traas Date: Sat, 10 Aug 2013 23:48:32 +0200 Subject: [PATCH 1/9] Update .gitignore --- .gitignore | 33 +++++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index 7905f786ba..876b439f8c 100644 --- a/.gitignore +++ b/.gitignore @@ -10,20 +10,33 @@ *.lai *.la *.a -/libs *.opensdf *.sdf -*.user -/bin/rpcs3.exe -/bin/RPCS3.log +*.suo +*.tlog +*.idb +*.pdb +*.obj +*.ilk +*.pch + +*.log +*.exe +*.elf +*.lastbuildstate +*.unsuccessfulbuild +*.res +*.dump + +/libs +/ipch +/rpcs3/Debug +/rpcs3/Release + +/wxWidgets/lib/vc_lib/mswd/wx/msw/rcdefs.h +/wxWidgets/lib/vc_lib/mswd/wx/setup.h /bin/rpcs3.ini -/bin/compiled.elf /bin/FragmentProgram.txt -/bin/VertexDataArray.dump /bin/VertexProgram.txt /bin/BreakPoints.dat /bin/textures -*.suo -/rpcs3/Debug -/rpcs3/Release -/ipch From fafb88672ae75d703448ec1f192cb6fc008a2645 Mon Sep 17 00:00:00 2001 From: Cornee Traas Date: Sat, 10 Aug 2013 23:48:54 +0200 Subject: [PATCH 2/9] Fix debugger working directory --- rpcs3/rpcs3.vcxproj.user | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 rpcs3/rpcs3.vcxproj.user diff --git a/rpcs3/rpcs3.vcxproj.user b/rpcs3/rpcs3.vcxproj.user new file mode 100644 index 0000000000..d7fe813d8f --- /dev/null +++ b/rpcs3/rpcs3.vcxproj.user @@ -0,0 +1,19 @@ + + + + $(SolutionDir)bin\ + WindowsLocalDebugger + + + $(SolutionDir)bin\ + WindowsLocalDebugger + + + $(SolutionDir)bin\ + WindowsLocalDebugger + + + $(SolutionDir)bin\ + WindowsLocalDebugger + + \ No newline at end of file From cd3ad0b1497afe6e8e0733d975da2f01102a5cae Mon Sep 17 00:00:00 2001 From: Cornee Traas Date: Sat, 10 Aug 2013 23:51:24 +0200 Subject: [PATCH 3/9] (indirectly) Fix ini boolean parsing error --- rpcs3/Ini.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rpcs3/Ini.cpp b/rpcs3/Ini.cpp index d141b5bc4a..4f61916285 100644 --- a/rpcs3/Ini.cpp +++ b/rpcs3/Ini.cpp @@ -17,9 +17,9 @@ static bool StringToBool(const wxString str) static wxString BoolToString(const bool b) { - if(b) return "enable"; + if(b) return "true"; - return "disable"; + return "false"; } static wxSize StringToSize(const wxString str) From d249bfef4d5daf1fd95520ffdebe96651dd74a9e Mon Sep 17 00:00:00 2001 From: Cornee Traas Date: Sun, 11 Aug 2013 00:09:27 +0200 Subject: [PATCH 4/9] When debugging, put the git revision in the title Useful for bug reports, user-friendly version still used when building in release mode. A unix script for generating the git version is still needed. --- Utilities/git-version-gen.cmd | 73 +++++++++++++++++++++++++++++++++++ rpcs3/Gui/MainFrame.cpp | 7 ++++ rpcs3/git-version.h | 6 +++ rpcs3/rpcs3.vcxproj | 3 +- 4 files changed, 87 insertions(+), 2 deletions(-) create mode 100644 Utilities/git-version-gen.cmd create mode 100644 rpcs3/git-version.h diff --git a/Utilities/git-version-gen.cmd b/Utilities/git-version-gen.cmd new file mode 100644 index 0000000000..3cd4334b4a --- /dev/null +++ b/Utilities/git-version-gen.cmd @@ -0,0 +1,73 @@ +@echo off + +rem // This program is free software: you can redistribute it and/or modify +rem // it under the terms of the GNU General Public License as published by +rem // the Free Software Foundation, version 2.0 or later versions. + +rem // This program is distributed in the hope that it will be useful, +rem // but WITHOUT ANY WARRANTY; without even the implied warranty of +rem // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +rem // GNU General Public License 2.0 for more details. + +rem // A copy of the GPL 2.0 should have been included with the program. +rem // If not, see http://www.gnu.org/licenses/ + +rem // Official git repository and contact information can be found at +rem // https://github.com/hrydgard/RPCS3 and http://www.RPCS3.org/. + +setlocal ENABLEDELAYEDEXPANSION + +set GIT_VERSION_FILE=%~p0..\rpcs3\git-version.h +if not defined GIT ( + set GIT="git" +) +call %GIT% describe > NUL 2> NUL +if errorlevel 1 ( + echo Git not on path, trying default Msysgit paths + set GIT="%ProgramFiles(x86)%\Git\bin\git.exe" + call !GIT! describe > NUL 2> NUL + if errorlevel 1 ( + set GIT="%ProgramFiles%\Git\bin\git.exe" + ) +) + +if exist "%GIT_VERSION_FILE%" ( + rem // Skip updating the file if RPCS3_GIT_VERSION_NO_UPDATE is 1. + findstr /B /C:"#define RPCS3_GIT_VERSION_NO_UPDATE 1" "%GIT_VERSION_FILE%" > NUL + if not errorlevel 1 ( + goto done + ) +) + +call %GIT% describe --always > NUL 2> NUL +if errorlevel 1 ( + echo Unable to update git-version.h, git not found. + echo If you don't want to add it to your path, set the GIT environment variable. + + echo // This is a generated file. > "%GIT_VERSION_FILE%" + echo. >> "%GIT_VERSION_FILE%" + echo #define RPCS3_GIT_VERSION "unknown" >> "%GIT_VERSION_FILE%" + echo. >> "%GIT_VERSION_FILE%" + echo // If you don't want this file to update/recompile, change to 1. >> "%GIT_VERSION_FILE%" + echo #define RPCS3_GIT_VERSION_NO_UPDATE 0 >> "%GIT_VERSION_FILE%" + goto done +) + +for /F %%I IN ('call %GIT% describe --always') do set GIT_VERSION=%%I + +rem // Don't modify the file if it already has the current version. +if exist "%GIT_VERSION_FILE%" ( + findstr /C:"%GIT_VERSION%" "%GIT_VERSION_FILE%" > NUL + if not errorlevel 1 ( + goto done + ) +) + +echo // This is a generated file. > "%GIT_VERSION_FILE%" +echo. >> "%GIT_VERSION_FILE%" +echo #define RPCS3_GIT_VERSION "%GIT_VERSION%" >> "%GIT_VERSION_FILE%" +echo. >> "%GIT_VERSION_FILE%" +echo // If you don't want this file to update/recompile, change to 1. >> "%GIT_VERSION_FILE%" +echo #define RPCS3_GIT_VERSION_NO_UPDATE 0 >> "%GIT_VERSION_FILE%" + +:done diff --git a/rpcs3/Gui/MainFrame.cpp b/rpcs3/Gui/MainFrame.cpp index 0a6b1c435f..e629d2cdba 100644 --- a/rpcs3/Gui/MainFrame.cpp +++ b/rpcs3/Gui/MainFrame.cpp @@ -2,6 +2,7 @@ #include "MainFrame.h" #include "CompilerELF.h" +#include "git-version.h" #include "Emu/System.h" #include "Ini.h" #include "Emu/GS/sysutil_video.h" @@ -34,7 +35,13 @@ MainFrame::MainFrame() : FrameBase(NULL, wxID_ANY, "", "MainFrame", wxSize(280, 180)) , m_aui_mgr(this) { + +#ifdef _DEBUG + SetLabel(wxString::Format(_PRGNAME_ " git-" RPCS3_GIT_VERSION)); +#else SetLabel(wxString::Format(_PRGNAME_ " " _PRGVER_)); +#endif + wxMenuBar& menubar(*new wxMenuBar()); wxMenu& menu_boot(*new wxMenu()); diff --git a/rpcs3/git-version.h b/rpcs3/git-version.h new file mode 100644 index 0000000000..55c272acc7 --- /dev/null +++ b/rpcs3/git-version.h @@ -0,0 +1,6 @@ +// This is a generated file. + +#define RPCS3_GIT_VERSION "cd3ad0b" + +// If you don't want this file to update/recompile, change to 1. +#define RPCS3_GIT_VERSION_NO_UPDATE 0 diff --git a/rpcs3/rpcs3.vcxproj b/rpcs3/rpcs3.vcxproj index 50c21ec9bf..85c4bab58d 100644 --- a/rpcs3/rpcs3.vcxproj +++ b/rpcs3/rpcs3.vcxproj @@ -128,8 +128,7 @@ %(IgnoreSpecificDefaultLibraries) - - + $(SolutionDir)\Utilities\git-version-gen.cmd From 96c692aefc381ff396a729148698a6b11b5bf703 Mon Sep 17 00:00:00 2001 From: Cornee Traas Date: Mon, 12 Aug 2013 11:56:56 +0200 Subject: [PATCH 5/9] Fix spelling of IsRunned to IsRunning --- rpcs3/Emu/Cell/PPCThread.cpp | 8 ++++---- rpcs3/Emu/Cell/PPCThread.h | 2 +- rpcs3/Emu/GS/GL/GLGSRender.cpp | 2 +- rpcs3/Emu/GS/Null/NullGSRender.h | 2 +- rpcs3/Emu/System.cpp | 10 +++++----- rpcs3/Emu/System.h | 2 +- rpcs3/Gui/Debugger.cpp | 2 +- rpcs3/Gui/DisAsmFrame.cpp | 6 +++--- rpcs3/Gui/InterpreterDisAsm.cpp | 4 ++-- rpcs3/Gui/MainFrame.cpp | 30 +++++++++++++++--------------- rpcs3/stdafx.h | 2 +- 11 files changed, 35 insertions(+), 35 deletions(-) diff --git a/rpcs3/Emu/Cell/PPCThread.cpp b/rpcs3/Emu/Cell/PPCThread.cpp index 8124a58115..aa7c2856c2 100644 --- a/rpcs3/Emu/Cell/PPCThread.cpp +++ b/rpcs3/Emu/Cell/PPCThread.cpp @@ -161,7 +161,7 @@ wxArrayString PPCThread::ErrorToString(const u32 error) void PPCThread::Run() { - if(IsRunned()) Stop(); + if(IsRunning()) Stop(); if(IsPaused()) { Resume(); @@ -170,7 +170,7 @@ void PPCThread::Run() wxGetApp().SendDbgCommand(DID_START_THREAD, this); - m_status = Runned; + m_status = Running; SetPc(entry); InitStack(); @@ -187,7 +187,7 @@ void PPCThread::Resume() wxGetApp().SendDbgCommand(DID_RESUME_THREAD, this); - m_status = Runned; + m_status = Running; DoResume(); Emu.CheckStatus(); @@ -198,7 +198,7 @@ void PPCThread::Resume() void PPCThread::Pause() { - if(!IsRunned()) return; + if(!IsRunning()) return; wxGetApp().SendDbgCommand(DID_PAUSE_THREAD, this); diff --git a/rpcs3/Emu/Cell/PPCThread.h b/rpcs3/Emu/Cell/PPCThread.h index 14abf1f17b..082420b8af 100644 --- a/rpcs3/Emu/Cell/PPCThread.h +++ b/rpcs3/Emu/Cell/PPCThread.h @@ -102,7 +102,7 @@ public: bool IsSPU() const { return m_type == PPC_THREAD_SPU; } bool IsOk() const { return m_error == 0; } - bool IsRunned() const { return m_status == Runned; } + bool IsRunning() const { return m_status == Running; } bool IsPaused() const { return m_status == Paused; } bool IsStopped() const { return m_status == Stopped; } diff --git a/rpcs3/Emu/GS/GL/GLGSRender.cpp b/rpcs3/Emu/GS/GL/GLGSRender.cpp index 335f834fb7..8bb5b9fc8c 100644 --- a/rpcs3/Emu/GS/GL/GLGSRender.cpp +++ b/rpcs3/Emu/GS/GL/GLGSRender.cpp @@ -132,7 +132,7 @@ void GLRSXThread::Task() { wxCriticalSectionLocker lock(p.m_cs_main); - if(p.m_ctrl->get == p.m_ctrl->put || !Emu.IsRunned()) + if(p.m_ctrl->get == p.m_ctrl->put || !Emu.IsRunning()) { SemaphorePostAndWait(p.m_sem_flush); diff --git a/rpcs3/Emu/GS/Null/NullGSRender.h b/rpcs3/Emu/GS/Null/NullGSRender.h index d9c9443b1a..6db11e3314 100644 --- a/rpcs3/Emu/GS/Null/NullGSRender.h +++ b/rpcs3/Emu/GS/Null/NullGSRender.h @@ -129,7 +129,7 @@ wxThread::ExitCode NullRSXThread::Entry() { wxCriticalSectionLocker lock(p.m_cs_main); - if(p.m_ctrl->get == p.m_ctrl->put || !Emu.IsRunned()) + if(p.m_ctrl->get == p.m_ctrl->put || !Emu.IsRunning()) { SemaphorePostAndWait(p.m_sem_flush); diff --git a/rpcs3/Emu/System.cpp b/rpcs3/Emu/System.cpp index 812e50e05c..181ea571ac 100644 --- a/rpcs3/Emu/System.cpp +++ b/rpcs3/Emu/System.cpp @@ -145,7 +145,7 @@ void Emulator::Run() if(!IsReady()) return; } - if(IsRunned()) Stop(); + if(IsRunning()) Stop(); if(IsPaused()) { Resume(); @@ -156,7 +156,7 @@ void Emulator::Run() wxCriticalSectionLocker lock(m_cs_status); //ConLog.Write("run..."); - m_status = Runned; + m_status = Running; m_vfs.Mount("/", vfsDevice::GetRoot(m_path), new vfsLocalFile()); m_vfs.Mount("/dev_hdd0/", wxGetCwd() + "\\dev_hdd0\\", new vfsLocalFile()); @@ -189,7 +189,7 @@ void Emulator::Run() void Emulator::Pause() { - if(!IsRunned()) return; + if(!IsRunning()) return; //ConLog.Write("pause..."); wxGetApp().SendDbgCommand(DID_PAUSE_EMU); @@ -205,10 +205,10 @@ void Emulator::Resume() wxGetApp().SendDbgCommand(DID_RESUME_EMU); wxCriticalSectionLocker lock(m_cs_status); - m_status = Runned; + m_status = Running; CheckStatus(); - if(IsRunned() && Ini.CPUDecoderMode.GetValue() != 1) GetCPU().Exec(); + if(IsRunning() && Ini.CPUDecoderMode.GetValue() != 1) GetCPU().Exec(); wxGetApp().SendDbgCommand(DID_RESUMED_EMU); } diff --git a/rpcs3/Emu/System.h b/rpcs3/Emu/System.h index 837fe2322f..5b6c3eed29 100644 --- a/rpcs3/Emu/System.h +++ b/rpcs3/Emu/System.h @@ -121,7 +121,7 @@ public: void SavePoints(const wxString& path); void LoadPoints(const wxString& path); - __forceinline bool IsRunned() const { wxCriticalSectionLocker lock(m_cs_status); return m_status == Runned; } + __forceinline bool IsRunning() const { wxCriticalSectionLocker lock(m_cs_status); return m_status == Running; } __forceinline bool IsPaused() const { wxCriticalSectionLocker lock(m_cs_status); return m_status == Paused; } __forceinline bool IsStopped() const { wxCriticalSectionLocker lock(m_cs_status); return m_status == Stopped; } __forceinline bool IsReady() const { wxCriticalSectionLocker lock(m_cs_status); return m_status == Ready; } diff --git a/rpcs3/Gui/Debugger.cpp b/rpcs3/Gui/Debugger.cpp index 31bb005d06..d0cad3d3a0 100644 --- a/rpcs3/Gui/Debugger.cpp +++ b/rpcs3/Gui/Debugger.cpp @@ -47,7 +47,7 @@ public: void OnRun(wxCommandEvent& event) { - if(Emu.IsRunned()) + if(Emu.IsRunning()) { Emu.Pause(); } diff --git a/rpcs3/Gui/DisAsmFrame.cpp b/rpcs3/Gui/DisAsmFrame.cpp index 5feadd3490..05512dec5c 100644 --- a/rpcs3/Gui/DisAsmFrame.cpp +++ b/rpcs3/Gui/DisAsmFrame.cpp @@ -78,14 +78,14 @@ void DisAsmFrame::AddLine(const wxString line) { static bool finished = false; - if(finished && Emu.IsRunned()) + if(finished && Emu.IsRunning()) { count = 0; finished = false; } - else if(count >= LINES_OPCODES || !Emu.IsRunned()) + else if(count >= LINES_OPCODES || !Emu.IsRunning()) { - if(Emu.IsRunned()) Emu.Pause(); + if(Emu.IsRunning()) Emu.Pause(); finished = true; CPU.PrevPc(); return; diff --git a/rpcs3/Gui/InterpreterDisAsm.cpp b/rpcs3/Gui/InterpreterDisAsm.cpp index bdf9a1e4de..a42590bbdc 100644 --- a/rpcs3/Gui/InterpreterDisAsm.cpp +++ b/rpcs3/Gui/InterpreterDisAsm.cpp @@ -186,7 +186,7 @@ void InterpreterDisAsmFrame::ShowAddr(const u64 addr) wxColour colour; - if((!CPU.IsRunned() || !Emu.IsRunned()) && PC == CPU.PC) + if((!CPU.IsRunning() || !Emu.IsRunning()) && PC == CPU.PC) { colour = wxColour("Green"); } @@ -429,7 +429,7 @@ void InterpreterDisAsmFrame::Task() { CPU.ExecOnce(); } - while(CPU.IsRunned() && Emu.IsRunned() && !TestDestroy() && !IsBreakPoint(CPU.PC) && dump_status == dump_enable); + while(CPU.IsRunning() && Emu.IsRunning() && !TestDestroy() && !IsBreakPoint(CPU.PC) && dump_status == dump_enable); } catch(const wxString& e) { diff --git a/rpcs3/Gui/MainFrame.cpp b/rpcs3/Gui/MainFrame.cpp index e629d2cdba..16080e7293 100644 --- a/rpcs3/Gui/MainFrame.cpp +++ b/rpcs3/Gui/MainFrame.cpp @@ -112,7 +112,7 @@ void MainFrame::BootGame(wxCommandEvent& WXUNUSED(event)) { bool stoped = false; - if(Emu.IsRunned()) + if(Emu.IsRunning()) { Emu.Pause(); stoped = true; @@ -187,7 +187,7 @@ void MainFrame::BootElf(wxCommandEvent& WXUNUSED(event)) { bool stoped = false; - if(Emu.IsRunned()) + if(Emu.IsRunning()) { Emu.Pause(); stoped = true; @@ -216,7 +216,7 @@ void MainFrame::BootSelf(wxCommandEvent& WXUNUSED(event)) { bool stoped = false; - if(Emu.IsRunned()) + if(Emu.IsRunning()) { Emu.Pause(); stoped = true; @@ -251,7 +251,7 @@ void MainFrame::Pause(wxCommandEvent& WXUNUSED(event)) { Emu.Resume(); } - else if(Emu.IsRunned()) + else if(Emu.IsRunning()) { Emu.Pause(); } @@ -273,7 +273,7 @@ void MainFrame::Config(wxCommandEvent& WXUNUSED(event)) bool paused = false; - if(Emu.IsRunned()) + if(Emu.IsRunning()) { Emu.Pause(); paused = true; @@ -377,7 +377,7 @@ void MainFrame::UpdateUI(wxCommandEvent& event) { event.Skip(); - bool is_runned, is_stopped, is_ready; + bool is_running, is_stopped, is_ready; if(event.GetEventType() == wxEVT_DBG_COMMAND) { @@ -385,40 +385,40 @@ void MainFrame::UpdateUI(wxCommandEvent& event) { case DID_START_EMU: case DID_STARTED_EMU: - is_runned = true; + is_running = true; is_stopped = false; is_ready = false; break; case DID_STOP_EMU: case DID_STOPED_EMU: - is_runned = false; + is_running = false; is_stopped = true; is_ready = false; break; case DID_PAUSE_EMU: case DID_PAUSED_EMU: - is_runned = false; + is_running = false; is_stopped = false; is_ready = false; break; case DID_RESUME_EMU: case DID_RESUMED_EMU: - is_runned = true; + is_running = true; is_stopped = false; is_ready = false; break; case DID_READY_EMU: - is_runned = false; + is_running = false; is_stopped = false; is_ready = true; break; default: - is_runned = Emu.IsRunned(); + is_running = Emu.IsRunning(); is_stopped = Emu.IsStopped(); is_ready = Emu.IsReady(); break; @@ -426,7 +426,7 @@ void MainFrame::UpdateUI(wxCommandEvent& event) } else { - is_runned = Emu.IsRunned(); + is_running = Emu.IsRunning(); is_stopped = Emu.IsStopped(); is_ready = Emu.IsReady(); } @@ -436,7 +436,7 @@ void MainFrame::UpdateUI(wxCommandEvent& event) wxMenuItem& stop = *menubar.FindItem( id_sys_stop ); wxMenuItem& send_exit = *menubar.FindItem( id_sys_send_exit ); - pause.SetText(is_runned ? "Pause\tCtrl + P" : is_ready ? "Start\tCtrl + C" : "Resume\tCtrl + C"); + pause.SetText(is_running ? "Pause\tCtrl + P" : is_ready ? "Start\tCtrl + C" : "Resume\tCtrl + C"); pause.Enable(!is_stopped); stop.Enable(!is_stopped); //send_exit.Enable(false); @@ -502,7 +502,7 @@ void MainFrame::OnKeyDown(wxKeyEvent& event) switch(event.GetKeyCode()) { case 'C': case 'c': if(Emu.IsPaused()) Emu.Resume(); else if(Emu.IsReady()) Emu.Run(); return; - case 'P': case 'p': if(Emu.IsRunned()) Emu.Pause(); return; + case 'P': case 'p': if(Emu.IsRunning()) Emu.Pause(); return; case 'S': case 's': if(!Emu.IsStopped()) Emu.Stop(); return; case 'R': case 'r': if(!Emu.m_path.IsEmpty()) {Emu.Stop(); Emu.Run();} return; } diff --git a/rpcs3/stdafx.h b/rpcs3/stdafx.h index 8633a2be22..b575624b77 100644 --- a/rpcs3/stdafx.h +++ b/rpcs3/stdafx.h @@ -179,7 +179,7 @@ static void safe_realloc(T* ptr, uint new_size) enum Status { - Runned, + Running, Paused, Stopped, Ready, From f42e6d7374ae96e1052b100082576c6705ab7fed Mon Sep 17 00:00:00 2001 From: Cornee Traas Date: Mon, 12 Aug 2013 11:57:25 +0200 Subject: [PATCH 6/9] Update .gitignore to include git-version.h --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 876b439f8c..35e0f69d2c 100644 --- a/.gitignore +++ b/.gitignore @@ -40,3 +40,4 @@ /bin/VertexProgram.txt /bin/BreakPoints.dat /bin/textures +rpcs3/git-version.h From f25fa26b4245f3f0814144620ae20c61a7c69a81 Mon Sep 17 00:00:00 2001 From: Cornee Traas Date: Thu, 5 Sep 2013 09:45:33 +0200 Subject: [PATCH 7/9] Refactor of game loading --- rpcs3/Gui/MainFrame.cpp | 68 ++++++++++++----------------------------- 1 file changed, 19 insertions(+), 49 deletions(-) diff --git a/rpcs3/Gui/MainFrame.cpp b/rpcs3/Gui/MainFrame.cpp index ff1bf37bbf..c6698ce399 100644 --- a/rpcs3/Gui/MainFrame.cpp +++ b/rpcs3/Gui/MainFrame.cpp @@ -144,59 +144,29 @@ void MainFrame::BootGame(wxCommandEvent& WXUNUSED(event)) Emu.Stop(); - const wxString& elf0 = ctrl.GetPath() + "\\PS3_GAME\\USRDIR\\BOOT.BIN"; - const wxString& elf1 = ctrl.GetPath() + "\\USRDIR\\BOOT.BIN"; - const wxString& elf2 = ctrl.GetPath() + "\\BOOT.BIN"; - const wxString& self0 = ctrl.GetPath() + "\\PS3_GAME\\USRDIR\\EBOOT.BIN"; - const wxString& self1 = ctrl.GetPath() + "\\USRDIR\\EBOOT.BIN"; - const wxString& self2 = ctrl.GetPath() + "\\EBOOT.BIN"; + wxString elf[6] = { + "\\PS3_GAME\\USRDIR\\BOOT.BIN", + "\\USRDIR\\BOOT.BIN", + "\\BOOT.BIN", + "\\PS3_GAME\\USRDIR\\EBOOT.BIN", + "\\USRDIR\\EBOOT.BIN", + "\\EBOOT.BIN" + }; - if(wxFile::Access(elf0, wxFile::read)) + for(int i=0;i<6;i++) { - Emu.SetPath(elf0); - ConLog.Write("Elf: booting..."); + if(wxFile::Access(ctrl.GetPath() + elf[i], wxFile::read)) + { + Emu.SetPath(ctrl.GetPath() + elf[i]); + ConLog.Write("Elf: booting..."); + Emu.Load(); + ConLog.Write("Game: boot done."); + return; + } } - else if(wxFile::Access(elf1, wxFile::read)) - { - Emu.SetPath(elf1); - ConLog.Write("Elf: booting..."); - } - else if(wxFile::Access(elf2, wxFile::read)) - { - Emu.SetPath(elf2); - ConLog.Write("Elf: booting..."); - } - else if(wxFile::Access(self0, wxFile::read)) - { - goto _ELF_NOT_FOUND_; - Emu.SetPath(self0); - ConLog.Warning("Self: booting..."); - } - else if(wxFile::Access(self1, wxFile::read)) - { - goto _ELF_NOT_FOUND_; - Emu.SetPath(self1); - ConLog.Warning("Self: booting..."); - } - else if(wxFile::Access(self2, wxFile::read)) - { - goto _ELF_NOT_FOUND_; - Emu.SetPath(self2); - ConLog.Warning("Self: booting..."); - } - else - { - ConLog.Error("Not found ps3 game in selected folder! (%s)", ctrl.GetPath()); - return; - } - - Emu.Load(); - - ConLog.Write("Game: boot done."); + + ConLog.Error("Ps3 executable not found in selected folder (%s)", ctrl.GetPath()); return; - -_ELF_NOT_FOUND_: - ConLog.Error("Elf not found!"); } void MainFrame::BootElf(wxCommandEvent& WXUNUSED(event)) From 9b921f3c2db28fac8e54cecf2a2d2d58a1ff6243 Mon Sep 17 00:00:00 2001 From: Cornee Traas Date: Thu, 5 Sep 2013 09:45:46 +0200 Subject: [PATCH 8/9] Update .gitignore --- .gitignore | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 35e0f69d2c..8055e8c2e3 100644 --- a/.gitignore +++ b/.gitignore @@ -33,8 +33,7 @@ /rpcs3/Debug /rpcs3/Release -/wxWidgets/lib/vc_lib/mswd/wx/msw/rcdefs.h -/wxWidgets/lib/vc_lib/mswd/wx/setup.h +/wxWidgets/lib /bin/rpcs3.ini /bin/FragmentProgram.txt /bin/VertexProgram.txt From eefd175900ccda4a9c8043610c340e1447c3c8eb Mon Sep 17 00:00:00 2001 From: Cornee Traas Date: Thu, 5 Sep 2013 10:06:59 +0200 Subject: [PATCH 9/9] Fix more spelling mistakes --- rpcs3/Emu/System.cpp | 2 +- rpcs3/Gui/InterpreterDisAsm.cpp | 2 +- rpcs3/Gui/MainFrame.cpp | 20 ++++++++++---------- rpcs3/rpcs3.h | 2 +- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/rpcs3/Emu/System.cpp b/rpcs3/Emu/System.cpp index d518a6403a..31b8fb556b 100644 --- a/rpcs3/Emu/System.cpp +++ b/rpcs3/Emu/System.cpp @@ -268,7 +268,7 @@ void Emulator::Stop() Memory.Close(); //if(m_memory_viewer && m_memory_viewer->IsShown()) m_memory_viewer->Hide(); - wxGetApp().SendDbgCommand(DID_STOPED_EMU); + wxGetApp().SendDbgCommand(DID_STOPPED_EMU); } void Emulator::SavePoints(const wxString& path) diff --git a/rpcs3/Gui/InterpreterDisAsm.cpp b/rpcs3/Gui/InterpreterDisAsm.cpp index 7e5ee3e304..346a03810c 100644 --- a/rpcs3/Gui/InterpreterDisAsm.cpp +++ b/rpcs3/Gui/InterpreterDisAsm.cpp @@ -301,7 +301,7 @@ void InterpreterDisAsmFrame::HandleCommand(wxCommandEvent& event) { switch(event.GetId()) { - case DID_STOPED_EMU: + case DID_STOPPED_EMU: UpdateUnitList(); break; diff --git a/rpcs3/Gui/MainFrame.cpp b/rpcs3/Gui/MainFrame.cpp index c6698ce399..d5d5a02530 100644 --- a/rpcs3/Gui/MainFrame.cpp +++ b/rpcs3/Gui/MainFrame.cpp @@ -126,19 +126,19 @@ void MainFrame::DoSettings(bool load) void MainFrame::BootGame(wxCommandEvent& WXUNUSED(event)) { - bool stoped = false; + bool stopped = false; if(Emu.IsRunning()) { Emu.Pause(); - stoped = true; + stopped = true; } wxDirDialog ctrl(this, L"Select game folder", wxEmptyString); if(ctrl.ShowModal() == wxID_CANCEL) { - if(stoped) Emu.Resume(); + if(stopped) Emu.Resume(); return; } @@ -171,12 +171,12 @@ void MainFrame::BootGame(wxCommandEvent& WXUNUSED(event)) void MainFrame::BootElf(wxCommandEvent& WXUNUSED(event)) { - bool stoped = false; + bool stopped = false; if(Emu.IsRunning()) { Emu.Pause(); - stoped = true; + stopped = true; } wxFileDialog ctrl(this, L"Select ELF", wxEmptyString, wxEmptyString, "*.*", @@ -184,7 +184,7 @@ void MainFrame::BootElf(wxCommandEvent& WXUNUSED(event)) if(ctrl.ShowModal() == wxID_CANCEL) { - if(stoped) Emu.Resume(); + if(stopped) Emu.Resume(); return; } @@ -200,12 +200,12 @@ void MainFrame::BootElf(wxCommandEvent& WXUNUSED(event)) void MainFrame::BootSelf(wxCommandEvent& WXUNUSED(event)) { - bool stoped = false; + bool stopped = false; if(Emu.IsRunning()) { Emu.Pause(); - stoped = true; + stopped = true; } wxFileDialog ctrl(this, L"Select SELF", wxEmptyString, wxEmptyString, "*.*", @@ -213,7 +213,7 @@ void MainFrame::BootSelf(wxCommandEvent& WXUNUSED(event)) if(ctrl.ShowModal() == wxID_CANCEL) { - if(stoped) Emu.Resume(); + if(stopped) Emu.Resume(); return; } @@ -394,7 +394,7 @@ void MainFrame::UpdateUI(wxCommandEvent& event) break; case DID_STOP_EMU: - case DID_STOPED_EMU: + case DID_STOPPED_EMU: is_running = false; is_stopped = true; is_ready = false; diff --git a/rpcs3/rpcs3.h b/rpcs3/rpcs3.h index 6d1ff5911a..94dddbae9b 100644 --- a/rpcs3/rpcs3.h +++ b/rpcs3/rpcs3.h @@ -24,7 +24,7 @@ enum DbgCommand DID_START_EMU, DID_STARTED_EMU, DID_STOP_EMU, - DID_STOPED_EMU, + DID_STOPPED_EMU, DID_PAUSE_EMU, DID_PAUSED_EMU, DID_RESUME_EMU,