CHD stands for “Compressed Hunks of Data” and is developed as part of the tools for MAME.

It is an awesome format for storing your game ROMs and keeping the size in control, in this post we explore this format and my success in using it across variety of emulators.

Installing chdman

The tool used to create and work with chd files is known as chdman and is a part of the MAME tools.

If you are on Linux, check your distribution’s package manager for a package called mame-tools and chdman should be included in it.

macOS (and also Linux users) can use Homebrew through the package rom-tools

Windows users can download it from here

PSP

PPSSPP is my favorite emulator by far, it has the best interface and it just feels good.

For a long time it was possible to compress your games to CSO (Compressed ISO) which heavily helped in reducing the file size, CISO made use of GZip for its compression and it worked well, but as of PPSSPP version 1.17 CHD is now another supported method so let’s take a look at how it performs.

First, PPSSPP recommends using createdvd which is fairly a new addition to chdman so a lot of old examples/scripts are still using createcd so ensure you have an up to date tools, createdvd was added since MAME v0.255, in my case as I am on Debian 12 my packages turned out to be outdated, luckily I found an unofficial .deb and managed to update my package to 0.255, if your distro packages are outdated using Homebrew like macOS users is also an option since brew is also a Linux package manager!

To convert PSP games to chd you need the .iso file and you can run a command like so:

chdman createdvd -i game.iso -o game.chd

On Windows ensure you open a command prompt within the folder that contains your chdman.exe so the tool can be used.

Another warning, MAME 0.263 changes the default “hunk size” to be about 2 sectors (4096 bytes) which is wrong, and PPSSPP may complain that your file is not correct, so if you are using these newer MAME versions ensure you pass -hs 2048 into the above command to use the correct sector size. I’m not sure why this change, DVD sizes are technically 2048 bytes, so moving forward keep this in mind even on the other emulators like PS2 games (as long as DVDs are involved that is). Since I only got mine updated to 0.255 I don’t need to worry about this, at least for the mean time.

Now let’s take a look at some of the size comparisons to see if it’s worth it, here’s a game in .7z format (unplayable), ISO, CSO and finally CHD.

The .7z format is the format I downloaded the games in, it’s very well compressed but the game is not playable until you extract it so ideally we want to reach as close as possible to the same size savings it offers while remaining playable.

The CSO versions were compressed with level 9 maximum compression.

Game7zISOCSOCHD
Aliens vs. Predator - Requiem156,860,309 (156 MB)396,490,752 (396 MB)293,367,122 (293 MB)259,395,041 (259 MB)
Summon Night 5221,574,131 (221 MB)912,064,512 (912 MB)443,586,225 (443 MB)337,868,039 (337 MB)
Gran Turismo941,990,400 (941 MB)1,097,826,304 (1.09 GB)1,008,530,753 (1.00 GB)984,475,868 (984 MB)
Wangan Midnight Portable (Japan)207,493,776 (207 MB)336,492,544 (336 MB)293,486,428 (293 MB)239,510,319 (239 MB)
Yu-Gi-Oh! 5D’s Tag Force 5661,052,628 (661 MB)1,713,797,120 (1.71 GB)1,122,590,284 (1.12 GB)937,184,373 (937 MB)
Yu-Gi-Oh! GX Tag Force375,506,173 (375 MB)701,693,952 (701 MB)527,097,488 (527 MB)459,847,087 (459 MB)
The Sims 2349,973,799 (349 MB)1,115,553,792 (1.11 GB)483,558,833 (483 MB)407,079,170 (407 MB)
AI Igo (Japan)4,143,265 (4 MB)12,875,776 (12.8 MB)7,054,538 (7 MB)6,641,988 (6.6 MB)
Power Stone Collection203,945,200 (203 MB)517,341,184 (517 MB)341,293,848 (341 MB)238,908,201 (238 MB)
Petz - Dogz Family86,253,739 (86 MB)189,399,040 (189 MB)88,921,039 (88 MB)86,774,852 (86 MB)
Initial D - Street Stage (Japan)271,589,516 (271 MB)1,187,936,256 (1.18 GB)628,141,047 (628 MB)359,205,737 (359 MB)
Call of Duty - Roads to Victory345,182,580 (345 MB)640,974,848 (640 MB)502,372,986 (502 MB)404,597,115 (404 MB)
Riviera - The Promised Land488,733,334 (488 MB)1,093,140,480 (1.09 GB)511,900,800 (511 MB)495,149,902 (495 MB)
Grand Theft Auto - Vice City Stories584,369,442 (584 MB)1,696,006,144 (1.69 GB)939,412,751 (939 MB)878,458,969 (878 MB)
Need for Speed - Most Wanted 5-1-0140,775,710 (140 MB)926,580,736 (926 MB)187,999,505 (187 MB)170,365,641 (170 MB)
Hatsune Miku - Project Diva (Japan)942,886,079 (942 MB)1,402,929,152 (1.40 GB)1,100,294,313 (1.10 GB)1,065,903,766 (1.06 GB)
Hatsune Miku - Project Diva Extend (Japan)1,198,651,695 (1.19 GB)1,799,192,576 (1.79 GB)1,366,766,048 (1.36 GB)1,308,794,011 (1.30 GB)

