This original document was written by: Tony Hedstrom t_hedstrom@yahoo.com http://www.angelfire.com/games2/codehut/ How to hack Game Genie codes into a Sega Genesis ROM Version 0.7 August 28, 2002 This document explains how to hack a Sega Genesis ROM to permanently include the effects of any Game Genie code (or codes). This means you can play your favorite Sega Genesis games (on an emulator) with your favorite Game Genie codes in effect, but you won't have to enter any Game Genie codes because they're already part of the ROM. For example, if you hacked your Sonic the Hedgehog ROM with the "Super Jump" Game Genie code, then everytime you played your Sonic the Hedgehog game, you would have "Super Jump" abilities, but you wouldn't have to use any Game Genie codes. The main reason for this doc isn't to make it easier to use Game Genie codes (because most emulators make it very easy to use them), but rather it's main reason is as a tutorial for people that like to tinker with things. It also is a good way to learn how a Game Genie really works. It's also useful if your favorite Genesis emulator doesn't support Game Genie codes. I've been wanting to write this doc for a long time, but there was a technical problem that I couldn't figure out. Well, about 30 minutes ago, I finally figured out a way around the technical problem, so I immediately started writing this doc. The problem I was having trouble with was that many (most?) Genesis ROMs are "scrambled", and it was impossible to apply Game Genie codes directly to these types of ROMs. These types of ROMs have a file extension of ".smd". ROMs that have an extension of ".bin" are not "scrambled" and therefore can have Game Genie codes added directly to the ROM. So all you have to do to hack a .smd type of ROM is to convert it into a .bin type of ROM. Most emulators don't seem to have a problem with playing a ROM that's been converted. I wish I would have thought of that a long time ago. There are other types of Genesis ROMs (I think), but .smd and .bin are the most popular, so those are the only types I will discuss here. Since each type requires a different method for hacking the ROM, I will write a separate section for each one. To find out which type of ROM your particular game is, just open up your emulator folder (or which ever folder you keep your ROMs in), and find the file that matches the name of your game, and see what the extension is. In this example: "sonic1.bin", bin is the file extension, which means it is a "bin" type of ROM. If your computer is set up so that it doesn't show file extensions, just right click of the file name, and click on "properties". Once you find out which type of ROM you have, just go to that section below. It's best if you know how to use a hex editor. If you don't know how to use a hex editor, just open the hex editor, and click on the "Help" section. Everything you need to know is in there. Here is a list of what you'll need... 1) A Hex Editor. I use Hex Workshop. You can get a free trial version here: bpsoft.com 2) A Game Genie to hex conversion program. You can download an excellent one from my web site: http://www.angelfire.com/games2/codehut/ 3) An emulator. For this method, you have to use Genecyst, but once you've finished the hack, you can use any emulator you want. You can get the newest versions of most emulators here: zophar.net 4) A ROM. Please don't ask me for ROMs. Search the internet, you'll find them. NOTE: I've only tested this method on these emulators: KGEN 98 and Genecyst. I'm pretty sure this method will work on any Genesis emulator, but since they're all different, there's no way to know without testing. OK, lets start hacking! :-) IMPORTANT: Before you make any changes to a ROM, you should always make a back-up copy just in case something goes wrong. If you have a ".smd" type of ROM, skip this section and go to the ".smd" section further below. Once you've converted your ".smd" ROM into a ".bin" ROM, come back to this section and follow the instructions below. If you have a ".bin" type of ROM, keep reading... ---------------------------------------------------- .bin type ROMs ---------------------------------------------------- For this example, I'm going to use a very popular Sega Genesis game... Sonic the Hedgehog. The code we're going to hack into the ROM is from the official Game Genie code book: DDLT-AAGL Super jump. Here's how... Take the Game Genie code and enter it into the Game Genie to hex conversion program (mentioned above). The program will convert the Game Genie code into a hex address like this: DDLT-AAGL = 00D5CA:0018. The first part of the code (00D5CA) is the ROM address, and the second part of the code (0018) are the values. The second part of the code is actually 2 separate values. The first value is "00", and the second value is "18". The first value (00) is for the address shown (00D5CA), and the second value (18) is for the address right after the address shown (00D5CB). I'll explain this a little bit more later on. Next, open up the Sonic the Hedgehog ROM with your hex editor. The file extension must be ".bin". There may be other files with the same name as the ROM, but these are most likely files that the emulator has made (save state files, patch files, etc). Once you have your ROM opened up with the hex editor, go to the hex address that the conversion program gave you (00D5CA). An easy way to do this is to click on "Edit", then click on "Goto", then just type in the hex address. Once you're at the address that the conversion program gave you, just type in the 2 values from the code. So in our example, the value at 00D5CA would be changed to 00 (that's the number 0, not the letter O), and the value at the next address (00D5CB) would be changed to 18. Actually, in our example (Sonic1.bin), the value at 00D5CA is already 00, so you don't really change anything, but the value at the next address (00D5CB)(in the ROM) is 38, and that needs to be changed to 18. When you make any changes to the ROM with the hex editor, the changes will show up in red, this is normal (for Hex Workshop, other editors may be different). One very cool thing about Genesis Game Genie codes, is that a single Game Genie code can modify 2 ROM addresses, so that's why there are 2 values in the hex code that you get from the conversion program, one value for each of the 2 addresses. The second ROM address is not shown in the conversion program, but it is ALWAYS the address that comes right after the address shown. Here are a couple of examples to help you understand: (these have nothing to do with our Sonic1 example, I'm just making these numbers up): If the address that the conversion program gives you is 003720, then the second address that the code will modify will be 003721. If the first address is 01234, then the second address will be 01235. The first address is always an even number, and the second address is always an odd number. And remember, these are HEX addresses, so it's a good idea to learn how to count in hex so you won't get that blank look in your eyes when you see a number with letters in it. :-) Exit the hex editor (make sure you save your changes) and go play the game and see if the hack worked. When I play my hacked copy of Sonic1, Sonic can jump much higher than normal, and I didn't have to use any Game Genie codes. Success! :-) Sometimes, one of the two values in the code will be the same as the ROM, which means you won't actually make any change to that address in the ROM. But at least one address in the ROM must be changed or else the hack won't do anything. ---------------------------------------------------- .smd type ROMs ---------------------------------------------------- If your ROM has a file extension of ".smd", you must convert it to a ".bin" type of ROM before you can hack it. Don't worry, it's very easy to do. Here's how... Run the Genecyst emulator, then load your "smd" type ROM. Once the game has started, press the space bar (to bring up the menu screen), then click on CPU / Dump / ROM. Exit Genecyst, and find the file that you just dumped. The name of the file will be "rom". It should be in the same folder as Genecyst is in. This new file is your converted ROM. All you need to do now is to rename it with the name of the game, and so that it has a file extension of ".bin". Here's an example... Lets say I wanted to hack my Shining Force ROM. Shining Force is a "smd" type of ROM, so it needs to be converted to a "bin" type of ROM before we can hack it. My Shining Force ROM is named "ShinForc.smd". I start up the Genecyst emulator, load my ShinForc.smd ROM, then (when the game starts) I click on CPU / Dump / ROM. Exit Genecyst. Look in the folder that Genecyst is in and find the file called "rom". Rename it to ShinForc.bin You can rename your converted ROM to anything you want, just as long as the extension is ".bin". Once you've converted your ROM, just follow the instructions (near the beginning of this doc) for the .bin type ROMs to learn how to hack it. I've played converted ROMs on KGEN 98, and Genecyst, and they worked fine. I did notice that when I play a hacked ROM with KGEN 98, it says "Checksum fixed" at the beginning of the game, but the game still plays fine. Well, I hope this doc has helped some. If you have any questions, you can email me: This original doc was written by: Tony Hedstrom t_hedstrom@yahoo.com http://www.angelfire.com/games2/codehut/