Add pcsx_rearmed and flycast with 32bit

This commit is contained in:
amd343 2023-02-20 21:31:19 -08:00
parent bb6d014703
commit 9c1898c92b
10 changed files with 138 additions and 14 deletions

View file

@ -86,6 +86,14 @@ makeinstall_target() {
cp ${PKG_BUILD}/retroarch ${INSTALL}/usr/bin
mkdir -p ${INSTALL}/usr/share/retroarch/filters
case ${ARCH} in
aarch64)
cp -vP ${ROOT}/build.${DISTRO}-${DEVICE}.arm/retroarch-*/.install_pkg/usr/bin/retroarch ${INSTALL}/usr/bin/retroarch32
mkdir -p ${INSTALL}/usr/share/retroarch/filters/32bit/
cp -rvP ${ROOT}/build.${DISTRO}-${DEVICE}.arm/retroarch-*/.install_pkg/usr/share/retroarch/filters/64bit/* ${INSTALL}/usr/share/retroarch/filters/32bit/
;;
esac
mkdir -p ${INSTALL}/etc
cp ${PKG_BUILD}/retroarch.cfg ${INSTALL}/etc

View file

@ -39,8 +39,18 @@ pre_configure_target() {
-DWITH_SYSTEM_ZLIB=ON \
-DUSE_OPENMP=ON"
}
makeinstall_target() {
mkdir -p ${INSTALL}/usr/lib/libretro
cp flycast_libretro.so ${INSTALL}/usr/lib/libretro/flycast_libretro.so
mkdir -p ${INSTALL}/usr/lib/libretro
case ${TARGET_ARCH} in
aarch64)
cp -vP ${ROOT}/build.${DISTRO}-${DEVICE}.arm/flycast-*/.install_pkg/usr/lib/libretro/flycast32_libretro.so ${INSTALL}/usr/lib/libretro
cp flycast_libretro.so ${INSTALL}/usr/lib/libretro/flycast_libretro.so
;;
arm)
cp flycast_libretro.so ${INSTALL}/usr/lib/libretro/flycast32_libretro.so
;;
*)
cp flycast_libretro.so ${INSTALL}/usr/lib/libretro/flycast_libretro.so
;;
esac
}

View file

@ -0,0 +1,37 @@
# 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="aced3eb3fcaa0fe13c44c4dd196cdab42555fd98"
PKG_REV="1"
PKG_ARCH="arm aarch64"
PKG_LICENSE="GPLv2"
PKG_SITE="https://github.com/libretro/pcsx_rearmed"
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+="${TARGET_ARCH}/${DEVICE}"
make_target() {
cd ${PKG_BUILD}
if [[ "${DEVICE}" =~ RK3566 ]]
then
make -f Makefile.libretro GIT_VERSION=${PKG_VERSION} platform=RK3566
else
make -f Makefile.libretro GIT_VERSION=${PKG_VERSION} platform=${DEVICE}
fi
}
makeinstall_target() {
## Install the 64bit core.
mkdir -p ${INSTALL}/usr/lib/libretro
cp pcsx_rearmed_libretro.so ${INSTALL}/usr/lib/libretro/
if [ "${TARGET_ARCH}" = "aarch64" ]
then
## Install the 32bit core.
cp -vP ${ROOT}/build.${DISTRO}-${DEVICE}.arm/pcsx_rearmed-*/.install_pkg/usr/lib/libretro/pcsx_rearmed_libretro.so ${INSTALL}/usr/lib/libretro/pcsx_rearmed32_libretro.so
fi
}

View file

@ -0,0 +1,20 @@
diff -rupN pcsx_rearmed.orig/Makefile.libretro pcsx_rearmed/Makefile.libretro
--- pcsx_rearmed.orig/Makefile.libretro 2022-08-16 15:19:42.928678600 +0200
+++ pcsx_rearmed/Makefile.libretro 2022-08-17 18:08:41.346728698 +0200
@@ -385,6 +385,15 @@ else ifeq ($(platform), rpi4_64)
fpic := -fPIC
CFLAGS += -march=armv8-a+crc+simd -mtune=cortex-a72 -ftree-vectorize
+else ifeq ($(platform), RK3566)
+ TARGET := $(TARGET_NAME)_libretro.so
+ fpic := -fPIC
+ ARCH = arm64
+ DYNAREC = ari64
+ BUILTIN_GPU = neon
+ HAVE_NEON = 1
+ CFLAGS += -march=armv8-a+crc+simd -mtune=cortex-a55 -ftree-vectorize
+
# Classic Platforms ####################
# Platform affix = classic_<ISA>_<µARCH>
# Help at https://modmyclassic.com/comp

View file

