‹ BackHN Continuity

Thread

Resident Evil 4 (GameCube) – complete byte-identical decompilation to C/C++

140 points · 99 comments · metrofun

  1. wk_end · · focus · HN ↗
    From a preservation perspective, this is one of the least useful decomps ever, given how committed Capcom is to making sure RE4 is ported absolutely everywhere (kidding!)

    Made using the leaked debug build and its symbols, which shows how meaningful the work the game preservation community that acquires and distributes these things is.

    OTOH this is pretty off-putting:

    > Where the compiler needed a particular source shape to reproduce a register choice or a schedule and no natural spelling was found, the construct is marked with a // COMPILER-DIFF: comment (644 of them: dead tests, empty asm("") launders and anchors, register T x asm("rN") pins, padding statements).

    To me the value of a decomp isn't reproducing the original bytes per se (we already have the original bytes after all) - it's about reconstructing the understanding of the original game as represented by human-readable source code; getting byte-for-byte is just an indication that you've gotten it right. Needing to add a bunch of slop to force the compiler to match the original output is actually just an indication that you've gotten it wrong - and it's a demonstration of the danger of Goodhart's law, especially as it applies to AI.

    1. ErroneousBosh · · focus · HN ↗
      > given how committed Capcom is to making sure RE4 is ported absolutely everywhere

      Heh. I was just looking at the RE family on Steam. Nothing over a fiver.

      I guess they really did make it more convenient than piracy.

Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.