All projects

Emulation

Xenia headless — emulation as a decomp oracle

Extended the open-source Xbox 360 emulator with a headless Vulkan/Linux mode so game decompilations can be validated automatically — booting a rebuilt title to stable gameplay at 175 fps.

ActiveFeb 2026 – Presentfreeqaz/xenia

emulation · Vulkan · Linux · C++ · reverse-engineering

Dance Central 3 attract mode rendered by headless Xenia on Linux during an automated boot-verification run

Xenia is a mature open-source Xbox 360 emulator — roughly 7,000 commits of C++ built for playing games in a desktop window. My decompilation projects needed something different: a way to prove that a rebuilt binary behaves identically to the original, repeatedly and unattended. So I forked Xenia and turned it into that oracle.

The foundation was a from-scratch headless mode for Linux: a windowless Vulkan command processor with deferred-draw handling (no swapchain to present to), scripted controller input, frame dumps, and a NOP audio backend — a coherent 3,328-line feature landed as a single working commit into an unfamiliar codebase, then maintained through five months and 156 commits of non-regressing changes. Every risky change ships behind a default-off cvar, and nearly every fix carries an explicit A/B proof against the known-good baseline: before/after counts of draws, swaps, fps, and segfaults.

On top of that substrate I built the instruments a decompilation harness needs: a real interactive GDB-protocol debugger for the emulated PowerPC guest (breakpoints implemented by patching JIT-compiled code), a function entry/exit tracer woven into the x64 JIT’s prologue and epilogue, and per-frame telemetry for validating gameplay. The first target game now boots from cold start to stable gameplay with its main loop running at 175 fps — including a 64× config-parse speedup (15.3 s to 236 ms) from replacing a 4 KiB-granularity allocator with a bump allocator for 125,000+ small allocations.

The hardest problem was a segfault landing at guest-base plus exactly 4 GiB — the signature of a NULL dereference — striking two different games. Tracing it across four layers at once (the host x64 JIT, the emulated PowerPC guest, the kernel emulation, and the game engine) from fault addresses and logs alone revealed it was not a game bug but a hardware-fidelity gap: real hardware backs guest page zero with memory, and games legitimately touch it. The fix was a general, cvar-gated, upstream-quality correction, documented across a ten-page structured fault wiki that records refuted hypotheses alongside the winning theory.

The project is active: one title is fully validated, and bring-up of a second is the current frontier.

Xenia headless — emulation as a decomp oracle | Free Wortley