Super Mario 64 has been decompiled

FAST6191

Techromancer
Editorial Team
Joined
Nov 21, 2005
Messages
36,798
Trophies
3
XP
28,321
Country
United Kingdom
I did wonder what became of this project.

Hopefully this is the start of a snowball, though I imagine we will be waiting for easy Windows or whatever compile for that one.
 
  • Like
Reactions: cearp

Coto

-
Member
Joined
Jun 4, 2010
Messages
2,979
Trophies
2
XP
2,565
Country
Chile
With this more efficient O2 compile, does this mean that romhacks made using that version of the rom would theoretically run faster since it's using more optimized code?
If the rom hacks have PIC code (relocatable, shared library), yes. Otherwise you'll get a nice crash.

I think early N64 games were compiled with very little optimization because that way these'd have been easier to debug. It is easier to debug barely optimized code (as it is simpler), than it is optimized. Maybe the SDK was made out of Mario N64? Not to mention optimized code always end up breaking code not supposed to be optimized at all (such as older system's IO port read/writes, which required drain write buffer + invalidate cache + read/write primitive opcodes (ie, single, the most basic opcodes) and not subsequential read/write opcodes (sequential), such as ldr/str vs ldm/stm, because these would cause unexpected behaviour.
 
  • Like
Reactions: orangy57
D

Deleted User

Guest
More info from the modern vintage gamer:


Also an interessting reply from famous Super Mario 64 romhacker Kaze Emanuar:

"This is not entirely true. The CPU is almost never fully utilized. The mistake with the DDD lag is making the collision triangles dynamic rather than permanent. O2 compilation only mitigates this issue. It could be entirely solved by making the collision from the sub permanent (and I did that in SM64 Multiplayer, for example) Most of the lag in SM64 comes from GPU which this doesn't change so O2 compilation doesn't change anything for most of the game."
 
  • Like
Reactions: Magnus87

FAST6191

Techromancer
Editorial Team
Joined
Nov 21, 2005
Messages
36,798
Trophies
3
XP
28,321
Country
United Kingdom
Nice to see things starting, I am still mostly hoping for a PC port or better but improvements (even if some of them are emulator only) is still good to see. I will have to play it to see what the changes do as far as balance (wall kick was already pretty powerful and allows you to cheese some stuff, more so would be more so. Also wall sliding I guess is fun but might change things again, still always up for more hacks.)

You might as well quote the readme at least

The readme for the Super Mario 64: Arguably Better Edition - R3 download said:
This is Super Mario 64, but with changes that would make it a better game overall, at least in my opinion. It also features a few additional bonus features if you're into that sort of thing.

The base hack is fully console compatible, however, the widescreen version is NOT tested on real hardware, so if your N64 ends up exploding and giving you 3rd-degree burns, I'm not the one to blame!

The changes include:
- Better camera
- Better controls
- Wall sliding from later games
- Widescreen
- Optional "Hard Mode". Hold R before starting a new game!
- Optional "No Lives Mode"
- A new 120 Star bonus
- Tweaked HUD
- Analog camera via player 2
- Better performance
- D-Pad controls (epic)
- Bug fixes

Made by Mors using the SM64 Decompilation project! Shoutouts to GTM for testing, Benial for helping me with the Skull Mario HUD icon, and Kaze Emanuar for giving me the code for his bug fixes.

You need a US Z64 rom of the original game to use the patch.

FULL CHANGELOG:
---------------
Changes in R3.1:
- Changed the ground controls slightly.
- Fixed the invisible walls bug from the original game.
- Fixed the glitchy moving platform collisions from the original game.
- Fixed the "floor cucking" glitch.
- Edited the credits again.

Changes in R3:
- The game now comes with an optional widescreen version! Everything, including the HUD and menus are modified to work with widescreen.
- Koopa the Quick races should now be harder in the hard mode.
- You can skip the game's intro by holding L when selecting a file.
- Made it so you can now use the Y axis of the second player's stick to simulate the C-Up and C-Down presses.
- You can now... play the game with the D-Pad. I mean it works on the menus too, so I guess that's a plus.
- Modified how the wall jumping works to make it resemble the original game more.
- Fixed the 120 Star bonus not working when the no lives mode is turned off.
- Fixed the L button not centering the camera correctly in the Bowser stages.
- Edited the credits to add additional names.

Changes in R2:
- Added the "No Lives mode. It comes with a death counter too!
- Yoshi's dialogue is changed.
- Yoshi now gives you a new "present" alogside the sparkly triple jump.
- Hard Mode! Hold R before starting a new game to activate. Mario doesn't have his hat in the hard mode, so he takes more damage, and the bosses are more difficult.
- Removed the overscan borders from top and bottom of the screen.
- Removed the sounds that would play when you rotate the camera.
- Increased the swimming speed a bit.
- Mario now sinks down less in water.
- Fixed some culling issues.
- King Bob-Omb now turns faster after being thrown.
- Other minor bug fixes.
- Fixed an oversight from the previous release that would make pole jumping faster than normal.
- Fixed another oversight that caused the star effect not to appear if you did a frame perfect wall jump.
- Changed the HUD a bit. If you prefer the original one you can press Z on the file select menu to enable that instead. You'll need to do this every time you launch the game.

