Various changes
- Fix the config dir - Configure the stack size - Replace `__lv2ppu__` with a custom `PS3` define - Test some other compilation flags
This commit is contained in:
parent
9619220525
commit
82f41ceabc
@ -305,6 +305,7 @@ if(DEFINED SWITCH)
|
||||
endif()
|
||||
|
||||
if(DEFINED PS3)
|
||||
add_definitions(-DPS3)
|
||||
set(BUILD_GLES2 OFF CACHE BOOL "Build with OpenGL|ES 2" FORCE)
|
||||
set(BUILD_GLES3 OFF CACHE BOOL "Build with OpenGL|ES 3" FORCE)
|
||||
set(USE_ELF OFF)
|
||||
|
@ -78,7 +78,7 @@ typedef intptr_t ssize_t;
|
||||
typedef intptr_t ssize_t;
|
||||
#endif
|
||||
|
||||
#if defined(PSP2) || defined(__lv2ppu__)
|
||||
#if defined(PSP2) || defined(PS3)
|
||||
// For PATH_MAX on modern toolchains
|
||||
#include <sys/syslimits.h>
|
||||
#endif
|
||||
|
@ -21,7 +21,7 @@ CXX_GUARD_START
|
||||
#include <mgba-util/platform/3ds/threading.h>
|
||||
#elif defined(__SWITCH__)
|
||||
#include <mgba-util/platform/switch/threading.h>
|
||||
#elif defined(__lv2ppu__)
|
||||
#elif defined(PS3)
|
||||
#include <mgba-util/platform/ps3/threading.h>
|
||||
#else
|
||||
#define DISABLE_THREADING
|
||||
|
@ -99,7 +99,7 @@ struct VDir* VDirOpenZip(const char* path, int flags);
|
||||
struct VDir* VDirOpen7z(const char* path, int flags);
|
||||
#endif
|
||||
|
||||
#if defined(__wii__) || defined(__3DS__) || defined(PSP2) || defined(__lv2ppu__)
|
||||
#if defined(__wii__) || defined(__3DS__) || defined(PSP2) || defined(PS3)
|
||||
struct VDir* VDeviceList(void);
|
||||
#endif
|
||||
|
||||
|
@ -258,6 +258,9 @@ void mCoreConfigDirectory(char* out, size_t outLength) {
|
||||
#elif defined(PSP2)
|
||||
snprintf(out, outLength, "ux0:data/%s", projectName);
|
||||
sceIoMkdir(out, 0777);
|
||||
#elif defined(PS3)
|
||||
snprintf(out, outLength, "/dev_hdd0/%s", projectName);
|
||||
mkdir(out, 0777);
|
||||
#elif defined(GEKKO) || defined(__SWITCH__)
|
||||
snprintf(out, outLength, "/%s", projectName);
|
||||
mkdir(out, 0777);
|
||||
@ -297,7 +300,7 @@ void mCoreConfigPortableIniPath(char* out, size_t outLength) {
|
||||
}
|
||||
WideCharToMultiByte(CP_UTF8, 0, wpath, -1, out, outLength, 0, 0);
|
||||
StringCchCatA(out, outLength, PATH_SEP "portable.ini");
|
||||
#elif defined(PSP2) || defined(GEKKO) || defined(__SWITCH__) || defined(__3DS__) || defined(__lv2ppu__)
|
||||
#elif defined(PSP2) || defined(GEKKO) || defined(__SWITCH__) || defined(__3DS__) || defined(PS3)
|
||||
UNUSED(outLength);
|
||||
out[0] = '\0';
|
||||
#else
|
||||
|
@ -205,7 +205,7 @@ bool mArgumentsParse(struct mArguments* args, int argc, char* const* argv, struc
|
||||
} else if (argc == 1) {
|
||||
args->fname = strdup(argv[0]);
|
||||
} else {
|
||||
#ifdef __lv2ppu__
|
||||
#ifdef PS3
|
||||
args->fname = "/dev_hdd0/mGBA/rom.gba";
|
||||
#else
|
||||
args->fname = NULL;
|
||||
|
@ -3,7 +3,6 @@
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
#ifndef __lv2ppu__ // threads cause issues on PS3, do not include this file
|
||||
#include <mgba/internal/gba/sio/dolphin.h>
|
||||
|
||||
#include <mgba/internal/gba/gba.h>
|
||||
@ -216,4 +215,3 @@ int32_t _processCommand(struct GBASIODolphin* dol, uint32_t cyclesLate) {
|
||||
bool GBASIODolphinIsConnected(struct GBASIODolphin* dol) {
|
||||
return dol->data != INVALID_SOCKET;
|
||||
}
|
||||
#endif
|
@ -12,7 +12,7 @@
|
||||
#if __has_feature(address_sanitizer)
|
||||
#define DISABLE_ANON_MMAP
|
||||
#endif
|
||||
#ifdef __lv2ppu__
|
||||
#ifdef PS3
|
||||
#define DISABLE_ANON_MMAP
|
||||
#endif
|
||||
#endif
|
||||
|
@ -29,11 +29,11 @@ set(CMAKE_SYSTEM_PROCESSOR powerpc)
|
||||
set(CMAKE_C_COMPILER ppu-gcc)
|
||||
set(CMAKE_CXX_COMPILER ppu-g++)
|
||||
|
||||
set(MACHDEP "-mhard-float -fmodulo-sched -ffunction-sections -fdata-sections")
|
||||
set(MACHDEP "-mcpu=cell -mno-fp-in-toc -mno-sum-in-toc -mregnames -mhard-float -fmodulo-sched -ffunction-sections -fdata-sections")
|
||||
|
||||
set(INCLUDES "-I${PS3DEV}/ppu/include -I${PS3DEV}/portlibs/ppu/include")
|
||||
set(PPU_CFLAGS "-mcpu=cell -mregnames -Wall ${MACHDEP} ${INCLUDES} -Wa,-mcell")
|
||||
set(PPU_LDFLAGS "-mcpu=cell -mregnames -Wall ${MACHDEP} -Wl,--gc-sections -L${PS3DEV}/ppu/lib -L${PS3DEV}/portlibs/ppu/lib")
|
||||
set(PPU_CFLAGS "-Wall ${MACHDEP} ${INCLUDES} -Wa,-mcell")
|
||||
set(PPU_LDFLAGS "-Wall ${MACHDEP} -Wl,--gc-sections -L${PS3DEV}/ppu/lib -L${PS3DEV}/portlibs/ppu/lib")
|
||||
set(PPU_CXXFLAGS "-D_GLIBCXX11_USE_C99_STDIO ${PPU_CFLAGS}")
|
||||
|
||||
set(CMAKE_FIND_ROOT_PATH ${PS3DEV} ${PS3DEV}/ppu ${PS3DEV}/portlibs/ppu)
|
||||
@ -44,7 +44,7 @@ set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||
SET_PROPERTY(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS TRUE)
|
||||
|
||||
set(CMAKE_C_FLAGS ${PPU_CFLAGS})
|
||||
set(ASFLAGS "${MACHDEP} -mcpu=cell -mregnames -D__ASSEMBLY__ -Wa,-mcell ${INCLUDES}")
|
||||
set(ASFLAGS "${MACHDEP} -D__ASSEMBLY__ -Wa,-mcell ${INCLUDES}")
|
||||
set(CMAKE_CXX_FLAGS ${PPU_CXXFLAGS})
|
||||
set(CMAKE_EXE_LINKER_FLAGS ${PPU_LDFLAGS})
|
||||
|
||||
|
@ -30,6 +30,12 @@
|
||||
#include <errno.h>
|
||||
#include <signal.h>
|
||||
|
||||
#if defined(PS3)
|
||||
#include <sys/process.h>
|
||||
|
||||
SYS_PROCESS_PARAM(1001, 0x200000)
|
||||
#endif
|
||||
|
||||
#define PORT "sdl"
|
||||
|
||||
static void mSDLDeinit(struct mSDLRenderer* renderer);
|
||||
|
Loading…
x
Reference in New Issue
Block a user