mugurumakensei

Elizabeth, I’m coming to join you!
Member
Oct 25, 2017
11,399
Can't wrap my head around how this works. What's the process here?
Recompile tool takes in a n64 file as an elf, interprets each instruction writing it out in C code. Said C code uses the libraries built from things like SM64 decomp and OOT recomp. You can also say you want to patch specific functionality by configuring the toml file to provide override instructions. If you have a patches, you write the code for the patch. You then compile the code into an executable and people can provide the assets by providing their backups. Basically what a JIT emulator does, this does too except thanks to the work from previous decomps it can generate whole executables.
 
Last edited:

Fallout-NL

Member
Oct 30, 2017
6,870
Recompile tool takes in a n64 file as an elf, interprets each instruction writing it out in C code. Said C code uses the libraries built from things like SM64 décimo and OOT recomp. You can also say you want to patch specific functionality by configuring the toml file to provide override instructions. If you have a patches, you write the code for the patch. You then compile the code into an executable and people can provide the assets by providing their backups. Basically what a JIT emulator does, this does too except thanks to the work from previous decomps it can generate whole executables.

Thanks, I can follow most of that explanation. Incredible stuff.
 

Fafalada

Member
Oct 27, 2017
3,104
Be really interested to see how WR64 functions at higher frame rates, I can see the water physics beinf tied to the games native frame rate. That's complete speculation tho
This system decouples simulation framerate from visual updates. Basically the framerate of the games doesn't actually change(stabilizing aside) they just render faster with interpolation (essentially - not unlike what frame-gen does, another level down on the rendering stack).
 

Nothing Loud

Literally Cinderella
Member
Oct 25, 2017
10,040
Oh okay I have that too. Okay if that's the video I should follow I will do that. Thanks!
 

Herne

Member
Dec 10, 2017
5,366
Just the idea of being able to run Conker's Bad Fur Day at a stable, modern frame rate is delighting me. I've only played through it once and I've longed to play through it again, but the frame rate was just dire. It was too ambitious a game for the hardware.

Things like improved graphics and modern controls are just a nice shiny cherry on top of the rest of the cake.
 
Nov 14, 2017
2,850
How moddable would recompilation be beyond just framerate and resolution? Like for example, with Banjo-Kazooie, would it be possible to add the option to a recomp to make notes save like they do in the XBLA remaster? Or would only a decompilation make that possible?
 

Bardeh

Member
Jun 15, 2018
2,793
2 hours just disappeared - the game is so much fun! Runs comfortably at 90fps on Steam Deck almost all of the time. I've just opened up the entrance to the Woodfall temple and called it a night for now.

The game is so dense with stuff, structured so weirdly and beautifully (especially considering its age) and it was developed in a year?! Wild stuff.
 
Oct 25, 2017
4,838
New York City
I'm playing with a controller and I feel like rotation is handled rather poorly. For instance if I rotate the analog stick I expect Link to run in small circles but even at rather slow speeds the circle is broken. Other than that it's really great feeling.
The analog stick's range isn't corrected -- the N64 controller's analog stick has a shorter range than modern controllers, so when you use a modern controller with N64 games, everything is far too sensitive. I was having issues with the camera moving too fast while aiming my arrows at the shooting gallery, for example.

Unfortunately this port doesn't currently have a setting to fix the range, but the developer wrote on the GitHub that it's a planned feature. So I'm sure it'll be there soon.
 

jwk94

Member
Oct 25, 2017
13,455
So does this only work with majora's mask so far? And is there a guide for steam deck users?
 

Anth0ny

Member
Oct 25, 2017
47,637
Yeah I'm gonna wait until the N64 controller compatibility is figured out a bit better and ray tracing is implemented before I go through the entire game.

Can't wait to use the mirror shield that is actually a mirror thanks to ray tracing.
 

King Dodongo

Member
Oct 27, 2017
7,138
Already looked at a video testing 120fps.
Everything looks great except the intro which is kinda sound desynched
 

SasaBassa

Member
Oct 25, 2017
7,190
Rare footage of Nintendo HQ:

YxUBfFfm19B2gAVsg8g8oPZWBo0=.gif

I understand the recompile is a different scenario thooo
 

Vipershark

