This original document was written by: Tony Hedstrom t_hedstrom@yahoo.com http://www.angelfire.com/games2/codehut/ Version 0.9 May 26 2002 What's new: Added sections 7 and 8 Updated sections 2, 3, and 4 This document explains some handy tips for making Game Genie codes. Some of these I discovered on my own, and some I learned from other code makers. Some of these tips will show you some useful shortcuts you can use when making Game Genie codes, and others will explain how to make certain types of codes. Most of these can be used for NES games or SNES games (or Gameboy). Some can also be used for Genesis games. Each section lists which game system it applies to. In case you don't know, here is a list of the abbreviations used... NES = Nintendo Entertainment System SNES = Super Nintendo Entertainment System GB = Game Boy Sega = Sega Genesis This document is meant to be used in conjunction with my other documents on how to make Game Genie codes. So it's best if you go to my website (the address is above), and read the documents there that explain how to make Game Genie codes before you read this. Since I still have a lot to learn about code making, I will update this file as I learn more. INDEX............................................... 1: Removing graphics (NES) 2: Making "free item" codes, method 1 (NES/SNES/GB/Sega) 3: Making "free item" codes, method 2 (NES/SNES/GB/Sega) 4: Reverse engineering (NES/SNES/GB/Sega) 5: Making "buy anything in shop" codes(NES/SNES/GB/Sega) 6: Finding new codes (change those zeros) (NES/SNES/GB) 7: Using 6 letter Game Genie codes (NES & GB) 8: Making "Starting stat" codes (NES/SNES/GB/Sega) ==================================================== 1: Removing graphics (NES) You may be asking "why remove the graphics?" Well, the reason is really quite simple... 99% of the time, you won't find any useful codes in the graphics area of the ROM. Removing the graphics from a game ROM, or just writing down the location of the graphics can be a HUGE time saver when making GG codes because the graphics make up a very large chunk of the game. So if you know where the graphics are (or if you remove them from the ROM), you won't have to look for codes in that section of the ROM. Finding out where the graphics are in a ROM is easy. It's up to you to decide if you just want to write down the addresses of the graphics, or if you want to remove them from the ROM. Either way works fine, but writing it down is a little easier. NOTE: If you decide to remove the graphics from the ROM, make sure you use a copy of the ROM, and not the original. Just remember that the main reason that you want to know where the graphics are in a game is so you don't have to look in those areas for possible codes. NOTE: Usually, graphics are either at the beginning or at the end of the ROM (but not always). To find out where the graphics are in a NES ROM, you will need a program called "Tile Layer". You can find this program at Zophar.net Once you have the program (Tile Layer), open your ROM with it and scroll down (with the "down arrow key" on your keyboard I think) looking for graphics. The graphics are usually pretty easy to distinguish from the non-graphic areas. Then just write down the area (or areas) where the graphics are located. If you decide to remove the graphics from your ROM, you should only do so if you know how, otherwise, just writing it down will work fine. And remember, if you remove graphics from the beginning of the ROM, only do so in 8K chunks. And make sure you use a copy of your ROM, and not the original. ==================================================== 2: Making "free item" codes, method 1 (NES/SNES/GB/Sega) There are 2 methods explained here for making codes that let you buy specific items for free. This first method is MUCH easier than the second method, but unfortunately, only a few games use this method. One game that uses this method is The Legend of Zelda NES. This type of code will let you buy one specific item for free (like "Buy sword for free instead of $200). In games that let you sell items back to shops, you can also use this type of code to make lots of money. Just buy as many items as you can with the code turned on (for free), then turn the code off (if you can) and sell the items back for extra money. In this example, I'm going to show you how to make free item codes for The Legend of Zelda (NES). If this method doesn't work for your particular game, then try the second method (below). Start playing your game (in this case it's Legend of Zelda) and go into someplace that sells things (like a cave or a shop). For this example, I'm going into the cave that's up one screen and left one screen from where you start the game. Next, write down the prices for each item that's for sale in the order that they're listed. In our example, there are 3 items for sale: Shield $160, Key $100, and Blue candle $60. So the 3 prices are $160, $100, and $60. Next, convert the dollar amounts into hex numbers. You can use the Windows (or MAC) calculator to do this if you want. Here is our 3 dollar amounts converted into hex numbers: $160 = A0 $100 = 64 $60 = 3C So our 3 converted hex numbers are A0,64,3C. Write these down for later use. This part gets a little tricky, so pay attention. If your dollar amount is under $255, then you can ignore this part, but if your dollar amount is over $255, then you have to do some switching around. Here's how: Lets say that your dollar amount is $1000. If you convert that to hex you get 3E8. Now for some strange reason, all NES and SNES games switch this type of number around. To switch it around, first make sure that the number has 4 digits. Our number (3E8) only has 3 numbers, so just add a "0" at the beginning of the number like this: 3E8 becomes 03E8. Now that the number has 4 digits, just split the number in the middle and switch the two halves like this: 03 E8 becomes E8 03. So our new "switched" hex number for $1000 is E803. I know it seems kinda strange, but that's the way it's done. Now back to our Zelda example... Our 3 hex numbers for the Zelda example were A0,64,3C. Now, open up your ROM (in this example it's Legend of Zelda) with a hex editor and do a search for the hex numbers that you have written down. In this example, I would do a search for A0643C. On many games, you will have to add 2 zeros after each hex number when you do your search. Try the search without any zeros first (A0643C), then try it with zeros like this: A00064003C00. If your dollar amounts were over $255, then you won't need to add zeros after the numbers. In our example, the search turned up only one match. So by changing each of the numbers where the match was found into zeros ("00") via a Game Genie code, you will be able to buy that item (items) for free! With any luck, you'll find a match, but if you don't, chances are that the second method (below) will work for you. If you do find a match, you'll need to read one of my other documents (How to make GG codes) to find out how to convert the hex address into a Game Genie code. You can also use this method on some Genesis games, except you don't have to "switch" the hex numbers around (ie. 1000 = 03E8). ==================================================== 3: Making "free item" codes, method 2 (NES/SNES/GB/Sega) This second method is harder than the first method (above), but it works on many different games. I'm guessing that this method has worked on about 70% of the games that I've tried it on. Here are some of the games that this method has worked on: Final Fantasy, Final Fantasy 2j (NES), Final Fantasy 3j (NES), Dragon Warrior, Dragon Warrior 2, and many, many more. This type of code will let you buy one specific item for free (like "Buy sword for free instead of $200). In games that let you sell items back to shops, you can also use this type of code to make lots of money. Just buy as many items as you can with the code turned on (for free), then turn the code off (if you can) and sell the items back for extra money. OK, the first step for this method is to find out what order the game has all of the items listed in. The items I'm referring to are anything that can be bought in the game, or anything that is given to you in the game. This includes weapons, armor, items, etc... The game stores all of these items in a particular order. The prices for each of these items is also stored in the same order. So once you know the order that the game uses, then it's pretty easy to find codes for free items. The easiest way to find the proper order of items in the game is to find a FAQ or document for your particular game that has that information in it. Some good places to check are gamefaqs.com, ggccc.com, or any of your favorite places that have specific game FAQs. Gamefaqs.com is an excellent place to check. Many times, if you check the files for your particular game, you will see something called a "Savestate hacking guide". Many times these docs will have the info you're looking for. Another good place to check is zophar.net. Here is an example of what type of info you're looking for: Final Fantasy (NES) 01 = LUTE 02 = CROWN 03 = CRYSTAL 04 = HERB 05 = KEY 06 = TNT 07 = ADAMANT 08 = SLAB 09 = RUBY 0A = ROD 0B = FLOATER 0C = CHIME And further down the list... 1C = WOODEN NUNCHUCK 1D = SMALL KNIFE 1E = WOODEN STAFF 1F = RAPIER 20 = IRON HAMMER 21 = SHORT SWORD And the list keeps on going to include all of the weapons, armor, magic spells, etc... So if you can search the internet and find a FAQ or hacking doc that has this info for your particular game, then it will save your a LOT of time. If you already have the list of items, then you can skip this next part. If however, you can't find this info anywhere, then there is a way to find the info on your own, but it can take a long time to do it, so if you're not willing to spend a couple hours of work doing so, then stop right now and go watch TV. If you're not watching TV, then I'll assume that you want to learn how to make that "List" that I described earlier. Just remember that once we have the list, finding the right ROM addresses for the prices of everything is very easy. Making the list is by far the hardest part of this process. To make your own list of items, you will need a ROM of the game you're trying to make codes for, and of course an emulator. Start playing your game and go into any shop that sells things (like weapons, armor, items, ect). Now save your game using the emulator's save state feature. NOTE: It's best if you have lots of money to spend. Next, without leaving the shop, buy a few items from the shop and save your game again but make sure you save it to a different file (in other words, don't overwrite the first file you saved). Now you should have two seperate save states and they should be nearly identical except for two things... The amount of gold will be different, and what you have in your inventory will be different. Now compare the two files using a hex editor. There will probably be other differences besides the amount of gold and items in your inventory, but you should be able to figure out which is which. Just remember that what you're trying to do is to find the location in the save state file that tells the game what you have in your inventory. TIP: If you find out where the address for your amount of gold (or money) is in the save state file, then usually, the addresses for you inventory items are very close by. Sometimes, it may help to make a third or fourth save state file (making each one different) to help you find the right address for your inventory items. Also keep in mind that usually, there will be addresses for what you have in your inventory, and there will also be addresses that tell you how many of each item you have in your inventory. Sometimes they are next to each other, and sometimes they're not. Each game is different. Since each game uses a different method, it would be nearly impossible for me to explain in more detail how to find the right address for your inventory items, so you'll have to figure some of it out on your own, but if I can do it, than almost anyone can do it. Now you can see why it's a good idea to see if you can find this info somewhere on the internet, it will save you lots of time. Once you find the correct location in your save state file for your inventory items, it then becomes fairly easy to find the order that the game stores things in. Just change the numbers in your save state file (at the addresses that determine what items are in your inventory), and then load the save game and see what items you get. So for example, if you had 3 items in your inventory, and in your save state file those 3 items had these numbers: 13, 1A, and 33, all you would do is change those 3 numbers to 01, 02, and 03. Now save the file and load it and see what 3 items you now have in your inventory. You now know what the first 3 items are of your list. Now go back to the save state file and change the 3 numbers from 01, 02, and 03 to 04, 05, and 06. Save and load the file and you can find out what item numbers 4, 5, and 6 are. Now you know what items 1 thru 6 are for your list. Keep repeating this until you have as much of the list as you need. Keep in mind that you don't have to do this for every item in the game, just for the items that you want to make codes for (so you can buy that item for free). Now that you have your list made (for the items that you want codes for), you can easily figure out what to search for in the ROM to find the right codes. Lets suppose that the items that you want to make codes for are items numbers 1, 2, and 3. Lets say that item number 1 is a knife and it costs $50, and item number 2 is an axe and it costs $100, and item number 3 is a sword and it costs $200. To find where the prices for those items are in the ROM, all you do is convert the price of each item into hex like this: -Knife = $50 = 32 (hex) -Axe = $100 = 64 (hex) -Sword = $200 = C8 (hex) Now, just put the 3 hex numbers in order like this: 32 64 C8. You can try doing a search for those numbers (3264C8) in your ROM, but 9 chances out of 10 you will need to add zeros after each number. So our above example becomes: 32006400C800. Now, chances are that if you do a search for that string of numbers (in your ROM), you will find only one match, and that should be the addresses for you free items! If the dollar amount of your items is over $255, then you will have to switch the numbers around as explained in section 2 (above). Remember?... $1000 becomes 3E8, which becomes 03 E8, which gets switched around to become E8 03. Read section 2 (above) for more info on this. And remember that when you are doing a search in the ROM, the price of the items you want codes for must be in sequential order, for instance: 12, 13, 14, 15 etc. In other words, not like this: 12, 14, 17, 19. You have to remember that most games store the prices for all of the items (in the ROM) in sequential order, so if you get the order mixed up, you won't find a match. Once you find the right addresses for the prices of the items, just make a Game Genie code that changes the value to zero. If the price of the item is over $255, then you will need to make 2 seperate GG codes to get the item for free. You'll need to read one of my other documents (How to make GG codes) to find out how to convert the hex address into a Game Genie code. I know that this seems like a lot of work just to make a Game Genie code, but once you've done it a few times, it's really not very hard. You can also use this method on some Genesis games, except you don't have to "switch" the hex numbers around (ie. 1000 = 03E8). ==================================================== 4: Reverse engineering (NES/SNES/GB/Sega) An excellent way to learn how to make Game Genie codes is to take an exsisting GG code and convert it into a ROM address and then find that address in the ROM. By doing this, many times you can figure out what the code is actually doing and thus help you learn how to make your own codes. This works well for codes that change starting stats (for RPG games). A perfect example of this is the starting stat codes for Final Fantasy (NES). When you convert any of those character starting stat codes from the codebook into A ROM address, and then find that address in the FF1 ROM, you can easily see how the codes work. All of the stats are neatly ordered in the ROM. Just remember that all of the numbers in ROMs are in hex, so they may look strange at first. Just to make things a little easier for you, here is the starting address for the characters beginning stats for Final Fantasy (NES): 003050. Just open up your FF1 ROM with a hex editor and go to that address. The first row of numbers is for the Fighter, the second row is for the Thief, and so on. I highly recommend that if you want to learn how to make Game Genie codes, then you should try some "Reverse engineering", it's helped me a whole bunch. To find out how to convert a Game Genie code into a ROM address, you'll need to read one of my other docs: "How to hack a NES ROM" or "How to hack a SNES ROM". To convert A Genesis Game Genie code into a ROM address, just enter the Game Genie code into the "Game Genie to hex conversion" program found on my web site (in the Download section). Also, you should read "How to make Genesis Game Genie codes (advanced)" on my web site for more info on converting a Genesis Game Genie code into a ROM address. ==================================================== 5: Making "buy anything in shop" codes(NES/SNES/GB/Sega) This method will let you make codes that change which items you can buy in shops. Usually, you can buy any item you want with these codes. This method has worked on about 75% of the games that I've tried it on. First of all, you'll need to make a list of all the items in the game in the proper order. You can find out how to do this by reading section 3 above. Once you have the list, go into the shop that you want to make codes for and write down the items that are for sale there. Then write down the corresponding item number for each item. Then just do a search for that string of numbers in the ROM. With any luck, you should only find one match. Then make codes to change the number to whatever item you want. So for example, if there were three items for sale in a shop: Knife, Sword, and a Hammer, you would find the number for each item from your list. Lets say that these are the numbers for each item: Knife = 12 Sword = 15 Hammer = 16 Take those three numbers and do a search for them (keep them in the same order that they were in in the shop). So you would search for: 121516 in the ROM. ==================================================== 6: Finding new codes (change those zeros) (NES/SNES/GB) This is a very useful trick for finding new codes once you've found the address for character stats. I've found lots of new codes using this method. You may have noticed that when you find the right address for character's stats (or similar addresses), that there are usually lots and lots of zeros around that area of the ROM. Well, quite often, those zeros are telling the game to give you zero of some particular item, or zero gold, or zero MP, etc... So if you change the zeros to any other number, you will start with some of whatever the zero was for. You may be asking "how can you tell what the zeros are for?" Well, there's no easy way to tell what they're for, so all you do is change them all. Changing zeros to another number will usually never cause the game to crash. Just make a copy of the ROM and use the copy to make all your changes to. If changing the zeros doesn't do anything, then just delete the copied ROM and no harm done. Remember, only do this in the same area of the ROM where you found the starting stat codes (or similar type codes). Here's a little trick I use to help figure out which zeros do what: If you have a whole row of zeros, give each zero a different number. For example, change the first zero to 01, the second zero to 02, and so on. Now when you start a new game, look for anything that has changed. Like what you're equipped with, how much MP you have, etc... You will usually have to hone in on the addresses that are useful. If you gave each zero a different number, you can sometimes figure out what goes where when you start a new game. This method has worked on about 80% of the games that I've tried it on. This method also works on Genesis games, but you usually can't make changes to the ROM, so you have to make a Game Genie code instead. ====================================================== 7: Using 6 letter Game Genie codes (NES & GB) Most of you probably already know this, but I'm going to mention it because it isn't very clear in the Game Genie code books. Remember, this only applies to NES and Gameboy. Anytime you're trying to make Game Genie codes by entering random letters, ALWAYS use 6 digit codes! If you enter a random 8 digit code (or 9 for GB), you have roughly 1 chance in 250 that the code will do anything at all. In other words, if you use a random 8 digit code (or 9 for GB), there's about a 99% chance that the code will do absolutely nothing at all. If however, you use a 6 digit code, there is about a 100% chance that the code will do something. You may not always be able to tell what the code is doing, but it's probably doing something. 6 digit codes will work on any NES or Gameboy game. Just because the Game Genie code book only shows 8 digit codes for certain games, doesn't mean you can't use 6 digit codes for that game. As I said before, 6 digit codes will work on ANY NES or Gameboy game. To make a 6 digit NES Game Genie code, just make sure that the 3rd digit of the code is one of these letters: A P Z L G I T Y. The other digits of the code can be any letter you want. The only time you should use an 8 digit code (or 9 for GB), is when you get the code from the code book, or if you use the ROM to make your own codes. 8 digit codes (or 9 for GB) won't hurt your game or anything like that, but if you try making your own 8 digit codes by using random letters, you'll just be wasting your time. Using random 6 digit codes will give you a much better chance of finding a code that does something useful or interesting. The reason for this is because of something called a "Check Value". 6 digit codes don't use a check value, 8 digit codes do. If you want more info on this, go to my web site and read the documents on the NES page. ====================================================== 8: Making "Starting stat" codes (NES/SNES/GB/Sega) This is a very handy little trick you can use for finding useful ROM addresses. Keep in mind that this method doesn't work on all games. It mostly works on some RPG type games. This method will help you make codes like this: Starting stats (HP, etc), what weapons you start with, what armor you start with, how much gold you start with, etc. In short, all you do is have a hex editor search the ROM for the name of one of the characters in the game. It's fairly easy to do... here's how: You'll need a ROM of the game you want to make codes for, and you'll need a hex editor (I'll be using Hex Workshop for this example). For this example, I'm going to use Might & Magic 2 for SNES. Open up the ROM with Hex Workshop. Click on the "Find" button (or click on "Edit/Find"). Where it says "Value", click on "ASCII". Where it says "Options", click off "Case Sensitive" (Case Sensitive and Unicode should be off). Direction should be "Down". Where it says "Find What", type in the name of one of the characters in the game. In this example, I'm going to type in: Sir Felgar (make sure you include the space between Sir and Felgar). Sir Felgar is the name of one of the characters in Might & Magic 2 (SNES). Now, click on the "Find Next" button. With any luck, you'll get a match. In our example, the first match is where you'll find lots of very useful addresses for Might & Magic 2. And right after Sir Felgar, you'll find the addresses for all of the other characters as well (Terwin III, Sure Valla, Gene Eric, etc). The useful addresses for each character start right after their name, and end at the start of the next character's name. In our example, the word "Sir Felgar" starts at this address in the ROM: 3C755. Just 6 or 7 rows below this is where you'll find some good addresses for making codes. Here are the addresses for some of them... 3C7B7 & 3C7B9 = Sir Felgar's starting HP 3C7BF & 3C7C0 = Sir Felgar's starting gold 3C7C4 = Sir Felgar's starting Might and there are many others very near by. Check my web site to see the codes I made for Might & Magic 2 SNES. You can usually make codes for all the other characters in the game once you find the right addresses for one of the characters. In our example, you can make codes for Terwin III, Sure Valla, Gene Eric, Casandra, and all the other characters the same way we made codes for Sir Felgar. Sometimes, when you use this method, you will end up finding the text used in the game. This isn't very useful for making Game Genie codes, but it is a great way to find out where to edit the text in the game. You can use Game Genie codes to edit the text in the game, but you need one Game Genie code for each letter you want to change, so it would take LOTS of Game Genie codes. It's much faster to just use the hex editor to make the changes to the text. Anyways, I'm getting off track here. If you do a search for a character's name and there is lots of text (words) right before or after the name, then you have probably found the text used in the game (which isn't what we're looking for), so keep searching by using the "Find Again" button (or click on "Edit/Find Again"). If you're having trouble understanding this, try getting a Might & Magic 2 ROM (SNES), and following along with the example. Make sure you read my document called "How to make SNES Game Genie codes" to learn about another method for finding/making character stat codes. ====================================================== You can find more documents like this one from my web site: http://www.angelfire.com/games2/codehut/ I hope that you found some useful information here. Happy code making! Tony Hedstrom t_hedstrom@yahoo.com