Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/hedge-dev/UnleashedRecomp/llms.txt

Use this file to discover all available pages before exploring further.

Unleashed Recompiled is composed of two cooperating CMake targets that together form a complete, self-contained PC port. Understanding how the codebase is split helps when navigating the repository or contributing changes.

CMake Targets

TargetRole
UnleashedRecompThe main executable: engine runtime, graphics backend, kernel layer, UI, and all PC-side systems
UnleashedRecompLibThe statically compiled game library produced by XenonRecomp from default.xex; requires the game files to build
UnleashedRecompLib is linked into UnleashedRecomp at compile time. It is never distributed as part of the project — it is generated from your own legal copy of the game.

UnleashedRecomp Subdirectories

The UnleashedRecomp/ source tree is organised by subsystem. Each directory has a focused responsibility:
DirectoryRole
api/Internal API layer used by other subsystems
apu/Audio processing unit emulation (maps Xbox 360 XMA/PCM audio to SDL_mixer)
cpu/CPU-level emulation helpers (PPC register state, intrinsics)
gpu/Graphics backend — D3D12 on Windows, Vulkan everywhere else via the plume HAL
hid/Human input device handling (gamepad, keyboard, DualSense haptics/LED)
install/Installation wizard, file system helpers (ISO parsing, XContent containers, virtual FS)
kernel/Xbox 360 kernel translation layer (threads, synchronisation, file I/O, XEX loader)
locale/Localization system for the custom menus
mod/Mod loader compatible with Hedge Mod Manager
os/OS abstraction layer (window management, clipboard, process lifecycle)
patches/Gameplay patches — aspect ratio, FPS cap, camera, audio, video playback, player behaviour
ui/Custom in-game menus built on Dear ImGui (options, achievements, installer UI)
user/User configuration (config.toml), achievement state, save data, persistent preferences

Graphics Backend

The graphics backend in gpu/ is built on top of plume — a rendering hardware abstraction layer (HAL) developed by Darío. plume abstracts the differences between graphics APIs so the rest of the engine can issue draw calls without knowing which backend is active:
  • D3D12 — used on Windows; supports Waitable Swap Chains and Flip Models for low latency presentation
  • Vulkan — used on Windows, Linux, and macOS (via MoltenVK, bundled under thirdparty/MoltenVK/)
Modern rendering features are used throughout: bindless texture descriptors, parallel transfer queues for asset streaming, and pipeline specialization for maximum throughput on a wide range of hardware.

Custom Shaders

Hand-written HLSL shaders live in gpu/shader/ and cover every effect that falls outside the recompiled game code:
Shader filePurpose
gamma_correction_ps.hlslFinal gamma / color-space correction pass
enhanced_motion_blur_ps.hlslHigher-sample-count motion blur post-process
gaussian_blur_*.hlslGaussian blur kernels (3×3 through 9×9 taps) for Depth of Field
resolve_msaa_color_*x.hlslMSAA color resolve for 2×, 4×, and 8× sample counts
resolve_msaa_depth_*x.hlslMSAA depth resolve
imgui_vs.hlsl / imgui_ps.hlslVertex and pixel shaders for Dear ImGui UI rendering
movie_vs.hlsl / movie_ps.hlslVideo playback shaders
copy_*.hlsl / csd_*.hlslUtility copy and CSD (Criware) filter shaders

Patches Subsystem

The patches/ directory contains targeted modifications applied at startup that are not feasible to fix inside the recompiled game code itself:
  • aspect_ratio_patches.cpp — ultrawide and arbitrary aspect ratio support
  • fps_patches.cpp — frame rate cap removal and high-FPS bug fixes
  • camera_patches.cpp — camera behaviour corrections at high frame rates
  • audio_patches.cpp — audio timing and streaming fixes
  • video_patches.cpp — video playback corrections
  • player_patches.cpp — player movement fixes at non-native frame rates

Third-Party Libraries

Dependencies are managed by vcpkg and pulled in as submodules under thirdparty/:
LibraryPurpose
SDL2Window management, input, audio device abstraction
SDL_mixerAudio mixing and XMA/Vorbis decoding
Dear ImGuiImmediate-mode UI framework for all custom menus
ImPlotPerformance graph overlay (F1 menu)
concurrentqueueLock-free multi-producer/consumer queue for async work
ddsppDDS texture header parsing
jsonJSON serialisation (config, launch descriptors)
magic_enumCompile-time enum reflection
msdf-atlas-genMulti-channel signed distance field font atlas generation
stbImage load/decode utilities
o1heapO(1) deterministic memory allocator
MoltenVKVulkan-over-Metal translation layer (macOS)
plumeRendering hardware abstraction layer (D3D12 / Vulkan)

Build docs developers (and LLMs) love