Live data from Hacker News

Super Mario 64 has been decompiled

github.com

111–120 of 180 posts

Re: Super Mario 64 has been decompiled

#111
post #85
post #51

Earlier quoted context omitted.

Super Paper Mario uses an extremely similar engine as Paper Mario: The Thousand Year Door, which uses a slightly modified version of the Paper Mario 64 engine.

Intelligent Systems seems to have a good head on their shoulders for code reuse. Enough so that I would suspect that their Fire Emblem and Advance Wars series—when they were releasing concurrently—were the same engine underneath. (Side-note: I've always wondered how the mini-games in IS's WarioWare series work—whether each game is entirely custom code, or whether they've come up with some sort of DSL for specifying r…

Well, they made a game where you can make your own microgames (D.I.Y.), and I believe an Iwata Asks revealed it was basically a dumbed down version of the internal tools they had been using, at least for the earlier DS WarioWare game (Touched.) Not sure if that quite answers your question, but I would bet it's some kind of DSL interpreted by a microgame engine.

Re: Super Mario 64 has been decompiled

#112
post #107

This is cool and illegal. What makes me envy of the West (or countries other than Japan in general) is that this kind of attempt is somewhat condoned and praised, while in Japan there would be a vocal outcry and finger-pointing campaign (with some media exposure) to the point where the author would be forced to shut down the project. It's a blessing that people can pursue things like this, and it's a huge shame that…

> It's a blessing that people can pursue things like this, and it's a huge shame that Japan is such an anal when it comes to a marginally illegal activity in an open space.

I've noticed spillover effects into Japanese gamers as well -- people being suspicious of or derisive about mods, even when they're perfectly legal and the game has built-in mod support (looking at you Monster Hunter World).

My (Japanese) girlfriend is on the very conservative side of the spectrum there and absolutely hates it when I bring up any kind of modding, and so do her friends -- the culture of "authorial intent is king" is very strangely strong for a culture that also appreciates and enjoys doujin.

Re: Super Mario 64 has been decompiled

#113

They wrote it in assembly, nuts!

Binary executables are machine code. One step from machine code is assembly. It’s easy to translate machine code to ASM (because you are just reversing the op code and adding data structures) from there it gets hard because compilers do all sorts of tricks to create performant assembly and throws away hints about code structure (e.g a simple overloaded function may become an ASM routine with 30 parameters depending on how it’s called. Or vice versa.. it’s like trying to recreate HD video from mpeg-1, entropy has been thrown away). So decompiled code is usually left in assembly. Sometimes an effort is made to create the C equivalent but that’s a maddening effort.

More than likely SM64 was written in c with some critical performance parts in ASM (like mode7 and some of the OAM stuff other threads talk about).

Re: Super Mario 64 has been decompiled

#114
post #56

Earlier quoted context omitted.

PilotWings 64 was made by a separate company (Paradigm), who used a very different structure for their games which feels a lot more "western" to me (the UltraVision 64 "engine" has a large structured data chunk which it reads a lot of stuff from; most Nintendo 64 games don't really have that sort of structure)

Know anything about Turok?

It’s a very simple 3D engine

Re: Super Mario 64 has been decompiled

#115
post #47

I am looking forward to the mods that this will enable. I highly recommend trying mario 64 on dolphin EMU at 1080P with a texture pack. A HD mod that added a few more polygons would really round out the experience.

Is a raspberry pi a good-enough platform to run N64 1080P games on?

No.

N64 emulators are all pretty bad (inaccurate, use a decent amount of resources) and upscaling is relatively expensive. At least, way too expensive for an rpi to handle.

It will work fine as an emu at 240p though

Re: Super Mario 64 has been decompiled

#116
post #105

What an awesome project. I would love to mess with random stuff like whirlpool strength and see what it does to the game. Efforts like this to make the decompiler output intelligible e.g. meaningful variable names make this much more approachable for a technical person like me without much of the niche platform-specific reverse engineering skills. In fact there are countless games I'd love to dive into like this.

Train a ML system on a range of parameters (whirlpool strength) until you have a decent port of the game to a neural network and/or tree-based algo. Then try to optimize the game based on people’s enjoyment.

Re: Super Mario 64 has been decompiled

#118
post #4

As an amusing side-effect, the team working on this effort also implemented IRIX userland support for QEMU since the original N64 toolchain ran on IRIX on the SGI Indy, and they need the original compilers to verify functional equivalence of their source: https://github.com/n64decomp/qemu-irix .

I wrote to SGI in high school asking for some info on their computers and they sent back a stack of beautifully printed, full-color brochures. The Indy had a webcam, which was very rare in those days. Also included was a brochure on the Indigo workstation, which Industrial Light and Magic used for Jurassic Park, etc.

Nintendo is a little mysterious when it comes to what their actual tooling was, but I remember Donkey Kong Country being the first time I read they were using SGIs (or at least the studio "Rare" was).

It's somewhat surprising they used the Indy for developing Mario 64 – I always got the sense that it was somewhat lightweight in performance compared to the Indigo, but a very cool machine either way.

Re: Super Mario 64 has been decompiled

#119
post #68

Earlier quoted context omitted.

I honestly love coming to HN to see posts like this and comments like yours. It is always so neat to see the other sides of software engineering. You listed 4 acronyms and I have no idea what any of them are or how they fit into this story but all I want to do is deep dive into each one. It is also awesome to see people so interested in things that I've never even encountered before.

IRIX [1] was the version of SVR4 UNIX which ran on SGI [2] computers. QEMU [3] is an emulator used to run programs for one machine on another. N64 [4] is the Nintendo 64 games console. SGI Indy [5] was a desktop SGI workstation from 1993. [1] https://en.wikipedia.org/wiki/IRIX [2] https://en.wikipedia.org/wiki/Silicon_Graphics [3] https://www.qemu.org/ [4] https://en.wikipedia.org/wiki/Nintendo_64 [5] https://en.wiki…

I love how you use 3 acronyms to describe the first acronym. It's acronyms all the way down!

Re: Super Mario 64 has been decompiled

#120

I don't know much about reverse engineering field, but more than 70% code is assembly. Is extracting assembly still considered decompiled?

The real effort here is cleaning up the assembly, and as you mention it's nowhere close to being done, but it keeps getting posted every once in a while. Here's another post from a month ago: https://www.reddit.com/r/programming/comments/cbvl6l/super_m...
Post reply on HN