N64 Recompiled interview: Diving into the game-changing twist on emulation

"I didn't expect to get nearly this much attention," says the programmer behind the native PC port of Majora's Mask. Is it emulation? We'll get into that.

N64 Recompiled interview: Diving into the game-changing twist on emulation

Thirteen months and two weeks after writing the second-ever issue of ROM on the shinkansen, I am, once again, writing about emulation on the shinkansen (and bonus train: the JR Thunderbird!). Last time I was leaving Kyoto via high speed rail; this time I'm headed there, on a beautiful, intermittently sunny-then-rainy-then-sunny spring day. In other words, I couldn't be more thoroughly back on my bullshit.

As I'm on a short vacation I'll be trying to keep this edition a bit on the speedy side, but it's tough when there's so much cool stuff going on right now. Cool stuff like beaming your 3DS games to an emulator I haven't even had time to look into, for example:

GitHub - PabloMK7/ArticBaseServer: 3DS Game Broadcaster
3DS Game Broadcaster. Contribute to PabloMK7/ArticBaseServer development by creating an account on GitHub.

And I could probably oopsie out 3,000 words just on follow-ups to the big stories of the last month, like what's going on with Taki Udon's $99 MiSTer board (as detailed in last issue's interview!) or what else has dropped in the rapidly changing iOS emulation scene. But we can't devote too much time to either of those things when there's a hotter, newer topic to jump into: N64 Recompiled, from modder Wiseguy, which promises to make emulation as we know it obsolete.

Jk jk, put your keyboards down forum warriors β€” it doesn't do that at all, nor does it attempt to! Software and hardware emulation both still have their place and always will, but N64 Recompiled is an incredibly exciting project. While not strictly emulation, it's so closely linked to the core experience of playing games on alternative hardware that it counts for our purposes here. Our main event this issue is an interview with modder Wiseguy, breaking down how this differs from prior decompilation projects (e.g. painstakingly reverse-engineered ports of console games to code that can natively run on another platform, typically PC) and how it could serve as a framework for, theoretically, the entire N64 library to receive enhanced ports far beyond what you typically get from emulation.

The utopia we've always longed for β€” 360 fps Buck Bumble β€” is at last within our reach.

I haven't done any retro game shopping while in Japan just yet, but I do hope to track down a copy of Rowdy Princess while here for Hilltop Works' and Cargodin's upcoming translation. So for now, I'll leave you with a few random photos of my last whirlwind week.

Oh, and one last thing β€” if you're a new reader who's signed up in the last couple weeks after finding ROM through my interview with Taki Udon or my latest guest appearance on Brad & Will's Techpod where I talked about my recent RSS awakening (there are a lot of you!), welcome. I hope you enjoy! If you're reading via email, feel free to respond to this here newsletter with any thoughts you have. On the website you can leave a comment if you so fancy, and you can also find me pretty active on Bluesky. πŸ’½


The Big Two

1. How N64 Recompiled turns old games into shiny new PC ports

To the tune of half a million views in about a week, an 11 minute video from YouTuber Nerrel titled Recompilation: An Incredible New Way to Keep N64 Games Alive has cemented the surprise release of a playable The Legend of Zelda: Majora's Mask PC port as May's hot topic. It's a great overview and introduction of N64 Recompiled, a tool from modder Wiseguy that essentially takes any Nintendo 64 game and converts it to code that a PC can run natively. "I didn't expect to get nearly this much attention, so I figured it'd just a few friends asking me how to use it rather than what it's ended up being," he says.

In the past we've seen decompilation projects that focus in individual games, dissecting their code so that it can then be run natively on another system; Mario 64 and Ocarina of Time have both gotten this treatment, as have the first couple Jak & Daxter games.

These are awesome endeavors, but the goal of N64 Recompiled is to produce the same sort of natively running ports without so much specialized game-by-game reverse-engineering. Watching Nerrel's video is a great place to start with understanding how N64 Recompiled works and how it differs from the projects we've seen before, but I had a few questions of my own for Wiseguy, too.

First, and most obviously: How does recompilation, when you get right down to the code, differ from emulation? Wiseguy has a meaty answer.

"It's a technique that's been around for a while, but hasn't been explored much in the space compared to traditional emulation. The readme of the N64Recomp repo on my Github gives a few other examples of static recompilation, and I've heard it's been used commercially as well. In general, there are a few main differences between this and traditional emulation.

The first and most obvious is that the code is being run natively, so it's much faster since the emulator doesn't have to translate the original CPU instructions while the game is running or put artificial speed limits on the game to act like it was running on N64 hardware. The static recompilation process is also able to optimize the translated code much more than dynamic recompilation (the technique most emulators use to translate the instructions while the game is running), since all of the game's code is all available to the compiler during the optimization process.

Another major difference is that static recompilation allows the game's code to directly interact with the the platform it's being run on, instead of needing to go through the interface that the original hardware provided. Gyro aiming is a good example of this, as the game's code was modified to just directly read inputs from the mouse or controller, rather than needing to add some custom functionality to an emulator and then modify the game to interact with that custom functionality. This really streamlines the process of adding enhancements, since it's not far off from how you'd add that functionality to an actual modern game engine."

Spiritually I'd say this static recompilation technique is very much emulation, even if the underlying hardware of an original game console is essentially being removed from the equation. With that aspect of recompilation in mind, it's not too hard to intuit that recompilation would come with some significant performance advantages over traditional emulation. This is immediately obvious when running Wiseguy's first release, Majora's Mask; on my Steam Deck it's crisp HD and a smooth 60 fps that feels downright eerie if you've ever played the herky jerky original on N64. It's too good! But that's just the baseline of what this technique can accomplish. Why not 360 fps, instead of 60?

Okay, so if it's so awesome, why haven't we seen someone take this approach before now? Well, we have; Cicoparser, for instance. It just hasn't gotten this much buzz, probably because this is the clearest demonstration of the advantages of running native code that we've seen.

"Traditional emulation will always have the advantage of being able to run everything without having to spend time on every individual game (besides fixing emulation bugs that pop up in specific games)," says Wiseguy. "While this particular static recompilation approach is generic, it's still more work on a per-game basis than developing an emulator. I also don't know enough about other platforms to know which others this approach will work for, so it may be that only some fall into the sweet spot where static recompilation is viable."

So how do we go from Wiseguy's single released "port" so far to the entire N64 library? Well, that's going to require eager hobbyists to go game-by-game creating implementations. But the good news is this process is far, far simpler than the decompilation. Here's the basics of how it works, according to Wiseguy:

"The main thing that's required for running N64 Recomp is understanding where code is in the ROM. N64 ROMs are basically just a collection of code, data, and assets, with no standard organization for how they're laid out. Some ROMs have all the code in one place, some ROMs have code and assets interleaved, and some even have compressed code. I won't get too technical, but with all that said modern tooling and emulators can make it pretty easy to find it these days. As mentioned in Nerrel's video, it took me about two days to get one of the other games I tested running (though of course that's with the fact that I'm very familiar with all the tooling already).

There are tools that can help identify the contents of a ROM, but to me the best way to figure it out is to begin at the startup process. The startup process is always the same, so you can begin from there and follow how the ROM runs to find all the other code that it contains. This can be done by either looking at the ROM's startup code directly, or by examining it while it's running in an emulator. From there you may see it load more code from the ROM, which would tell you where it exists in the ROM. It's not a time consuming process (I did it for Superman in the course of a couple days), but it is pretty technical and requires knowledge about how the system works."

How much work it takes to create a port will vary by game, then, and Wiseguy says there's a "knowledge gap" in the documentation which he's working on improving. That will make it easier for other folks to work with N64 Recomp in the coming months. The resulting ports should be able to run with improved resolutions and framerates on practically any PC; Wiseguy says he's tested on a dual core Pentium CPU and Nvidia GT 630 β€” hardware that's more than a decade old and was cheap even when it came out β€” and Majora's Mask runs just fine.

Android support is even a possibility down the line, but isn't currently in the works.

"Android support is possible on paper and there'd be more than enough computing power, but there are a lot of nuances when dealing with GPU drivers on Android so I wouldn't expect it to happen any time soon," he says.

The real game changer of N64 Recompiled β€” as if great performance wasn't enough! β€” is the modding it enables. We could see even more all-encompassing game overhauls than the usual romhacks, but the graphics editing is gonna be on a whole 'nother level. That's thanks to another tool that N64 Recompiled ties into: Dario's RT64 rendering engine.

"N64Recomp serves two main purposes in the relationship between the two projects," says Wiseguy. "The first is creating a way to run the game's code, of course. This allows the game to run and send its graphics commands to RT64, not unlike how RT64 would interact with an emulator. The second is the system that it has for patching code, which allows me to modify the game's code as needed to give RT64 any extra information required for the enhancement features. For example, there are patches that give RT64 extra information for tracking objects between frames and patches that tell which side of the screen to justify HUD elements against so the HUD adapts to any aspect ratio. N64Recomp's patching system is very flexible, and it's almost as easy as directly modifying the decompilation."

Just at a base level RT64 provides a great visual experience, cleaning up the muddy low res graphics of N64 games. Granted these textures and models were never designed to be this crisp, but I'm sure we'll see a bumper crop of CRT filters and whatnot pop up around this project in record time. What comes next? Well, RT64 supports path tracing (aka uber ray tracing), though the feature isn't available to use yet. According to Dario, "there's a lot of technical and artistic work involved in getting even one game to work, and it'll certainly depend a lot on the scale of the game and the type of content."

"Some games can provide some lighting data that helps, such as dynamic lights from objects like torches or the fairy floating around Link" in Majora's Mask, Dario explains. "But for the most part, the lighting data used for a game is unlikely to be usable, as there's little to no positional data to work with regarding where the light source is. Even if there is, sometimes the color values require a lot of tweaking to get a visually pleasing result. The closest equivalent I can give to the process is what we've seen in games where RTX Remix is applied: the results will look very rough for an unmodified game at first, but they can be touched up to achieve some of the results I've showcased in the teasers so far. In a similar vein to Remix, the path tracing component of RT64 is basically a toolkit for people to remaster a game with enough time and effort."

Ocarina of Time and Banjo Tooie are both coming from Wiseguy himself, but I'm psyched to see how many other people jump aboard the N64 Recomp train and start making their own ports and mods for those ports. Now might be a very good time to invest in an Open Source Cart Reader.


2. Are there too many emulation handhelds? I'm starting to think there are too many emulation handhelds

A likely not-exhaustive (but exhausting) list of recent releases/announcements, presented with no further comment cause I gotta get off this train soon.

AYANEO’s Game Boy-Style Pocket DMG Boasts An OLED Screen
Powered by the Snapdragon G3x Gen 2
AYANEO Shows Off Their NEW Pocket Micro Retro Gaming Handheld
AYANEO announced the new Pocket Micro today, a slim horizontal handheld inspired by the Game Boy Micro that plays GBA games at 4x resolution!
Odin 2 Maker AYN’s Next Handheld Has PS Vita Vibes And A Mini LED Display
Update: Price is revealed
Miyoo A30 released today for 49$ or 56€
by u/UomoDargilla in SBCGaming

Patching In

iOS emulation roars ahead with Retroarch, PPSSPP and more – Yowza! We sure went from "maybe you'll be able to put emulators on iOS now" to "well let's emulate every goddang thing on iOS" faster than anyone saw coming. Everything till comes with an asterisk right now, due to lack of JIT support needed for more modern consoles (as detailed in this issue). But here's the big stuff that's dropped in just the last two weeks:

  • Retroarch – Supporting literally dozens of consoles, PCs, and arcade platforms via multiple cores, this version of Retroarch notably includes a bundle of Nintendos (DS, Nintendo 64, and Virtual Boy alongside NES/SNES/GB), the Sega Saturn, the PS1, a lotta Commodores, Ataris, the WonderSwan Color, the NEC PC Engine (and CD) and a lot more. Jeff Gerstmann wrote about using iOS Retroarch over on his Patreon (free for all to read), so that's your ticket for some impressions. He notes that copying over games is "an extreme pain in the ass" so be at peace with that if you're planning to turn your iPad into a 30-in-one console emulator.
  • PPSSPP – The fabulous PSP emulator is also now live on iOS! Creator Henrik RydgΓ₯rd notes that while PPSSPP's JIT compiler can't be used, which "is unfortunate since without it, our CPU emulation performance is reduced." The good news: Apple makes blazing fast hardware, so if you're not trying to play on a really old device you're probably gucci: "iOS devices are generally fast enough to run nearly all PSP games at full speed anyway, as the PSP CPU is not that expensive to emulate, thanks to our efficient IR-based caching interpreter, which also has further room for improvement." More updates for this version of PPSSPP to come, including RetroAchievements, iPad Magic Keyboard support, and Vulkan support.
  • "And more!" – Folium includes 3DS, DS and GBA cores. Frotz is dedicated to Infocom text adventures including Zork and The Hitchhiker's Guide to the Galaxy.

Is that a 4K PS2 game in your pocket, Sony, or are you just happy to see me? As reported by Ars Technica, it looks like we might be seeing "PS2 Classics" playable on PS5 as they were on PS4, with "up-rendering, rewind, quick save, and custom video filters." If this doesn't let you put a disc in the console and play a wide variety of games a la Xbox back compat, Sony can keep it imo, but we'll see. Curious about the emulation quality considering Sony's history of not doing its classic library justice.


Core Report

New MiSTer core online: Irem M107 – Another arcade core comes to the MiSTer! Initial support is for Air Assault and Fire Barrel, with Dream Soccer still to come.


Translation Station

Shining a light on Earth Light – A strategy game from Hudson has to at least be worth a look, and this is a pretty cute one. Advance Wars-ish? But more sci-fi. Now in English, even correcting some mistranslations in its original (otherwise entirely Japanese) release.


Good pixels

Taking a trip down memory lane with Noirlac, the one-time Tumblr PC-88 pixel champion.

https://www.tumblr.com/noirlac/685299305850994688
https://www.tumblr.com/noirlac/640809778334089216
https://www.tumblr.com/noirlac/187103178832
Mastodon