Announcement

Collapse
No announcement yet.

NES - MagMax (NTSC)

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

  • NES - MagMax (NTSC)

    Both Players Start With 99 Lives
    LVKGKLZA

    Full powerups on one item pickup
    OZETVZSX
    IAETNZSP

    Invincibility v1 (Keep powerups when hit)
    LANVEXPE

    Invincibility v2 (Lose powerups and cannot die when hit w/no powerups)
    AAOVKXNY

    Invincibility v3 (Lose powerups and get full powerups when hit w/ no powerups)
    IAOVKXNY

    Glitchy powerups v1 (Random glitch effects)
    PYETNZSO

    Glitchy powerups v2 (Different random glitch effects)
    XPETNZSP

    Increase difficulty (One hit kills player)
    EINTNZAP



    CODE DEVELOPMENT NOTES (for those interested):
    Spoiler Alert! Click to view...

    I figured I'd give a bit of an explanation of my procedures for anyone interested in how I created these codes. This description is aimed more towards beginners who might want to learn how to create their own codes.

    I use FCEUX v2.2.2 in order to develop NES codes. It's a debugging emulator that allows viewing RAM, code traces, and much, much more. Great piece of software!

    Starting off, to make a 99 lives code, I grabbed Galoob's code:
    "Both Players Start With 9 Lives - AEKGKLZE"

    Using FCEUX to decode Galoob's code AEKGKLZE we get CBC4:02:08.

    Looking at the dissassembly of the ROM code in this area, we can see this is a fairly simple routine to exploit:

    Code:
    00:CBC3:A9 02     LDA #$02        # Load a value of #$02 into accumulator
    00:CBC5:85 58     STA $0058       # Store at RAM address $58 (P1 lives)
    00:CBC7:85 59     STA $0059       # Store at RAM address $59 (P2 lives)
    This is where the game loads a value of #$02 (three lives) and stores it at locations $58 and $59, which represent the P1 and P2 spare lives. The Galoob code changes the value at $CBC4 to #$08, which represents 9 lives.

    I simply change this value to #$63 (99 in decimal), in order to give both players 99 lives:

    Code:
       Both Players Start With 99 Lives
       LVKGKLZA
       CBC4:02:63  (change #$02 to #$63)
    There's already an Infinite Lives code, however I felt like doing this as an exercise to warm up for my main goal: creating some Invincibility codes.

    Turning my attention to powerups, I did a few RAM searches as I played the game and noticed that RAM address $8B would change when picking up a powerup or getting hit.

    There are four possible values for powerup levels:
    Code:
       00 = No powerups
       02 = Partial powerup - legs only
       03 = Partial powerup - chest only ***
       04 = Partial powerup - have legs and chest
       05 = Full powerup - legs, chest and gun
    *** NOTE: This writeup was done several months after creating these codes. I apologize if any of these values are inaccurately described. I'm guessing on 03.

    I set a breakpoint on that address and traced out the following code responsible for loading a new powerup value when picking up an item.

    Code:
    00:EA06:A5 95     LDA $0095       # Get the value stored at $95 (pending powerup)
    00:EA08:85 8B     STA $008B       # Store it at $8B (current powerup level)
    To make a full powerup on 1 pickup code, we can force this value to read as #$05 every time. We need to change two bytes, $EA06 from A5 to A9 (LDA $address to LDA #$value) and then $EA07 from 95 to 05 (RAM address $95 to direct value #$05):

    Code:
       Full powerups on one item pickup
       OZETVZSX
       IAETNZSP
       EA06:A5:A9  (change 'LDA $address' to 'LDA #$value')
       EA07:95:05  (change $95 to #$05)
    This way the code at $EA06 will always load a value of #$05 whenever a powerup is picked up.

    NOTE: Unfortunately I couldn't find a RAM address that reliably always has #$05 stored in it, or I could have made it a one-code-code. Unfortunately I had to do it the 'hard' way and change two bytes to make it work reliably.

    That being said, we can also use this to create a couple fun Glitchy Powerups codes. When something other than the valid powerup values are loaded, it makes for some interesting effects.

    By changing the load adddress to another value in RAM that holds a random value, we can cause some cool glitches when picking up powerups. I had good luck with $79 and $92, both producing different effects. Lots of fun!

    Code:
       Glitchy powerups v1 (Random glitch effects)
       PYETNZSO
       EA07:95:79  (change $95 to $79)
    
       Glitchy powerups v2 (Different random glitch effects)
       XPETNZSP
       EA07:95:92  (change $95 to $92)
    Now it was time to make an Invincibility code. I set a breakpoint for $8B again, and traced out the code that causes the player to lose powerups (hereafter called "powerdowns"), I found a couple ways to exploit it, allowing for three versions of an Invincibility code that are all useful depending on player's preference.

    Code:
    00:EA61:E8        INX                    # Pointer for which powerdown to use
    00:EA62:A9 E0     LDA #$E0
    00:EA64:8D 02 02  STA $0202
    00:EA67:A9 08     LDA #$08
    00:EA69:8D 00 02  STA $0200              # .... (didn't analyze this part)
    00:EA6C:A9 00     LDA #$00
    00:EA6E:8D 03 02  STA $0203
    00:EA71:8D 04 02  STA $0204
    00:EA74:BD 1C EA  LDA $EA1C,X            # Load the value at #EA1C + X
    00:EA77:10 09     BPL $EA82              # If the value is a powerdown, apply it
    00:EA79:A9 05     LDA #$05               # Otherwise value is #$FF. Kill player!
    00:EA7B:85 90     STA $0090
    00:EA7D:A9 00     LDA #$00               # Another indicator that is bad for poor MagMax
    00:EA7F:85 8F     STA $008F
    00:EA81:60        RTS                    # Goodbye MagMax!
    00:EA82:85 8B     STA $008B              # Store the 'powerdown' value at $8B
    00:EA84:60        RTS                    # And continue playing
    
    Powerdown table stored at $EA1C:
    00:EA1C:FF   (death value, read when hit at no powerup)
    00:EA1D:00   (read when hit at level 1 powerup above ground? legs only)     
    00:EA1E:00   (read when hit at level 1 powerup underground? chest only)     
    00:EA1F:02        
    00:EA20:00   (read when 8B = 04 and player gets hit)             
    00:EA21:04        
    00:EA22:FF        
    00:EA23:00
    00:EA24:00
    00:EA25:01 
    00:EA26:00
    00:EA27:01
    There is a powerdown table stored at $EA1C, which is read by the code at $EA74 in order to determine what the next powerdown is. If the value read is #$FF, the "end of the line" has been reached and the game knows the player has been hit with no powerups, and ends the
    player's life.

    By changing the code at $EA77, we can affect how the powerdown is handled. Changing the BPL (branch on plus) to a BNE (branch not equal) ensures the player is killed in one hit no matter what power level they are at, increasing difficulty. I won't use this code, but I always try to go in both directions when I'm making codes, because someone might want it.

    Code:
       Increase difficulty (One hit kills)
       EINTNZAP
       EA77:10:D0  (change BPL to BNE)
    By changing the value at $EA78, we can make an invincibility code that prevents any kind of change to the powerup value. Simply changing the #$09 to a #$0B will cause the BPL to skip all the way to the RTS at $EA84, allowing the player to keep powerups when hit.

    Code:
       Invincibility v1 (Keep powerups when hit)
       LANVEXPE
       EA78:09:0B   (change #$09 to #$0B in order to increase # bytes skipped in branch)
    By changing the value at $EA1C, we can prevent the game from killing the player. If we change the value #$FF to #$00, the "no powerups" state becomes the "end of the line", allowing the power to stay alive when hit with no powerups.

    Code:
       Invincibility v2 (Lose powerups and cannot die when hit w/no powerups)
       AAOVKXNY
       EA1C:FF:00  (change #$FF to #$00 to prevent player death sequence)
    Finally, we can also create a code that will cycle back to full power when hit with no powerups. All we have to do is change the value from #$FF to #$05.

    Code:
       Invincibility v3 (Lose powerups and get full powerups when hit w/ no powerups)
       IAOVKXNY
       EA1C:FF:05  (change #$FF to #$05 to give player full powerups)


    Codes have been tested on a real GG and NES, that was actually the whole point of making them. Just bought the cart recently and I had to wrap it (my way -- with cheats).

    Enjoy!

    First post on this forum, I have some more codes to share as well and look forward to creating and sharing many more! Cheers!
    "One man's garbage is another man-person's good un-garbage." -- Ricky from Trailer Park Boys

  • #2
    Good job, Keep up
    Let's be together !!

    Comment

    Working...
    X