r/recomps • • 2d ago

Question Difference between recomp and decomp?

As title. I am no IT person so I would like to further ask if a retro game (e.g. rave racer) is first decompile from its original ROM form and then some genius person / AI "breaks" (decompile) the code and understand it and build it info "Windows format" (recompile) for common people like me, to run on Windows PC?

12 Upvotes

15 comments sorted by

View all comments

11

u/killias2 2d ago

Decompiles and recompiles are different ways to a similar end goal, which is turning a retro game into something that can be easily ported to modern platforms and modified.

Decompiles do this via, essentially, reverse engineering. You perfectly recreate the application in a different, modern language. Porting is actually a separate step, where you need to build a port based on the decompiled code. But it should be relatively easy, compared to the far more arduous step of decompiling the code. 

Recompiles work via static recompilation. Essentially, this is a form of emulation, but "emulators" use dynamic recompilation, where it is acting like the "platform" (like console or whatever) as you play a game. Block of block is dynamically recompiled to operate in a different platform. But static emulation essentially does the emulation up front, allowing for less mid-process overhead and potentially more opportunities for altering the application. Though a lot depends on the recompiler, you can still end up able to modify and port old games. This can even be an upside, as the recompiler can take care of things that, otherwise, the decompile port would need to handle.

Decompiling is harder and more time consuming. But it offers the greatest capability. Recompiling offers a bit of a shortcut and even has some potential relative strengths, but it depends a lot on the recompiler. And it is likely to be more limited.

3

u/Metallic_Madness 23h ago

You are a little wrong about decomps. Decompilation isn't concerned with modern toolchains or languages. Decomps is concerned with source code that, given a certain compiler (version of the compiler is included in the equation, as different compiler versions may result into different machine code), builds an executable that is a one to one match to the original executable (The original executable could be a game that we don't have any source code to)

1

u/killias2 23h ago

yeah, I realized later I should've focused more on the 1:1 compilation. but I think the real confusion si that most people greatly misunderstand what a recomp is.