How itsnotrexed/leonida works
Leonida is a static-recompilation project that builds a Windows runtime and extracted assets from a user’s Xbox Series game copy. The documented workflow checks the package, translates shaders, exports assets, prepares the runtime, and optionally creates a GPU pipeline cache. The graph preserves the distinct shader and asset-processing stages, plus the PE loader and import shims. Most tool relationships come from the README’s workflow description; unsampled implementation details are not inferred.
Main entry points: make_game.py Build orchestrator · Program.cs Archive export · tile_probe.py Texture layout probe · registry.cpp Shim registry
Components 22
Package validation
- Version manifest
game/xbox-1.0.2.1.json - Build orchestrator
make_game.py
Shader translation
- Shader carving
tools/shader_carve.py - Native unpacking
tools/fssm_unpack.py - RDNA disassembly
tools/shader_disasm.py - Instruction parsing
tools/shader_ir.py - SPIR-V translation
tools/rdna2spirv.py - GPU pipeline cache
runtime/test/vk_pipeline_check.cpp
Asset export
- Archive export
tools/rpf9dump/Program.cs - Model export
tools/rpf9dump/Program.cs - Texture export
tools/tex_export.py - Audio bank support
tools/awc_opus.py
Runtime support
- PE mapper
runtime/src/pe_loader.cpp - Runtime entry
runtime/src/main.cpp - Shim registry
runtime/shims/registry.cpp - XMem shim
runtime/shims/xmem.cpp - D3D12 shim
runtime/shims/d3d12_xs.cpp
GPU layout research
- Texture layout probe
tools/tile_probe.py - Swizzle search
tools/swizzle_search.py - AMD detiling
tools/amd_swizzle.py - Block features
tools/bc_feature.py
Other components
- Game owner
Connections 21
- Game owner → Build orchestrator: supplies copy
README.md - Build orchestrator → Version manifest: checks version
README.md - Build orchestrator → Shader carving: runs shader stage
README.md - Shader carving → Native unpacking: passes carved code
README.md - Native unpacking → RDNA disassembly: passes native code
README.md - RDNA disassembly → Instruction parsing: parses disassembly
- Instruction parsing → SPIR-V translation: provides instructions
tools/rdna2spirv.py - Build orchestrator → Archive export: runs asset stage
README.md - Archive export → Model export: exports models
README.md - Archive export → Texture export: exports textures
README.md - Archive export → Audio bank support: decodes audio banks
README.md - Build orchestrator → Runtime entry: runs runtime stage
README.md - Runtime entry → PE mapper: loads image
runtime/src/main.cpp - PE mapper → Shim registry: resolves shims
runtime/src/pe_loader.cpp - Shim registry → XMem shim: registers entries
runtime/shims/xmem.cpp - Shim registry → D3D12 shim: registers entries
runtime/shims/d3d12_xs.cpp - Build orchestrator → GPU pipeline cache: creates cache
README.md - SPIR-V translation → GPU pipeline cache: provides shaders
README.md - Texture layout probe → Swizzle search: supplies features
tools/swizzle_search.py - Texture layout probe → AMD detiling: scores layouts
tools/amd_swizzle.py - Texture layout probe → Block features: extracts features