How veritr1x/recomp-kit works
recomp-kit statically translates 32-bit x86 Windows games into native applications. The principal workflow starts with a game repository and translation inputs, produces translated game code, then loads and runs it through the guest runtime and Windows/DirectX shims; the host renders, presents frames, and supplies input and audio across platforms. Additional product branches cover mods and on-screen controls. The graph follows README statements and SOURCE INDEX references; unsampled implementations and their detailed call paths are not inferred.
Main entry points: main.cpp SDL host entry · d3d_render.cpp D3D renderer · loader.h PE loader · kernel32.cpp Kernel32 shims
Components 22
Game translation
- Static translator
tools/recomp/translate.py - Web launcher
web/launcher/core.js
Guest runtime
- PE loader
runtime/loader.h - Guest CPU and memory
runtime/guest.h - Import dispatch
runtime/imports.h - Kernel32 shims
runtime/kernel32.cpp - Win32 services
runtime/win32.h
Compatibility shims
- DirectX shims
dx/dx.h - DirectDraw shim
dx/ddraw.cpp - Shim callbacks
dx/host_api.h
Native host
- SDL host entry
host/sdl/main.cpp - D3D renderer
host/d3d_render.cpp - GPU backends
host/gpu/gpu_factory.cpp - Frame presentation
host/present.h - Audio mixer
host/audio/mixer.cpp - OS abstraction
platform/os.h
Mods and controls
- Mod foundation
mods/mods_internal.h - Mod API
mods/pop_mod_api.h - Host mod services
mods/host_services.cpp - Touch controls
host/controls/router.h - Display settings
mods/display_settings.h
Other components
- Game repository
Connections 24
- Game repository → Static translator: provides inputs
README.md - Static translator → PE loader: generates game code
- SDL host entry → PE loader: starts runtime
host/sdl/main.cpp - PE loader → Guest CPU and memory: loads guest
runtime/loader.h - Guest CPU and memory → Import dispatch: dispatches imports
runtime/imports.h - Import dispatch → Kernel32 shims: routes APIs
runtime/kernel32.cpp - Kernel32 shims → Win32 services: uses services
runtime/kernel32.cpp - Kernel32 shims → PE loader: uses loader
runtime/kernel32.cpp - DirectX shims → DirectDraw shim: includes shim
dx/ddraw.cpp - DirectDraw shim → Shim callbacks: calls host callbacks
dx/ddraw.cpp - Shim callbacks → D3D renderer: draw callbacks
- D3D renderer → GPU backends: uses GPU interface
- D3D renderer → Frame presentation: submits frames
host/d3d_render.cpp - SDL host entry → D3D renderer: creates renderer
host/sdl/main.cpp - SDL host entry → Frame presentation: starts presenter
host/sdl/main.cpp - SDL host entry → Audio mixer: uses audio host
host/sdl/main.cpp - Audio mixer → OS abstraction: uses OS layer
host/audio/mixer.cpp - Mod foundation → Mod API: exposes API
mods/mods_internal.h - Host mod services → Mod foundation: uses mod foundation
mods/host_services.cpp - Host mod services → Display settings: uses display settings
mods/host_services.cpp - SDL host entry → Display settings: loads display defaults
host/sdl/main.cpp - SDL host entry → Touch controls: routes controls
- Web launcher → SDL host entry: launches app
- Win32 services → OS abstraction: delegates OS calls