diff --git a/Makefile.psl1ght b/Makefile.psl1ght index 59a9d24591..651838394d 100644 --- a/Makefile.psl1ght +++ b/Makefile.psl1ght @@ -2,9 +2,10 @@ ## # Makefile for RetroArch PSL1GHT. ## +RARCH_VERSION = "0.9.7" DEBUG = 0 -HAVE_LOGGER = 0 +HAVE_LOGGER = 1 HAVE_FILE_LOGGER = 0 PC_DEVELOPMENT_IP_ADDRESS = "192.168.1.7" @@ -14,7 +15,11 @@ CC = $(PS3DEV)/ppu/bin/ppu-gcc CXX = $(PS3DEV)/ppu/bin/ppu-g++ LD = $(PS3DEV)/ppu/bin/ppu-ld +CONTENT_ID_FULL = UP0001-SSNE10000_00-0000000000000001 + ELF_TARGET := retroarch_psl1ght.elf +EBOOT_PATH = ps3/pkg/USRDIR/EBOOT.BIN +CORE_PATH = ps3/pkg/USRDIR/cores/CORE.SELF INCLUDE := -I. -I$(PS3DEV)/ppu/include LIBDIRS := -L$(PS3DEV)/ppu/lib -L$(PS3DEV)/portlibs/ppu/lib -L. @@ -22,13 +27,67 @@ LIBDIRS := -L$(PS3DEV)/ppu/lib -L$(PS3DEV)/portlibs/ppu/lib -L. MACHDEP := -D__CELLOS_LV2__ -D__PSL1GHT__ CFLAGS += -Wall $(MACHDEP) $(INCLUDE) LDFLAGS := $(MACHDEP) -LIBS := -lretro_psl1ght -laudio -lGL -lEGL -lrsx -lgcm_sys -lnet -lio -lsysutil -lsysmodule -lm -ljpgdec -lpngdec -llv2 +LIBS := -lretro_psl1ght -laudio -lGL -lEGL -lrsx -lgcm_sys -lnet -lio -lsysutil -lsysmodule -lm -ljpgdec -lpngdec -llv2 -lnet -lnetctl + +# system platform +system_platform = unix +ifeq ($(shell uname -a),) +EXE_EXT = .exe + system_platform = win +else ifneq ($(findstring Darwin,$(shell uname -a)),) + system_platform = osx +else ifneq ($(findstring MINGW,$(shell uname -a)),) + system_platform = win +endif + +PKG_SCRIPT = ps3/ps3py/pkg.py +ifeq ($(shell uname), Linux) +PKG_FINALIZE = package_finalize +MAKE_SELF_WC = make_self_wc +MAKE_SELF = make_self_npdrm +PYTHON2 = python2 +GIT = git +else +PKG_FINALIZE = package_finalize.exe +MAKE_SELF_WC = make_self_wc.exe +MAKE_SELF = make_self_npdrm.exe +PYTHON2 = python2.exe +GIT = git.exe +endif +# system platform +system_platform = unix +ifeq ($(shell uname -a),) +EXE_EXT = .exe + system_platform = win +else ifneq ($(findstring Darwin,$(shell uname -a)),) + system_platform = osx +else ifneq ($(findstring MINGW,$(shell uname -a)),) + system_platform = win +endif + +PKG_SCRIPT = ps3/ps3py/pkg.py +ifeq ($(shell uname), Linux) +PKG_FINALIZE = package_finalize +MAKE_SELF_WC = make_self_wc +MAKE_SELF = make_self_npdrm +PYTHON2 = python2 +GIT = git +else +PKG_FINALIZE = package_finalize.exe +MAKE_SELF_WC = make_self_wc.exe +MAKE_SELF = make_self_npdrm.exe +PYTHON2 = python2.exe +GIT = git.exe +endif + +MAKE_FSELF_NPDRM = $(CELL_SDK)/host-win32/bin/make_fself_npdrm.exe +MAKE_PACKAGE_NPDRM = $(CELL_SDK)/host-win32/bin/make_package_npdrm.exe OBJ = console/griffin/griffin.o console/rzlib/rzlib.o ifeq ($(HAVE_LOGGER), 1) CFLAGS += -DHAVE_LOGGER -CFLAGS += -DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT) +CFLAGS += -Iconsole/logger OBJ += console/logger/logger.o endif @@ -38,7 +97,7 @@ endif RSXGL_DEFINES = -D__RSX__ -DGL3_PROTOTYPES -SHARED_FLAGS := -DHAVE_FILEBROWSER $(RSXGL_DEFINES) -DHAVE_OPENGL -DHAVE_EGL -DHAVE_OPENGL_MODERN -DHAVE_GLSL -DHAVE_VID_CONTEXT -DHAVE_FBO -DHAVE_MOUSE -DHAVE_DEFAULT_RETROPAD_INPUT -DRARCH_CONSOLE -DHAVE_CONFIGFILE=1 -DHAVE_ZLIB -DHAVE_RARCH_MAIN_WRAP -DHAVE_GRIFFIN=1 -DPACKAGE_VERSION=\"0.9.7\" -Dmain=rarch_main -Wno-char-subscripts +SHARED_FLAGS := -DHAVE_FILEBROWSER $(RSXGL_DEFINES) -DHAVE_OPENGL -DHAVE_EGL -DHAVE_OPENGL_MODERN -DHAVE_GLSL -DHAVE_VID_CONTEXT -DHAVE_FBO -DHAVE_MOUSE -DHAVE_DEFAULT_RETROPAD_INPUT -DRARCH_CONSOLE -DHAVE_CONFIGFILE=1 -DHAVE_ZLIB -DHAVE_RARCH_MAIN_WRAP -DHAVE_SYSMODULES -DHAVE_SYSUTILS -DHAVE_GRIFFIN=1 -DHAVE_NETPLAY=1 -DHAVE_SOCKET_LEGACY=1 -DPACKAGE_VERSION=\"0.9.7\" -Dmain=rarch_main -DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT) -Wno-char-subscripts CFLAGS += -std=gnu99 $(SHARED_FLAGS) CXXFLAGS += $(SHARED_FLAGS) @@ -60,6 +119,18 @@ $(ELF_TARGET): $(OBJ) %.o: %.cpp $(CXX) $(CFLAGS) -c -o $@ $< +create-npdrm-core: + $(MAKE_FSELF_NPDRM) $(ELF_TARGET) $(CORE_PATH) + +create-core: + $(MAKE_SELF_WC) $(ELF_TARGET) $(CORE_PATH) + +pkg: $(ELF_TARGET) create-npdrm-core + $(MAKE_PACKAGE_NPDRM) ps3/pkg/package.conf ps3/pkg + +pkg-signed: $(PPU_TARGET) create-core + $(PYTHON2) $(PKG_SCRIPT) --contentid $(CONTENT_ID_FULL) ps3/pkg/ retroarch-ps3-cfw-$(RARCH_VERSION).pkg + clean: rm -f $(ELF_TARGET) rm -f $(OBJ) diff --git a/console/logger/logger.c b/console/logger/logger.c index fba04a0448..ccb02652b4 100644 --- a/console/logger/logger.c +++ b/console/logger/logger.c @@ -15,10 +15,13 @@ */ #ifdef __CELLOS_LV2__ +#include "../../ps3/sdk_defines.h" +#ifndef __PSL1GHT__ #include #include #include #include +#endif #include #include #include diff --git a/gfx/context/egl_ctx.c b/gfx/context/egl_ctx.c index 3d5ab988b0..cebd12fb77 100644 --- a/gfx/context/egl_ctx.c +++ b/gfx/context/egl_ctx.c @@ -150,6 +150,7 @@ void gfx_ctx_set_overscan(void) // Enforce void (*)(void) as it's not really legal to cast void* to fn-pointer. // POSIX allows this, but strict C99 doesn't. +#ifndef __PSL1GHT__ gfx_ctx_proc_t gfx_ctx_get_proc_address(const char *symbol) { rarch_assert(sizeof(void*) == sizeof(void (*)(void))); @@ -160,3 +161,4 @@ gfx_ctx_proc_t gfx_ctx_get_proc_address(const char *symbol) return ret; } +#endif diff --git a/netplay_compat.h b/netplay_compat.h index 669e66bccb..77531d4fb0 100644 --- a/netplay_compat.h +++ b/netplay_compat.h @@ -36,12 +36,14 @@ #include #include #include +#ifndef __PSL1GHT__ #include +#endif #include #include #include -#ifdef __CELLOS_LV2__ +#if defined(__CELLOS_LV2__) && !defined(__PSL1GHT__) #include #include #else diff --git a/ps3/frontend/main.c b/ps3/frontend/main.c index f1c1957a55..63fe53ffd9 100644 --- a/ps3/frontend/main.c +++ b/ps3/frontend/main.c @@ -19,31 +19,9 @@ #include #include -#if defined(__CELLOS_LV2__) && !defined(__PSL1GHT__) -#include -#endif +#include "../sdk_defines.h" + #include -#ifdef HAVE_SYSUTILS -#include -#include -#include -#ifdef HAVE_HDD_CACHE_PARTITION -#include -#endif -#endif - -#if(CELL_SDK_VERSION > 0x340000) -#include -#endif - -#ifdef HAVE_SYSMODULES -#include -#endif -#ifdef HAVE_NETPLAY -#include -#include -#include -#endif #include "../../gfx/context/ps3_ctx.h" #include "../ps3_input.h" @@ -257,8 +235,10 @@ int main(int argc, char *argv[]) #ifdef HAVE_SYSMODULES cellSysmoduleLoadModule(CELL_SYSMODULE_IO); cellSysmoduleLoadModule(CELL_SYSMODULE_FS); +#ifndef __PSL1GHT__ cellSysmoduleLoadModule(CELL_SYSMODULE_SYSUTIL_GAME); cellSysmoduleLoadModule(CELL_SYSMODULE_AVCONF_EXT); +#endif cellSysmoduleLoadModule(CELL_SYSMODULE_PNGDEC); cellSysmoduleLoadModule(CELL_SYSMODULE_JPGDEC); cellSysmoduleLoadModule(CELL_SYSMODULE_NET); @@ -306,7 +286,7 @@ int main(int argc, char *argv[]) input_ps3.post_init(); -#if(CELL_SDK_VERSION > 0x340000) +#if (CELL_SDK_VERSION > 0x340000) && !defined(__PSL1GHT__) if (g_console.screenshots_enable) { #ifdef HAVE_SYSMODULES @@ -398,14 +378,18 @@ begin_shutdown: logger_shutdown(); #endif -#ifdef HAVE_SYSMODULES +#if defined(HAVE_SYSMODULES) +#ifndef __PSL1GHT__ if(g_console.screenshots_enable) cellSysmoduleUnloadModule(CELL_SYSMODULE_SYSUTIL_SCREENSHOT); +#endif cellSysmoduleUnloadModule(CELL_SYSMODULE_JPGDEC); cellSysmoduleUnloadModule(CELL_SYSMODULE_PNGDEC); +#ifndef __PSL1GHT__ cellSysmoduleUnloadModule(CELL_SYSMODULE_AVCONF_EXT); cellSysmoduleUnloadModule(CELL_SYSMODULE_SYSUTIL_GAME); #endif +#endif #ifdef HAVE_HDD_CACHE_PARTITION int ret = cellSysCacheClear(); diff --git a/ps3/ps3_audio.c b/ps3/ps3_audio.c index 7c53fde37f..7821a4bd84 100644 --- a/ps3/ps3_audio.c +++ b/ps3/ps3_audio.c @@ -18,29 +18,11 @@ #include "../general.h" #include -#ifdef __PSL1GHT__ -#include