foone @Foone General hardware / software necromancer. Collector of Weird Stuff. Patreon: t.co/ItdWwbOUMl Jun. 07, 2019 2 min read

Today's random discovery:
The PS1 game Spongebob Squarepants: Supersponge VIOLATES THE GPL.

so on reddit in r/psx/ the source code to this game was posted, to github.
It doesn't appear to be an official release, just a leak of some sort.
 https://www.reddit.com/r/psx/comments/bxsffu/so_i_was_doing_some_googling_and_discovered_that/ 

That got crossposted to r/DataHoarder/ where user technifocal took a look into it and noticed it's got a file named source/system/vsprintf.cpp, which according to the headers is just the vsprintf code from the linux kernel, which is GPL2.

they made some minor modifications to make it work on a PS1 CPU, and it's a very old version (this is code from 2000, after all) but if you pull up a very old version of linux you can see they're the same code.
 https://github.com/zavg/linux-0.01/blob/5839d67d5825265fc665c9dc0ec2e767ff47a6dd/kernel/vsprintf.c 

I've not been able to disassemble the binary on the PS1 ISO to confirm the code is all there, but there are definitely some matching constants:
See these two runs of 0123...xyz and 0123...XYZ?

well the old version of vsprintf.c from linux also uses those constants, just in opposite order (probably a compiler optimized them differently or they're using a different version that swapped them):

presumably the devs did this because they needed a vsprintf function and the PSX SDK didn't include one. They got the one off linux because that's a full-featured one you can easily get by searching.

but it is GPL'd, so that means to legally use this could they'd have to put the whole game under the GPL.
it should therefore include a notice letting users know it's GPLed, and either include the source (it does not) or come with an offer for getting the source elsewhere.

and we only know this violation happened because 19 years later someone leaked the code on github.

so, I mean, I guess you can get the source NOW.

correction: 18 years later.
I remembered seeing 2000 dates but apparently this game came out in november 2001

so @cat_books has the story for where this code came from:

it'd be an interesting project to hook up some automated disassemblers to a pile of GPL'd code (off github or the like) and run it across a bunch of PSX/PS2/wii isos

I'd bet a lot of money this isn't the only time GPL source has ended up in a console game

that we don't know of, I mean.
There are definitely cases we know of, like Mistic's Wii ports of Humongous Entertainment that were shown to just be ScummVM (and they got sued over it)


You can follow @Foone.



Bookmark

____
Tip: mention @threader_app on a Twitter thread with the keyword “compile” to get a link to it.

Enjoy Threader? Sign up.