• Hey, guest user. Hope you're enjoying NeoGAF! Have you considered registering for an account? Come join us and add your take to the daily discourse.

Zelda 64 has been fully decompiled, potentially opening the door for mods and ports

Bullet Club

Member

Zelda 64 has been fully decompiled, potentially opening the door for mods and ports​

After nearly two years, a fan group fully reproduced the N64 classic in C code this week

A fan group has successfully reverse-engineered 100% of Legend of Zelda: Ocarina of Time’s game code, VGC has been told.

The community-led Zelda Reverse Engineering Team (ZRET) has been working for nearly two years to reverse engineer the N64 classic into parsable C code, which can be read by modern computers, similar to how fans were able to fully convert Super Mario 64 in 2019, after a two-year effort.

The achievement marks a huge milestone for the preservation of the classic Nintendo 64 game, and opens the door to modding, hacks and potentially even ports to other platforms such as PC (though it’s worth stressing, none of this is within the remit of ZRET).

The kind of reverse engineering ZRET do is made legal because the fans involved did not use any leaked content. Instead, they painstakingly recreated the game from scratch using modern coding languages. The project also does not use any of Nintendo’s original copyrighted assets such as graphics or sound.

ZRET told VGC: “It’s been a wild ride. We’ve been able to create c code that, when compiled, reproduces the original game. We call this ‘matching’ decompilation.

“Last night, Fig, who is a notable community member as well as a project lead, matched the last-remaining function in the project. This means that all compiled code in the game has been turned into human-readable C code.

“We thought for a time that we may never be able to match every function completely, so this is an incredibly exciting accomplishment. Dozens of people helped work on this project, and together we were able to achieve something amazing.”

ZRET said that the final part of its progress is currently on a development branch.

Before the Ocarina of Time work is solidified, the project lead will need to submit his work via what’s known as a “pull request”, it told VGC. After that, the work needs to be thoroughly reviewed. Once that’s done, it will merge this pull request, and the ZRET website’s graph will show 100%.

But even though the game’s code has been fully decompiled, there’s still a lot of remaining work for the ZRET team including creating documentation, re-naming and re-organisation of code and definitions, and support for asset-handling so viewing or modifying on modern computers is easier.

The group also plans to decompile other versions of Ocarina of Time in order to support the project. The core of ZRET’s work was based on the Nintendo GameCube Master Quest version of the game, since it features some debug commands to help with its work.

“We have been working on decompiling the Master Quest Debug version of the game. However, Ocarina of Time has over a dozen other versions, which we plan to also decompile and support in the project,” it said.

However, many consumers will be interested if – or more likely, when – the decompilation will lead to a fully functioning PC port of Zelda, like it did with Super Mario 64 last year.

ZRET’s Ocarina of Time decomp is not a port and it’s adamant that it will not be involved in any potential work to adapt the game’s code to new platforms.

However, in the case of Super Mario 64’s decompilation efforts, the project led to another group creating a fully functioning PC port of the N64 game within nine months, which is able to scale to any screen resolution and be easily modded by the community with new graphics and modern effects such as ray-tracing.

Eventually, fans even ported that game to many other platforms including Nintendo DSi, Nintendo 3DS and Nintendo Switch.

Outside of potential PC ports, the Zelda: Ocarina of Time decompilation project could have huge implications for hacks, as well as historical preservation and the discovery of new bugs which could be utilised by the speedrunning community.

In news unrelated to the reverse engineering project, Earlier this year, a group of video game preservationists discovered and released a partial beta version of Ocarina of Time, allowing fans to recover a significant amount of new information about the pre-release version including new areas, redesigned items and other elements that never made it into the final build.

Content from the beta version was eventually used by fans to recreate an early Space World demo from 1997, which was released this month and runs via emulator.

Source: VGC
 

Guilty_AI

Member
AggravatingDetailedJunebug-size_restricted.gif
 

AMSCD

Member
The kind of reverse engineering ZRET do is made legal because the fans involved did not use any leaked content. Instead, they painstakingly recreated the game from scratch using modern coding languages. The project also does not use any of Nintendo’s original copyrighted assets such as graphics or sound.
Pretty sure it's still copyright infringement. If I made my own Star Wars: A New Hope movie with my own sets and actors but followed the same script, I would definitely be infringing copyright. I doubt it's any different for a video game.
 

DGrayson

Mod Team and Bat Team
Staff Member
Pretty sure it's still copyright infringement. If I made my own Star Wars: A New Hope movie with my own sets and actors but followed the same script, I would definitely be infringing copyright. I doubt it's any different for a video game.


