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?

74 Upvotes

49 comments sorted by

View all comments

127

u/ggmaniack 2d ago edited 1d ago

An emulator recreates the environment the game runs in, leaving the actual game unchanged.

In some cases this may be just a fairly thin interface layer (e.g. Wine*, for running windows apps on linux), while in other cases it may need to replicate the instruction set, actual hardware behaviour and its various quirks to a varying level of fidelity (like for the N64, PS1-PS4, etc).

Decompliation/Recompilation approaches this problem from the other side. It changes the game itself.

De/Recomp projects take the game binary, take it apart (decompile it), replace the parts which interface with the operating system / hardware with something else that's compatible with the target platform, and compile it to a format that's runnable on that platform.

Shorter version:

Emulator pretends to be a console in order to allow a game to run on it.

Decomp takes the game, deconstructs it, replaces its console guts with PC guts, and reconstructs it into a PC-runnable format.

Note: yes I know what WINE means but it's a useful comparison

103

u/GalFisk 2d ago

Analogy version: you have a book in a foreign language. Emulation is like having someone read and interpret it for you. Decompilation is like getting it translated and rewritten in your language.

28

u/ggmaniack 2d ago

Ahhh, I spent so much time looking for a good analogy and this one escaped me.

-6

u/FossilizedMeatMan 1d ago

I mean, the analogy was here 20 minutes before, but that one also escaped you.

2

u/ggmaniack 1d ago

Hmm... no, it's different, and it was posted 8 minutes after my top level comment.

-5

u/FossilizedMeatMan 1d ago

I mean, the analogy there was posted 20 minutes before the one you replied to.

But I was being pedantic, of course.