Super Mario 64 has been decompiled

The_Free_Real_Estate

New Member
Newbie
Joined
Jul 17, 2019
Messages
3
Trophies
0
Age
23
XP
79
Country
Antarctica
I have a brother-in-law who appreciates the leak as much as I do and the rest of the internet that's not the hardasses on GBAtemp.
Enjoying something doesn't make it any less of a characterless, disgusting thing to do. The public doesn't know about the dweeb who gave them this software. Doing this does not make you any more respected. They really could not care. Come back to me when you've made that N64 emulator ;)
 

BridgetX

Member
Newcomer
Joined
Jul 17, 2019
Messages
5
Trophies
0
Age
26
XP
50
Country
Brazil
Hello everyone, so I'm running into a problem while compiling this, if anyone can help me out here i would really appreciate it.
Compilation-error.png
 

BridgetX

Member
Newcomer
Joined
Jul 17, 2019
Messages
5
Trophies
0
Age
26
XP
50
Country
Brazil
the entire terminal output
for "make" the output is simply

/home/bridget/Qemu/qemu-irix -silent -L tools/ido5.3_compiler tools/ido5.3_compiler/usr/bin/cc -c -Wab,-r4300_mul -non_shared -G 0 -Xcpluscomm -Xfullwarn -g -signed -I include -I build/us/include -I src -D_LANGUAGE_C -DVERSION_US=1 -mips2 -32 -DF3D_OLD -o build/us/src/engine/surface_collision.o src/engine/surface_collision.c
make: *** [Makefile:400: build/us/src/engine/surface_collision.o] Error 1

for "make -d" the output is in the text file attached since it's really long.
 

Attachments

  • output.txt
    174.3 KB · Views: 130

mountainflaw

Member
Newcomer
Joined
Jul 11, 2018
Messages
22
Trophies
0
Age
34
XP
107
Country
Australia
For the love of God, someone fix that awful camera please!!!
The camera is fine smh

--------------------- MERGED ---------------------------

for "make" the output is simply

/home/bridget/Qemu/qemu-irix -silent -L tools/ido5.3_compiler tools/ido5.3_compiler/usr/bin/cc -c -Wab,-r4300_mul -non_shared -G 0 -Xcpluscomm -Xfullwarn -g -signed -I include -I build/us/include -I src -D_LANGUAGE_C -DVERSION_US=1 -mips2 -32 -DF3D_OLD -o build/us/src/engine/surface_collision.o src/engine/surface_collision.c
make: *** [Makefile:400: build/us/src/engine/surface_collision.o] Error 1

for "make -d" the output is in the text file attached since it's really long.

What is your bashrc? Also dumb question: But are you using WSL/Linux?
 
Last edited by mountainflaw,

BridgetX

Member
Newcomer
Joined
Jul 17, 2019
Messages
5
Trophies
0
Age
26
XP
50
Country
Brazil
The camera is fine smh

--------------------- MERGED ---------------------------



What is your bashrc? Also dumb question: But are you using WSL/Linux?
I'm running Linux (Debian 10), and the contents of my bashrc are in the attached file
 

Attachments

  • bashrc.txt
    3.5 KB · Views: 97

FAST6191

Techromancer
Editorial Team
Joined
Nov 21, 2005
Messages
36,798
Trophies
3
XP
28,282
Country
United Kingdom
Well, I finally got it working.
"Ha-ha-ha-ha-ha-ha-haaaa!"

I have attempted to upload an IPS patch at Romhacking.net.

Not sure what that is supposed to showcase (been too long since I last did SM64) but be careful with recompiles and IPS -- if the compiler generates something with different offsets or you do a few changes of variables it will appear as very different to IPS and you would then include a whole chunk of Nintendo code with it, which would be less than ideal. Xdelta might be a better plan but even then I have seen very subtle tweaks have massive changes across a binary before.
 

TheGag96

Well-Known Member
Newcomer
Joined
Feb 1, 2016
Messages
45
Trophies
0
Age
27
XP
111
Country
United States
*snip*
What is your bashrc? Also dumb question: But are you using WSL/Linux?

