Libogc (Wii homebrew library) discovered to contain code stolen from RTEMS

189 dropbear3 156 4/27/2025, 4:18:49 PM github.com ↗

Comments (156)

ndiddy · 3d ago
I'm not a lawyer, but publicly announcing that you found out that you were using a library largely consisting of decompiled Nintendo SDK code, then continued to use it and distribute binaries with the library compiled into them seems inadvisable to me. On the other hand, the Wii's no longer commercially relevant so I doubt Nintendo will do anything about it either to him or to the DevKitPro project. Maybe that's why Marcan waited so long to go public about this. I'm also not sure why he thought copying code uncredited from a Nintendo SDK was good enough to "reluctantly continue to use the project" but copying code uncredited from a 25 year old release of an RTOS written by a defense contractor was a step too far. Different people have different moral standards I guess.

I will say that in general, the DevKitPro maintainers are very much on the "Cathedral" side of the spectrum and behave very abrasively, so the reaction Marcan lists doesn't surprise me. In general their licensing philosophy is "make it as easy as possible to write homebrew using the toolchain while making it as difficult as possible to fork/build your own copy of our toolchain". All of the console-side libraries are permissively licensed, while the tooling to build at least some of their libraries doesn't have a license file, is undocumented, and the maintainers ignore any requests for help from people who are trying to use it. DevKitPro is also extremely aggressive with enforcing their trademarks, to the point of issuing takedowns to people who are hosting unmodified old releases of the toolchain. Trying to sweep the libogc licensing issue under the rug (i.e. moving the issue about the licensing to a private repo instead of even just closing it) to try to keep the project Zlib licensed tracks with this behavior IMO.

eqvinox · 3d ago
Copyright laws (in sane countries) have (varying amounts of) exceptions for reverse engineering pieces that are required for compatibility/interoperability.

