Yeah, it works great for porting as well. I tried it on the assembler sources of Prince of Persia for Apple ii and went from nothing to basics being playable (with a few bugs but still) on modern Mac with SDL graphics within a day.
That's impressive. Did you convert POP from 6502 to C?
The unexpected effectiveness of one-shot decompilation with Claude
101–110 of 133 posts
Re: The unexpected effectiveness of one-shot decompilation with Claude
#102For anyone else who was initially confused by this, useful context is that Snowboard Kids 2 is an N64 game. I also wasn't familiar with this terminology: > You hand it a function; it tries to match it, and you move on. In decompilation "matching" means you found a function block in the machine code, wrote some C, then confirmed that the C produces the exact same binary machine code once it is compiled. The author's p…
Eventually some or many of these attempts would, of course, fail, and require programmer intervention, but I suspect we might be surprised how far it could go.
Re: The unexpected effectiveness of one-shot decompilation with Claude
#103Earlier quoted context omitted.
It would be "source available", if anything, not "open source". > An open-source license is a type of license for computer software and other products that allows the source code, blueprint or design to be used, modified or shared (with or without modification) under defined terms and conditions. https://en.wikipedia.org/wiki/Open_source Companies have been really abusing what open source means- claiming something is…
But clean room reverse engineered code can have its own license, no?
That's very different from the decompilation projects being discussed here, which do distribute the decompiled code.
These decompilation projects do involve some creative choices, which means that the decompilation would likely be considered a derivative work, containing copyrightable elements from both the authors of the original binary and the authors of the decompilation project. This is similar to a human translation of a literary work. A derivative work does have its own copyright, but distributing a derivative work requires permission from the copyright holders of both the original and the derivative. So a decompilation project technically can set their own license, and thereby add additional restrictions, but they can't overwrite the original license. If there is no original license, the default is that you can't distribute at all.
Re: The unexpected effectiveness of one-shot decompilation with Claude
#104Makes me wonder if decompilation could eventually become so trivial that everything would become de-facto open source.
Re: The unexpected effectiveness of one-shot decompilation with Claude
#105Earlier quoted context omitted.
But, for example, isn't Cannonball (SEGA Outrun source port) open source? https://github.com/djyt/cannonball
No it is not. There is no license in that repository. Relevant: https://github.com/orgs/community/discussions/82431 > When you make a creative work (which includes code), the work is under exclusive copyright by default. Unless you include a license that specifies otherwise, nobody else can copy, distribute, or modify your work without being at risk of take-downs, shake-downs, or litigation. Once the work has other c…
...but it's very clearly not an open source license.
Re: The unexpected effectiveness of one-shot decompilation with Claude
#106Re: The unexpected effectiveness of one-shot decompilation with Claude
#107Re: The unexpected effectiveness of one-shot decompilation with Claude
#108Earlier quoted context omitted.
Documentation is one place where humans should have input. If an LLM can generate documentation, why would I want you to generate it when I can do so myself (probably with a better, newer model)?
I definitely want documentation that a project expert has reviewed. I've found LLMs are fantastic at writing documentation about how something works, but they have a nasty tendency to take guesses at WHY - you'll get occasional sentences like "This improves the efficiency of the system". I don't want invented rationales for changes, I want to know the actual reason a developer decided that the code should work that w…
Re: The unexpected effectiveness of one-shot decompilation with Claude
#109Earlier quoted context omitted.
Documentation is one place where humans should have input. If an LLM can generate documentation, why would I want you to generate it when I can do so myself (probably with a better, newer model)?
That's great if those humans are around to have that input. Not so much when you have a lot of code from 6 years ago, built around an obscure SDK, and you have to figure out how it works, and the documentation is both incredibly sparse and in Chinese.
Re: The unexpected effectiveness of one-shot decompilation with Claude
#110Earlier quoted context omitted.
Documentation is one place where humans should have input. If an LLM can generate documentation, why would I want you to generate it when I can do so myself (probably with a better, newer model)?
Because it takes time and effort to write documentation. If people __can__ actually read undocumented code with the help of LLMs, why do you need human-written documentation really?