diff --git a/Config.in b/Config.in index 5189d608e450f2894847181b817149afd85ca5ae..56d657bdd0fc7701d6a2bca0d4c8e17a2f1f7010 100644 --- a/Config.in +++ b/Config.in @@ -139,6 +139,7 @@ menu "Emulators" source "$BR2_EXTERNAL_RECALBOX_PATH/package/amiberry/Config.in" source "$BR2_EXTERNAL_RECALBOX_PATH/package/amiberry33/Config.in" source "$BR2_EXTERNAL_RECALBOX_PATH/package/dolphin-emu/Config.in" + source "$BR2_EXTERNAL_RECALBOX_PATH/package/dolphin-rpi/Config.in" source "$BR2_EXTERNAL_RECALBOX_PATH/package/dosbox/Config.in" source "$BR2_EXTERNAL_RECALBOX_PATH/package/gsplus/Config.in" source "$BR2_EXTERNAL_RECALBOX_PATH/package/hypseus/Config.in" diff --git a/configs/recalbox-rpi5_64_defconfig b/configs/recalbox-rpi5_64_defconfig index d71761c9048e460a777a4584c303c775d650d23d..861a57adebb40e2c1b822fd8a8e79ad74de95e49 100644 --- a/configs/recalbox-rpi5_64_defconfig +++ b/configs/recalbox-rpi5_64_defconfig @@ -365,3 +365,4 @@ BR2_PACKAGE_RPI_FIRMWARE_CMDLINE_FILE="$(BR2_EXTERNAL_RECALBOX_PATH)/board/recal BR2_PACKAGE_XPADNEO=y BR2_PACKAGE_VVVVVV=y BR2_PACKAGE_LIBRETRO_TAMALIBRETRO=y +BR2_PACKAGE_DOLPHIN_RPI=y diff --git a/package/dolphin-rpi/0001-change-name-rpi.patch b/package/dolphin-rpi/0001-change-name-rpi.patch new file mode 100644 index 0000000000000000000000000000000000000000..1e3f312731fd647972de64dc60bc16129a1e9783 --- /dev/null +++ b/package/dolphin-rpi/0001-change-name-rpi.patch @@ -0,0 +1,51 @@ +--- a/CMakeLists.txt 2025-01-24 00:37:23.000000000 +0100 ++++ b/CMakeLists.txt 2025-01-29 21:00:22.775509884 +0100 +@@ -9,7 +9,7 @@ + # features can be used, not the minimum required version to run. + set(CMAKE_OSX_DEPLOYMENT_TARGET "10.9" CACHE string "") + +-project(dolphin-emu) ++project(dolphin-rpi) + option(USE_EGL "Enables EGL OpenGL Interface" OFF) + option(TRY_X11 "Enables X11 Support" ON) + option(USE_SHARED_ENET "Use shared libenet if found rather than Dolphin's soon-to-compatibly-diverge version" OFF) +@@ -86,10 +86,10 @@ + # Set up paths + set(bindir ${CMAKE_INSTALL_PREFIX}/bin CACHE PATH "bindir") + if(HAIKU) +- set(datadir ${CMAKE_INSTALL_PREFIX}/data/dolphin-emu CACHE PATH "datadir") ++ set(datadir ${CMAKE_INSTALL_PREFIX}/data/dolphin-rpi CACHE PATH "datadir") + set(mandir ${CMAKE_INSTALL_PREFIX}/documentation/man CACHE PATH "mandir") + else() +- set(datadir ${CMAKE_INSTALL_PREFIX}/share/dolphin-emu CACHE PATH "datadir") ++ set(datadir ${CMAKE_INSTALL_PREFIX}/share/dolphin-rpi CACHE PATH "datadir") + set(mandir ${CMAKE_INSTALL_PREFIX}/share/man CACHE PATH "mandir") + endif() + add_definitions(-DDATA_DIR="${datadir}/") +@@ -837,20 +837,20 @@ + if(CMAKE_SYSTEM_NAME MATCHES "Linux|FreeBSD|OpenBSD") + # Install the application icon and menu item + install(FILES Data/dolphin-emu.svg +- DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/scalable/apps) ++ DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/scalable/apps/dolphin-rpi.svg) + install(FILES Data/dolphin-emu.png +- DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/48x48/apps) ++ DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/48x48/apps/dolphin-rpi.png) + install(FILES Data/dolphin-emu.desktop +- DESTINATION ${CMAKE_INSTALL_PREFIX}/share/applications) ++ DESTINATION ${CMAKE_INSTALL_PREFIX}/share/applications/dolphin-rpi.desktop) + # Install manpages + install(FILES Data/dolphin-emu.6 +- DESTINATION ${mandir}/man6) ++ DESTINATION ${mandir}/man6/dolphin-rpi.6) + install(FILES Data/dolphin-emu-nogui.6 +- DESTINATION ${mandir}/man6) ++ DESTINATION ${mandir}/man6/dolphin-rpi-nogui.6) + endif() + + # packaging information +-set(CPACK_PACKAGE_NAME "dolphin-emu") ++set(CPACK_PACKAGE_NAME "dolphin-rpi") + set(CPACK_PACKAGE_VENDOR "Dolphin Team") + set(CPACK_PACKAGE_VERSION_MAJOR ${DOLPHIN_VERSION_MAJOR}) + set(CPACK_PACKAGE_VERSION_MINOR ${DOLPHIN_VERSION_MINOR}) diff --git a/package/dolphin-rpi/0002-change-name-nogui.patch b/package/dolphin-rpi/0002-change-name-nogui.patch new file mode 100644 index 0000000000000000000000000000000000000000..610107e375de4427ecab58b7195bd5072581224c --- /dev/null +++ b/package/dolphin-rpi/0002-change-name-nogui.patch @@ -0,0 +1,11 @@ +--- a/Source/Core/DolphinNoGUI/CMakeLists.txt 2025-01-29 21:01:21.530982918 +0100 ++++ b/Source/Core/DolphinNoGUI/CMakeLists.txt 2025-01-29 21:01:38.522830544 +0100 +@@ -5,7 +5,7 @@ + set(NOGUI_SRCS MainNoGUI.cpp) + + add_executable(dolphin-nogui ${NOGUI_SRCS}) +-set_target_properties(dolphin-nogui PROPERTIES OUTPUT_NAME dolphin-emu-nogui) ++set_target_properties(dolphin-nogui PROPERTIES OUTPUT_NAME dolphin-rpi-nogui) + + target_link_libraries(dolphin-nogui PRIVATE + core diff --git a/package/dolphin-rpi/Config.in b/package/dolphin-rpi/Config.in new file mode 100644 index 0000000000000000000000000000000000000000..349a9992a276a256f5d6e52a16b2a5722cd08a73 --- /dev/null +++ b/package/dolphin-rpi/Config.in @@ -0,0 +1,25 @@ +config BR2_PACKAGE_DOLPHIN_RPI + bool "dolphin-rpi" + depends on BR2_x86_64 || BR2_aarch64 + select BR2_PACKAGE_LIBEVDEV + select BR2_PACKAGE_FFMPEG + select BR2_PACKAGE_ZLIB + select BR2_PACKAGE_LIBPNG + select BR2_PACKAGE_LZO + select BR2_PACKAGE_LIBUSB + select BR2_PACKAGE_LIBCURL + select BR2_PACKAGE_BLUEZ5_UTILS + select BR2_PACKAGE_CAIRO_SCRIPT + select BR2_PACKAGE_CAIRO + select BR2_PACKAGE_HIDAPI + select BR2_PACKAGE_LIBCUBEB + select BR2_PACKAGE_XORG7 if (BR2_PACKAGE_RECALBOX_VIDEO_XORG_SERVER || BR2_PACKAGE_RECALBOX_VIDEO_XWAYLAND) + select BR2_PACKAGE_XLIB_LIBXI if (BR2_PACKAGE_RECALBOX_VIDEO_XORG_SERVER || BR2_PACKAGE_RECALBOX_VIDEO_XWAYLAND) + select BR2_PACKAGE_HICOLOR_ICON_THEME if BR2_PACKAGE_XORG7 + select BR2_PACKAGE_SFML if BR2_PACKAGE_XORG7 + help + A Nintendo GameCube/Wii emulator. + https://github.com/dolphin-emu/dolphin + +comment "Dolphin needs x86_64, XORG7 or aarch64" + depends on (!BR2_x86_64 || !BR2_PACKAGE_XORG7) && !BR2_aarch64 diff --git a/package/dolphin-rpi/dolphin-rpi.mk b/package/dolphin-rpi/dolphin-rpi.mk new file mode 100644 index 0000000000000000000000000000000000000000..aa6edb11b01288cb29015187c23dab331a269df2 --- /dev/null +++ b/package/dolphin-rpi/dolphin-rpi.mk @@ -0,0 +1,26 @@ +################################################################################ +# +# DOLPHIN_RPI +# +################################################################################ + +# Commit of 2025/11/28 +DOLPHIN_RPI_SITE = https://github.com/gvx64/dolphin-rpi.git +DOLPHIN_RPI_VERSION = b56b3b4d007b47f1a136741c1b779c75e7e78ec9 +DOLPHIN_RPI_LICENSE = GPL-2.0+ +DOLPHIN_RPI_LICENSE_FILES = license.txt +DOLPHIN_RPI_DEPENDENCIES = libevdev ffmpeg zlib libpng lzo libusb libcurl bluez5_utils hidapi xz host-xz zstd enet sfml libcubeb libegl libftm minizip +DOLPHIN_RPI_SUPPORTS_IN_SOURCE_BUILD = NO +DOLPHIN_RPI_SITE_METHOD = git +DOLPHIN_RPI_GIT_SUBMODULES = YES + +DOLPHIN_RPI_CONF_OPTS += -DDISTRIBUTOR='Recalbox' +DOLPHIN_RPI_CONF_OPTS += -DENABLE_HEADLESS=ON +DOLPHIN_RPI_CONF_OPTS += -DENABLE_PULSEAUDIO=ON +DOLPHIN_RPI_CONF_OPTS += -DENABLE_ANALYTICS=OFF +DOLPHIN_RPI_CONF_OPTS += -DTRY_X11=ON +DOLPHIN_RPI_CONF_OPTS += -DUSE_EGL=ON +#DOLPHIN_RPI_CONF_OPTS += -DCMAKE_C_COMPILER=gcc-11 +#DOLPHIN_RPI_CONF_OPTS += -DCMAKE_CXX_COMPILER=g++-11 + +$(eval $(cmake-package)) diff --git a/package/libcubeb/Config.in b/package/libcubeb/Config.in new file mode 100644 index 0000000000000000000000000000000000000000..a20218b3e83377e9f9992863fab34656674d1e2f --- /dev/null +++ b/package/libcubeb/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_LIBCUBEB + bool "libcubeb" + help + Cross platform audio library + https://github.com/mozilla/cubeb diff --git a/package/libcubeb/libcubeb.mk b/package/libcubeb/libcubeb.mk new file mode 100644 index 0000000000000000000000000000000000000000..7c4b153764accfc537c34dd3dcc30ae6c06acb25 --- /dev/null +++ b/package/libcubeb/libcubeb.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# LIBCUBEB +# +################################################################################ + +# Commit of 2025/10/03 +LIBCUBEB_SITE = https://github.com/mozilla/cubeb.git +LIBCUBEB_VERSION = 9a9d034c51859a045a34f201334f612c51e6c19d +LIBCUBEB_LICENSE = ISC +LIBCUBEB_LICENSE_FILES = LICENSE +LIBCUBEB_SUPPORTS_IN_SOURCE_BUILD = NO +LIBCUBEB_SITE_METHOD = git +LIBCUBEB_GIT_SUBMODULES = NO + +$(eval $(cmake-package)) diff --git a/package/libftm/libftm.mk b/package/libftm/libftm.mk new file mode 100644 index 0000000000000000000000000000000000000000..8c883481f148340ab087ec1ab2280d98075125f7 --- /dev/null +++ b/package/libftm/libftm.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# LIBFTM +# +################################################################################ + +# Commit of 2025/11/28 +LIBFTM_SITE = https://github.com/fmtlib/fmt.git +LIBFTM_VERSION = 123913715afeb8a437e6388b4473fcc4753e1c9a +LIBFTM_LICENSE = +LIBFTM_LICENSE_FILES = LICENSE +LIBFTM_DEPENDENCIES = +LIBFTM_SITE_METHOD = git +LIBFTM_GIT_SUBMODULES = NO + +LIBFTM_INSTALL_STAGING = YES + +$(eval $(cmake-package)) diff --git a/package/recalbox-romfs2/systems/gamecube/system.ini b/package/recalbox-romfs2/systems/gamecube/system.ini index 08ed459fef6d410d58106fd0e87345f04d35d9ee..f162acc250088fba0bcfdfe59888fe539a9bb3d8 100644 --- a/package/recalbox-romfs2/systems/gamecube/system.ini +++ b/package/recalbox-romfs2/systems/gamecube/system.ini @@ -64,3 +64,17 @@ netplay = 0 softpatching = 0 compatibility = good speed = good + +[core.2] +package = BR2_PACKAGE_DOLPHIN_EMU +priority = 3 +emulator = "dolphin" +core = "dolphin-rpi" +extensions = ".ciso .gc .gcm .gcz .iso .m3u .rvz .wia" +netplay = 0 +softpatching = 0 +compatibility = good +speed = good +speed.rpi4_64 = low +video.backend.rpi4_64 = wayland +video.backend.rpi5_64 = wayland diff --git a/projects/configgen/configgen/emulatorlauncher.py b/projects/configgen/configgen/emulatorlauncher.py index 5d234092d55725d2830d18b97ddb0189b2576556..6ee623b1d893ec5d9b69c85aa36c461b066304ec 100644 --- a/projects/configgen/configgen/emulatorlauncher.py +++ b/projects/configgen/configgen/emulatorlauncher.py @@ -25,6 +25,10 @@ def getGenerator(emulator): module = __import__("configgen.generators.dolphin.dolphinGenerator", fromlist=["DolphinGenerator"]) generatorClass = getattr(module, "DolphinGenerator") return generatorClass() + elif emulator == "dolphin-rpi": + module = __import__("configgen.generators.dolphin.dolphinGenerator", fromlist=["DolphinGenerator"]) + generatorClass = getattr(module, "DolphinGenerator") + return generatorClass() elif emulator == "ppsspp": module = __import__("configgen.generators.ppsspp.ppssppGenerator", fromlist=["PPSSPPGenerator"]) generatorClass = getattr(module, "PPSSPPGenerator") diff --git a/projects/configgen/configgen/generators/dolphin/dolphinGenerator.py b/projects/configgen/configgen/generators/dolphin/dolphinGenerator.py index 13f79067f67a80b1fcd7cec039aadfbd7a7c7bc0..5628b0d880fdfcb5b15798fec06ac5c9b7fbd473 100644 --- a/projects/configgen/configgen/generators/dolphin/dolphinGenerator.py +++ b/projects/configgen/configgen/generators/dolphin/dolphinGenerator.py @@ -5,6 +5,7 @@ from configgen.Emulator import Emulator from configgen.controllers.controller import ControllerPerPlayer from configgen.generators.Generator import Generator from configgen.settings.keyValueSettings import keyValueSettings +from configgen.utils.Vulkan import Vulkan class DolphinGenerator(Generator): @@ -256,7 +257,12 @@ class DolphinGenerator(Generator): self.mainConfiguration(system, args) self.gfxConfiguration(system) - commandArray = [recalboxFiles.recalboxBins[system.Emulator], "-e", args.rom] + if Vulkan.vulkanAvailable(): + video_driver = "Vulkan" + else: + video_driver = "OGL" + + commandArray = [recalboxFiles.recalboxBins[system.Core], "-v", video_driver, "-e", args.rom] if system.HasArgs: commandArray.extend(system.Args) return Command(videomode=system.VideoMode, array=commandArray, env={"XDG_CONFIG_HOME":recalboxFiles.CONF, "XDG_DATA_HOME":recalboxFiles.SAVES}) diff --git a/projects/configgen/configgen/recalboxFiles.py b/projects/configgen/configgen/recalboxFiles.py index d15e97909450a8e133cdfc3996165537dfb4d126..63d95513f53785d2bb406cb399ee35d2e161fb5a 100644 --- a/projects/configgen/configgen/recalboxFiles.py +++ b/projects/configgen/configgen/recalboxFiles.py @@ -28,6 +28,7 @@ recalboxBins =\ 'beebem' : '/usr/bin/Beebem', 'daphne' : '/usr/bin/hypseus', 'dolphin' : '/usr/bin/dolphin-emu-nogui', + 'dolphin-rpi' : '/usr/bin/dolphin-rpi-nogui', 'dosbox' : '/usr/bin/dosbox', 'duckstation' : '/usr/bin/duckstation', 'fba2x' : '/usr/bin/fba2x', diff --git a/projects/configgen/tests/generators/dolphinGenerator_test.py b/projects/configgen/tests/generators/dolphinGenerator_test.py index b60574fd3f5006206a897eda434e8741ce6257b4..ed1a8733ffb6991fff545a1a531c1cb8ff430b7c 100644 --- a/projects/configgen/tests/generators/dolphinGenerator_test.py +++ b/projects/configgen/tests/generators/dolphinGenerator_test.py @@ -38,7 +38,7 @@ def test_simple_generate_wii(emulator, system_wii, mocker, controller_configurat mocker.patch("configgen.generators.dolphin.dolphinControllers.EvdevGetJoystickName", return_value="Sony PLAYSTATION(R)3 Controller") command = emulator.generate(system_wii, controller_configuration, keyValueSettings("", False), Arguments('path/to/test')) assert command.videomode == '1920x1080' - assert command.array == ['/usr/bin/dolphin-emu-nogui', '-e', 'path/to/test'] + assert command.array == ['/usr/bin/dolphin-emu-nogui', '-v', 'OGL', '-e', 'path/to/test'] @pytest.mark.usefixtures("controller_configuration") @@ -46,4 +46,4 @@ def test_simple_generate_gamecube(emulator, system_gamecube, mocker, controller_ mocker.patch("configgen.generators.dolphin.dolphinControllers.EvdevGetJoystickName", return_value="Sony PLAYSTATION(R)3 Controller") command = emulator.generate(system_gamecube, controller_configuration, keyValueSettings("", False), Arguments('path/to/test')) assert command.videomode == '1920x1080' - assert command.array == ['/usr/bin/dolphin-emu-nogui', '-e', 'path/to/test'] + assert command.array == ['/usr/bin/dolphin-emu-nogui', '-v', 'OGL', '-e', 'path/to/test']