@ -0,0 +1,22 @@
diff -rupN pcsx_rearmed.orig/Makefile.libretro pcsx_rearmed/Makefile.libretro
--- pcsx_rearmed.orig/Makefile.libretro 2022-08-16 15:19:42.928678600 +0200
+++ pcsx_rearmed/Makefile.libretro 2022-08-17 17:51:57.256712172 +0200
@@ -385,6 +385,17 @@ else ifeq ($(platform), rpi4_64)
fpic := -fPIC
CFLAGS += -march=armv8-a+crc+simd -mtune=cortex-a72 -ftree-vectorize
+else ifeq ($(platform), RK3566)
+ TARGET := $(TARGET_NAME)_libretro.so
+ fpic := -fPIC
+ CFLAGS += -marm -mtune=cortex-a55 -mfpu=neon-fp-armv8 -mfloat-abi=hard
+ ASFLAGS += -mtune=cortex-a55 -mfpu=neon-fp-armv8 -mfloat-abi=hard
+ HAVE_NEON = 1
+ HAVE_NEON_ASM = 1
+ ARCH = arm
+ BUILTIN_GPU = neon
+ DYNAREC = ari64
+
# Classic Platforms ####################
# Platform affix = classic_<ISA>_<µARCH>
# Help at https://modmyclassic.com/comp

View file

@ -0,0 +1,10 @@
#!/bin/bash
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2020-present Fewtarius
source /etc/profile
jslisten set "killall retroarch32"
export LIBGL_DRIVERS_PATH="/usr/lib32/dri"
/usr/bin/retroarch32 --appendconfig /usr/config/retroarch/retroarch32bit-append.cfg

View file

@ -79,6 +79,19 @@
<image>./downloaded_images/scummvm.png</image>
</game>
<game>
<path>./Start 32bit Retroarch.sh</path>
<name>Start 32bit RetroArch</name>
<desc>Run 32bit RetroArch</desc>
<developer>JELOS</developer>
<publisher>JELOS</publisher>
<rating>1.0</rating>
<releasedate>2021</releasedate>
<genre>Script</genre>
<thumbnail>./downloaded_images/retroarch32-thumb.png</thumbnail>
<image>./downloaded_images/retroarch32.png</image>
</game>
<game>
<path>./Start 64bit Retroarch.sh</path>
<name>Start 64bit RetroArch</name>

View file

@ -248,7 +248,8 @@
<emulators>
<emulator name="retroarch">
<cores>
<core default="true">flycast</core>
<core default="true">flycast32</core>
<core>flycast</core>
</cores>
</emulator>
<emulator name="flycastsa">
@ -534,7 +535,8 @@
<emulators>
<emulator name="retroarch">
<cores>
<core default="true">flycast</core>
<core default="true">flycast32</core>
<core>flycast</core>
</cores>
</emulator>
<emulator name="flycastsa">
@ -1513,7 +1515,9 @@
<emulators>
<emulator name="retroarch">
<cores>
<core default="true">swanstation</core>
<core default="true">pcsx_rearmed32</core>
<core>pcsx_rearmed</core>
<core>swanstation</core>
<core>duckstation</core>
</cores>
</emulator>

View file

@ -4,6 +4,6 @@
PKG_NAME="arm32"
PKG_LICENSE="Apache-2.0"
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"
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 retroarch pcsx_rearmed flycast"
PKG_SECTION="virtual"
PKG_LONGDESC="Root package used to build and create 32-bit userland"

View file

@ -16,13 +16,13 @@ PKG_RETROARCH="core-info libretro-database retroarch retroarch-assets retroarch-
LIBRETRO_CORES="2048 81 a5200 atari800 beetle-gba beetle-lynx beetle-ngp beetle-pce beetle-pce-fast \
beetle-pcfx bsnes bsnes-mercury-performance beetle-supafaust beetle-supergrafx \
beetle-vb beetle-wswan beetle-saturn bluemsx cannonball cap32 crocods daphne dinothawr \
dosbox-svn dosbox-pure duckstation easyrpg fake08 fbalpha2012 fbalpha2019 \
fbneo fceumm fmsx flycast freechaf freeintv freej2me fuse-libretro \
gambatte gearboy gearcoleco gearsystem genesis-plus-gx genesis-plus-gx-wide gme \
gw-libretro handy hatari mame2000 mame2003-plus mame2010 mame2015 melonds meowpc98 \
mesen mgba mrboom mupen64plus mupen64plus-nx neocd_libretro nestopia np2kai nxengine \
o2em opera parallel-n64 picodrive pokemini potator prboom prosystem ppsspp puae px68k \
quasi88 quicknes race reminiscence sameboy sameduck scummvm smsplus-gx snes9x snes9x2002 \
dosbox-svn dosbox-pure duckstation easyrpg fake08 fbalpha2012 fbalpha2019 \
fbneo fceumm fmsx flycast freechaf freeintv freej2me fuse-libretro gambatte gearboy \
gearcoleco gearsystem genesis-plus-gx genesis-plus-gx-wide gme gw-libretro handy hatari \
mame2000 mame2003-plus mame2010 mame2015 melonds meowpc98 mesen mgba mrboom mupen64plus \
mupen64plus-nx neocd_libretro nestopia np2kai nxengine o2em opera parallel-n64 \
pcsx_rearmed picodrive pokemini potator prboom prosystem ppsspp puae px68k quasi88 \
quicknes race reminiscence sameboy sameduck scummvm smsplus-gx snes9x snes9x2002 \
snes9x2005_plus snes9x2010 stella stella-2014 swanstation TIC-80 tgbdual tyrquake uzem \
vba-next vbam vecx vice yabasanshiro virtualjaguar xmil xrick"