Why can't code be uncompiled? - eviltoast

I see a lot about source codes being leaked and I’m wondering how it that you could make something like an exact replica of Super Mario Bros without the source code or how you can’t take the finished product and run it back through the compilation software?

  • spudwart@spudwart.com
    link
    fedilink
    English
    arrow-up
    8
    ·
    11 months ago

    Well, actually it can be. It just takes a lot more to decompile code than compile it. Depending on the objective accuracy.

    Example: the Super Mario 64 Decompilation project. This was a project that used various debug data that was left in the rom to decompile the game back to a source code that compiled a byte accurate version of the rom. This took about 3 years and a lot of skilled developers to accomplish.

    Side note: Super Mario Bros wasn’t built using a compiled language, but rather Assembly. So technically that would be a Disassembly not a Decompilation.