Requirements:
-Python 3 to run the Injector
-A Mario Kart 64 (USA/NTSC) ROM to patch
-An Expansion Pak and flash drive to play on console
This utility will inject just about any Gameshark codes directly into a Mario Kart 64 (USA/NTSC) rom. During boot, the Gameshark code engine is copied from the ROM into the Expansion Pak RAM, so if you are playing on console, you will need an Expansion Pak. Unlike a real Gameshark, which is limited to a few hundred lines of code, this injector allows you to inject nearly unlimited lines of Gameshark codes, so go wild and patch in as many codes as you like. Like an actual Gameshark, the engine hooks into the game's exception handler. It took me a long time to figuring out how to get all the pieces of this injector to work, so I hope you enjoy it.
Get yourself some Mario Kart 64 Gameshark codes:
- https://gamehacking.org/game/20598
- http://www.bsfree.org/?s=18&d=8&g=7615
- https://www.kodewerx.org/forum/viewtopic.php?f=18&t=2763
Put your Gameshark codes into "gameshark_code.txt"
Copy a Mario Kart 64 (USA/NTSC) ROM into this directory and name it "Mario Kart 64.z64"
Open a terminal and type the following (be sure to give your patched ROM a name)...
python MK64_Gameshark_Code_Injector.py name_of_patched_rom.z64
Open your newly patched rom in your favorite emulator or copy to a flash drive for console and enjoy playing!
Supported Gameshark code types:
80, 81, D0, D1, D2, D3
Wondering how Gameshark codes work? Check out the following links:
EnHacklopedia - https://doc.kodewerx.org/hacking_n64.html
The Secrets of Processional Gameshark Hacking - http://viper.shadowflareindustries.com/?file=hackv500c.html&cat=hax0r
Changelog
-March 19, 2020 - v1.2 - Optimized the Gameshark code engine by deleting a few unnecessary NOP instructions. Now it should be ~25% more processor and memory efficient.
-March 9, 2020 - v1.1 - A lot of under the hood changes, mostly to try to generalize the code to run on other games. Still needs work so still only compatible with Mario Kart 64. These changes might fix bugs from v1.0
-Jan 6, 2020 - v1.0 - Initial Release