Mario Builder 64 is a Super Mario 64 ROM hack that allows you to create custom levels in-game. Mario Builder 64 was built on top of the source code of SM64: Beyond the Cursed Mirror and uses the HackerSM64 repo as a base. Level editor-specific code can be found in mb64.c
and its counterparts. Some code is unsightly and abominable, so exercise caution to those who view it.
When building from a freshly cloned repo, the baserom extractor will overwrite a lot of assets. To fix this, simply discard all the extra changes that appear in your source control tab.
AFTER CLONING THE REPO, CHECK OUT THE include/config
FOLDER BEFORE ANYTHING ELSE! THERE'S A LOT OF STUFF IN THIS REPO THAT CAN BE TOGGLED THERE.
This repo requires BOTH a US ROM and a JP ROM in order to build. Place baserom.us.z64 in the repo as usual and ALSO include baserom.jp.z64.
This repo needs gcc in order to be able to build it. To install it, run sudo apt install gcc-mips-linux-gnu
This is a fork of the ultrasm64 repo by CrashOveride which includes the following commonly used patches (patches marked with *
are toggleable in the config files):
Credits
LOAD_MIO0_TEXTURE
macro and moral supportThanks to Frame#5375 and AloXado320 for also helping with silhouette stuff
Lighting Engine by Wiseguy
Puppylights
available, which is a more lightweight, but limited lighting library intended to be used to modify existing light properties. You can look at puppylights.c
to find out how to use it.Puppycam
config/config_camera.h
. *Collision:
Common Hack Changes:
Hacker QOL:
config/config_menu.h
, or disable it entirely. *config/config_game.h
.file_select.c
and ingame_menu.c
obj_set_model
and obj_has_model
obj_get_model_id
(by Arceveti)include/object_fields.h
for more info on this. (By MrComit)actors/group0.c
in behavior_data.c
config/config_rom.h
to make it simplergEmulator
variable to detect console or specific emulators and emulator versionsconfig/config_debug.h
in order to boot straight into it, so you can quickly test the level you're working on. *force
parameter. Activating this doesn't REQUIRE you to set force
for every surface: If you don't set, it will default to 0x0000 rather than crashing. Increases RAM usage of collision. *"@XXXXXXXX[YOUR TEXT]@--------"
(By ArcticJaguar725)
"@FF0000FFRED @00FF00FFGREEN @0000FFFFBLUE @FFFFFF00INVISIBLE @--------NORMAL"
"@--------"
, but text will need to be recolored each time it scrolls in a dialog box, or the custom color will reset.config/config_debug.h
has VISUAL_DEBUG which can be turned on to enable this feature.Other Bugfixes:
Neat Misc. Changes:
Instant Input patch by Wiseguy (Removes all input lag caused by plugins supporting framebuffer)
gEmulator
variable to check for console when doing your framebuffer effects.Widescreen (16:9) support toggleable by pressing L
in the pause menu. *
S2DEX engine by someone2639! To use it, compile with make TEXT_ENGINE=s2dex_text_engine
or just set TEXT_ENGINE
to s2dex_text_engine
in the makefile.
ia8 (64x64) coins, the vanilla coin texture is upgraded to accomodate. *
ia8 (64x64) 30 FPS coins (Textures by InTheBeef, cleaned up by Arceveti). *
Floombas! Simply just retextured goombas with customizable behaviors (does not overwrite standard goombas). *
HD texture support for intro splash screen (with floombas if enabled). *
Mario's silhouette is shown when behind most surfaces (By Frame#5375, Axollyon, AloXado320, Wiseguy, Arceveti) *
Skybox size modifier. You can have 2x, 3x and 4x size skyboxes (you can select the skybox size in config/config_graphics.h
.) Please note that this might affect console performance, especially 4x mode. 2x or 3x mode is recommended if aiming for console. By CowQuack *
You can set the black border size to different values for console and emulator. It's set to 0 by default for both. *
This repo supports a much better implementation of reverb over vanilla's fake echo reverb. Great for caves or eerie levels, as well as just a better audio experience in general. See audio/synthesis.c
for more details and configuration info. (By ArcticJaguar725) *
Fazana's "puppyprint" text engine. *
print_small_text
to print normal text. The two last params are aligment and how many characters to print (-1 means PRINT_ALL).render_multi_image
to draw large texture rectangles consisting of multiple images on the screen.puppyprint.c
Wiseguy's Farcall TLB mapping allows to store executable code inside uncompressed segments, that can be loaded and ran as needed, instead of it having to be loaded at all times. See farcall.h
in the include folder for instructions and details.
Red Coin Stars now support up to 99 red coins! In addition, multi-area red coin missions can now be created by setting the 2nd behavior paramater of the red coin star to the number of reds required for the star to spawn.
This repo contains a full decompilation of Super Mario 64 (J), (U), (E), and (SH).
Naming and documentation of the source code and data structures are in progress.
It has been edited to allow for the usage of the final "N64 OS" library, version 2.0L
Shindou Rumble Pak code is on for all regions.
Targeting the iQue Player is supported.
Saving to 32kbyte/256kbit SRAM is supported.
Newer compression options are supported.
UNFLoader (flashcart USB library) is supported, allowing for debugging on EverDrive/64Drive.
It has been patched with someone2639's shiftable segments patch
Wiseguy's instant input patch has been added to allow for less input lag on emulation (Does not affect console) This does mean that any framebuffer effects will have to be done on buffer 0 if targeting emulators
Automatic console and emulator detection: Use the gEmulator
variable to wrap your code in an emulator check.
Separate defines for emulator and console black border height.
Getting HVQM FMV support to work with the game is WIP.
Requirements are the same as regular SM64, however a GCC MIPS cross compiler is also required. If you're on Debian-like Linux, you can use the gcc-mips-linux-gnu
package. The toolchain that comes with my SDK is also supported.
BinPNG (the CI texture converter) requires some python3 dependencies. Use pip to install them.
pip install pypng bitstring
The repository supports UNFLoader for debugging.
To build with UNF, run make with UNF=1
.
Further instructions can be found at the official repository
NOTE: Closing the UNFLoader window will result in your game eventually hanging due to lacking a USB device to send messages to, so beware of that
The repository supports SRAM in addition to EEPROM. The standard save data functions are #ifdef'd to accommedate this.
To build with SRAM support, run make with SAVETYPE=sram
.
I may attempt FlashRAM in the future.
The repository supports targeting the iQue Player in addition to the N64. The iQue libultra is NOT compatible with N64 in many ways, so it is currently NOT possible to have one build for both consoles.
To target iQue, run make with the CONSOLE=bb
argument.
The repo also supports RNC (Rob Northen Compression). RNC has two methods.
Method 1 is designed to compress as small as possible, while method 2 is designed so that decompression is as fast as possible.
Method 1 is the current default, and is the best all-rounder in terms of speed and ratio.
Both methods are fast. Method 1 has better compression than 2, so I suggest using method 1 if using RNC.
To switch to RNC, run make with either COMPRESS=rnc1
or COMPRESS=rnc2
, depending on preferred method.
The repository also supports using DEFLATE compression. This boasts a better compression ratio, but at a slight cost to load times. On average I'd estimate that the bottleneck on decompression is about 1-2 seconds.
To switch to gzip, run make with the COMPRESS=gzip
argument.
The repo also supports gziping with libdeflate-gzip
. This compresses at a slightly better ratio than standard gzip
, with no real downside from a decompression standpoint.
To use libdeflate-gzip
, first clone the repo, then make
and make install
it.
Then run make for sm64 with GZIPVER=libdef
in addition to COMPRESS=gzip
The repo also supports building a ROM with no compression.
This is not recommended as it increases ROM size significantly, with little point other than load times decreased to almost nothing.
To switch to no compression, run make with the COMPRESS=uncomp
argument.
Q: Why in the hell are you bundling your own build of ld
?
A: Newer binutils (Like the one bundled with Ubuntu, 2.34) break linking with libultra builds due to local asm symbols.
This puts me at a crossroads of either touching leaked code and requiring GCC, or just using an older linker that works just fine.
I went with the latter. Thanks to "someone2639" for this hacky-ass idea
Q: Will this allow me to use FlashRAM/Transfer Pak/microcode swapping/Other Cool N64 Features?
A: Theoretically, all yes.
Go read the original SM64 repo README.md