Create NES Game Genie Codes



      This document was written by:

    Tony Hedstrom   t.hed@excite.com


This document explains how to make Game Genie codes
for Nintendo (NES) games.  This method of making GG
codes works best only on RPG type games (or games like
R.C. Pro Am 2 that have lots of items you can buy for
a specific amount of money) that already have some GG
codes already made (ie Final Fantasy, Dragon Warrior,
RC Pro Am 2 etc...).  If you want to make GG codes
for a game that doesn't already have any GG codes,
then you should read my other document about how to
make NES GG codes (part 2) coming soon.

Let me say this again... This document is only for
making NES Game Genie codes for RPG type games that
already have some GG codes made, or games like RC Pro
Am 2 that have lots of items you can buy for a
specific price.

For this example, I'm going to use Final Fantasy.

Final Fantasy already has lots of GG codes made by
Galoob that you can find in the code book, or on the
internet, but there are still lots of GG codes that
are not in the code book that are fairly easy to make.

I should also say that most or all of the new codes
that we will make in this example have already been
made by other people.  I am not saying that the codes
in this document were made by me, I am only using them
for an example.

Here is a list of what you will need:

1) A ROM of the game you want to make more GG codes 
   for (in this example, Final Fantasy (NES).

2) An NES emulator (NESticle is what we will be using
   in this example), or you can use a real NES with a
   Game Genie.  You can get the latest version of most
   emulators at: zophar.net

3) A hex editor (I will be using Hex Workshop V 2.54)
   You can get a free trial version of Hex Workshop
   here: http://www.bpsoft.com/

4) A Game Genie code converter program (that changes
   GG codes into hex codes).  You can get one from my
   website (in the "Download" section):
   http://www.angelfire.com/games2/codehut/


Keep in mind that this method will not work for every
RPG type game.

With many RPG type games, the codes for all of the
characters stats are usually very close together in
the ROM.  We will be using this fact to help us find
the GG codes we are looking for.

Since we already have some GG codes for Final Fantasy,
we can use those codes to guide us to the right 
location.  

For this example, we will make some GG codes for the
"Fighter" that are not included in the code book, but
remember that this method will also work on any other
character as well.

If you look at the Final Fantasy Game Genie codes that
are in the code book, this is what codes you'll see 
for the Fighter:

TGKLPALZ  double Fighter's Hit Points
GPKUAEZA  double Fighter's Hit
ZTKUPAIU  double Fighter's Evade
ZAKLTAIE  double Fighter's Luck

For those of you that are familiar with Final Fantasy,
you know that there are many other stats that don't
have any GG codes for them in the code book, like... 
Strength (STR.), Agility (AGL.), Intellect (INT.),
Vitality (VIT.), and Damage.  These 5 stats are the
ones that we will try to make codes for (for the
Fighter).

First of all, we need to find out what the values of
these stats are.  So start a NEW game (not a saved
game) WITHOUT any Game Genie codes and write down all
of the stats for the Fighter at the very start of the
game.

Here is what they are (Fighter starting stats):

STR. = 20
AGL. = 5
INT. = 1
VIT. = 10
Damage = 10

Next, we need to convert these stat values from 
decimal into hex.  If you don't know how to do this,
you can use the calculator that comes with Windows or
Mac.  To find the Windows Calculator, click on Start/
Programs/Accessories/Calculator.

Here are the Fighter starting stats in hex:

STR. = 14
AGL. = 05
INT. = 01
VIT. = 0A
Damage = 0A

Write these hex values down for later use.

Now we need to convert the GG codes in the code book
into raw hex codes.  To do this, we will use the Game
Genie code converter program (that changes GG codes 
into hex codes) mentioned at the start of this 
document.  

Here are the GG codes for the Fighter's stats that
are listed in the code book.  After each code is the
hex code that you get from the GG code convertor
program:

TGKLPALZ  3041?23:46  double Fighter's Hit Points
GPKUAEZA  3048?0A:14  double Fighter's Hit
ZTKUPAIU  3049?35:6A  double Fighter's Evade
ZAKLTAIE  3046?05:0A  double Fighter's Luck

Notice that the first 4 digits of all the hex codes 
are all very close together (3041, 3048, 3049, 3046).
These numbers are the address of the code.  Chances
are that the codes we're looking for are in-between
these numbers, or very close by.

I'm not going to go into detail about what all of the
values mean in the converted hex codes.  I'll only
tell you what you need to know as we go along.  I'm
trying to keep this as simple as possible.

