[email protected] · ~/blog/crucible.md · 160×48
~ experience projects blog about
trevor:~/blog$  cat crucible.md
← ls ~/blog/

Crucible: Static Recompilation of Windows Games to Native Apple Silicon

Lifting 32-bit and 64-bit Windows executables ahead of time to C and native arm64 for macOS, plus 64-bit games on iOS and iPadOS.

The usual way to run Windows games on Apple Silicon is a runtime translation stack: Wine handles Win32, Rosetta 2 translates the Wine-loaded x86 PE code at runtime (Rosetta translates Mach-O binaries ahead of time, not PE images), and a graphics layer maps Direct3D onto Metal. That stack has real advantages on macOS, including Apple's hardware x86 memory-ordering (TSO) mode under Rosetta. It stops working on any platform that does not allow generating CPU code at runtime, like non-jailbroken iOS and iPadOS.

Crucible does the translation ahead of time instead. It takes a Windows game executable (32-bit x86 PE32 or 64-bit x86-64 PE32+), lifts its machine code to C, compiles that natively to arm64 with Clang, and links it against a custom runtime that stands in for Windows and DirectX. At runtime there is no emulator, CPU JIT, Wine, or Rosetta.

Because no CPU code is generated at runtime, the same lifted C produced for a 64-bit macOS build also compiles for iOS and iPadOS (32-bit games are macOS-only). Sleeping Dogs: Definitive Edition runs natively with MetalFX at 40 to 60 fps on an M4 iPad Pro (1600×1200 upscaled to a 3200×2400 drawable) and capped at 30 fps on an iPhone Duo (1017×699 upscaled to 2034×1398; uncapped it can hit ~60 fps before throttling, so capping at 30 keeps thermals and frame pacing steady). Every guest function also ends up as a normal C symbol, so the game stops being a black box. You can hook an arbitrary instruction in plain C, repair old PC port bugs, or rewrite engine functions one at a time while the game stays playable.

Static recompilation already has an active console scene (N64Recomp, XenonRecomp, and the Sonic Unleashed port). Windows PC executables are a different problem. There is no fixed console hardware or SDK, you have to stand in for a sprawling Win32, COM, and DirectX API surface, and the games were built with decades of different MSVC and CRT toolchains.

Crucible started on the 32-bit side from pcrecomp and is now roughly 43,700 lines of Python, C, C++, and Objective-C across two lifters, a shared Windows/DirectX runtime, and bring-up tooling (excluding DXMT). No game code or assets live in Crucible or any port repository. Crucible itself knows nothing about any particular game. Each port is a thin repo that has Crucible as a Git submodule, holds only its own config, seeds, hooks, and rewritten functions, and loads the player's own copy of the game files. I plan to open-source Crucible soon.

Sleeping Dogs: Definitive Edition running natively on an M4 iPad Pro via Crucible and DXMT, with the Metal Performance HUD showing 60.00 fps and MetalFX Spatial scaling from 1600x1200 to 3200x2400.
Sleeping Dogs: Definitive Edition on an M4 iPad Pro (iPadOS 27.2): Metal Performance HUD showing DXMT D3D11, 60.00 fps, 14.90 ms GPU, and MetalFX Spatial scaling from 1600×1200 to a 3200×2400 drawable. Click for full resolution.

1. Two lifters, one shared runtime

32-bit and 64-bit Windows executables look completely different at the front end, so Crucible keeps two separate lifters (recomp/lift32_cpu.py and recomp/x64/lift64.py) feeding one shared runtime:

32-bit PE32  ──▶ disasm32.py + seeds ──▶ lift32_cpu.py ──┐
                                                         ├──▶ split .c units ──▶ clang ──▶ link (+ runtime & DXMT) ──▶ arm64 binary
64-bit PE32+ ──▶ .pdata / .xdata     ──▶ lift64.py     ──┘                                                             (macOS / iOS)

On 32-bit (PE32), function boundaries are not recorded anywhere reliable in the binary. Crucible runs a recursive-descent disassembler (disasm32.py) over .text seeded by entry points, relocation entries, pointer tables, and immediate-operand scans, then closes missed direct calls iteratively (make close). When an indirect call reaches an unlifted address at runtime, the runtime appends it to build/missing.txt, and you add those addresses to seeds_runtime.json by hand.

