From f1657ba737631fef402c899b3c6d62532db196a1 Mon Sep 17 00:00:00 2001 From: XargonWan Date: Tue, 16 Jan 2024 14:08:12 +0100 Subject: [PATCH 001/112] RYUJINX: re-added --- net.retrodeck.retrodeck.yml | 17 +++++++++++++++++ old/removed-modules.yml | 19 +------------------ 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/net.retrodeck.retrodeck.yml b/net.retrodeck.retrodeck.yml index 62c2b843..1cd5586f 100644 --- a/net.retrodeck.retrodeck.yml +++ b/net.retrodeck.retrodeck.yml @@ -1334,6 +1334,23 @@ modules: # MAME - End + # Ryujinx Appimage - START + # https://ryujinx.org/download + + - name: Ryujinx + buildsystem: simple + build-commands: + - | + tar -zxvf ryujinx-1.1.685-linux_x64.tar.gz + mv -v publish ${FLATPAK_DEST}/ryujinx + ln -sv ${FLATPAK_DEST}/ryujinx/Ryujinx ${FLATPAK_DEST}/bin/Ryujinx + sources: + - type: file + url: https://github.com/Ryujinx/release-channel-master/releases/download/1.1.1111/ryujinx-1.1.1111-linux_x64.tar.gz + sha256: 612dd28c38e5f8657da0f1b3f54385ffbb304053bca7c9d8de027242b0c9f946 + + # Ryujinx Appimage - END + # External manifests end - name: retrodeck diff --git a/old/removed-modules.yml b/old/removed-modules.yml index 43d5cab3..04274441 100644 --- a/old/removed-modules.yml +++ b/old/removed-modules.yml @@ -112,24 +112,7 @@ # Duckstation-DontUpdate - END - # Ryujinx Appimage - START - # https://ryujinx.org/download - - # - name: Ryujinx - # buildsystem: simple - # build-commands: - # - | - # tar -zxvf ryujinx-1.1.685-linux_x64.tar.gz - # mv -v publish ${FLATPAK_DEST}/ryujinx - # ln -sv ${FLATPAK_DEST}/ryujinx/Ryujinx ${FLATPAK_DEST}/bin/Ryujinx - # sources: - # - type: file - # url: https://github.com/Ryujinx/release-channel-master/releases/download/1.1.685/ryujinx-1.1.685-linux_x64.tar.gz - # sha256: bc4d7076106d7aa59c3a3ea22b83c553e5fa1a897815831adcf18cc13d729e15 - - # Ryujinx Appimage - END - - # Ryujinx - START + # Ryujinx - START # https://github.com/flathub/org.ryujinx.Ryujinx - name: Ryujinx From 56edb70232f0411dd0bf3274a32bef56f3c41970 Mon Sep 17 00:00:00 2001 From: XargonWan Date: Wed, 17 Jan 2024 08:27:05 +0100 Subject: [PATCH 002/112] RYUJINX: fixed wrong tar command --- net.retrodeck.retrodeck.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net.retrodeck.retrodeck.yml b/net.retrodeck.retrodeck.yml index 1cd5586f..6dfd2de5 100644 --- a/net.retrodeck.retrodeck.yml +++ b/net.retrodeck.retrodeck.yml @@ -1341,7 +1341,7 @@ modules: buildsystem: simple build-commands: - | - tar -zxvf ryujinx-1.1.685-linux_x64.tar.gz + tar -zxvf ryujinx-*-linux_x64.tar.gz mv -v publish ${FLATPAK_DEST}/ryujinx ln -sv ${FLATPAK_DEST}/ryujinx/Ryujinx ${FLATPAK_DEST}/bin/Ryujinx sources: From b46fd7d26f13272a90535cd6cd198a3727feaa5b Mon Sep 17 00:00:00 2001 From: XargonWan Date: Tue, 30 Jan 2024 14:52:22 +0100 Subject: [PATCH 003/112] RYUJINX: updated --- net.retrodeck.retrodeck.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/net.retrodeck.retrodeck.yml b/net.retrodeck.retrodeck.yml index 125b31ba..34e15200 100644 --- a/net.retrodeck.retrodeck.yml +++ b/net.retrodeck.retrodeck.yml @@ -1316,13 +1316,13 @@ modules: buildsystem: simple build-commands: - | - tar -zxvf ryujinx-*-linux_x64.tar.gz + tar -zxvf *.tar.gz mv -v publish ${FLATPAK_DEST}/ryujinx ln -sv ${FLATPAK_DEST}/ryujinx/Ryujinx ${FLATPAK_DEST}/bin/Ryujinx sources: - type: file - url: https://github.com/Ryujinx/release-channel-master/releases/download/1.1.1111/ryujinx-1.1.1111-linux_x64.tar.gz - sha256: 612dd28c38e5f8657da0f1b3f54385ffbb304053bca7c9d8de027242b0c9f946 + url: https://github.com/Ryujinx/release-channel-master/releases/download/1.1.1151/ryujinx-1.1.1151-linux_x64.tar.gz + sha256: 34ac1d2fae46dc63cf7bdd0dfd9c819e6a4efec9aba35ee4d0f98fce63e49faa # Ryujinx Appimage - END From d00ab922feb26e2c2c71599b2189e048fa383232 Mon Sep 17 00:00:00 2001 From: XargonWan Date: Mon, 5 Feb 2024 09:35:56 +0100 Subject: [PATCH 004/112] RYUJINX: updated to 1.1.1159 --- net.retrodeck.retrodeck.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net.retrodeck.retrodeck.yml b/net.retrodeck.retrodeck.yml index 34e15200..27b52a61 100644 --- a/net.retrodeck.retrodeck.yml +++ b/net.retrodeck.retrodeck.yml @@ -1321,8 +1321,8 @@ modules: ln -sv ${FLATPAK_DEST}/ryujinx/Ryujinx ${FLATPAK_DEST}/bin/Ryujinx sources: - type: file - url: https://github.com/Ryujinx/release-channel-master/releases/download/1.1.1151/ryujinx-1.1.1151-linux_x64.tar.gz - sha256: 34ac1d2fae46dc63cf7bdd0dfd9c819e6a4efec9aba35ee4d0f98fce63e49faa + url: https://github.com/Ryujinx/release-channel-master/releases/download/1.1.1159/ryujinx-1.1.1159-linux_x64.tar.gz + sha256: 5f2354ae6b1c982f4f2ea4734c1320ce32dca2badb8c1f6e4216353f54faaa94 # Ryujinx Appimage - END From 3af92ed71a323b3a1bfaeeacfc918ee9e0a60058 Mon Sep 17 00:00:00 2001 From: icenine451 Date: Tue, 6 Feb 2024 10:18:58 -0500 Subject: [PATCH 005/112] Add z64, ngc and pce compression targets --- .../defaults/retrodeck/reference_lists/compression_targets.cfg | 1 + .../retrodeck/reference_lists/zip_compressable_extensions.cfg | 3 +++ 2 files changed, 4 insertions(+) diff --git a/emu-configs/defaults/retrodeck/reference_lists/compression_targets.cfg b/emu-configs/defaults/retrodeck/reference_lists/compression_targets.cfg index d1d7d923..4ae00365 100644 --- a/emu-configs/defaults/retrodeck/reference_lists/compression_targets.cfg +++ b/emu-configs/defaults/retrodeck/reference_lists/compression_targets.cfg @@ -40,3 +40,4 @@ sega32xjp sega32xna snes snesna +tg16 diff --git a/emu-configs/defaults/retrodeck/reference_lists/zip_compressable_extensions.cfg b/emu-configs/defaults/retrodeck/reference_lists/zip_compressable_extensions.cfg index 585e7584..72966ab7 100644 --- a/emu-configs/defaults/retrodeck/reference_lists/zip_compressable_extensions.cfg +++ b/emu-configs/defaults/retrodeck/reference_lists/zip_compressable_extensions.cfg @@ -40,7 +40,9 @@ .msa .nds .nes +.ngc .o +.pce .prg .rom .sfc @@ -58,3 +60,4 @@ .unif .xex .xfd +.z64 From c9f62cddb3e61c89b0f3ef619f606b300f3f74e5 Mon Sep 17 00:00:00 2001 From: XargonWan Date: Tue, 13 Feb 2024 11:10:10 +0100 Subject: [PATCH 006/112] RYUJINX: updated --- net.retrodeck.retrodeck.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net.retrodeck.retrodeck.yml b/net.retrodeck.retrodeck.yml index 27b52a61..d799f3a3 100644 --- a/net.retrodeck.retrodeck.yml +++ b/net.retrodeck.retrodeck.yml @@ -1321,7 +1321,7 @@ modules: ln -sv ${FLATPAK_DEST}/ryujinx/Ryujinx ${FLATPAK_DEST}/bin/Ryujinx sources: - type: file - url: https://github.com/Ryujinx/release-channel-master/releases/download/1.1.1159/ryujinx-1.1.1159-linux_x64.tar.gz + url: https://github.com/Ryujinx/release-channel-master/releases/download/1.1.1192/ryujinx-1.1.1192-linux_x64.tar.gz sha256: 5f2354ae6b1c982f4f2ea4734c1320ce32dca2badb8c1f6e4216353f54faaa94 # Ryujinx Appimage - END From 55c359987499b733e84042aeb147ebead4359e7a Mon Sep 17 00:00:00 2001 From: XargonWan Date: Tue, 13 Feb 2024 12:18:48 +0100 Subject: [PATCH 007/112] RYUJINX: fixed sha --- net.retrodeck.retrodeck.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net.retrodeck.retrodeck.yml b/net.retrodeck.retrodeck.yml index d799f3a3..0062f4a5 100644 --- a/net.retrodeck.retrodeck.yml +++ b/net.retrodeck.retrodeck.yml @@ -1322,7 +1322,7 @@ modules: sources: - type: file url: https://github.com/Ryujinx/release-channel-master/releases/download/1.1.1192/ryujinx-1.1.1192-linux_x64.tar.gz - sha256: 5f2354ae6b1c982f4f2ea4734c1320ce32dca2badb8c1f6e4216353f54faaa94 + sha256: 41716233f5745a7df1e411af6bac9d828f0b6b6feb63b5ef87445b81b01dee54 # Ryujinx Appimage - END From 46b9922a98728006ceb46b547cb03e3cd517e7a2 Mon Sep 17 00:00:00 2001 From: XargonWan Date: Wed, 14 Feb 2024 00:05:03 +0100 Subject: [PATCH 008/112] Triggering build From db3aab771fc25f67b824e7545dde797245636c49 Mon Sep 17 00:00:00 2001 From: XargonWan Date: Wed, 14 Feb 2024 09:30:26 +0100 Subject: [PATCH 009/112] RYUJINX: added reset to cli and Configurator --- retrodeck.sh | 4 ++-- tools/configurator.sh | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/retrodeck.sh b/retrodeck.sh index edb0241a..e95920cc 100644 --- a/retrodeck.sh +++ b/retrodeck.sh @@ -57,9 +57,9 @@ https://retrodeck.net ;; --reset-component*) echo "You are about to reset one or more RetroDECK components or emulators." - echo "Available options are: es-de, retroarch, cemu, citra, dolphin, duckstation, melonds, pcsx3, pico8, ppsspp, primehack, rpcs3, xemu, yuzu, vita3k, mame, gzdoom, boilr, all" + echo "Available options are: es-de, retroarch, cemu, citra, dolphin, duckstation, melonds, pcsx3, pico8, ppsspp, primehack, rpcs3, ryujinx, xemu, yuzu, vita3k, mame, gzdoom, boilr, all" read -p "Please enter the component you would like to reset: " component - if [[ "$component" =~ ^(es-de | retroarch | cemu | citra | dolphin | duckstation | melonds | pcsx3 | pico8 | ppsspp | primehack | rpcs3 | xemu | yuzu | vita3k | mame | gzdoom | boilr | all)$ ]]; then + if [[ "$component" =~ ^(es-de | retroarch | cemu | citra | dolphin | duckstation | melonds | pcsx3 | pico8 | ppsspp | primehack | rpcs3 | ryujinx | xemu | yuzu | vita3k | mame | gzdoom | boilr | all)$ ]]; then read -p "You are about to reset $component to default settings. Enter 'y' to continue, 'n' to stop: " response if [[ $response == [yY] ]]; then prepare_component "reset" "$component" "cli" diff --git a/tools/configurator.sh b/tools/configurator.sh index 196befb2..fa86cc08 100644 --- a/tools/configurator.sh +++ b/tools/configurator.sh @@ -1009,6 +1009,7 @@ configurator_reset_dialog() { "PPSSPP" "Reset the PSP emulator PPSSPP to default settings" \ "Primehack" "Reset the Metroid Prime emulator Primehack to default settings" \ "RPCS3" "Reset the PS3 emulator RPCS3 to default settings" \ + "Ryujinx" "Reset the Switch emulator Ryujinx to default settings" \ "Vita3k" "Reset the PS Vita emulator Vita3k to default settings" \ "XEMU" "Reset the XBOX emulator XEMU to default settings" \ "Yuzu" "Reset the Switch emulator Yuzu to default settings" ) From 29da4eef21c530ca50ca6e18c5d61b109aec4d89 Mon Sep 17 00:00:00 2001 From: XargonWan Date: Wed, 14 Feb 2024 10:47:39 +0100 Subject: [PATCH 010/112] RYUJINX: fixed config file substitutions --- functions/prepare_component.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/functions/prepare_component.sh b/functions/prepare_component.sh index 510f2985..e8cac45c 100644 --- a/functions/prepare_component.sh +++ b/functions/prepare_component.sh @@ -549,14 +549,14 @@ prepare_component() { rm -rf "$multi_user_data_folder/$SteamAppUser/config/Ryujinx" mkdir -p "$multi_user_data_folder/$SteamAppUser/config/Ryujinx/system" cp -fv $emuconfigs/ryujinx/* "$multi_user_data_folder/$SteamAppUser/config/Ryujinx" - sed -i 's#/home/deck/retrodeck#'$rdhome'#g' "$multi_user_data_folder/$SteamAppUser/config/Ryujinx/Config.json" + sed -i 's#RETRODECKHOMEDIR#'$rdhome'#g' "$multi_user_data_folder/$SteamAppUser/config/Ryujinx/Config.json" dir_prep "$multi_user_data_folder/$SteamAppUser/config/Ryujinx" "/var/config/Ryujinx" else # removing config directory to wipe legacy files rm -rf /var/config/Ryujinx mkdir -p /var/config/Ryujinx/system cp -fv $emuconfigs/ryujinx/* /var/config/Ryujinx - sed -i 's#/home/deck/retrodeck#'$rdhome'#g' "$ryujinxconf" + sed -i 's#RETRODECKHOMEDIR#'$rdhome'#g' "$ryujinxconf" fi fi if [[ "$action" == "reset" ]] || [[ "$action" == "postmove" ]]; then # Run commands that apply to both resets and moves From d1d0a938e3f13394ae35559fd2ecf8c64d5bc7e2 Mon Sep 17 00:00:00 2001 From: XargonWan Date: Wed, 14 Feb 2024 10:47:55 +0100 Subject: [PATCH 011/112] RYUJINX: updated config file to version 49 --- emu-configs/ryujinx/Config.json | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/emu-configs/ryujinx/Config.json b/emu-configs/ryujinx/Config.json index e58b6ead..3c977be0 100644 --- a/emu-configs/ryujinx/Config.json +++ b/emu-configs/ryujinx/Config.json @@ -1,5 +1,5 @@ { - "version": 48, + "version": 49, "enable_file_log": true, "backend_threading": "Auto", "res_scale": 1, @@ -136,7 +136,7 @@ "enable_rumble": true }, "left_joycon": { - "button_minus": "Minus", + "button_minus": "Back", "button_l": "LeftShoulder", "button_zl": "LeftTrigger", "button_sl": "Unbound", @@ -147,7 +147,7 @@ "dpad_right": "DpadRight" }, "right_joycon": { - "button_plus": "Plus", + "button_plus": "Start", "button_r": "RightShoulder", "button_zr": "RightTrigger", "button_sl": "Unbound", @@ -166,6 +166,7 @@ ], "graphics_backend": "Vulkan", "preferred_gpu": "0x1002_0x163F", + "multiplayer_mode": 0, "multiplayer_lan_interface_id": "0", "use_hypervisor": true } From 4469e984c78f1c83aeeb84d97c44753166293c69 Mon Sep 17 00:00:00 2001 From: XargonWan Date: Thu, 15 Feb 2024 09:34:27 +0100 Subject: [PATCH 012/112] RYUJINX: added a function to check for keys --- functions/functions.sh | 37 +++++++++++++++++++++++++++++++++++++ retrodeck.sh | 3 +++ 2 files changed, 40 insertions(+) diff --git a/functions/functions.sh b/functions/functions.sh index 98768855..5f66cbb5 100644 --- a/functions/functions.sh +++ b/functions/functions.sh @@ -559,6 +559,43 @@ easter_eggs() { cp -f "$new_splash_file" "$current_splash_file" # Deploy assigned splash screen } +manage_ryujinx_keys() { + # This function checks if Switch keys are existing and symlinks them inside the Ryujinx system folder + # If the symlinks are broken it recreates them + + echo "Checking Ryujinx Switch keys." #TODO logging + ryujinx_system="/var/config/Ryujinx/system" # Set the path to the Ryujinx system folder + # Check if the keys folder exists + if [ -d "$bios_folder/switch/keys" ]; then + # Check if there are files in the keys folder + if [ -n "$(find "$bios_folder/switch/keys" -maxdepth 1 -type f)" ]; then + # Iterate over each file in the keys folder + for file in "$bios_folder/switch/keys"/*; do + filename=$(basename "$file") + symlink="$ryujinx_system/$filename" + + # Check if the symlink exists and is valid + if [ -L "$symlink" ] && [ "$(readlink -f "$symlink")" = "$file" ]; then + echo "Found \"$symlink\" and it's a valid symlink." #TODO logging + continue # Skip if the symlink is already valid + fi + + # Remove broken symlink or non-symlink file + echo "Found \"$symlink\" but it's not a valid symlink. Repeiring it" #TODO logging + [ -e "$symlink" ] && rm "$symlink" + + # Create symlink + ln -s "$file" "$symlink" + echo "Created symlink: \"$symlink\"" + done + else + echo "No files found in $bios_folder/switch/keys. Continuing" #TODO logging + fi + else + echo "Directory $bios_folder/switch/keys does not exist. Maybe Ryujinx was never run. Continuing" #TODO logging + fi +} + quit_retrodeck() { pkill -f retrodeck pkill -f emulationstation diff --git a/retrodeck.sh b/retrodeck.sh index 97934a43..bc18205a 100644 --- a/retrodeck.sh +++ b/retrodeck.sh @@ -182,6 +182,9 @@ if [[ -f "$HOME/.steam/steam/controller_base/templates/RetroDECK_controller_conf fi # REMOVE BEFORE NEXT VERSION RELEASE +# Linking switch keys for Ryujinx +manage_ryujinx_keys + # Normal Startup start_retrodeck From cf5bd4019b51933c4162971df6f1edf86a0d161d Mon Sep 17 00:00:00 2001 From: XargonWan Date: Thu, 15 Feb 2024 09:40:04 +0100 Subject: [PATCH 013/112] RYUJINX: updated config --- emu-configs/ryujinx/Config.json | 212 +++++++++++++++++++++++++++++--- 1 file changed, 197 insertions(+), 15 deletions(-) diff --git a/emu-configs/ryujinx/Config.json b/emu-configs/ryujinx/Config.json index 3c977be0..630011ad 100644 --- a/emu-configs/ryujinx/Config.json +++ b/emu-configs/ryujinx/Config.json @@ -12,7 +12,7 @@ "graphics_shaders_dump_path": "", "logging_enable_debug": false, "logging_enable_stub": false, - "logging_enable_info": true, + "logging_enable_info": false, "logging_enable_warn": true, "logging_enable_error": true, "logging_enable_trace": false, @@ -91,13 +91,13 @@ "enable_keyboard": false, "enable_mouse": false, "hotkeys": { - "toggle_vsync": "F1", - "screenshot": "F8", - "show_ui": "F4", - "pause": "F5", - "toggle_mute": "F2", - "res_scale_up": "Unbound", - "res_scale_down": "Unbound", + "toggle_vsync": "Unknown", + "screenshot": "Unknown", + "show_ui": "F1", + "pause": "F4", + "toggle_mute": "Unknown", + "res_scale_up": "F7", + "res_scale_down": "F8", "volume_up": "Unbound", "volume_down": "Unbound" }, @@ -121,14 +121,78 @@ }, "deadzone_left": 0, "deadzone_right": 0, - "range_left": 1, + "range_left": 1.2, "range_right": 1, - "trigger_threshold": 0.5, + "trigger_threshold": 0, + "motion": { + "slot": 0, + "alt_slot": 0, + "mirror_input": false, + "dsu_server_host": "127.0.0.1", + "dsu_server_port": 26760, + "motion_backend": "CemuHook", + "sensitivity": 100, + "gyro_deadzone": 1, + "enable_motion": true + }, + "rumble": { + "strong_rumble": 2.1, + "weak_rumble": 1, + "enable_rumble": true + }, + "left_joycon": { + "button_minus": "Back", + "button_l": "LeftShoulder", + "button_zl": "LeftTrigger", + "button_sl": "Unbound", + "button_sr": "Unbound", + "dpad_up": "DpadUp", + "dpad_down": "DpadDown", + "dpad_left": "DpadLeft", + "dpad_right": "DpadRight" + }, + "right_joycon": { + "button_plus": "Start", + "button_r": "RightShoulder", + "button_zr": "RightTrigger", + "button_sl": "Unbound", + "button_sr": "Unbound", + "button_x": "Y", + "button_b": "A", + "button_y": "X", + "button_a": "B" + }, + "version": 1, + "backend": "GamepadSDL2", + "id": "0-f6790003-28de-0000-ff11-000001000000", + "controller_type": "ProController", + "player_index": "Player1" + }, + { + "left_joycon_stick": { + "joystick": "Left", + "invert_stick_x": false, + "invert_stick_y": false, + "rotate90_cw": false, + "stick_button": "LeftStick" + }, + "right_joycon_stick": { + "joystick": "Right", + "invert_stick_x": false, + "invert_stick_y": false, + "rotate90_cw": false, + "stick_button": "RightStick" + }, + "deadzone_left": 0, + "deadzone_right": 0, + "range_left": 1.2, + "range_right": 1, + "trigger_threshold": 0, "motion": { "motion_backend": "GamepadDriver", "sensitivity": 100, "gyro_deadzone": 1, - "enable_motion": true + "enable_motion": false }, "rumble": { "strong_rumble": 1, @@ -159,9 +223,127 @@ }, "version": 1, "backend": "GamepadSDL2", - "id": "0-f6790003-28de-0000-ff11-000001000000", - "controller_type": "Handheld", - "player_index": "Handheld" + "id": "1-00000003-28de-0000-ff11-000001000000", + "controller_type": "ProController", + "player_index": "Player2" + }, + { + "left_joycon_stick": { + "joystick": "Left", + "invert_stick_x": false, + "invert_stick_y": false, + "rotate90_cw": false, + "stick_button": "LeftStick" + }, + "right_joycon_stick": { + "joystick": "Right", + "invert_stick_x": false, + "invert_stick_y": false, + "rotate90_cw": false, + "stick_button": "RightStick" + }, + "deadzone_left": 0, + "deadzone_right": 0, + "range_left": 1.2, + "range_right": 1, + "trigger_threshold": 0, + "motion": { + "motion_backend": "GamepadDriver", + "sensitivity": 100, + "gyro_deadzone": 1, + "enable_motion": false + }, + "rumble": { + "strong_rumble": 1, + "weak_rumble": 1, + "enable_rumble": true + }, + "left_joycon": { + "button_minus": "Back", + "button_l": "LeftShoulder", + "button_zl": "LeftTrigger", + "button_sl": "Unbound", + "button_sr": "Unbound", + "dpad_up": "DpadUp", + "dpad_down": "DpadDown", + "dpad_left": "DpadLeft", + "dpad_right": "DpadRight" + }, + "right_joycon": { + "button_plus": "Start", + "button_r": "RightShoulder", + "button_zr": "RightTrigger", + "button_sl": "Unbound", + "button_sr": "Unbound", + "button_x": "Y", + "button_b": "A", + "button_y": "X", + "button_a": "B" + }, + "version": 1, + "backend": "GamepadSDL2", + "id": "2-00000003-28de-0000-ff11-000001000000", + "controller_type": "ProController", + "player_index": "Player3" + }, + { + "left_joycon_stick": { + "joystick": "Left", + "invert_stick_x": false, + "invert_stick_y": false, + "rotate90_cw": false, + "stick_button": "LeftStick" + }, + "right_joycon_stick": { + "joystick": "Right", + "invert_stick_x": false, + "invert_stick_y": false, + "rotate90_cw": false, + "stick_button": "RightStick" + }, + "deadzone_left": 0, + "deadzone_right": 0, + "range_left": 1.2, + "range_right": 1, + "trigger_threshold": 0, + "motion": { + "motion_backend": "GamepadDriver", + "sensitivity": 100, + "gyro_deadzone": 1, + "enable_motion": false + }, + "rumble": { + "strong_rumble": 1, + "weak_rumble": 1, + "enable_rumble": true + }, + "left_joycon": { + "button_minus": "Back", + "button_l": "LeftShoulder", + "button_zl": "LeftTrigger", + "button_sl": "Unbound", + "button_sr": "Unbound", + "dpad_up": "DpadUp", + "dpad_down": "DpadDown", + "dpad_left": "DpadLeft", + "dpad_right": "DpadRight" + }, + "right_joycon": { + "button_plus": "Start", + "button_r": "RightShoulder", + "button_zr": "RightTrigger", + "button_sl": "Unbound", + "button_sr": "Unbound", + "button_x": "Y", + "button_b": "A", + "button_y": "X", + "button_a": "B" + }, + "version": 1, + "backend": "GamepadSDL2", + "id": "3-00000003-28de-0000-ff11-000001000000", + "controller_type": "ProController", + "player_index": "Player4" } ], "graphics_backend": "Vulkan", @@ -169,4 +351,4 @@ "multiplayer_mode": 0, "multiplayer_lan_interface_id": "0", "use_hypervisor": true -} +} \ No newline at end of file From ee664d7ac13fb31b3d5071c1eb168253168102fe Mon Sep 17 00:00:00 2001 From: XargonWan Date: Thu, 15 Feb 2024 13:59:21 +0100 Subject: [PATCH 014/112] RYUJINX: binary was symlinked instead of wrapper, fixed --- net.retrodeck.retrodeck.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net.retrodeck.retrodeck.yml b/net.retrodeck.retrodeck.yml index 50ff205c..406c4454 100644 --- a/net.retrodeck.retrodeck.yml +++ b/net.retrodeck.retrodeck.yml @@ -1319,7 +1319,7 @@ modules: - | tar -zxvf *.tar.gz mv -v publish ${FLATPAK_DEST}/ryujinx - ln -sv ${FLATPAK_DEST}/ryujinx/Ryujinx ${FLATPAK_DEST}/bin/Ryujinx + ln -sv ${FLATPAK_DEST}/ryujinx/Ryujinx.sh ${FLATPAK_DEST}/bin/Ryujinx sources: - type: file url: https://github.com/Ryujinx/release-channel-master/releases/download/1.1.1192/ryujinx-1.1.1192-linux_x64.tar.gz From 483c7e4421f041cfe53217a3097a895b3f8e8dae Mon Sep 17 00:00:00 2001 From: XargonWan Date: Thu, 15 Feb 2024 14:00:30 +0100 Subject: [PATCH 015/112] RYUJINX: binary was symlinked instead of wrapper, fixed -fix --- net.retrodeck.retrodeck.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net.retrodeck.retrodeck.yml b/net.retrodeck.retrodeck.yml index 406c4454..824ca769 100644 --- a/net.retrodeck.retrodeck.yml +++ b/net.retrodeck.retrodeck.yml @@ -1319,7 +1319,7 @@ modules: - | tar -zxvf *.tar.gz mv -v publish ${FLATPAK_DEST}/ryujinx - ln -sv ${FLATPAK_DEST}/ryujinx/Ryujinx.sh ${FLATPAK_DEST}/bin/Ryujinx + ln -sv ${FLATPAK_DEST}/ryujinx/Ryujinx ${FLATPAK_DEST}/bin/Ryujinx.sh sources: - type: file url: https://github.com/Ryujinx/release-channel-master/releases/download/1.1.1192/ryujinx-1.1.1192-linux_x64.tar.gz From 345acb94b1a4c25e0b99c500e725691076bb0925 Mon Sep 17 00:00:00 2001 From: XargonWan Date: Thu, 15 Feb 2024 14:45:55 +0100 Subject: [PATCH 016/112] RYUJINX: removing keys folder symlinking --- functions/prepare_component.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/functions/prepare_component.sh b/functions/prepare_component.sh index e8cac45c..4ea009c0 100644 --- a/functions/prepare_component.sh +++ b/functions/prepare_component.sh @@ -559,9 +559,9 @@ prepare_component() { sed -i 's#RETRODECKHOMEDIR#'$rdhome'#g' "$ryujinxconf" fi fi - if [[ "$action" == "reset" ]] || [[ "$action" == "postmove" ]]; then # Run commands that apply to both resets and moves - dir_prep "$bios_folder/switch/keys" "/var/config/Ryujinx/system" - fi + # if [[ "$action" == "reset" ]] || [[ "$action" == "postmove" ]]; then # Run commands that apply to both resets and moves + # dir_prep "$bios_folder/switch/keys" "/var/config/Ryujinx/system" + # fi if [[ "$action" == "postmove" ]]; then # Run only post-move commands sed -i 's#RETRODECKHOMEDIR#'$rdhome'#g' "$ryujinxconf" # This is an unfortunate one-off because set_setting_value does not currently support JSON fi From 4c7c30f46796c8c4d707fb6c2c32a3e88f408b35 Mon Sep 17 00:00:00 2001 From: XargonWan Date: Thu, 15 Feb 2024 14:48:51 +0100 Subject: [PATCH 017/112] RYUJINX: removing keys folder symlinking --- functions/prepare_component.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/functions/prepare_component.sh b/functions/prepare_component.sh index 4ea009c0..42905a09 100644 --- a/functions/prepare_component.sh +++ b/functions/prepare_component.sh @@ -547,14 +547,14 @@ prepare_component() { echo "------------------------" if [[ $multi_user_mode == "true" ]]; then rm -rf "$multi_user_data_folder/$SteamAppUser/config/Ryujinx" - mkdir -p "$multi_user_data_folder/$SteamAppUser/config/Ryujinx/system" + #mkdir -p "$multi_user_data_folder/$SteamAppUser/config/Ryujinx/system" cp -fv $emuconfigs/ryujinx/* "$multi_user_data_folder/$SteamAppUser/config/Ryujinx" sed -i 's#RETRODECKHOMEDIR#'$rdhome'#g' "$multi_user_data_folder/$SteamAppUser/config/Ryujinx/Config.json" dir_prep "$multi_user_data_folder/$SteamAppUser/config/Ryujinx" "/var/config/Ryujinx" else # removing config directory to wipe legacy files rm -rf /var/config/Ryujinx - mkdir -p /var/config/Ryujinx/system + #mkdir -p /var/config/Ryujinx/system cp -fv $emuconfigs/ryujinx/* /var/config/Ryujinx sed -i 's#RETRODECKHOMEDIR#'$rdhome'#g' "$ryujinxconf" fi From c0ffc1ae52e51c04acafbb5bb053950c90496793 Mon Sep 17 00:00:00 2001 From: XargonWan Date: Thu, 15 Feb 2024 15:46:50 +0100 Subject: [PATCH 018/112] Triggering build From b49828670cf4e7e04fa6ad2e524de1698ff3bbec Mon Sep 17 00:00:00 2001 From: XargonWan Date: Sat, 17 Feb 2024 09:38:01 +0100 Subject: [PATCH 019/112] CLI: added reset es-de --- retrodeck.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/retrodeck.sh b/retrodeck.sh index 779f5ef0..686c3758 100644 --- a/retrodeck.sh +++ b/retrodeck.sh @@ -58,7 +58,7 @@ https://retrodeck.net echo "You are about to reset one or more RetroDECK components or emulators." echo "Available options are: es-de, retroarch, cemu, citra, dolphin, duckstation, melonds, pcsx3, pico8, ppsspp, primehack, rpcs3, xemu, yuzu, vita3k, mame, gzdoom, boilr, all" read -p "Please enter the component you would like to reset: " component - if [[ "$emulator" =~ ^(retroarch|cemu|citra|dolphin|duckstation|mame|melonds|pcsx2|ppsspp|primehack|rpcs3|xemu|yuzu|all-emulators)$ ]]; then + if [[ "$emulator" =~ ^(es-de|retroarch|cemu|citra|dolphin|duckstation|mame|melonds|pcsx2|ppsspp|primehack|rpcs3|xemu|yuzu|all-emulators)$ ]]; then read -p "You are about to reset $component to default settings. Enter 'y' to continue, 'n' to stop: " response if [[ $response == [yY] ]]; then prepare_component "reset" "$component" "cli" From f6f6a678b68e9d7a9697651a5bdd5bb615339d91 Mon Sep 17 00:00:00 2001 From: XargonWan Date: Sun, 18 Feb 2024 10:48:04 +0100 Subject: [PATCH 020/112] Feat/steam sync (#652) * Fixed sync path in steam-sync.py * Fix syntax error * Make sync folder hidden * Make sync folder hidden (for real now) * Added boilr_tag parameter after talk with boilr dev * BOILR: set branch to retro for testing purposes * APPDATA: added Steam Sync Warning [skip ci] * BOILR: updated Cargo.toml * Update steam-sync.py with real time sync * Update configurator.sh with steam syncronization * Update retrodeck.sh with steam syncronization --------- Co-authored-by: Lx32 --- functions/steam-sync/config.toml | 1 + functions/steam-sync/steam-sync.py | 134 ++++++++++++++++++++-------- net.retrodeck.retrodeck.appdata.xml | 1 + net.retrodeck.retrodeck.yml | 4 +- retrodeck.sh | 8 ++ tools/configurator.sh | 42 ++++++++- 6 files changed, 147 insertions(+), 43 deletions(-) diff --git a/functions/steam-sync/config.toml b/functions/steam-sync/config.toml index 6e4acaba..0bdd0e25 100644 --- a/functions/steam-sync/config.toml +++ b/functions/steam-sync/config.toml @@ -1,6 +1,7 @@ debug = false config_version = 1 blacklisted_games = [] +boilr_tag = "retrodeck" [steamgrid_db] enabled = true diff --git a/functions/steam-sync/steam-sync.py b/functions/steam-sync/steam-sync.py index 4d9d3ef6..c4ce90df 100644 --- a/functions/steam-sync/steam-sync.py +++ b/functions/steam-sync/steam-sync.py @@ -6,6 +6,8 @@ import shlex import shutil import glob import sys +import time +import hashlib import xml.etree.ElementTree as ET @@ -266,8 +268,13 @@ alt_command_list={ "Beetle PCE": "flatpak run --command=retroarch net.retrodeck.retrodeck -L /var/config/retroarch/cores/mednafen_pce_libretro.so" } -def create_shortcut_new(games,rdhome): - old_games=os.listdir(rdhome+"/sync/") +exit_file="/tmp/retrodeck_steam_sync_exit" +rdhome="" +roms_folder="" + +def create_shortcut_new(games): + changes=0 + old_games=os.listdir(rdhome+"/.sync/") for game in games: try: @@ -275,8 +282,9 @@ def create_shortcut_new(games,rdhome): old_games[i]=0 except ValueError: print(game[0]+" is a new game!") - - path=rdhome+"/sync/"+game[0] + changes=1 + + path=rdhome+"/.sync/"+game[0] print("Go to path: "+path) if not os.path.exists(path): os.makedirs(path) @@ -300,7 +308,7 @@ def create_shortcut_new(games,rdhome): fl.write(' ]\n') fl.write('}\n') fl.close() - + fl=open(path+"/launch.sh","w") fl.write("#!/bin/bash\n\n") fl.write('if test "$(whereis flatpak)" = "flatpak:"\n') @@ -310,43 +318,25 @@ def create_shortcut_new(games,rdhome): fl.write(game[1]+"\n") fl.write("fi\n") fl.close() - + st=os.stat(path+"/launch.sh") os.chmod(path+"/launch.sh", st.st_mode | 0o0111) - + print("Start removing") print(old_games) for game in old_games: if game: - shutil.rmtree(rdhome+"/sync/"+game) - - os.system("boilr --no-ui") + shutil.rmtree(rdhome+"/.sync/"+game) + changes=1 -def addToSteam(): - print("Open RetroDECK config file: {}".format(os.path.expanduser("~/.var/app/net.retrodeck.retrodeck/config/retrodeck/retrodeck.cfg"))) + if changes: + os.system("boilr --no-ui") - fl=open(os.path.expanduser("~/.var/app/net.retrodeck.retrodeck/config/retrodeck/retrodeck.cfg"),"r") - lines=fl.readlines() - for line in lines: - if "rdhome" in line: - rdhome=line[7:-1] - elif "roms_folder" in line: - roms_folder=line[12:-1] - fl.close() +def addToSteam(systems): games=[] - - command_list_default["pico8"]=command_list_default["pico8"].replace("{GAMEDIR}",roms_folder+"/pico8") - alt_command_list["PICO-8 Splore (Standalone)"]=alt_command_list["PICO-8 Splore (Standalone)"].replace("{GAMEDIR}",roms_folder+"/pico8") - - if not os.path.exists(rdhome+"/sync/"): - os.makedirs(rdhome+"/sync/") - - if not os.path.exists(os.path.expanduser("~/.var/app/net.retrodeck.retrodeck/config/boilr/sync")): - os.symlink(rdhome+"/sync",os.path.expanduser("~/.var/app/net.retrodeck.retrodeck/config/boilr/sync")) - - for system in os.listdir(rdhome+"/gamelists/"): + for system in systems: print("Start parsing system: {}".format(system)) - + f=open(rdhome+"/gamelists/"+system+"/gamelist.xml","r") f.readline() parser=ET.XMLParser() @@ -355,7 +345,7 @@ def addToSteam(): parser.feed(b'') root=parser.close() f.close() - + globalAltEmu="" for subroot in root: if subroot.tag=="alternativeEmulator": @@ -367,7 +357,7 @@ def addToSteam(): name="" favorite="" altemulator=globalAltEmu - for tag in game: + for tag in game: if tag.tag=="path": path=tag.text elif tag.tag=="name": @@ -376,7 +366,7 @@ def addToSteam(): favorite=tag.text elif tag.tag=="altemulator": altemulator=tag.text - + if favorite=="true" and altemulator=="": print("Find favorite game: {}".format(name)) games.append([name,command_list_default[system]+" '"+roms_folder+"/"+system+path[1:]+"'"]) @@ -391,10 +381,76 @@ def addToSteam(): else: games.append([name,alt_command_list[altemulator]+" '"+roms_folder+"/"+system+path[1:]+"'"]) print(alt_command_list[altemulator]+" '"+roms_folder+"/"+system+path[1:]+"'") - - create_shortcut_new(games,rdhome) + if not games==[]: + create_shortcut_new(games) + +def start_config(): + global rdhome + global roms_folder + global command_list_default + global alt_command_list + + if os.path.isfile(exit_file): + os.remove(exit_file) + + print("Open RetroDECK config file: {}".format(os.path.expanduser("~/.var/app/net.retrodeck.retrodeck/config/retrodeck/retrodeck.cfg"))) + + fl=open(os.path.expanduser("~/.var/app/net.retrodeck.retrodeck/config/retrodeck/retrodeck.cfg"),"r") + lines=fl.readlines() + for line in lines: + if "rdhome" in line: + rdhome=line[7:-1] + elif "roms_folder" in line: + roms_folder=line[12:-1] + fl.close() + + command_list_default["pico8"]=command_list_default["pico8"].replace("{GAMEDIR}",roms_folder+"/pico8") + alt_command_list["PICO-8 Splore (Standalone)"]=alt_command_list["PICO-8 Splore (Standalone)"].replace("{GAMEDIR}",roms_folder+"/pico8") + + if not os.path.exists(rdhome+"/.sync/"): + os.makedirs(rdhome+"/.sync/") + + boilr_path=os.path.expanduser("~/.var/app/net.retrodeck.retrodeck/config/boilr/config.toml") + if os.path.isfile(boilr_path): + with open(boilr_path,"r") as f: + data=f.read() + data=re.sub("\"games_folder.*","games_folder = "+rdhome+"/.sync/\"",data) + with open(boilr_path,"w") as f: + f.write(data) + else: + print("Error! BoilR config not initialized.") if __name__=="__main__": - addToSteam() - + start_config() + + new_hash={} + for system in os.listdir(rdhome+"/gamelists/"): + new_hash[system]=hashlib.md5(open(rdhome+"/gamelists/"+system+"/gamelist.xml","rb").read()).hexdigest() + + running=True + + while running: + time.sleep(30) + systems=[] + + for system in os.listdir(rdhome+"/gamelists/"): + if not system in systems: + if system in new_hash.keys(): + old_hash=new_hash[system] + new_hash[system]=hashlib.md5(open(rdhome+"/gamelists/"+system+"/gamelist.xml","rb").read()).hexdigest() + if not new_hash[system] == old_hash: + print("System {} changed!".format(system)) + systems.append(system) + else: + print("System {} not changed!".format(system)) + else: + new_hash[system]=hashlib.md5(open(rdhome+"/gamelists/"+system+"/gamelist.xml","rb").read()).hexdigest() + print("System {} added!".format(system)) + systems.append(system) + + if os.path.isfile(exit_file): + running=False + os.remove(exit_file) + + addToSteam(systems) print("Finish!") diff --git a/net.retrodeck.retrodeck.appdata.xml b/net.retrodeck.retrodeck.appdata.xml index 6c301ece..6268d6ba 100644 --- a/net.retrodeck.retrodeck.appdata.xml +++ b/net.retrodeck.retrodeck.appdata.xml @@ -98,6 +98,7 @@

Issues: