aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorneonloop2021-08-14 00:55:24 +0000
committerneonloop2021-08-14 00:55:24 +0000
commit830d847595e6e7415013b30b08a57519116d49e0 (patch)
tree082d6bc86387c1ec22a8058c94be9e1cf7ee2602
parentd10f04ae3101ddcea792d5534de8f4755cdfa0a5 (diff)
downloadpicoarch-830d847595e6e7415013b30b08a57519116d49e0.tar.gz
picoarch-830d847595e6e7415013b30b08a57519116d49e0.tar.bz2
picoarch-830d847595e6e7415013b30b08a57519116d49e0.zip
Adds basic pcsx_rearmed core support
-rw-r--r--.gitignore1
-rw-r--r--Makefile16
-rw-r--r--patches/pcsx_rearmed/1000-trimui-support.patch59
3 files changed, 74 insertions, 2 deletions
diff --git a/.gitignore b/.gitignore
index fa217e3..599b9c5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -10,5 +10,6 @@ picoarch
/gpsp
/mame2000
/mame2003_plus
+/pcsx_rearmed
/snes9x2002
/snes9x2005
diff --git a/Makefile b/Makefile
index 6abf045..6852980 100644
--- a/Makefile
+++ b/Makefile
@@ -23,12 +23,15 @@ LDFLAGS = -lc -ldl -lgcc -lm -lSDL -lasound -lpng -lz -Wl,--gc-sections -flto
CORES = gambatte gpsp mame2000 snes9x2002 snes9x2005 $(EXTRA_CORES)
gambatte_REPO = https://github.com/libretro/gambatte-libretro
-mame2000_REPO = https://github.com/libretro/mame2000-libretro
-mame2003_plus_REPO = https://github.com/libretro/mame2003-plus-libretro
fbalpha2012_BUILD_PATH = fbalpha2012/svn-current/trunk
fbalpha2012_MAKEFILE = makefile.libretro
+mame2000_REPO = https://github.com/libretro/mame2000-libretro
+mame2003_plus_REPO = https://github.com/libretro/mame2003-plus-libretro
+
+pcsx_rearmed_MAKEFILE = Makefile.libretro
+
ifeq ($(platform), trimui)
OBJS += plat_trimui.o
CFLAGS += -mcpu=arm926ej-s -mtune=arm926ej-s -fno-PIC
@@ -153,6 +156,15 @@ mame2003_plus_ROM_DIR = ARCADE
mame2003_plus_TYPES = zip
mame2003_plus_PAK_NAME = Arcade (MAME 2003-plus)
+pcsx_rearmed_ROM_DIR = PS
+pcsx_rearmed_TYPES = bin,cue,img,mdf,pbp,toc,cbn,m3u,chd
+pcsx_rearmed_PAK_NAME = Sony PlayStation
+define pcsx_rearmed_PAK_EXTRA
+
+needs-swap
+
+endef
+
snes9x2002_ROM_DIR = SFC
snes9x2002_TYPES = smc,fig,sfc,gd3,gd7,dx2,bsx,swc,zip
snes9x2002_PAK_NAME = Super Nintendo
diff --git a/patches/pcsx_rearmed/1000-trimui-support.patch b/patches/pcsx_rearmed/1000-trimui-support.patch
new file mode 100644
index 0000000..2b8c6e6
--- /dev/null
+++ b/patches/pcsx_rearmed/1000-trimui-support.patch
@@ -0,0 +1,59 @@
+diff --git a/Makefile b/Makefile
+index a01c4df..3d08eea 100644
+--- a/Makefile
++++ b/Makefile
+@@ -5,6 +5,8 @@ TARGET ?= pcsx
+ CFLAGS += -Wall -Iinclude -ffast-math
+ ifeq ($(DEBUG), 1)
+ CFLAGS += -O0 -ggdb
++else ifneq (,$(OPTIMIZE))
++CFLAGS += $(OPTIMIZE)
+ else
+ ifeq ($(platform), $(filter $(platform), vita ctr))
+ CFLAGS += -O3 -DNDEBUG
+diff --git a/Makefile.libretro b/Makefile.libretro
+index 1ecd359..7faf5c7 100644
+--- a/Makefile.libretro
++++ b/Makefile.libretro
+@@ -347,6 +347,27 @@ else ifeq ($(platform), rpi4_64)
+ fpic := -fPIC
+ CFLAGS += -march=armv8-a+crc+simd -mtune=cortex-a72 -ftree-vectorize
+
++else ifeq ($(platform), trimui)
++ TARGET := $(TARGET_NAME)_libretro.so
++ CC = $(CROSS_COMPILE)gcc
++ CXX = $(CROSS_COMPILE)g++
++
++ CFLAGS += -mcpu=arm926ej-s -mtune=arm926ej-s
++ CFLAGS += -DGPULIB_USE_MMAP -DGPU_UNAI_USE_INT_DIV_MULTINV
++ CFLAGS += -ffast-math -fdata-sections -ffunction-sections -fsingle-precision-constant -flto -fno-PIC
++ LDFLAGS += -flto
++ ifeq (,$(DEBUG))
++ LDFLAGS += -s
++ endif
++ CPU_ARCH := arm
++ OPTIMIZE := -Ofast -DNDEBUG
++
++ DRC_CACHE_BASE = 0
++ BUILTIN_GPU = unai
++ DYNAREC = ari64
++ ARCH = arm
++ HAVE_NEON = 0
++
+ # Classic Platforms ####################
+ # Platform affix = classic_<ISA>_<µARCH>
+ # Help at https://modmyclassic.com/comp
+@@ -459,6 +480,13 @@ CFLAGS += $(fpic)
+ MAIN_LDFLAGS += -shared
+ MAIN_LDLIBS += $(LIBPTHREAD) $(LIBM) $(LIBDL) $(LIBZ)
+
++ifeq ($(PROFILE), GENERATE)
++ CFLAGS += -fprofile-generate=./profile/gpsp
++ LDFLAGS += -lgcov
++else ifeq ($(PROFILE), APPLY)
++ CFLAGS += -fprofile-use -fprofile-dir=../profile/gpsp -fbranch-probabilities
++endif
++
+ # enable large file support if available
+ ifeq ($(shell $(CC) -E -dD $(CFLAGS) include/arm_features.h | grep __SIZEOF_LONG__ | awk '{print $$3}'),4)
+ CFLAGS += -D_FILE_OFFSET_BITS=64