I’ll be updating this table as I try more games but as you can already see, CHD is performing better than CSO.

It’s worth noting CSO can also be used in real hardware, so it’s probably the better option if you are still playing on a real PSP, but for pure emulation use CHD is looking great.

PSX

PSX or the first PlayStation uses the CD format so even old versions of chdman will do fine as all we need is createcd

One thing I hated about PSX games is how it came in .bin and .cue files, my game library is usually neatly organized into a folder for the console and filled with roms, but in PSX one rom is multiple files, which prompted me to make a different folder for every game, however chd can take the .cue and its required .bin files can be merged into one playable .chd

The command is

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

Let’s see our savings here, for the raw size I combined the total size of the associated .bins

Game7zRawCHD
Resident Evil - Director’s Cut301,759,038 (301 MB)707,027,664 (707 MB)330,852,427 (330 MB)
Resident Evil 2 (Disc 1)388,434,739 (388 MB)656,887,728 (656 MB)370,927,339 (370 MB)
Detective Barbie - The Mystery Cruise162,643,245 (162 MB)618,538,368 (618 MB)189,240,366 (189 MB)
Initial D (Japan)217,891,611 (217 MB)537,457,872 (537 MB)287,306,450 (287 MB)

PS2

PS2 games are huge, since they are DVDs now, uncompressed games can go as high as 4.7 GB, I found my storage being eaten up real quick downloading a few PS2 games, so let’s see what it can do here.

First of all note that a few PS2 games also comes in CD format, you’ll know when you have .cue and .bin files, treat them just like the PSX section above.

As for the rest of the games they are in DVD format and we follow the same thing like we handled PSP games, using the createdvd command and passing -hs 2048 if using the newest MAME tools, since DVD sectors are 2048 bytes.

And here is my results:

Game7zISOCHD
Devil May Cry1,860,457,413 (1.86 GB)4,698,767,360 (4.69 GB)1,840,427,447 (1.84 GB)
Devil May Cry 2 (Disc 1) (Dante Disc)945,877,171 (945 MB)4,698,767,360 (4.69 GB)1,057,288,082 (1.05 GB)
Black1,090,913,749 (1.09 GB)3,919,609,856 (3.91 GB)1,200,626,685 (1.20 GB)

Conclusion

CHD format is awesome and allows us to use one file format for many emulators instead of having to deal with a dedicated compression format along with its tools to work with them for each console.

Its storage savings also proved to be very strong, getting ahead of CSO when competing in the PSP front and I’m glad that the PPSSPP developers have adopted CHD.