#open source

Photo of an EPROM reader/writer device with a chip in it
Photo of a game board with chips on it
Screenshot of the game's copyright notice
Screenshot of the ittle screen

This is one of those things I've wanted to do forever: dumping an arcade game to add it to MAME!

One of the game carts I bought recently, The Gladiator, turns out to be an otherwise-undumped game revison. Like many arcade games, they released a number of versions after it came out with various bugfixes and improvements. MAME has the final release, 1.07, and the first few revisions, but it's missing most of the in-between versions. When my copy came here, I found out it was one of those versions MAME was missing: 1.04.

Luckily, this wasn't too hard to do. Depending on the kind of game, chips might be attached straight to the board, or they might be in sockets where they can be easily removed and reattached. The Gladiator has two game boards, one of which uses two socketed chips. And, luckily, those were the only two chips I had to remove and dump; all of the other chips are shared between every revision of the game.

Why are there so many chips? Arcade games usually used a large number of chips, instead of just a few like in console games, and each chip tended to be specialized for a specific purpose. These chips were usually connected directly to particular regions of the system's hardware, like graphics or sound, which means that even though it's less flexible than an all-in-one ROM, it has some advantages too. The two chips I dumped here are program code for two different CPUs: one for the 68000 CPU in the system itself, and one for the ARM7 CPU in the game cartridge.

To remove the chips, I used an EPROM removal tool - basically just a little set of pliers on a spring, with pair of needle noses that get in under the edge of the chip in the socket so you can pull it out. They're both standard parts, thankfully, so once I got them out they weren't difficult to read. The most important chip, which has the game's program code, is an EPROM chip known as the 27C160 - a 2MB chip in a specific form factor. I already own a reader that supports that and the 4MB version of the same chip, which you can see in the first photo.

I spent awhile fumbling around trying to get the dumped ROM to work, but it turns out that's because I read it as the wrong kind. :host-shock: My reader has a switch that switches between the 2MB and 4MB versions of the chip... and I had it set to 4MB, even though the chip helpfully told me right on the package it's a 2MB chip. So after I spent a half hour fumbling, I realize what I'd done and went back to redump it - and that version worked first try. Phew.

Once I dumped it, I was able to figure out that one of the two program ROMs is identical to one that's already in MAME; only the ARM ROM is unique. That meant adding it to MAME was very easy; I could mostly copy and paste existing code defining the game cartridge, changing just one line with the new ROM and a few lines with some different metadata, and I was good to go. For something I've wanted to be able to contribute to for years, feels good and, honestly pretty painless. https://github.com/mamedev/mame/pull/10306

It's kind of hard to share code in a way that is interesting so enjoy this documentation, I guess.

In the process of spending past month on and off moving over to Dialogue System for Unity from Fungus I have cleaned up, converted over, and documented our dice roll script.

Here are a few notes...

  • Supports as many dice per roll as you can shove into a string.
  • Supports mixing and matching the sides of dice in each roll.
  • Allows adding Dialogue System Number variables as modifiers to the roll.
  • Currently is a hidden roll (can't display UI for what was rolled, only outputs the result of the roll). I plan to add support for visuals in the future, it's just not a requirement for my current project.

Check it out over on Github