Super Mario 64 Hacking Part 11: Making GameShark Codes Using the SM64 Decompilation

Опубликовано: 19 Январь 2025
на канале: yoshielectron
1,558
79

In the past I’ve used cheat code cartridges to make GameShark codes and more recently using various emulators, which involved me looking at the game’s RAM trying to understand how the variables and functions work. But thanks to the SM64 Decompilation, which converts the raw game back into C code, it’s now easier to make codes, as demonstrated in this video in which I make a code to stop Mario performing triple jumps.

The SM64 decompilation can be found at:

https://github.com/n64decomp/sm64

Since making the code I found that sometimes Mario will still do a triple jump. So I looked again at ACT_TRIPLE_JUMP in the SM64 decompilation and found in mario_actions_moving.c a similar check to what was discussed in the video

Looking at the results again from searching for 0x882 using Project64, one of the other results is 0x80253026. If we look at the commands starting at 0x80253004 we can see the familiar code of checking Mario’s velocity and setting his action to ACT_TRIPLE_JUMP. Thus we can use a similar approach of modifying the branch that checks if Mario’s velocity is greater than 20.0. We can change the branch at 0x80253018, modifying the value from 0x45 to 0x10 as we did with the other branch.

So the final GameShark code is:

NTSC

80253018 0010
802643A4 0010

Notes: when I speak out a value digit-by-digit it’s a hex value
I used Project64 V2.4.0 as that was what I happened to have installed on my PC. The most recent version of Project64 can be downloaded from:

https://www.pj64-emu.com/

Please check out my site for many SM64 codes:

https://sites.google.com/site/jamessk...

Produced using PowerDirector 18.

Images/videos
pixabay
Project64/OBS
Chrome/OBS

Music
YouTube Audio Library:
MydNyte (Noir Et Blanc Vie)
FynestLyk (Noir Et Blanc Vie)
Good Days (Yung Logos)

Floating Point to Hex Converter
gregstoll.com/~gregstoll/floattohex/

#yoshielectron #sm64 #gameshark