Mario

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 »

after-decades-of-mario,-how-do-developers-bridge-a-widening-generation-gap?

After decades of Mario, how do developers bridge a widening generation gap?

A prototype wonder effect—featuring Mario's head turned into blocks that could be eaten by enemies—didn't make it into the final game.

Enlarge / A prototype wonder effect—featuring Mario’s head turned into blocks that could be eaten by enemies—didn’t make it into the final game.

Nintendo

In a game industry that seems to engage in periodic layoffs as a matter of course, it’s often hard for even popular game franchises to maintain continuity in their underlying creative teams from sequel to sequel. Then there’s the Mario series, where every person credited with the creation of the original Super Mario Bros. in the 1980s ended up having a role in the making of Super Mario Bros. Wonder just last year.

In a recent interview with Ars Technica, Wonder producer Takashi Tezuka said it wasn’t that tough to get that kind of creative continuity at Nintendo. “The secret to having a long-tenured staff is that people don’t quit,” he said. “For folks who have been there together for such a long time, it’s easy for us to talk to each other.”

That said, Tezuka added that just getting a bunch of industry veterans together to make a game runs the risk of not “keeping up with the times. Really, for me, I have a great interest in how our newer staff members play, what they play, what they think, and what is appealing to them. I think it’s very interesting the things we can come up with when these two disparate groups influence each other to create something.”

Young and old

For Super Mario Bros. Wonder, the development team solicited literally thousands of ideas for potential game-changing Wonder Effects and badges from across Nintendo. In doing so, the game was able to incorporate the viewpoints of people with a wide variety of histories and memories of the series, Tezuka told Ars.

  • Super Mario Bros. Wonder Producer Takashi Tezuka.

    Nintendo

  • Super Mario Bros. Wonder Director Shiro Mouri.

    Nintendo

“Among our staff, there are folks who actually maybe haven’t played some of the [older] game titles we’re talking about,” he said. “So I think there was some familiarization for those folks with some of those titles. And maybe there was some inspiration drawn from those titles that I’m not aware of.”

For a series as long-running as Mario, though, even some of the relatively “younger” development cohort can have a deep history with the series. Super Mario Bros. Wonder Director Shiro Mouri, who joined Nintendo in 1997, recalled playing the original Super Mario Bros. back in elementary school, and being “so moved and awed by the secrets and mysteries I discovered in that game.” The Wonder Effects in Wonder were an explicit attempt to recapture that feeling of being young and discovering new things for the first time, which can be difficult in such an established series.

Mouri also drew some parallels between Yoshi’s Island—where Yoshi could sometimes turn into a vehicle—and Wonder transformation effects that could turn the player into slime or a spiky ball, for instance. “That’s not to say that we drew [direct] inspiration from [Yoshi’s Island] or anything, but I think… providing surprises has always been a theme throughout our philosophy,” he said.

After decades of Mario, how do developers bridge a widening generation gap? Read More »