Nintendo 64

how-to-port-any-n64-game-to-the-pc-in-record-time

How to port any N64 game to the PC in record time

Enlarge / “N-tel (64) Inside”

Aurich Lawson | Getty Images

In recent years, we’ve reported on multiple efforts to reverse-engineer Nintendo 64 games into fully decompiled, human-readable C code that can then become the basis for full-fledged PC ports. While the results can be impressive, the decompilation process can take years of painstaking manual effort, meaning only the most popular N64 games are likely to get the requisite attention from reverse engineers.

Now, a newly released tool promises to vastly reduce the amount of human effort needed to get basic PC ports of most (if not all) N64 games. The N64 Recompiled project uses a process known as static recompilation to automate huge swaths of the labor-intensive process of drawing C code out of N64 binaries.

While human coding work is still needed to smooth out the edges, project lead Mr-Wiseguy told Ars that his recompilation tool is “the difference between weeks of work and years of work” when it comes to making a PC version of a classic N64 title. And parallel work on a powerful N64 graphic renderer means PC-enabled upgrades like smoother frame rates, resolution upscaling, and widescreen aspect ratios can be added with little effort.

Inspiration hits

Mr-Wiseguy told Ars he got his start in the N64 coding space working on various mod projects around 2020. In 2022, he started contributing to the then-new RT64 renderer project, which grew out of work on a ray-traced Super Mario 64 port into a more generalized effort to clean up the notoriously tricky process of recreating N64 graphics accurately. While working on that project, Mr-Wiseguy said he stumbled across an existing project that automates the disassembly of NES games and another that emulates an old SGI compiler to aid in the decompilation of N64 titles.

YouTuber Nerrel lays out some of the benefits of Mr-Wiseguy’s N64 recompilation tool.

“I realized it would be really easy to hook up the RT64 renderer to a game if it could be run through a similar static recompilation process,” Mr-Wiseguy told Ars. “So I put together a proof of concept to run a really simple game and then the project grew from there until it could run some of the more complex games.”

A basic proof of concept for Mr-Wiseguy’s idea took only “a couple of weeks at most” to get up and running, he said, and was ready as far back as November of 2022. Since then, months of off-and-on work have gone into rounding out the conversion code and getting a recompiled version of The Legend of Zelda: Majora’s Mask ready for public consumption.

Trust the process

At its most basic level, the N64 recompilation tool takes a raw game binary (provided by the user) and reprocesses every single instruction directly and literally into corresponding C code. The N64’s MIPS instruction set has been pretty well-documented over years of emulation work, so figuring out how to translate each individual opcode to its C equivalent isn’t too much of a hassle.

Wave Race 64.” height=”360″ src=”https://cdn.arstechnica.net/wp-content/uploads/2024/05/recomprt2-640×360.png” width=”640″>

Enlarge / An early beta of the RT64 renderer shows how ray-tracing shadows and reflections might look in a port of Wave Race 64.

The main difficulty, Mr-Wiseguy said, can be figuring out where to point the tool. “The contents of the [N64] ROM can be laid out however the developer chose to do so, which means you have to find where code is in the ROM before you can even start the static recompilation process,” he explained. And while N64 emulators automatically handle games that load and unload code throughout memory at runtime, handling those cases in a pre-compiled binary can add extra layers of complexity.

How to port any N64 game to the PC in record time Read More »

valve-request-takes-down-portal-64-due-to-concerns-over-nintendo-involvement

Valve request takes down Portal 64 due to concerns over Nintendo involvement

Doing what they can because they must —

It’s not the use of Portal, it’s the use of an N64 SDK that’s the issue.

Window open inside Portal 64

Enlarge / Valve took a look inside Portal 64, saw itself inside near something involving Nintendo, and decided to shut down the experiment.

Valve/James Lambert

Any great effort to generate appreciation for Nintendo’s classic platforms, done outside Nintendo’s blessing, has a markedly high chance of incurring Nintendo’s wrath. This seems to apply even when Nintendo has not actually moved to block something, but merely seems like it might.

That’s why, one week after announcing that his years-long “demake” of Valve’s classic Portal to the Nintendo 64 platform had its “First Slice” ready for players, James Lambert has taken down Portal 64. There’s no DMCA takedown letter or even a cease-and-desist from Nintendo. There is, as Lambert told PC Gamer, “communication with Valve” that “because the project depends on Nintendo’s proprietary libraries, [Valve] have asked me to take the project down.”

Ars contacted Valve and Nintendo for comment and will update the post with any new information. Lambert could not be reached for comment.

It’s far from the first time Valve has taken preemptive action to avoid Nintendo’s involvement. In mid-2023, a Wii/GameCube emulator, Dolphin, halted its planned release on Valve’s Steam platform after Nintendo contacted Valve and requested the emulator not be released. In that case, the Dolphin emulator’s weakness to potential action under the Digital Millennium Copyright Act’s anti-circumvention provisions was its use of a proprietary cryptographic key from the Wii. Rather than argue about keys, BIOS files, and other matters in court, Dolphin gave up on Steam, while keeping the project alive elsewhere.

