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 [2023/08/13 05:57] – cleaning up new cdi section ataridisk_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....
  
-<code+<file bash allimg-to-chd.sh
-for i in *.cue; do chdman createcd -i "${i}" -o "${i%.*}.chd"; done +#!/usr/bin/env -S bash #PROTECTED 
-</code>+grep -rlq $'\r' "$0" && { dos2unix -k -q "$0"; echo "Script repaired ... please try again"; exit 0; } # Selfrepair for called script 
 +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 
 +popd 
 +</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 239: Line 251:
 **Linux/macOS:** **Linux/macOS:**
  
-<code+<file bash iso-to-cso.sh> 
-for i in *.iso; do maxcso "${i}"; done +#!/bin/bash 
-</code>+for i in *.iso; 
 +do maxcso "${i}"; 
 +done 
 +</file>
  
 **Windows:** **Windows:**
  
-<code>+<file - iso-to-cso.bat>
 for %i in (*.iso) do maxcso.exe "%i" for %i in (*.iso) do maxcso.exe "%i"
-</code>+</file>
  
 === With ciso === === With ciso ===
Line 285: Line 300:
 **Linux/MacOS:** **Linux/MacOS:**
  
-<code+Create a file with these contents... 
-for i in *.iso; do ciso 9 "${i}" "${i}".ciso; done + 
-</code>+<file bash iso-to-ciso.sh> 
 +#!/bin/bash 
 +for i in "$@"; do  
 +    ciso 9 "${i}" "${i%*.iso}".cso; 
 +done 
 +</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:**
  
-<code>+<file - iso-to-ciso.sh>
 for %i in (*.iso) do ciso.exe 9 "%i" "%i".ciso for %i in (*.iso) do ciso.exe 9 "%i" "%i".ciso
-</code>+</file>
  
 ===== PBP ===== ===== PBP =====
Line 414: Line 442:
 **Linux/MacOS:** **Linux/MacOS:**
  
-<code+<file bash iso-to-pbp> 
-for i in *.iso; do psxpackager -l 9 -i "${i}" -o "${i}".pbp; done +#!/bin/bash 
-</code>+for i in *.iso; 
 +do psxpackager -l 9 -i "${i}" -o "${i}".pbp; 
 +done 
 +</file>
  
 Here's a command to convert all the games in the current folder and recursive folders to PBP:  Here's a command to convert all the games in the current folder and recursive folders to PBP: 
-<code>+<file bash all-to-pbp.sh>
 find . -name "*iso" -exec psxpackager -l 9 -i {} -o {}.pbp \; find . -name "*iso" -exec psxpackager -l 9 -i {} -o {}.pbp \;
 find . -name "*cue" -exec psxpackager -l 9 -i {} -o {}.pbp \; find . -name "*cue" -exec psxpackager -l 9 -i {} -o {}.pbp \;
 find . -name "*m3u" -exec psxpackager -l 9 -i {} -o {}.pbp \; find . -name "*m3u" -exec psxpackager -l 9 -i {} -o {}.pbp \;
-</code>+</file>
  
 **Windows:** **Windows:**
  
-<code>+<file - all-to-pbp.bat>
 for %i in (*.iso) do psxpackager.exe -l 9 -i "%i" -o "%i".pbp for %i in (*.iso) do psxpackager.exe -l 9 -i "%i" -o "%i".pbp
 for %i in (*.cue) do psxpackager.exe -l 9 -i "%i" -o "%i".pbp for %i in (*.cue) do psxpackager.exe -l 9 -i "%i" -o "%i".pbp
 for %i in (*.m3u) do psxpackager.exe -l 9 -i "%i" -o "%i".pbp for %i in (*.m3u) do psxpackager.exe -l 9 -i "%i" -o "%i".pbp
-</code>+</file>
  
 OR OR
Line 520: Line 551:
   cd /userdata/roms/dos   cd /userdata/roms/dos
   mksquashfs skweek.pc skweek.pc.squashfs   mksquashfs skweek.pc skweek.pc.squashfs
 +  
 +  cd /userdata/roms/scummvm
 +  mksquashfs "astro chicken" "astro chicken.squashfs" -comp xz
  
 Or to compress a single file : Or to compress a single file :
  • disk_image_compression.1691906220.txt.gz
  • Last modified: 3 years ago
  • by atari