The SM64 decompilation is a fully matching recreation of the Super Mario 64 source code in C, produced by reverse-engineering the original N64 ROM. Every function, struct, and data table has been reconstructed so the compiled output is bit-identical to the shipped cartridge. The codebase covers all five regional versions: US, JP, EU, Shindou, and iQue Player. Whether you’re here to understand how a classic 3D game works, build a ROM hack, or port the game to a new platform, this documentation covers everything from setting up your build environment to diving deep into the game’s physics, object behavior, and audio systems.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/n64decomp/sm64/llms.txt
Use this file to discover all available pages before exploring further.
Quick Start
Get prerequisites installed and build your first ROM in minutes
Project Structure
Understand how the source tree is organized before diving in
Game Systems
Explore Mario’s physics, object behaviors, rendering, and audio
Modding Guide
Apply enhancement patches and create your own modifications
Build your ROM in four steps
Place your baserom
Copy a legally obtained Super Mario 64 ROM into the project root. The file must be named according to the region you want to build:
Explore the codebase
Mario & Physics
MarioState struct, action system, and movement physics
Object Behaviors
Generic object model and behavior scripting language
Collision
Surface detection, floor/wall/ceiling raycasting
Geo Layout
Scene graph and rendering hierarchy description
Level Scripts
Level loading, area initialization, and warp system
Audio Engine
Sequence player, sound synthesis, and bank loading
This repository does not include game assets. You must own a copy of Super Mario 64 to extract the assets needed for compilation.