Valve has seemingly been silent on Portal 64 until now. Playing the game required access to a Steam-purchased copy of Portal, with one of that game’s data files then patched by Lambert’s software to work inside Nintendo 64 emulators. Lambert wasn’t charging for his project, although he did have a Patreon to further his work on it. Lambert told PC Gamer that he thought “Valve didn’t want to be tied up in a project involving Nintendo IP,” and he didn’t blame them.

The “Nintendo’s proprietary libraries” at issue inside Lambert’s project appear to be Libultra, the official SDK provided to those developing Nintendo 64 games on Silicon Graphics machines (and later other platforms). There exists an open source N64 SDK, libdragon, but Lambert told PC Gamer that he wouldn’t move over to that without assurance that it would appease Valve—and, by proxy, Nintendo. Lambert has many more N64-related and adjacent projects to work on, judging from his YouTube channel.

Nintendo has been remarkably successful over the years at keeping games and tributes it didn’t make from remaining in place: cover art for emulated Switch games, explanations of emulator installation, fan games, Game & Watch hacks, and even Mario-themed Minecraft videos. The company has created a general atmosphere of legal fear around anything touching its properties. That extends, apparently, even to large, well-resourced companies with far more tolerance for fan hacking.

Valve request takes down Portal 64 due to concerns over Nintendo involvement Read More »

portal-64-is-an-n64-demake-of-valve’s-classic,-now-available-as-a-“first-slice”

Portal 64 is an N64 demake of Valve’s classic, now available as a “First Slice”

For the consoles that are still alive —

It’s shocking how good the Portal Gun feels on late 1990s tech.

The Portal Effect, or seeing oneself step through sideways.

Enlarge / Remember, this is the N64 platform running a game released at least five years after the console’s general life cycle ended.

Valve/James Lambert

James Lambert has spent years making something with no practical reason to exist: a version of Portal that runs on the Nintendo 64. And not some 2D version, either, but the real, blue-and-orange-oval, see-yourself-sideways Portal experience. And now he has a “First Slice” of Portal 64 ready for anyone who wants to try it. It’s out of beta, and it’s free.

A “First Slice” means that 13 of the original game’s test chambers are finished. Lambert intends to get to all of the original’s 19 chambers. PC Gamer, where we first saw this project, suggests that Lambert might also try to get the additional 14 levels in the Xbox Live-only Portal: Still Alive.

So why is Lambert doing this—and for free? Lambert enlists an AI-trained version of Cave Johnson’s voice to answer that question at the start of his announcement video. “This is Aperture Science,” it says, “where we don’t ask why. We ask: why the heck not?”

The release video for Portal 64’s “First Slice”

Lambert’s video details how he got Portal looking so danged good on an N64. The gun, for example, required a complete rebuild of its polygonal parts so that it could react to firing, disappear when brought up to a wall instead of clipping into it, and eventually reflect environmental lighting. Rounding out the portals required some work, too, with more to be done to smooth out the seeing-yourself “Portal effect.”

To try it out, you’ll need a copy of Portal on PC (Windows). Grab the “portal_pak_000.vpk” file from inside the game’s folder, load it onto Lambert’s custom patcher, and you’ll get back a file you can load into almost any N64 emulator. Not all emulators can provide the full Portal experience by default; I had more luck with Ares than with Project 64, for instance.

  • “It’s just so much better,” Lambert says of the latest version of the portal gun.

    Valve/James Lambert

  • The “Portal Effect,” as seen inside the Ares N64 emulator.

    Valve/James Lambert

  • Remember, this is the N64 platform running a game released at least five years after the console’s general life cycle ended.

    Valve/James Lambert

  • How that familiar title screen looks, circa 2000-ish.

    Valve/James Lambert

  • On the Project 64 emulator, I couldn’t see through the portals.

    Valve/James Lambert

  • A bit more polygonal flavor for you. Note that I bumped the resolution way, way up from the N64’s original for these latter screenshots.

    Valve/James Lambert

How does it run? Like the nicest game I ever played on Nintendo’s early-days-of-3D console. It does a lot to prove that Portal is just a wonderful game with a killer mechanic, regardless of how nice you can make the walls. But the game is also a great candidate for this kind of treatment. The sterile, gray, straight-angled walls of an Aperture testing chamber play nicely with the N64’s relatively limited texture memory and harsh shapes.

Lambert has a Patreon running now, and support does a few things for him. It allows him to pay a video editor for his YouTube announcements and regular updates, it could pay for a graphics artist to polish up the work he’s done by himself on the game, and it could even free him up to work full-time on Portal 64 and other N64-related projects.

His fans are already showing their appreciation. One of them, going by “Lucas Dash,” helped create a box and cartridge for the game. Another, “Bloody Kieren,” created an entire Portal 64-themed N64 console and controller. These people have put serious energy into imagining a world where Valve produced Portal in a completely different manner and perhaps fundamentally reshaped our timeline—and I respect that.

Portal 64 is an N64 demake of Valve’s classic, now available as a “First Slice” Read More »