Let the lawyers and companies worry about that. Us as fans should just worry about enjoying what is out there. If it's illegal either Nintendo will take action or they won't.
 

Dr Bass

Member
Well did they decompile or reverse engineer it? Not the same thing and the article claims both. I could see it being a mix. Doing a clean room implementation of it in two years seems tough.
 

Kuranghi

Member
I believe I'm correct in assuming the reverse engineering was basically exactly like this?:




Holy shit, I really like John Woo's films, even MI:2 (slightly ironically lol) but this one is almost a complete pile of poo haha.
 

Sophist

Member
What amaze me about Nintendo and their cease-and-desists is that they never sent one to Mari0 which has been available since 2012 and copies levels, sprites, sound effects, and musics from super mario bros. and it's not that the game is unknown, many media outlets did spoke about it.

 

Ozzie666

Member
Pretty sure it's still copyright infringement. If I made my own Star Wars: A New Hope movie with my own sets and actors but followed the same script, I would definitely be infringing copyright. I doubt it's any different for a video game.

Thats the plot for Jack Black's movie Be kind rewind?

Also, I am sure it would be better than the last 3 movies...
 

Drell

Member
Pretty sure it's still copyright infringement. If I made my own Star Wars: A New Hope movie with my own sets and actors but followed the same script, I would definitely be infringing copyright. I doubt it's any different for a video game.
I think your analogy is not correct because the lore is also part of the assets in some way. What they did was understanding the assembly code and translate it to C. I think a better way to describe it, if we go back to star wars, would be to take every concept this movie has like spaceships, blasters, hyperspace travels, the force, the jedi etc... But without naming them because that would be an infrigement. And maybe later, someone will do a Star Wars rip off with this information but that wouldn't be the problem of the person who did this because they simply explained the concepts to everyone.
 

jakinov

Member
Pretty sure it's still copyright infringement. If I made my own Star Wars: A New Hope movie with my own sets and actors but followed the same script, I would definitely be infringing copyright. I doubt it's any different for a video game.
It's a little differnet with code in how things work (not talking about legally). With code you have original source code written by a programmer who then takes it and puts that into a program that then spits out code that the computer (or console) actually uses. They removed all the art work and assets from the game and wrote brand new code that could generate that same machine code (at least logically). In a way it's like they figure out the original plan to make the movie like a production plan with whiteboards and schedules but they didn't actually copy it they made their own and no movie is actually made.
 

01011001

Banned
You know there's more than one Zelda 64 right

Still...neat. I did enjoy that PC-native Mario 64.

same engine, most likely if you decompile one you decompile both... Majoras Mask is basically a level pack/DLC for Ocarina of Time
 
Last edited:

01011001

Banned
Pretty sure it's still copyright infringement. If I made my own Star Wars: A New Hope movie with my own sets and actors but followed the same script, I would definitely be infringing copyright. I doubt it's any different for a video game.

reverse engineering is not illegal in any way. if they released the game WITH ASSETS THAT NINTENDO OWNS, then it would be copyright infringement.

what they can do for example is make an installer or a set of files that allow you to play the game as a port on other systems IF you provide a ROM of the game on your own.
this way they do not distribute any copyright infringing material, and all the copyrighted stuff is provided by the end-user.
many decompiled ports work like this like OpenLara (Tomb Raider) or the Whitehead Sonic games that are ported to Xbox One and other platforms, but you have to provide an original copy yourself for it to work
 
Last edited:

ReBurn

Gold Member
What is reverse engineer in video game?
Reverse engineer is to produce a derivative work that's functionally identical to the original based on observation of how the original operates.

To decompile means they took the original compiled game and turned the compiled objects back into source code based on the original code.
 

Heimdall_Xtreme

Jim Ryan Fanclub's #1 Member
Reverse engineer is to produce a derivative work that's functionally identical to the original based on observation of how the original operates.

To decompile means they took the original compiled game and turned the compiled objects back into source code based on the original code.
Nice answer😎
 

93xfan

Banned
Good. Out of the hands of greedy/lazy current Nintendo and into the hands of people who care about their older games
 

AMSCD

Member
reverse engineering is not illegal in any way. if they released the game WITH ASSETS THAT NINTENDO OWNS, then it would be copyright infringement.

what they can do for example is make an installer or a set of files that allow you to play the game as a port on other systems IF you provide a ROM of the game on your own.
this way they do not distribute any copyright infringing material, and all the copyrighted stuff is provided by the end-user.
many decompiled ports work like this like OpenLara (Tomb Raider) or the Whitehead Sonic games that are ported to Xbox One and other platforms, but you have to provide an original copy yourself for it to work
Interesting
 

