********************************* * PART 13: A DIFFERENT APPROACH * ********************************* <13.1> Introduction----------------------------------------------------------- Part 12's approach to code creation is mathematical and precise. This section of the FAQ presents some information that is especially useful in creating new codes from preexisting codes -- namely, how to increment the address a code modifies by a known value. <13.2> Tips for code altering------------------------------------------------- Do you have a known code and want to create a code with a distinct effect that affects the same general area of the game? Here are a few tips on making new codes from preëxisting ones. Character Position What You Can Change It To ~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 & 2 Anything. Determines the degree to which the memory address is affected. 3 This is the position that ends up modifying the controversial A15 (see <12.4>). Some Game Genies will make sure A15 is always high because LoROM games require it. This means if you enter D,F,4, 7,0,9,1, or 5 into slot 3, some GG's will automatically convert it to 6,B,C,8,A,2,3, or E, respectively. Even in HiROM games -- where A15 can be either high or low -- these newer GGs will convert the code. Some GG's seem to still affect both ROMaddresses (with A15 both high and low), even if it changes A15 to being high. There are at least 3 versions of the GG out there: 1) does not convert at all; will affect both ROMaddresses with A15 low and A15 high if the game is HiROM 2) will automatically make A15 high on the code screen; will affect both ROMaddresses with A15 low and A15 high if the game is HiROM 3) will not automatically convert; will only affect one address -- either with A15 high or A15 low -- for HiROM games, and the code will not work if A15 is misrepresented in the code (this is the type of interpretation that is also used by the GG code input features on emulators such as ZSnes). 4 Anything; usually gives the code a much different effect, though in the same area of the game, when changed. 5 & 7 Change the character to another one in its group: GROUP CHART: 5&7 ---------------- Group 1: D 0 6 A Group 2: F 9 B 2 Group 3: 4 1 C 3 Group 4: 7 5 8 E 6 & 8 Change the character to another one in its group: GROUP CHART: 6&8 ---------------- Group 1: D F 4 7 Group 2: 0 9 1 5 Group 3: 6 B C 8 Group 4: A 2 3 E <13.3> Actual values of the slots--------------------------------------------- Each slot has a numerical value assigned to it. The numbers listed here are the resulting increase in memory address from increasing the appropriate slot by 1. The reason for the "groups" listed above is that the slots are assigned different values for changing within groups and out of groups. The first value on the chart is the increment going "across" a row on the 'group charts' above; the second value is the increment going "down" a column on the group chart. SLOT VALUE WITHIN GROUP VALUE OUTSIDE GROUP ---- ------------------ ------------------- 3 1000h (4096) 0h (0) 4 10h (16) 10h (16) 5 100h (256) 400000h (4,194,304) 6 4h (4) 100000h (1,048,576) 7 1h (1) 40000h (262,144) 8 400h (1024) 10000h (65536) So, to regroup this, the hierarchy of slots is: 7* 6 4 5* 8 3 8* 7 6* 5 * in order to increment this slot "one" in this position in the hierarchy, add four to it; e.g., D --> 0 --> 6 --> A Confused? The chart below can help. Just find the right slot, find the digit that is present in that slot on the chart, and you will find its value in the CPU Address. Add all the values of all the slots together, and you will be able to find the entire CPU address with just a hex calculator! <13.4> What's worth what? The Master Chart!---------------------------------- SLOT DIGIT VALUE SLOT DIGIT VALUE ---- ----- ----------- ---- ----- ------- 3rd D* $0000/$8000 4th D $00 F* $1000/$9000 F $10 4* $2000/$A000 4 $20 7* $3000/$B000 7 $30 0* $4000/$C000 0 $40 9* $5000/$D000 9 $50 1* $6000/$E000 1 $60 5* $7000/$F000 5 $70 6 $8000 6 $80 B $9000 B $90 C $A000 C $A0 8 $B000 8 $B0 A $C000 A $C0 2 $D000 2 $D0 3 $E000 3 $E0 E $F000 E $F0 * the first value is for HiROM games; the second, for LoROM games. See Part 12. SLOT DIGIT VALUE SLOT DIGIT VALUE ---- ----- ------- ---- ----- ------- 6th D $0 8th D $000 F $4 F $400 4 $8 4 $800 7 $C 7 $C00 0 $100000 0 $10000 9 $100004 9 $10400 1 $100008 1 $10800 5 $10000C 5 $10C00 6 $200000 6 $20000 B $200004 B $20400 C $200008 C $20800 8 $20000C 8 $20C00 A $300000 A $30000 2 $300004 2 $30400 3 $300008 3 $30800 E $30000C E $30C00 SLOT DIGIT VALUE SLOT DIGIT VALUE ---- ----- ------- ---- ----- ------- 5th D $000 7th D $0 0 $100 0 $1 6 $200 6 $2 A $300 A $3 F $400000 F $40000 9 $400100 9 $40001 B $400200 B $40002 2 $400300 2 $40003 4 $800000 4 $80000 1 $800100 1 $80001 C $800200 C $80002 3 $800300 3 $80003 7 $C00000 7 $C0000 5 $C00100 5 $C0001 8 $C00200 8 $C0002 E $C00300 E $C0003 <13.5> Example using the Chart------------------------------------------------ [FINAL FANTASY III] **5C-7B85 Modifies Terra's Vigor looking at the chart, we see that... "5" in slot 3 = 7000h "C" in slot 4 = A0h "7" in slot 5 = C00000h "B" in slot 6 = 200004h "8" in slot 7 = C0002h "5" in slot 8 = 10C00h ----------------------- TOTAL ED7CA6h Does that number look familiar? It should; it's the same CPU address that we arrived at in Part 12 using the bit shift method. <13.6> Converting Back: from ROM Address to GG Code--------------------------- Okay, now that you've created the memory address for a code using the chart, you may be wondering: "How do I go the other way?" While you could reverse the bit shift process in Part 12, you could also use the chart above to do it. This process requires a little deduction on your part, but it's probably easier than the binary hassle. What you have to do is separate the hex number into its six digits, then, in turn, separate the six digits into values which can be made by the numbers on the chart. The first thing you have to do is to convert the ROM address back to a CPU address, which you can do by either _adding_ BFFE00h (for a HiROM game) or going through the reverse bit-shift process detailed in <<12.4.2>> (for a LoROM game). The next thing you need to do is to convert the CPU address into Game Genie format. The best way to illustrate this is through example. Let's say you have found the CPU address to be DA4DB2h. We know we're looking to end up with an eight-digit code [????-????]. The first two ?s will remain that way, as they indicate the data. At the end of this process, though, we will have definite values for the other 6 positions. DA4DB2h = D00000h + A0000h + 4000h + D00h + B0h + 2h 1. The first task is to make D00000h using numbers on the chart. You want a combination of no more than two numbers, and only addition is allowed. So, D00000h = C00000h + 100000h. Looking at the chart, that gives us a "7" in slot 5 and a "0" in slot 6. [????-70??] 2. Next, we have to get A0000h. A0000h = 80000h + 20000h. That gives us a "4" in slot 7 and a "6" in slot 8. [????-7046] 3. Get 4000h, which is simply an "A" in slot 3. [??A?-7046] 4. Get D00h. D00h = C00h + 100h, which is a "7" in slot 8 and a "0" in slot 5. Uh oh! We already have numbers in those slots! No problem. Just "lay" the values for D00h over the previous values; you'll find it always works. For instance, your old value for slot 5 was C00000h. The one you want now is 100h. "Lay" the second on top of the first and you get C00100h, which, if you look on the chart, is a "5" in slot 5. Do a similar thing with slot 8: your value already there is 20000h, and the one you want now is C00h. "Lay" the C00h on the old value, and you get 20C00h, which is obtained with an "8" in slot 8. [??A?-5048] 5. Get B0h. B0h = "8" in slot 4. [??A8-5048] 6. Get 2h. 2h is a "6" in slot 7. You already have a slot 7, so use the "laying" technique again: Your initial value for slot 7 was 80000h. 80000h + 2h = 80002h, which is a "C" in slot 7. So, your final code comes out ??A8-50C8. And that's all there is to it! This is useful, because using a hex editor, you can search the ROM of a game for a value your looking for (for instance, initial stats), and use this to find the equivalent GG code. If you find continuous memory addresses for stats, etc., you don't have to do this for every code. Just use the "increment" information in <13.3> to calculate the rest of the codes-- 99 times out of 100 you'll be right. If you're at all acquainted with binary, though, reversing the 'bit shift' method in <12.2> is probably an easier process.