On 64-bit (PE32+), Windows ABI rules do most of the discovery for you: every non-leaf function has an entry in .pdata / .xdata for stack unwinding. lift64.py reads .pdata directly, merges chained split-prologue fragments back into single C functions so loops and jump tables stay intra-procedural, discovers leaf functions from call targets, relocations, and lea references, and resolves switch jump tables (including two-level byte-index tables) from their bounds checks.

On 64-bit, the lifter covers integer code, x87 (on a double stack for the rare CRT fmod / long double), SSE/SSE2/SSE3, and extensions through SSSE3, SSE4.1/4.2, AES, PCLMULQDQ, BMI1/2, ADX, AVX, AVX2, FMA, and F16C. Each YMM register is split into its 128-bit xmm half and an upper ymmh half, lifted lane-by-lane in plain C so Clang can vectorize onto NEON where it can.

The lifted output is split across dozens or hundreds of .c compilation units. For Sleeping Dogs, a 23 MB .text section produces about 700 MB of generated C across 176 units, compiling down to a 108 MB native arm64 macOS binary. A full rebuild of all lifted units takes minutes even across parallel cores, so the Makefile only re-lifts and recompiles when the lifter or hook set changes; iterating on the runtime itself only recompiles the runtime files and re-links. Functions are partitioned by instruction count rather than emitted text length. Toggling a lifter optimization leaves every function in the same compilation unit, so you can link object files from an optimized build and an unoptimized build side by side to bisect a miscompilation file by file.

2. Making lifted C fast, and checking it

Straight instruction-by-instruction lifting works, but it produces poor codegen: every arithmetic instruction writes six status flags into a CPU struct, and every guest register access hits memory because Clang cannot rule out aliasing between guest memory writes and the CPU struct.

Flag liveness with runtime poison checks

x86 arithmetic updates CF, ZF, SF, OF, PF, and AF, and most of those writes are dead before the next flag-setting instruction. lift64.py runs a backward dataflow pass per function to compute a constant bitmask L of live flags for each instruction, and passes L into always_inline helpers in cpu64.h:

#ifdef RECOMP_FLAGCHECK
#define FL_SET(L, bit, f, v) do { if ((L) & (bit)) c->f = (v); else c->f = 2; } while (0)
#define FCHKA(f, va) ((f) > 1 ? (recomp64_dead_flag((va), __func__), (f)) : (f))
#else
#define FL_SET(L, bit, f, v) do { if ((L) & (bit)) c->f = (v); } while (0)
#define FCHKA(f, va) (f)
#endif

In a normal build, L is a compile-time constant so Clang folds away dead flag calculations, including parity8. On a real 64-bit game, 86% of flag-setting operations compute fewer than six flags, and the binary came out roughly a fifth smaller.

In a FLAGCHECK=1 build, every elided flag is poisoned with 2 instead of omitted, and every flag read traps if the value is greater than 1. It is not a formal proof since it only checks paths that actually execute, but running a game under FLAGCHECK=1 catches liveness bugs immediately at the exact instruction address that read a wrongly killed flag.

Register promotion

Inside each lifted function, the 16 GPRs and 16 XMM registers are promoted from fields of CPU64 into C local variables. They are loaded at function entry, flushed back to the struct only if dirty before a call, jump-out, or return, and reloaded after calls only if live downstream (or needed by a later dirty writeback). Because locals cannot alias guest memory, Clang keeps them in arm64 hardware registers. On a hot SSE loop, register promotion dropped CPU-struct accesses from 738 to 48 and total instructions from 1,961 to 1,351.

Both passes are easiest to see on real lifter output. This is the 12-instruction xorshift PRNG rnd() from Crucible's own freestanding test program (tests/x64/t_basic.c), lifted naively first and then with flag liveness and register promotion on:

