The Legend of Zelda: Twilight Princess Decompilation
github.com
github.com
Just look at Super Mario 64. Since that game got decompiled and ported, we've since the number of custom elements in your average ROM hack skyrocket, and the complexity of some of the projects people have made using the engine reach ridiculous degrees. Prior to this, we mostly only saw custom powerups, enemies, bosses and objects in hacks by Kaze Emanuar. Post this happening, such things pop up in contest and game jam hacks made in a few weeks.
Same thing with Ocarina of Time, and other affected games. When people understand the source code (and then when it becomes much easier to modify), the complexity of a community's work goes up tenfold.
So yeah, it could be interesting to see whether any ambitious Twilight Princess mods start development after this, assuming it gets finished. I don't think there's much of a scene for those right now either, so this could be what kickstarts said community in general too.
https://wololo.net/2022/11/10/ps-vita-android-ports-30-games...
G-3PO: A protocol droid for Ghidra, or GPT-3 for reverse-engineering - https://news.ycombinator.com/item?id=34250872 - Jan 2023 (44 comments)
https://github.com/garrettjoecox/anchor
This is a fork of the Ship of Harkinian PC port for ocarina of time. If you just want to play the normal game on PC, you can go to the original repo here: https://github.com/HarbourMasters/Shipwright
Also, thanks for making this. It looks amazing.
> Our primary goal is a full decompilation of the GameCube USA version with appropriate documentation. After this is achieved, we plan to decompile the other versions of the game.
Cool project.
The more pressing legal concern here is the use of game assets, which these decompilations work around by requiring the user to provide a ROM to extract them first.
Even still, the reverse engineering part to put the executable code into C++ is definitely copyright infringement.
Probably not if it actually reverse engineered (with a firewall) but that's not what they are doing (i.e. decompilation isn't' reverse engineering)
As for decompilation projects that have only reconstructed source code and no game media assets, it's probably fair use.
It's not likely to be fair use to distribute, fwiw.
Decompiling object code produces an approximation of the original source code. Merely making this rough copy would usually violate the copyright holder's exclusive rights, even if the person who decompiled the code only used it as a preliminary step in making another work.
The only reason anyone believes this is fair use is because the copyright holders have chosen not to enforce it.A big part of fair use analysis is in the effect on the market for the original work. If people have to obtain a copy to even use the project in any interactable way, the effect is either none (if we suppose every user of the project gets their original copy illegaly) or positive/benefitial to the copyright holder (if it makes those users actually buy legit copies)
Fair use is limited scope. One of the first criteria is use. Fair use is generally reserved for education, criticism, comment, and news. At best you could say this is education, but even then one of the other criteria for fair use is the amount of the work published. If you're teaching or criticizing this code, the whole codebase is probably too much. Some snippets would be fine like you would see in code reviews or reviews of books and such.
Says that its totally not legal to distribute decompiled code, or indeed:
> uses the information to create a program which is substantially similar in its expression to the program decompiled or to do any act restricted by copyright.
If it was legal, there would be loads of decompiled binaries floating around for windows, Adobe, autodesk and any number of other expensive bits of software.
There are a series of well documented exceptions... normally found in copyright law. (And this most definitely does not fall into one of them).
Actually there is in many jurisdictions of the world, including mine (France). There are some exceptions enshrined in copyright law, for which we actually pay a tax.
But this is besides the point. It's not even about the personal copies you make from your legally-obtained original copy on the first place. It's about where you obtained that initial copy from. Most definitely not legally from the author, if he is not authorizing RE.
> Reverse engineering might violate other agreements but not copyright law.
What other agreements does it violate? It is copyright law the only thing that puts a restriction between you and doing whatever the fsck you want with that code. There is a reason the RE exceptions are enshrined in copyright law...
This reasoning is only valid in the US, this kind of anti reverse engineering clause has no value in the EU, reverse engineering is a predefined exception granted to copyright which cannot be voided.
More specifically, it's always allowed for DRM code (because by definition their whole goal is to block interoperability), any kind of proprietary file reading and any kind of porting.
Here in the case of these games, the interoperability argument is very easy to make since they can only run on legacy hardware not even produced anymore.
_Anyone_ could get any piece of software, claim that they want to run it on their new-fangled "x85" instruction set, and, according to your rationale, you'd be able to just decompile it to a different programming language and distribute your translation as much as you want!
> More specifically, it's always allowed for DRM code (because by definition their whole goal is to block interoperability), any kind of proprietary file reading and any kind of porting.
For the record, you are completely misunderstanding the point. These exception allows you to perform RE to _understand_ the code in question for interoperability, not to strip it from copyright and start distributing it as if it was your own code. And in most jurisdictions such exception only becomes possible when it's the _only option available_ to interoperate. As this is _hardly_ the only option available to run this game on your platform (emulation, for example, is completely legal, AND you could RE this title to fix your emulator), this exception hardly applies here.
Yeah, why not? If you have to run through all of this complexity to run the software you have to run, I don't see what it would not fit as an exception.
You realize that those protections against copyright aren't granted for free right? Everybody pays absurdly high rate of copy rights on every medium they buy in the EU and that's why those exceptions are there. If there is no means to copy what you own to use it in a different configuration, those would be meaningless.
What complexity? Emulators are almost everywhere, and they don't require you to violate any copyright (or a significantly smaller amount), and therefore much likely to fit under one of these exceptions (they do). "But the illegal way is easier, your honor!" doesn't really get you anywhere...
This world where software copyright does not exist is not an utopia of free source code, it's a wild wild west of obfuscated and/or inaccessible software and the company with largest pockets has the monopoly since it can do whatever it wants.
> You realize that those protections against copyright aren't granted for free right?
"Protections against copyright?" You mean exceptions, right? Copyright is ironically free.
> Everybody pays absurdly high rate of copy rights on every medium they buy in the EU and that's why those exceptions are ther
Not everybody in the EU, even though in my country (France) we do. However, how is this related at all to the discussion at hand? They are not even related to software copyrights at all! (For which there is already an exception for personal copies, and for which official we pay nothing).
That's exactly where this exception is coming from. You can't make personal copies nowaydays without breaking some kind of DRM and that's why there's an interoperability exception.
France is indeed one of the worst in this racket but most of the EU has similar implementations.
> This world where software copyright does not exist is not an utopia of free source code, it's a wild wild west of obfuscated and/or inaccessible software and the company with largest pockets has the monopoly since it can do whatever it wants.
Well that's exactly where we at now, I'm writing this comment from a phone which has thousands of piles of obfuscated inaccessible and non modifiable software. Copyright is what led us there.
I have already addressed the interoperability exception a couple messages before. In no way it just basically makes all copyright protections pointless by allowing you to claim "OK, now I can decompile this software and distribute it as I please!".
> Well that's exactly where we at now, I'm writing this comment from a phone which has thousands of piles of obfuscated inaccessible and non modifiable software. Copyright is what led us there.
Hardly. Copyright doesn't necessarily prevent nor make tivoization easier. The GPLv3 (or some new, specific legislation to this end) are the only things that would successfully prevent tivoitzation.
I've never claimed that but it also goes further than the conglomerates would make you believe.
> Hardly. Copyright doesn't necessarily prevent nor make tivoization easier. The GPLv3 (or some new, specific legislation to this end) are the only things that would successfully prevent tivoitzation.
While its true that open devices and software are possible under copyright laws, it's more of a hack and clearly not the default.
I don't know how you would call a law to force opening up the sources of software but it's incompatible with the copyright concept, that's for sure.
The decompiled code is not the code that Nintendo wrote. This isn't the equivalent of steeling original code but more like generating a brand new code that would compile to the same executable.
That doesn't make it not copyright infringement. As long as it's based on the same executable, that's a derivative work. In the same way if I were to recreate Star Wars A New Hope with new actors and new sets. If I were to play a cover of Micheal Jackson's Thriller with new instruments and new voices.
That's why clean-room design is a thing. To recreate the same function not based off the copyrighted executable, but rather its interactions with the user, other programs, and files. Interactions that aren't copyrightable.
Of course, none of that makes it copyright infringement, only the (would-be) judge does.
[0] The product of which is roughly equivalent to a cover
[1] obvious to a musician or composer
By this logic copyright protection on software would be meaningless. The GPL would be meaningless. I could grab any program in the world, "translate it" to my favorite language-du-jour, and call it my own.. Goodbye viral license requirements...
Do consumers agree to a end user agreement that specifies they cannot decompile the game? http://en.wikipedia.org/wiki/Reverse_engineering#Legality
That is the definition of decompilation. What are they using as input, if not the "distributed game binary"?
> The source code generated from this process is not Nintendo's.
This is just claiming the consequent. The output of my magical code transformation method is also not Microsoft's.
> Different from taking Windows ISO and jumbling it up into a rude goldberg machine and claiming it as a new work.
Yet that is exactly what decompilation is...
What distinction are you trying to make here? If I translate it to a different language, it is OK? That's as absurd as it gets and still basically strip all software from copyright.
> Do consumers agree to a end user agreement that specifies they cannot decompile the game?
For the record... yes.
The decompilation itself may or may not be a copyright violation - that's likely to vary depending on jurisdiction. If someone in a jurisdiction where it's legal were to write a description of the behaviour of the decompiled code and if someone else were to implement a codebase that happened to compile to the same original binary code then there's an argument that no infringement occurred (a functional description of the behaviour of a work is potentially not derivative of that work, and re-implementing the code based on that description is then not constrained by the original copyright), but that's not what happened here.
I don't like that this is the case, but let's take it to a logical conclusion - if I take an interpreted language with a bytecode compiler, I can typically decompile it to something almost 100% identical to the original code (I'd lose comments and maybe variable names, but that depends on the language). Does this mean I can take copyrighted Python code, run it through the interpreter, dump the state, decompile it, and have an independent work not subject to the original license?
> At this point the decompiled code is clearly a mechanical transformation of the game binary, and so holds the same copyright status.
Courts disagree with you.
Sony Computer Entertainment v. Connectix Corp.
https://scholar.google.com/scholar_case?case=716676913673727...
> The object code of a program may be copyrighted as expression, 17 U.S.C. § 102(a), but it also contains ideas and performs functions that are not entitled to copyright protection. See 17 U.S.C. § 102(b).
> Object code cannot, however, be read by humans.
> The unprotected ideas and functions of the code therefore are frequently undiscoverable in the absence of investigation and translation that may require copying the copyrighted material.
> We conclude that, under the facts of this case and our precedent, Connectix's intermediate copying and use of Sony's copyrighted BIOS was a fair use for the purpose of gaining access to the unprotected elements of Sony's software.
Not only are the methods of operation which underlie the code completely unprotected, the copying of and the application of tools to the code for the purpose of exercising your right to discover those unprotected elements is fair use.
And this is exactly what this Github repository is doing.
If you are arguing "abandonware", then this is no legal argument whatsoever.
> (b) In no case does copyright protection for an original work of authorship extend to any idea, procedure, process, system, method of operation, concept, principle, or discovery, regardless of the form in which it is described, explained, illustrated, or embodied in such work.
The way the game works is not protected. Only Nintendo's code is.
Frankly at this point I just want to point out that if in your world view this is allowed, then _all_ software copyright is pointless, since anyone could apply the same rationale to any program in the world. What's the point of the GPL on such world?
Fair use.
Sony Computer Entertainment v. Connectix Corp.
https://scholar.google.com/scholar_case?case=716676913673727...
> The object code of a program may be copyrighted as expression, 17 U.S.C. § 102(a), but it also contains ideas and performs functions that are not entitled to copyright protection. See 17 U.S.C. § 102(b).
> Object code cannot, however, be read by humans.
> The unprotected ideas and functions of the code therefore are frequently undiscoverable in the absence of investigation and translation that may require copying the copyrighted material.
> We conclude that, under the facts of this case and our precedent, Connectix's intermediate copying and use of Sony's copyrighted BIOS was a fair use for the purpose of gaining access to the unprotected elements of Sony's software.
Not only are the methods of operation which underlie the code completely unprotected, the copying of and the application of tools to the code for the purpose of exercising your right to discover those unprotected elements is fair use.
> then _all_ software copyright is pointless
It is pointless. I am a copyright abolitionist.
> What's the point of the GPL on such world?
None. The GPL was literally created in response to copyright protection being extended to software. No copyright, no point to the GPL.
So you provide one answer on my question of which thought process leads to these conclusions: wishful thinking.
Sigh.
See what I just wrote on the other comment:
> These exceptions allows you to perform RE to _understand_ the code in question for interoperability, not to strip it from copyright and start distributing it as if it was your own code. And in most jurisdictions such exception only becomes possible when it's the _only option available_ to interoperate. As this is _hardly_ the only option available to run this game on your platform (emulation, for example, is completely legal, AND you could RE this title to fix your emulator), this exception hardly applies here.
This is exactly what actually happened in the case you are quoting.
Overall this will make software copyright laws pointless, but in the end everything anyone cares about will be open source. I am here for this outcome.
Mandating open software & open hardware is one thing, but simply removing copyright doesn't led there -- it leads to a even more dystopic world.
And even on the ones which do, you lose access to some hardware features -- the very definition of tivoization...
Core memory unlocked: https://web.archive.org/web/20001109160100/http://www.freedo...
It's Nintendo's code. Distributing it without permission is violating copyright.
EFF on the topic https://www.eff.org/issues/coders/reverse-engineering-faq
I know, Nintendo will litigate anyone for any reason, but it is possible for a company to look away when these measures are taken.
Companies don't have to C&D. If something poses very little financial danger, but taking it down presents significant risk of PR harm, it's not worth it. The C&D would cost more than it would save, so it makes no business sense.
Don't ask me why they even bothered taking down fan games, though. They seem to care a lot about art assets in particular.
If talking about AM2R, it posed a rather credible threat against the success of the official Metroid 2 remake (ignoring the fact that AM2R is of much higher quality anyway). Plus it contained ripped sprites from Zero Mission, Fusion, and incorporated all of the characters and enemies that Nintendo owns.
You can't just make your own Lord of the Rings or Star Wars without infringing the copyright of the original work. Same with fan remakes.
But distributing the code is not part of the reverse engineering process, so that fair use doesn't apply. Also from that article:
> It is highly risky to copy any code into a program you create as a result of reverse engineering, because that copy could infringe copyright unless it is a fair use under copyright law.