stranno

Member
This isn't preservation. Its piracy with added steps :D

No judgement, but it is what it is.
It is not. That's why sm64 project has been there for three years already.

About the ports, I wouldn't expect them until mid-2022, at least. I haven't seen the usual suspects (fgfsds did most sm64 ports) talking about it. And its not even clear if ZRET is doing any ports or not.

BTW:

Capture.PNG
 
Last edited:

Alexios

Cores, shaders and BIOS oh my!
Just curious, since this point is not only brought up but stressed, how is a recreation that seemingly apes the original doing more for preservation than keeping the rom safe in places like archive.org and emulators for modern systems and OS running it (preferably with accuracy as the goal like ParaLLEl rather than attempting to enhance it with hardware that doesn't interpret and present it like its original platform did or garish "HD" mods)? What have we lost in the 23 years since its release that this will bring back on that front, or what were we going to lose later on if this project didn't come to pass (as it doesn't come to pass for a gazillion other great classics that apparently nobody cares to reverse engineer, maybe because they aren't by Nintevil, but people enjoy them at their best with great QOL features thanks to all kinds of console and arcade emulators)? Well, if some smart individual/group eventually takes this and makes a great, easy to use yet thorough level editor/game maker like there is one for 2D Zelda games and that then leads to some other talented individuals making some really cool OoT style fan games (which also means MM type stuff), given the game 23 years later still has sexcellent mechanics and attention to detail many modern games should pay attention to, that would be cool and bring more adventures with those great mechanics and new ones in the same vein, but it's unrelated to actual preservation that's been just fine.
 
Last edited:

horkrux

Member
Reverse engineer is to produce a derivative work that's functionally identical to the original based on observation of how the original operates.

To decompile means they took the original compiled game and turned the compiled objects back into source code based on the original code.
You're not getting a byte-perfect copy of such a complex game in a lifetime without decompilation, so that's what they did. But decompilation still involves reverse engineering, otherwise you'd be staring at useless code where nothing is named and no one knows what anything does.
 

fersnake

Member
My favorite thing to come out of the Mario 64 thing was a PC port capable of ultrawide 21:9. Hope to get the same with Ocarina of Time, that'd be dope.
As a ultra wide user I loved playing Mario 64 again at that ratio. And don't forget the better fps and crisp gfx. Personally I like to mod my games just the right amount, like how the dev intended but couldn't because the hardware they had.

Ps. I'm looking forward for this Zelda PC port.
 

Clear

CliffyB's Cock Holster
It is not. That's why sm64 project has been there for three years already.

About the ports, I wouldn't expect them until mid-2022, at least. I haven't seen the usual suspects (fgfsds did most sm64 ports) talking about it. And its not even clear if ZRET is doing any ports or not.

BTW:

Capture.PNG

Yes it is, by definition. Decompilation voids the "white-room" protection, and the purpose of the project is to produce an identically functioning copy of Nintendo's original software design.

Thus Nintendo are free to enforce their rights if they choose to. No court in any country is going to side against them because when all's said and done its a derivation of their copyrighted material.

Not getting into the moral rights and wrongs by saying this, its just how the law works. Code is a bit more abstracted than assets like graphics or audio data but its still something that can be owned. Essentially its analogous to saying that although you can't copyright a single pixel, a conglomeration of pixels can be because in total it forms into an image that can be defined as intellectual property.

The granularity of how this is provable in a legal context generally comes down to how much the plaintiff is willing to spend to enforce their ownership rights. Sections of code might be enough if their function is specific enough and the lawyers are willing to spend the time to argue the case for its commercial importance to their client.
 

SomeGit

Member
Yes it is, by definition. Decompilation voids the "white-room" protection, and the purpose of the project is to produce an identically functioning copy of Nintendo's original software design.

Thus Nintendo are free to enforce their rights if they choose to. No court in any country is going to side against them because when all's said and done its a derivation of their copyrighted material.

Not getting into the moral rights and wrongs by saying this, its just how the law works. Code is a bit more abstracted than assets like graphics or audio data but its still something that can be owned. Essentially its analogous to saying that although you can't copyright a single pixel, a conglomeration of pixels can be because in total it forms into an image that can be defined as intellectual property.

The granularity of how this is provable in a legal context generally comes down to how much the plaintiff is willing to spend to enforce their ownership rights. Sections of code might be enough if their function is specific enough and the lawyers are willing to spend the time to argue the case for its commercial importance to their client.
Decompilation doesn't void white room, we know that since the Sony v Connectix lawsuit from the 90s.
 
Top Bottom