Whether this applies to the Nintendo SDK… no clue, ask your lawyer ;). (i.e.: was there an alternative option to using RE'd pieces of the Nintendo SDK?)

It makes sense from a perspective/perception of: with the Nintendo SDK, [if] there wasn't really a choice or an alternative. With the RTEMS code there was.

giovannibajo1 · 3d ago
Of course there was. You can clean-room reverse-engineer the hardware. This is what is done daily by Libdragon maintainers for supplying an open source SDK for Nintendo 64 with zero proprietary code in it.
mech422 · 3d ago
way back in the before times... Open Source projects went to great lengths to make sure they didn't use anything that could 'taint' the code (eg Samba )

I think the DeCSS stuff wasn't used till it had been publicly leaked and was considered 'common knowlege' or some such to prevent lawsuits

amiga386 · 3d ago
Not quite. There was nobody holding back on sharing for legal reasons, and it didn't prevent lawsuits.

The LiViD mailing list was full of people trying to get DVDs working with Linux, and they were already quite far into it. Derek Fawcus had already written the drive authentication code (so the drive would allow the host to read most disc sectors).

A piracy group, DrinkOrDie, reverse engineered the Xing DVD player for Windows and released DoD DVD Speed Ripper (no source code).

MoRE (Masters of Reverse Engineering) also reverse engineered the Xing DVD player and released DeCSS (no source code).

MoRE consisted of "mdx", "the nomad" and Jon Lech Johansen. "the nomad" reverse engineered the Xing DVD player. "mdx" used them to write a decrypter. Jon made a GUI frontend.

Prior to DeCSS's release, someone sent Derek Fawcus the decryption code. And he got around to playing with it, and was going to publish it on the LiViD list.

But before he did, DeCSS came out, and also its source code leaked, and Fawcus noticed his own code was in it (the drive authentication code), stripped of his credit. He complained about this and Johansen got in touch, and ultimately he allowed DeCSS to use his code under a non-GPL license.

Then, famously, Norway's "economic crime" unit brought criminal charges against Johansen. Ultimately, they concluded that Johansen himself hadn't infringed anything, because it was Derek Fawcus, "the nomad" and "mdx" who did that, and they're not Norwegian.

So, with that in mind:

- the LiViD mailing list would almost certainly have developed a DVD solution for Linux, not caring about clean room implementation, if DeCSS had not beaten them to the punch

- the fame DeCSS got also brought the angry litigators (though eventually justice prevailed)

I'll end on a quote from Derek Fawcus:

https://web.archive.org/web/20001202051300/http://livid.on.o...

> Something that may be of interest to people in the states is that I've had an offer of help to produce a specification of the algorithm - from which a third party could produce an implementation. i.e. proper clean room approach. This doesn't really matter from my point of view (or in my opinion most Europeans) but may be of use to the Yanks.

ranger_danger · 3d ago
How could one ever prove that a solution was clean-room? For example I would consider the oman leak to taint all development of N64 in existence. Even if someone didn't personally look at it, they most certainly got information from someone else that did.
giovannibajo1 · 3d ago
I don’t understand if this question is legal or morale/technical. I will answer to the latter, from the point of view of a prospective user of the library that wants to make their own mind around this.

Its quite easy to prove that libdragon was fully clean roomed. There are thousands of proofs like the git history showing incremental evolution and discovery, the various hardware testsuites being developed in parallel to it, the Ares emulator also improving its accuracy as things are being discovered over the past 4-5 years. At the same time, the n64brew wiki has also evolved to provide a source of independently verified, trustable hardware details.

Plus there are tens of thousands of Discord log messages where development has incrementally happened.

This is completely different from eg romhack-related efforts like Nintendo microcode evolutions where the authors explicitly acknowledge to have used the leaks to study and understand the original commented source code.

Instead, libdragon microcode has evolved from scratch, as clearly visible from the git history, discovering things a bit at a time, writing fuzzy tests to observe corner case behaviors, down to even creating a custom RSP programming language.

I believe all of this will be apparent to anybody approaching the codebase and studying it.

Moto7451 · 3d ago
Lawyers, discovery, and a courtroom. The reason clean room works out is due to various lawsuits on the topic as a matter of law.

The Wikipedia article on clean room reverse engineering has all the examples that came to my mind and then some. https://en.wikipedia.org/wiki/Clean-room_design

braiamp · 3d ago
> Lawyers, discovery, and a courtroom

In other words, money that these people don't have. The legal system is not a solution for these kinds of problems, nor it is affirmative defense. Anything that makes the defendant bear the burden of raising and proving that their actions didn't foul any legal requirement, is basically killing any project, even when using your "solution".

ranger_danger · 3d ago
To me this still means "there IS no way". You can get sued and convince a judge you didn't do it, sure, but that's not necessarily 100% accurate, and also probably extremely unlikely to happen anyway in most cases. And you'd be surprised how easy it is to fake evidence with no way to prove otherwise. Plus all that still requires going to court.
timschmidt · 3d ago
Generally one has two sets of developers, one doing the RE work, and one doing the new implementation, and the only way you allow them to communicate is through documentation of the reverse engineered implementation. Should this go to court, you can walk each member of each group in to testify, and show off the stacks of documentation produced in the process.
ranger_danger · 2d ago
That might convince a judge, sure, although it's still possible to fake the evidence... but I would argue the vast majority of people who claim to have clean-room RE'd something absolutely did not go through anything close to this process.
timschmidt · 2d ago
I don't know anything about the majority of developers, and I think sweeping claims about any group require strong evidence, which seems lacking. But there are plenty of examples of companies that followed such a process, and succeeded in court: https://en.wikipedia.org/wiki/Clean-room_design#Examples
theshackleford · 2d ago
> I would argue

With what evidence?

ranger_danger · 2d ago
I think when someone fails to produce any evidence of a clean-room process being followed when they claim it's clean-room, is probably a good indicator. Yea you can call that "trust me bro" if you want, I won't be upset.
selfhoster11 · 3d ago
> On the other hand, the Wii's no longer commercially relevant so I doubt Nintendo will do anything about it either to him or to the DevKitPro project.

They've been going after ROM sites. Going after libogc or Marcan would fit their recent MO.

I think it is really, really unwise to put libogc on blast like this. It draws Nintendo's attention, which is never good. It would be better to reach out privately, and tell them you'll publically call them out unless they add missing credit and/or remove the offending code. Which for all I know, might have been retired already.

TuxSH · 3d ago
To me this looks like a bad attempt at exposing dirty laundry in bad faith, which is not too surprising coming from him.

1. Commit 3ba50ec which Marcan is complaining about was pushed in 2008 and didn't just delete attrib specifically, but all (?) VCS comments indiscriminately. The file was barely touched since

2. "The authors of libogc didn't just steal proprietary Nintendo code (...) ignorance about the copyright implications of reverse engineering Nintendo binaries" ---> AFAIK it's software RE work, and nothing done in the console hacking scenes is truly cleanroom at all, and there's no point to it either as Nintendo can knock&talk and/or send strongly worded letters when they please, legality be damned

I don't know much about the Wii scene specifically, and libogc seems to be a mess in general, but what I do know is that libctru (3ds)/libnx (Switch) don't have that drama nor made the mistakes made in libogc

Internal server error