From 6d5b9cda8b57d77f5b6b10164a6c6c02647a1658 Mon Sep 17 00:00:00 2001 From: icenine451 Date: Tue, 27 Feb 2024 09:09:05 -0500 Subject: [PATCH] Move PSP compression to cso format - User reports that CHD format breaks PSP games - Suggested replacement 'maxcso' needs to be added to flatpak still --- .../retrodeck/reference_lists/compression_targets.cfg | 3 ++- functions/compression.sh | 10 +++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/emu-configs/defaults/retrodeck/reference_lists/compression_targets.cfg b/emu-configs/defaults/retrodeck/reference_lists/compression_targets.cfg index 4ae00365..92898b2d 100644 --- a/emu-configs/defaults/retrodeck/reference_lists/compression_targets.cfg +++ b/emu-configs/defaults/retrodeck/reference_lists/compression_targets.cfg @@ -6,13 +6,14 @@ megacd neogeocd pcenginecd pcfx -psp psx ps2 saturn saturnjp segacd tg-cd +[cso] +psp [rvz] gc wii diff --git a/functions/compression.sh b/functions/compression.sh index 3d5a819f..5b990c3e 100644 --- a/functions/compression.sh +++ b/functions/compression.sh @@ -10,15 +10,13 @@ compress_game() { local dest_file=$(dirname "$(realpath "$file")")"/""$filename_no_extension" if [[ "$1" == "chd" ]]; then - if [[ "$3" == "psp" ]]; then - echo "Put createdvd or maxcso here" # TODO - else - /app/bin/chdman createcd -i "$source_file" -o "$dest_file".chd - fi + /app/bin/chdman createcd -i "$source_file" -o "$dest_file".chd elif [[ "$1" == "zip" ]]; then zip -jq9 "$dest_file".zip "$source_file" elif [[ "$1" == "rvz" ]]; then dolphin-tool convert -f rvz -b 131072 -c zstd -l 5 -i "$source_file" -o "$dest_file.rvz" + elif [[ "$1" == "cso" ]]; then + echo "TODO: maxcso command" fi } @@ -34,6 +32,8 @@ find_compatible_compression_format() { echo "zip" elif echo "$normalized_filename" | grep -qE '\.iso|\.gcm' && [[ $(sed -n '/^\[/{h;d};/\b'"$system"'\b/{g;s/\[\(.*\)\]/\1/p;q};' $compression_targets) == "rvz" ]]; then echo "rvz" + elif echo "$normalized_filename" | grep -qE '\.iso' && [[ $(sed -n '/^\[/{h;d};/\b'"$system"'\b/{g;s/\[\(.*\)\]/\1/p;q};' $compression_targets) == "cso" ]]; then + echo "cso" else # If no compatible format can be found for the input file echo "none"