by Alex Free.
SuperMario64GameSharkWriter is an open source 3-BSD command line program written in C that writes GameShark/Xploder64 codes into a Super Mario 64 USA ROM (must be .z64/big endian format), and modifies the CRC check if neccesary (making this an alternatie to the CHKSUM64 program) allowing edited ROMs to boot in emulators. Unlike the old CHKSUM64 program the ROM will work in Mupen64Plus and many other emulators.
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. The .z64 rom file type is big endian, which is required.
GitHub || HomePage
Windows 95-Windows 10
View all releases.
The win32 version works on Windows 95 OSR 2.5 and newer (Requires Internet Explorer 4.0 installed if using Windows 95). There are Linux versions for x86 32 bit and x86_64 64 bit which should work on most distros. Other Operating Systems that use little endian CPUs (such as ARM, x86, x86_64) can be compiled for from source.
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.
There is a work in progress Known Working Codes list. The Supported RAM range is 80246000-80333000. The 3rd-8th digits of a code must be a hexadecimal value in the range of 246000-333000 to work. Not all N64 GameShark/Xploder64 code types are supported. This is due to certain code types not translating into just hex writes for various reasons, such as codes that:
Besides the above limitations, some codes may not work as they normally do so you'll need to just test them out.
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". Other emulators were not tested, but any really should work. Have no idea about a real console.
This is a command line program, so on Windows you can open command.com or cmd.exe to execute sm64gsw.exe. On other Operating Systems use the Terminal. There are 3 main features.
Note that if any file paths given to SM64GSW contain any spaces you must escape (\) the spaces as done in the examples below.
This functionallity can be used as an alternative to the CHKSUM64 program. CHKSUM64 will try to correct the CIC check but the ROMs it modifies do not load in all emulators, most notably Mupen64Plus. The method SM64GSW uses will however work in Mupen64Plus and all the emulators CHKSUM64 worked in as well. So if you want to bypass the CIC check in your ROM file and not write any codes, use -m as your first argument, and the ROM file path as the second argument. Note that this function is automatically performed if neccesary when GameShark codes that cause the CIC Check to fail are written to a ROM file by SM64GSW. So you do not need to do this if you are writing codes to a ROM.
sm64gsw -m rom.z64
Bypass CIC check in the file "rom.z64" found in the current directory.
sm64gsw -m /path\ to/rom.z64
Bypass CIC check in the file "/path to/rom.z64".
SM64GSW can write GameShark codes listed in a txt file line by line. To do this, you have to provide 3 total arguments to run SM64GSW in txt file mode. The first argument is the ROM file path, the second is the TXT file path. The TXT file should simply list each code line by line. An example of this is the "gs.txt" file within this release.
sm64gsw rom.z64 codes.txt
Write all codes found in the "codes.txt" file to the ROM file "rom.z64", both found in the current directory.
sm64gsw ex\ am\ ple/rom.z64 ex\ am\ ple/codes.txt
Write all codes found in the "ex am ple/codes.txt" file to the ROM file "ex\ am\ ple/rom.z64".
There is an interface to type codes into a ROM as well. To do this, just execute sm64gsw with the ROM file path as the only argument. For multi-line codes, you can enter each code line by line, one at a time.
Load the ROM file "rom.z64" in the current directory to type codes to write.
sm64gsw /full/file\ path/to/rom.z64
Load the ROM file "/full/file path/rom.z64" to type codes to write.
Version 1.2 - 1/22/20201
Version 1.1 - 1/13/2021
Version 1.0.1 - 10/8/2020
This software is written to run on any ANSI-C platform with a little endian CPU. Builds for Linux and Windows are available. Other Unix-like Operating Systems should also work (including Intel/ARM Macs). Really, this software is as easy to compile as
gcc sm64gsw.c -o sm64gsw. A GNU Makefile is provided that will do just that by default, when executing
make. There are some additional rules to make various tasks easier to accomplish listed below.
Compile a static 32 bit Linux build.
Compile a static 64 bit Linux build.
Cross compile using the i686-w64-mingw32-gcc compiler for Windows 95 OSR 2.5 and above (requires Internet Explorer 4.0 to be installed if running on Windows 95).
Cross compile using the x86_64-w64-mingw32-gcc compiler for any 64 bit Windows.
This license is distributed with SuperMario64GameSharkWriter.
BSD 3-Clause License Copyright (c) 2021, Alex Free All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.