We will start by finding the lowest address of the
4 codes that we got from the code book (in this case,
it's 3041?23:46).  Write this number down.

Next, open up the ROM with a hex editor (make sure you
use a copy of the ROM).

Highlight the first row of numbers in the ROM (the 
first 16 bytes), and delete it.  If you don't do this,
then all of your GG codes will be $10 off.

Now scroll down the file until you come to the address
that you wrote down earlier (3041?23:46).  Remember
that the address part of the code is the first 4 
digits (3041).

When you get to the address (in this case, 3041), see
if the value there matches the value of the number
between the question mark (?), and the colon (:) of
the code that you wrote down before (3041?23:46).  So
in this example, the number between the "?" and the 
":" would be 23.  This is called the "Check Value"
(or Compare Value).  

In our example, the value at 3041 (in the hex file)
matches the check value of the code (23), so we know
we have the right address.  If the value doesn't
match the check value, then you have to add $8000 
(hex) to the address and see if the check value 
matches.  If it does, then that is the right address.
If it still doesn't match, keep adding $8000 (hex)
to the address until it does match.  

Remember that you can use the Windows (or Mac)
calculator to do this hex addition.

So now we are at the address 3041 in the Final Fantasy
hex file.  We need to look at the other addresses near
that address that might be the codes we're looking 
for.  Remember that we already have codes for these
addresses: 3041, 3046, 3048, 3049.  So lets see what
we find at the addresses not covered by the codes we
have.  The addresses would be: 3042, 3043, 3044, 3045,
and 3047.  Here are the hex values for each of those
addresses:

3042 = 14
3043 = 05
3044 = 01
3045 = 0A
3047 = 0A

Now if you remember, earlier, I had you write down the
hex values of the stats that we were looking to find 
codes for.  Here are those stat values (in hex):

STR. = 14
AGL. = 05
INT. = 01
VIT. = 0A
Damage = 0A

Do you notice anything similar between these numbers
and the numbers above them?  BINGO!!  I think we've
found our codes!

Here are both sets of numbers from above so you can
see what I'm talking about:

3042 = 14 / STR. = 14
3043 = 05 / AGL. = 05
3044 = 01 / INT. = 01
3045 = 0A / VIT. = 0A
3047 = 0A / Damage = 0A

In this example, we lucked out because all of the
codes were in the right order, but sometimes the codes
can be mixed around some.  Actually, the last two
codes (3045 and 3047) both have the same value (0A)
so we can't be sure which is which until we try them
out.

So we can assume that these are our new codes:

3042 = STR. 
3043 = AGL.
3044 = INT.
3045 = VIT.
3047 = Damage

You may be wondering how you can turn those into Game
Genie codes.  Here's how: Before we turn it into a GG
code, you need to get a raw hex code.  Lets start with
the first code (STR.).  We need three parts to make a
hex code.  The first part of the hex code is the
address.  We know what the address is for the first
code, it's 3042.  So the first part of our hex code 
is 3042.  

The second part we need for our hex code is the check
value.  The check value is simply the value that is
at the address location.  We know that the value at 
the address 3042 is 14.  So the second part of our
hex code is 14.  Here's what we have so far: 3042 14.

The third part we need for our hex code is the code
value (or data value).  This is the amount that you
want the code to give you.  So you can make this any
value you want from 0 to FF (0 to 255).  For this
example, we are going to make the new value for our
stat codes 99.  The hex number for 99 is 63.  So 63
will be the third part of our code.  Here is our
complete hex code: 3042 14 63. 

(If you want to max out the value of the code (ie 
start with 255 STR.), then use FF as the third part 
of the code).

So this is our new hex code that lets the Fighter 
start with 99 STR.: 3042?14:63.  Actually, you can 
enter this code into NESticle, and it will work just
fine, but I'll show you how to convert it into a Game
Genie code.

To convert the hex code into a GG code, all you have
to do is enter the hex code into the GG code converter
program mentioned near the start of this document.  
Hear is the GG code that we get from the GG code
converter program:

3042?14:63 = LTKLZAGP

LTKLZAGP = Fighter starts with 99 STR. (Strength)

If you try this GG code on your emulator or on a real
NES, you will see that the Fighter starts out with 99
STR. (Strength) instead of 20.  Success!

Remember that these codes will only work on starting
(new game) characters, so don't use these codes on
saved games, because they won't work.

You can use the same method to find the rest of the
stat codes for the Fighter as well as the rest of the
characters.

If the address of your new hex code has more than 4
digits, you have to convert it into a 4 digit address.
The easiest way to do this is to enter the whole hex
code into the ROM Patch part of NESticle and let
NESticle convert it for you.


     This document was written by:

    Tony Hedstrom   t.hed@excite.com





Download the text version of this file.