Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
disk_image_compression [2024/01/21 01:26] – [SquashFS] scummvm folders into .squashfs maionidisk_image_compression [2026/03/27 10:24] (current) – ↷ Links adapted because of a move operation 40.77.167.44
Line 30: Line 30:
   * [[systems:3do]]   * [[systems:3do]]
   * [[systems:dreamcast]]   * [[systems:dreamcast]]
-  * [[systems:segacd]]+  * [[systems:megacd]]
   * [[systems:neogeocd]]   * [[systems:neogeocd]]
   * [[systems:pcenginecd]]   * [[systems:pcenginecd]]
Line 95: Line 95:
 chdman extractcd -i <game.chd> -o <game.cue> chdman extractcd -i <game.chd> -o <game.cue>
 </code> </code>
 +
 +For DVD-based systems, you can use the ''createdvd'' command rather than ''createcd'' in the examples above. It is usually a little more efficient in term of compression (7-10% gain on the resulting ''.chd'' file) but it also provides better performance in-game. 
  
 === CHD batch converting === === CHD batch converting ===
Line 102: Line 104:
 **Linux/macOS:** **Linux/macOS:**
  
-Navigate to the folder that has all your game ROMs and run the following ''for'' loop to convert all the files in one go:+Place the script into your folder that holds your ROMs and execute the script. This will take it's time. So relax....
  
-<file bash cue-to-chd.sh> +<file bash allimg-to-chd.sh> 
-#!/bin/bash +#!/usr/bin/env -S bash #PROTECTED 
-for i in *.cue; +grep -rlq $'\r' "$0" && { dos2unix -k -q "$0"; echo "Script repaired ... please try again"; exit 0; } # Selfrepair for called script 
-do chdman createcd -i "${i}" -o "${i%.*}.chd";+pushd "$(dirname "$0")" 
 +readarray -t array < <(find -maxdepth 1 -type f \( -iname "*.cue" -o -iname "*.iso" -o -iname "*.toc" -o -iname "*.gdi" -o -iname "*.nrg" \) -printf "%p\n"
 +[ -z "${array[@]}" ] && { echo "No disc images found.... Exit now"exit; } 
 +[ -f "/usr/bin/mame/chdman" ] || { echo "chdman not found! ... Exit now"; exit; } 
 +for i in "${array[@]}"; do 
 +    /usr/bin/mame/chdman createcd -i "${i}" -o "${i%.*}.chd"; 
 +    echo; echo "You can remove file: $i and additionals if you want!"
 done done
 +popd
 </file> </file>
  
-replacing ''*.cue'' as needed. If you're converting a lot of files, practice some yoga poses. This may take a while.+replacing ''*.cue'' and other images as needed. If you're converting a lot of files, practice some yoga poses. This may take a while.
  
 Here's a command to convert all the games in the current folder and recursive folders to CHD:  Here's a command to convert all the games in the current folder and recursive folders to CHD: 
Line 290: Line 299:
  
 **Linux/MacOS:** **Linux/MacOS:**
 +
 +Create a file with these contents...
  
 <file bash iso-to-ciso.sh> <file bash iso-to-ciso.sh>
 #!/bin/bash #!/bin/bash
-for i in *.iso; +for i in "$@"; do  
-do ciso 9 "${i}" "${i}".ciso;+    ciso 9 "${i}" "${i%*.iso}".cso;
 done done
 </file> </file>
 +
 +...mark it executable with this...
 +
 +<code>chmod +x iso-to-ciso.sh</code>
 +
 +...and then run it like this:
 +
 +<code>./iso-to-ciso.sh *.iso</code>
  
 **Windows:** **Windows:**
Line 534: Line 553:
      
   cd /userdata/roms/scummvm   cd /userdata/roms/scummvm
-  mksquashfs "astro chicken" "astro chicken.squashfs" -comp -xz+  mksquashfs "astro chicken" "astro chicken.squashfs" -comp xz
  
 Or to compress a single file : Or to compress a single file :
  • disk_image_compression.1705800362.txt.gz
  • Last modified: 2 years ago
  • by maioni