Super Mario 64 has been decompiled

mountainflaw

Member
Newcomer
Joined
Jul 11, 2018
Messages
22
Trophies
0
Age
34
XP
107
Country
Australia
Will this make 60 fps version possible?
On console it's theoretical. The RDP is too stressed (even at 30 FPS in some points) for a consistent 60 FPS. There's an F3DEX2 microcode build option which I added in (GRUCODE=f3dex2 when running make), and even that doesn't improve the framerate. I guess one could try enabling fog and increasing clipping and see how that works, along with removing anti-aliasing.
 
  • Like
Reactions: CrashOveride

Ericthegreat

Not New Member
Member
Joined
Nov 8, 2008
Messages
3,455
Trophies
2
Location
Vana'diel
XP
4,271
Country
United States
Seems it's not 100% the code, like some spots were filled in by hand, and most give you he same result, but they might not be 100% the way Nintendo did it.

I do not know this, but this is my guess.
 

TheGamingLord

Member
Newcomer
Joined
Aug 3, 2019
Messages
6
Trophies
0
Age
23
XP
69
Country
Sweden
Hello, I'm having a bit of trouble compiling this.

This is the output:
"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
/usr/lib/libc.so.1: No such file or directory
Makefile:399: recipe for target 'build/us/src/engine/surface_collision.o' failed
make: *** [build/us/src/engine/surface_collision.o] Error 255"

It would be appreciated if someone could help.
 

smf

Well-Known Member
Member
Joined
Feb 23, 2009
Messages
6,640
Trophies
2
XP
5,854
Country
United Kingdom
Seems it's not 100% the code, like some spots were filled in by hand, and most give you he same result, but they might not be 100% the way Nintendo did it.

I do not know this, but this is my guess.

Sure, you can't know whether Nintendo wrote

int i; for (i = 0; i < 10; i++)
{
...
}

or

int i = 0;
while (i < 10)
{
....
i++;
}

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.

It depends on how similar the platforms are & how the code is structured. For example lots of games were converted between colecovision and MSX. They have the same CPU so converting back to source code is actually an unnecessary overhead.

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.

The beneft of a wrapper is that you can reuse it on the next project, going through well defined calls also means you are less likely to make a mistake that kills the project. The alternative is going in and hacking the original code to call native functions, which can be worthwhile for performance and extending beyond the original limitations, but you could find half way through and find that all your changes are wrong & it becomes a nightmare to fix it all.
 

CrashOveride

Well-Known Member
Newcomer
Joined
May 29, 2017
Messages
50
Trophies
0
XP
127
Country
United States
Hello, I'm having a bit of trouble compiling this.

This is the output:
"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
/usr/lib/libc.so.1: No such file or directory
Makefile:399: recipe for target 'build/us/src/engine/surface_collision.o' failed
make: *** [build/us/src/engine/surface_collision.o] Error 255"

It would be appreciated if someone could help.

You read install.md right?
 

mountainflaw

Member
Newcomer
Joined
Jul 11, 2018
Messages
22
Trophies
0
Age
34
XP
107
Country
Australia
Sure, you can't know whether Nintendo wrote

int i; for (i = 0; i < 10; i++)
{
...
}

or

int i = 0;
while (i < 10)
{
....
i++;
}



It depends on how similar the platforms are & how the code is structured. For example lots of games were converted between colecovision and MSX. They have the same CPU so converting back to source code is actually an unnecessary overhead.



The beneft of a wrapper is that you can reuse it on the next project, going through well defined calls also means you are less likely to make a mistake that kills the project. The alternative is going in and hacking the original code to call native functions, which can be worthwhile for performance and extending beyond the original limitations, but you could find half way through and find that all your changes are wrong & it becomes a nightmare to fix it all.

Actually, we can in that instance. The outputted assembly is different.
 

funkyzaps

