diff --git a/emu-configs/defaults/retrodeck/reference_lists/finit_options_list.cfg b/emu-configs/defaults/retrodeck/reference_lists/finit_options_list.cfg index 0c1eb4f1..97689751 100644 --- a/emu-configs/defaults/retrodeck/reference_lists/finit_options_list.cfg +++ b/emu-configs/defaults/retrodeck/reference_lists/finit_options_list.cfg @@ -1,2 +1,3 @@ false^RPCS3 Firmware Install^Install firmware needed for PS3 emulation^rpcs3_firmware +false^Vita3K Firmware Install^Install firmware needed for Vita3K emulation^vita3k_firmware false^RetroDECK Controller Profile^Install custom RetroDECK controller profile^rd_controller_profile diff --git a/functions/functions.sh b/functions/functions.sh index 58f2c026..d7589ec4 100644 --- a/functions/functions.sh +++ b/functions/functions.sh @@ -294,6 +294,13 @@ update_rpcs3_firmware() { rm -rf "$roms_folder/ps3/tmp" } +update_vita3k_firmware() { + download_file "http://dus01.psv.update.playstation.net/update/psv/image/2022_0209/rel_f2c7b12fe85496ec88a0391b514d6e3b/PSVUPDAT.PUP" "/tmp/PSVUPDAT.PUP" "Vita3K Firmware file 1" + download_file "http://dus01.psp2.update.playstation.net/update/psp2/image/2019_0924/sd_8b5f60b56c3da8365b973dba570c53a5/PSP2UPDAT.PUP?dest=us" "/tmp/PSP2UPDAT.PUP" "Vita3K Firmware file 2" + Vita3K --firmware /tmp/PSVUPDAT.PUP + Vita3K --firmware /tmp/PSP2UPDAT.PUP +} + backup_retrodeck_userdata() { mkdir -p "$backups_folder" zip -rq9 "$backups_folder/$(date +"%0m%0d")_retrodeck_userdata.zip" "$saves_folder" "$states_folder" "$bios_folder" "$media_folder" "$themes_folder" "$logs_folder" "$screenshots_folder" "$mods_folder" "$texture_packs_folder" "$borders_folder" > $logs_folder/$(date +"%0m%0d")_backup_log.log @@ -449,6 +456,10 @@ finit() { configurator_generic_dialog "RPCS3 Firmware Install" "You have chosen to install the RPCS3 firmware during the RetroDECK first setup.\n\nThis process will take several minutes and requires network access.\n\nRPCS3 will be launched automatically at the end of the RetroDECK setup process.\nOnce the firmware is installed, please close the emulator to finish the process." fi + if [[ "$finit_options_choices" =~ (vita3k_firmware|Enable All) ]]; then # Additional information on the firmware install process, as the emulator needs to be manually closed + configurator_generic_dialog "Vita3K Firmware Install" "You have chosen to install the Vita3K firmware during the RetroDECK first setup.\n\nThis process will take several minutes and requires network access.\n\nVita3K will be launched automatically at the end of the RetroDECK setup process.\nOnce the firmware is installed, please close the emulator to finish the process." + fi + zenity --icon-name=net.retrodeck.retrodeck --info --no-wrap \ --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" --title "RetroDECK" \ --text="RetroDECK will now install the needed files, which can take up to one minute.\nRetroDECK will start once the process is completed.\n\nPress OK to continue." @@ -464,6 +475,11 @@ finit() { update_rpcs3_firmware fi fi + if [[ "$finit_options_choices" =~ (vita3k_firmware|Enable All) ]]; then + if [[ $(check_network_connectivity) == "true" ]]; then + update_vita3k_firmware + fi + fi if [[ "$finit_options_choices" =~ (rd_controller_profile|Enable All) ]]; then install_retrodeck_controller_profile fi diff --git a/functions/prepare_component.sh b/functions/prepare_component.sh index b367217b..ef2fa19f 100644 --- a/functions/prepare_component.sh +++ b/functions/prepare_component.sh @@ -686,13 +686,6 @@ prepare_component() { fi # Shared actions dir_prep "$saves_folder/psvita/vita3k" "$bios_folder/Vita3K/Vita3K/ux0/user/00/savedata" # Multi-user safe? - - # Installing firmware - # TODO: at the moment this is here instead of a tool because it seems like it cannot run without Firmware - curl "http://dus01.psv.update.playstation.net/update/psv/image/2022_0209/rel_f2c7b12fe85496ec88a0391b514d6e3b/PSVUPDAT.PUP" -po /tmp/PSVUPDAT.PUP - curl "http://dus01.psp2.update.playstation.net/update/psp2/image/2019_0924/sd_8b5f60b56c3da8365b973dba570c53a5/PSP2UPDAT.PUP?dest=us" -po /tmp/PSP2UPDAT.PUP - Vita3K --firmware /tmp/PSVUPDAT.PUP - Vita3K --firmware /tmp/PSP2UPDAT.PUP fi if [[ "$action" == "postmove" ]]; then # Run only post-move commands dir_prep "$saves_folder/psvita/vita3k" "$bios_folder/Vita3K/Vita3K/ux0/user/00/savedata" # Multi-user safe? diff --git a/tools/configurator.sh b/tools/configurator.sh index 99d6c7b9..ee5509eb 100644 --- a/tools/configurator.sh +++ b/tools/configurator.sh @@ -60,6 +60,7 @@ source /app/libexec/global.sh # - Compress All Games # - Install: RetroDECK SD Controller Profile # - Install: PS3 firmware +# - Install: PS Vita firmware # - RetroDECK: Change Update Setting # - Troubleshooting # - Backup: RetroDECK Userdata @@ -531,6 +532,7 @@ configurator_retrodeck_tools_dialog() { "Tool: Compress Games" "Compress games for systems that support it" \ "Install: RetroDECK SD Controller Profile" "Install the custom RetroDECK controller layout for the Steam Deck" \ "Install: PS3 Firmware" "Download and install PS3 firmware for use with the RPCS3 emulator" \ + "Install: PS Vita Firmware" "Download and install PS Vita firmware for use with the Vita3K emulator" \ "RetroDECK: Change Update Setting" "Enable or disable online checks for new versions of RetroDECK" ) case $choice in @@ -571,6 +573,24 @@ configurator_retrodeck_tools_dialog() { fi ;; + "Install: PS Vita Firmware" ) + if [[ $(check_network_connectivity) == "true" ]]; then + configurator_generic_dialog "RetroDECK Configurator - Install: PS Vita firmware" "This tool will download firmware required by Vita3K to emulate PS Vita games.\n\nThe process will take several minutes, and the emulator will launch to finish the installation.\nPlease close Vita3K manually once the installation is complete." + ( + update_vita3k_firmware + ) | + zenity --progress --pulsate \ + --icon-name=net.retrodeck.retrodeck \ + --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \ + --title="Downloading PS Vita Firmware" \ + --no-cancel \ + --auto-close + else + configurator_generic_dialog "RetroDECK Configurator - Install: PS Vita Firmware" "You do not appear to currently have Internet access, which is required by this tool. Please try again when network access has been restored." + configurator_retrodeck_tools_dialog + fi + ;; + "RetroDECK: Change Update Setting" ) configurator_online_update_setting_dialog ;;