diff --git a/rpcs3/CMakeLists.txt b/rpcs3/CMakeLists.txt index ba436d5957..b0e9b5eb5d 100644 --- a/rpcs3/CMakeLists.txt +++ b/rpcs3/CMakeLists.txt @@ -10,21 +10,29 @@ if (CMAKE_COMPILER_IS_GNUCXX) endif() 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(-DGLX_GLXEXT_PROTOTYPES) find_package(wxWidgets COMPONENTS core base net aui gl REQUIRED) +find_package(GLEW REQUIRED) find_package(OpenGL REQUIRED) -find_package(FFMPEG REQUIRED) find_package(ZLIB REQUIRED) +find_package(OpenAL REQUIRED) 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( ${wxWidgets_INCLUDE_DIRS} -${FFMPEG_INCLUDE_DIR} +${OPENAL_INCLUDE_DIR} +${CMAKE_SOURCE_DIR}/../ffmpeg/${PLATFORM_ARCH}/include ${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/Emu ${CMAKE_SOURCE_DIR}/Gui @@ -33,6 +41,8 @@ ${CMAKE_SOURCE_DIR}/Crypto ${CMAKE_SOURCE_DIR}/.. ) +link_directories(${CMAKE_SOURCE_DIR}/../ffmpeg/${PLATFORM_ARCH}/lib) + file( GLOB_RECURSE RPCS3_SRC @@ -48,5 +58,5 @@ ${CMAKE_SOURCE_DIR}/../Utilities/* 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}) diff --git a/rpcs3/Emu/Cell/PPUThread.h b/rpcs3/Emu/Cell/PPUThread.h index fbb53bf1ae..0302180399 100644 --- a/rpcs3/Emu/Cell/PPUThread.h +++ b/rpcs3/Emu/Cell/PPUThread.h @@ -526,7 +526,7 @@ static const s32 MAX_INT_VALUE = 0x7fffffff; class PPUThread : public PPCThread { public: - std::atomic owned_mutexes; + u32 owned_mutexes; public: PPCdouble FPR[32]; //Floating Point Register diff --git a/rpcs3/Emu/GS/GL/GLGSRender.cpp b/rpcs3/Emu/GS/GL/GLGSRender.cpp index 9e1b4a6fd0..699e23da97 100644 --- a/rpcs3/Emu/GS/GL/GLGSRender.cpp +++ b/rpcs3/Emu/GS/GL/GLGSRender.cpp @@ -2,7 +2,6 @@ #include "GLGSRender.h" #include "Emu/Cell/PPCInstrTable.h" #include "Gui/RSXDebugger.h" -#include "OpenGL.h" #define CMD_DEBUG 0 #define DUMP_VERTEX_DATA 0 @@ -650,10 +649,11 @@ void GLGSRender::OnInitThread() #ifdef _WIN32 glSwapInterval(Ini.GSVSyncEnable.GetValue() ? 1 : 0); -#else +// Undefined reference: glXSwapIntervalEXT +/*#else if (GLXDrawable drawable = glXGetCurrentDrawable()){ glXSwapIntervalEXT(glXGetCurrentDisplay(), drawable, Ini.GSVSyncEnable.GetValue() ? 1 : 0); - } + }*/ #endif glGenTextures(1, &g_depth_tex); glGenTextures(1, &g_flip_tex); diff --git a/rpcs3/Emu/GS/GL/GLGSRender.h b/rpcs3/Emu/GS/GL/GLGSRender.h index 5f503bde02..4bd83f26e0 100644 --- a/rpcs3/Emu/GS/GL/GLGSRender.h +++ b/rpcs3/Emu/GS/GL/GLGSRender.h @@ -1,11 +1,9 @@ #pragma once #include "Emu/GS/GSRender.h" #include "Emu/GS/RSXThread.h" -#include #include "GLBuffers.h" -#include "GLProgram.h" -#include "OpenGL.h" #include "GLProgramBuffer.h" +#include #pragma comment(lib, "opengl32.lib") diff --git a/rpcs3/Emu/GS/GL/OpenGL.h b/rpcs3/Emu/GS/GL/OpenGL.h index 4089f466e1..5122b47589 100644 --- a/rpcs3/Emu/GS/GL/OpenGL.h +++ b/rpcs3/Emu/GS/GL/OpenGL.h @@ -1,4 +1,7 @@ #pragma once +#ifndef _WIN32 +#include +#endif #include #include "GL/glext.h" diff --git a/rpcs3/Emu/SysCalls/Modules/cellL10n.cpp b/rpcs3/Emu/SysCalls/Modules/cellL10n.cpp index dcf34cd9d7..7745ed224d 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellL10n.cpp +++ b/rpcs3/Emu/SysCalls/Modules/cellL10n.cpp @@ -2,7 +2,10 @@ #include "Emu/SysCalls/SysCalls.h" #include "Emu/SysCalls/SC_FUNC.h" +// Requires GCC 4.10 apparently.. +#ifdef _MSC_VER #include +#endif void 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); wstr.resize(utf16_len.GetValue()); // TODO: Is this really the role of utf16_len in this function? - +#ifdef _MSC_VER std::wstring_convert,char16_t> convert; 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(); Memory.WriteString(utf8, str.c_str()); +#endif return ConversionOK; } @@ -208,4 +212,4 @@ void cellL10n_init() // cellL10n.AddFunc(0xf9b1896d, SJISstoUCS2s); // cellL10n.AddFunc(0xfa4a675a, BIG5stoUCS2s); // cellL10n.AddFunc(0xfdbf6ac5, UTF8stoUCS2s); -} \ No newline at end of file +} diff --git a/rpcs3/Emu/SysCalls/Modules/cellSpurs.h b/rpcs3/Emu/SysCalls/Modules/cellSpurs.h index af9f4c4e6c..bc9f70b848 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellSpurs.h +++ b/rpcs3/Emu/SysCalls/Modules/cellSpurs.h @@ -87,7 +87,8 @@ struct CellSpursTraceInfo //u8 padding[]; }; -__declspec(align(8)) struct CellTraceHeader +//__declspec(align(8)) +struct CellTraceHeader { u8 tag; u8 length; @@ -135,17 +136,20 @@ struct CellSpursTracePacket } data; }; -__declspec(align(128)) struct CellSpurs +//__declspec(align(128)) +struct CellSpurs { u8 skip[CELL_SPURS_SIZE]; }; -__declspec(align(128)) struct CellSpurs2 +//__declspec(align(128)) +struct CellSpurs2 { u8 skip[CELL_SPURS_SIZE2 - CELL_SPURS_SIZE]; }; -__declspec(align(8)) struct CellSpursAttribute +//__declspec(align(8)) +struct CellSpursAttribute { u8 skip[CELL_SPURS_ATTRIBUTE_SIZE]; }; @@ -184,7 +188,8 @@ enum }; -__declspec(align(128)) struct CellSpursTaskset +//__declspec(align(128)) +struct CellSpursTaskset { u8 skip[6400]; }; @@ -217,7 +222,8 @@ struct CellSpursTasksetInfo #define CELL_SPURS_TASKSET_SIZE CELL_SPURS_TASKSET_CLASS0_SIZE */ -__declspec(align(128)) struct CellSpursTaskset2 +//__declspec(align(128)) +struct CellSpursTaskset2 { be_t skip[10496]; }; @@ -267,7 +273,8 @@ struct CellSpursTaskAttribute2 //be_t __reserved__[]; }; -__declspec(align(128)) struct CellSpursTaskExitCode +//__declspec(align(128)) +struct CellSpursTaskExitCode { unsigned char skip[128]; }; diff --git a/rpcs3/Emu/System.cpp b/rpcs3/Emu/System.cpp index 08f356707e..7c92cb7e3d 100644 --- a/rpcs3/Emu/System.cpp +++ b/rpcs3/Emu/System.cpp @@ -93,12 +93,12 @@ bool Emulator::BootGame(const std::string& path) { static const char* elf_path[6] = { - "\\PS3_GAME\\USRDIR\\BOOT.BIN", - "\\USRDIR\\BOOT.BIN", - "\\BOOT.BIN", - "\\PS3_GAME\\USRDIR\\EBOOT.BIN", - "\\USRDIR\\EBOOT.BIN", - "\\EBOOT.BIN", + "/PS3_GAME/USRDIR/BOOT.BIN", + "/USRDIR/BOOT.BIN", + "/BOOT.BIN", + "/PS3_GAME/USRDIR/EBOOT.BIN", + "/USRDIR/EBOOT.BIN", + "/EBOOT.BIN", }; for(int i=0; iGetPath()).GetPath()).GetPath(); wxString ps3_path; - const wxString& psf_path = root + "\\" + "PARAM.SFO"; + const wxString& psf_path = root + "/" + "PARAM.SFO"; vfsFile f(psf_path); if(f.IsOpened()) {