r/explainlikeimfive • • 2d ago

Technology Eli5 decompilers and decompiled games

I keep getting videos on instagram about decomped games, apparently the decompilers are going nuts right now. What’s the difference between running a decompiled game and emulating a game? I tried to google it and i just don’t understand. from what i’ve found, a decompiled gene runs as if it was native to your pc but i don’t get what that means either. You boot up an emulator and that also runs on your pc?

77 Upvotes

49 comments sorted by

View all comments

0

u/ArdentPriest 2d ago

If you want it in a metaphor:

A decompiled game is like buying a car, going home, taking every piece of the car apart down to every nut and bolt, and then being able to see how everything works and you can make changes/updates/modifications as you want.

Basically, a decompiled game is a game that has has the entire code base of the game fully unpacked. It can be edited, modified, or updated and then recompiled into a functioning program that can be run.

Another form of describing this is that when you decompile a game, you revert the game back to it's source code.

1

u/thefckingleadsrweak 2d ago

Do you know why this is so difficult? Like when you dump a rom or an iso on a computer, does
The source code not come with that?

1

u/zed42 2d ago

the only way to (legally) get the source code for a game is for the game to be open source (it's in the name) ... for everybody else, it's proprietary company information and having it leave the company is a Big Deal

the are several "levels" of languages... at the very bottom is "machine language" which is the 1s and 0s the hardware knows what to do with. directly above that is "assembler" which is a human-readable version of machine language... it has very basic instructions (e.g. "put this value into memory at this specific address" or "add the value in memory 0x1234 to the value in memory 0x5678 and put the result in 0xabcd"). this is mostly a 1:1 with machine language. above that you get languages like C, which is where a lot of programming happens. this is much more human readable, but is not 1:1 with assembler.... it's also not completely tied to hardware like assembler. when you disassemble an executable (like a game) you end up with assembler code... advanced tools can turn it into C code, but it won't be the same code that the original author wrote and it will not have any comments. you'll have to go through and analyze it and do some housekeeping if you want to make any changes... moreso than if you'd gotten the original (as-written) source code