Documentation
Reference notes
Durable technical notes behind FM4 Recomp's design. Code comments link here when a decision needs more than a few lines.
Recompiler
- Pipeline map: two precedent pipelines → FM4 RecompThe survey and recompile pipeline, its checks and log markers
- Unproven switch dispatches: first FM4 diagnostic surveySwitch dispatches without a proven bound, the first diagnostic survey
- 0x82ADA478: bounded investigation of the index (field +24)The two bounded analyses of the 0x82ADA478 dispatch
- 0x82ADA478: second bounded attempt on assumptions A1/A2The two bounded analyses of the 0x82ADA478 dispatch
Kernel
GPU
- GPU path brief: VdInitializeEngines to the first VdSwap, headlessVdInitializeEngines to the first VdSwap
- The CPU-side EDRAM render-target modelThe EDRAM render-target model, the draw extent, depth/colour transfers
- EDRAM follow-up: the draw extent (Xenia's DrawExtentEstimator), for the draw 27833 stopThe EDRAM render-target model, the draw extent, depth/colour transfers
- Depth -> colour ownership transfer (X kDepthToColor)The EDRAM render-target model, the draw extent, depth/colour transfers
- Texture cache, CPU sideThe texture cache's CPU side and the fetch constants FM4 uses
- Review: front-buffer detiling (front_buffer.h) and the PNG writer (png.h)Front-buffer detiling and the PNG writer
- Race-path shader forecastWhat the disc's shaders need before the first race
Performance
About these notes
Durable technical notes behind FM4 Recomp's design. Code comments link here when a decision needs more than a few lines. Labels: VERIFIED (read in code or a specification), OBSERVED (seen in a run or trace of the game), HYPOTHESIS, FALSIFIED, UNRESOLVED. Traces, logs and other run captures are local and not distributed: they hold data derived from the game.
Notes
| Area | Note | What it covers |
|---|---|---|
| Recompiler | pipeline_map.md | The survey and recompile pipeline, its checks and log markers |
| Recompiler | unproven_switches.md | Switch dispatches without a proven bound, the first diagnostic survey |
| Recompiler | unproven_switch_c.md, unproven_switch_d.md | The two bounded analyses of the 0x82ADA478 dispatch |
| Kernel | xam_ordinals.md | xam ordinals FM4 resolves at run time |
| Kernel | audio.md | The audio render client and output |
| Kernel | offline_sockets.md | Runtime-local sockets: what FM4's callers need |
| GPU | gpu_path.md | VdInitializeEngines to the first VdSwap |
| GPU | edram.md, edram_extent.md, edram_xaspect.md | The EDRAM render-target model, the draw extent, depth/colour transfers |
| GPU | texture.md | The texture cache's CPU side and the fetch constants FM4 uses |
| GPU | front_buffer.md | Front-buffer detiling and the PNG writer |
| GPU | shader_census_forecast.md | What the disc's shaders need before the first race |
| Performance | draw_cost.md | Command-processor cost per draw |
| Performance | memory_waits.md | FM4's GPU memory waits and the race frame |
Sources FM4 copies or adapts code from
Citations of the form file:line refer to these revisions unless a citation names another.
Licences and notices: THIRD_PARTY_NOTICES.md, LICENSES.
| Project | Revision | Licence | Used for |
|---|---|---|---|
| Xenia canary | 67f16c4e315f (some citations: d119505, 838850fed838, named in place) | BSD-3-Clause | Kernel, XAM and GPU semantics; the xboxkrnl printf family is ported from it |
| XenonRecomp | ddd128bcca99fe8bfbb99bea583c972351fa6ace | MIT | The recompiler, with the patches in patches/xenonrecomp/ |
| SpeedBreaker | 312ce69 | GPL-3.0 | The POD pipeline key (runtime/video/draw_record.h) |
| ShiftGlue SDK (Xenia-derived) | 72b7dd6f | BSD-style | Semantics and techniques re-implemented here and cited in place (EDRAM pack/decode rules, depth-overwrite claim, clear absorption); no code copied |
| TinySHA1 (as modified for Xenia, in XenonRecomp) | XenonRecomp's pin | ISC-style | The STFS hash tree (included, not copied) |
| FFmpeg | 7.1.1 | LGPL-2.1 | The XMA decoder (patches/ffmpeg/, built by scripts/build_ffmpeg_xma.sh) |
Code taken from earlier ports keeps its attribution and licence in each file's header.