Super Mario 64's source code has been decompiled and officially released

supermario64.png

After having been decompiled back in July, the source code for Super Mario 64 has been completely reverse-engineered, and is now publicly available. Available on GitHub is a full decompilation of the beloved 3D platformer, Super Mario 64. The decompilation works for the NTSC-U and NTSC-J builds of the game, with (E) ROM support coming soon. To keep things legal, you will need to provide your own copy of the game, in order to compile the data, with the exact process being detailed, below. If you've ever wanted to see some of the magic that went into creating such an iconic game, you can now finally see into all of the finer details.

Linux
  1. For each version (jp/us/eu) that you want to build a ROM for, put an existing ROM at ./baserom.<version>.z64 for asset extraction.

  2. Install the following packages:
Debian / Ubuntu

  • git
  • binutils-mips-linux-gnu / mips64-elf (>= 2.27)
  • python3 (>= 3.7)
  • build-essential
  • pkg-config
  • zlib1g-dev
  • libaudiofile-dev
Arch Linux

  1. Install qemu-irix
3.a Options: 1. Clone https://github.com/n64decomp/qemu-irix to somewhere and follow its install instructions in the README. 2. Optionally, grab the prebuilt qemu-irix from the Releases section. 3. (Arch) Use AUR package qemu-irix-git

3.b (For options 1 or 2), copy executable qemu-irix from irix-linux-user to somewhere convenient with a relatively short path.

mkdir -p /opt/qemu-irix/bin
cp irix-linux-user/qemu-irix /opt/qemu-irix/bin

3.c Define QEMU_IRIX environment variable in your ~/.bashrc to point to this qemu-irix executable.

export QEMU_IRIX=/opt/qemu-irix/bin/qemu-irix

  1. Run make to build the ROM (defaults to us version). Make sure your path to the repo is not too long or else this process will error, as the emulated IDO compiler cannot handle paths longer than 255 characters. Build examples:
make VERSION=jp -j4 # build (J) version instead with 4 jobs
make VERSION=eu COMPARE=0 # non-matching EU version still WIP

Windows
For Windows, install WSL and a distro of your choice and follow the Linux guide.

:arrow: Source
 

Manana

Well-Known Member
Member
Joined
Oct 30, 2017
Messages
126
Trophies
0
Age
29
XP
877
Country
United States
The game was released incomplete and buggy as hell to compete with Crash Bandicot. The DS port is actually better and you can actually beat it without using the touchscreen on the levels.

In fact while is nicer to play the game on a big screen, I beat the DS game three times from zero, while the Nintendo 64 version was just played until I beat Bowser and I didn't even care to get all the Stars.

Your crazy, wall jumps and movrment in general is way more fullfilling in the original. DS was good for multiplayer, portability, and a few game modes and characters but the core gameplay just feels right on the n64
 
  • Like
Reactions: navimor
D

Deleted User

Guest
Incomplete and buggy?

I played this game nonstop as a kid on the N64 and never experienced any game breaking or even significant bugs

Honestly this game was way more polished than most modern games
catch was/islow down. But most n64 games suffered it
 
Last edited by ,

raxadian

Well-Known Member
Member
Joined
Nov 10, 2018
Messages
4,361
Trophies
1
Age
41
XP
4,574
Country
Argentina
Your crazy, wall jumps and movrment in general is way more fullfilling in the original. DS was good for multiplayer, portability, and a few game modes and characters but the core gameplay just feels right on the n64

Tell that to TV Tropes then.
 

Ecchi95

Well-Known Member
Member
Joined
Jul 7, 2019
Messages
121
Trophies
0
Age
29
XP
891
Country
United States
I would prefered Zelda OoT(and MM) source code, imagine that on a DS or better... on a Switch xDD
You can reference the decompiled code for Super Mario 64, plus the compiled version, and compare the functions to those in other first-party N64 games.

You can then use the same symbols from Super Mario 64 for functions that serve the same purpose.

Games I'm going to do this with:

Super Mario 64 (Disk Version)
Mario Kart 64 (this one most closely resembles Super Mario 64's code base I've found)
F-Zero X
Ocarina of Time (NOT the debug version that everyone uses. I don't want bug fixes or bloat from the debug functions.)
Majora's Mask (NOT the debug version that everyone uses. I don't want bug fixes or bloat from the debug functions.)
 
  • Like
Reactions: blackkawa

Fusion

On/Off GBA-Temp'er
Member
Joined
Nov 7, 2002
Messages
1,527
Trophies
2
Website
www.google.com
XP
1,679
Country
Since this has the Super Mario 64 engine also, it shouldn't be to hard now to get to work on Zelda Ocarina of Time, Banjo and Kazooie etc. Now those would be great additions/addons for this source as extra's.
 

Captain_N

Well-Known Member
Member
Joined
Mar 29, 2010
Messages
1,903
Trophies
2
XP
2,024
Country
United States
so how is this not copyrighted code. not that i care but yall go crazy when one tool is posted with nintendos code in it. this is the entire game.....
 

MAXLEMPIRA

Legends are Made from True Stories...
Member
Joined
Jun 24, 2012
Messages
1,039
Trophies
1
Age
32
Location
Kanto <- Hyrule -> Unova
Website
maxlempira.deviantart.com
XP
1,751
Country
Mexico
You can reference the decompiled code for Super Mario 64, plus the compiled version, and compare the functions to those in other first-party N64 games.

You can then use the same symbols from Super Mario 64 for functions that serve the same purpose.

Games I'm going to do this with:

Super Mario 64 (Disk Version)
Mario Kart 64 (this one most closely resembles Super Mario 64's code base I've found)
F-Zero X
Ocarina of Time (NOT the debug version that everyone uses. I don't want bug fixes or bloat from the debug functions.)
Majora's Mask (NOT the debug version that everyone uses. I don't want bug fixes or bloat from the debug functions.)
That's just what I though... I mean. both games were coded for N64 and by Nintendo... so, the code must be similar. Some changes here and there
 

uyjulian

Homebrewer
Member
Joined
Nov 26, 2012
Messages
2,567
Trophies
2
Location
United States
Website
sites.google.com
XP
3,881
Country
United States
You can reference the decompiled code for Super Mario 64, plus the compiled version, and compare the functions to those in other first-party N64 games.

You can then use the same symbols from Super Mario 64 for functions that serve the same purpose.

Games I'm going to do this with:

Super Mario 64 (Disk Version)
Mario Kart 64 (this one most closely resembles Super Mario 64's code base I've found)
F-Zero X
Ocarina of Time (NOT the debug version that everyone uses. I don't want bug fixes or bloat from the debug functions.)
Majora's Mask (NOT the debug version that everyone uses. I don't want bug fixes or bloat from the debug functions.)
Guess what else you can use? Diaphora
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    K3Nv2 @ K3Nv2: That's one bad nightmare