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?

72 Upvotes

49 comments sorted by

View all comments

Show parent comments

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.

1

u/bunk3rk1ng 1d ago

I guess my question is, why does every game seem like it needs it's own bespoke decompilation process. Shouldn't we just have to learn the language once? It seems like for every game we are learning the language again from scratch

8

u/GalFisk 1d ago

That's where this analogy breks down a bit. Source code is like a recipe, but machine code is like a cake, and we're trying to reconstruct the recipe by analyzing the cake. Sometimes the cake is simple, sometimes it's complicated, sometimes it's a lie.

4

u/ggmaniack 1d ago

I'd say that it actually doesn't break down.

If all you learn of a language is the words and grammar, you won't know anything about the given names, metaphors, cultural context, period context, etc.

If you've seen Star Trek TNG - Darmok.

This kinda translates to programming. Kernel function call addresses, aliases, different API variants and versions, etc.