Title-agnostic refactor across the runtime and tooling:
- kernel: read thunk-table ordinals from the mapped XBE table, keeping the
static list only as a no-XBE fallback; add xbox_kernel_set_version() for
per-title XDK version reporting; drop Burnout 3-specific version/hardware
values and code/key paths from the comments.
- nv2a: generic EnumWindows lookup for a "- Static Recompilation" window and
a menu-name table, replacing the Burnout 3 window-class/title strings.
- platform: GetWindowTextA/EnumWindows/WNDENUMPROC stubs backing the generic
window search.
- tools: func_id/disasm/recomp derive .text/.rdata/.data and XDK section
layouts from the XBE under analysis (configure_from_xbe), retaining the
old layout as reference fallback.
- docs: README + kernel-replacement notes updated for the neutral paths.
Both our ordinal->name tables were transcribed from xboxdevwiki and both had
drifted. Checked against xboxkrnl.exe's export table (ordinal -> RVA) joined
with xboxkrnl.pdb's symbols (name -> RVA), cross-checked between kernel builds
3944 and 4039, which agree on every entry.
xbe_parser KERNEL_EXPORTS: 111 names corrected, 28 added, now 371 entries.
The table omitted ordinals 5-13 (the Dbg* block) entirely, so everything after
slid by one: it called 14 DbgPrint when 14 is ExAllocatePool, 15 ExAllocatePool
when 15 is ExAllocatePoolWithTag, and so on. Only the analysis output was
affected, but every kernel import a title reported was mislabelled.
xbox_resolve_ordinal: 23 entries were genuinely wrong -- the same kind of slide,
worst through the crypto block, where we resolved 335 to WRITE_PORT_BUFFER_USHORT
and the kernel exports XcSHAInit there. 12 are remapped to the implementation we
already had (335 XcSHAInit, 337 XcSHAFinal, 344 XcVerifyPKCS1Signature, 233
NtWaitForSingleObject, ...). The other 11 name functions we have not written, so
those cases are dropped with a comment: unresolved is right, dispatching a
wrong function is not.
Four more looked wrong and are not: the kernel's XboxHardwareInfo/XboxHDKey/
XboxKrnlVersion/XboxSignatureKey are our xbox_HardwareInfo etc, since our C
symbols already carry an xbox_ prefix. Left alone.
Not a live bug today: Burnout 3 imports 16 of the affected ordinals but none of
them had a bridge, so they returned 0 rather than running the wrong code. It was
a trap for whoever implemented those bridges next, reading a name that was a
function and a half away from the truth.
Ordinals 361-364 keep their conventional Rtl* names; the kernel implements them
as the CRT sprintf/vsprintf and the PDB says so.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Both open issues (#1, #2) are people bouncing off the same wall. All four
documented steps failed on a stock Windows console; reproduced each one.
- tools/xbe_parser was the only tool package without __init__.py/__main__.py,
so `py -3 -m tools.xbe_parser` could never run (issue #2, verbatim).
- disasm auto-detect hardcoded `burnout3_analysis.json` in two copies. Now
globs `*_analysis.json` from one helper, so per-game names work (issue #1).
- GETTING_STARTED step 2 never passed --json, so the file step 3 requires was
never produced.
- A U+2192 arrow in recomp's argparse description and in xbe_parser's
--extract-sections output crashed cp1252 consoles, i.e. `recomp --help` was
a traceback on default Windows terminals.
Also adds the MIT LICENSE file. README has claimed MIT since the initial
release but no license text existed, which legally left the repo
all-rights-reserved and blocked contribution.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Complete toolchain for statically recompiling original Xbox (2001-2005) games
into native Windows executables. Includes:
- XBE parser, x86 disassembler, function identifier, and x86-to-C lifter
- 6-step pipeline documentation (parse, disassemble, identify, lift, runtime, debug)
- 8 technical deep dives (register model, memory layout, ICALLs, D3D, kernel, SEH, etc.)
- 3 Xbox format references (XBE, kernel exports, disc images)
- Runtime templates (recomp_types.h, xbox_memory.h, kernel_stubs.h)
- Candidate game analysis for future recompilation targets
Proven on Burnout 3: Takedown — 22,097 functions lifted from machine code to C.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>