From 2254d945a440b82b871c523f06a11fea0adb0e29 Mon Sep 17 00:00:00 2001 From: XargonWan Date: Thu, 9 Mar 2023 12:54:53 +0000 Subject: [PATCH 1/4] Updated appdata with ice's changes [skip ci] --- net.retrodeck.retrodeck.appdata.xml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/net.retrodeck.retrodeck.appdata.xml b/net.retrodeck.retrodeck.appdata.xml index 623c7cc7..8fca452a 100644 --- a/net.retrodeck.retrodeck.appdata.xml +++ b/net.retrodeck.retrodeck.appdata.xml @@ -69,11 +69,25 @@ - + https://github.com/XargonWan/RetroDECK/releases/tag/0.6.2b
    -
  • +
  • Implemented proper Primehack preconfiguration / purge stale configs
  • +
  • Added Xbox and Nintendo-layout controller profiles to Primehack
  • +
  • Stop resetting all configs after update (see post_update.sh)
  • +
  • Add CHD compression to CLI and Configurator
  • +
  • Add common BIOS file check tool to Configurator
  • +
  • Reworked CLI arguments
  • +
  • Updated shipped Duckstation config
  • +
  • Removed deprecated/disabled tool files
  • +
  • Made emulator resets more robust by purging config folders to clear legacy files
  • +
  • Add troubleshooting tool for checking structure of multi-file games in Configurator
  • +
  • Updated patching engine to accommodate "batch patches"
  • +
  • Implemented expanding retrodeck.cfg on update
  • +
  • Reworked Configurator menu flow
  • +
  • Set power_user variable so Configurator warning is only shown once
  • +
  • Implemented a basic framework for easter egg splash screens
