Announcement

Collapse
No announcement yet.

ActRaiser (SNES) - lots of new GG codes and a code request

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • ActRaiser (SNES) - lots of new GG codes and a code request

    Code:
    BATTLE MODE
    ===========
    Avatar Sword Wave
    DD6A-D7A4
    
    Standing High Jump
    F96B-DF96 
    
    Standing Super Jump
    7D6B-DF96 
    
    Standing Ultra Jump
    1D6B-DF96
    
    Standing Moon Jump
    CD6B-DF96 
    
    Running High Jump
    F961-DFF6 
    
    Running Super Jump
    7D61-DFF6 
    
    Running Ultra Jump
    1D61-DFF6 
    
    Running Moon Jump
    CD61-DFF6 
    
    Timer Counts Up in Battle Mode
    1B8B-DFA8
    
    Time Bonus Worth 4x As Much
    D0CF-6FAD
    
    Extra Life Bonus Worth 5000
    D9C0-670D 
    
    End Level Bonus of 10000
    FDC5-6DAD 
    
    End Level Bonus of 99990 (max score)
    DD60-AF6F 
    
    
    
    SIM MODE
    ========
    Angel Infinite HP
    C282-D400
    
    Angel Has Higher Power
    DD89-AD60
    
    Use Magic Skull on Any Lair
    6DB0-AD65
    
    No Monsters in SIM Mode
    6D8B-07A3
    
    Towns Build Faster
    DD63-0D6A
    
    Towns Build Even Faster
    DD63-0D6A + 1D63-0D0A
    
    Towns Build at Breakneck Speed (see note)
    DD63-0D6A + DF63-0D0A
    NOTE: Once souls run out, game will lag. Disable code at this point.
    
    Towns Will Grow Despite Problems
    6D64-07A2
    
    Towns Start at Highest Civilization
    D766-D70A
    
    Skip Introduction When Starting Town
    DD6B-DFDA
    
    No Construction
    6D69-AF6A
    
    
    
    ITEM CODES
    ==========
    
    Get Any Item From Fillmore - Master Code (see notes)
    6D68-D4A1 + CB6D-07A1 + 3C6F-0D01
    
    Magical Fire
    DF6F-0DD1
    
    Magical Stardust
    D46F-0DD1
    
    Magical Aura
    D76F-0DD1
    
    Magical Light
    D06F-0DD1
    
    Source of Life
    D96F-0DD1
    
    Source of Magic
    D16F-0DD1
    
    Loaf of Bread
    D56F-0DD1
    
    Wheat
    D66F-0DD1
    
    Herb
    DB6F-0DD1
    
    Bridge
    DC6F-0DD1
    
    Harmonious Music
    D86F-0DD1
    
    Ancient Tablet
    D26F-0DD1
    
    Magic Skull
    D36F-0DD1
    
    Sheep's Fleece
    DE6F-0DD1
    
    Bomb!
    F46F-0DD1
    
    Compass
    F76F-0DD1
    
    Strength of Angel
    F06F-0DD1
    
    NOTES: These codes will force an offering at Fillmore. The code consists of 4
    GG codes: 3 codes as a master code, and 1 code as the slot modifier. You can 
    then enter Fillmore, accept the item as many times as you want, and save your 
    game. Then you can reset and enter another item code for other items if you 
    desire. The item text/icon will not appear but if you press B to select you 
    will receive the offering.
    Well after finishing EarthBound lately, I was looking for ways to expand the replayability of my meager SNES collection. My brother lent me his SNES Game Genie, so now I am enjoying playing some of the games from my collection I hadn't played in a while.

    ActRaiser is one of those games. I have owned it for years, finished it a few times and enjoyed it thoroughly but lately it hasn't drawn my interest. With the Game Genie however, I figured I'd give it another go.

    It wasn't long before I started dreaming up codes for this game and implementing them. I also made good use of the codes in the DB, there are some great ones there!

    I noticed a lot of them are RAW codes, I ported several of them over to GG format to achieve the same effect on a real console. I have playtested most of these codes quite thoroughly and have enjoyed every minute of it!

    CODE REQUEST

    I tried, but my Kung Fu is not strong enough to make these codes. Anyone want to give it a shot?

    - Clear any land area (ie: forests/mountains)
    and/or
    - Build anywhere
    - Increase building limit beyond max population

    Basically I would love to see as many buildings as will fit on the screen as possible!


    INTERESTING STUFF

    Also, I discovered something interesting in my travels. Other coders may want to take a look at the table I found in ROM. Modifying it could lead to all sorts of fun and wacky antics!

    The table is posted at the very bottom of the Code Development Notes #2 (next post), it's quite a large table of entries just begging to be messed with.


    Code Development Notes:
    Spoiler Alert! Click to view...

    Towns build faster
    DD63-0D6A

    Towns build even faster
    DD63-0D6A + 1D63-0D0A

    Towns build at breakneck speed
    DD63-0D6A + DF63-0D0A

    Code:
    This was my first stab at a code for this game. It gets old waiting for the 
    20-second build cycles when waiting for a town to grow. I wanted a way to
    speed this up.
    
    Doing some RAM searches, I discovered $7F:91FE holds a 16-bit value which is 
    the counter for the build cycle.
    
    This routine controls the build cycles:
    $03/81DA EE FE 91    INC $91FE  [$7F:91FE]   A:0006 X:0B0A Y:B423 P:eNvmxdIzc
    $03/81DD AD FE 91    LDA $91FE  [$7F:91FE]   A:0006 X:0B0A Y:B423 P:envmxdIzc
    $03/81E0 C9 D0 02    CMP #$02D0              A:02AE X:0B0A Y:B423 P:envmxdIzc
    $03/81E3 90 09       BCC $09    [$81EE]      A:02AE X:0B0A Y:B423 P:eNvmxdIzc
    $03/81EE 20 0C 8E    JSR $8E0C  [$03:8E0C]   A:02AE X:0B0A Y:B423 P:eNvmxdIzc
    
    When the value at $91FE is equal to 0x02D0 the game will start another build.
    
    To reduce build time: Change compare value at $03:81E0 to lower value
    
    0381E2:00 = DD63-0D6A (Towns build faster)
    0381E1:60 = 1D63-0D0A (Towns build even faster)
    0381E1:01 = DF63-0D0A (Towns build at breakneck speed)
    
    The breakneck speed one is awesome! The town is under construction so often
    that roads can barely be built, you will see them advance one square at a time
    instead of the full 9-square area at once. Pretty neat! :)

    Build as far as you want
    BUGGY / Not possible?

    Code:
    Well this one was wishful thinking but I had to try. I wanted a way to build
    more than 8 squares at a time. I found a way to disable the limit, but
    unfortunately it doesn't work as the RAM is only set up to hold enough info
    for 8 squares ahead. Increasing the amount will start overwriting RAM past
    the intended area and will corrupt things like the population of the town.
    
    For this reason I didn't convert it to a GG code or include it in the list.
    
    $7F:9F4E holds the counter which limits you to building 8 squares at a time:
    
    $01/95C8 AF 1D 7C 7F LDA $7F7C1D[$7F:7C1D]   A:0040 X:0016 Y:0000 P:envmxdIZc
    $01/95CC AA          TAX                     A:0001 X:0016 Y:0000 P:envmxdIzc
    $01/95CD 1A          INC A                   A:0001 X:0001 Y:0000 P:envmxdIzc
    $01/95CE 8F 1D 7C 7F STA $7F7C1D[$7F:7C1D]   A:0002 X:0001 Y:0000 P:envmxdIzc
    $01/95D2 E2 20       SEP #$20                A:0002 X:0001 Y:0000 P:envmxdIzc
    $01/95D4 AF 4E 9F 7F LDA $7F9F4E[$7F:9F4E]   A:0002 X:0001 Y:0000 P:envMxdIzc
    $01/95D8 1A          INC A                   A:0001 X:0001 Y:0000 P:envMxdIzc
    $01/95D9 8F 4E 9F 7F STA $7F9F4E[$7F:9F4E]   A:0002 X:0001 Y:0000 P:envMxdIzc
    $01/95DD 98          TYA                     A:0002 X:0001 Y:0000 P:envMxdIzc
    $01/95DE 9F 4F 9F 7F STA $7F9F4F,x[$7F:9F50] A:0000 X:0001 Y:0000 P:envMxdIZc
    $01/95E2 C2 20       REP #$20                A:0000 X:0001 Y:0000 P:envMxdIZc
    $01/95E4 AD EE 0A    LDA $0AEE  [$01:0AEE]   A:0000 X:0001 Y:0000 P:envmxdIZc
    $01/95E7 18          CLC                     A:00DE X:0001 Y:0000 P:envmxdIzc
    $01/95E8 69 08 00    ADC #$0008              A:00DE X:0001 Y:0000 P:envmxdIzc
    $01/95EB 29 C0 FF    AND #$FFC0              A:00E6 X:0001 Y:0000 P:envmxdIzc
    $01/95EE 8F 0A 9F 7F STA $7F9F0A[$7F:9F0A]   A:00C0 X:0001 Y:0000 P:envmxdIzc
    $01/95F2 AD F0 0A    LDA $0AF0  [$01:0AF0]   A:00C0 X:0001 Y:0000 P:envmxdIzc
    $01/95F5 18          CLC                     A:0076 X:0001 Y:0000 P:envmxdIzc
    $01/95F6 69 08 00    ADC #$0008              A:0076 X:0001 Y:0000 P:envmxdIzc
    $01/95F9 29 C0 FF    AND #$FFC0              A:007E X:0001 Y:0000 P:envmxdIzc
    $01/95FC 8F 0C 9F 7F STA $7F9F0C[$7F:9F0C]   A:0040 X:0001 Y:0000 P:envmxdIzc
    $01/9600 AF 4E 9F 7F LDA $7F9F4E[$7F:9F4E]   A:0040 X:0001 Y:0000 P:envmxdIzc
    $01/9604 29 FF 00    AND #$00FF              A:0002 X:0001 Y:0000 P:envmxdIzc
    $01/9607 C9 08 00    CMP #$0008              A:0002 X:0001 Y:0000 P:envmxdIzc
    $01/960A F0 03       BEQ $03    [$960F]      A:0002 X:0001 Y:0000 P:eNvmxdIzc
    
    At $01:9607 is where it checks the limit of 8 squares. By changing the branch
    value on the BEQ to 00 it is possible to bypass this limit. But again, it will
    start corrupting RAM so it's not really feasible.
    
    01960B:00 = Build as far as you want (BUGGY - will corrupt RAM)


    Angel Has Higher Power
    DD89-AD60

    Code:
    Looking to port the original code by Deuce X. Machina: 7E0AFB:80
    
    Set read breakpoint for 7E0AFB, when shooting arrow:
    
    $03/82CE AF FB 0A 00 LDA $000AFB[$00:0AFB]   A:0000 X:0008 Y:0000 P:envMxdIZC
    $03/82D2 29 7F       AND #$7F                A:0080 X:0008 Y:0000 P:eNvMxdIzC
    $03/82D4 8F FB 0A 00 STA $000AFB[$00:0AFB]   A:0000 X:0008 Y:0000 P:envMxdIZC
    
    Deuce's code holds a steady value of 0x80 which results in a higher power shot.
    
    Changing the AND #$7F into LDA #$80 will work as two-part GG code:
    
    0382D2:A9 = CB62-6D6A
    0382D3:80 = 6D62-6DAA
    
    However that requires two codes and there is an easier way to do it.
    
    Changing the AND operation to ADC (add with carry) will result in #$80 since the
    carry register is set.
    
    0382D2:49 = 0B62-640A
    
    Resulting in this:
    
    $03/82CE AF FB 0A 00 LDA $000AFB[$00:0AFB]   A:0000 X:0008 Y:0000 P:envMxdIZC
    $03/82D2 69 7F       ADC #$7F                A:0000 X:0008 Y:0000 P:envMxdIZC
    $03/82D4 8F FB 0A 00 STA $000AFB[$00:0AFB]   A:0080 X:0008 Y:0000 P:eNVMxdIzc
    
    That way it's only one GG code! :)
    
    =========================
    
    Alternate and perhaps better approach:
    
    This routine also runs and checks $0AFB before doling out damage:
    
    $01/B34C AD FB 0A    LDA $0AFB  [$01:0AFB]   A:0001 X:0B0A Y:B3A0 P:envMxdIzc
    $01/B34F 29 80       AND #$80                A:0080 X:0B0A Y:B3A0 P:eNvMxdIzc
    $01/B351 F0 09       BEQ $09    [$B35C]      A:0080 X:0B0A Y:B3A0 P:eNvMxdIzc
    $01/B353 A9 FF       LDA #$FF                A:0080 X:0B0A Y:B3A0 P:eNvMxdIzc
    $01/B355 9D 25 00    STA $0025,x[$01:0B2F]   A:00FF X:0B0A Y:B3A0 P:eNvMxdIzc
    ...
    $01/B35C A9 00       LDA #$00                A:0000 X:0B0A Y:B3A0 P:envMxdIZc
    $01/B35E 9D 25 00    STA $0025,x[$01:0B2F]   A:0000 X:0B0A Y:B3A0 P:envMxdIZc
    
    Higher power shots are dished out via $B353, otherwise it skips to $B35C.
    
    Changing the branch value will allow for higher power shots:
    
    01B352:00 = DD89-AD60
    
    Works great!

    Avatar Sword Wave
    DD6A-D7A4

    Code:
    Looking to port the original code by Deuce X. Machina: 7E00E4:80
    
    Set read breakpoint for 7E00E4:
    
    This came up but it was a false lead:
    $00/9DD4 A5 E4       LDA $E4    [$00:00E4]   A:0003 X:08A0 Y:0002 P:envmxdIzc
    $00/9DD6 29 FF 00    AND #$00FF              A:0100 X:08A0 Y:0002 P:envmxdIzc
    $00/9DD9 D0 01       BNE $01    [$9DDC]      A:0000 X:08A0 Y:0002 P:envmxdIZc
    $00/9DDB 88          DEY                     A:0000 X:08A0 Y:0002 P:envmxdIZc
    $00/9DDC 98          TYA                     A:0000 X:08A0 Y:0001 P:envmxdIzc
    $00/9DDD 9D 2A 00    STA $002A,x[$00:08CA]   A:0001 X:08A0 Y:0001 P:envmxdIzc
    $00/9DE0 60          RTS                     A:0001 X:08A0 Y:0001 P:envmxdIzc
    
    A closer inspection found this:
    $00/88CC A5 E4       LDA $E4    [$00:00E4]   A:0001 X:08A0 Y:003C P:envMxdIZC
    $00/88CE F0 03       BEQ $03    [$88D3]      A:0000 X:08A0 Y:003C P:envMxdIZC
    $00/88D3 28          PLP                     A:0000 X:08A0 Y:003C P:envMxdIZC
    $00/88D4 38          SEC                     A:0000 X:08A0 Y:003C P:envmxdIZC
    
    Disassembly:
    $00/88CC A5 E4       LDA $E4    [$00:00E4]   A:0000 X:08A0 Y:003C P:envmxdIZC
    $00/88CE F0 03       BEQ $03    [$88D3]      A:0000 X:08A0 Y:003C P:envmxdIZC
    $00/88D0 28          PLP                     A:0000 X:08A0 Y:003C P:envmxdIZC
    $00/88D1 18          CLC                     A:0000 X:08A0 Y:003C P:envmxdIZC
    $00/88D2 60          RTS                     A:0000 X:08A0 Y:003C P:envmxdIZC
    $00/88D3 28          PLP                     A:0000 X:08A0 Y:003C P:envmxdIZC
    $00/88D4 38          SEC                     A:0000 X:08A0 Y:003C P:envmxdIZC
    $00/88D5 60          RTS                     A:0000 X:08A0 Y:003C P:envmxdIZC
    
    Skipping over the code at $88D0 prevents the wave from appearing. 
    
    To prevent skipping that section, change branch value at $88CE to 00:
    
    0088CF:00 = DD6A-D7A4 (Avatar Sword Wave)
    
    Works great! :)

    Avatar High Jump Codes

    High jump while standing
    F96B-DF96

    Super jump while standing
    7D6B-DF96

    Ultra jump while standing
    1D6B-DF96

    Moon jump while standing
    CD6B-DF96

    High jump while running
    F961-DFF6

    Super jump while running
    7D61-DFF6

    Ultra jump while running
    1D61-DFF6

    Moon jump while running
    CD61-DFF6

    Code:
    Looking at original "Jump to rise into sky" code by CRACKdown: 7E08BC:01
    
    Set write BP for 7E08BC just after jumping:
    
    $00/9972 FE 1C 00    INC $001C,x[$00:08BC]   A:FFFB X:08A0 Y:0048 P:eNvmxdIzc
    $00/9975 AD A1 00    LDA $00A1  [$00:00A1]   A:FFFB X:08A0 Y:0048 P:envmxdIzc
    $00/9978 89 40 00    BIT #$0040              A:0000 X:08A0 Y:0048 P:envmxdIZc
    $00/997B F0 0B       BEQ $0B    [$9988]      A:0000 X:08A0 Y:0048 P:envmxdIZc
    $00/9988 20 2F 8E    JSR $8E2F  [$00:8E2F]   A:0000 X:08A0 Y:0048 P:envmxdIZc
    
    
    I did a bunch of tracing to find this routine which is part of incrementing the 
    jump height:
    
    $00/8E6B BD 28 00    LDA $0028,x[$06:08C8]   A:0001 X:08A0 Y:0092 P:envmxdIzc
    $00/8E6E 2A          ROL A                   A:0900 X:08A0 Y:0092 P:envmxdIzc
    $00/8E6F 08          PHP                     A:1200 X:08A0 Y:0092 P:envmxdIzc
    $00/8E70 2A          ROL A                   A:1200 X:08A0 Y:0092 P:envmxdIzc
    $00/8E71 B1 A5       LDA ($A5),y[$06:8092]   A:2400 X:08A0 Y:0092 P:envmxdIzc
    $00/8E73 C8          INY                     A:FC00 X:08A0 Y:0092 P:eNvmxdIzc
    $00/8E74 90 04       BCC $04    [$8E7A]      A:FC00 X:08A0 Y:0093 P:envmxdIzc
    $00/8E7A 20 97 84    JSR $8497  [$00:8497]   A:FC00 X:08A0 Y:0093 P:envmxdIzc
    
    $00/8497 08          PHP                     A:FC00 X:08A0 Y:0093 P:envmxdIzc
    $00/8498 E2 20       SEP #$20                A:FC00 X:08A0 Y:0093 P:envmxdIzc
    $00/849A EB          XBA                     A:FC00 X:08A0 Y:0093 P:envMxdIzc
    $00/849B A9 00       LDA #$00                A:00FC X:08A0 Y:0093 P:eNvMxdIzc
    $00/849D EB          XBA                     A:0000 X:08A0 Y:0093 P:envMxdIZc
    $00/849E C9 80       CMP #$80                A:0000 X:08A0 Y:0093 P:envMxdIZc
    $00/84A0 90 03       BCC $03    [$84A5]      A:0000 X:08A0 Y:0093 P:eNvMxdIzc
    $00/84A5 28          PLP                     A:0000 X:08A0 Y:0093 P:eNvMxdIzc
    $00/84A6 60          RTS                     A:0000 X:08A0 Y:0093 P:envmxdIzc
    
    It seemed to be loading jump height and sprite values from a table starting 
    around $06:8088.
    
    I broke down the table and it has a discernable format:
    
    $06:8088: 06 00 00 FA 
              06 01 00 FB       
              06 01 00 FC 
              06 02 00 FD 
              06 03 00 FE 
    $06:809C  06 06 00 FF
    
    (NOTE: For full breakdown of table, see bottom of this post)
    
    Looking at the second column, it looked like it could be jump heights and sure enough it is.  
    After much testing I have determined what each value controls:
    
    There are six jumping "positions" (sets of 4 bytes), the game uses values from 
    the table above to determine the sprite to use, up/down adjust, left/right adjust, 
    and movement speed.
    
    FIRST DIGIT: Controls which sprite to use. In this case it's all 06 as that's the 
    jumping sprite. Changing this value will change the graphic used for that jump mode.
    
    SECOND DIGIT: Controls the up/down height adjustment. As the game raises
    the Avatar up, each of these values determines how far to move it. Essentially 
    a higher value = higher jump.
    
    THIRD DIGIT: Controls the left/right horizontal adjustment. All 00 in this case 
    because this is the table for a straight up/down jump. Setting these values to 
    something different results in the Avatar moving forward/backward with each jump. 
    For example jumping when running it's 01 so you move forward.
    
    FOURTH DIGIT: Controls the sprite movement speed. As the jump raises the Avatar up,
    it moves slower and slower to simulate the effect of gravity, until the Avatar starts
    falling.  Setting this to a lower value will cause the sprite to move faster.
    
    At first I just tried modifying the last digit of the last entry, which lead to a
    slow, elevator effect style jump. Then I tried increasing the jump height and speed
    together to find a "sweet spot". However that would take two GG codes to work.
    
    After loads of experimenting I discovered the best method for a high jump code is 
    to place the modification to the jump height in the middle of the jump. This will 
    boost the Avatar in the middle of the jump which is all that is needed for a smooth 
    high jump code.
    
    068095:15 = F96B-DF96 (High jump while standing)
    068095:30 = 7D6B-DF96 (Super jump while standing)
    068095:60 = 1D6B-DF96 (Ultra jump while standing)
    068095:A0 = CD6B-DF96 (Moon jump while standing)
    
    The table for running jumps starts at $06:805B. I again modified the second digit 
    of the third entry which gives the player a height boost in the middle of the jump.
    
    068064:15 = F961-DFF6 (High jump while running)
    068064:30 = 7D61-DFF6 (Super jump while running)
    068064:60 = 1D61-DFF6 (Ultra jump while running)
    068064:A0 = CD61-DFF6 (Moon jump while running)
    
    This one took a lot of digging but it was worth it! :)

    Angel Infinite HP
    C282-D400
    Code:
    Looking at porting Angel HP code by Deuce X. Machina: 7E0286:??
    
    Set write BP for 7E0286:
    
    >$01/B0D9 8D 86 02    STA $0286  [$01:0286]   A:0007 X:0BA2 Y:0001 P:envMxdIzC
     $01/B0DC C2 20       REP #$20                A:0007 X:0BA2 Y:0001 P:envMxdIzC
     $01/B0DE A9 23 00    LDA #$0023              A:0007 X:0BA2 Y:0001 P:envmxdIzC
     $01/B0E1 02 00       COP #$00                A:0023 X:0BA2 Y:0001 P:envmxdIzC
     $00/8526 08          PHP                     A:0023 X:0BA2 Y:0001 P:envmxdIzC
    
    Prevent health decrease by changing STA to LDA:
    
    01B0D9:AD = C282-D400 (Angel Infinite HP)
    
    Works great! :)

    Get Any Item From Fillmore

    Code:
    This started out as an attempt to give the Avatar magic before it was
    attained. I made many attempts at trying to port Deuce X. Machina's Avatar 
    Equipped Magic (7E02AC:??) via various methods. However after not having 
    much success with that I ended up settling on the idea of forcing the 
    item to appear in Fillmore as an offering, thus giving magic.
    
    This also took a lot of poking and prodding to figure out how the item 
    could be forced into inventory.  In the end it amounts to a) bypassing 
    the check that tells the game there is an offering is available to collect, 
    and b) overriding which offering is given to the player.
    
    The way this code works, the item won't actually appear in the list, however 
    when you press B to select the item you will see the proper text appear, and 
    then it will go into your inventory.  It works well if you use these codes to 
    obtain items and then save the game.
    
    This has the added advantage of being expandable to every offering available.
    
    First the game does a check to see if there are offerings present, if not it 
    will exit back to the map. To bypass this check I did some tracing:
    
    Offering present:
    $01/88BB B0 06       BCS $06    [$88C3]      A:0201 X:1088 Y:0254 P:envMxdIzC
    $01/88C3 A0 38 FB    LDY #$FB38              A:0201 X:1088 Y:0254 P:envMxdIzC
    $01/88C6 20 29 8E    JSR $8E29  [$01:8E29]   A:0201 X:1088 Y:FB38 P:eNvMxdIzC
    
    Offering not present:
    $01/88BB B0 06       BCS $06    [$88C3]      A:0200 X:1088 Y:0254 P:envMxdIZc
    $01/88BD A0 23 FB    LDY #$FB23              A:0200 X:1088 Y:0254 P:envMxdIZc
    $01/88C0 82 C9 00    BRL $00C9  [$898C]      A:0200 X:1088 Y:FB23 P:eNvMxdIzc
    $01/898C 20 29 8E    JSR $8E29  [$01:8E29]   A:0200 X:1088 Y:FB23 P:eNvMxdIzc
    
    At that point, if the carry bit is set/not set determines whether to exit back 
    to the map.
    
    Changing the BCS to BRA (branch always) will bypass the check and open an empty 
    menu.
    
    0188BB:80 = 6D68-D4A1 (Master Code 1)
    
    In between I found a way to list the item text in the menu, but since I am 
    trying to keep the number of codes to a minimum I figured showing the item text 
    is unnecessary.
    
    OPTIONAL: If desired, you can use these codes to list the item text in the menu:
    
    018D04:A9 = CB6D-0FD5 (Item Name in Menu - Master Code)
    018D05:?? (see below table for values, use online GG code converter to create code)
    
    Interestingly, if you choose two different values (ie: different text than item 
    received) it will save the incorrect item text for the item in your inventory. 
    Kinda neat!
    
    Next I did a bunch more traces to end up at the following routine, which is what 
    actually stores the item you choose.  
    
    Storing the item chosen in player's inventory:
    $01/890F BD 00 00    LDA $0000,x[$01:024C]   A:024C X:024C Y:024C P:envMxdIzc
    $01/8912 9E 00 00    STZ $0000,x[$01:024C]   A:0200 X:024C Y:024C P:envMxdIZc
    $01/8915 48          PHA                     A:0200 X:024C Y:024C P:envMxdIZc
    
    Here is where we can load an item value of our choosing. Two master codes are
    necessary, one to change the LDA from indexed to immediate, and another to add a
    NOP (no operation) to cancel out the third byte of the original LDA instruction.
    
    01890F:A9 = CB6D-07A1 (Master Code 2)
    018911:EA = 3C6F-0D01 (Master Code 3)
    
    The final code is the slot modifier to choose what item the player is to get:
    
    018910:??
    
    (thanks to Deuce X. Machina for this list)
    01: Magical Fire
    02: Magical Stardust
    03: Magical Aura
    04: Magical Light
    05: Source of Life
    06: Source of Magic
    07: Loaf of Bread
    08: Wheat
    09: Herb
    0A: Bridge
    0B: Harmonious Music
    0C: Ancient Tablet -- unusable
    0D: Ancient Tablet
    0E: Magic Skull
    0F: Sheep's Fleece
    10: Bomb! -- unusable
    11: Bomb! -- unusable
    12: Bomb!
    13: Compass
    14: Strength of Angel
    
    
    Magical Fire
    DF6F-0DD1
    
    Magical Stardust
    D46F-0DD1
    
    Magical Aura
    D76F-0DD1
    
    Magical Light
    D06F-0DD1
    
    Source of Life
    D96F-0DD1
    
    Source of Magic
    D16F-0DD1
    
    Loaf of Bread
    D56F-0DD1
    
    Wheat
    D66F-0DD1
    
    Herb
    DB6F-0DD1
    
    Bridge
    DC6F-0DD1
    
    Harmonious Music
    D86F-0DD1
    
    Ancient Tablet
    D26F-0DD1
    
    Magic Skull
    D36F-0DD1
    
    Sheep's Fleece
    DE6F-0DD1
    
    Bomb!
    F46F-0DD1
    
    Compass
    F76F-0DD1
    
    Strength of Angel
    F06F-0DD1
    
    
    Works like a charm!


    Time Counts Up in Battle Mode
    1B8B-DFA8

    Code:
    This is a simple modification of VisitntX's Infinite Time code (C98B-D468).
    The Infinite Time code is 02BC9A:A5 which changes the STA into LDA.
    
    I figured it would be neat to have time count upward instead, that way at the
    end of the level there is a bigger time bonus.
    
    $02/BC96 38          SEC                     A:02B0 X:0C20 Y:0000 P:eNvmxdIzc
    $02/BC97 E9 01 00    SBC #$0001              A:02B0 X:0C20 Y:0000 P:eNvmxdIzc
    $02/BC9A 85 E6       STA $E6    [$00:00E6]   A:02B0 X:0C20 Y:0000 P:eNvmxdIzc
    
    Changing SBC to ADC will add time instead of subtracting it. The only thing is
    it adds 2 seconds at a time instead of 1. This could be fixed with a CLC at
    $02:BC96 however I figured that was unnecessary.
    
    02BC97:69 = 1B8B-DFA8 (Time Counts Up in Battle Mode)




    Use Magic Skull on Any Lair
    6DB0-AD65

    Code:
    Another code that took a lot of tracing to figure out, but I eventually nailed it!
    
    I was trying to think of things I'd like to be able to do in SIM mode, like using
    the Magic Skull on any lair.  Normally the game will not let you do this.
    
    However there was no easy way to determine where to start digging, so I basically 
    had to go through a ton of trace logs to find what I was after.
    
    After several attempts and tons of sifting through logs I found this gem. 
    It came down to the difference between these two routines:
    
    When using skull on Red Demon's lair in Bloodpool:
    $01/9F01 28          PLP                     A:1001 X:1088 Y:C8F7 P:envMxdIzc
    $01/9F02 90 03       BCC $03    [$9F07]      A:1001 X:1088 Y:C8F7 P:envMxdIzc
    $01/9F07 C2 20       REP #$20                A:1001 X:1088 Y:C8F7 P:envMxdIzc
    $01/9F09 AF F9 7B 7F LDA $7F7BF9[$7F:7BF9]   A:1001 X:1088 Y:C8F7 P:envmxdIzc
    $01/9F0D 0A          ASL A                   A:0001 X:1088 Y:C8F7 P:envmxdIzc
    $01/9F0E 0A          ASL A                   A:0002 X:1088 Y:C8F7 P:envmxdIzc
    $01/9F0F 0A          ASL A                   A:0004 X:1088 Y:C8F7 P:envmxdIzc
    $01/9F10 AA          TAX                     A:0008 X:1088 Y:C8F7 P:envmxdIzc
    $01/9F11 A0 04 00    LDY #$0004              A:0008 X:0008 Y:C8F7 P:envmxdIzc
    $01/9F14 BF C8 95 7F LDA $7F95C8,x[$7F:95D0] A:0008 X:0008 Y:0004 P:envmxdIzc
    $01/9F18 30 14       BMI $14    [$9F2E]      A:0004 X:0008 Y:0004 P:envmxdIzc
    $01/9F1A BF 68 95 7F LDA $7F9568,x[$7F:9570] A:0004 X:0008 Y:0004 P:envmxdIzc
    $01/9F1E CF E1 90 7F CMP $7F90E1[$7F:90E1]   A:0004 X:0008 Y:0004 P:envmxdIzc
    $01/9F22 D0 0A       BNE $0A    [$9F2E]      A:0004 X:0008 Y:0004 P:envmxdIZC
    $01/9F24 BF 98 95 7F LDA $7F9598,x[$7F:95A0] A:0004 X:0008 Y:0004 P:envmxdIZC
    $01/9F28 CF E5 90 7F CMP $7F90E5[$7F:90E5]   A:0018 X:0008 Y:0004 P:envmxdIzC
    $01/9F2C F0 0F       BEQ $0F    [$9F3D]      A:0018 X:0008 Y:0004 P:envmxdIZC
    $01/9F3D C2 20       REP #$20                A:0018 X:0008 Y:0004 P:envmxdIZC
    $01/9F3F E0 08 00    CPX #$0008              A:0018 X:0008 Y:0004 P:envmxdIZC
    $01/9F42 F0 0A       BEQ $0A    [$9F4E]      A:0018 X:0008 Y:0004 P:envmxdIZC
    
    
    When using skull on any other lair:
    $01/9F01 28          PLP                     A:1001 X:1088 Y:C8F7 P:envMxdIzc
    $01/9F02 90 03       BCC $03    [$9F07]      A:1001 X:1088 Y:C8F7 P:envMxdIzc
    $01/9F07 C2 20       REP #$20                A:1001 X:1088 Y:C8F7 P:envMxdIzc
    $01/9F09 AF F9 7B 7F LDA $7F7BF9[$7F:7BF9]   A:1001 X:1088 Y:C8F7 P:envmxdIzc
    $01/9F0D 0A          ASL A                   A:0000 X:1088 Y:C8F7 P:envmxdIZc
    $01/9F0E 0A          ASL A                   A:0000 X:1088 Y:C8F7 P:envmxdIZc
    $01/9F0F 0A          ASL A                   A:0000 X:1088 Y:C8F7 P:envmxdIZc
    $01/9F10 AA          TAX                     A:0000 X:1088 Y:C8F7 P:envmxdIZc
    $01/9F11 A0 04 00    LDY #$0004              A:0000 X:0000 Y:C8F7 P:envmxdIZc
    $01/9F14 BF C8 95 7F LDA $7F95C8,x[$7F:95C8] A:0000 X:0000 Y:0004 P:envmxdIzc
    $01/9F18 30 14       BMI $14    [$9F2E]      A:0003 X:0000 Y:0004 P:envmxdIzc
    $01/9F1A BF 68 95 7F LDA $7F9568,x[$7F:9568] A:0003 X:0000 Y:0004 P:envmxdIzc
    $01/9F1E CF E1 90 7F CMP $7F90E1[$7F:90E1]   A:0000 X:0000 Y:0004 P:envmxdIZc
    $01/9F22 D0 0A       BNE $0A    [$9F2E]      A:0000 X:0000 Y:0004 P:eNvmxdIzc
    $01/9F2E E8          INX                     A:0000 X:0000 Y:0004 P:eNvmxdIzc
    $01/9F2F E8          INX                     A:0000 X:0001 Y:0004 P:envmxdIzc
    $01/9F30 88          DEY                     A:0000 X:0002 Y:0004 P:envmxdIzc
    ... (snip), just a loop
    $01/9F31 D0 E1       BNE $E1    [$9F14]      A:0010 X:0006 Y:0001 P:envmxdIzC
    $01/9F14 BF C8 95 7F LDA $7F95C8,x[$7F:95CE] A:0010 X:0006 Y:0001 P:envmxdIzC
    $01/9F18 30 14       BMI $14    [$9F2E]      A:0005 X:0006 Y:0001 P:envmxdIzC
    $01/9F1A BF 68 95 7F LDA $7F9568,x[$7F:956E] A:0005 X:0006 Y:0001 P:envmxdIzC
    $01/9F1E CF E1 90 7F CMP $7F90E1[$7F:90E1]   A:0004 X:0006 Y:0001 P:envmxdIzC
    $01/9F22 D0 0A       BNE $0A    [$9F2E]      A:0004 X:0006 Y:0001 P:envmxdIZC
    $01/9F24 BF 98 95 7F LDA $7F9598,x[$7F:959E] A:0004 X:0006 Y:0001 P:envmxdIZC
    $01/9F28 CF E5 90 7F CMP $7F90E5[$7F:90E5]   A:0004 X:0006 Y:0001 P:envmxdIzC
    $01/9F2C F0 0F       BEQ $0F    [$9F3D]      A:0004 X:0006 Y:0001 P:envmxdIZC
    $01/9F3D C2 20       REP #$20                A:0004 X:0006 Y:0001 P:envmxdIZC
    $01/9F3F E0 08 00    CPX #$0008              A:0004 X:0006 Y:0001 P:envmxdIZC
    $01/9F42 F0 0A       BEQ $0A    [$9F4E]      A:0004 X:0006 Y:0001 P:eNvmxdIzc
    $01/9F44 E2 20       SEP #$20                A:0004 X:0006 Y:0001 P:eNvmxdIzc
    $01/9F46 A0 7D 8D    LDY #$8D7D              A:0004 X:0006 Y:0001 P:eNvMxdIzc
    $01/9F49 22 96 93 01 JSL $019396[$01:9396]   A:0004 X:0006 Y:8D7D P:eNvMxdIzc
    
    
    The check at $01:9F3F is what determines what lair you are trying to use it on.
    
    So changing the BEQ at $01:9F42 to a BRA will result in the Magic Skull being
    allowed to be used on any lair. Sweet!
    
    019F42:80 = 6DB0-AD65 (Use Magic Skull on Any Lair)
    
    I was extremely thrilled once I found the area to make this work. Unlike most
    other codes there was no obvious way to dig into a specific area of code, no
    starting point whatsoever. So I ended up tracing out both instances and voila!


    No Monsters in SIM Mode
    6D8B-07A3

    Code:
    For this code I looked at Ugetab's Monster Lairs Empty codes to find the RAM
    address for the monster lairs.
    
    I set a breakpoint for the RAM address that monsters are stored at. The one
    I used was $7F96BC which is a Fillmore monster lair slot.
    
    I found this routine that runs when new monsters spawn and one is removed from
    the lair:
    
    $03/B99C BD B8 96    LDA $96B8,x[$7F:96BC]   A:0000 X:0004 Y:0002 P:envmxdIZc
    $03/B99F F0 78       BEQ $78    [$BA19]      A:008D X:0004 Y:0002 P:envmxdIzc
    $03/B9A1 BC 88 96    LDY $9688,x[$7F:968C]   A:008D X:0004 Y:0002 P:envmxdIzc
    $03/B9A4 DA          PHX                     A:008D X:0004 Y:0B7C P:envmxdIzc
    $03/B9A5 BB          TYX                     A:008D X:0004 Y:0B7C P:envmxdIzc
    
    If there are zero monsters in the lair, none will be spawned. This is checked
    at $03:B99F.  Changing BEQ to BRA will result in no monsters being spawned.
    
    03B99F:80 = 6D8B-07A3 (No Monsters in Sim Mode)
    
    Awesome!
    "One man's garbage is another man-person's good un-garbage." -- Ricky from Trailer Park Boys

  • #2
    The table of values is at the bottom of this post.

    Code Development Notes #2:
    Spoiler Alert! Click to view...


    Towns will grow despite problems
    6D64-07A2

    Code:
    Ugetab made a code called Towns Always Able To Grow (DD60-07A2) which is for
    a different purpose, it allows the towns to grow if you don't have any souls
    available for the population.
    
    However it will not allow the population to keep expanding if there is some
    kind of problem, like when Teddy is lost in Bloodpool, etc.
    
    $03/852F F0 04       BEQ $04    [$8535]      A:0001 X:0002 Y:B423 P:envmxdIzC
    $03/8531 A9 00 00    LDA #$0000              A:0001 X:0002 Y:B423 P:envmxdIzC
    $03/8534 60          RTS                     A:0000 X:0002 Y:B423 P:envmxdIZC
    
    $03/8535 BD FA 9E    LDA $9EFA,x[$7F:9EFC]   A:0000 X:0002 Y:B423 P:envmxdIZC
    $03/8538 8D 05 7C    STA $7C05  [$7F:7C05]   A:000A X:0002 Y:B423 P:envmxdIzC
    $03/853B BF 2E 02 00 LDA $00022E,x[$00:0230] A:000A X:0002 Y:B423 P:envmxdIzC
    $03/853F 0A          ASL A                   A:0001 X:0002 Y:B423 P:envmxdIzC
    
    Through some testing I was able to determine $03:852F is where the game will
    halt progress if there is some kind of condition. Turning the BEQ into BRA
    will result in the town always building despite any problems.
    
    03852F:80 = 6D64-07A2 (Towns will grow despite problems)

    Towns start at highest civilization level
    D766-D70A

    Skip introduction when starting a town
    DD6B-DFDA

    Code:
    I decided to search for ways to start out with/increase the civilation level.
    
    After some RAM searches, I discovered $022E onward is where the civilization
    levels are stored.
    
    Initially I thought I could over-ride the check in real-time, ie: mid-way
    through the town's development. IE: enable code and higher civ buildings are
    built automagically.
    
    However when people are sent out to build the value is checked multiple times:
    
    $03/853B BF 2E 02 00 LDA $00022E,x[$00:0230] A:0000 X:0002 Y:B423 P:envmxdIZC
    $03/853F 0A          ASL A                   A:0001 X:0002 Y:B423 P:envmxdIzC
    $03/8540 18          CLC                     A:0002 X:0002 Y:B423 P:envmxdIzc
    $03/8541 69 02 00    ADC #$0002              A:0002 X:0002 Y:B423 P:envmxdIzc
    $03/8544 48          PHA                     A:0004 X:0002 Y:B423 P:envmxdIzc
    $03/8545 A0 00 00    LDY #$0000              A:0004 X:0002 Y:B423 P:envmxdIzc
    $03/8548 AD 05 7C    LDA $7C05  [$7F:7C05]   A:0004 X:0002 Y:0000 P:envmxdIZc
    
    $03/93B0 BF 2E 02 00 LDA $00022E,x[$00:0230] A:94C9 X:0002 Y:0000 P:eNvmxdIzc
    $03/93B4 3A          DEC A                   A:0001 X:0002 Y:0000 P:envmxdIzc
    $03/93B5 0A          ASL A                   A:0000 X:0002 Y:0000 P:envmxdIZc
    $03/93B6 0A          ASL A                   A:0000 X:0002 Y:0000 P:envmxdIZc
    $03/93B7 18          CLC                     A:0000 X:0002 Y:0000 P:envmxdIZc
    $03/93B8 63 01       ADC $01,s  [$00:01EA]   A:0000 X:0002 Y:0000 P:envmxdIZc
    
    $03/9532 BF 2E 02 00 LDA $00022E,x[$00:0230] A:0000 X:0002 Y:0006 P:envmxdIZc
    $03/9536 3A          DEC A                   A:0001 X:0002 Y:0006 P:envmxdIzc
    $03/9537 0A          ASL A                   A:0000 X:0002 Y:0006 P:envmxdIZc
    $03/9538 0A          ASL A                   A:0000 X:0002 Y:0006 P:envmxdIZc
    $03/9539 0A          ASL A                   A:0000 X:0002 Y:0006 P:envmxdIZc
    $03/953A 0A          ASL A                   A:0000 X:0002 Y:0006 P:envmxdIZc
    $03/953B 03 01       ORA $01,s  [$00:01EA]   A:0000 X:0002 Y:0006 P:envmxdIZc
    $03/953D 8D A1 7C    STA $7CA1  [$7F:7CA1]   A:0000 X:0002 Y:0006 P:envmxdIZc
    
    $03/8562 BF 2E 02 00 LDA $00022E,x[$00:0230] A:007F X:0002 Y:0020 P:envmxdIzC
    $03/8566 0A          ASL A                   A:0001 X:0002 Y:0020 P:envmxdIzC
    $03/8567 18          CLC                     A:0002 X:0002 Y:0020 P:envmxdIzc
    $03/8568 69 02 00    ADC #$0002              A:0002 X:0002 Y:0020 P:envmxdIzc
    $03/856B 8D 07 7C    STA $7C07  [$7F:7C07]   A:0004 X:0002 Y:0020 P:envmxdIzc
    
    $03/8425 BF 2E 02 00 LDA $00022E,x[$00:0230] A:0001 X:0002 Y:0007 P:envmxdIzc
    $03/8429 0A          ASL A                   A:0001 X:0002 Y:0007 P:envmxdIzc
    $03/842A 18          CLC                     A:0002 X:0002 Y:0007 P:envmxdIzc
    $03/842B 69 02 00    ADC #$0002              A:0002 X:0002 Y:0007 P:envmxdIzc
    $03/842E 48          PHA                     A:0004 X:0002 Y:0007 P:envmxdIzc
    $03/842F BD FA 9E    LDA $9EFA,x[$7F:9EFC]   A:0004 X:0002 Y:0007 P:envmxdIzc
    
    $03/848E BF 2E 02 00 LDA $00022E,x[$00:0230] A:FFFF X:0002 Y:0544 P:envmxdIzC
    $03/8492 0A          ASL A                   A:0001 X:0002 Y:0544 P:envmxdIzC
    $03/8493 18          CLC                     A:0002 X:0002 Y:0544 P:envmxdIzc
    $03/8494 69 02 00    ADC #$0002              A:0002 X:0002 Y:0544 P:envmxdIzc
    $03/8497 22 4E B5 03 JSL $03B54E[$03:B54E]   A:0004 X:0002 Y:0544 P:envmxdIzc
    
    
    Because it's checked so many times it would require a lot of GG codes. Then,
    I noticed the civilization levels are loaded when the towns are started, so
    I opted to target the routine that initializes those values:
    
    
    When starting a town, value initialization:
    $03/8085 A9 02 00    LDA #$0002              A:0001 X:0000 Y:000F P:envmxdIzc
    $03/8088 9F 1C 02 00 STA $00021C,x[$00:021C] A:0001 X:0000 Y:000F P:envmxdIzc
    $03/808C A9 01 00    LDA #$0001              A:0001 X:0000 Y:000F P:envmxdIzc
    $03/808F 9F 2E 02 00 STA $00022E,x[$00:022E] A:0001 X:0000 Y:000F P:envmxdIzc
    $03/8093 A9 01 00    LDA #$0001              A:0001 X:0000 Y:000F P:envmxdIzc
    $03/8096 8D 50 97    STA $9750  [$7F:9750]   A:0001 X:0000 Y:000F P:envmxdIzc
    $03/8099 22 1D 81 03 JSL $03811D[$03:811D]   A:0001 X:0000 Y:000F P:envmxdIzc
    
    The part at $03:8085 is loading the initial population, $03:808C is loading
    the civilation level, and $03:8093 from what I could tell controls whether the
    introduction text is displayed before the level starts.
    
    I made codes for the population but they ended up nearly useless as it gets
    immediately overwritten and the value doesn't hold. It does trigger population
    based events in the town but that's about it, I didn't think it was that useful.
    
    03808D:03 = D766-D70A (Towns start at highest civilization level)
    
    038094:00 = DD6B-DFDA (Skip introduction when starting a town)
    
    
    Also it should be possible to make a GG code that gives you a higher civ level
    increase, through modification of this routine here:
    
    This routine runs when the civilation level increases:
    $03/B700 2E 02 00    ROL $0002  [$7F:0002]   A:0002 X:0000 Y:810E P:envmxdIzc
    $03/B703 1A          INC A                   A:0002 X:0000 Y:810E P:envmxdIzc
    $03/B704 9F 2E 02 00 STA $00022E,x[$00:022E] A:0002 X:0000 Y:810E P:envmxdIzc


    No construction
    6D69-AF6A

    Code:
    I tried to make a code that always sends out 6 people to build, however I
    wasn't successful at it. I did however acheieve the opposite which might be
    useful in some cases.
    
    Loading number of guys to send out:
    $03/83E8 AD 05 7C    LDA $7C05  [$7F:7C05]   A:FFFF X:000E Y:01B3 P:envmxdIZC
    $03/83EB 60          RTS                     A:0004 X:000E Y:01B3 P:envmxdIzC
    
    $03/834C 08          PHP                     A:0004 X:000E Y:01B3 P:envmxdIzC
    $03/834D DA          PHX                     A:0004 X:000E Y:01B3 P:envmxdIzC
    $03/834E AE FB 7B    LDX $7BFB  [$7F:7BFB]   A:0004 X:000E Y:01B3 P:envmxdIzC
    $03/8351 9D 6B 9F    STA $9F6B,x[$7F:9F6B]   A:0004 X:0000 Y:01B3 P:envmxdIZC
    $03/8354 FA          PLX                     A:0004 X:0000 Y:01B3 P:envmxdIZC
    $03/8355 28          PLP                     A:0004 X:000E Y:01B3 P:envmxdIzC
    $03/8356 F0 3A       BEQ $3A    [$8392]      A:0004 X:000E Y:01B3 P:envmxdIzC
    $03/8358 A9 01 00    LDA #$0001              A:0004 X:000E Y:01B3 P:envmxdIzC
    
    At $03:8356 it will check if any builders are left, if not it will branch to
    $8392. By changing the BEQ to BRA it will result in never building which may
    be useful to someone.
    
    038356:80 = 6D69-AF6A (No construction)


    Time bonus worth 4x as much
    D0CF-6FAD

    End level bonus of 10000
    FDC5-6DAD

    Extra life bonus worth 5000
    D9C0-670D

    End level bonus of 99990 (max score)
    DD60-AF6F

    Code:
    This routine runs when adding up the time bonus at the end of each level:
    $00/A20D A5 E6       LDA $E6    [$00:00E6]   A:A20C X:0BA0 Y:0048 P:eNvmxdIzc
    $00/A20F F0 24       BEQ $24    [$A235]      A:0176 X:0BA0 Y:0048 P:envmxdIzc
    $00/A211 A9 08 00    LDA #$0008              A:0176 X:0BA0 Y:0048 P:envmxdIzc
    $00/A214 02 00       COP #$00                A:0008 X:0BA0 Y:0048 P:envmxdIzc
    *** COP
    $00/8526 08          PHP                     A:0008 X:0BA0 Y:0048 P:envmxdIzc
    $00/8527 E2 20       SEP #$20                A:0008 X:0BA0 Y:0048 P:envmxdIzc
    $00/8529 8F 5A 03 00 STA $00035A[$00:035A]   A:0008 X:0BA0 Y:0048 P:envMxdIzc
    $00/852D 28          PLP                     A:0008 X:0BA0 Y:0048 P:envMxdIzc
    $00/852E 40          RTI                     A:0008 X:0BA0 Y:0048 P:envmxdIzc
    $00/A216 A9 01 00    LDA #$0001              A:0008 X:0BA0 Y:0048 P:envmxdIzc
    $00/A219 20 3C 87    JSR $873C  [$00:873C]   A:0001 X:0BA0 Y:0048 P:envmxdIzc
    
    $00/873C 08          PHP                     A:0001 X:0BA0 Y:0048 P:envmxdIzc
    $00/873D F8          SED                     A:0001 X:0BA0 Y:0048 P:envmxdIzc
    $00/873E C2 20       REP #$20                A:0001 X:0BA0 Y:0048 P:envmxDIzc
    $00/8740 18          CLC                     A:0001 X:0BA0 Y:0048 P:envmxDIzc
    $00/8741 65 1F       ADC $1F    [$00:001F]   A:0001 X:0BA0 Y:0048 P:envmxDIzc
    $00/8743 85 1F       STA $1F    [$00:001F]   A:0275 X:0BA0 Y:0048 P:envmxDIzc
    $00/8745 90 05       BCC $05    [$874C]      A:0275 X:0BA0 Y:0048 P:envmxDIzc
    $00/874C 28          PLP                     A:0275 X:0BA0 Y:0048 P:envmxDIzc
    $00/874D 60          RTS                     A:0275 X:0BA0 Y:0048 P:envmxdIzc
    
    The part at $00:A216 is how much to adjust the score by. Increasing the value
    loaded will result in a higher time bonus.
    
    00A217:04 = D0CF-6FAD (Time bonus worth 4x)
    
    Bonus points for lives are awarded here:
    $00/A24B A9 00 01    LDA #$0100              A:0022 X:0BA0 Y:0048 P:envmxdIzc
    $00/A24E 20 3C 87    JSR $873C  [$00:873C]   A:0100 X:0BA0 Y:0048 P:envmxdIzc
    
    00A24D:05 = D9C0-670D (Extra life bonus worth 5000)
    
    The last life/end level bonus is awarded here:
    $00/A271 A9 00 01    LDA #$0100              A:0022 X:0BA0 Y:0048 P:envmxdIzc
    $00/A274 20 3C 87    JSR $873C  [$00:873C]   A:0100 X:0BA0 Y:0048 P:envmxdIzc
    
    00A273:10 = FDC5-6DAD (End level bonus worth 10000)
    
    
    Also, looking here there is an over-ride when the score maxes out at 99990:
    
    $00/8741 65 1F       ADC $1F    [$00:001F]   A:0405 X:0BA0 Y:0048 P:envmxDIzc
    $00/8743 85 1F       STA $1F    [$00:001F]   A:0405 X:0BA0 Y:0048 P:envmxDIzc
    $00/8745 90 05       BCC $05    [$874C]      A:0405 X:0BA0 Y:0048 P:envmxDIzc
    $00/8747 A9 99 99    LDA #$9999              A:0405 X:0BA0 Y:0048 P:envmxDIzc
    $00/874A 85 1F       STA $1F    [$00:001F]   A:0405 X:0BA0 Y:0048 P:envmxDIzc
    $00/874C 28          PLP                     A:0405 X:0BA0 Y:0048 P:envmxDIzc
    $00/874D 60          RTS                     A:0405 X:0BA0 Y:0048 P:envmxDIzc
    
    By zeroing the branch value at $00:8745 it will automatically give a score
    of 99990:
    
    008746:00 = DD60-AF6F (Bonus is max score of 99990)
    THE INTERESTING TABLE OF VALUES

    Regarding the table mentioned above, I started to notice a pattern of FF seperating the 4-byte values of the table so I went ahead and broke it down even further as such. Over 700 bytes of data in a nice, structured format.

    It might come in useful to someone. I am sure a lot more Game Genie codes can be created based on modifications to this table in ROM. Likely enemy behaviours etc are in here as well.

    For the expanded breakdown of the table at $06:8000-82BE please see below:
    Spoiler Alert! Click to view...

    Code:
    $06:8000:
    BF
    (some kind of index/TOC below?)
    02 30
    00 35 
    00 3A 
    00 5B 
    00 88 
    00 BD 
    00 C2 
    00 C7 
    00 CC 
    00 E1 
    00 FE 
    00 3F 
    01 68 
    01 A5 
    01 DE 
    01 E7 
    01 EC 
    01 31 
    02 52 
    02 73 
    02 78 
    02 7D 
    02 9E 
    02 04 
    00 00 
    00 
    FF 
    
    <table begins here>
    
    $06:8035:
    16 00 02 05 
    FF 
    00 00 02 00 
    00 00 02 00 
    00 00 02 00 
    00 00 02 00 
    00 00 02 00 
    01 04 02 00 
    02 04 02 00 
    03 04 02 00
    FF 
    
    $06:805B: (Table for jumping while running)
    36 01 01 FB 
    36 02 01 FC 
    36 03 01 FD 
    36 03 01 FE 
    36 05 01 FF 
    36 01 01 00 
    36 05 01 01 
    36 03 01 02 
    36 03 01 03 
    36 02 01 04 
    36 01 01 05 
    FF 
    
    $06:8088: (Table for Jumping while standing still)
    06 00 00 FA 
    06 01 00 FB 
    06 01 00 FC 
    06 02 00 FD 
    06 03 00 FE 
    06 06 00 FF 
    06 01 00 00 
    06 06 00 01 
    06 03 00 02 
    06 02 00 03 
    06 01 00 04 
    06 01 00 05 
    06 00 00 06 
    FF 
    
    16 00 00 05 
    FF 
    07 03 00 00 
    FF 
    16 00 00 05 
    FF 
    0B 06 00 00 
    0C 00 00 00 
    0D 00 00 00 
    0E 00 00 00 
    0F 09 00 00 
    FF 
    07 01 00 00 
    05 03 00 00 
    18 03 00 00 
    13 00 00 00 
    14 00 00 00 
    15 00 00 00 
    08 06 00 00 
    FF 
    
    09 00 00 FA 
    09 01 00 FB 
    09 01 00 FC 
    09 02 00 FD 
    09 03 00 FE 
    09 06 00 FF 
    09 01 00 00 
    11 00 00 01 
    10 00 00 01 
    12 00 00 01 
    0A 03 00 01 
    0A 03 00 02 
    0A 02 00 03 
    0A 01 00 04 
    0A 01 00 05 
    0A 00 00 06 
    FF 
    
    $06:813F:
    17 00 FE FC 
    17 00 FE FD 
    17 00 FE FE 
    17 00 FE FF 
    17 01 00 00 
    17 00 FE 01 
    17 00 FE 02 
    17 00 FE 03 
    17 00 FE 04 
    17 62 FE 06 
    FF 
    
    $06:8168:
    36 01 01 FB 
    36 02 01 FC
    36 03 01 FD 
    36 03 01 FE 
    36 00 01 FF 
    16 04 01 FF
    16 01 01 00 
    19 00 01 01 
    1A 00 01 01 
    1B 00 01 01 
    1C 02 01 01 
    1C 03 01 02 
    1C 03 01 03 
    1C 02 01 04
    1C 01 01 05 
    FF
    
    $06:81A5:
    36 01 01 FB 
    36 02 01 FC 
    36 03 01 FD 
    36 03 01 FE 
    36 05 01 FF 
    36 01 01 00 
    36 05 01 01 
    36 00 01 02 
    16 02 01 02 
    16 03 01 03 
    19 00 01 04 
    1A 00 01 04 
    1B 00 01 04 
    1C 01 01 05 
    FF 
    05 04 00 00 
    1D 3F 00 00 
    FF 
    1E 00 00 00 
    FF 
    
    24 02 00 00 
    25 02 00 00 
    26 02 00 00 
    27 02 00 00 
    28 01 00 00 
    29 01 00 00 
    2A 01 00 00 
    2B 01 00 00 
    28 01 00 00 
    29 01 00 00 
    2A 01 00 00 
    2B 01 00 00 
    2C 02 00 00 
    2D 02 00 00 
    2E 02 00 00 
    2F 02 00 00 
    1E 1F 00 00 
    FF 
    
    1E 07 00 00 
    1E 07 00 00 
    1E 07 00 00 
    1E 09 00 00 
    1E 02 00 00 
    1E 02 00 00 
    1E 02 00 00 
    1E 09 00 00 
    FF 
    
    1F 01 00 05 
    20 01 00 05 
    34 01 00 05 
    35 01 00 05 
    1F 01 00 05 
    33 01 00 05 
    21 01 00 05 
    32 01 00 05 
    FF 
    30 1F 08 00 
    FF 
    31 1F 08 00 
    FF 
    27 01 00 00 
    28 01 00 00 
    29 01 00 00 
    2A 01 00 00 
    2B 01 00 00 
    2C 01 00 00 
    2D 01 00 00 
    2E 01 00 00 
    FF 
    
    1F 01 00 00 
    20 01 00 00 
    34 01 00 00 
    35 01 00 00 
    1F 01 00 00 
    33 01 00 00 
    21 01 00 00 
    32 01 00 00 
    
    $06:82BE
    FF
    
    <end of table>

    "One man's garbage is another man-person's good un-garbage." -- Ricky from Trailer Park Boys

    Comment

    Working...
    X