I appear to be getting the same compiler error as him... I'm on Arch Linux x64 - had to install mips64-elf-binutils off the AUR (hoping that's right lol). For some reason I had to chmod +x the cc executable mentioned in this error.

Code:
In file included from include/ultra64.h:23,
                 from src/engine/surface_collision.c:1:
include/PR/os_libc.h:82:17: warning: mismatch in argument 3 type of built-in function ‘bcopy’; expected ‘unsigned int’ [-Wbuiltin-declaration-mismatch]
   82 | extern void     bcopy(const void *, void *, int);
      |                 ^~~~~
include/PR/os_libc.h:83:17: warning: mismatch in argument 3 type of built-in function ‘bcmp’; expected ‘unsigned int’ [-Wbuiltin-declaration-mismatch]
   83 | extern int      bcmp(const void *, const void *, int);
      |                 ^~~~
include/PR/os_libc.h:84:17: warning: mismatch in argument 2 type of built-in function ‘bzero’; expected ‘unsigned int’ [-Wbuiltin-declaration-mismatch]
   84 | extern void     bzero(void *, int);
      |                 ^~~~~
/home/grayson/Apps/qemu-irix/qemu-irix -silent -L tools/ido5.3_compiler tools/ido5.3_compiler/usr/bin/cc -c -Wab,-r4300_mul -non_shared -G 0 -Xcpluscomm -Xfullwarn -g -signed -I include -I build/us/include -I src -D_LANGUAGE_C -DVERSION_US=1 -mips2 -32 -DF3D_OLD -o build/us/src/engine/surface_collision.o src/engine/surface_collision.c
make: *** [Makefile:400: build/us/src/engine/surface_collision.o] Error 1
 
Last edited by TheGag96,

bunny_wabbit

Well-Known Member
Newcomer
Joined
Jan 14, 2017
Messages
45
Trophies
0
Age
32
XP
125
Country
I'm going to show much knowledge of machine code I don't have, but does mean that it would be theoretically possible to install it on PC and play it without the need for an emulator?
 

FAST6191

Techromancer
Editorial Team
Joined
Nov 21, 2005
Messages
36,798
Trophies
3
XP
28,282
Country
United Kingdom
I'm going to show much knowledge of machine code I don't have, but does mean that it would be theoretically possible to install it on PC and play it without the need for an emulator?
While C has often been called portable assembler I don't think we have seen anybody manage to slap a modern PC compiler hard enough that it spits out a workable program just yet (even a slow version).

Eventually though with some code tweaking then yes you will probably get a super_mario_64.exe and click on it and experience the joys of Mario 64 on a PC without emulation, remote play, simulation or some kind of quasi recreation and asset rip thing that some not quite emulators go in for. For what it is worth though you can convert plain old assembly games to other things too, it just takes hundreds of times longer so nobody really bothers when ROM hacking and emulators are a thing.
 

nullpointer128

New Member
Newbie
Joined
Jul 17, 2019
Messages
4
Trophies
0
Age
22
XP
63
Country
United States
I'm going to show much knowledge of machine code I don't have, but does mean that it would be theoretically possible to install it on PC and play it without the need for an emulator?

We'd have to start with writing an OpenGL backend for the gSP API, gDP API, and the gu API. We would also have to write our own implementation of the os API and make a wrapper to SDL or SDL-equivalent for cross-platform audio and input. This is just for getting a "vanilla" SM64 experience (e.g. no modified graphics).

If we'd want to overhaul the graphics, we would not write an implementation of the APIs, but we would have to completely rework the rendering logic for SM64, because it currently relies heavily on rendering n64 display lists and SPTasks. And there are 451 gSP calls in the code, and over 936 references to display lists.

This doesn't even include porting all the code so it conforms to modern C compiler requirements. So it's a big undertaking, but given another couple years and community teamwork, it will be done.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Xdqwerty @ Xdqwerty: Good night