Member
Oct 28, 2017
1,537
Rockstar DMCAed the GTA3 and VC decomps. They're not inherently immune to companies coming after them, Nintendo just hasn't yet.
Rockstar's DMCAs went through because those projects presumably had leaked source code in them.

The project leaders claimed that that wasn't true but they didn't have the legal resources to fight Rockstar.

I imagine if another team was to clean room reverse engineer those games again from scratch, it could work.
 

eyeball_kid

Member
Oct 25, 2017
10,323
I would love to see something like this for the PS1, especially because it has so many abandoned-but-great IPs like Bushido Blade, Tobal, Ergheiz, etc. that I'd love to play with a more modern presentation. Is this N64 engine something that could be repurposed for other consoles, or is it purpose-built stuff just for the N64 hardware?
 

RoboitoAM

Member
Oct 25, 2017
3,123
So does this only work with majora's mask so far? And is there a guide for steam deck users?
Here's your guide:

1) open desktop mode on your Deck, go to the Github in the OP using the web browser. There's a Linux version in the Github page, no Windows or Proton needed.
2) Download the recompilation tool, unzip it somewhere. Have the USA ROM for Majora's Mask somewhere and run the compiler, point to the ROM.
3) After that, right click the compiler, "add to Steam", then open gaming mode
4) Enjoy MM PC, press the select button I believe to open settings or toggle them from the menu before playing.
 

Decarbia

Member
Oct 25, 2017
1,473
Stupid question: If this is possible for N64 games, how is there not a similar tool for less complex consoles like NES, SNES and GB? Can a similar tool even exist for those platforms, or is this a N64 only thing?

I'd love to play Pokemon Red on the PC. That Link's Awakening DX port that got C&D'd was so awesome.


View: https://twitter.com/VinciusMedeiro6/status/1734968463754494057

Because N64 games were largely written in C, so translating calls is, simple isn't the word, it is far from simple, but there is a knowledge base there to work from to get from N64 to Vulkan.

Older consoles were straight assembly. Every piece of software is doing something uniquely by and large. Not 100% obviously, they are building on each other, but it isn't nearly as straightforward
 

Anth0ny

Member
Oct 25, 2017
47,637
Because N64 games were largely written in C, so translating calls is, simple isn't the word, it is far from simple, but there is a knowledge base there to work from to get from N64 to Vulkan.

Older consoles were straight assembly. Every piece of software is doing something uniquely by and large. Not 100% obviously, they are building on each other, but it isn't nearly as straightforward

I see. Thanks for the explanation!
 

Goli

Member
Dec 17, 2017
41
Designer
Any chance this means there could be a Sin & Punishment project soon? That's a game I feel would greatly benefit from better es and FPS...
 

TSM

Member
Oct 27, 2017
5,849
I think a lot of people are confused by the high frame rate in MM. The game will render a unique frame for whatever refresh rate your monitor supports, but the game is still only running at 20 fps under the hood. It's similar to what the diablo 2 remaster did. It's amazingly smooth in motion now, but you are still fundamentally limited by everything in the game taking place at 20 fps. The biggest improvement, other than the high frame rate rendering, is the complete elimination of slow down. You are far less likely to have your inputs eaten which could happen during points where the game lagged due to a poor frame rate.
 

Angel Cruijff

Member
Jan 21, 2024
19
Just the idea of being able to run Conker's Bad Fur Day at a stable, modern frame rate is delighting me. I've only played through it once and I've longed to play through it again, but the frame rate was just dire. It was too ambitious a game for the hardware.

Things like improved graphics and modern controls are just a nice shiny cherry on top of the rest of the cake.

