Sponsored By

Featured Blog | This community-written post highlights the best of what the game industry has to offer. Read more like it on the Game Developer Blogs.

Frankenstein’s Monsters: Hacking NES Games

NES ROM hacker "infinity" talks about how he got started in the hacking space, the tools he uses in his work, and his most popular game -- Mega Man Ultra, a total makeover of Capcom’s Mega Man 2

David Craddock, Blogger

November 4, 2015

25 Min Read

[Author's note: Originally published on Episodic Content, a blog that serializes stories about videogame design and culture.]


Frankenstein’s Monsters: Hacking NES Games with “Infidelity”

Videogame emulation dawned in the 1990s and exploded during the 2000s. Players can find and download image files that contain game data from cartridges and play them using emulators, software that emulates console hardware such as the NES and PlayStation. Those image files are known as ROMs, short for “read-only memory.” Publishers stress that ROMs are illegal; you are, after all, downloading old games for free rather than paying for them through active digital services such as Nintendo’s Virtual Console.

ROM hacks are a different beast. Anyone with knowledge of certain programming languages can download a ROM, crack it wide open using special editing software, and delete, add, and modify lines of code, resulting in a brand new experience that looks and feels like a classic game—and, indeed, are often packaged and sold in cartridges able to run on their original console hardware.

The creators of ROM hacks are Dr. Frankenstein, and the hacks that remix and conflate pieces of old games are their monsters. Time and experience have resulted in ROM hacks that are more complex—and arguably better-designed—than their originals. I spoke with one such ROM auteur, who goes by the online handle infidelity, about how he got started in the hacking space, the tools he uses in his work, and the particulars of his most popular game, Mega Man Ultra, a total makeover of Capcom’s Mega Man 2.


What led to your interest in ROM hacking?

Back in 2003, I stumbled onto a ROM hack of Mega Man 2 calledRockman Exile. It had a lot of cool features at the time, like altered enemy AI, new level construction via tiles and palettes, and it even had different music. Rockman Exile was my inspiration for getting into ROM hacking.

You’re quite prolific in the Nintendo Entertainment System community. What about the NES appeals to you?

The system itself, back in the 1980s, was the sleekest, coolest looking, of all the video game machines of that time. The cartridges had an amazing shape, the artwork design on the boxes/manuals/cartridges, the controllers and the zapper—it all grabbed my attention as a child. I’m also a devoted musician, and if you owned a Nintendo as a child in that period, there is no doubt that you can hum a bunch of the amazing songs created back then to this date.

What were some of your earliest ROM-hacking experiments?

When I discovered Rockman Exile, I also discovered various Super Mario Bros. ROM hacks. I found a level editor for the game, and made these ridiculous difficult level layouts, that you pretty much had to know by heart, in order to advance through them. They were pretty awful, lol. Enemies placed in odd spots, massive jumps required to reach certain areas, it was a lot of fun making them, but not a lot of fun playing them.

What language are most NES ROMs written in?

All NES ROM’s are written in what is called 6502 Assembly. It’s a primitive language, and one of the hardest to decipher for newcomers. It’s not for the faint of heart. I was very fortunate to have been around the ROM hacking scene in the mid-2000s, with some very experienced and smart coders, who took time out of their busy lives, to show me the ropes to allow myself to get my feet wet, and program on my own.

What sorts of skills would someone interested in hacking ROMs need? Can anyone do it?

Can anyone do it? Absolutely. It all depends on that person’s determination and dedication to 6502. This is not something that anyone with zero experience can just jump into, and expect amazing results. There are a lot of boring and tedious things that go along with hacking a ROM. But the end result always pays off when you accomplish what you set out to do.

Skills needed, would be at least a little knowledge of 6502, how to do simple commands like load a value and store it, compare that value to a specific value, if it matches then have it branch to another piece of code, if it doesn’t match, to have that code just continue on to whatever else is going on.

Now for me personally, I hack using the FCEUX hex editor; meaning, I code using hexadecimal. That is how I learned to hack/code 6502. This is heavily frowned upon in serious NES ROM hacking communities. Still to this day I get lectured on my method, and how bad it is, and how I shouldn’t code like that. But hey, it may be frowned upon, but my end results speak for themselves. I’m not trying to advocate only using hex to code 6502, it’s just what I was surrounded with. You are also able to code within the 6502 language, by using text, much like C++, but obviously 6502 and C++ are the same, just using C++ as an example.

Could you give us a general overview of the process of hacking a ROM? How do you crack the game ROM open and decipher what all the code means?

A general overview can be taken in many different directions. It all depends on what the person who is hacking the ROM, wants to do within the ROM. Some may just want to see they’re name on the screen, instead of MARIO or LUIGI. Some may just want to edit the dialog within the game, to make it read something different, funny, silly, [what have you]. Some may just want to change how a character looks within the game.

Certain games, like Super Mario Bros. or Mega Man 2, have dedicated level editors, that allow you to take an unmodified original ROM of those games, open them up within the editor, and view all of the games layouts, such as level construction, palettes, sprites, and whatever other various functions the editor allows you to modify/change.

However, even with level editors, they don’t always contain everything you wish to edit. Those other things are usually the following: enemy/boss AI, enemy/boss movements or actions, music, screen scrolls. Those require you to know how to program [using] the NES language.

There is an emulator that I live by, and have for 10 years. It’s called FCEUX for Windows. It is the absolute best emulator to use if you want to hack an NES ROM. Within that emulator, you can edit whatever ROM you want to you hearts content—within the NES’s limitations and your programming skills, of course.

Suppose I’m interested in learning how to hack ROMs. What are some of the easiest changes I could make to a game ROM, just for the sake of experimenting and seeing a change I made show up in a game?

The easiest change, I would say, is altering dialog within a game. Doesn’t require 6502 knowledge. Most of the time, the dialog is clearly visible within the FCEUX hex editor. You simply overwrite it, staying within the already set parameters for the text you are overwriting, save the change, reload the ROM, and you should see the results appear on screen.

Your Mega Man Ultra game is a brilliant hack of Mega Man 2. What made you decide to hack Mega Man 2 specifically?

Thank you for that kind remark! I am a Mega Man fanatic. I’ve loved the Mega Man franchise since I first played Mega Man 2 in 1989. What made me decide to hack Mega Man 2 was my discovery of Rockman Exile. When I saw that ROM hack of Mega Man 2, I wanted to outdo what was done in that game: music, levels, enemies, graphics—you name it, I wanted to create something as cool as Rockman Exile was. That was my foundation, my template, to start learning 6502.


Assembly: Also known as assembler, assembly is a language used to write low-level code–meaning, code that corresponds closely with the computer’s hardware. The lower-level a programming language, the closer programmers can work with the hardware, such as manipulating the contents of memory directly. As a trade-off, assembly language can be difficult for humans to read; its syntax consists of numbers and abbreviated commands Most games released for early consoles such as the NES, Sega Genesis, and Super NES were written in assembly.

C/C++: C and C++ are high-level languages, meaning languages that are more readable to humans, but do not allow programmers to access hardware as directly as low-level languages.

Hex Editor: Software that allows users to access a program’s hexadecimal code. Hex code is binary, consisting of numbers instead of traditional text.; therefore, special editors are needed to edit it.

ROM: Read-only memory. A digital image of game data burned to a computer chip and housed inside a storage medium, usually a cartridge.

ROM hack: A modification of a pre-existing ROM to add new levels, art, music, characters, etc.

Wood Man’s stage features graphics from Super Mario Bros., such as question blocks and giant goombas as seen in Super Mario Bros. 3. What was the process of importing assets from one game into your homebrew game?

My thinking process was, “Okay, what has not been done in a Mega Man ROM hack so far?” This has always been my driving point in ROM hacking since then: a “what hasn’t been done yet?” attitude. I was still fresh in 6502; I only knew how to do simple stuff, like alter how many lives Mega Man has, or how fast his plasma canon shoots.

My music hacking was just as fresh too; you can clearly hear it in the Super Mario Bros. theme song [laughs]. All songs are written differently within each game, so I had to literally listen to each individual note, hum it out loud, and match it within the Mega Man 2 sound engine to get the desired sound.

MMU2How did you create the remixed music tracks in Mega Man Ultra?

It was all done within the FCEUX hex editor. I had to code in each individual note, for all 4 tracks for each individual song. The tracks are called, “Square 1, Square 2, Triangle(bass), and Noise(drums)” There were no special editors, for editing music in NES ROMs back then, I don’t even think there any today. Music hacking in an NES ROM back then was extremely rare, which is yet another reason why I believe, Mega Man Ultra was such a massive hit with Mega Man lovers. Just the music alone in that game, was such a gratifying feeling of accomplishment for me, aside from everything else I did in that game.

One reason your Mega Man Ultra game grabbed my attention was because it looked and felt like the genuine article—like a Mega Man game that KejiInafune [ex-Capcom lead artist on Mega Man] would have made. For Mega Man Ultra, how closely did you attempt to model the flow of your levels and the revamped boss battles so that they hewed close to Capcom’s design blueprints?

Wow, to be even mentioned in the same paragraph as the great Keji Inafune! I’m extremely humbled by that remark, thank you! For me, I always pay homage to what has come before, to what has been solidified as legend, classic, great, you name it. When you hear the name Mega Man, gamers will ALWAYS think of Mega Man 2. Even if they’re favorite is another Mega Man game, there is no way that Mega Man 2 does not pop up. I try to always stay true to what has worked in the past, and most importantly, what I’ve always liked from those games.

The one level I’m still so proud I pulled of, was Quickman’s level using the rooftop from the Mega Man 2 title screen, with the city and mountains in the distance. I knew in my heart that people were going to like that right off the bat, because it was never done before, and it’s something that gamers already know of, but now see it being used in a new light, [it gives] that rooftop a whole new fresh experience and perspective.

As for the bosses, this shows how little I knew of 6502 at the time. In 2005 and earlier, a decent portion of Mega Man 2’s boss AIs were discovered, and made public. I was able to use those notes, and change specific actions of the bosses, to make them faster in movement themselves, or they’re projectiles. Today in 2014, the 6502 knowledge I now possess, I could literally make those bosses do whatever id want at will. I’m still proud at how they came to be, but I always wished I could’ve made them better.

What are some of the restrictions and limitations you face when hacking an NES ROM? For example, I noticed that the enemies you added, such as the giant goombas and koopas in Wood Man’s stage, are re-skinned versions of Mega Man 2 enemies such as the bird that drops egg bombs, the rabbit, and the robot bats. Were you able to create new enemies, or were you forced to repurpose existing code, AI, and animations?

I wasn’t able to insert new enemies, because the CHaracteR RAM (CHR-RAM) for that level, and that specific scroll were full. What I did, was reuse the physical property of the sprite, and just gave it a different appearance. But obviously, you can tell what it is via the sprites AI. My inexperience then, didn’t allow me to be able to expand the ROM, so I could insert additional sprite images, and even insert additional PRoGram ROM, (PRG-ROM) so I could create new enemy AI.

MMU4Even though you’re hacking an NES ROM, are you tied down to the limitations and capabilities of the NES hardware? Were you able to wring a few extra drops of performance out of the hardware?

Yeah, the NES is very limited. There are plenty of things I hate about the NES. Like how you can’t have more than 8 sprites horizontally on the screen at once, or there will be sprite flickering. With palettes, you can’t assign an 8×8 tile a palette, it has to be for a 16×16 block (that can be changed by using the MMC5 mapper, like Castlevania III uses).

I’ve seen Mega Man Ultra cartridges floating around eBay and collector sites. What is the process of packaging a ROM as a cartridge that works on its original hardware?

I was fortunate enough to receive Mega Man Ultra, in a completely sealed package, and currently have it displayed in my living room. I can’t explain all of the process that goes into it, I know some, this is done by other people. It’s done by people who are devoted to the NES, who are devoted to homebrew games, hacked games, and want to bring continued life to the NES console. To make my game work on a real NES, you need to inject my ROM onto an MMC1 mapper NES cartridge.

Of all your ROM hacks, which is your favorite and why?

That’s like asking “which child is your favorite?” [laughs] Each of my ROM hacks have their own unique story to them, each one stamps my milestone, in whatever progression I made in my 6502 experience. But to answer your question truthfully, it has to be Mega Man Ultra. It solidified me as a legit ROM hacker, it’s one of the top most popular influential Mega Man ROM hacks to date.

It makes me incredibly humble when fellow hackers compliment Mega Man Ultra, and tell me that my work inspired them to ROM hack. That’s an incredible feeling: to impact someone with something you created, and inspire them to do the same or better than what you put out there.

ZeldaLoL1What other consoles have you hacked, and how does the process of hacking those systems compare to hacking NES hardware?

I haven’t learned a new language, yet. If I continue to ROM hack down the road, the system I’d really like to learn is Super Nintendo. The reason why I haven’t yet, is that I don’t like the debuggers that are out there within some of the emulators. The NES debugger in FCEUX, is so user friendly, so easy to use, so easy to understand, so easy to find what you’re looking for within an NES ROM. There is no one out there that is willing to code a similar style debugger for the SNES, like the NES has.

I can guarantee you this, and to anyone who reads this: the SNES ROM hacking scene would definitely explode if such a debugger was created. I’ve been dying to do a ROM hack of Mega Man X! I would be all over that!

ZeldaLoL3What ROM hacks are you working on now?

I have been working on a major project for almost 3 years. It’s a ROM hack of the original Legend of Zelda. It is called ZeldaThe Legend of Link. I have made it so the original game has items like the hookshot, the ocarina, the hammer, the shovel, the Pegasus shoes, and the flippers. The first ever beta version will be released either late June or within the month of July. This is my first major ROM hack since Mega Man Ultra was released.

Flashback Entertainment will be releasing my new Zelda project on an actual NES cartridge. I am extremely excited over the hard work and dedication, that team has devoted to my work. I encourage anyone that is interested to check them out, I can’t wait to see and obtain the final product myself!


Read more about:

Featured Blogs
Daily news, dev blogs, and stories from Game Developer straight to your inbox

You May Also Like