Before (LIFT64_FLAGLIVE=0 LIFT64_PROMOTE=0)
void F_140001000(CPU64 *c)
{
    c->rdx = rd64((0x140003018ull));                          /* mov rdx, [rip + 0x2011] */
    c->rax = c->rdx;                                          /* mov rax, rdx */
    c->rax = (uint64_t)op_shl(c, c->rax, (uint8_t)0xDull, 8); /* shl rax, 0xd */
    c->rax = (uint64_t)flags_logic(c, c->rax ^ c->rdx, 8);    /* xor rax, rdx */
    c->rdx = c->rax;                                          /* mov rdx, rax */
    c->rdx = (uint64_t)op_shr(c, c->rdx, (uint8_t)0x7ull, 8); /* shr rdx, 7 */
    c->rdx = (uint64_t)flags_logic(c, c->rdx ^ c->rax, 8);    /* xor rdx, rax */
    c->rax = c->rdx;                                          /* mov rax, rdx */
    c->rax = (uint64_t)op_shl(c, c->rax, (uint8_t)0x11ull, 8);/* shl rax, 0x11 */
    c->rax = (uint64_t)flags_logic(c, c->rax ^ c->rdx, 8);    /* xor rax, rdx */
    wr64((0x140003018ull), c->rax);                           /* mov [rip + 0x1fec], rax */
    c->ret_to = pop64(c); return;                             /* ret */
}
After (LIFT64_FLAGLIVE=1 LIFT64_PROMOTE=1)
void F_140001000(CPU64 *c)
{
    uint64_t r_rax = c->rax, r_rdx = c->rdx, r_rsp = c->rsp;
    r_rdx = rd64((0x140003018ull));
    r_rax = r_rdx;
    r_rax = (uint64_t)opm_shl(c, 0, r_rax, (uint8_t)0xDull, 8);
    r_rax = (uint64_t)flagsm_logic(c, 0, r_rax ^ r_rdx, 8);
    r_rdx = r_rax;
    r_rdx = (uint64_t)opm_shr(c, 0, r_rdx, (uint8_t)0x7ull, 8);
    r_rdx = (uint64_t)flagsm_logic(c, 0, r_rdx ^ r_rax, 8);
    r_rax = r_rdx;
    r_rax = (uint64_t)opm_shl(c, 0, r_rax, (uint8_t)0x11ull, 8);
    r_rax = (uint64_t)flags_logic(c, r_rax ^ r_rdx, 8);
    wr64((0x140003018ull), r_rax);
    c->ret_to = pop64l(&r_rsp); c->rax = r_rax; c->rdx = r_rdx; c->rsp = r_rsp; return;
}

Five of the six flag-setting ops pass 0 as their live-flag mask so Clang folds their flag work away completely, while r_rax, r_rdx, and r_rsp stay in hardware registers until the single flush on return. The final xor still calls full flags_logic because the pass conservatively treats every flag as live at a ret.

Differential testing against Unicorn and Rosetta

Lifter bugs in obscure instructions can sit quiet for hours until a physics or shader-setup path hits them. Every instruction form found in a game executable is tested differentially (difftest.py / difftest64.py) with randomized register and memory states against Unicorn (skipping control transfers, cpuid/rdtsc, undefined flags, and NaN payloads where x86 and arm64 legitimately differ).

On 64-bit, Unicorn lacks AVX/AVX2/FMA and gets several BMI edge cases wrong. To check those, Crucible includes a small x86-64 oracle (oracle_x86.c) that executes each instruction's raw bytes directly on the same Apple Silicon Mac under Rosetta 2 and compares register and flag state against the lifted arm64 C. Along the way, that turned up a few spots where Rosetta itself disagrees with Intel's manual (flags ptest clears, locked cmpxchg flags, and movsxd without REX.W), which the harness documents and masks explicitly.

3. Architecture and runtime trade-offs

x86 TSO vs. arm64 weak memory ordering

Multithreaded PC games are full of lock-free code (task schedulers, job queues, audio mixer ring buffers) written under x86's Total Store Order (TSO), where stores become visible in program order and loads observe them in order. arm64 promises neither. Rosetta can enable Apple Silicon's hardware TSO mode, but that mode is not available to ordinary user processes, so a static recompiler has to enforce ordering in software.

The bug that led here was a worker thread invoking a pure virtual function: a producer filled in a task and published it into a queue, and the worker saw the published pointer before the producer's writes to the task's vtable became visible on its core. Measured later with plain accesses throughout (ORDER=0), a 64-bit game crashed or spun in two runs out of two.

Crucible's answer in cpu64.h is acquire loads and release stores for aligned guest memory accesses, with a plain memcpy fallback for unaligned addresses (x86 allows unaligned accesses where ldar/stlr would fault):

static inline uint64_t rd64(uint64_t a) {
    if (__builtin_expect(!(a & 7), 1))
        return __atomic_load_n((uint64_t *)GP(a), __ATOMIC_ACQUIRE);
    uint64_t v; memcpy(&v, GP(a), 8); return v;
}

static inline void wr64(uint64_t a, uint64_t v) {
    if (__builtin_expect(!(a & 7), 1))
        __atomic_store_n((uint64_t *)GP(a), v, __ATOMIC_RELEASE);
    else memcpy(GP(a), &v, 8);
}

