Ocarina of Time PC Port Set for February Release

Enlarge / Hey! To listen! It runs on PC!

In November, the Zelda Reverse Engineering team announced that they had completed their months-long decompilation project. The Legend of Zelda: The Ocarina of Timefully human-readable C-code ROM. Now, a group building on that work says they’re nearing the release of a fully moddable PC port of the game.

The Harbor Masters coding team (which shares some members with but is separate from the Zelda RET project) said their porting effort is currently around 90% complete. The project will hopefully be ready for release as a public repository by the end of February, lead developer Kenix told Ars Technica. But while the game’s massive decompilation undertaking provides a good foundation, going from C code to a fully functional PC version of Nintendo’s 1998 classic isn’t just about telling a compiler to “build for PC”.

Actors and assets

When the Harbor Masters began serious work on the PC port in December, Kenix said they “started by removing all the actors [e.g., interactive objects like enemies, signposts, and bombable walls] and many of the game’s systems to simplify the build process and what needs to be changed to load it.” These actors and systems were slowly added back once other asset loading issues had been resolved.

“It gave us great results after only a few hours of work thanks to what we learned about the ‘minibuild,'” Kenix said.

The reverse-engineered code base – which deals with game logic, controls, etc. – is also completely separate from the in-game “assets” that make up the look and feel of The ocarina of time. This includes visual textures, music, and sound effects, but also more basic building blocks like skeleton meshes, scenes, rooms, and even 3D vertices and “display lists” that describe in-game objects. .

Scenes like this may soon grace your Windows PC.

Scenes like this may soon grace your Windows PC.

End users will need to use a tool to extract these assets from a Ocarina of time ROM and in an external archive, which will not be distributed with the final version of the next PC port. “Our belief is that this will prevent a DMCA takedown by Nintendo on any .exe,” Kenix said. The release does not offer a fully compiled executable, like a previous port of Super Mario 64 do. “This is completely separate from SM64, and we hope it does better than how this one was released.”

But getting these external assets to work well with the port executable wasn’t easy. Kenix told Ars the Ocarina of time The PC port “has a much more similar asset loading pipeline to modern games” than to classic N64 titles. While the original ROM simply used memory pointers to reference data, the port instead uses strings to mark assets at specific locations in the separate archived package.

“We have come up with a system that will generate a header file that will replace the pointer symbols with a string reference to the path in the archive, and the use of the symbol will use the string rather than the pointer”, Kenix said. “From there we pass the string to the resource manager and it loads the asset on a separate thread on demand… Most of our work has been importing/exporting different types of game assets. “

Fortunately, however, once a large asset class was converted to run under this system, everything fell into place without too much extra manual work, Kenix said. “Our asset management system, including import/export routines, has proven to be quite robust.”

Even now, however, Kenix said certain types of assets like skyboxes and pre-rendered rooms don’t work well with the port. A few other rendering issues also surfaced. The team is also looking to decompile the game’s musical sequences, which are stored in a proprietary MIDI-like format, and the encoded audio samples.

Getting the skeletal mesh of this skeleton into a PC-ready form wasn't easy.
Enlarge / Getting the skeletal mesh of this skeleton into a PC-ready form wasn’t easy.

Despite all this hassle, the Harbor Masters team is one step ahead of the team that carried Super Mario 64 to PC. It’s because Ocarina of time can use the same “Fast3D” render engine that was coded from scratch for the SM64 Harbor. The engine converts N64 microcodes into OpenGL or DirectX calls for easy rendering on the PC.

While the OOT requires support for some “new” microcodes that were not used in Super Mario 64 (like pre-rendered backgrounds), Kenix said that about 80% of the rendering pipeline is overlapping, which saves a lot of porting time. The reuse of Fast3D also means that much-requested widescreen support will be ready for the OOT port from day one, Kenix said.

For future N64 PC porting efforts, Kenix said the Harbor Masters team is also developing a comprehensive library that should “handle all required aspects of an N64 to PC conversion”. This should help accelerate a future port of Majora’s Mask once that game is fully decompiled,” he said.

To look for!  He has a Deku Stick!
Enlarge / To look for! He has a Deku Stick!

Comments are closed.