From 5383063aeaae5b9cb14f0b069940a5ca3bbbd72c Mon Sep 17 00:00:00 2001 From: fewtarius Date: Wed, 20 Apr 2022 17:25:52 -0400 Subject: [PATCH] * Re-add pcsx_rearmed 32bit alongside the 64bit core. --- .../games/libretro/pcsx_rearmed/package.mk | 10 ++++++--- .../patches/{ => aarch64}/RG351MP | 0 .../RG351P/pcsx_rearmed-add_platform.patch | 3 ++- .../pcsx_rearmed/patches/{ => aarch64}/RG351V | 0 .../RG552/pcsx_rearmed-add_platform.patch | 3 ++- .../libretro/pcsx_rearmed/patches/arm/RG351MP | 1 + .../RG351P/pcsx_rearmed-add_platform.patch | 20 ++++++++++++++++++ .../libretro/pcsx_rearmed/patches/arm/RG351V | 1 + .../arm/RG552/pcsx_rearmed-add_platform.patch | 21 +++++++++++++++++++ packages/jelos/sources/scripts/runemu.sh | 2 +- .../ui/emulationstation/config/es_systems.cfg | 3 ++- packages/virtual/arm32/package.mk | 2 +- 12 files changed, 58 insertions(+), 8 deletions(-) rename packages/games/libretro/pcsx_rearmed/patches/{ => aarch64}/RG351MP (100%) rename packages/games/libretro/pcsx_rearmed/patches/{ => aarch64}/RG351P/pcsx_rearmed-add_platform.patch (89%) rename packages/games/libretro/pcsx_rearmed/patches/{ => aarch64}/RG351V (100%) rename packages/games/libretro/pcsx_rearmed/patches/{ => aarch64}/RG552/pcsx_rearmed-add_platform.patch (90%) create mode 120000 packages/games/libretro/pcsx_rearmed/patches/arm/RG351MP create mode 100644 packages/games/libretro/pcsx_rearmed/patches/arm/RG351P/pcsx_rearmed-add_platform.patch create mode 120000 packages/games/libretro/pcsx_rearmed/patches/arm/RG351V create mode 100644 packages/games/libretro/pcsx_rearmed/patches/arm/RG552/pcsx_rearmed-add_platform.patch diff --git a/packages/games/libretro/pcsx_rearmed/package.mk b/packages/games/libretro/pcsx_rearmed/package.mk index dcae3534f..fd99dd9c4 100644 --- a/packages/games/libretro/pcsx_rearmed/package.mk +++ b/packages/games/libretro/pcsx_rearmed/package.mk @@ -1,5 +1,6 @@ # SPDX-License-Identifier: GPL-2.0-or-later # Copyright (C) 2020 Trond Haugland (trondah@gmail.com) +# Copyright (C) 2022-present Fewtarius PKG_NAME="pcsx_rearmed" PKG_VERSION="e24732050e902bd5402b2b7da7c391d2ca8fa799" @@ -12,7 +13,7 @@ PKG_URL="$PKG_SITE/archive/$PKG_VERSION.tar.gz" PKG_DEPENDS_TARGET="toolchain" PKG_SHORTDESC="ARM optimized PCSX fork" PKG_TOOLCHAIN="manual" -PKG_PATCH_DIRS+="${DEVICE}" +PKG_PATCH_DIRS+="${TARGET_ARCH}/${DEVICE}" make_target() { cd ${PKG_BUILD} @@ -25,6 +26,9 @@ make_target() { } makeinstall_target() { - mkdir -p $INSTALL/usr/lib/libretro - cp pcsx_rearmed_libretro.so $INSTALL/usr/lib/libretro/ + ## Install the 64bit core. + mkdir -p ${INSTALL}/usr/lib/libretro + cp pcsx_rearmed_libretro.so ${INSTALL}/usr/lib/libretro/ + ## Install the 32bit core. + cp -vP ${PKG_BUILD}/../../build.${DISTRO}-${DEVICE}.arm/pcsx_rearmed-*/.install_pkg/usr/lib/libretro/pcsx_rearmed_libretro.so ${INSTALL}/usr/lib/libretro/pcsx_rearmed32_libretro.so } diff --git a/packages/games/libretro/pcsx_rearmed/patches/RG351MP b/packages/games/libretro/pcsx_rearmed/patches/aarch64/RG351MP similarity index 100% rename from packages/games/libretro/pcsx_rearmed/patches/RG351MP rename to packages/games/libretro/pcsx_rearmed/patches/aarch64/RG351MP diff --git a/packages/games/libretro/pcsx_rearmed/patches/RG351P/pcsx_rearmed-add_platform.patch b/packages/games/libretro/pcsx_rearmed/patches/aarch64/RG351P/pcsx_rearmed-add_platform.patch similarity index 89% rename from packages/games/libretro/pcsx_rearmed/patches/RG351P/pcsx_rearmed-add_platform.patch rename to packages/games/libretro/pcsx_rearmed/patches/aarch64/RG351P/pcsx_rearmed-add_platform.patch index 08bb94e8e..8e9b4daca 100644 --- a/packages/games/libretro/pcsx_rearmed/patches/RG351P/pcsx_rearmed-add_platform.patch +++ b/packages/games/libretro/pcsx_rearmed/patches/aarch64/RG351P/pcsx_rearmed-add_platform.patch @@ -1,7 +1,7 @@ diff -rupN pcsx_rearmed.orig/Makefile.libretro pcsx_rearmed/Makefile.libretro --- pcsx_rearmed.orig/Makefile.libretro 2022-04-20 07:57:13.327886544 -0400 +++ pcsx_rearmed/Makefile.libretro 2022-04-20 08:01:22.194100092 -0400 -@@ -70,6 +70,15 @@ else ifneq (,$(findstring CortexA73_G12B +@@ -70,6 +70,16 @@ else ifneq (,$(findstring CortexA73_G12B CFLAGS += -fomit-frame-pointer -ffast-math -DARM CPUFLAGS += -march=armv8-a+crc -mfpu=neon-fp-armv8 -mcpu=cortex-a73 -mtune=cortex-a73.cortex-a53 @@ -11,6 +11,7 @@ diff -rupN pcsx_rearmed.orig/Makefile.libretro pcsx_rearmed/Makefile.libretro + SHARED := -shared -Wl,-version-script=link.T + ARCH = arm64 + DYNAREC = ari64 ++ BUILTIN_GPU = peops + CFLAGS += -fomit-frame-pointer -ffast-math -Ofast -DARM + CPUFLAGS += -march=armv8-a+crc -mcpu=cortex-a35 -mtune=cortex-a35 + diff --git a/packages/games/libretro/pcsx_rearmed/patches/RG351V b/packages/games/libretro/pcsx_rearmed/patches/aarch64/RG351V similarity index 100% rename from packages/games/libretro/pcsx_rearmed/patches/RG351V rename to packages/games/libretro/pcsx_rearmed/patches/aarch64/RG351V diff --git a/packages/games/libretro/pcsx_rearmed/patches/RG552/pcsx_rearmed-add_platform.patch b/packages/games/libretro/pcsx_rearmed/patches/aarch64/RG552/pcsx_rearmed-add_platform.patch similarity index 90% rename from packages/games/libretro/pcsx_rearmed/patches/RG552/pcsx_rearmed-add_platform.patch rename to packages/games/libretro/pcsx_rearmed/patches/aarch64/RG552/pcsx_rearmed-add_platform.patch index 85eb9be19..70c2cdaa5 100644 --- a/packages/games/libretro/pcsx_rearmed/patches/RG552/pcsx_rearmed-add_platform.patch +++ b/packages/games/libretro/pcsx_rearmed/patches/aarch64/RG552/pcsx_rearmed-add_platform.patch @@ -1,7 +1,7 @@ diff -rupN pcsx_rearmed.orig/Makefile.libretro pcsx_rearmed/Makefile.libretro --- pcsx_rearmed.orig/Makefile.libretro 2022-04-20 07:57:13.327886544 -0400 +++ pcsx_rearmed/Makefile.libretro 2022-04-20 07:59:40.302828388 -0400 -@@ -70,6 +70,15 @@ else ifneq (,$(findstring CortexA73_G12B +@@ -70,6 +70,16 @@ else ifneq (,$(findstring CortexA73_G12B CFLAGS += -fomit-frame-pointer -ffast-math -DARM CPUFLAGS += -march=armv8-a+crc -mfpu=neon-fp-armv8 -mcpu=cortex-a73 -mtune=cortex-a73.cortex-a53 @@ -11,6 +11,7 @@ diff -rupN pcsx_rearmed.orig/Makefile.libretro pcsx_rearmed/Makefile.libretro + SHARED := -shared -Wl,-version-script=link.T + ARCH = arm64 + DYNAREC = ari64 ++ BUILTIN_GPU = peops + CFLAGS += -fomit-frame-pointer -ffast-math -Ofast -DARM + CPUFLAGS += -march=armv8-a+crc -mcpu=cortex-a72 -mtune=cortex-a72.cortex-a53 + diff --git a/packages/games/libretro/pcsx_rearmed/patches/arm/RG351MP b/packages/games/libretro/pcsx_rearmed/patches/arm/RG351MP new file mode 120000 index 000000000..0067f8043 --- /dev/null +++ b/packages/games/libretro/pcsx_rearmed/patches/arm/RG351MP @@ -0,0 +1 @@ +RG351P \ No newline at end of file diff --git a/packages/games/libretro/pcsx_rearmed/patches/arm/RG351P/pcsx_rearmed-add_platform.patch b/packages/games/libretro/pcsx_rearmed/patches/arm/RG351P/pcsx_rearmed-add_platform.patch new file mode 100644 index 000000000..ccda0542a --- /dev/null +++ b/packages/games/libretro/pcsx_rearmed/patches/arm/RG351P/pcsx_rearmed-add_platform.patch @@ -0,0 +1,20 @@ +diff -rupN pcsx_rearmed.orig/Makefile.libretro pcsx_rearmed/Makefile.libretro +--- pcsx_rearmed.orig/Makefile.libretro 2022-04-20 07:57:13.327886544 -0400 ++++ pcsx_rearmed/Makefile.libretro 2022-04-20 08:01:22.194100092 -0400 +@@ -70,6 +70,16 @@ else ifneq (,$(findstring CortexA73_G12B + CFLAGS += -fomit-frame-pointer -ffast-math -DARM + CPUFLAGS += -march=armv8-a+crc -mfpu=neon-fp-armv8 -mcpu=cortex-a73 -mtune=cortex-a73.cortex-a53 + ++else ifeq ($(platform), RG351x) ++ TARGET := $(TARGET_NAME)_libretro.so ++ fpic := -fPIC ++ SHARED := -shared -Wl,-version-script=link.T ++ ARCH = arm ++ DYNAREC = ari64 ++ BUILTIN_GPU = neon ++ CFLAGS += -march=armv8-a+crc -mcpu=cortex-a35 -mtune=cortex-a35 -Ofast ++ CPUFLAGS += -mtune=cortex-a35 -mfpu=neon-fp-armv8 -mfloat-abi=hard ++ + # ALLWINNER H5 + else ifneq (,$(findstring h5,$(platform))) + TARGET := $(TARGET_NAME)_libretro.so diff --git a/packages/games/libretro/pcsx_rearmed/patches/arm/RG351V b/packages/games/libretro/pcsx_rearmed/patches/arm/RG351V new file mode 120000 index 000000000..0067f8043 --- /dev/null +++ b/packages/games/libretro/pcsx_rearmed/patches/arm/RG351V @@ -0,0 +1 @@ +RG351P \ No newline at end of file diff --git a/packages/games/libretro/pcsx_rearmed/patches/arm/RG552/pcsx_rearmed-add_platform.patch b/packages/games/libretro/pcsx_rearmed/patches/arm/RG552/pcsx_rearmed-add_platform.patch new file mode 100644 index 000000000..8d85e9db4 --- /dev/null +++ b/packages/games/libretro/pcsx_rearmed/patches/arm/RG552/pcsx_rearmed-add_platform.patch @@ -0,0 +1,21 @@ +diff -rupN pcsx_rearmed.orig/Makefile.libretro pcsx_rearmed/Makefile.libretro +--- pcsx_rearmed.orig/Makefile.libretro 2022-04-20 07:57:13.327886544 -0400 ++++ pcsx_rearmed/Makefile.libretro 2022-04-20 07:59:40.302828388 -0400 +@@ -70,6 +70,17 @@ else ifneq (,$(findstring CortexA73_G12B + CFLAGS += -fomit-frame-pointer -ffast-math -DARM + CPUFLAGS += -march=armv8-a+crc -mfpu=neon-fp-armv8 -mcpu=cortex-a73 -mtune=cortex-a73.cortex-a53 + ++else ifeq ($(platform), RG552) ++ TARGET := $(TARGET_NAME)_libretro.so ++ fpic := -fPIC ++ SHARED := -shared -Wl,-version-script=link.T ++ ARCH = arm ++ DYNAREC = ari64 ++ BUILTIN_GPU = neon ++ CFLAGS += -marm -mtune=cortex-a72 -mfpu=neon-fp-armv8 -mfloat-abi=hard ++ ASFLAGS += -mtune=cortex-a35 -mfpu=neon-fp-armv8 -mfloat-abi=hard ++ CPUFLAGS += -march=armv8-a+crc -mfpu=neon-fp-armv8 -mcpu=cortex-a73 -mtune=cortex-a73.cortex-a53 ++ + # ALLWINNER H5 + else ifneq (,$(findstring h5,$(platform))) + TARGET := $(TARGET_NAME)_libretro.so diff --git a/packages/jelos/sources/scripts/runemu.sh b/packages/jelos/sources/scripts/runemu.sh index c25e7eb01..c5f10d93b 100755 --- a/packages/jelos/sources/scripts/runemu.sh +++ b/packages/jelos/sources/scripts/runemu.sh @@ -300,7 +300,7 @@ else ### Check if we need retroarch 32 bits or 64 bits RABIN="retroarch" - if [[ "${CORE}" =~ "parallel_n64" ]] || [[ "${CORE}" =~ "gpsp" ]] + if [[ "${CORE}" =~ "pcsx_rearmed32" ]] || [[ "${CORE}" =~ "parallel_n64" ]] || [[ "${CORE}" =~ "gpsp" ]] then export LD_LIBRARY_PATH="/usr/lib32" RABIN="retroarch32" diff --git a/packages/ui/emulationstation/config/es_systems.cfg b/packages/ui/emulationstation/config/es_systems.cfg index c65d5a349..670269550 100644 --- a/packages/ui/emulationstation/config/es_systems.cfg +++ b/packages/ui/emulationstation/config/es_systems.cfg @@ -1357,7 +1357,8 @@ - pcsx_rearmed + pcsx_rearmed32 + pcsx_rearmed swanstation duckstation diff --git a/packages/virtual/arm32/package.mk b/packages/virtual/arm32/package.mk index d33db1e5b..523e9f382 100644 --- a/packages/virtual/arm32/package.mk +++ b/packages/virtual/arm32/package.mk @@ -4,6 +4,6 @@ PKG_NAME="arm32" PKG_LICENSE="GPL" PKG_SITE="www.jelos.org" -PKG_DEPENDS_TARGET="toolchain squashfs-tools:host dosfstools:host fakeroot:host kmod:host mtools:host populatefs:host libc gcc linux linux-drivers linux-firmware libusb unzip socat p7zip file ${OPENGLES} SDL2 SDL2_gfx SDL2_image SDL2_mixer SDL2_net SDL2_ttf libgo2 retroarch parallel-n64_rice parallel-n64_gln64 parallel-n64_glide64 gpsp" +PKG_DEPENDS_TARGET="toolchain squashfs-tools:host dosfstools:host fakeroot:host kmod:host mtools:host populatefs:host libc gcc linux linux-drivers linux-firmware libusb unzip socat p7zip file ${OPENGLES} SDL2 SDL2_gfx SDL2_image SDL2_mixer SDL2_net SDL2_ttf libgo2 retroarch pcsx_rearmed parallel-n64_rice parallel-n64_gln64 parallel-n64_glide64 gpsp" PKG_SECTION="virtual" PKG_LONGDESC="Root package used to build and create 32-bit userland"