• Default Username@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    5
    ·
    8 hours ago

    A static recomp first programmatically generates non-readable source code as a base to compile from. That source code is extremely indecipherable and is only meant to be used as a middle layer for the recompilation step.

    A decompilation, on the other hand, is where humans perform the step of taking the binary and matching its functions byte for byte with the original in a human-decipherable way for the sole purpose of it being readable by other humans. A port is then built off that code by a separate team/person.

    So code readablility and correctness are the main differences. There is a reason why you often times see ports built off decomps have many more features than static recomps, and that is precisely because of the readability of the code allowing for easier modification.

    • jdr@lemmy.ml
      link
      fedilink
      English
      arrow-up
      1
      ·
      4 hours ago

      programmatically generates non-readable source code as a base to compile from

      This is exactly decompilation.

      • Default Username@lemmy.dbzer0.com
        link
        fedilink
        English
        arrow-up
        1
        ·
        3 hours ago

        Sure, but since the code is never meant to be seen by humans, and is generally deleted before a human is able to see it, it has different terminology.

        With static recompilation, the tool used to decompile the code is decompiling specifically to optimize for another compiler to compile the code again.

        With decompilation, a tool like Ghidra or IDA Pro is used for a human to look through a binary very meticulously in a way that’s specifically meant for humans to be able to understand.

        The main difference in the terminology to the end user would be the inputs. With a decomp project, you already have the complete source code in the repository that can be compiled to a binary, usually with the assets having to be extracted from the original game for legal purposes.

        With a static recomp, the source code and final output binary is generated on the end user’s machine from the original game binary along with the original assets being extracted.