Skip to main content

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.

macOS is supported through two approaches: Homebrew, which installs the MIPS toolchain natively, and Docker, which runs the build inside a pre-configured Ubuntu container. Both produce the same output ROM.
The version of make bundled with macOS (via Xcode Command Line Tools) is too old to build SM64. Both methods below account for this — Homebrew users must invoke gmake instead of make.
Homebrew is the simplest option if you want to build natively on macOS. The n64-dev tap provides a pre-built mips64-elf-binutils bottle for Apple Silicon and Intel Macs.
1

Install Homebrew

If you do not already have Homebrew installed, run the official install script in your terminal:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Follow the on-screen instructions. On Apple Silicon, also follow the steps Homebrew prints to add it to your PATH.
2

Install build dependencies

Update Homebrew and install the required packages. The tehzz/n64-dev tap provides mips64-elf-binutils:
brew update
brew install coreutils make pkg-config tehzz/n64-dev/mips64-elf-binutils
This installs:
  • coreutils — GNU core utilities (provides sha1sum, etc.)
  • make — GNU make, accessible as gmake
  • pkg-config — build helper used by the Makefile
  • mips64-elf-binutils — MIPS cross-assembler and linker
3

Clone the repository

git clone https://github.com/n64decomp/sm64.git
cd sm64
4

Place the baserom

Copy your original SM64 ROM into the project directory with the correct version suffix:
# Replace us with jp, eu, sh, or cn as needed
cp /path/to/your/rom.z64 baserom.us.z64
5

Build the ROM

Use gmake (Homebrew’s GNU make) instead of the system make:
gmake
Running make instead of gmake will use the macOS system make, which is too old and will fail with syntax errors. Always use gmake on macOS.
Build artifacts are written to the build/ directory. The final ROM is build/<VERSION>/sm64.<VERSION>.z64.

Verifying the build

After a successful build the ROM appears at build/<VERSION>/sm64.<VERSION>.z64. The Makefile checks the SHA-1 hash by default (COMPARE=1):
VersionExpected SHA-1
jp8a20a5c83d6ceb0f0506cfc9fa20d8f438cafe51
us9bef1128717f958171a4afac3ed78ee2bb4e86ce
eu4ac5721683d0e0b6bbb561b58a71740845dceea9
sh3f319ae697533a255a1003d09202379d78d5a2e0
cn2e1db2780985a1f068077dc0444b685f39cd90ec
Pass COMPARE=0 to skip the hash check while making modifications to the codebase. A mismatch is expected when you change any source file.

Build docs developers (and LLMs) love