Alex

alex-free.github.io

SuperMario64GameSharkWriter

by Alex Free

SM64GSW writes GameShark/Xploder64 codes directly into a Super Mario 64 ROM file and patches the CRC check allowing it to be played on real hardware (via a flash cart like the ED64Plus) or just about any emulator.

SM64GSW performs Messiaen64’s ROM hex editing methods written at Patching GameShark Codes and Getting Rid Of The Checksum Trap in software automatically so you don’t have to hex edit your SM64 ROM manually. You want to use the ROM file most likely named Super_Mario_64__U_____.z64 with this software, although all other regional releases of SM64 in the the .z64 rom file type also work.

Table Of Contents

Downloads

Version 2.0 (3/29/2023)

About previous versions

Changes:

Usage

The first argument is required, it is the .rom file to write codes into. The second argument is optional, it can be a .txt file that contains codes, line by line. If you don’t provide the second argument, SM64GSW drops into a shell interface that allows you to type in as many codes as you want individually.

Get Codes From A TXT File

An example .txt file named gs.txt is available in each SM64GSW release to show the simple format used.

Type Codes

Supported GameShark Code Criteria

The supported codes types are 80, A0, F0, 81, A1, and 2A. Code types are defined by the first 2 hexadecimal digits of a code. For example, in the level select code A032D58C 0001 A0 is the code type.

SM64GSW will not write incompatible code types to the ROM, and it will tell you if this happens. In a multi-line code, this could happen after the first line, which would mean only part of the multi-line code was written to ROM possibly making it unusable. In such a case, you should replace the ROM file if you don’t get the results you want.

There is a work in progress Known Working Codes list.

According to the original Messiaen64 method, only codes within the supported RAM range of 80246000-80333000 will work, as in the 3rd-8th digits of a code must be a hexadecimal value in the range of 246000-333000. I haven’t really found this to be the case, some codes outside of this range do work. So SM64GSW only displays a warning if a code modifies RAM outside of this address range.

Besides the above limitations, some codes may not work as they normally do so you’ll need to just test them out.

Using SM64GSW Edited ROMs

1964, Mupen64, and Mupen64Plus will run the resulting edited ROMs as normal. Other emulators may display error messages on loading the ROM but still work.

Nemu64 0.8 will display an error message “Unknown bootcode. Chances that this game won’t work are high”. Project 64 1.6 will display two error messages. “Unknown Cic Chip” and “Unhandled CicChip(-1) in first DMA”. Project 64 v3.0 shows no such messages. Other emulators were not tested, but any really should work.

Flash carts on real N64 hardware also work just fine! This has been tested on an ED64Plus.

Building From Source

Download the source, cd into it, and type make.

License

SM64GSW is released under the 3-BSD license, see the file license.txt in each release for more info.