From b761fdd8d90d2289ac9c9f4b9f901f2e9fdfdacd Mon Sep 17 00:00:00 2001 From: icenine451 Date: Tue, 19 Mar 2024 14:53:23 -0400 Subject: [PATCH 1/3] Revert CSO compression changes and prep for updated chdman --- .../retrodeck/reference_lists/compression_targets.cfg | 3 +-- functions/compression.sh | 8 +++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/emu-configs/defaults/retrodeck/reference_lists/compression_targets.cfg b/emu-configs/defaults/retrodeck/reference_lists/compression_targets.cfg index 92898b2d..4ae00365 100644 --- a/emu-configs/defaults/retrodeck/reference_lists/compression_targets.cfg +++ b/emu-configs/defaults/retrodeck/reference_lists/compression_targets.cfg @@ -6,14 +6,13 @@ 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 5b990c3e..feffae5a 100644 --- a/functions/compression.sh +++ b/functions/compression.sh @@ -10,13 +10,15 @@ compress_game() { local dest_file=$(dirname "$(realpath "$file")")"/""$filename_no_extension" if [[ "$1" == "chd" ]]; then - /app/bin/chdman createcd -i "$source_file" -o "$dest_file".chd + if [[ "$$3" =~ ^(psp)$ ]]; then + /app/bin/chdman createdvd -i "$source_file" -o "$dest_file".chd + else + /app/bin/chdman createcd -i "$source_file" -o "$dest_file".chd + fi 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 } From fc6ebecf799a7668efe548cd0d0727ab7a7c7dc4 Mon Sep 17 00:00:00 2001 From: icenine451 Date: Tue, 19 Mar 2024 15:04:01 -0400 Subject: [PATCH 2/3] Add platform-specific compression commands --- functions/compression.sh | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/functions/compression.sh b/functions/compression.sh index feffae5a..15bce646 100644 --- a/functions/compression.sh +++ b/functions/compression.sh @@ -10,11 +10,17 @@ compress_game() { local dest_file=$(dirname "$(realpath "$file")")"/""$filename_no_extension" if [[ "$1" == "chd" ]]; then - if [[ "$$3" =~ ^(psp)$ ]]; then - /app/bin/chdman createdvd -i "$source_file" -o "$dest_file".chd - else + case "$3" in # Check platform-specific compression options + "psp" ) + /app/bin/chdman createdvd --hunksize 2048 -i "$source_file" -o "$dest_file".chd -c zstd + ;; + "ps2" ) + /app/bin/chdman createdvd -i "$source_file" -o "$dest_file".chd -c zstd + ;; + * ) /app/bin/chdman createcd -i "$source_file" -o "$dest_file".chd - fi + ;; + esac elif [[ "$1" == "zip" ]]; then zip -jq9 "$dest_file".zip "$source_file" elif [[ "$1" == "rvz" ]]; then From 788cfccf41564ec8f65b5f8e9ab27ca2e94fa4ff Mon Sep 17 00:00:00 2001 From: icenine451 Date: Tue, 19 Mar 2024 15:09:18 -0400 Subject: [PATCH 3/3] Remove deprecated chdman tool in favor of MAME compiled one --- net.retrodeck.retrodeck.yml | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/net.retrodeck.retrodeck.yml b/net.retrodeck.retrodeck.yml index 289285c9..1581c3a8 100644 --- a/net.retrodeck.retrodeck.yml +++ b/net.retrodeck.retrodeck.yml @@ -165,16 +165,19 @@ modules: url: https://ftp.osuosl.org/pub/blfs/conglomeration/libgudev/libgudev-237.tar.xz sha256: 0d06b21170d20c93e4f0534dbb9b0a8b4f1119ffb00b4031aaeb5b9148b686aa - - name: chdman-tool - buildsystem: simple - build-commands: - - cmake -B . -G Ninja - - cmake --build . - - cp chdman /app/bin - sources: - - type: git - url: https://github.com/CharlesThobe/chdman.git - commit: f7cadf1720cbeba8a14f2685830ff424a0c7f6cd + # # + # DEPRECATED IN FAVOR OF COMPILED MAME TOOL # + # # + # - name: chdman-tool + # buildsystem: simple + # build-commands: + # - cmake -B . -G Ninja + # - cmake --build . + # - cp chdman /app/bin + # sources: + # - type: git + # url: https://github.com/CharlesThobe/chdman.git + # commit: f7cadf1720cbeba8a14f2685830ff424a0c7f6cd - name: rclone buildsystem: simple