From 5e4ec523c9bcab011c5595d5e4854f0f111e7f83 Mon Sep 17 00:00:00 2001 From: icenine451 <59938822+icenine451@users.noreply.github.com> Date: Sun, 12 Mar 2023 21:40:01 -0400 Subject: [PATCH 2/4] Split BIOS check tools into basic and advanced modes. --- tools/configurator.sh | 39 ++++++++++++++++++++++++++++++++++----- 1 file changed, 34 insertions(+), 5 deletions(-) diff --git a/tools/configurator.sh b/tools/configurator.sh index 81be2c39..e8bdc1dc 100644 --- a/tools/configurator.sh +++ b/tools/configurator.sh @@ -367,7 +367,7 @@ configurator_compress_single_game_dialog() { configurator_compress_games_dialog() { # This is currently a placeholder for a dialog where you can compress a single game or multiple at once. Currently only the single game option is available, so is launched by default. - + configurator_generic_dialog "This utility will compress a single game into .CHD format.\n\nPlease select the game to be compressed in the next dialog: supported file types are .cue, .iso and .gdi\n\nThe original game files will be untouched and will need to be removed manually." configurator_compress_single_game_dialog } @@ -386,7 +386,31 @@ configurator_check_multifile_game_structure() { configurator_troubleshooting_tools_dialog } -configurator_check_bios_files() { +configurator_check_bios_files_basic() { + bios_checked_list=() + + while IFS="^" read -r bios_file bios_hash bios_system bios_desc + do + bios_file_found="No" + bios_hash_matched="No" + if [[ -f "$bios_folder/$bios_file" ]]; then + bios_file_found="Yes" + if [[ $(md5sum "$bios_folder/$bios_file" | awk '{ print $1 }') == "$bios_hash" ]]; then + bios_hash_matched="Yes" + fi + fi + if [[ $bios_file_found == "Yes" && $bios_hash_matched == "Yes" && ! " ${bios_checked_list[*]} " =~ " ${bios_system} " ]]; then + bios_checked_list=("${bios_checked_list[@]}" "$bios_system" ) + fi + done < $bios_checklist + systems_with_bios=${bios_checked_list[@]} + + configurator_generic_dialog "The following systems have been found to have at least one valid BIOS file.\n\n$systems_with_bios\n\nFor more information on the BIOS files found please use the Advanced check tool." + + configurator_troubleshooting_tools_dialog +} + +configurator_check_bios_files_advanced() { bios_checked_list=() while IFS="^" read -r bios_file bios_hash bios_system bios_desc @@ -419,7 +443,8 @@ configurator_troubleshooting_tools_dialog() { --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" --width=1200 --height=720 \ --column="Choice" --column="Action" \ "Multi-file game structure check" "Verify the proper structure of multi-file or multi-disc games" \ - "BIOS file check" "Verify the existence and file integrity of common BIOS files" ) + "Basic BIOS file check" "Show a list of systems that BIOS files are found for" \ + "Advanced BIOS file check" "Show advanced information about common BIOS files" ) case $choice in @@ -427,8 +452,12 @@ configurator_troubleshooting_tools_dialog() { configurator_check_multifile_game_structure ;; - "BIOS file check" ) - configurator_check_bios_files + "Basic BIOS file check" ) + configurator_check_bios_files_basic + ;; + + "Advanced BIOS file check" ) + configurator_check_bios_files_advanced ;; "" ) # No selection made or Back button clicked From b0df2e8ddab887408dc54019f428cf06aafa1418 Mon Sep 17 00:00:00 2001 From: icenine451 Date: Mon, 13 Mar 2023 10:09:01 -0400 Subject: [PATCH 3/4] Rework power user and desktop mode warnings --- emu-configs/defaults/retrodeck.cfg | 3 +- functions.sh | 23 ++++- retrodeck.sh | 6 +- tools/configurator.sh | 144 ++++++++++++++--------------- 4 files changed, 94 insertions(+), 82 deletions(-) diff --git a/emu-configs/defaults/retrodeck.cfg b/emu-configs/defaults/retrodeck.cfg index 8da1148b..2c61ee4d 100644 --- a/emu-configs/defaults/retrodeck.cfg +++ b/emu-configs/defaults/retrodeck.cfg @@ -9,4 +9,5 @@ themes_folder=/home/deck/retrodeck/themes logs_folder=/home/deck/retrodeck/.logs sdcard=/run/media/mmcblk0p1 -power_user=false \ No newline at end of file +power_user_warning=true +desktop_mode_warning=true \ No newline at end of file diff --git a/functions.sh b/functions.sh index 02c49a23..855c84b0 100644 --- a/functions.sh +++ b/functions.sh @@ -166,12 +166,25 @@ validate_for_chd () { desktop_mode_warning() { # This function is a generic warning for issues that happen when running in desktop mode. - # Running in desktop mode can be verified with the following command: if [[ $XDG_CURRENT_DESKTOP == "KDE" ]]; then + # Running in desktop mode can be verified with the following command: if [[ ! $XDG_CURRENT_DESKTOP == "gamescope" ]]; then + # This function will check if desktop mode is currently being used and if the warning has not been disabled, and show it if needed. - zenity --icon-name=net.retrodeck.retrodeck --info --no-wrap \ - --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \ - --title "RetroDECK Desktop Mode Warning" \ - --text="You appear to be running RetroDECK in the Steam Deck's Desktop mode!\n\nSome functions of RetroDECK may not work properly in Desktop mode, such as the Steam Deck's normal controls.\n\nRetroDECK is best enjoyed in Game mode!" + if [[ ! $XDG_CURRENT_DESKTOP == "gamescope" ]]; then + if [[ $desktop_mode_warning == "true" ]]; then + choice=$(zenity --icon-name=net.retrodeck.retrodeck --info --no-wrap --ok-label="Yes" --extra-button="No" --extra-button="Never show this again" \ + --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \ + --title "RetroDECK Desktop Mode Warning" \ + --text="You appear to be running RetroDECK in the Steam Deck's Desktop mode!\n\nSome functions of RetroDECK may not work properly in Desktop mode, such as the Steam Deck's normal controls.\n\nRetroDECK is best enjoyed in Game mode!\n\nDo you still want to proceed?") + fi + fi + rc=$? # Capture return code, as "Yes" button has no text value + if [[ $rc == "1" ]]; then # If any button other than "Yes" was clicked + if [[ $choice == "No" ]]; then + exit 1 + elif [[ $choice == "Never show this again" ]]; then + set_setting_value $rd_conf "desktop_mode_warning" "false" retrodeck # Store desktop mode warning variable for future checks + fi + fi } set_setting_value() { diff --git a/retrodeck.sh b/retrodeck.sh index b9c8e015..7222f481 100644 --- a/retrodeck.sh +++ b/retrodeck.sh @@ -135,11 +135,9 @@ else finit # Executing First/Force init fi -# Check if running in Desktop mode and warn if true +# Check if running in Desktop mode and warn if true, unless desktop_mode_warning=false in retrodeck.cfg -if [[ $XDG_CURRENT_DESKTOP == "KDE" ]]; then - desktop_mode_warning -fi +desktop_mode_warning # Normal Startup diff --git a/tools/configurator.sh b/tools/configurator.sh index e8bdc1dc..a284269f 100644 --- a/tools/configurator.sh +++ b/tools/configurator.sh @@ -197,95 +197,95 @@ configurator_retroachivement_dialog() { } configurator_power_user_warning_dialog() { - zenity --title "RetroDECK Configurator Utility - Power User Options" --question --no-wrap --cancel-label="Back" \ - --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \ - --text="Making manual changes to an emulators configuration may create serious issues,\nand some settings may be overwitten during RetroDECK updates.\n\nSome standalone emulator functions may not work properly outside of Desktop mode.\n\nPlease continue only if you know what you're doing.\n\nDo you want to continue?\n\nClicking Yes will set you as a Power User and you will not see this dialog again." - - if [ $? == 0 ]; then # OK button clicked - power_user="true" - set_setting_value $rd_conf "power_user" "$power_user" retrodeck # Store power user variable for future checks + if [[ $power_user_warning == "true" ]]; then + choice=$(zenity --icon-name=net.retrodeck.retrodeck --info --no-wrap --ok-label="Yes" --extra-button="No" --extra-button="Never show this again" \ + --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \ + --title "RetroDECK Desktop Mode Warning" \ + --text="Making manual changes to an emulators configuration may create serious issues,\nand some settings may be overwitten during RetroDECK updates.\n\nSome standalone emulator functions may not work properly outside of Desktop mode.\n\nPlease continue only if you know what you're doing.\n\nDo you want to continue?") + fi + rc=$? # Capture return code, as "Yes" button has no text value + if [[ $rc == "0" ]]; then # If user clicked "Yes" + configurator_power_user_changes_dialog + else # If any button other than "Yes" was clicked + if [[ $choice == "No" ]]; then + configurator_welcome_dialog + elif [[ $choice == "Never show this again" ]]; then + set_setting_value $rd_conf "power_user_warning" "false" retrodeck # Store desktop mode warning variable for future checks + configurator_power_user_changes_dialog + fi fi } configurator_power_user_changes_dialog() { - if [[ $power_user == "true" ]]; then - emulator=$(zenity --list \ - --title "RetroDECK Configurator Utility - Power User Options" --cancel-label="Back" \ - --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" --width=1200 --height=720 \ - --text="Which emulator do you want to configure?" \ - --hide-header \ - --column=emulator \ - "RetroArch" \ - "Citra" \ - "Dolphin" \ - "Duckstation" \ - "MelonDS" \ - "PCSX2" \ - "PPSSPP" \ - "Primehack" \ - "RPCS3" \ - "XEMU" \ - "Yuzu") + emulator=$(zenity --list \ + --title "RetroDECK Configurator Utility - Power User Options" --cancel-label="Back" \ + --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" --width=1200 --height=720 \ + --text="Which emulator do you want to configure?" \ + --hide-header \ + --column=emulator \ + "RetroArch" \ + "Citra" \ + "Dolphin" \ + "Duckstation" \ + "MelonDS" \ + "PCSX2" \ + "PPSSPP" \ + "Primehack" \ + "RPCS3" \ + "XEMU" \ + "Yuzu") - case $emulator in + case $emulator in - "RetroArch" ) - retroarch - ;; + "RetroArch" ) + retroarch + ;; - "Citra" ) - citra-qt - ;; + "Citra" ) + citra-qt + ;; - "Dolphin" ) - dolphin-emu - ;; + "Dolphin" ) + dolphin-emu + ;; - "Duckstation" ) - duckstation-qt - ;; + "Duckstation" ) + duckstation-qt + ;; - "MelonDS" ) - melonDS - ;; + "MelonDS" ) + melonDS + ;; - "PCSX2" ) - pcsx2-qt - ;; + "PCSX2" ) + pcsx2-qt + ;; - "PPSSPP" ) - PPSSPPSDL - ;; + "PPSSPP" ) + PPSSPPSDL + ;; - "Primehack" ) - primehack-wrapper - ;; + "Primehack" ) + primehack-wrapper + ;; - "RPCS3" ) - rpcs3 - ;; + "RPCS3" ) + rpcs3 + ;; - "XEMU" ) - xemu - ;; + "XEMU" ) + xemu + ;; - "Yuzu" ) - yuzu - ;; + "Yuzu" ) + yuzu + ;; - "" ) # No selection made or Back button clicked - configurator_welcome_dialog - ;; + "" ) # No selection made or Back button clicked + configurator_welcome_dialog + ;; - esac - else - configurator_power_user_warning_dialog - if [[ $power_user == "true" ]]; then - configurator_power_user_changes_dialog - else - configurator_welcome_dialog - fi - fi + esac } configurator_retroarch_rewind_dialog() { @@ -651,7 +651,7 @@ configurator_welcome_dialog() { ;; "Change Standalone Emulator Options" ) - configurator_power_user_changes_dialog + configurator_power_user_warning_dialog ;; "Compress Games" ) From f7cba4a6eac453edb78af8a32709e36707e9aac1 Mon Sep 17 00:00:00 2001 From: icenine451 Date: Mon, 13 Mar 2023 11:12:10 -0400 Subject: [PATCH 4/4] Expanded BIOS checklist and function capabilities --- tools/bios_checklist.cfg | 41 ++++++++++++++++++++++++---------------- tools/configurator.sh | 20 +++++++++++++------- 2 files changed, 38 insertions(+), 23 deletions(-) diff --git a/tools/bios_checklist.cfg b/tools/bios_checklist.cfg index 58a807ad..ae47470a 100644 --- a/tools/bios_checklist.cfg +++ b/tools/bios_checklist.cfg @@ -1,16 +1,25 @@ -scph5500.bin^8dd7d5296a650fac7319bce665a6a53c^PSX^PS1 JP BIOS -scph5501.bin^490f666e1afb15b7362b406ed1cea246^PSX^PS1 US BIOS -scph5502.bin^32736f17079d0b2b7024407c39bd3050^PSX^PS1 EU BIOS -ps2-0200a-20040614.bin^d333558cc14561c1fdc334c75d5f37b7^PS2^PS2 US BIOS -ps2-0200e-20040614.bin^dc752f160044f2ed5fc1f4964db2a095^PS2^PS2 EU BIOS -ps2-0200j-20040614.bin^0eee5d1c779aa50e94edd168b4ebf42e^PS2^PS2 JP BIOS -bios_CD_E.bin^e66fa1dc5820d254611fdcdba0662372^SegaCD^MegaCD EU BIOS -bios_CD_U.bin^854b9150240a198070150e4566ae1290^SegaCD^SegaCD US BIOS -bios_CD_J.bin^278a9397d192149e84e820ac621a8edd^SegaCD^MegaCD JP BIOS -sega_101.bin^85ec9ca47d8f6807718151cbcca8b964^Sega Saturn^Saturn JP BIOS -mpr-17933.bin^3240872c70984b6cbfda1586cab68dbe^Sega Saturn^Saturn US.mdEU BIOS -mpr-18811-mx.ic1^255113ba943c92a54facd25a10fd780c^Sega Saturn^The King of Fighters 95 ROM Cartridge - Required for this game -mpr-19367-mx.ic1^1cd19988d1d72a3e7caa0b73234c96b4^Sega Saturn^Ultraman: Hikari no Kyojin Densetsu ROM Cartridge - Required for this game -bios7.bin^df692a80a5b1bc90728bc3dfc76cd948^Nintendo DS^Used by MelonDS emulator -bios9.bin^a392174eb3e572fed6447e956bde4b25^Nintendo DS^Used by MelonDS emulator -firmware.bin^93276d8629990f50a90950ea083ab348^Nintendo DS^Used by MelonDS emulator \ No newline at end of file +psxonpsp660.bin^^c53ca5908936d412331790f4426c6c33^PSX^PS1 BIOS +scph5500.bin^^8dd7d5296a650fac7319bce665a6a53c^PSX^PS1 JP BIOS +scph5501.bin^^490f666e1afb15b7362b406ed1cea246^PSX^PS1 US BIOS +scph5502.bin^^32736f17079d0b2b7024407c39bd3050^PSX^PS1 EU BIOS +ps1_rom.bin^^81bbe60ba7a3d1cea1d48c14cbcc647b^PSX^PS1 BIOS +ps2-0200a-20040614.bin^^d333558cc14561c1fdc334c75d5f37b7^PS2^PS2 US BIOS +ps2-0200e-20040614.bin^^dc752f160044f2ed5fc1f4964db2a095^PS2^PS2 EU BIOS +ps2-0200j-20040614.bin^^0eee5d1c779aa50e94edd168b4ebf42e^PS2^PS2 JP BIOS +bios_CD_E.bin^^e66fa1dc5820d254611fdcdba0662372^SegaCD^MegaCD EU BIOS +bios_CD_U.bin^^854b9150240a198070150e4566ae1290^SegaCD^SegaCD US BIOS +bios_CD_J.bin^^278a9397d192149e84e820ac621a8edd^SegaCD^MegaCD JP BIOS +sega_101.bin^^85ec9ca47d8f6807718151cbcca8b964^Sega Saturn^Saturn JP BIOS +mpr-17933.bin^^3240872c70984b6cbfda1586cab68dbe^Sega Saturn^Saturn US.mdEU BIOS +mpr-18811-mx.ic1^^255113ba943c92a54facd25a10fd780c^Sega Saturn^The King of Fighters 95 ROM Cartridge - Required for this game +mpr-19367-mx.ic1^^1cd19988d1d72a3e7caa0b73234c96b4^Sega Saturn^Ultraman: Hikari no Kyojin Densetsu ROM Cartridge - Required for this game +bios7.bin^^df692a80a5b1bc90728bc3dfc76cd948^Nintendo DS^Used by MelonDS emulator +bios9.bin^^a392174eb3e572fed6447e956bde4b25^Nintendo DS^Used by MelonDS emulator +firmware.bin^^93276d8629990f50a90950ea083ab348^Nintendo DS^Used by MelonDS emulator +mcpx_1.0.bin^^d49c52a4102f6df7bcf8d0617ac475ed^XBOX^Used by XEMU emulator +Complex.bin^^Unknown^XBOX^Used by XEMU emulator +Complex_4627v1.03.bin^^Unknown^XBOX^Used by XEMU emulator +Complex_4627.bin^^Unknown^XBOX^Used by XEMU emulator +eeprom.bin^^Unknown^XBOX^Used by XEMU emulator +prod.keys^switch/keys/^Unknown^Switch^A required file for Switch emulation in Yuzu +title.keys^switch/keys/^Unknown^Switch^A required file for Switch emulation in Yuzu \ No newline at end of file diff --git a/tools/configurator.sh b/tools/configurator.sh index a284269f..1e9839bc 100644 --- a/tools/configurator.sh +++ b/tools/configurator.sh @@ -387,19 +387,22 @@ configurator_check_multifile_game_structure() { } configurator_check_bios_files_basic() { + configurator_generic_dialog "This check will look for BIOS files that RetroDECK has identified as working.\n\nThere may be additional BIOS files that will function with the emulators that are not checked.\n\nSome more advanced emulators such as Yuzu will have additional methods for verifiying the BIOS files are in working order." bios_checked_list=() - while IFS="^" read -r bios_file bios_hash bios_system bios_desc + while IFS="^" read -r bios_file bios_subdir bios_hash bios_system bios_desc do bios_file_found="No" bios_hash_matched="No" - if [[ -f "$bios_folder/$bios_file" ]]; then + if [[ -f "$bios_dir/$bios_subdir$bios_file" ]]; then bios_file_found="Yes" - if [[ $(md5sum "$bios_folder/$bios_file" | awk '{ print $1 }') == "$bios_hash" ]]; then + if [[ $bios_hash == "Unknown" ]]; then + bios_hash_matched="Unknown" + elif [[ $(md5sum "$bios_dir/$bios_subdir$bios_file" | awk '{ print $1 }') == "$bios_hash" ]]; then bios_hash_matched="Yes" fi fi - if [[ $bios_file_found == "Yes" && $bios_hash_matched == "Yes" && ! " ${bios_checked_list[*]} " =~ " ${bios_system} " ]]; then + if [[ $bios_file_found == "Yes" && ($bios_hash_matched == "Yes" || $bios_hash_matched == "Unknown") && ! " ${bios_checked_list[*]} " =~ " ${bios_system} " ]]; then bios_checked_list=("${bios_checked_list[@]}" "$bios_system" ) fi done < $bios_checklist @@ -411,15 +414,18 @@ configurator_check_bios_files_basic() { } configurator_check_bios_files_advanced() { + configurator_generic_dialog "This check will look for BIOS files that RetroDECK has identified as working.\n\nThere may be additional BIOS files that will function with the emulators that are not checked.\n\nSome more advanced emulators such as Yuzu will have additional methods for verifiying the BIOS files are in working order." bios_checked_list=() - while IFS="^" read -r bios_file bios_hash bios_system bios_desc + while IFS="^" read -r bios_file bios_subdir bios_hash bios_system bios_desc do bios_file_found="No" bios_hash_matched="No" - if [[ -f "$bios_folder/$bios_file" ]]; then + if [[ -f "$bios_dir/$bios_subdir$bios_file" ]]; then bios_file_found="Yes" - if [[ $(md5sum "$bios_folder/$bios_file" | awk '{ print $1 }') == "$bios_hash" ]]; then + if [[ $bios_hash == "Unknown" ]]; then + bios_hash_matched="Unknown" + elif [[ $(md5sum "$bios_dir/$bios_subdir$bios_file" | awk '{ print $1 }') == "$bios_hash" ]]; then bios_hash_matched="Yes" fi fi