Changes in R1:
- Added wall sliding from later Mario games.
- Made the wall jumping (or wall kicking I guess) slightly more powerful.
- Changed how the camera works completely. There is no limit to how much you can turn the camera now, and the camera turns smoothly instead of increments.
- Added analog camera controls via player 2's controller.
- Made the L button center the camera behind Mario, excluding certain places, like the castle grounds where the camera centers on Mario automatically anyway.
- Made it possible to air kick at all speeds if you let go of the analog stick.
- Made Mario turn faster on ground, making the controls feel tighter.
- Made Mario stop faster on the ground after letting go of the analog stick.
- Made it easier to correct jumps on air.
- Increased how much you can move Mario horizontally on air.
- Made Mario jump out of the water faster.
- Made ground pounding slightly faster.
- Made the game run better on original hardware, using o2 optimization and f3dex graphics microcode.
- Changed the title screen.
 

eyeliner

Has an itch needing to be scratched.
Member
Joined
Feb 17, 2006
Messages
2,891
Trophies
2
Age
44
XP
5,537
Country
Portugal
I want to see someone make an engine out of it.
So those awesomely intelligent people create new games based on it, not only derivative more Mario games.
Kind of like iD did with Quake.
 

FAST6191

Techromancer
Editorial Team
Joined
Nov 21, 2005
Messages
36,798
Trophies
3
XP
28,321
Country
United Kingdom
Surely there are better engines already out there, likely with far less legal headaches for releasing the end result too. Mario 64's engine does not do all that much special these days, and has a massive list of quirks and limitations to deal with that are a complete non factor in more modern stuff.
 
  • Like
Reactions: Kwyjor
D

Deleted User

Guest
https://github.com/DavidSM64/SM64-Fast3D-AA-Reducer

This simple tool will overwrite the Fast3D 2.0D microcode within a SM64 ROM, and replace it with a slightly modified version that disables full anti-aliasing. It does this by blocking any attempt to write the IM_RD render mode flag into the RDP's othermode variable. This should improve performance on real N64 hardware by 3-4 fps (~10%).

How to use:

Just simply open up a Super Mario 64 ROM file, and then you can click the "Reduce the AA!" button if the ROM is compatible.

What Super Mario 64 Rom are compatible?:

Any SM64 ROM that uses the Fast3D 2.0D microcode is compatible. This includes the Japanese and North American versions of SM64 and any ROM hacks made with those versions.

Benchmark:

The beginning area of Jolly Roger Bay does lag a significant amount. Going down to a 22 fps minimum in my testing. Injecting the modified microcode makes a significant difference in the feel of the game, with the minimum increased to 25 fps.

My jolly roger bay benchmark starts at the beginning of the level and has Mario swim into the underwater cave. The framerate is bad in the beginning, but gets a lot better when you are deep underwater.

68747470733a2f2f692e696d6775722e636f6d2f433049563779592e6a7067
 
  • Like
Reactions: Zense and orangy57

GizmoTheGreen

Well-Known Member
Member
Joined
Oct 8, 2009
Messages
813
Trophies
1
XP
905
Country
trying to compile SDL ver on Manjaro (archlinux based) on raspberry pi 4 (aarch64) and get
Code:
as -I include -I build/us_pc --defsym VERSION_US=1 -MD build/us_pc/sound/sequences/00_sound_player.d -o build/us_pc/sound/sequences/00_sound_player.o sound/sequences/00_sound_player.s
sound/sequences/00_sound_player.s: Assembler messages:
sound/sequences/00_sound_player.s:87: Error: too many positional arguments
sound/sequences/00_sound_player.s:88: Error: too many positional arguments
sound/sequences/00_sound_player.s:89: Error: too many positional arguments
sound/sequences/00_sound_player.s:92: Error: too many positional arguments
sound/sequences/00_sound_player.s:93: Error: too many positional arguments
sound/sequences/00_sound_player.s:194: Error: too many positional arguments
sound/sequences/00_sound_player.s:195: Error: too many positional arguments
sound/sequences/00_sound_player.s:197: Error: too many positional arguments
sound/sequences/00_sound_player.s:200: Error: too many positional arguments
sound/sequences/00_sound_player.s:202: Error: too many positional arguments
sound/sequences/00_sound_player.s:225: Error: too many positional arguments
sound/sequences/00_sound_player.s:225: Error: unknown mnemonic `restore' -- `restore the value'
sound/sequences/00_sound_player.s:227: Error: too many positional arguments
sound/sequences/00_sound_player.s:228: Error: too many positional arguments
make: *** [Makefile:677: build/us_pc/sound/sequences/00_sound_player.o] Error 1

Anyone have any ideas? :P
 

VinsCool

Persona Secretiva Felineus
Global Moderator
Joined
Jan 7, 2014
Messages
14,600
Trophies
4
Location
Another World
Website
www.gbatemp.net
XP
25,207
Country
Canada
Something old, something new:



RT works amazingly well in this game, well on this stage at least because the rest of them would have reflective carpets and glow in the dark walls.

That looks seriously incredible.

Combining this to SM64 EX and Render96 models and this will become a really serious remaster project.
 
  • Like
Reactions: DSoryu

Deleted member 42501

Well-Known Member
Member
Joined
Jun 16, 2006
Messages
1,724
Trophies
2
XP
4,259
There have been quite a few high effort remasters:



But generally the overly reflective ray tracing and effects don't match the rest of the game as well as they do in the originally linked video:



Shiny reflective grass for the lulz!

The n3DS version of this is the ultimate remaster. Playing it in real 3D makes it feel brand new and the 800px mode when the effect is turned off on the small screen makes it look really crisp and authentic in a way the remasters don't.
 
  • Like
Reactions: Magnus87

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Xdqwerty @ Xdqwerty: (i was allowed to do that)