Unaligned scalar accesses and 16-byte vector loads and stores (rdx/wrx) remain plain memcpy, which is a known gap in the ordering. Stack pushes and pops stay plain as well since only the owning thread touches them. General stack-frame accesses stay ordered by default: STACK_PLAIN=1 exists for measuring overhead, but is left off because games occasionally pass pointers to stack locals across threads.

One runtime source for 32-bit and 64-bit, with an object-diff gate

Keeping two separate Win32 runtimes would double the maintenance, so everything width-dependent goes through recomp/runtime/guest.h: gptr_t (uint32_t vs uint64_t), ARG(n) (stack slots vs rcx/rdx/r8/r9), RET vs RETH (because INVALID_HANDLE_VALUE must sign-extend to all ones at 64 bits), and G_TIB (fs: vs gs:).

The risk in refactoring a shared runtime for 64-bit is quietly regressing older 32-bit ports I am not actively running. To catch accidental changes, tools/rt_identity.sh compiles every runtime object file for a 32-bit game's configuration before and after a refactor and diffs a manifest of each object's code and data. An empty diff confirms the runtime objects for that configuration compiled to identical bytes.

Table-driven 64-bit SEH and C++ exceptions

On Windows x64, exception dispatch is table-driven via .pdata and .xdata. Crucible does not reimplement MSVC's C++ exception semantics. The game's own __CxxFrameHandler3, __C_specific_handler, catch blocks, and destructor funclets are lifted code and run natively. recomp/runtime/seh64.c implements the OS half: RaiseException, RtlLookupFunctionEntry, RtlVirtualUnwind (every unwind opcode, chained entries, frame registers, saved XMMs), and RtlUnwindEx, including STATUS_UNWIND_CONSOLIDATE (how MSVC's C++ runtime transfers control into every catch block) and walking past the consolidation callback frame when a catch block rethrows.

In a statically recompiled binary, unwinding also has to collapse host C stack frames between the throw and the catch, and resume the catching function in the middle of its body. At lift time, lift64.py scans the unwind tables for functions that contain a catch or __except block, turns each resume target into a lifted entry point, and wraps only those functions in a small jmp_buf frame:

#define EH_FUNCTION(name, body) \
    void name(CPU64 *c) { \
        struct eh_frame f; \
        f.up = c->eh_top; f.entry_rsp = c->rsp; c->eh_top = &f; \
        if (_setjmp(f.jb)) dispatch64(c, f.resume); else body(c); \
        c->eh_top = f.up; \
    }

When unwinding reaches the catching frame, seh64_unwind restores the target guest registers, stores the resume address in f.resume, and _longjmps back into the catching function. Functions that only run destructors need no wrapper: their cleanup handlers run during the unwind pass and their host frames are dropped. Right now, SEH64 is verified against tests/x64/t_seh.c with hand-written unwind tables. No real game has thrown a C++ exception through it yet.

4. Address space layout: macOS and iOS

The virtual address plan (recomp/runtime/addrmap.h) is where 32-bit guests, 64-bit macOS, and 64-bit iOS differ the most.

  • For 32-bit guests, the runtime reserves a contiguous 4 GiB window at g_mem with a 64 KiB null-guard region, the PE image at 0x00400000, patch variables and hooks, split heap regions, stacks, TIBs, and import thunks, all checked for overlap at compile time with _Static_assert. At 0x80000000 sits a page-aligned 512 MiB vertex/index buffer arena so Metal buffers can wrap guest vertex memory without copying.
  • On 64-bit macOS, guest addresses are host addresses. Most PE32+ executables prefer 0x140000000. On arm64 macOS, the dyld shared library cache begins at 0x180000000, leaving 1 GiB of room for the image right at its preferred base. GP(a) is just a cast: (void *)(uintptr_t)(a). Pointers cross between lifted game code, Win32 HLE, and DXMT with no translation; ID3D11DeviceContext::Map hands DXMT's pointer directly to the game. Runtime regions (thunks, TEBs, stacks, 64 GiB guest heap, 64 GiB VirtualAlloc) sit at fixed addresses from 0x100_0000_0000 (1 TiB) up, under Windows' 47-bit user-space limit.

Reserving the image range and fitting into iOS

iOS adds two virtual-memory constraints on top of the 64-bit layout:

  1. The first is the address ceiling: 512 GiB (0x80_0000_0000), so the 1 TiB+ macOS map does not exist. Measured on an 8 GB M4 iPad Pro, an app without entitlements gets 7 GiB of reservable VA space and a 5.1 GiB reported memory limit. Adding extended-virtual-addressing and increased-memory-limit raises that to 64 GiB of VA (0x70_0000_0000 to 0x80_0000_0000) and an 8.2 GiB reported memory limit. Since iOS allocates from the bottom of that window, Crucible packs its thunks, TEBs, stacks (4 GiB), guest heap (12 GiB), and VirtualAlloc (12 GiB) into the top half (0x78_0000_0000+).
  2. The second is holding 0x140000000 across ASLR. Reserving it inside a __attribute__((constructor)) is too late: system libraries initialize first, and in roughly 1 out of 30 launches their allocator had already claimed part of that range. On macOS, a leftover re-exec fallback could retry, but iOS apps cannot re-exec themselves.

Both 64-bit macOS and iOS now solve this at link time by having the kernel reserve the range before any user or dyld code runs. The executable defines a 1 GiB empty __GUEST segment linked at 0x120000000 (-Wl,-segaddr,__GUEST,0x120000000):

__asm__(".zerofill __GUEST,__hold,_g_guest_hold,0x40000000,14");

Even with ASLR sliding the executable randomly upward (4 to 68 MiB observed, with up to 512 MiB allowed for), the 1 GiB zerofill segment always blankets 0x140000000 to 0x160000000 while ending at or below the shared cache at 0x180000000. It costs virtual address space but no physical RAM. When the loader maps the PE sections, it deallocates the exact slices it needs out of that reservation.

5. Graphics, audio, and platform integration

Graphics take two paths directly to Metal:

  • Direct3D 9 (32-bit) is Crucible's own Metal implementation (d3d9.c, gpu.m), with custom Shader Model 1.x and 3.0 → MSL translators (sm1.c, sm3.c), multiple render targets, INTZ depth textures, and hardware instancing.
  • Direct3D 10 / 11 and DXGI (32-bit and 64-bit) are built on my fork of DXMT, pulled in as a submodule. Guest COM calls route through generated thunks (tools/gen_d3d11_thunks.py), with support for HDR output (DXGI 1.6) presented in extended range, D3DReflect shader reflection, and MetalFX upscaling enabled by default on iOS. Getting DXMT onto iOS required cross-compiling LLVM 15 for arm64 iOS, replacing Cocoa hooks with UIKit views, switching managed storage to shared, and tagging DXMT's runtime-compiled Metal shader libraries with iOS headers and targets so iOS accepts them.

The rest of the Windows surface that games rely on is there too: kernel32/user32/COM/threads/TLS callbacks, case-insensitive path matching for case-sensitive volumes, DirectSound and XAudio2 (2.7, 2.8, and 2.9), DirectInput/XInput/raw mouse/SDL3 controllers, FFmpeg-backed Bink video and multi-track audio decoding (32-bit), live Steamworks (32-bit), and an offline local-user/achievements stand-in (64-bit).

For macOS + iOS ports, Crucible also includes cloudsave.m (bidirectional iCloud Drive save syncing between Mac and iPad with conflict backups) and touchpad.m, a custom touch overlay where left and right virtual sticks anchor wherever your thumbs land, shoulders and triggers sit for thumb ergonomics, and the game can report context (such as on-foot vs. driving and per-button labels) so the overlay can adapt. It hides whenever a real controller, mouse, or keyboard is attached.

Sleeping Dogs: Definitive Edition running natively on an iPhone Duo (A20 Pro) via Crucible and DXMT with custom on-screen touch controls, showing a locked 30.00 fps and MetalFX Spatial scaling from 1017x699 to 2034x1398.
Sleeping Dogs: Definitive Edition on an iPhone Duo (A20 Pro, iOS 27.3) with Crucible's custom on-screen touch overlay (touchpad.m): DXMT D3D11, capped at 30.00 fps in-game to avoid thermal throttling (9.30 ms GPU inside a 33.34 ms frame, 2.47 GB app footprint), and MetalFX Spatial scaling from 1017×699 to 2034×1398. Click for full resolution.

6. Hooks, repairs, and what has been built on it

Crucible did not start as a shared framework. The 32-bit recompiler and D3D9-on-Metal runtime grew out of two earlier standalone ports, Scarface: The World Is Yours (playable through opening missions) and GTA: San Andreas (playable from the opening cutscene into free roam). Neither uses Crucible. Once later ports started copying the runtime forward and requiring manual backports for every fix, I extracted the pipeline and runtime into Crucible as a shared submodule.

On the 64-bit side, guest.h has C hooks, so a game repo can replace raw byte-patch files with plain C:

  • AT(0x140123456) { ... }: lift64.py scans the game's runtime C files before lifting and emits a call right before that instruction address, handing your C code the live CPU *c registers and flags.
  • dispatch_replace(va, fn, &orig): swaps a lifted function for a C replacement while keeping a pointer to the original.
  • dispatch_add(fn): mints a guest address for a host C function so you can drop it into guest vtables or function pointers.

Fixing a shipped bug in the Windows game then becomes a one-liner instead of a hex byte patch. These three hooks are from the Sleeping Dogs port (lifting the 116 fps hold in Render::RenderFrame and restoring missing attached props like policeman hats and umbrellas in CreateAndAttachProp, all gated on a toggle so you can still compare against unpatched behavior):

/* Render::RenderFrame: skip the 116 fps cap hold */
AT(0x1406a13c1) { if (g_fixes) c->zf = 0; }
/* CreateAndAttachProp: do not drop valid props missing an asset set or rigid body */
AT(0x1405242cb) { if (g_fixes) c->zf = 0; }
AT(0x140524622) { if (g_fixes) c->zf = 1; }

Each Crucible port so far has pushed a different layer of the stack:

  • GTA IV: The Complete Edition (32-bit, D3D9; playable): This is the port that Crucible's D3D9-on-Metal SM3.0 renderer (deferred lighting, cascaded and point-light shadows, and particles) and its XInput support were built for.
  • Call of Duty: World at War, Call of Duty: Black Ops, and Max Payne 3 (32-bit, D3D9 & D3D11; bring-up / title screens): These brought DXMT (D3D11), full Bink video and multi-track audio decoding with keyframe seeking, archive-mod overlays, and thread-QoS/audio diagnostics into the shared stack.
  • NieR:Automata (64-bit, D3D11; playable): The first 64-bit port, playable through the prologue into the Bunker with HDR DXGI rendering, audio, saving, and a clean exit. It is why Crucible has .pdata lifting, AVX2/FMA/F16C, setjmp/longjmp, XAudio2 2.9, and the memory-ordering fix.
  • Sleeping Dogs: Definitive Edition (64-bit, D3D11; playable on macOS, iPadOS, and iOS): The official macOS release is an aging Intel-only port, and there is no iOS version. Recompiling the Windows build made it native arm64 on Metal. It is also what the iOS/iPadOS port was built around (the __GUEST reservation, MetalFX spatial scaling, iCloud Drive cross-saves, and context-aware touch controls), and it put the C hooks (AT() / dispatch_replace) to work repairing bugs in the original PC release.

7. How it was built

Most of Crucible's code was written by coding agents, guided by an AGENTS.md workflow in the repo that spells out the porting loop and invariants. I chose the targets, made the architecture calls (one runtime for both widths, the submodule layout, the graphics policy), directed debugging, and played the builds to decide what counted as fixed.

That is a big reason the verification tooling exists in the first place. When agents are writing instruction handlers and width-neutral runtime refactors, manual code review alone misses subtle flag bugs or 64-bit pointer truncation. Differential testing against Unicorn and Rosetta, FLAGCHECK=1 dead-flag poisoning, compile-time _Static_assert address-map checks, and rt_identity.sh object diffs turn correctness checks into something mechanical you can run after every change.

8. What isn't done yet

The main gaps right now:

  • There is no Direct3D 12, which rules out most recent AAA releases.
  • Games that generate CPU code at runtime (Unity's Mono backend, LuaJIT, runtime VMs) cannot be statically lifted. That trade-off comes with ahead-of-time recompilation.
  • On the 64-bit runtime, Direct3D 9, real networking (Winsock and WinHTTP are offline stubs), WASAPI, the Windows registry, and Bink video decoding are not ported yet.
  • cpuid reports plain SSE2 by default (AVX2/FMA is opt-in per game), and AVX2 gathers and AVX-512 are not translated.
  • For exceptions, Visual Studio 2019+ compressed C++ unwind metadata (__CxxFrameHandler4) is not parsed yet, hardware faults (access violations, divide-by-zero) are not converted into guest SEH exceptions, and exceptions cannot cross a host frame such as a window procedure.
  • iOS builds need a paid Apple developer team for the extended-virtual-addressing and increased-memory-limit entitlements, and can only be sideloaded.

Every new game turns up something subtle (a memory-ordering assumption, an undocumented flag behavior, an allocator race on iOS), and fixing it once in Crucible means every other port gets the fix when it moves its submodule forward.

trevor:~/blog$
zsh 5.9