AI tool to assist PS1 game decompilation
AI tool to assist PS1 game decompilation

AI tool to assist PS1 game decompilation

Hey guys, first post here. I've been thinking of setting up a group to make an AI tool to help fans - and maybe even companies - to decompile PS1 games, making them easier to edit.

I should probably explain what decompiling is.

For people who don't know, there are two types of code that you should know: source-code, which is code written by programmers, that's legible to developers who understand the coding language it's in.

The other type, is machine-code, or Assembly. Machine-Code is just instructions that the computer runs, and is usually hard to comprehend, and loses the names of variables, functions, and the like.

Decompiling is the process of taking the raw code, and translating it into something that's akin to legible code, while still outputting the same result. It's often compared to baking a cake; you can't 'unbake' a cake to get the exact ingredients back, but you can try and take apart and analyze the cake on a molecular level, in order to reproduce a very similar product.

That being said, decompiling is a very tedious process. It's even harder with older software, since the software was most definitely programmed with obscure and outdated formats in mind. It can take years to decompile a video-game from the 90's, even with a group of a dozen people.

That's where the A.I comes in. You see, there is software such as Ghidra that can take Assembly and try to reinterprite into something akin to a modern coding language. But the problem is, is that this pseudo-code usually isn't functional, and doesn't regrow the names of functions or variables, based on what they are.

A group of people can take the pseudo code and reconstruct it to properly work as intended, and to great effect. There are in fact success stories of old games being fully decompiled. But there's just as many projects that have been left to rot, due to loss of interest, and or burnout from the few people working on it.

However, an AI tool tailored for these types of endeavors could hundreds of lines of pseudo-code and translate it into a functional, more modern language, without fatigue. Of course, there would be set-backs. AI is prone to hallucinating false information, and won't know the names of variables, either.

This is what makes it a tool, and not a replacement.

It could be used by a single developer to interpret huge chunks of code in minutes, and the developer would make sense of the output, with the context of what the software would do with it, speeding up the process of decompilation drastically.

As for use cases, it would make fan-remasters of older videogame much more accessible, and the game much easier to modify. It may even be fit for official remasters, in cases where the company have lost the original source code.

Outside of gaming, it could have a huge impact on the war against malware and viruses. The tool could take apart the virus to see how it functions, and take counter-measures to render the malware useless.

I have a passion for stuff like videogame remasters and ports, and if AI-assisted decompilation could help with that and much more, that makes it even better.

What do you think? Does anyone know people who would be interested in making something like this?

submitted by /u/Bulky_Extreme_4144
[link] [comments]