From 7a4b04aad52ba770f87993aa4683dc1513e52097 Mon Sep 17 00:00:00 2001 From: brooksytech Date: Wed, 28 Sep 2022 20:58:19 -0700 Subject: [PATCH] Add BSNES core & Citra libretro 3DS --- packages/games/libretro/bsnes/package.mk | 32 +++++++++++++++++ packages/games/libretro/citra/package.mk | 36 +++++++++++++++++++ packages/jelos/tmpfiles.d/jelos-dirs.conf | 1 + .../config/common/es_features.cfg | 2 ++ .../config/device/X86_64/es_systems.cfg | 20 +++++++++++ packages/virtual/emulators/package.mk | 2 +- 6 files changed, 92 insertions(+), 1 deletion(-) create mode 100644 packages/games/libretro/bsnes/package.mk create mode 100644 packages/games/libretro/citra/package.mk diff --git a/packages/games/libretro/bsnes/package.mk b/packages/games/libretro/bsnes/package.mk new file mode 100644 index 000000000..8ee4899f0 --- /dev/null +++ b/packages/games/libretro/bsnes/package.mk @@ -0,0 +1,32 @@ +# SPDX-License-Identifier: GPL-2.0 +# Copyright (C) 2022-present BrooksyTech (https://github.com/brooksytech) + +PKG_NAME="bsnes" +PKG_VERSION="b04ea7236fc05c2e2c5dc645bbdba8c90196bb5f" +PKG_LICENSE="GPLv2" +PKG_SITE="https://github.com/libretro/bsnes-libretro" +PKG_URL="$PKG_SITE/archive/$PKG_VERSION.tar.gz" +PKG_DEPENDS_TARGET="toolchain" +PKG_SECTION="libretro" +PKG_SHORTDESC="BSNES Super Nintendo Libretro Core" +PKG_IS_ADDON="no" +PKG_TOOLCHAIN="make" +PKG_AUTORECONF="no" + +if [ ! "${OPENGL}" = "no" ]; then + PKG_DEPENDS_TARGET+=" ${OPENGL} glu libglvnd" +fi + +if [ "${OPENGLES_SUPPORT}" = yes ]; then + PKG_DEPENDS_TARGET+=" ${OPENGLES}" +fi + +#make_target() { + # make PROFILE=performance +#} + +makeinstall_target() { + mkdir -p $INSTALL/usr/lib/libretro + cp bsnes_libretro.so $INSTALL/usr/lib/libretro/ +} + diff --git a/packages/games/libretro/citra/package.mk b/packages/games/libretro/citra/package.mk new file mode 100644 index 000000000..327596c4c --- /dev/null +++ b/packages/games/libretro/citra/package.mk @@ -0,0 +1,36 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +# Copyright (C) 2022-present BrooksyTech (https://github.com/brooksytech) + +PKG_NAME="citra" +PKG_VERSION="70bf7d8a63b0b501e8f5cff89a86a3e2d4083aa0" +PKG_REV="1" +PKG_LICENSE="GPLv3" +PKG_SITE="https://github.com/libretro/citra" +PKG_URL="$PKG_SITE.git" +PKG_DEPENDS_TARGET="toolchain boost" +PKG_PRIORITY="optional" +PKG_SECTION="libretro" +PKG_SHORTDESC="Citra - Nintendo 3DS emulator for libretro" +PKG_TOOLCHAIN="make" + +if [ ! "${OPENGL}" = "no" ]; then + PKG_DEPENDS_TARGET+=" ${OPENGL} glu libglvnd" +fi + +if [ "${OPENGLES_SUPPORT}" = yes ]; then + PKG_DEPENDS_TARGET+=" ${OPENGLES}" +fi + +pre_make_target() { + + cd ${PKG_BUILD} + if [ -e "CMakeLists.txt" ] + then + rm CMakeLists.txt + fi +} + +makeinstall_target() { + mkdir -p $INSTALL/usr/lib/libretro + cp citra_libretro.so $INSTALL/usr/lib/libretro/ +} diff --git a/packages/jelos/tmpfiles.d/jelos-dirs.conf b/packages/jelos/tmpfiles.d/jelos-dirs.conf index 0f782a932..1aa7f603f 100644 --- a/packages/jelos/tmpfiles.d/jelos-dirs.conf +++ b/packages/jelos/tmpfiles.d/jelos-dirs.conf @@ -4,6 +4,7 @@ d /storage/roms 0755 root root - - d /tmp/cache d /storage/roms/3do 0755 root root - - +d /storage/roms/3ds 0755 root root - - d /storage/roms/amiga 0755 root root - - d /storage/roms/amigacd32 0755 root root - - d /storage/roms/amstradcpc 0755 root root - - diff --git a/packages/ui/emulationstation/config/common/es_features.cfg b/packages/ui/emulationstation/config/common/es_features.cfg index fb783ec5e..cd71efa06 100644 --- a/packages/ui/emulationstation/config/common/es_features.cfg +++ b/packages/ui/emulationstation/config/common/es_features.cfg @@ -28,9 +28,11 @@ + + diff --git a/packages/ui/emulationstation/config/device/X86_64/es_systems.cfg b/packages/ui/emulationstation/config/device/X86_64/es_systems.cfg index 69556daea..0877bf0af 100644 --- a/packages/ui/emulationstation/config/device/X86_64/es_systems.cfg +++ b/packages/ui/emulationstation/config/device/X86_64/es_systems.cfg @@ -19,6 +19,25 @@ + + 3DS + Nintendo 3DS + Nintendo + 2010 + console + /storage/roms/3ds + .3ds .3DS .3dsx .3DSX .elf .ELF .axf .AXF .cci .CCI .cxi .CXI .app .APP + /usr/bin/runemu.sh %ROM% -P%SYSTEM% --core=%CORE% --emulator=%EMULATOR% --controllers="%CONTROLLERSCONFIG%" + 3ds + 3ds + + + + citra + + + + amiga Amiga @@ -1907,6 +1926,7 @@ snes9x2002 snes9x2005_plus beetle_supafaust + bsnes bsnes_mercury_performance diff --git a/packages/virtual/emulators/package.mk b/packages/virtual/emulators/package.mk index d6bf9ac99..016beca80 100644 --- a/packages/virtual/emulators/package.mk +++ b/packages/virtual/emulators/package.mk @@ -42,6 +42,6 @@ case "${DEVICE}" in PKG_DEPENDS_TARGET+=" duckstationsa dolphinsa" ;; handheld) - PKG_DEPENDS_TARGET+=" duckstationsa dolphinsa dolphin pcsx2sa pcsx2 desmume" + PKG_DEPENDS_TARGET+=" duckstationsa dolphinsa dolphin pcsx2sa pcsx2 desmume bsnes citra" ;; esac