What is CHD file? How to use CHD file?

If you're playing retro games, you may have come across files with the extension '.chd'. Let tipsmake.com learn about CHD file and how to use it through the following article!

If you're playing retro games, you may have come across files with the extension '.chd'. In most cases, these files have something in common: They have a confusing name, are relatively large and seem to be of no use.

Let TipsMake.com learn about CHD file and how to use it through the following article!

What is CHD file?

In short, the CHD file is the arcade game disk image used by MAME. This explains why they are so large in size. These days, they have become quite common in many emulators, using relatively large ROMs, like some of the PlayStation Libretro cores in Retroarch and all popular emulation-oriented distributions for the Raspberry series of computers. Pi.

What is CHD file? How to use CHD file? Picture 1What is CHD file? How to use CHD file? Picture 1
CHD is the disk image arcade game used by MAME

If your CHDs are MAME ROMs, then they (usually) will be stored in folders with the same name, in the main ROM directory of MAME.

If they are a backup copy of the games for the original PlayStation or some other console that uses optical discs, then in most cases they should be placed directly in the emulator's ROM subfolder.

In the case of the console emulator, the CHD files usually contain the entire game, so you can 'open them' in the emulator and start playing. However, in MAME, they are only part of the game, because MAME mainly simulates arcade machines.

Unlike game consoles, arcade games often have specialized hardware and software that change between games. Software is usually stored in ROM chips. At some point, with more expensive ROM chips and bigger games, with impressive visuals, developers started using CDs or hard drives to store the game's most valuable assets. - graphics, sound, music, effects - while keeping the smaller core parts of the game on ROM chips.

What is CHD file? How to use CHD file? Picture 2What is CHD file? How to use CHD file? Picture 2
Software is usually stored in ROM chips

The reason this article covers all of this is because CHDs are often useless with MAME. You will need the actual ROM files included in order to use them. CHD files contain game assets, not the game itself. You will have to find the ROMs that come with your specific CHD file and any additional files related to the hardware the game runs.

Put the ROMs in the MAME ROM subdirectory and put your CHD in the same location, but the subfolders have their own names, then try running the ROM with MAME. If you are not using the command line but a GUI-based MAME variant, you may first need to scan / test your ROM.

Check the contents of CHD file

The best tool (from what we know) to work with CHD files comes from their own source, MAME. That tool is called chdman. Depending on the MAME setting, it may be already installed or you can install it yourself using the command:

 sudo apt install mame-tools 
What is CHD file? How to use CHD file? Picture 3What is CHD file? How to use CHD file? Picture 3
Install chdman

To check the CHD image and see some information about its structure, use:

 chdman info -i IMAGE_FILENAME.chd 
What is CHD file? How to use CHD file? Picture 4What is CHD file? How to use CHD file? Picture 4
Check out the CHD image and see some information about its structure

Convert CHD

You can use the same tool to extract the contents of the CHD file and create the file.

Extracting CHD into a more accessible format, like IMG for backing up your hard drive or combining BIN & CUE files for CD backup, is a good idea, if you plan to use those files in an emulator. Other does not support CHD format. In the case of a hard drive image file, use:

 chdman extracthd -i IMAGE_FILE.CHD -o OUTPUT_FILE.IMG 
What is CHD file? How to use CHD file? Picture 5What is CHD file? How to use CHD file? Picture 5
Hard drive image file

For CD backups, replace extracthd in the above command with extractcd .

What is CHD file? How to use CHD file? Picture 6What is CHD file? How to use CHD file? Picture 6
CD backups

Theoretically, if you are using an emulator like PCSX ReARMed or Demul, RetroArch or some emulator distribution for Raspberry Pi, you only have to put your CHD files into the emulator's ROM path. to detect and use them.

The ROM folder may look messy if it contains backups of many games:

  1. Originally in CD format
  2. Currently stored in BIN & CUE file associations
  3. Contains many audio tracks

That's because, with a combination of CUE & BIN files, each track of the original CD is saved as a separate BIN file, so a game can be split into dozens of files.

What is CHD file? How to use CHD file? Picture 7What is CHD file? How to use CHD file? Picture 7
Each track of the original CD is saved as a separate BIN file

The CHD file format was created as a more modern way to store such ROMs, and therefore, it excels in every way. Everything can be contained in a single file and lossless (lossless) compression is applied intelligently (depending on the content) for optimal results. For example, typical data can be compressed using the zlib algorithm, but individual audio tracks are compressed using Flac. This results in a high compression speed and does not cause data loss, because the type of compression used is 'lossless'.

What is CHD file? How to use CHD file? Picture 8What is CHD file? How to use CHD file? Picture 8
Great compression speed

To convert a game divided into CUE and a series of BIN files into a CHD file, use:

 chdman createcd -i "FILENAME.cue" -o "OUTPUT_FILENAME.chd" 

Although possible, you do not have to adjust the compression parameters - the optimal options are automatically selected for you. During the conversion process, chdman will show the different types of compression that it uses in each case, among other information.

What is CHD file? How to use CHD file? Picture 9What is CHD file? How to use CHD file? Picture 9
chdman will present different compression types

After the conversion is complete, try loading your new CHD file in the same emulator you originally used to load that game. If it works, delete the original files and move on to the next game.

What is CHD file? How to use CHD file? Picture 10What is CHD file? How to use CHD file? Picture 10
Delete the original files

If you keep a lot of retro games, by converting the biggest of them to CHD format, at least for the emulators that support it, you'll eventually be able to save lots of Gigabytes of space and then Use to store more retro games!

4.1 ★ | 31 Vote