Disc image compression

Systems from the 5th and 6th console generation often use optical discs like CD or DVD to store game data. Disc image sizes range from 700 MB (CD), 1.4 GB (GC Mini-DVD), 4.7 GB (single-layered DVD) and even 25 GB (Blu-Ray) for newer systems. Often times only a fraction of the actual disc size is used for game data and the rest is filled with dummy data to be optimized for read access by the optical drive laser.

The Super Mario 25th Anniversary Wii disc itself is a 4.7GB, when really the actual game data is only a single SNES ROM (12 MB of useful data). Disc compression helps to save more than 99% of hard disk space and can speed up loading time on emulators.

On the other side systems like the Sony PlayStation often use multi-track images (data and audio tracks) containing several *.bin and *.cue files which can become cumbersome in daily usage with Batocera or other emulation frontends.

Choosing the right disc image compression can help in both cases and should be the preferred format for most of the disc based systems. This page will help you to find the suitable compression method and toolset.

If you are not familiar with using command line tools there are is also a GUI-based helper tool available:

CHD is short for (C)ompressed (H)unks of (D)ata. It is a lossless compression format originally developed for MAME, for the hard-drive contents of certain arcade machines. It has since been used in several other emulators as a means of storing disc based game data. It compresses the contents of a disc image to a handy single .chd file.

CHD is supported by many systems and the recommended format for the following systems:

If you have one of the PAL PlayStation games that features LibCrypt copy protection, you have a .sbi file in addition to the .bin/.cue file. The CHD creation process doesn't process the .sbi file. Therefore you will need the .sbi file in the same directory as the .chd file for the game to run.

CHD files can be created using the chdman program, developed by the MAME project. It is a commmand line application. You can create a .chd file from the following formats:

*.cue
*.iso
*.gdi

If there is a *.cue file available, always use this for creating the .chd, otherwise choose the *.iso (Sony PlayStation 2) or *.gdi (Dreamcast) file:

chdman createcd -i <game.cue> -o <game.chd>

After that you can delete the *.cue/*.bin, *.iso or *.gdi file.

The compression is fully lossless so it is possible to redo the compression and get the original files back:

chdman extractcd -i <game.chd> -o <game.cue>

CHD batch converting

You can batch convert all files in a directory like following (replace .cue with the correct file type you want to convert):

Linux/macOS:

On Linux you can install the mame-tools package on most distributions. On macOS use brew to install the package rom-tools.

for i in *.cue; do chdman createcd -i "${i}" -o "${i%.*}.chd"; done

Windows:

Just place the chdman.exe into the directory where you have your disc images. The official MAME package contains a copy of the executable file.

for %i in (*.cue) do chdman.exe createcd -i "%i" -o "%~ni.chd"

CSO is a compression method for the ISO image format and is the short form for Compressed ISO. It also called CISO.

It was originally used to compress PlayStation Portable UMD disc images.

CSO/CISO is supported by multiple systems and the recommended format for the following systems:

  • ps2 (prior to Batocera v31)

The Wii/Gamecube also support a CSO/CISO format, that is unrelated to the compression method explained here. More information can be found at the wit: Wiimms ISO Tool.

There are different tools to create CSO files. maxcso is a free command line application that is available to Linux, macOS and Windows.

To compress an ISO file just use:

maxcso <game.iso>

This will create a <game.cso> file in the same folder. Afterwards you can delete the .iso files to free up space.

The compression is fully lossless so it is possible to redo the compression and get the original files back:

maxcso --decompress <game.cso>

CSO batch converting

Batch conveting can be done with a simple for loop.

Linux/macOS:

for i in *.iso; do maxcso "${i}"; done

Windows:

for %i in (*.iso) do maxcso.exe "%i"

The Dolphin team developed a new compression format based on WIA called RVZ. Unlike all the previous formats, RVZ is lossless and can preserve the padding data on Wii discs as well as the necessary files needed by the Wii's IOS. Usage is very similar to GCZ in Dolphin itself, but it only works on newer Dolphin versions.

RVZ is only supported by the Dolphin emulator and therefore the recommended format for the following systems:

You need the Dolphin emulator (minimum version 5.0-12188+) to compress ISO files. At the moment the compression has to be done via the User interface:

Find your game in Dolphins game list, right click and select “Convert File…”

The default settings should be fine. If you want you can raise the compression level.

You can convert your game image back to ISO from RVZ when you want to restore it back to an exact replica of your game ISO the same way.

RVZ batch converting

Just multi-select with pressing the CTRL key to choose multiple games and select “Convert File…”

  • disk_image_compression.txt
  • Last modified: 2 months ago
  • by igno2k