New Member
Newbie
Joined
Aug 12, 2019
Messages
1
Trophies
0
XP
36
Country
Germany
As the source was released in a .zip file and not a .tar.gz or similar, some files that need to be executable aren't.
Easy way to get it to compile is a
Code:
chmod -R +x tools/ido5.3_compiler/

Edit: Oh, my error was slightly different than the one regarding libc. No idea what's wrong there.
 
Last edited by funkyzaps,

TheGag96

Well-Known Member
Newcomer
Joined
Feb 1, 2016
Messages
45
Trophies
0
Age
27
XP
111
Country
United States
As the source was released in a .zip file and not a .tar.gz or similar, some files that need to be executable aren't.
Easy way to get it to compile is a
Code:
chmod -R +x tools/ido5.3_compiler/

Edit: Oh, my error was slightly different than the one regarding libc. No idea what's wrong there.

Oh wow, that actually somehow worked! I got plenty of the same error I was getting before, but I guess they were warnings all along, as they just got ignored... The game compiled just fine after that. Thank you!!
 

Ecchi95

Well-Known Member
OP
Member
Joined
Jul 7, 2019
Messages
121
Trophies
0
Age
29
XP
891
Country
United States
I'm using the decompilation, a hex editor, and LemASM to search for and identify where the .o (compiled C) files are in the Japanese ROM and make a ROM map. I'll put the map in my opening post when I've identified everything in the decompilation.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • Xdqwerty @ Xdqwerty:
    also gonna install twilight menu in my r4 flashcard
  • Psionic Roshambo @ Psionic Roshambo:
    One thing that just occurred to me.... The sound on the 2600 sucked less back then the harsh sound we hear now is from infinitely better speakers we have now, back when the 2600 was new speakers produced a almost muffled sound, like CRTs made old graphics look slightly better.
  • Psionic Roshambo @ Psionic Roshambo:
    I wonder if I could recommend that to some emulation devs that perhaps the sound could use some smoothing out to simulate those old TVs
  • Psionic Roshambo @ Psionic Roshambo:
    I think a few of the early systems could benefit from that, at least up to the 8 bit generation, by the 16 bit generation I think TVs had gotten a lot better in almost every way
  • Xdqwerty @ Xdqwerty:
    i dont have an sd card adapter but I have an usb sd card adapter
  • K3Nv2 @ K3Nv2:
    Old people games
  • Xdqwerty @ Xdqwerty:
    its not the one that comes with the r4
  • Xdqwerty @ Xdqwerty:
    doesnt work (my flashcard is from r4isdhc.com)
  • Xdqwerty @ Xdqwerty:
    might install ysmenu first
  • Psionic Roshambo @ Psionic Roshambo:
    Try Wood firmware
  • Psionic Roshambo @ Psionic Roshambo:
    For your R4
  • Psionic Roshambo @ Psionic Roshambo:
    It's old but it's the best firmware out for DS stuff
  • Xdqwerty @ Xdqwerty:
    it says it only works for the original R4, R4i Gold (r4ids.cn), R4iDSN (r4idsn.com) and Acekard R.P.G.
  • Xdqwerty @ Xdqwerty:
    nvm it does support mine
  • Xdqwerty @ Xdqwerty:
    but why choose it over ysmenu @Psionic Roshambo?
  • Xdqwerty @ Xdqwerty:
    bc im stupid?
  • Xdqwerty @ Xdqwerty:
    yea ik im stupid
  • Xdqwerty @ Xdqwerty:
    good night
  • Psionic Roshambo @ Psionic Roshambo:
    Just give it a try, but honestly if you have a 3DS you can play DS games without a card just off the internal SD card
  • Psionic Roshambo @ Psionic Roshambo:
    Slightly slower loading but a bit more convenient
  • BakerMan @ BakerMan:
    guys, my fuckin headphones have an out of place speaker
  • K3Nv2 @ K3Nv2:
    Did you try wearing them?
    B @ btjunior: @Xdqwerty 16