Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Project516/sm64dx/llms.txt

Use this file to discover all available pages before exploring further.

Building sm64dx on Linux requires a MIPS binutils toolchain, Python 3.6 or later, and a copy of an original Super Mario 64 ROM for asset extraction. The build system auto-detects the correct binutils prefix for your distribution, so in most cases you only need to install the right package and run make. Ensure the repository path does not exceed 255 characters — longer paths will cause build errors.

Install dependencies

Install the build dependencies with apt:
sudo apt install -y binutils-mips-linux-gnu build-essential git pkgconf python3
The Makefile detects the mips-linux-gnu- toolchain prefix automatically on Debian-based systems.
If your distribution provides a different MIPS binutils prefix, set the CROSS variable explicitly when running make. See Build options for details.

Build steps

1

Clone the repository

Clone sm64dx from within your Linux shell:
git clone https://github.com/Project516/sm64dx.git
cd sm64dx
2

Place your baserom

Copy your original Super Mario 64 ROM into the project root. The file must be named baserom.<VERSION>.z64, where <VERSION> is one of jp, us, eu, sh, or cn.
# Example for the US version
cp /path/to/your/rom.z64 baserom.us.z64
You need one baserom for each version you intend to build.
3

Run make

Build the ROM by running make. The default version is us:
make VERSION=us
To build a different version or speed up compilation with parallel jobs:
make VERSION=jp -j4
To build the EU version without verifying the ROM hash:
make VERSION=eu COMPARE=0
Build artifacts are placed in the build/ directory. The output ROM is named build/<VERSION>/sm64.<VERSION>.z64.

Specifying the CROSS prefix

If the Makefile cannot detect a suitable MIPS toolchain automatically, or if you have multiple toolchains installed and want to select a specific one, pass the CROSS variable on the command line:
# Use the mips64-elf toolchain explicitly
make VERSION=us CROSS=mips64-elf-

# Use the mips-linux-gnu toolchain explicitly
make VERSION=us CROSS=mips-linux-gnu-
The CROSS value is prepended to each binutils binary name (as, ld, ar, objcopy, etc.).

Build docs developers (and LLMs) love