mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-01-30 12:32:43 +00:00
commit
5c563d04c7
@ -10,21 +10,29 @@ if (CMAKE_COMPILER_IS_GNUCXX)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules)
|
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules)
|
||||||
SET(EXECUTABLE_OUTPUT_PATH "${CMAKE_SOURCE_DIR}/../bin")
|
set(EXECUTABLE_OUTPUT_PATH "${CMAKE_SOURCE_DIR}/../bin")
|
||||||
|
|
||||||
add_definitions(-DGL_GLEXT_PROTOTYPES)
|
add_definitions(-DGL_GLEXT_PROTOTYPES)
|
||||||
add_definitions(-DGLX_GLXEXT_PROTOTYPES)
|
add_definitions(-DGLX_GLXEXT_PROTOTYPES)
|
||||||
|
|
||||||
find_package(wxWidgets COMPONENTS core base net aui gl REQUIRED)
|
find_package(wxWidgets COMPONENTS core base net aui gl REQUIRED)
|
||||||
|
find_package(GLEW REQUIRED)
|
||||||
find_package(OpenGL REQUIRED)
|
find_package(OpenGL REQUIRED)
|
||||||
find_package(FFMPEG REQUIRED)
|
|
||||||
find_package(ZLIB REQUIRED)
|
find_package(ZLIB REQUIRED)
|
||||||
|
find_package(OpenAL REQUIRED)
|
||||||
|
|
||||||
include("${wxWidgets_USE_FILE}")
|
include("${wxWidgets_USE_FILE}")
|
||||||
|
|
||||||
|
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||||
|
set(PLATFORM_ARCH "linux/x86_64")
|
||||||
|
else()
|
||||||
|
set(PLATFORM_ARCH "linux/x86")
|
||||||
|
endif()
|
||||||
|
|
||||||
include_directories(
|
include_directories(
|
||||||
${wxWidgets_INCLUDE_DIRS}
|
${wxWidgets_INCLUDE_DIRS}
|
||||||
${FFMPEG_INCLUDE_DIR}
|
${OPENAL_INCLUDE_DIR}
|
||||||
|
${CMAKE_SOURCE_DIR}/../ffmpeg/${PLATFORM_ARCH}/include
|
||||||
${CMAKE_SOURCE_DIR}
|
${CMAKE_SOURCE_DIR}
|
||||||
${CMAKE_SOURCE_DIR}/Emu
|
${CMAKE_SOURCE_DIR}/Emu
|
||||||
${CMAKE_SOURCE_DIR}/Gui
|
${CMAKE_SOURCE_DIR}/Gui
|
||||||
@ -33,6 +41,8 @@ ${CMAKE_SOURCE_DIR}/Crypto
|
|||||||
${CMAKE_SOURCE_DIR}/..
|
${CMAKE_SOURCE_DIR}/..
|
||||||
)
|
)
|
||||||
|
|
||||||
|
link_directories(${CMAKE_SOURCE_DIR}/../ffmpeg/${PLATFORM_ARCH}/lib)
|
||||||
|
|
||||||
file(
|
file(
|
||||||
GLOB_RECURSE
|
GLOB_RECURSE
|
||||||
RPCS3_SRC
|
RPCS3_SRC
|
||||||
@ -48,5 +58,5 @@ ${CMAKE_SOURCE_DIR}/../Utilities/*
|
|||||||
|
|
||||||
add_executable(rpcs3 ${RPCS3_SRC})
|
add_executable(rpcs3 ${RPCS3_SRC})
|
||||||
|
|
||||||
target_link_libraries(rpcs3 ${wxWidgets_LIBRARIES} ${OPENGL_LIBRARIES} ${ZLIB_LIBRARIES} ${FFMPEG_LIBRARIES})
|
target_link_libraries(rpcs3 ${wxWidgets_LIBRARIES} ${OPENAL_LIBRARY} ${GLEW_LIBRARIES} ${OPENGL_LIBRARIES} libavformat.a libavcodec.a libavutil.a libswresample.a libswscale.a ${ZLIB_LIBRARIES})
|
||||||
|
|
||||||
|
@ -526,7 +526,7 @@ static const s32 MAX_INT_VALUE = 0x7fffffff;
|
|||||||
class PPUThread : public PPCThread
|
class PPUThread : public PPCThread
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
std::atomic<u32> owned_mutexes;
|
u32 owned_mutexes;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
PPCdouble FPR[32]; //Floating Point Register
|
PPCdouble FPR[32]; //Floating Point Register
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
#include "GLGSRender.h"
|
#include "GLGSRender.h"
|
||||||
#include "Emu/Cell/PPCInstrTable.h"
|
#include "Emu/Cell/PPCInstrTable.h"
|
||||||
#include "Gui/RSXDebugger.h"
|
#include "Gui/RSXDebugger.h"
|
||||||
#include "OpenGL.h"
|
|
||||||
|
|
||||||
#define CMD_DEBUG 0
|
#define CMD_DEBUG 0
|
||||||
#define DUMP_VERTEX_DATA 0
|
#define DUMP_VERTEX_DATA 0
|
||||||
@ -650,10 +649,11 @@ void GLGSRender::OnInitThread()
|
|||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
glSwapInterval(Ini.GSVSyncEnable.GetValue() ? 1 : 0);
|
glSwapInterval(Ini.GSVSyncEnable.GetValue() ? 1 : 0);
|
||||||
#else
|
// Undefined reference: glXSwapIntervalEXT
|
||||||
|
/*#else
|
||||||
if (GLXDrawable drawable = glXGetCurrentDrawable()){
|
if (GLXDrawable drawable = glXGetCurrentDrawable()){
|
||||||
glXSwapIntervalEXT(glXGetCurrentDisplay(), drawable, Ini.GSVSyncEnable.GetValue() ? 1 : 0);
|
glXSwapIntervalEXT(glXGetCurrentDisplay(), drawable, Ini.GSVSyncEnable.GetValue() ? 1 : 0);
|
||||||
}
|
}*/
|
||||||
#endif
|
#endif
|
||||||
glGenTextures(1, &g_depth_tex);
|
glGenTextures(1, &g_depth_tex);
|
||||||
glGenTextures(1, &g_flip_tex);
|
glGenTextures(1, &g_flip_tex);
|
||||||
|
@ -1,11 +1,9 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include "Emu/GS/GSRender.h"
|
#include "Emu/GS/GSRender.h"
|
||||||
#include "Emu/GS/RSXThread.h"
|
#include "Emu/GS/RSXThread.h"
|
||||||
#include <wx/glcanvas.h>
|
|
||||||
#include "GLBuffers.h"
|
#include "GLBuffers.h"
|
||||||
#include "GLProgram.h"
|
|
||||||
#include "OpenGL.h"
|
|
||||||
#include "GLProgramBuffer.h"
|
#include "GLProgramBuffer.h"
|
||||||
|
#include <wx/glcanvas.h>
|
||||||
|
|
||||||
#pragma comment(lib, "opengl32.lib")
|
#pragma comment(lib, "opengl32.lib")
|
||||||
|
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
#ifndef _WIN32
|
||||||
|
#include <GL/glew.h>
|
||||||
|
#endif
|
||||||
#include <GL/gl.h>
|
#include <GL/gl.h>
|
||||||
#include "GL/glext.h"
|
#include "GL/glext.h"
|
||||||
|
|
||||||
|
@ -2,7 +2,10 @@
|
|||||||
#include "Emu/SysCalls/SysCalls.h"
|
#include "Emu/SysCalls/SysCalls.h"
|
||||||
#include "Emu/SysCalls/SC_FUNC.h"
|
#include "Emu/SysCalls/SC_FUNC.h"
|
||||||
|
|
||||||
|
// Requires GCC 4.10 apparently..
|
||||||
|
#ifdef _MSC_VER
|
||||||
#include <codecvt>
|
#include <codecvt>
|
||||||
|
#endif
|
||||||
|
|
||||||
void cellL10n_init();
|
void cellL10n_init();
|
||||||
Module cellL10n(0x001e, cellL10n_init);
|
Module cellL10n(0x001e, cellL10n_init);
|
||||||
@ -26,7 +29,7 @@ int UTF16stoUTF8s(mem16_ptr_t utf16, mem64_t utf16_len, mem8_ptr_t utf8, mem64_t
|
|||||||
|
|
||||||
std::u16string wstr =(char16_t*)Memory.VirtualToRealAddr(utf16);
|
std::u16string wstr =(char16_t*)Memory.VirtualToRealAddr(utf16);
|
||||||
wstr.resize(utf16_len.GetValue()); // TODO: Is this really the role of utf16_len in this function?
|
wstr.resize(utf16_len.GetValue()); // TODO: Is this really the role of utf16_len in this function?
|
||||||
|
#ifdef _MSC_VER
|
||||||
std::wstring_convert<std::codecvt_utf8_utf16<char16_t>,char16_t> convert;
|
std::wstring_convert<std::codecvt_utf8_utf16<char16_t>,char16_t> convert;
|
||||||
std::string str = convert.to_bytes(wstr);
|
std::string str = convert.to_bytes(wstr);
|
||||||
|
|
||||||
@ -36,6 +39,7 @@ int UTF16stoUTF8s(mem16_ptr_t utf16, mem64_t utf16_len, mem8_ptr_t utf8, mem64_t
|
|||||||
|
|
||||||
utf8_len = str.size();
|
utf8_len = str.size();
|
||||||
Memory.WriteString(utf8, str.c_str());
|
Memory.WriteString(utf8, str.c_str());
|
||||||
|
#endif
|
||||||
return ConversionOK;
|
return ConversionOK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -208,4 +212,4 @@ void cellL10n_init()
|
|||||||
// cellL10n.AddFunc(0xf9b1896d, SJISstoUCS2s);
|
// cellL10n.AddFunc(0xf9b1896d, SJISstoUCS2s);
|
||||||
// cellL10n.AddFunc(0xfa4a675a, BIG5stoUCS2s);
|
// cellL10n.AddFunc(0xfa4a675a, BIG5stoUCS2s);
|
||||||
// cellL10n.AddFunc(0xfdbf6ac5, UTF8stoUCS2s);
|
// cellL10n.AddFunc(0xfdbf6ac5, UTF8stoUCS2s);
|
||||||
}
|
}
|
||||||
|
@ -87,7 +87,8 @@ struct CellSpursTraceInfo
|
|||||||
//u8 padding[];
|
//u8 padding[];
|
||||||
};
|
};
|
||||||
|
|
||||||
__declspec(align(8)) struct CellTraceHeader
|
//__declspec(align(8))
|
||||||
|
struct CellTraceHeader
|
||||||
{
|
{
|
||||||
u8 tag;
|
u8 tag;
|
||||||
u8 length;
|
u8 length;
|
||||||
@ -135,17 +136,20 @@ struct CellSpursTracePacket
|
|||||||
} data;
|
} data;
|
||||||
};
|
};
|
||||||
|
|
||||||
__declspec(align(128)) struct CellSpurs
|
//__declspec(align(128))
|
||||||
|
struct CellSpurs
|
||||||
{
|
{
|
||||||
u8 skip[CELL_SPURS_SIZE];
|
u8 skip[CELL_SPURS_SIZE];
|
||||||
};
|
};
|
||||||
|
|
||||||
__declspec(align(128)) struct CellSpurs2
|
//__declspec(align(128))
|
||||||
|
struct CellSpurs2
|
||||||
{
|
{
|
||||||
u8 skip[CELL_SPURS_SIZE2 - CELL_SPURS_SIZE];
|
u8 skip[CELL_SPURS_SIZE2 - CELL_SPURS_SIZE];
|
||||||
};
|
};
|
||||||
|
|
||||||
__declspec(align(8)) struct CellSpursAttribute
|
//__declspec(align(8))
|
||||||
|
struct CellSpursAttribute
|
||||||
{
|
{
|
||||||
u8 skip[CELL_SPURS_ATTRIBUTE_SIZE];
|
u8 skip[CELL_SPURS_ATTRIBUTE_SIZE];
|
||||||
};
|
};
|
||||||
@ -184,7 +188,8 @@ enum
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
__declspec(align(128)) struct CellSpursTaskset
|
//__declspec(align(128))
|
||||||
|
struct CellSpursTaskset
|
||||||
{
|
{
|
||||||
u8 skip[6400];
|
u8 skip[6400];
|
||||||
};
|
};
|
||||||
@ -217,7 +222,8 @@ struct CellSpursTasksetInfo
|
|||||||
#define CELL_SPURS_TASKSET_SIZE CELL_SPURS_TASKSET_CLASS0_SIZE
|
#define CELL_SPURS_TASKSET_SIZE CELL_SPURS_TASKSET_CLASS0_SIZE
|
||||||
*/
|
*/
|
||||||
|
|
||||||
__declspec(align(128)) struct CellSpursTaskset2
|
//__declspec(align(128))
|
||||||
|
struct CellSpursTaskset2
|
||||||
{
|
{
|
||||||
be_t<u8> skip[10496];
|
be_t<u8> skip[10496];
|
||||||
};
|
};
|
||||||
@ -267,7 +273,8 @@ struct CellSpursTaskAttribute2
|
|||||||
//be_t<u32> __reserved__[];
|
//be_t<u32> __reserved__[];
|
||||||
};
|
};
|
||||||
|
|
||||||
__declspec(align(128)) struct CellSpursTaskExitCode
|
//__declspec(align(128))
|
||||||
|
struct CellSpursTaskExitCode
|
||||||
{
|
{
|
||||||
unsigned char skip[128];
|
unsigned char skip[128];
|
||||||
};
|
};
|
||||||
|
@ -93,12 +93,12 @@ bool Emulator::BootGame(const std::string& path)
|
|||||||
{
|
{
|
||||||
static const char* elf_path[6] =
|
static const char* elf_path[6] =
|
||||||
{
|
{
|
||||||
"\\PS3_GAME\\USRDIR\\BOOT.BIN",
|
"/PS3_GAME/USRDIR/BOOT.BIN",
|
||||||
"\\USRDIR\\BOOT.BIN",
|
"/USRDIR/BOOT.BIN",
|
||||||
"\\BOOT.BIN",
|
"/BOOT.BIN",
|
||||||
"\\PS3_GAME\\USRDIR\\EBOOT.BIN",
|
"/PS3_GAME/USRDIR/EBOOT.BIN",
|
||||||
"\\USRDIR\\EBOOT.BIN",
|
"/USRDIR/EBOOT.BIN",
|
||||||
"\\EBOOT.BIN",
|
"/EBOOT.BIN",
|
||||||
};
|
};
|
||||||
|
|
||||||
for(int i=0; i<sizeof(elf_path) / sizeof(*elf_path);i++)
|
for(int i=0; i<sizeof(elf_path) / sizeof(*elf_path);i++)
|
||||||
@ -128,11 +128,11 @@ void Emulator::Load()
|
|||||||
|
|
||||||
if(wxFileName(m_path).GetFullName().CmpNoCase("EBOOT.BIN") == 0)
|
if(wxFileName(m_path).GetFullName().CmpNoCase("EBOOT.BIN") == 0)
|
||||||
{
|
{
|
||||||
elf_path += "\\BOOT.BIN";
|
elf_path += "/BOOT.BIN";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
elf_path += "\\" + wxFileName(m_path).GetName() + ".elf";
|
elf_path += "/" + wxFileName(m_path).GetName() + ".elf";
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!DecryptSelf(elf_path, self_path))
|
if(!DecryptSelf(elf_path, self_path))
|
||||||
|
@ -152,7 +152,7 @@ Ini::Ini()
|
|||||||
{
|
{
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
m_Config = new wxIniConfig( wxEmptyString, wxEmptyString,
|
m_Config = new wxIniConfig( wxEmptyString, wxEmptyString,
|
||||||
wxGetCwd() + "\\rpcs3.ini",
|
wxGetCwd() + "/rpcs3.ini",
|
||||||
wxEmptyString, wxCONFIG_USE_LOCAL_FILE );
|
wxEmptyString, wxCONFIG_USE_LOCAL_FILE );
|
||||||
#else
|
#else
|
||||||
m_Config = new wxConfig("rpcs3");
|
m_Config = new wxConfig("rpcs3");
|
||||||
|
12
rpcs3/Ini.h
12
rpcs3/Ini.h
@ -132,11 +132,11 @@ public:
|
|||||||
{
|
{
|
||||||
wxString path;
|
wxString path;
|
||||||
|
|
||||||
path = DefPath + "\\" + "CPU";
|
path = DefPath + "/" + "CPU";
|
||||||
CPUDecoderMode.Init("DecoderMode", path);
|
CPUDecoderMode.Init("DecoderMode", path);
|
||||||
CPUIgnoreRWErrors.Init("IgnoreRWErrors", path);
|
CPUIgnoreRWErrors.Init("IgnoreRWErrors", path);
|
||||||
|
|
||||||
path = DefPath + "\\" + "GS";
|
path = DefPath + "/" + "GS";
|
||||||
GSRenderMode.Init("RenderMode", path);
|
GSRenderMode.Init("RenderMode", path);
|
||||||
GSResolution.Init("Resolution", path);
|
GSResolution.Init("Resolution", path);
|
||||||
GSAspectRatio.Init("AspectRatio", path);
|
GSAspectRatio.Init("AspectRatio", path);
|
||||||
@ -145,12 +145,12 @@ public:
|
|||||||
GSDumpColorBuffers.Init("DumpColorBuffers", path);
|
GSDumpColorBuffers.Init("DumpColorBuffers", path);
|
||||||
GSDumpDepthBuffer.Init("DumpDepthBuffer", path);
|
GSDumpDepthBuffer.Init("DumpDepthBuffer", path);
|
||||||
|
|
||||||
path = DefPath + "\\" + "IO";
|
path = DefPath + "/" + "IO";
|
||||||
PadHandlerMode.Init("PadHandlerMode", path);
|
PadHandlerMode.Init("PadHandlerMode", path);
|
||||||
KeyboardHandlerMode.Init("KeyboardHandlerMode", path);
|
KeyboardHandlerMode.Init("KeyboardHandlerMode", path);
|
||||||
MouseHandlerMode.Init("MouseHandlerMode", path);
|
MouseHandlerMode.Init("MouseHandlerMode", path);
|
||||||
|
|
||||||
path = DefPath + "\\" + "ControlSetings";
|
path = DefPath + "/" + "ControlSetings";
|
||||||
PadHandlerLeft.Init("PadHandlerLeft", path);
|
PadHandlerLeft.Init("PadHandlerLeft", path);
|
||||||
PadHandlerDown.Init("PadHandlerDown", path);
|
PadHandlerDown.Init("PadHandlerDown", path);
|
||||||
PadHandlerRight.Init("PadHandlerRight", path);
|
PadHandlerRight.Init("PadHandlerRight", path);
|
||||||
@ -168,11 +168,11 @@ public:
|
|||||||
PadHandlerR2.Init("PadHandlerR2", path);
|
PadHandlerR2.Init("PadHandlerR2", path);
|
||||||
PadHandlerL2.Init("PadHandlerL2", path);
|
PadHandlerL2.Init("PadHandlerL2", path);
|
||||||
|
|
||||||
path = DefPath + "\\" + "Audio";
|
path = DefPath + "/" + "Audio";
|
||||||
AudioOutMode.Init("AudioOutMode", path);
|
AudioOutMode.Init("AudioOutMode", path);
|
||||||
AudioDumpToFile.Init("AudioDumpToFile", path);
|
AudioDumpToFile.Init("AudioDumpToFile", path);
|
||||||
|
|
||||||
path = DefPath + "\\" + "HLE";
|
path = DefPath + "/" + "HLE";
|
||||||
HLELogging.Init("HLELogging", path);
|
HLELogging.Init("HLELogging", path);
|
||||||
HLESaveTTY.Init("HLESaveTTY", path);
|
HLESaveTTY.Init("HLESaveTTY", path);
|
||||||
HLEExitOnStop.Init("HLEExitOnStop", path);
|
HLEExitOnStop.Init("HLEExitOnStop", path);
|
||||||
|
@ -165,7 +165,7 @@ bool Loader::Load()
|
|||||||
/*
|
/*
|
||||||
const wxString& root = wxFileName(wxFileName(m_stream->GetPath()).GetPath()).GetPath();
|
const wxString& root = wxFileName(wxFileName(m_stream->GetPath()).GetPath()).GetPath();
|
||||||
wxString ps3_path;
|
wxString ps3_path;
|
||||||
const wxString& psf_path = root + "\\" + "PARAM.SFO";
|
const wxString& psf_path = root + "/" + "PARAM.SFO";
|
||||||
vfsFile f(psf_path);
|
vfsFile f(psf_path);
|
||||||
if(f.IsOpened())
|
if(f.IsOpened())
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user