How To: Patching Your ROMs

Disclaimer: We do not provide links to ROMs, nor will we respond to requests for ROMs. It is copyright infringement, according to US law. There are many ways to obtain ROMs, including reading them from your own cartridges, from retro collections, or in some cases, buying them directly from the developer.

One of the great things about retro gaming is the community’s willingness to go back to older titles and make them better. To show that if the original developers had more time or resources, that a particular game could have been much better. Or, to simply take a game they love as a base, and turn it into something new and unique.

This is where ROM hacking comes in. Due to legal issues, you can’t distribute complete, hacked ROMs for people to download, not unless you like conversing with Nintendo’s legal counsel on a regular basis.

You can however, publish patches that will modify your copy of an original ROM to turn it into a complete and working hacked ROM.

In the coming weeks, I’ll be spotlighting some very cool ROM hacks. I figured that it would be a good idea to have an easy-to-follow tutorial on how to patch your own ROM files, so that if you want to get started and dive into what’s out there, you’ll feel a bit less intimidated.

While the process itself is very simple, there are a number of people I know that don’t feel comfortable with doing this. There’s always the fear that they’ll break something. I will go over some of the things that can go wrong, too, so you’ll know what to expect, and how to deal with them if problems do arise.

To get started, you need a few things.

Let’s go through each of these in turn, and then show how they all fit together.

An archiving program to unzip .zip and .7z files

An archiving program allows you to compress and decompress zip, 7, and many other archive formats. If you’re using Windows, it already has the ability to work with zip files. You may run into .7z files, though, and for that you’ll need an external tool. I prefer PeaZip, as it is easy to use, and is available for all three major platforms.

A ROM file for a game you want to patch

The ROM file for the game contains the game’s data in an unmodified state. This is what you will be making changes to, via the patch.

A ROM patcher

There are a number of patchers out there. You’ll often see Lunar IPS or Floating IPS mentioned. These are fine programs, but I prefer Marc Robledo’s ROM Patcher JS. It is a web based patching tool that runs in the browser. It does not upload any data. It simply patches the ROM locally and then offers you the patched ROM as a download.

A Patch that you want to apply

Finally, the ROM Patch is what is going to be acting as a director. It tells the patcher what data to change, and what to change it to. Some ROM hacks, like the one in this example, will actually make the ROM larger than what it started as, because it not only changes existing data, but adds new data to the ROM.

Patches can be found all over the Internet. RomHacking.net has a wealth of them available, with new hacks being uploaded every day. So there’s lots to try. Other sites can specialize in different types of hacks, or specialize in a particular franchise. A quick search for game name ROM hack will often lead you to RomHacking.net, but sometimes you’ll find other hacks elsewhere.

Preparing to Patch a ROM

Before getting started, I’d recommend creating a folder on your desktop where you can put the ROM file and Patch file you’ll download to keep them in easy reach.

Browse around the site, maybe search for a specific game, and you’ll inevitably come across something you want to try. Clicking on the name of the ROM hack will take you to its Patch page. Scrolling down, you come to a section that looks like this.

What is all of this?

The Database Match is the ROM that this patch is expecting to be applied to. This is the ROM’s name, essentially. The Database refers to which ROM set the ROM was found in. There are several databases, No-Intro, GoodROM, and MAME are the most common. If you acquired the ROM from one of these sets, then it should match up with what the patch is expecting. However, just because you have a ROM with a different name, doesn’t mean it won’t work.

The next two entries: FileROM SHA-1 and FileROM CRC32 are what you will use to determine for sure whether the ROM you’re using is compatible. You will also sometimes see an MD5 or a SHA-256 entry, here.

It all looks like a bunch of random characters, but this does actually mean something. CRC32, MD5, SHA-1, and SHA-256 are all methods of creating a hash or checksum. They’re algorithms that take the file that they’re given, and perform a cryptographic operation on them. The result is unique for every file. Think of them as a signature for the file.

Now, let’s open up ROM Patcher JS and load in the ROM and patch.

Notice that there’s a CRC32, an MD5, and an SHA-1 field now populated. If you compare these with what’s on the RomHacking.net patch page, you’ll see that they match. This is how you know for sure that your ROM will work.

You’ve probably also spotted that I loaded in the .zip file directly. ROM Patcher JS supports loading from the .zip files. It won’t work with .7z files, which is why I still recommend having an external archiver program handy to decompress those files, when you run across them.

Now, just click on Apply Patch. It will churn on the file for a few seconds, and then a download window will pop up. Download the patched file it’s offering you and store it some place easy to get to. Now, all you have to do is load up the ROM in an emulator, and play it. You might want to rename the file, though, to make it clearer what this new ROM is.

If everything worked as intended, loading the ROM in an emulator will boot up the game and you’ll be able to play. If the game doesn’t start, or is a garbled mess, continue reading.

If going through these steps doesn’t work, here are a few things to keep in mind.

I unzipped the ROM just to show that the size has changed. The patched ROM is now twice as big as the original.

Something Went Wrong

ROM Patcher JS doesn’t support .7z files. If one of your files is a .7z, decompress it, and load the ROM File or IPS, BPS, PPF Patch file within directly.

Do the Hashes and the CRC32 match? If they both don’t match, your ROM is not compatible with this patch. Most patches are meant to work with ‘headerless’ ROM files, which are raw dumps of the ROM chip. A ‘headered’ ROM contains a bit of data at the beginning of the ROM that give details about the game. Older emulators used to use these headers to configure themselves, but nowadays, that’s not needed. If you load in a ROM with a header, ROM Patcher JS will offer an option to remove it. If the checksums match up after this setting is switched on, great, you’re good to go. If not, you’ve probably got a bad ROM and need to find another.

Sometimes, a Patch’s zip file contains more than one patch that can be applied. Sometimes they will be numbered, but sometimes they won’t be. You’ll have to unzip the Patch’s archive and look inside. There will usually be a readme file with details on what order the patches are to be applied in. With a zip file with more than one patch, ROM Patcher JS tries the first patch it finds in the archive, which may not be the one that needs to be applied.

These are the two most common problems that people run into when trying to apply Patches to ROMs. It can be very frustrating, and most guides only cover the basics of patching, not what happens if things go wrong. I hope that this will help anyone having trouble get their hacks up and running.

Combining Hacks

If you get a game running, you might be tempted to try to add another hack on top of the one you just successfully applied. This is possible, but you’ll have to completely ignore the checksums and hashes, because they’re expecting an unmodified ROM. Whether multiple hacks will work together is a matter of trial and error. If the hacks don’t modify the same area of the ROM, then chances are they can be combined. For instance, a hack that changes the color palette could work with a hack that improves the sound. But it may not work with a hack that completely changes the game’s graphics. You’ll have to experiment to see what will work and what won’t.

ROM Patcher JS doesn’t modify your original file, it generates a new one, so you can always try again.

Disc Based Systems and Hacks

This is a whole other can of worms. Fundamentally, it’s not that different, but the tools used are different. This article is already quite long, so I’ll save this for its own tutorial.

I hope that this helped some of you out.

Happy Patching!