You can play the Xbox version (I don't know if it runs on a Xbox Series console). Or maybe they can match that version with mods.
 

DeadDuck144

One Winged Slayer
Member
Jan 16, 2020
662
How moddable would recompilation be beyond just framerate and resolution? Like for example, with Banjo-Kazooie, would it be possible to add the option to a recomp to make notes save like they do in the XBLA remaster? Or would only a decompilation make that possible?
I'm sure it's possible. Anything possible in a decomp is possible in a recomp; just a lot harder to read because of how the code is translated. The Banjo-Kazooie decomp is pretty far along though, so a modder may be able to reference that.

You can play the Xbox version (I don't know if it runs on a Xbox Series console). Or maybe they can match that version with mods.
Live & Reloaded is Enhanced, so runs 4k (technically 1920p, the 4:3 equivalent) 60fps on Series X and One X. 1440p on Series S and 1080p (960p) on Xbone. However, the script was heavily toned down, to the point many people prefer the N64 game. No realistic amount of mods will put the N64 release on-par with Live & Reloaded visually though since it was a full remake.
 
Last edited:

Diemza

Member
Jun 30, 2019
101
That's so wonderful, I have a lot of good times with n64 when I was little kid back then, thanks for the effort !
 

Anth0ny

Member
Oct 25, 2017
47,637
Oh man Banjo Kazooie PC mods with Stop n Swop restored is gonna be awesome.

I'd also appreciate a mod in the style of Render 96 for SM64 where someone takes/creates models that look just like the CG art from the 90s and plop it into the game itself.

Wl5Tevj.jpeg


This is going to be a lot of fun for the N64 kids :)
 

parski

It's Pronounced "Aerith"
Member
Nov 13, 2017
687
The analog stick's range isn't corrected -- the N64 controller's analog stick has a shorter range than modern controllers, so when you use a modern controller with N64 games, everything is far too sensitive. I was having issues with the camera moving too fast while aiming my arrows at the shooting gallery, for example.

Unfortunately this port doesn't currently have a setting to fix the range, but the developer wrote on the GitHub that it's a planned feature. So I'm sure it'll be there soon.
That makes a lot of sense. I tried it with a Flydigi Vader 3 Pro and a GameSir T4 Kaleid and both exhibit this behavior in both Switch and Xinput mode. I might be able to create a Majora's Mask profile for the controller in the mean time. I found the Deku rupee mini game in northern Clock Town especially challenging.
 

Herne

Member
Dec 10, 2017
5,366
You can play the Xbox version (I don't know if it runs on a Xbox Series console). Or maybe they can match that version with mods.
I don't have an XBox and from memory, the script was toned down. I originally played it on the N64 and to be honest, I'd love to play that version again with the original graphics, if enhanced. I honestly preferred the original look to the changes they made with regard to colour tones, lighting and the added fur. Of course technically the XBox version destroys the N64 original, but for me they changed the look of it too much. The lighting for example is technically miles ahead, but it gave the game this slightly realistic look over the pure cartoony bright colours of the original.

An excellent comparison of the two with the different approaches to lighting and tone are in this video -


View: https://m.youtube.com/watch?v=kLwExBwI4u4

I don't know if the later versions that came out on more modern hardware are any different but having never played the XBox version I'll have no nostalgia for it. As far as I'm aware the XBox game cut out some of my favourite multiplayer modes and I'd love to introduce my nephews to those if I can finally get the original game running at a decent clip.
 
Last edited:

RadzPrower

One Winged Slayer
Member
Jan 19, 2018
6,112
I'm sure it's possible. Anything possible in a decomp is possible in a recomp; just a lot harder to read because of how the code is translated. The Banjo-Kazooie decomp is pretty far along though, so a modder may be able to reference that.
Yeah, a very simplified take on the general difference between a decomp and a recomp as I understand them:

Decompilation:
  1. Tends to start with an automated decompilation via software to get some base code that's ugly but compiles to an exact duplicate of the original ROM file.
  2. Teams then take years going through that ugly autogenerated code to figure out what everything actually does, document it, and rename variables, functions, etc. to the point where they are easily understood.
  3. Typically another team then comes in and converts certain N64 calls into equivalent calls for modern systems.
With a recompilation however, it sounds like steps 1 and 3 above are combined into a single process and step 2 is skipped entirely. This eliminates those years taken to make the code developer-friendly, but results in code that's basically only really useful to players who just want the thing to run. Modding will still highly rely on decomp projects or their equivalent with recomp projects (i.e. take the code generated by the recomp process and document it instead).

I don't see decomp's going away any time soon because that specific segment of interest will likely remain because most decomp projects stop at the point of generating a ROM because THAT is their goal rather than a PC port. They want to be able to build something that runs natively on the original hardware and NOT elsewhere.

In terms of what gets mass online attention though, I definitely see recomps becoming the internet at large's darling.
 

FluffyQuack

Member
Nov 27, 2017
1,366
Stupid question: If this is possible for N64 games, how is there not a similar tool for less complex consoles like NES, SNES and GB? Can a similar tool even exist for those platforms, or is this a N64 only thing?

I'd love to play Pokemon Red on the PC. That Link's Awakening DX port that got C&D'd was so awesome.


View: https://twitter.com/VinciusMedeiro6/status/1734968463754494057

Here's one made for the NES: https://github.com/andrewrk/jamulator

Though, the creator of that project personally concluded he'd rather go with JIT compilation: https://andrewkelley.me/post/jamulator.html#conclusion
 
Nov 14, 2017
2,850
Yeah, a very simplified take on the general difference between a decomp and a recomp as I understand them:

Decompilation:
  1. Tends to start with an automated decompilation via software to get some base code that's ugly but compiles to an exact duplicate of the original ROM file.
  2. Teams then take years going through that ugly autogenerated code to figure out what everything actually does, document it, and rename variables, functions, etc. to the point where they are easily understood.
  3. Typically another team then comes in and converts certain N64 calls into equivalent calls for modern systems.
With a recompilation however, it sounds like steps 1 and 3 above are combined into a single process and step 2 is skipped entirely. This eliminates those years taken to make the code developer-friendly, but results in code that's basically only really useful to players who just want the thing to run. Modding will still highly rely on decomp projects or their equivalent with recomp projects (i.e. take the code generated by the recomp process and document it instead).

I don't see decomp's going away any time soon because that specific segment of interest will likely remain because most decomp projects stop at the point of generating a ROM because THAT is their goal rather than a PC port. They want to be able to build something that runs natively on the original hardware and NOT elsewhere.

In terms of what gets mass online attention though, I definitely see recomps becoming the internet at large's darling.
So basically, rather than end users waiting for years for the decompilation to be finished to get a working PC port, now recompilation will allow that in a fraction of the time, with the trade-off being that the port will be fairly simple and we'll still have to wait for the decomp to get mods on the level of the SM64 or OoT ports?

Either way I'm excited, because the Banjo-Kazooie decomp has been stuck at 98% for a year at this point and I don't even think Tooie has a decomp started yet, but a recomp could see BK or even both playable on PC by the end of the year.
 

El meso

Member
Oct 27, 2017
556
Can we add this as a non steam game and use the cloud save feature? Would be awesome to play at 4k120fps on the PC and get back right away on the steam deck
 

RadzPrower

One Winged Slayer
Member
Jan 19, 2018
6,112
So basically, rather than end users waiting for years for the decompilation to be finished to get a working PC port, now recompilation will allow that in a fraction of the time, with the trade-off being that the port will be fairly simple and we'll still have to wait for the decomp to get mods on the level of the SM64 or OoT ports?

Either way I'm excited, because the Banjo-Kazooie decomp has been stuck at 98% for a year at this point and I don't even think Tooie has a decomp started yet, but a recomp could see BK or even both playable on PC by the end of the year.
Depends on how complicated any issues with the recompilation are since they have to be fixed before a playable version is viable. This becomes simpler with games that are completely or largely decompiled already like Majora's Mask or Banjo-Kazooie since you can reference the decomps and potentially use them to help you solve the problem. So, it is still going to be a case-by-case on how viable recomps are as well.

As a general rule, however, it certainly looks like that is potentially how things could go in the future.

There's also nothing technically stopping somebody from modding from the base recomp as well, it's just not something I'd imagine is very fun to do.
 

FluffyQuack

Member
Nov 27, 2017
1,366
Yeah, a very simplified take on the general difference between a decomp and a recomp as I understand them:

Decompilation:
  1. Tends to start with an automated decompilation via software to get some base code that's ugly but compiles to an exact duplicate of the original ROM file.
  2. Teams then take years going through that ugly autogenerated code to figure out what everything actually does, document it, and rename variables, functions, etc. to the point where they are easily understood.
  3. Typically another team then comes in and converts certain N64 calls into equivalent calls for modern systems.
I'd say your description is more fitting static recompilation than reverse engineering the code. When manually re-creating a source code, I'm pretty sure it's step 1 that takes the longest amount of time, and you would combine it with 2. That, or I'm doing something seriously wrong with my approach trying to reverse engineer Prince of Persia 2. I wish there was a way to get an automatic decompilation that I could immediately compile and run. Once you get to the point you can compile and run something, it becomes drastically easier and faster to document the code.