Converting your completely legal, disc-based, bin/cue ROMs for PlayStation emulation into compressed, single-file CHDs using macOS
A member of the PlayStation homebrew community has developed a game for users of PSX emulators to enjoy, released under a permissive software license which allows sharing and re-use. After downloading the completely legal ROM of the game, you notice that the game is provided as a *.bin
and *.cue
file. These instructions will show you how to combine and compress these files into a new *.chd
file which saves you hundreds of megabytes of drive space, and is a single file that is easier to share and load into your preferred PSX emulator.
Each step is explained in English with the corresponding terminal command below it. These instructions should work without problem on any modern macOS — with either Intel or Apple Silicon CPUs. Tested on macOS Ventura 13.5 on both an Intel i9 chip, and an Apple M1 Max chip.
-
A relatively recent version of macOS.
-
Comfortable-enough using Terminal.app (or alternatives).
-
An application which can open
.7z
archives. I can recommend:- The Unarchiver (free)
- Archiver (paid)
-
You have Homebrew installed. (Installation is outside the scope of this tutorial, but it’s pretty fundamental if you do technical things on your Mac.)
- This includes installing the Xcode CLI tools (a much smaller download than the entire Xcode).
-
After downloading the game from the homebrew developer’s website, you find that the game is compressed as a
.7z
file. -
Decompress the
.7z
file.
NOTE: If you are comfortable with Git, GitHub, and Terminal — you just need to
git clone
(or download) the repository, then run the./convert.sh
shell script passing the directory where the.bin
/.cue
files live as the argument. The rest of these instructions are for everyone else.
-
Download a .zip file containing the source code from the
skyzyx/bin-cue-chd
GitHub repository. By default, it will save to yourDownloads
folder. -
Inside your
Downloads
folder, findbin-cue-chd-main.zip
and double-click it to decompress it into a folder calledbin-cue-chd-main
. -
Using Spotlight (by default, command-spacebar —
⌘[space]
), search for Terminal. When there is a matching result, press enter/return. -
In Terminal, type
cd
followed by the spacebar. -
Using your mouse/trackpad, click-and-drag the
bin-cue-chd-main
folder from Finder into your Terminal window. You’ll notice that the path of the folder got filled-in after thecd
. -
Press enter/return. You are now inside the
bin-cue-chd-main
folder in your Terminal app. -
Install
findutils
androm-tools
using Homebrew.brew install findutils rom-tools
You’re stiil in the Terminal app, and still inside the bin-cue-chd-main
folder. Right?
NOTE: To check, type
pwd
and press enter/return. You should see a path that ends withbin-cue-chd-main
.
-
Type the following (beginning with a period-slash), followed by a space.
./convert.sh
-
Find the Finder window that shows the folder where your
.bin
/.cue
ROM is. -
Just like before — using your mouse/trackpad, click-and-drag the ROM folder from Finder into your Terminal window. You’ll notice that the path of the folder got filled-in after the
./convert.sh
../convert.sh /example/path/to/your/game/folder
-
Press enter/return to begin the conversion.
-
You’ll see something similar to:
Will process files on directory: /Users/rparman/Desktop/Legal ROMS/Random Game that is a Legal ROM (USA) Press enter to continue. Press Ctrl+C to quit.
Press enter/return.
-
The files will begin processing, and look similar to:
Processing file: /Users/rparman/Desktop/Legal ROMS/Random Game that is a Legal ROM (USA)/Random Game that is a Legal ROM (USA).cue chdman - MAME Compressed Hunks of Data (CHD) manager 0.254 (unknown) Output CHD: /Users/rparman/Desktop/Legal ROMS/Random Game that is a Legal ROM (USA)/Random Game that is a Legal ROM (USA).chd Input file: /Users/rparman/Desktop/Legal ROMS/Random Game that is a Legal ROM (USA)/Random Game that is a Legal ROM (USA).cue Input tracks: 1 Input length: 70:37:12 Compression: cdlz (CD LZMA), cdzl (CD Deflate), cdfl (CD FLAC) Logical size: 777,945,024 Compressing, 72.1% complete... (ratio=62.3%)
-
When it’s done, you’ll have a new
.chd
file in the same folder as the.bin
/.cue
files. The.chd
is a replacement for the.bin
/.cue
files.It is now one file that contains your game, and uses less space on-disk.
-
When you’re ready, you can copy it to the location where you keep/play your other legal ROMs.