From cb205308f688c50f6949497494794a6ab23657c9 Mon Sep 17 00:00:00 2001 From: brooksytech Date: Wed, 2 Nov 2022 07:18:15 -0700 Subject: [PATCH] DolphinSA ES options --- .../RG353P/WiiControllerProfiles/classic.ini | 27 ++++ .../RG353P/WiiControllerProfiles/nunchuck.ini | 25 +++ .../RG353P/WiiControllerProfiles/remote.ini | 15 ++ .../dolphinsa/config/RG552/GCPadNew.ini | 12 +- .../RG552/WiiControllerProfiles/classic.ini | 27 ++++ .../RG552/WiiControllerProfiles/nunchuck.ini | 25 +++ .../RG552/WiiControllerProfiles/remote.ini | 15 ++ .../dolphinsa/config/handheld/GCPadNew.ini | 2 - .../WiiControllerProfiles/classic.ini | 27 ++++ .../WiiControllerProfiles/nunchuck.ini | 26 +++ .../handheld/WiiControllerProfiles/remote.ini | 16 ++ packages/games/emulators/dolphinsa/package.mk | 10 +- .../dolphinsa/scripts/start_dolphin.sh | 21 --- .../dolphinsa/scripts/start_dolphin_gc.sh | 129 +++++++++++++++ .../dolphinsa/scripts/start_dolphin_wii.sh | 149 ++++++++++++++++++ packages/jelos/sources/scripts/runemu.sh | 12 +- .../config/common/es_features.cfg | 71 +++++++++ .../config/common/es_systems.cfg | 30 +++- .../config/device/X86_64/es_systems.cfg | 14 +- 19 files changed, 608 insertions(+), 45 deletions(-) create mode 100644 packages/games/emulators/dolphinsa/config/RG353P/WiiControllerProfiles/classic.ini create mode 100644 packages/games/emulators/dolphinsa/config/RG353P/WiiControllerProfiles/nunchuck.ini create mode 100644 packages/games/emulators/dolphinsa/config/RG353P/WiiControllerProfiles/remote.ini create mode 100644 packages/games/emulators/dolphinsa/config/RG552/WiiControllerProfiles/classic.ini create mode 100644 packages/games/emulators/dolphinsa/config/RG552/WiiControllerProfiles/nunchuck.ini create mode 100644 packages/games/emulators/dolphinsa/config/RG552/WiiControllerProfiles/remote.ini create mode 100644 packages/games/emulators/dolphinsa/config/handheld/WiiControllerProfiles/classic.ini create mode 100644 packages/games/emulators/dolphinsa/config/handheld/WiiControllerProfiles/nunchuck.ini create mode 100644 packages/games/emulators/dolphinsa/config/handheld/WiiControllerProfiles/remote.ini delete mode 100755 packages/games/emulators/dolphinsa/scripts/start_dolphin.sh create mode 100755 packages/games/emulators/dolphinsa/scripts/start_dolphin_gc.sh create mode 100755 packages/games/emulators/dolphinsa/scripts/start_dolphin_wii.sh diff --git a/packages/games/emulators/dolphinsa/config/RG353P/WiiControllerProfiles/classic.ini b/packages/games/emulators/dolphinsa/config/RG353P/WiiControllerProfiles/classic.ini new file mode 100644 index 000000000..93256a3d6 --- /dev/null +++ b/packages/games/emulators/dolphinsa/config/RG353P/WiiControllerProfiles/classic.ini @@ -0,0 +1,27 @@ +[Wiimote1] +Device = evdev/0/retrogame_joypad +Extension = Classic +Source = 1 +Classic/Buttons/A = Button 1 +Classic/Buttons/B = Button 0 +Classic/Buttons/X = Button 2 +Classic/Buttons/Y = Button 3 +Classic/Buttons/ZL = Button 6 +Classic/Buttons/ZR = Button 7 +Classic/Buttons/- = Button 8 +Classic/Buttons/+ = Button 9 +Classic/Left Stick/Up = Axis 1- +Classic/Left Stick/Down = Axis 1+ +Classic/Left Stick/Left = Axis 0- +Classic/Left Stick/Right = Axis 0+ +Classic/Right Stick/Up = Axis 3- +Classic/Right Stick/Down = Axis 3+ +Classic/Right Stick/Left = Axis 2- +Classic/Right Stick/Right = Axis 2+ +Classic/Triggers/L = Button 4 +Classic/Triggers/R = Button 5 +Classic/D-Pad/Up = Button 13 +Classic/D-Pad/Down = Button 14 +Classic/D-Pad/Left = Button 15 +Classic/D-Pad/Right = Button 16 + diff --git a/packages/games/emulators/dolphinsa/config/RG353P/WiiControllerProfiles/nunchuck.ini b/packages/games/emulators/dolphinsa/config/RG353P/WiiControllerProfiles/nunchuck.ini new file mode 100644 index 000000000..1b40dbeaa --- /dev/null +++ b/packages/games/emulators/dolphinsa/config/RG353P/WiiControllerProfiles/nunchuck.ini @@ -0,0 +1,25 @@ +[Wiimote1] +Device = evdev/0/retrogame_joypad +Extension = Nunchuk +Buttons/A = Button 0 +Buttons/B = Button 1 +Buttons/1 = Button 3 +Buttons/2 = Button 2 +Buttons/- = Button 8 +Buttons/+ = Button 9 +D-Pad/Up = Button 13 +D-Pad/Down = Button 14 +D-Pad/Left = Button 15 +D-Pad/Right = Button 16 +Shake/X = Button 6 +Shake/Y = Button 6 +Shake/Z = Button 6 +Nunchuk/Buttons/C = Button 5 +Nunchuk/Buttons/Z = Button 4 +Nunchuk/Stick/Up = Axis 1- +Nunchuk/Stick/Down = Axis 1+ +Nunchuk/Stick/Left = Axis 0- +Nunchuk/Stick/Right = Axis 0+ +Nunchuk/Shake/X = Button 7 +Nunchuk/Shake/Y = Button 7 +Nunchuk/Shake/Z = Button 7 diff --git a/packages/games/emulators/dolphinsa/config/RG353P/WiiControllerProfiles/remote.ini b/packages/games/emulators/dolphinsa/config/RG353P/WiiControllerProfiles/remote.ini new file mode 100644 index 000000000..be1aea460 --- /dev/null +++ b/packages/games/emulators/dolphinsa/config/RG353P/WiiControllerProfiles/remote.ini @@ -0,0 +1,15 @@ +[Wiimote1] +Device = evdev/0/retrogame_joypad +Buttons/A = Button 0 +Buttons/B = Button 1 +Buttons/1 = Button 3 +Buttons/2 = Button 2 +Buttons/- = Button 8 +Buttons/+ = Button 9 +D-Pad/Up = Button 13 +D-Pad/Down = Button 14 +D-Pad/Left = Button 15 +D-Pad/Right = Button 16 +Shake/X = Button 4 +Shake/Y = Button 4 +Shake/Z = Button 4 diff --git a/packages/games/emulators/dolphinsa/config/RG552/GCPadNew.ini b/packages/games/emulators/dolphinsa/config/RG552/GCPadNew.ini index 8ebced2df..e8eccb2e0 100644 --- a/packages/games/emulators/dolphinsa/config/RG552/GCPadNew.ini +++ b/packages/games/emulators/dolphinsa/config/RG552/GCPadNew.ini @@ -1,12 +1,12 @@ [GCPad1] Device = evdev/0/retrogame_joypad -Buttons/A = Button 0 -Buttons/B = Button 1 -Buttons/Start = Button 9 -Buttons/X = Button 3 -Buttons/Y = Button 2 +Buttons/A = Button 1 +Buttons/B = Button 0 +Buttons/Start = Button 8 +Buttons/X = Button 2 +Buttons/Y = Button 3 Buttons/Z = Button 7 -Buttons/Hotkey = Button 8 +Buttons/Hotkey = Button 9 C-Stick/Dead Zone = 25.000000000000000 C-Stick/Down = Axis 3+ C-Stick/Left = Axis 2- diff --git a/packages/games/emulators/dolphinsa/config/RG552/WiiControllerProfiles/classic.ini b/packages/games/emulators/dolphinsa/config/RG552/WiiControllerProfiles/classic.ini new file mode 100644 index 000000000..93256a3d6 --- /dev/null +++ b/packages/games/emulators/dolphinsa/config/RG552/WiiControllerProfiles/classic.ini @@ -0,0 +1,27 @@ +[Wiimote1] +Device = evdev/0/retrogame_joypad +Extension = Classic +Source = 1 +Classic/Buttons/A = Button 1 +Classic/Buttons/B = Button 0 +Classic/Buttons/X = Button 2 +Classic/Buttons/Y = Button 3 +Classic/Buttons/ZL = Button 6 +Classic/Buttons/ZR = Button 7 +Classic/Buttons/- = Button 8 +Classic/Buttons/+ = Button 9 +Classic/Left Stick/Up = Axis 1- +Classic/Left Stick/Down = Axis 1+ +Classic/Left Stick/Left = Axis 0- +Classic/Left Stick/Right = Axis 0+ +Classic/Right Stick/Up = Axis 3- +Classic/Right Stick/Down = Axis 3+ +Classic/Right Stick/Left = Axis 2- +Classic/Right Stick/Right = Axis 2+ +Classic/Triggers/L = Button 4 +Classic/Triggers/R = Button 5 +Classic/D-Pad/Up = Button 13 +Classic/D-Pad/Down = Button 14 +Classic/D-Pad/Left = Button 15 +Classic/D-Pad/Right = Button 16 + diff --git a/packages/games/emulators/dolphinsa/config/RG552/WiiControllerProfiles/nunchuck.ini b/packages/games/emulators/dolphinsa/config/RG552/WiiControllerProfiles/nunchuck.ini new file mode 100644 index 000000000..1b40dbeaa --- /dev/null +++ b/packages/games/emulators/dolphinsa/config/RG552/WiiControllerProfiles/nunchuck.ini @@ -0,0 +1,25 @@ +[Wiimote1] +Device = evdev/0/retrogame_joypad +Extension = Nunchuk +Buttons/A = Button 0 +Buttons/B = Button 1 +Buttons/1 = Button 3 +Buttons/2 = Button 2 +Buttons/- = Button 8 +Buttons/+ = Button 9 +D-Pad/Up = Button 13 +D-Pad/Down = Button 14 +D-Pad/Left = Button 15 +D-Pad/Right = Button 16 +Shake/X = Button 6 +Shake/Y = Button 6 +Shake/Z = Button 6 +Nunchuk/Buttons/C = Button 5 +Nunchuk/Buttons/Z = Button 4 +Nunchuk/Stick/Up = Axis 1- +Nunchuk/Stick/Down = Axis 1+ +Nunchuk/Stick/Left = Axis 0- +Nunchuk/Stick/Right = Axis 0+ +Nunchuk/Shake/X = Button 7 +Nunchuk/Shake/Y = Button 7 +Nunchuk/Shake/Z = Button 7 diff --git a/packages/games/emulators/dolphinsa/config/RG552/WiiControllerProfiles/remote.ini b/packages/games/emulators/dolphinsa/config/RG552/WiiControllerProfiles/remote.ini new file mode 100644 index 000000000..be1aea460 --- /dev/null +++ b/packages/games/emulators/dolphinsa/config/RG552/WiiControllerProfiles/remote.ini @@ -0,0 +1,15 @@ +[Wiimote1] +Device = evdev/0/retrogame_joypad +Buttons/A = Button 0 +Buttons/B = Button 1 +Buttons/1 = Button 3 +Buttons/2 = Button 2 +Buttons/- = Button 8 +Buttons/+ = Button 9 +D-Pad/Up = Button 13 +D-Pad/Down = Button 14 +D-Pad/Left = Button 15 +D-Pad/Right = Button 16 +Shake/X = Button 4 +Shake/Y = Button 4 +Shake/Z = Button 4 diff --git a/packages/games/emulators/dolphinsa/config/handheld/GCPadNew.ini b/packages/games/emulators/dolphinsa/config/handheld/GCPadNew.ini index b581de890..22884a3fd 100644 --- a/packages/games/emulators/dolphinsa/config/handheld/GCPadNew.ini +++ b/packages/games/emulators/dolphinsa/config/handheld/GCPadNew.ini @@ -26,6 +26,4 @@ Main Stick/Modifier/Range = 50.000000000000000 Main Stick/Right = Axis 0+ Main Stick/Up = Axis 1- Triggers/L = Axis 2+ -Triggers/L = Axis 2+ -Triggers/R = Axis 5+ Triggers/R = Axis 5+ diff --git a/packages/games/emulators/dolphinsa/config/handheld/WiiControllerProfiles/classic.ini b/packages/games/emulators/dolphinsa/config/handheld/WiiControllerProfiles/classic.ini new file mode 100644 index 000000000..b9450699c --- /dev/null +++ b/packages/games/emulators/dolphinsa/config/handheld/WiiControllerProfiles/classic.ini @@ -0,0 +1,27 @@ +[Wiimote1] +Device = evdev/0/Microsoft X-Box 360 pad +Extension = Classic +Source = 1 +Classic/Buttons/A = Button 1 +Classic/Buttons/B = Button 0 +Classic/Buttons/X = Button 3 +Classic/Buttons/Y = Button 2 +Classic/Buttons/ZL = Axis 2+ +Classic/Buttons/ZR = Axis 5+ +Classic/Buttons/- = Button 6 +Classic/Buttons/+ = Button 7 +Classic/Buttons/Home = Button 8 +Classic/Left Stick/Up = Axis 1- +Classic/Left Stick/Down = Axis 1+ +Classic/Left Stick/Left = Axis 0- +Classic/Left Stick/Right = Axis 0+ +Classic/Right Stick/Up = Axis 4- +Classic/Right Stick/Down = Axis 4+ +Classic/Right Stick/Left = Axis 3- +Classic/Right Stick/Right = Axis 3+ +Classic/Triggers/L = Button 4 +Classic/Triggers/R = Button 5 +Classic/D-Pad/Up = Axis 7- +Classic/D-Pad/Down = Axis 7+ +Classic/D-Pad/Left = Axis 6- +Classic/D-Pad/Right = Axis 6+ diff --git a/packages/games/emulators/dolphinsa/config/handheld/WiiControllerProfiles/nunchuck.ini b/packages/games/emulators/dolphinsa/config/handheld/WiiControllerProfiles/nunchuck.ini new file mode 100644 index 000000000..ce65fba9b --- /dev/null +++ b/packages/games/emulators/dolphinsa/config/handheld/WiiControllerProfiles/nunchuck.ini @@ -0,0 +1,26 @@ +[Wiimote1] +Device = evdev/0/Microsoft X-Box 360 pad +Extension = Nunchuk +Buttons/A = Button 0 +Buttons/B = Button 1 +Buttons/1 = Button 2 +Buttons/2 = Button 3 +Buttons/- = Button 6 +Buttons/+ = Button 7 +D-Pad/Up = Axis 7- +D-Pad/Down = Axis 7+ +D-Pad/Left = Axis 6- +D-Pad/Right = Axis 6+ +Buttons/Home = Button 8 +Shake/X = Button 4 +Shake/Y = Button 4 +Shake/Z = Button 4 +Nunchuk/Buttons/C = Button 5 +Nunchuk/Buttons/Z = Axis 5+ +Nunchuk/Stick/Up = Axis 1- +Nunchuk/Stick/Down = Axis 1+ +Nunchuk/Stick/Left = Axis 0- +Nunchuk/Stick/Right = Axis 0+ +Nunchuk/Shake/X = Axis 2+ +Nunchuk/Shake/Y = Axis 2+ +Nunchuk/Shake/Z = Axis 2+ diff --git a/packages/games/emulators/dolphinsa/config/handheld/WiiControllerProfiles/remote.ini b/packages/games/emulators/dolphinsa/config/handheld/WiiControllerProfiles/remote.ini new file mode 100644 index 000000000..29041118a --- /dev/null +++ b/packages/games/emulators/dolphinsa/config/handheld/WiiControllerProfiles/remote.ini @@ -0,0 +1,16 @@ +[Wiimote1] +Device = evdev/0/Microsoft X-Box 360 pad +Buttons/A = Button 0 +Buttons/B = Button 1 +Buttons/1 = Button 2 +Buttons/2 = Button 3 +Buttons/- = Button 6 +Buttons/+ = Button 7 +Buttons/Home = Button 8 +Shake/X = Button 4 +Shake/Y = Button 4 +Shake/Z = Button 4 +D-Pad/Up = Axis 7- +D-Pad/Down = Axis 7+ +D-Pad/Left = Axis 6- +D-Pad/Right = Axis 6+ diff --git a/packages/games/emulators/dolphinsa/package.mk b/packages/games/emulators/dolphinsa/package.mk index 7139c6f3d..11b59d763 100755 --- a/packages/games/emulators/dolphinsa/package.mk +++ b/packages/games/emulators/dolphinsa/package.mk @@ -10,7 +10,7 @@ case ${DEVICE} in RG552|handheld) PKG_SITE="https://github.com/dolphin-emu/dolphin" PKG_URL="${PKG_SITE}.git" - PKG_VERSION="d3718b1b81e64db540005f3ced6a0edfde76f411" + PKG_VERSION="0210d115c22a1c5745c76eaefe38b5d0af3247f9" PKG_PATCH_DIRS+=" wayland" ;; *) @@ -67,7 +67,8 @@ makeinstall_target() { cp -rf ${PKG_BUILD}/.${TARGET_NAME}/Binaries/dolphin* ${INSTALL}/usr/bin cp -rf ${PKG_DIR}/scripts/* ${INSTALL}/usr/bin - chmod +x ${INSTALL}/usr/bin/start_dolphin.sh + chmod +x ${INSTALL}/usr/bin/start_dolphin_gc.sh + chmod +x ${INSTALL}/usr/bin/start_dolphin_wii.sh mkdir -p ${INSTALL}/usr/config/dolphin-emu cp -rf ${PKG_BUILD}/Data/Sys/* ${INSTALL}/usr/config/dolphin-emu @@ -84,5 +85,8 @@ post_install() { ;; esac sed -e "s/@DOLPHIN_PLATFORM@/${DOLPHIN_PLATFORM}/g" \ - -i ${INSTALL}/usr/bin/start_dolphin.sh + -i ${INSTALL}/usr/bin/start_dolphin_gc.sh + sed -e "s/@DOLPHIN_PLATFORM@/${DOLPHIN_PLATFORM}/g" \ + -i ${INSTALL}/usr/bin/start_dolphin_wii.sh + } diff --git a/packages/games/emulators/dolphinsa/scripts/start_dolphin.sh b/packages/games/emulators/dolphinsa/scripts/start_dolphin.sh deleted file mode 100755 index 4a0982e09..000000000 --- a/packages/games/emulators/dolphinsa/scripts/start_dolphin.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash - -# SPDX-License-Identifier: GPL-2.0-or-later -# Copyright (C) 2022-present BrooksyTech (https://github.com/brooksytech) - -. /etc/profile - -if [ ! -d "/storage/.config/dolphin-emu" ]; then - mkdir -p "/storage/.config/dolphin-emu" - cp -r "/usr/config/dolphin-emu" "/storage/.config/" -fi - -if [ ! -d "/storage/.config/dolphin-emu/StateSaves" ]; then - mkdir -p "/storage/.config/dolphin-emu/StateSaves" -fi - -rm -rf /storage/.local/share/dolphin-emu - -ln -sfv /storage/.config/dolphin-emu /storage/.local/share/dolphin-emu - -/usr/bin/dolphin-emu-nogui -p @DOLPHIN_PLATFORM@ -a HLE -e "${1}" diff --git a/packages/games/emulators/dolphinsa/scripts/start_dolphin_gc.sh b/packages/games/emulators/dolphinsa/scripts/start_dolphin_gc.sh new file mode 100755 index 000000000..05ce247c2 --- /dev/null +++ b/packages/games/emulators/dolphinsa/scripts/start_dolphin_gc.sh @@ -0,0 +1,129 @@ +#!/bin/bash + +# SPDX-License-Identifier: GPL-2.0-or-later +# Copyright (C) 2022-present BrooksyTech (https://github.com/brooksytech) + +. /etc/profile + +#Check if dolphin-emu exists in .config +if [ ! -d "/storage/.config/dolphin-emu" ]; then + mkdir -p "/storage/.config/dolphin-emu" + cp -r "/usr/config/dolphin-emu" "/storage/.config/" +fi + +#Link Save States to /roms/savestates +if [ ! -d "/storage/roms/savestates/gamecube/" ]; then + mkdir -p "/storage/roms/savestates/gamecube/" +fi + +rm -rf /storage/.config/dolphin-emu/StateSaves +ln -sf /storage/roms/savestates/gamecube /storage/.config/dolphin-emu/StateSaves + + #Emulation Station Features + GAME=$(echo "${1}"| sed "s#^/.*/##") + AA=$(get_setting anti_aliasing gamecube "${GAME}") + ASPECT=$(get_setting aspect_ratio gamecube "${GAME}") + RENDERER=$(get_setting graphics_backend gamecube "${GAME}") + IRES=$(get_setting internal_resolution gamecube "${GAME}") + FPS=$(get_setting show_fps gamecube "${GAME}") + + #Anti-Aliasing + if [ "$AA" = "0" ] + then + sed -i '/MSAA/c\MSAA = 0' /storage/.config/dolphin-emu/GFX.ini + sed -i '/SSAA/c\SSAA = False' /storage/.config/dolphin-emu/GFX.ini + fi + if [ "$AA" = "2m" ] + then + sed -i '/MSAA/c\MSAA = 2' /storage/.config/dolphin-emu/GFX.ini + sed -i '/SSAA/c\SSAA = False' /storage/.config/dolphin-emu/GFX.ini + fi + if [ "$AA" = "2s" ] + then + sed -i '/MSAA/c\MSAA = 2' /storage/.config/dolphin-emu/GFX.ini + sed -i '/SSAA/c\SSAA = True' /storage/.config/dolphin-emu/GFX.ini + fi + if [ "$AA" = "4m" ] + then + sed -i '/MSAA/c\MSAA = 4' /storage/.config/dolphin-emu/GFX.ini + sed -i '/SSAA/c\SSAA = False' /storage/.config/dolphin-emu/GFX.ini + fi + if [ "$AA" = "4s" ] + then + sed -i '/MSAA/c\MSAA = 4' /storage/.config/dolphin-emu/GFX.ini + sed -i '/SSAA/c\SSAA = True' /storage/.config/dolphin-emu/GFX.ini + fi + if [ "$AA" = "8m" ] + then + sed -i '/MSAA/c\MSAA = 8' /storage/.config/dolphin-emu/GFX.ini + sed -i '/SSAA/c\SSAA = False' /storage/.config/dolphin-emu/GFX.ini + fi + if [ "$AA" = "8s" ] + then + sed -i '/MSAA/c\MSAA = 8' /storage/.config/dolphin-emu/GFX.ini + sed -i '/SSAA/c\SSAA = True' /storage/.config/dolphin-emu/GFX.ini + fi + + #Aspect Ratio + if [ "$ASPECT" = "0" ] + then + sed -i '/AspectRatio/c\AspectRatio = 0' /storage/.config/dolphin-emu/GFX.ini + fi + if [ "$ASPECT" = "1" ] + then + sed -i '/AspectRatio/c\AspectRatio = 1' /storage/.config/dolphin-emu/GFX.ini + fi + if [ "$ASPECT" = "2" ] + then + sed -i '/AspectRatio/c\AspectRatio = 2' /storage/.config/dolphin-emu/GFX.ini + fi + if [ "$ASPECT" = "3" ] + then + sed -i '/AspectRatio/c\AspectRatio = 3' /storage/.config/dolphin-emu/GFX.ini + fi + + #Video Backend + if [ "$RENDERER" = "opengl" ] + then + sed -i '/GFXBackend/c\GFXBackend = OGL' /storage/.config/dolphin-emu/Dolphin.ini + fi + + if [ "$RENDERER" = "vulkan" ] + then + sed -i '/GFXBackend/c\GFXBackend = Vulkan' /storage/.config/dolphin-emu/Dolphin.ini + fi + if [ "$RENDERER" = "software" ] + then + sed -i '/GFXBackend/c\GFXBackend = Software Renderer' /storage/.config/dolphin-emu/Dolphin.ini + fi + + #Internal Resolution + if [ "$IRES" = "1" ] + then + sed -i '/InternalResolution/c\InternalResolution = 1' /storage/.config/dolphin-emu/GFX.ini + fi + if [ "$IRES" = "2" ] + then + sed -i '/InternalResolution/c\InternalResolution = 2' /storage/.config/dolphin-emu/GFX.ini + fi + if [ "$IRES" = "3" ] + then + sed -i '/InternalResolution/c\InternalResolution = 3' /storage/.config/dolphin-emu/GFX.ini + fi + + #Show FPS + if [ "$FPS" = "false" ] + then + sed -i '/ShowFPS/c\ShowFPS = False' /storage/.config/dolphin-emu/GFX.ini + fi + if [ "$FPS" = "true" ] + then + sed -i '/ShowFPS/c\ShowFPS = true' /storage/.config/dolphin-emu/GFX.ini + fi + +#Link .config/dolphin-emu to .local +rm -rf /storage/.local/share/dolphin-emu +ln -sf /storage/.config/dolphin-emu /storage/.local/share/dolphin-emu + +#Run Dolphin emulator +/usr/bin/dolphin-emu-nogui -p @DOLPHIN_PLATFORM@ -a HLE -e "${1}" diff --git a/packages/games/emulators/dolphinsa/scripts/start_dolphin_wii.sh b/packages/games/emulators/dolphinsa/scripts/start_dolphin_wii.sh new file mode 100755 index 000000000..26b1afd1d --- /dev/null +++ b/packages/games/emulators/dolphinsa/scripts/start_dolphin_wii.sh @@ -0,0 +1,149 @@ +#!/bin/bash + +# SPDX-License-Identifier: GPL-2.0-or-later +# Copyright (C) 2022-present BrooksyTech (https://github.com/brooksytech) + +. /etc/profile + +#Check if dolphin-emu exists in .config +if [ ! -d "/storage/.config/dolphin-emu" ]; then + mkdir -p "/storage/.config/dolphin-emu" + cp -r "/usr/config/dolphin-emu" "/storage/.config/" +fi + +#Check if WiiControllerProfiles exists in .config/dolphin-emu +if [ ! -d "/storage/.config/dolphin-emu/WiiControllerProfiles" ]; then + cp -r "/usr/config/dolphin-emu" "/storage/.config/dolphin-emu/WiiControllerProfiles" +fi + +#Link Save States to /roms/savestates/wii +if [ ! -d "/storage/roms/savestates/wii/" ]; then + mkdir -p "/storage/roms/savestates/wii/" +fi + +rm -rf /storage/.config/dolphin-emu/StateSaves +ln -sf /storage/roms/savestates/wii /storage/.config/dolphin-emu/StateSaves + + #Emulation Station options + GAME=$(echo "${1}"| sed "s#^/.*/##") + AA=$(get_setting anti_aliasing wii "${GAME}") + ASPECT=$(get_setting aspect_ratio wii "${GAME}") + RENDERER=$(get_setting graphics_backend wii "${GAME}") + IRES=$(get_setting internal_resolution wii "${GAME}") + FPS=$(get_setting show_fps wii "${GAME}") + CON=$(get_setting wii_controller_profile wii "${GAME}") + + #Anti-Aliasing + if [ "$AA" = "0" ] + then + sed -i '/MSAA/c\MSAA = 0' /storage/.config/dolphin-emu/GFX.ini + sed -i '/SSAA/c\SSAA = False' /storage/.config/dolphin-emu/GFX.ini + fi + if [ "$AA" = "2m" ] + then + sed -i '/MSAA/c\MSAA = 2' /storage/.config/dolphin-emu/GFX.ini + sed -i '/SSAA/c\SSAA = False' /storage/.config/dolphin-emu/GFX.ini + fi + if [ "$AA" = "2s" ] + then + sed -i '/MSAA/c\MSAA = 2' /storage/.config/dolphin-emu/GFX.ini + sed -i '/SSAA/c\SSAA = True' /storage/.config/dolphin-emu/GFX.ini + fi + if [ "$AA" = "4m" ] + then + sed -i '/MSAA/c\MSAA = 4' /storage/.config/dolphin-emu/GFX.ini + sed -i '/SSAA/c\SSAA = False' /storage/.config/dolphin-emu/GFX.ini + fi + if [ "$AA" = "4s" ] + then + sed -i '/MSAA/c\MSAA = 4' /storage/.config/dolphin-emu/GFX.ini + sed -i '/SSAA/c\SSAA = True' /storage/.config/dolphin-emu/GFX.ini + fi + if [ "$AA" = "8m" ] + then + sed -i '/MSAA/c\MSAA = 8' /storage/.config/dolphin-emu/GFX.ini + sed -i '/SSAA/c\SSAA = False' /storage/.config/dolphin-emu/GFX.ini + fi + if [ "$AA" = "8s" ] + then + sed -i '/MSAA/c\MSAA = 8' /storage/.config/dolphin-emu/GFX.ini + sed -i '/SSAA/c\SSAA = True' /storage/.config/dolphin-emu/GFX.ini + fi + + #Aspect Ratio + if [ "$ASPECT" = "0" ] + then + sed -i '/AspectRatio/c\AspectRatio = 0' /storage/.config/dolphin-emu/GFX.ini + fi + if [ "$ASPECT" = "1" ] + then + sed -i '/AspectRatio/c\AspectRatio = 1' /storage/.config/dolphin-emu/GFX.ini + fi + if [ "$ASPECT" = "2" ] + then + sed -i '/AspectRatio/c\AspectRatio = 2' /storage/.config/dolphin-emu/GFX.ini + fi + if [ "$ASPECT" = "3" ] + then + sed -i '/AspectRatio/c\AspectRatio = 3' /storage/.config/dolphin-emu/GFX.ini + fi + + #Video Backend + if [ "$RENDERER" = "opengl" ] + then + sed -i '/GFXBackend/c\GFXBackend = OGL' /storage/.config/dolphin-emu/Dolphin.ini + fi + + if [ "$RENDERER" = "vulkan" ] + then + sed -i '/GFXBackend/c\GFXBackend = Vulkan' /storage/.config/dolphin-emu/Dolphin.ini + fi + if [ "$RENDERER" = "software" ] + then + sed -i '/GFXBackend/c\GFXBackend = Software Renderer' /storage/.config/dolphin-emu/Dolphin.ini + fi + + #Internal Resolution + if [ "$IRES" = "1" ] + then + sed -i '/InternalResolution/c\InternalResolution = 1' /storage/.config/dolphin-emu/GFX.ini + fi + if [ "$IRES" = "2" ] + then + sed -i '/InternalResolution/c\InternalResolution = 2' /storage/.config/dolphin-emu/GFX.ini + fi + if [ "$IRES" = "3" ] + then + sed -i '/InternalResolution/c\InternalResolution = 3' /storage/.config/dolphin-emu/GFX.ini + fi + + #Show FPS + if [ "$FPS" = "true" ] + then + sed -i '/ShowFPS/c\ShowFPS = True' /storage/.config/dolphin-emu/GFX.ini + fi + if [ "$FPS" = "false" ] + then + sed -i '/ShowFPS/c\ShowFPS = False' /storage/.config/dolphin-emu/GFX.ini + fi + + #Wii Controller Profile + if [ "$CON" = "remote" ] + then + cp -r /storage/.config/dolphin-emu/WiiControllerProfiles/remote.ini /storage/.config/dolphin-emu/WiimoteNew.ini + fi + if [ "$CON" = "nunchuck" ] + then + cp -r /storage/.config/dolphin-emu/WiiControllerProfiles/nunchuck.ini /storage/.config/dolphin-emu/WiimoteNew.ini + fi + if [ "$CON" = "classic" ] + then + cp -r /storage/.config/dolphin-emu/WiiControllerProfiles/classic.ini /storage/.config/dolphin-emu/WiimoteNew.ini + fi + +#Link .config/dolphin-emu to .local +rm -rf /storage/.local/share/dolphin-emu +ln -sf /storage/.config/dolphin-emu /storage/.local/share/dolphin-emu + +#Run Dolphin emulator +/usr/bin/dolphin-emu-nogui -p @DOLPHIN_PLATFORM@ -a HLE -e "${1}" diff --git a/packages/jelos/sources/scripts/runemu.sh b/packages/jelos/sources/scripts/runemu.sh index 6421c3374..1b1bc52a2 100755 --- a/packages/jelos/sources/scripts/runemu.sh +++ b/packages/jelos/sources/scripts/runemu.sh @@ -281,13 +281,19 @@ then RUNTHIS='${TBASH} /usr/bin/start_pcsx2.sh "${ROMNAME}"' fi ;; - "gamecube"|"wii") + "gamecube") jslisten set "-9 dolphin-emu-nogui" - if [ "$EMU" = "dolphinsa" ]; then - RUNTHIS='${TBASH} /usr/bin/start_dolphin.sh "${ROMNAME}"' + if [ "$EMU" = "dolphinsa-gc" ]; then + RUNTHIS='${TBASH} /usr/bin/start_dolphin_gc.sh "${ROMNAME}"' fi ;; + "wii") + jslisten set "-9 dolphin-emu-nogui" + if [ "$EMU" = "dolphinsa-wii" ]; then + RUNTHIS='${TBASH} /usr/bin/start_dolphin_wii.sh "${ROMNAME}"' + fi + ;; "mplayer") jslisten set "mpv" RUNTHIS='${TBASH} /usr/bin/mpv_video.sh "${ROMNAME}"' diff --git a/packages/ui/emulationstation/config/common/es_features.cfg b/packages/ui/emulationstation/config/common/es_features.cfg index a3e5ca095..4091b7af3 100644 --- a/packages/ui/emulationstation/config/common/es_features.cfg +++ b/packages/ui/emulationstation/config/common/es_features.cfg @@ -21,6 +21,77 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/ui/emulationstation/config/common/es_systems.cfg b/packages/ui/emulationstation/config/common/es_systems.cfg index 849f54de4..5b8f0a0cf 100644 --- a/packages/ui/emulationstation/config/common/es_systems.cfg +++ b/packages/ui/emulationstation/config/common/es_systems.cfg @@ -779,14 +779,38 @@ 2001 console /storage/roms/gamecube - .gcm .GCM .iso .ISO .gcz .GCZ .ciso .CISO .wbfs .WBFS .rvz .RVZ + .gcm .GCM .iso .ISO .gcz .GCZ .ciso .CISO .wbfs .WBFS .rvz .RVZ .dol .DOL /usr/bin/runemu.sh %ROM% -P%SYSTEM% --core=%CORE% --emulator=%EMULATOR% --controllers="%CONTROLLERSCONFIG%" gc gc - + - dolphinsa + dolphinsa-gc + + + + + dolphin + + + + + + Nintendo Wii + wii + Nintendo + 2006 + console + /storage/roms/wii + .gcm .GCM .iso .ISO .gcz .GCZ .ciso .CISO .wbfs .WBFS .rvz .RVZ .dol .DOL + /usr/bin/runemu.sh %ROM% -P%SYSTEM% --core=%CORE% --emulator=%EMULATOR% --controllers="%CONTROLLERSCONFIG%" + wii + wii + + + + dolphinsa-wii 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 a96bd8470..c4ef4062d 100644 --- a/packages/ui/emulationstation/config/device/X86_64/es_systems.cfg +++ b/packages/ui/emulationstation/config/device/X86_64/es_systems.cfg @@ -796,19 +796,19 @@ 2001 console /storage/roms/gamecube - .gcm .GCM .iso .ISO .gcz .GCZ .ciso .CISO .wbfs .WBFS .rvz .RVZ + .gcm .GCM .iso .ISO .gcz .GCZ .ciso .CISO .wbfs .WBFS .rvz .RVZ .dol .DOL /usr/bin/runemu.sh %ROM% -P%SYSTEM% --core=%CORE% --emulator=%EMULATOR% --controllers="%CONTROLLERSCONFIG%" gc gc - + - dolphinsa + dolphinsa-gc - dolphin + dolphin @@ -820,14 +820,14 @@ 2006 console /storage/roms/wii - .gcm .GCM .iso .ISO .gcz .GCZ .ciso .CISO .wbfs .WBFS .rvz .RVZ + .gcm .GCM .iso .ISO .gcz .GCZ .ciso .CISO .wbfs .WBFS .rvz .RVZ .dol .DOL /usr/bin/runemu.sh %ROM% -P%SYSTEM% --core=%CORE% --emulator=%EMULATOR% --controllers="%CONTROLLERSCONFIG%" wii wii - + - dolphinsa + dolphinsa-wii