From 8b55ffc5339b5c042c74915bf195996e9580d953 Mon Sep 17 00:00:00 2001 From: Francisco Javier Trujillo Mata Date: Sun, 12 Apr 2020 17:43:09 +0200 Subject: [PATCH 1/2] make it to compile --- Makefile.libretro | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Makefile.libretro b/Makefile.libretro index 2ec6b79..d653c60 100644 --- a/Makefile.libretro +++ b/Makefile.libretro @@ -150,8 +150,8 @@ else ifeq ($(platform), qnx) # PS2 else ifeq ($(platform), ps2) TARGET := $(TARGET_NAME)_libretro_$(platform).a - CC = ee-gcc$(EXE_EXT) - AR = ee-ar$(EXE_EXT) + CC = mips64r5900el-ps2-elf-gcc$(EXE_EXT) + AR = mips64r5900el-ps2-elf-ar$(EXE_EXT) FCEU_DEFINES := -DPATH_MAX=1024 -DINLINE=inline -DPSS_STYLE=1 -DFCEU_VERSION_NUMERIC=9813 -DHAVE_ASPRINTF ENDIANNESS_DEFINES := -DLSB_FIRST -DLOCAL_LE=1 PLATFORM_DEFINES := -DPS2 -D_EE -G0 -DFRONTEND_SUPPORTS_ABGR1555 -DRENDER_GSKIT_PS2 @@ -790,10 +790,10 @@ endif %.o: %.c $(CC) -c $(OBJOUT)$@ $< $(CFLAGS) $(INCFLAGS) -ifeq ($(platform), ps2) -%.o: %.s - ee-as -G0 $< -o $@ -endif +# ifeq ($(platform), ps2) +# %.o: %.s +# mips64r5900el-ps2-elf-as -G0 $< -o $@ +# endif clean-objs: rm -f $(OBJECTS) From c85ab0580054abe211029e95e4272a2233b510b8 Mon Sep 17 00:00:00 2001 From: Francisco Javier Trujillo Mata Date: Mon, 21 Dec 2020 21:58:23 +0100 Subject: [PATCH 2/2] Fix wrong aligment in the buffer --- Makefile.libretro | 5 ----- src/drivers/libretro/libretro.c | 8 ++++++-- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/Makefile.libretro b/Makefile.libretro index d653c60..db37a02 100644 --- a/Makefile.libretro +++ b/Makefile.libretro @@ -790,11 +790,6 @@ endif %.o: %.c $(CC) -c $(OBJOUT)$@ $< $(CFLAGS) $(INCFLAGS) -# ifeq ($(platform), ps2) -# %.o: %.s -# mips64r5900el-ps2-elf-as -G0 $< -o $@ -# endif - clean-objs: rm -f $(OBJECTS) diff --git a/src/drivers/libretro/libretro.c b/src/drivers/libretro/libretro.c index 43536b6..3bac67f 100644 --- a/src/drivers/libretro/libretro.c +++ b/src/drivers/libretro/libretro.c @@ -28,6 +28,10 @@ #include "../../vsuni.h" #include "../../video.h" +#ifdef PSP +#include "pspgu.h" +#endif + #if defined(RENDER_GSKIT_PS2) #include "libretro-common/include/libretro_gskit_ps2.h" #endif @@ -159,8 +163,8 @@ static unsigned opt_showAdvSoundOptions = 0; static unsigned opt_showAdvSystemOptions = 0; int FCEUnetplay; -#ifdef PSP -#include "pspgu.h" + +#if defined(PSP) || defined(PS2) static __attribute__((aligned(16))) uint16_t retro_palette[256]; #else static uint16_t retro_palette[256];