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,402
Trophies
1
Age
41
XP
4,608
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,908
Trophies
2
XP
2,039
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,568
Trophies
2
Location
United States
Website
sites.google.com
XP
3,895
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
  • Sicklyboy @ Sicklyboy:
    Imo Bluetooth is always a option of last resort for me
  • Sicklyboy @ Sicklyboy:
    Except for phones because it tends to be pretty reliable there
  • K3Nv2 @ K3Nv2:
    I got a bad habit of taking out usb transmitter and loosing it because they can't you know print names on the damn things
  • Sicklyboy @ Sicklyboy:
    But any desktop OS, I've never had anything but frustration trying to get Bluetooth devices to work reliably and stable. It might pair and connect once, and then next time I go to use it I have to delete and re-pair it again
  • K3Nv2 @ K3Nv2:
    5.3 has been so good I think 6 is really going to make it stable
  • K3Nv2 @ K3Nv2:
    I remember how shit 3 was
  • Sicklyboy @ Sicklyboy:
    Ptouch labeler aren't terribly expensive, label shit yourself fam. This is the one I own and there are cheaper ones too https://www.amazon.com/Brother-P-Touch-PTH110BP-Portable-included/dp/B09QXYND6S
  • Sicklyboy @ Sicklyboy:
    Solves part of the problem, mixing up which dongle is which. Then you just have to not lose them lol
  • K3Nv2 @ K3Nv2:
    Double D would be proud
    +1
  • Sicklyboy @ Sicklyboy:
    Even my Xbox One controller I have it paired to my desktop over Bluetooth, it USUALLY works but sometimes it refuses to connect and I have to delete and re-pair it. Maddening
  • K3Nv2 @ K3Nv2:
    Gigabytes built in mobo bt/wifi pairs pretty decent
  • Sicklyboy @ Sicklyboy:
    That's what I'm using :(
  • K3Nv2 @ K3Nv2:
    Ran a driver update in device manager?
  • Sicklyboy @ Sicklyboy:
    Not recently but I think it's less a driver issue and more just Windows having a garbage Bluetooth stack
  • K3Nv2 @ K3Nv2:
    Could be I was having issues when I first upgraded it and didn't realiser gigabyte has specific driver revisions which is stupid
  • K3Nv2 @ K3Nv2:
    Which is married to the boards revision
  • Xdqwerty @ Xdqwerty:
    Made my first review
  • RedColoredStars @ RedColoredStars:
    I've gone years without ever removing a logitech usb transmitter. Across several replacements of keyboards and mice. It just stays put.
  • Sicklyboy @ Sicklyboy:
    tldr usb > bluetooth imo
    +2
  • RedColoredStars @ RedColoredStars:
    ive never had luck with built in bt transmitters. They're always in the back of the pc and signal is super crummy vs a usb bt dongle in the front of the pc,
  • Psionic Roshambo @ Psionic Roshambo:
    I use an antenna for the built into in WiFi and BT connection it works great
  • Psionic Roshambo @ Psionic Roshambo:
    ASRock ftw lol but the antenna is from Linksys
  • RedColoredStars @ RedColoredStars:
    Anyone else a horror flick fan? I just dl'd Abigail.
  • Xdqwerty @ Xdqwerty:
    What's horror flick
    @Psionic Roshambo
    Xdqwerty @ Xdqwerty: What's horror flick @Psionic Roshambo