42 pointsby adrbn7 hours ago4 comments
  • baalimago18 minutes ago
    Stuff like this makes me really happy about AI. The convenience that AAA lacks, or that they intentionally withhold, is now within reach.
  • cedws43 minutes ago
    How does it actually recompile, does it use an existing tool? I can’t imagine the agent combs through every routine and hand translates the assembly.
    • adrbn15 minutes ago
      Yes, it uses two already existing tools for the heavy lifting. Remill lifts the x86 machine code to LLVM IR, and LLVM then compiles that IR to ARM64. And no, nobody translates the assembly by hand luckily, not me nor the agent. All of these 150k functions go through this automatic chain I explained before.

      What I wrote with Claude is basically everything else: custom LLVM passes, a hand-written runtime that replaces the Windows calls, a Direct3D 11 to Metal layer and the shader translation! Plus fixing the crashes one by one by iterating and playing. All details are in the Pipeline section of the README if you're interested: https://github.com/adrbn/bo2-mac#pipeline

    • saagarjha24 minutes ago
      > Remill lifts each function to LLVM IR, a chain of our own passes rewrites that IR, and the result is linked with a Win32 runtime written by hand, whose Direct3D 11 is drawn by Metal. There is no Wine and no JIT: the game runs as native code, in one process. About 150,000 functions are translated across the three executables. Only the short sequences that the copy protection hides run in a small x86 interpreter, and so does any code the translation missed, so a hole is built to cost speed rather than crash the game.
  • phaser3 hours ago
    what was your workflow for creating this? there's now extra guardrails around decompiling / reverse engineering, do you think this is still possible to do or were you just lucky enough to do it before the guardrails?
    • adrbn3 hours ago
      Well it took me almost 4 months using parallel Claude sessions, each one of them working on its own worktree. I also made a point of measuring before considering anything fixed, and I tested and played throughout the whole development so this way I knew the real impact of every change it was applying. I'm yet to start another similar project to see how things have changed in terms of guardrails, but it has not been a problem for me in the last month AFAIK. Sessions keep working without any problem and Codex (Astra) has also been of a great help in addition, when I did encounter some refusals with Claude. Also maybe (big maybe!) the fact the tool only works from a Steam copy helped, I guess.
      • addandsubtract32 minutes ago
        I would be interested in a write up of how to get started with something like this. I know there are tools like REA now, but it still seems daunting for someone that has never done game development or decompiled anything before.
        • adrbn12 minutes ago
          [dead]
  • Benard-dev2 hours ago
    [dead]