mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-12 09:48:37 +12:00
Merge branch 'master' of https://github.com/DHrpcs3/rpcs3
This commit is contained in:
commit
b54a33efce
8 changed files with 85 additions and 15 deletions
11
.travis.yml
11
.travis.yml
|
@ -29,6 +29,8 @@ before_install:
|
||||||
aria2c -x 16 http://www.cmake.org/files/v3.0/cmake-3.0.0-Linux-i386.sh &&
|
aria2c -x 16 http://www.cmake.org/files/v3.0/cmake-3.0.0-Linux-i386.sh &&
|
||||||
chmod a+x cmake-3.0.0-Linux-i386.sh &&
|
chmod a+x cmake-3.0.0-Linux-i386.sh &&
|
||||||
sudo ./cmake-3.0.0-Linux-i386.sh --skip-license --prefix=/usr;
|
sudo ./cmake-3.0.0-Linux-i386.sh --skip-license --prefix=/usr;
|
||||||
|
# Add coverall for C++ so coverity could be triggered. Even it should be --coverage and gcov.
|
||||||
|
- sudo pip install cpp-coveralls
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
- git submodule update --init asmjit ffmpeg llvm
|
- git submodule update --init asmjit ffmpeg llvm
|
||||||
|
@ -51,5 +53,12 @@ addons:
|
||||||
build_command: "make -j 4"
|
build_command: "make -j 4"
|
||||||
branch_pattern: coverity_scan
|
branch_pattern: coverity_scan
|
||||||
|
|
||||||
|
# These modifys are from https://github.com/devernay/cminpack/blob/master/.travis.yml
|
||||||
|
# It passed but when coverall it failed.
|
||||||
script:
|
script:
|
||||||
- if [ ${COVERITY_SCAN_BRANCH} != 1 ]; then make -j 4; fi
|
# Add a command to show all the variables now. maybe only useful for debugging travis.
|
||||||
|
- echo "--Shell Export Lists START--" ; export -p; echo "--Shell Export Lists STOP--"
|
||||||
|
- if [ "$COVERITY_SCAN_BRANCH" != 1 ]; then make -j 4; fi
|
||||||
|
after_success:
|
||||||
|
- if [ "$COVERITY_SCAN_BRANCH" != 1 ]; then coveralls --extension .c --extension .cpp --extension .h; fi
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,8 @@
|
||||||
RPCS3
|
RPCS3
|
||||||
=====
|
=====
|
||||||
|
|
||||||
[](https://travis-ci.org/DHrpcs3/rpcs3)
|
[](https://travis-ci.org/RPCS3/rpcs3)
|
||||||
|
[](https://scan.coverity.com/projects/3960)
|
||||||
<a href="https://scan.coverity.com/projects/3960">
|
|
||||||
<img alt="Coverity Scan Build Status"
|
|
||||||
src="https://scan.coverity.com/projects/3960/badge.svg"/>
|
|
||||||
</a>
|
|
||||||
|
|
||||||
[](https://coveralls.io/r/DHrpcs3/rpcs3)
|
[](https://coveralls.io/r/DHrpcs3/rpcs3)
|
||||||
|
|
||||||
An open-source PlayStation 3 emulator/debugger written in C++.
|
An open-source PlayStation 3 emulator/debugger written in C++.
|
||||||
|
|
|
@ -13,7 +13,7 @@ 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 // If not, see http://www.gnu.org/licenses/
|
||||||
|
|
||||||
rem // Official git repository and contact information can be found at
|
rem // Official git repository and contact information can be found at
|
||||||
rem // https://github.com/DHrpcs3/rpcs3 and http://rpcs3.net/.
|
rem // https://github.com/RPCS3/rpcs3 and http://rpcs3.net/.
|
||||||
|
|
||||||
setlocal ENABLEDELAYEDEXPANSION
|
setlocal ENABLEDELAYEDEXPANSION
|
||||||
|
|
||||||
|
|
|
@ -44,8 +44,7 @@ endif()
|
||||||
|
|
||||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||||
#on some Linux distros shm_unlink and similar functions are in librt only
|
#on some Linux distros shm_unlink and similar functions are in librt only
|
||||||
set(ADDITIONAL_LIBS "rt")
|
set(ADDITIONAL_LIBS "rt" "X11")
|
||||||
set(ADDITIONAL_LIBS "X11")
|
|
||||||
elseif(UNIX)
|
elseif(UNIX)
|
||||||
#it seems like glibc includes the iconv functions we use but other libc
|
#it seems like glibc includes the iconv functions we use but other libc
|
||||||
#implementations like the one on OSX don't seem implement them
|
#implementations like the one on OSX don't seem implement them
|
||||||
|
|
|
@ -5,6 +5,8 @@
|
||||||
#include "vfsDeviceLocalFile.h"
|
#include "vfsDeviceLocalFile.h"
|
||||||
#include "Ini.h"
|
#include "Ini.h"
|
||||||
#include "Emu/System.h"
|
#include "Emu/System.h"
|
||||||
|
#include "Utilities/Log.h"
|
||||||
|
#include <sys/stat.h> // To check whether directory exists
|
||||||
|
|
||||||
#undef CreateFile
|
#undef CreateFile
|
||||||
#undef CopyFile
|
#undef CopyFile
|
||||||
|
@ -445,7 +447,15 @@ void VFS::Init(const std::string& path)
|
||||||
|
|
||||||
std::string mpath = entry.path;
|
std::string mpath = entry.path;
|
||||||
// TODO: This shouldn't use current dir
|
// TODO: This shouldn't use current dir
|
||||||
fmt::Replace(mpath, "$(EmulatorDir)", Emu.GetEmulatorPath());
|
// If no value assigned to SysEmulationDirPath in INI, use the path that with executable.
|
||||||
|
if (Ini.SysEmulationDirPathEnable.GetValue())
|
||||||
|
{
|
||||||
|
fmt::Replace(mpath, "$(EmulatorDir)", Ini.SysEmulationDirPath.GetValue());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
fmt::Replace(mpath, "$(EmulatorDir)", Emu.GetEmulatorPath());
|
||||||
|
}
|
||||||
fmt::Replace(mpath, "$(GameDir)", cwd);
|
fmt::Replace(mpath, "$(GameDir)", cwd);
|
||||||
Mount(entry.mount, mpath, dev);
|
Mount(entry.mount, mpath, dev);
|
||||||
}
|
}
|
||||||
|
@ -484,6 +494,34 @@ void VFS::SaveLoadDevices(std::vector<VFSManagerEntry>& res, bool is_load)
|
||||||
entries_count.SaveValue(count);
|
entries_count.SaveValue(count);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Custom EmulationDir.
|
||||||
|
// TODO:: should have a better log that would show results before loading a game?
|
||||||
|
if (Ini.SysEmulationDirPathEnable.GetValue())
|
||||||
|
{
|
||||||
|
std::string EmulationDir = Ini.SysEmulationDirPath.GetValue();
|
||||||
|
if (EmulationDir.empty())
|
||||||
|
Ini.SysEmulationDirPath.SetValue(Emu.GetEmulatorPath());
|
||||||
|
struct stat fstatinfo;
|
||||||
|
if ((stat(EmulationDir.c_str(), &fstatinfo)))
|
||||||
|
{
|
||||||
|
LOG_NOTICE(GENERAL, "Custom EmualtionDir: Tried %s but it doesn't exists. Maybe you add some not needed chars like '\"'?");
|
||||||
|
Ini.SysEmulationDirPathEnable.SetValue(false);
|
||||||
|
}
|
||||||
|
else if (fstatinfo.st_mode & S_IFDIR)
|
||||||
|
LOG_NOTICE(GENERAL, "Custom EmualtionDir: On, Binded $(EmulatorDir) to %s.", EmulationDir);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// If that is not directory turn back to use original one.
|
||||||
|
LOG_NOTICE(GENERAL, "Custom EmulationDir: Cause path %s is not a valid directory.", EmulationDir);
|
||||||
|
Ini.SysEmulationDirPathEnable.SetValue(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// I left this to check again just to catch those failed in directory checks.
|
||||||
|
if (!Ini.SysEmulationDirPathEnable.GetValue())
|
||||||
|
{
|
||||||
|
LOG_NOTICE(GENERAL, "Custom EmualtionDir: Off, Binded $(EmulatorDir) to %s.", Emu.GetEmulatorPath());
|
||||||
|
}
|
||||||
|
|
||||||
for(int i=0; i<count; ++i)
|
for(int i=0; i<count; ++i)
|
||||||
{
|
{
|
||||||
IniEntry<std::string> entry_path;
|
IniEntry<std::string> entry_path;
|
||||||
|
|
|
@ -25,11 +25,9 @@ namespace lwmutex
|
||||||
template<u32 _value>
|
template<u32 _value>
|
||||||
struct const_be_u32_t
|
struct const_be_u32_t
|
||||||
{
|
{
|
||||||
static const u32 value = _value;
|
|
||||||
|
|
||||||
operator const be_t<u32>() const
|
operator const be_t<u32>() const
|
||||||
{
|
{
|
||||||
return be_t<u32>::make(value);
|
return be_t<u32>::make(_value);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -436,6 +436,10 @@ void MainFrame::Config(wxCommandEvent& WXUNUSED(event))
|
||||||
wxCheckBox* chbox_dbg_ap_systemcall = new wxCheckBox(p_hle, wxID_ANY, "Auto Pause at System Call");
|
wxCheckBox* chbox_dbg_ap_systemcall = new wxCheckBox(p_hle, wxID_ANY, "Auto Pause at System Call");
|
||||||
wxCheckBox* chbox_dbg_ap_functioncall = new wxCheckBox(p_hle, wxID_ANY, "Auto Pause at Function Call");
|
wxCheckBox* chbox_dbg_ap_functioncall = new wxCheckBox(p_hle, wxID_ANY, "Auto Pause at Function Call");
|
||||||
|
|
||||||
|
//Custom EmulationDir
|
||||||
|
wxCheckBox* chbox_emulationdir_enable = new wxCheckBox(p_system, wxID_ANY, "Use Path Below as EmulationDir ? (Need Restart)");
|
||||||
|
wxTextCtrl* txt_emulationdir_path = new wxTextCtrl(p_system, wxID_ANY, Emu.GetEmulatorPath());
|
||||||
|
|
||||||
cbox_cpu_decoder->Append("PPU Interpreter");
|
cbox_cpu_decoder->Append("PPU Interpreter");
|
||||||
cbox_cpu_decoder->Append("PPU Interpreter 2");
|
cbox_cpu_decoder->Append("PPU Interpreter 2");
|
||||||
cbox_cpu_decoder->Append("PPU JIT (LLVM)");
|
cbox_cpu_decoder->Append("PPU JIT (LLVM)");
|
||||||
|
@ -533,6 +537,10 @@ void MainFrame::Config(wxCommandEvent& WXUNUSED(event))
|
||||||
chbox_dbg_ap_systemcall ->SetValue(Ini.DBGAutoPauseSystemCall.GetValue());
|
chbox_dbg_ap_systemcall ->SetValue(Ini.DBGAutoPauseSystemCall.GetValue());
|
||||||
chbox_dbg_ap_functioncall->SetValue(Ini.DBGAutoPauseFunctionCall.GetValue());
|
chbox_dbg_ap_functioncall->SetValue(Ini.DBGAutoPauseFunctionCall.GetValue());
|
||||||
|
|
||||||
|
//Custom EmulationDir
|
||||||
|
chbox_emulationdir_enable->SetValue(Ini.SysEmulationDirPathEnable.GetValue());
|
||||||
|
txt_emulationdir_path ->SetValue(Ini.SysEmulationDirPath.GetValue());
|
||||||
|
|
||||||
cbox_cpu_decoder ->SetSelection(Ini.CPUDecoderMode.GetValue() ? Ini.CPUDecoderMode.GetValue() : 0);
|
cbox_cpu_decoder ->SetSelection(Ini.CPUDecoderMode.GetValue() ? Ini.CPUDecoderMode.GetValue() : 0);
|
||||||
cbox_spu_decoder ->SetSelection(Ini.SPUDecoderMode.GetValue() ? Ini.SPUDecoderMode.GetValue() : 0);
|
cbox_spu_decoder ->SetSelection(Ini.SPUDecoderMode.GetValue() ? Ini.SPUDecoderMode.GetValue() : 0);
|
||||||
cbox_gs_render ->SetSelection(Ini.GSRenderMode.GetValue());
|
cbox_gs_render ->SetSelection(Ini.GSRenderMode.GetValue());
|
||||||
|
@ -614,6 +622,10 @@ void MainFrame::Config(wxCommandEvent& WXUNUSED(event))
|
||||||
|
|
||||||
// System
|
// System
|
||||||
s_subpanel_system->Add(s_round_sys_lang, wxSizerFlags().Border(wxALL, 5).Expand());
|
s_subpanel_system->Add(s_round_sys_lang, wxSizerFlags().Border(wxALL, 5).Expand());
|
||||||
|
|
||||||
|
//Custom EmulationDir
|
||||||
|
s_subpanel_system->Add(chbox_emulationdir_enable, wxSizerFlags().Border(wxALL, 5).Expand());
|
||||||
|
s_subpanel_system->Add(txt_emulationdir_path, wxSizerFlags().Border(wxALL, 5).Expand());
|
||||||
|
|
||||||
// Buttons
|
// Buttons
|
||||||
wxBoxSizer* s_b_panel(new wxBoxSizer(wxHORIZONTAL));
|
wxBoxSizer* s_b_panel(new wxBoxSizer(wxHORIZONTAL));
|
||||||
|
@ -667,6 +679,10 @@ void MainFrame::Config(wxCommandEvent& WXUNUSED(event))
|
||||||
Ini.DBGAutoPauseFunctionCall.SetValue(chbox_dbg_ap_functioncall->GetValue());
|
Ini.DBGAutoPauseFunctionCall.SetValue(chbox_dbg_ap_functioncall->GetValue());
|
||||||
Ini.DBGAutoPauseSystemCall.SetValue(chbox_dbg_ap_systemcall->GetValue());
|
Ini.DBGAutoPauseSystemCall.SetValue(chbox_dbg_ap_systemcall->GetValue());
|
||||||
|
|
||||||
|
//Custom EmulationDir
|
||||||
|
Ini.SysEmulationDirPathEnable.SetValue(chbox_emulationdir_enable->GetValue());
|
||||||
|
Ini.SysEmulationDirPath.SetValue(txt_emulationdir_path->GetValue().ToStdString());
|
||||||
|
|
||||||
Ini.Save();
|
Ini.Save();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
15
rpcs3/Ini.h
15
rpcs3/Ini.h
|
@ -163,6 +163,10 @@ public:
|
||||||
IniEntry<bool> DBGAutoPauseSystemCall;
|
IniEntry<bool> DBGAutoPauseSystemCall;
|
||||||
IniEntry<bool> DBGAutoPauseFunctionCall;
|
IniEntry<bool> DBGAutoPauseFunctionCall;
|
||||||
|
|
||||||
|
//Customed EmulationDir
|
||||||
|
IniEntry<std::string> SysEmulationDirPath;
|
||||||
|
IniEntry<bool> SysEmulationDirPathEnable;
|
||||||
|
|
||||||
// Language
|
// Language
|
||||||
IniEntry<u8> SysLanguage;
|
IniEntry<u8> SysLanguage;
|
||||||
|
|
||||||
|
@ -240,6 +244,10 @@ public:
|
||||||
DBGAutoPauseFunctionCall.Init("DBG_AutoPauseFunctionCall", path);
|
DBGAutoPauseFunctionCall.Init("DBG_AutoPauseFunctionCall", path);
|
||||||
DBGAutoPauseSystemCall.Init("DBG_AutoPauseSystemCall", path);
|
DBGAutoPauseSystemCall.Init("DBG_AutoPauseSystemCall", path);
|
||||||
|
|
||||||
|
// Customed EmulationDir
|
||||||
|
SysEmulationDirPath.Init("System_EmulationDir", path);
|
||||||
|
SysEmulationDirPathEnable.Init("System_EmulationDirEnable", path);
|
||||||
|
|
||||||
// Language
|
// Language
|
||||||
SysLanguage.Init("Sytem_SysLanguage", path);
|
SysLanguage.Init("Sytem_SysLanguage", path);
|
||||||
}
|
}
|
||||||
|
@ -316,6 +324,9 @@ public:
|
||||||
// Language
|
// Language
|
||||||
SysLanguage.Load(1);
|
SysLanguage.Load(1);
|
||||||
|
|
||||||
|
// Customed EmulationDir
|
||||||
|
SysEmulationDirPath.Load("");
|
||||||
|
SysEmulationDirPathEnable.Load(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Save()
|
void Save()
|
||||||
|
@ -389,6 +400,10 @@ public:
|
||||||
|
|
||||||
// Language
|
// Language
|
||||||
SysLanguage.Save();
|
SysLanguage.Save();
|
||||||
|
|
||||||
|
// Customed EmulationDir
|
||||||
|
SysEmulationDirPath.Save();
|
||||||
|
SysEmulationDirPathEnable.Save();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue