CHD Files: What They Are & How to Use Them
In this article
CHD files are compressed disk images most commonly used by emulators to store the contents of CDs, DVDs, and hard drives. The short answer: a CHD file is a single, compressed archive of an entire disc, created by the MAME project's chdman tool, and it exists to save space while keeping the original data intact. You'll encounter them when using emulators like MAME, RetroArch, or standalone systems for Sega Saturn, PlayStation, and arcade games. This guide explains what CHD files are, how to open them, and how to create them.
What You'll Need
- An emulator that supports CHD files (most modern ones do, including MAME, RetroArch, and Mednafen).
- The original disc image you want to convert (e.g., a .cue/.bin, .iso, or .gdi file).
- The official
chdmantool, which comes with MAME. You can download MAME from the official MAME website. - A computer with enough free storage space for both the original image and the resulting CHD file.
Step-by-Step
- Understand what a CHD file is. CHD stands for Compressed Hunks of Data. It's a lossless compression format designed specifically for raw disc images. It stores the exact sector data of a disc, so nothing is lost, but it uses compression to reduce file size. It also supports snapshots (for save states) and parent/child relationships (for ROM sets).
- Get the right tools. Download MAME from the official site (mamedev.org). The
chdmanexecutable is included in the MAME package, usually in the same folder as the MAME executable. On Windows, it'schdman.exe; on Linux/macOS, it'schdman. - Open a command prompt or terminal. On Windows, press
Win + R, typecmd, and press Enter. On macOS, open Terminal from Applications > Utilities. On Linux, open your preferred terminal. - Navigate to your CHD file's location. Use the
cdcommand to change to the directory where your original disc image is stored. For example:cd C:\Users\YourName\ROMs\Saturn. If you're not sure how to usecd, just drag and drop the folder into the terminal window after typingcd(with a space). - Create a CHD from a disc image. The basic command is:
chdman createcd -i "input.cue" -o "output.chd". Replaceinput.cuewith your actual file name (if it's a .bin/.cue, use the .cue file; if it's an .iso, use the .iso; if it's a .gdi, use the .gdi). The-oflag specifies the output file name. For example:chdman createcd -i "Panzer Dragoon.cue" -o "Panzer Dragoon.chd". - Wait for the conversion. The tool will read the original image and write the CHD file. Depending on the size of the disc, this can take a few minutes. You'll see progress messages. When it's done, you'll have a new .chd file in the same folder.
- Use the CHD file in your emulator. Place the .chd file in the folder where your emulator expects ROMs (for example, the
romsfolder in MAME, or thegamesfolder in RetroArch). Then launch the emulator and load the CHD file as you would any other game. In MAME, you can often just double-click the CHD file if it's in the correct folder. - For hard drive images (like some arcade games), use
createhd. The command is similar:chdman createhd -i "input.raw" -o "output.chd". This is less common, but if you have a raw hard drive image, this is the way.
Common Mistakes
- Using the wrong input file. For CD-based games, you must point to the .cue file if you have a .bin/.cue pair, not the .bin file. If you use the .bin, the conversion may fail or produce a broken CHD.
- Forgetting quotes around file names with spaces. If your file name has spaces, you must enclose it in double quotes in the command line. Otherwise, the command will interpret each word as a separate argument.
- Not having enough disk space. CHD files are usually smaller than the original, but the conversion process may need temporary space. Make sure you have at least as much free space as the original image size.
- Using an outdated chdman. Older versions of chdman may not support newer CHD formats or certain disc types. Always use the latest version from the official MAME release.
- Assuming CHD works for every system. CHD is primarily for disc-based media. For cartridge-based games (like NES or SNES), you should use the original ROM format (.nes, .sfc, etc.). CHD is not for those.
Tips
- Keep the original image until you've tested the CHD. After converting, load the CHD in your emulator to make sure it works. If it doesn't, you still have the original to fall back on.
- Use CHD for large disc-based games. For a PlayStation game that might be 700 MB as .bin/.cue, a CHD can often reduce that to 300-400 MB without any quality loss.
- For MAME arcade games, CHD files often need to be placed in a subfolder. In MAME, a CHD for a specific arcade game typically goes in a folder named after the ROM set (e.g.,
roms/area51/area51.chd). Check your MAME documentation for the exact path. - Use the
-fflag to force overwrite. If you're converting and the output file already exists, chdman will ask for confirmation. Adding-fwill overwrite without asking. - If you're on a Mac or Linux, you may need to run
chdmanwith./prefix. For example:./chdman createcd -i "input.cue" -o "output.chd".
Troubleshooting
If the conversion fails or the CHD doesn't work, try these in order:
- Check the input file integrity. Make sure the original .cue/.bin or .iso isn't corrupted. Try mounting it in a virtual drive (like Daemon Tools) or opening it in another emulator to confirm it works.
- Update chdman. Download the latest MAME release and use the chdman from that. Older versions may have bugs or lack support for newer formats.
- Try a different input format. If you have a .bin/.cue, try converting the .bin directly with
createcd -i "file.bin"(without the .cue). Some discs have unusual track layouts that confuse the .cue parser. - Check the output path. Make sure you have write permissions to the folder where you're creating the CHD. On Windows, avoid folders like
C:\Program Fileswhich may require admin rights. - If the emulator doesn't recognize the CHD, verify it's in the right folder. For MAME, CHD files must be in a subfolder named after the ROM set. For RetroArch, you may need to set the correct core and ensure the CHD is in the content directory.
- If all else fails, re-download the original image. The image may be incomplete or corrupted. Try a different source (respecting copyright laws).
Frequently Asked Questions
Can I open a CHD file without an emulator?
Yes, you can extract the contents using chdman extractcd to get back the original .cue/.bin or .iso, but you can't view the game data directly like a folder. CHD is a container, not a filesystem.
Are CHD files lossy?
No, CHD compression is lossless. The data is exactly the same as the original disc; only the file size is reduced. This is why it's preferred for preserving games.
Can I convert a CHD back to .iso or .bin/.cue?
Yes. Use chdman extractcd -i "game.chd" -o "game.cue" to extract to a .cue/.bin pair, or chdman extracthd for hard drive images. The output will be identical to the original.
Why use CHD instead of .zip or .7z?
CHD is designed for raw disc images, which have a specific sector layout. Generic compression tools like ZIP don't preserve that layout efficiently. CHD also supports random access, which emulators need for smooth loading.
Do all emulators support CHD?
Not all, but most modern ones do. MAME, RetroArch (with cores like Beetle Saturn, PCSX ReARMed), Mednafen, and many standalone emulators (like DuckStation for PlayStation) support CHD. Check your emulator's documentation.
Is it legal to download CHD files?
It depends on the copyright status of the game. Downloading ROMs or disc images for games you don't own is generally considered copyright infringement. Always create CHD files from discs or images you legally own.