Commit Graph

3 Commits

Author SHA1 Message Date
sp00nz 842ee254e8 d3d: implement D3D8Surface; disasm: hash tool source into the cache key
- d3d8_resources.c / d3d8_internal.h: D3D8Surface was declared but never built,
  so tex_GetSurfaceLevel and dev_GetBackBuffer both returned E_NOTIMPL. Halo
  checks those during rasterizer init and gives up (BootToDash) before its main
  loop. A surface is a view onto a texture level (or a back buffer): it borrows
  the parent's ID3D11Texture2D and system memory and owns neither. GetSurfaceLevel
  now hands one back.

- cache.py: the analysis cache keyed on the XBE and options but not on the
  disassembler's own source, so editing a detection pass returned the previous
  run's functions.json and read as "the change did nothing" -- the same silent
  wrong answer the option fingerprint guards against. Fold the tool's *.py into
  the key.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-23 11:08:47 -07:00
sp00nz 5eb23c3477 disasm: key the cache on seeds and sections, not just the XBE
The cache checked the XBE hash, the analysis JSON hash and --text-only, but not
--seed-functions or --extra-sections. Both change what gets disassembled, so
re-running with a different seed set returned the previous run's results and
looked exactly like the seeds had had no effect. A stale cache that reports a
plausible wrong answer is worse than a slow one; you only find out by knowing
to pass --force.

Cost an hour here: an iterative seeding loop reported "converged, 0 new
targets" for two rounds running, which was the cache handing back round 1 both
times. Real convergence took 17 rounds and went from 5,230 dangling stubs to
54.

Now fingerprints every input that affects the output. Seed order does not
matter; adding a single seed invalidates.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-16 23:18:05 -07:00
sp00nz ef5ad3a734 Initial release: Xbox static recompilation toolkit
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>
2026-03-06 02:27:26 -08:00