How to run CD-i games in MAME

- 4 mins read

a screenshot from the game Laser Lords

Someone recently mentioned on a twitch stream that they haven’t figured out how to run CD-i games in MAME, and I’ve also been meaning to check out some CD-i games, so here’s a quick guide for how to do it.

First, you obviously need MAME, which you can download from https://www.mamedev.org/. MAME is mostly known as an emulator for arcade games, but it supports a ton of non-arcade systems as well: consoles, plug-and-plays, home computers, and also the Philips CD-i.

But you can’t just drop in any CD-i disc and expect it to play. MAME’s support of non-arcade platforms is configured through “softwarelists”, which list the supported files and file hashes for each system. These lists are part of the MAME distribution, in the hash folder. The CD-i software list for CD-i is in hash/cdi.xml. In this file you can see the games that MAME will recognize, and which filenames and file hashes are expected. I’m assuming if you want to try any other discs, you can just edit this file to add them.

You might be able to find a matching set of the game files for download, so you won’t have to mess around with the software lists, but the download I tried seemed outdated and had the wrong hashes for my MAME. So this guide describes how to use games from a more common source (like Redump or TOSEC).

My example game here will be Zenith, a game where you control a bouncing ball, viewed from the top. The software list entry for Zenith looks like this:

<software name="zenith">
  <!--
  Origin: TOSEC
  <rom name="Zenith (1997)(Philips)(EU).iso" size="37048704" crc="4e4e7300" md5="a5e9d9e3faa528668afa4326a0e81a4c"/>
  <rom name="Zenith (1997)(Philips)(EU).cue" size="115" crc="74300fce" md5="8206c66d02cba6bc95601c4f0bbb3514"/>
  -->
  <description>Zenith (Europe)</description>
  <year>1997</year>
  <publisher>Philips</publisher>
  <part name="cdrom" interface="cdi_cdrom">
    <diskarea name="cdrom">
      <disk name="zenith (1997)(philips)(eu)" sha1="af7b9dcfc7e89d442947e32b4d754f1899305316"/>
    </diskarea>
  </part>
</software>

The comment describes where the information is from (in this case TOSEC), and the original files. But MAME doesn’t use cue/bin files for disc images, because MAME has its own format for discs, called CHD. So either you have to find a download of the disc as .chd, or you can convert a cue/bin image into a chd. MAME comes with a tool called chdman.exe which can convert to and from CHD. Just call it like chdman createcd -i mydisc.cue -o mydisc.chd.

The expected name for the CHD image is in the <disk name=, in this case the file must be named zenith (1997)(philips)(eu).chd. In order for MAME to find the file, it also has to be in a specific path under your roms directory. MAME looks for the system name first, and then the name from <software name=, so for Zenith, the file has to be under the path cdi/zenith/zenith (1997)(philips)(eu).chd in your roms directory.

MAME will only accept the CHD image if it also matches the given sha1 hash checksum. If you want to check that you have the correct image, or want to enter a new game, you can get the sha1 hash for a CHD image with the command chdman info -i mydisc.chd (in the line with “SHA1:”, not “Data SHA1:”).

Additionally to the game, you also need the CD-i firmware. I don’t know which specific type of CD-i works best here, and I assume there are PAL/NTSC differences, so you might have to try different firmwares for different games. I went with cdimono1.zip for “CD-i (Mono-I) PAL”, which also goes into the roms directory.

Now you can start MAME, and pick your model of CD-i, in my case “CD-i (Mono-I) PAL”. When you choose it, the list of supported software should open. You can choose “Available” on the left side to reduce the list to only the locally available files. Now choose your game, in my case “Zenith (Europe)”, pick a BIOS (again no idea which one is best, I just picked the first one), and the CD-i should start up. When the CD-i start screen comes up, click on the “Play CD-I” button to launch the game.

If you’re wondering about the black bar on top, I believe that’s an emulation of the CD-i player’s LCD display. I don’t know if any games make significant use of it.