Instead of spending years decompiling games for emulation now you can "recompile" them in less than 10 mins to play natively :marseyshook:

https://youtube.com/watch?v=GIp7C2ro2T8

!chuds !nonchuds emulationGODS :marseyembrace:

https://github.com/Mr-Wiseguy/Zelda64Recomp

Zelda 64: Recompiled is a project that uses N64: Recompiled to statically recompile Majora's Mask (and soon Ocarina of Time) into a native port with many new features and enhancements. This project uses RT64 as the rendering engine to provide some of these enhancements.

https://github.com/Mr-Wiseguy/N64Recomp

N64: Recompiled is a tool to statically recompile N64 binaries into C code that can be compiled for any platform. This can be used for ports or cowtools as well as for simulating behaviors significantly faster than interpreters or dynamic recompilation can. More widely, it can be used in any context where you want to run some part of an N64 binary in a standalone environment.

This is not the first project that uses static recompilation on game console binaries. A well known example is jamulator, which targets NES binaries. Additionally, this is not even the first project to apply static recompilation to N64-related projects: the IDO static recompilation recompiles the SGI IRIX IDO compiler on modern systems to faciliate matching decompilation of N64 games. This project works similarly to the IDO static recomp project in some ways, and that project was my main inspiration for making this.


The recompiler works by accepting a list of symbols and metadata alongside the binary with the goal of splitting the input binary into functions that are each individually recompiled into a C function, named according to the metadata.

Instructions are processed one-by-one and corresponding C code is emitted as each one gets processed. This translation is very literal in order to keep complexity low. For example, the instruction addiu $r4, $r4, 0x20, which adds 0x20 to the 32-bit value in the low bytes of register $r4 and stores the sign extended 64-bit result in $r4, gets recompiled into ctx->r4 = ADD32(ctx->r4, 0X20); The jal (jump-and-link) instruction is recompiled directly into a function call, and j or b instructions (unconditional jumps and branches) that can be identified as tail-call optimizations are also recompiled into function calls as well. Branch delay slots are handled by duplicating instructions as necessary. There are other specific behaviors for certain instructions, such as the recompiler attempting to turn a jr instruction into a switch-case statement if it can tell that it's being used with a jump table. The recompiler has mostly been tested on binaries built with old MIPS compilers (e.g. mips gcc 2.7.2 and IDO) as well as modern clang targeting mips. Modern mips gcc may trip up the recompiler due to certain optimizations it can do, but those cases can probably be avoided by setting specific compilation flags.

Every output function created by the recompiler is currently emitted into its own file. An option may be provided in the future to group functions together into output files, which should help improve build times of the recompiler output by reducing file I/O in the build process.

Recompiler output can be compiled with any C compiler (tested with msvc, gcc and clang). The output is expected to be used with a runtime that can provide the necessary functionality and macro implementations to run it.

An example of most of the required macro implementations can be found in the Zelda 64: Recompiled project here, with the project also containing accompanying code for implementing the rest of the required runtime.

50
Jump in the discussion.

No email address required.

What does this mean to non gaymers?

Jump in the discussion.

No email address required.

Emulation can make games run like shit sometimes due to the quirks of the hardware the software is trying to emulate. Instead of emulation you just turn all the code in the game into C that can be read and run natively on the computer itself.

!codecels am I right?

Jump in the discussion.

No email address required.

basically yeah, and then you slap on a sort of emulator-like part to render the graphics, as the game code still thinks its outputting to an n64 video chip

the whole thing is very a impressive feat of programming and probably required cat ears etc

Jump in the discussion.

No email address required.

You basically need a tool also to run something that plays c games but yes since c can run on basically any modem computer that exists yes. You could run space station silicon valley on the fricking international space station smart fridge if you wanted. The future is now.

Jump in the discussion.

No email address required.

Finally I can play more old games and ignore more new games

:#marseydance:

Jump in the discussion.

No email address required.

That was always allowed.

Jump in the discussion.

No email address required.

Emulation is already like perfect on basically everything but recompiling allows you to create mods for the games. Like there's a mod for paper mario that inserts modern god rays and uses n64 light sources as the reference points.

Jump in the discussion.

No email address required.

already like perfect on basically everything

Isn't the PS3 (which is less than 6 months away from being old enough to vote and frick) still wonky to emulate unless u have a high end pc? (Yes yes I know bizarre PowerPC multicore setup but the thing is 17 years old and had 256mb of vram ffs)


Current hyperfixation: https://i.rdrama.net/images/17146091388618665.webp

Jump in the discussion.

No email address required.

The problem is there's no drive to emulate the ps3 when basically every game on it is on pc. That's the era when everything was being ported to everything.

Jump in the discussion.

No email address required.

Ok ty bb

Jump in the discussion.

No email address required.

Speedrunners HATE this

Jump in the discussion.

No email address required.

C can't be run natively, it needs to be compiled into actual machine code instead, which is specific to whatever processor you want to run it on

There are lots of C compilers available tho so with a relatively small amount of tweaking you can easily turn C into machine code for lots of different processors

Jump in the discussion.

No email address required.

You can also easily change the code to support 60 fos wide screen or more easily optimize the game.

Jump in the discussion.

No email address required.

here ill dumb it down even more

instead of needing a special :marseykindness: app to play an old game, you can turn the old game into an app!

Jump in the discussion.

No email address required.

Sounds like work

Jump in the discussion.

No email address required.

its work if u do it urself, but if someone already turned it into an app, you can jost download the app!

Jump in the discussion.

No email address required.

Very true bb

Jump in the discussion.

No email address required.

Trains will have a new game to speedrun, I think

Jump in the discussion.

No email address required.

Link copied to clipboard
Action successful!
Error, please refresh the page and try again.