The Suffering Recomp

The Suffering Recomp is a native PC port of The Suffering for Windows and Linux, featuring a one-click self-updater and graphical launcher.

README

The Suffering — Unofficial Original Xbox to Native PC (Windows & Linux / Steam Deck) Static Recompilation

Unofficial Clean-Room Project Disclaimer: This is an unofficial, independent, community-developed static recompilation of the Original Xbox version of The Suffering (USA) (Title ID 0x4D570015, XDK 1.0.5788.1) built on the XboxXBERecomp SDK. It is not affiliated with, authorized, maintained, sponsored, or endorsed by Surreal Software, Midway Games, Warner Bros. Discovery / Warner Bros. Entertainment, Microsoft Corporation, Valve Corporation, NVIDIA Corporation, Advanced Micro Devices, Inc., or Intel Corporation. The Suffering, Xbox, Direct3D, Steam Deck, NVIDIA RTX, GeForce RTX, DLSS, AMD FidelityFX, and Intel XeSS are trademarks and/or registered trademarks of their respective owners.


Legal & Asset Policy

  • This repository and its release packages contain zero copyrighted game assets, Xbox disc images (.iso / .xiso.iso), Xbox executables (.xbe), or game-derived recompiled code (suffering.dll / libsuffering.so / generated/).
  • You must supply your own legally acquired copy of the Original Xbox disc image for The Suffering (USA).
  • Your disc image is always opened strictly read-only and mounted directly in place as D:\ without extracting or copying the 2.38 GB image.
  • Original wrapper, pre-game graphical launcher, Dear ImGui settings overlay, in-app XISO file browser, upscaling suite, hooks, icon generator, resource script, Steam Deck installer, verification harnesses, and build scripts in this repository are licensed under GPL-2.0-or-later with the Runtime Upscaler Plugin Exception (see LICENSE). Zero .dll or ELF binaries are stored in this Git repository or source.zip; end-user Windows win64-launcher.zip releases bundle the 4 unmodified official vendor-signed upscaler DLLs and their vendor license notices in plugins\ under that exception, while end-user Native Linux linux-x86_64.tar.gz releases ship 100% open-source native Vulkan 1.2 + SDL3 binaries and self-contained LLVM compiler tools. All third-party licenses and notices (XboxXBERecomp MIT, Zydis/Zycore MIT, toml++ MIT, Dear ImGui MIT, SDL3 zlib, glslang/SPIRV-Tools BSD-3-Clause/Apache-2.0, zlib, LLVM Apache-2.0 WITH LLVM-exception, AMD FSR 1.0 / CAS / ffx_api MIT + AMD Binary Redistribution License, NVIDIA NIS MIT + NVIDIA RTX SDKs License, Intel Simplified Software License, and MSVC CRT) are preserved in THIRD_PARTY_NOTICES.md.

What's New in v1.6.3

  • Configurable Widescreen UI, FMV, HUD & Crosshair Aspect-Ratio Correction ([ui_aspect]):
    • Added a "UI & Crosshair Aspect" setting in both the Pre-Game Launcher (Upscaling & Graphics) and the in-game F1 Overlay (persisted under [ui_aspect] in settings.toml, omitted at default; transient CLI override --ui-aspect=<aspect_correct|menus_and_crosshair|stretched_16x9>) with 3 modes:
      • Aspect-Correct 4:3 UI + 1:1 Crosshair (Recommended) (Default): Preserves authentic 4:3 proportions for full-screen 2D menus, looping menu/intro FMVs, gameplay HUD, and 3D HUD item meshes, while rendering the gameplay crosshair at 1:1 unstretched aspect ratio anchored to the true 16:9 3D aim point.
      • 4:3 Menus + 1:1 Crosshair (16:9 Edge HUD): Centers menus and FMVs at 4:3 with a 1:1 unstretched crosshair while keeping gameplay HUD elements anchored to the 16:9 screen edges.
      • Original Xbox 16:9 Stretch: Restores the original Xbox widescreen behavior where 2D menus, FMVs, HUD, and crosshair stretch horizontally across 16:9.
    • Draws clean opaque black pillarbox sidebars on opaque 2D screens and FMVs (via cross-platform HLE D3DDevice_Clear across Windows D3D12 and Linux Vulkan) while keeping live 16:9 3D scenes and full-screen translucent dim quads behind Pause/overlay menus, and leaving 3D post-FX, bloom, motion blur, 3D billboards, lens flares, screen flash, and Screen Fader full 16:9.
    • Updated native PC Menu Mouse coordinate remapping (MkbTransformPhysicalToGuestUi) to match the centered 4:3 menu rect accurately across 16:9, 16:10, 21:9, 4:3, and Integer scaling, with 0.0 drift on #TSREC 1 deterministic replay.
Previous Highlights (v1.6.2)
  • Renderer Synchronization & Window Resize Target Lifecycle Fixes (D3D12 & Vulkan):
    • Added external VkSubpassDependency attachment synchronization on Vulkan presentation/UI passes and color/depth render-pass reentry (omitting empty dependencies on attachment-free passes) so prior attachment writes remain visible across same-layout passes.
    • Fixed D3D12 and Vulkan window resizes leaving stale render targets or invalidating a live Vulkan front target on acquire retries: scene render extents are now held until post-present ApplySettings(), which detects the extent change, waits for GPU completion, invalidates targets, updates coordinate scales, and resets upscaler history.
  • High-FPS (>60 Hz) Cloth Pacing & Options Slider Persistence Fixes:
    • Fixed cloth simulation (sub_001A6480) running too fast above 60 FPS by subtracting the exact 1/60s step passed to the guest and sharing one scheduling decision per guest frame across all cloth objects.
    • Fixed dragging an in-game Options slider away and back to its saved value persisting an intermediate value: the current settings snapshot now always mirrors the guest while equality with the saved baseline gates disk writes only.
  • Controller-Only Input Recording Contract (#TSREC 1), Settings Persistence & Key-Rebind Policy:
    • Made --record-input / XBE_INPUT_RECORD explicitly controller-only with a non-modal in-game recording HUD notice, disabling native mouse/keyboard, menu mouse, guest preference overrides, cheats, and native stair assists identically to replay/autotest without altering saved controls or breaking legacy #TSREC 1 recordings (recording native mouse/keyboard is not supported by the #TSREC 1 format).
    • Cleared matching temporary CLI override guards when explicitly editing display mode, resolution, skip-launcher, or clicking Reset Defaults in the Pre-Game Launcher or F1 overlay, while keeping unrelated saves non-destructive to temporary CLI flags.
    • Enforced a shared host-reserved key policy (MkbCanBindKey) across Win32 and SDL so reserved host keys (F1, F2, F3, F10, LWin/RWin) cannot be bound into non-functional bindings.
  • Windows Self-Updater Non-ASCII & Metacharacter Path Safety:
    • Replaced the Windows update_apply.cmd helper with an ASCII PowerShell script (update_apply.ps1) that decodes UTF-8 paths and uses literal filesystem operations and .NET process relaunch without cmd.exe or wildcard expansion, preserving settings.toml, Xbox saves (hdd\), media, and caches on Unicode or special-character install paths.
Previous Highlights (v1.6.1)
  • Cheat Menu PopStyleColor() Crash Fix & Full ImGui Stack / Gamepad / Modal Hardening:
    • Fixed a Dear ImGui g.ColorStack.Size underflow crash when toggling cheats inside the F2 / F1 -> Cheats overlay, and deployed RAII ScopedStyleColors / ScopedStyleVars / ScopedDisabled guards, BeginTooltip() guards, DPI font-atlas invalidation, and modal/rebind gamepad hardening across all UI modules.
  • 10 Docks Wooden / Railed / Long-Flight Staircase Fix (sub_00179D60 & sub_001709C0):
    • Fixed Torque clipping through, wedging against side handrails on, or getting blocked on wooden, switchback, and multi-flight staircases in 10 Docks and 4a/4b Quarry.
  • OneHitKills 8b Bluff Hermes Boss Softlock Guard & hooks.cpp FPU / Memory Bounds Hardening:
    • Excluded environmental-puzzle bosses (CHermes, CHorace, CKilljoy) and sentinel-HP setpiece actors (>= 5,000 HP) from One-Hit Kills, and added SavedX87State FPU preservation and ValidGuest bounds checks.
  • Windows Release -O3 -DNDEBUG Optimization, Zero-Path-Leak Deterministic Builds & Binary Hygiene Gate:
    • Enforced explicit -O3 -DNDEBUG Release flags across Windows & Linux Clang presets, deterministic /Brepro + /PDBALTPATH:%_PDB% / --build-id=sha1 --strip-debug linking, -ffile-prefix-map path remapping, and automated PE/ELF/COFF binary path-leak scanning (gate2b_binary_hygiene).
Previous Highlights (v1.6.0)
  • In-Game Cheat Menu (F2 Quick-Toggle or F1 / BACK + L3 -> Cheats) & Native Main Menu "Quit Game":
    • Added a native "Quit Game" button directly below "Bonus Material" on the in-game Main Menu (matching Original Xbox typography, horror CGUIEffects ghosting, and UI audio) with full Controller (D-Pad/Stick + A), Keyboard (Up/Down/W/S + Enter), and PC Mouse hover/click support for clean host shutdown without Alt+F4 (automatically bypassed during deterministic --replay-input).
    • Added a thread-safe In-Game Cheat Menu (F2 quick-open/close, or F1 / BACK + L3 -> Cheats tab with LB/RB controller tab switching) featuring a live Torque status header (HP, Xombium, Insanity, Morality gauge, and 1-click Disable All Cheats), 9 persistent combat & XBE post-FX toggles (with friendly-NPC/Dallas #2152 protection on One-Hit Kills), 13 queued guest-main-thread loadout, morality, and appearance actions (including the secret Gonzo Gun), and an optional CHEATS ACTIVE (N) HUD badge.
  • Persistent Controller Thumbstick Inversion & In-Game Options ([game_options] in settings.toml):
    • Fixed controller thumbstick pitch inversion (0x002DB248) and all 17 in-game CUserSettings preferences (0x002DB218: Controller Preset, Invert Pitch Axis, Vibration, Turn/Pitch Sensitivity, Auto-Targeting, Auto Pitch Correction, Checkpoints, Help Text, Screen Adjust X/Y, Effects/Dialog/Music Volumes, Speaker Setup, and Subtitles) resetting to Xbox factory defaults on cold restart when no Xbox "Settings" save container existed.
    • Added bidirectional live sync between the Pre-Game Launcher, In-Game F1 -> Controls / Audio tabs (Invert Controller Right-Stick Y-Axis, Right-Stick Turn & Pitch Sensitivity, Controller Rumble/Vibration, and In-Game Subtitles), and the native Xbox Options screens, persisting every change atomically to settings.toml ([game_options]) across restarts while preserving unlocked Archive/Prelude flags (+0x44/+0x48/+0x50).
  • East Block, Yard & Asylum Sky/Cloud Rendering Fixes (D3D12 & Vulkan):
    • Fixed horizontal RGB static/dark scanline bands and stepped cutouts on wall decals, outdoor concrete pillars, and scrolling multi-layer D3DFMT_P8 sky/cloud domes across level transitions (2 Cellblocks, 3a YardCellBlock, 5a Asylum) caused by asynchronous RenderTarget readbacks writing into freed/reallocated Xbox 64 MB contiguous memory pages, sparse texture-cache MemSig sampling above 64 KB, missing MmFreeContiguousMemory GPU cache invalidation, and un-fenced D3D12 64 MiB texture-slab suballocation reuse (plus d3d::g_lock / render-thread serialization on d3d::FlushCaches() during shutdown).
    • Fixed NV2A programmable vertex shaders (xvsTextureMatrix / xvsTextureMatrix_Reflection) having D3DTADDRESS_WRAP overridden to CLAMP when static [0..1] mesh UVs were scrolled or scaled via vertex shader constants c[4..5] (eliminating border-texel streak smearing on scrolling clouds, water, and reflections), added mid-frame DirtyEpoch texture re-upload and child-mip D3DSurface lock/busy propagation, and doubled D3D12 per-frame SRV descriptor ring capacity (65,536 SRVs/frame).
  • Staircase Top-Edge Step-Up & Quarry Staircase Clipping / Anti-Wedge Fix:
    • Fixed Torque getting snagged horizontally at the top lip/crest of staircases until jumping, clipping his legs through 40.5°–45° Quarry industrial staircases (4a/4b Quarry), and getting locked in State 9 (Fall, Jump disabled) across unwelded .mdu staircase seams and V-creases — enabling CCollider step-up slope support (0x8008), fixing high-FPS (60+ Hz) SweepStep post-collision micro-slide penetration and spatial substep scaling, adding framerate-independent 3D-clearance-verified top-edge step-up assist and unwelded seam ground-bridging, and adding automatic V-crease anti-wedge recovery (bypassed during deterministic --replay-input).

System Requirements (End Users)

Windows (v1.6.3 — Native Win64 D3D12)
  • OS: Windows 11 x64 or Windows 10 1809+ x64
  • GPU: Direct3D 12-capable GPU (Feature Level 11_0 or newer — supports NVIDIA, AMD, Intel Arc/Iris, and Handheld/iGPU UMA systems)
  • Storage: ~400 MB free writable disk space beside suffering.exe (for locally compiled suffering.dll, per-adapter shader/PSO cache cache\, virtual Xbox HDD hdd\, and logs)
Native Linux x86_64 & Steam Deck (v1.6.3 — Native Vulkan 1.2 + SDL3 + ELF64)
  • OS: Any x86_64 Linux distribution with glibc 2.35+ and libstdc++.so.6 (GLIBCXX_3.4.30+): SteamOS 3.x (Steam Deck LCD & OLED), Ubuntu 22.04+, Debian 12+, Fedora 36+, Arch Linux, Bazzite, CachyOS — zero Proton or Wine required, and zero system LLVM/Clang dev packages required on stock read-only SteamOS!
  • GPU: Vulkan 1.2-capable GPU (AMD RADV on Steam Deck / Radeon, NVIDIA proprietary Vulkan, Intel ANV, or Mesa lavapipe software fallback)
  • Audio / Display / Input: PipeWire, PulseAudio, or ALSA; Wayland, Gamescope (Steam Deck Gaming Mode), or X11; SDL3 evdev + HIDAPI (Steam Deck integrated controls, DualSense 5, Xbox, Switch) + SDL3 Relative Mouse
  • Storage: ~400 MB free writable disk space beside ./suffering (for locally compiled libsuffering.so, Vulkan shader/PSO cache cache/, virtual Xbox HDD hdd/, and logs)
  • Game Disc Image: Your own legally dumped Original Xbox image of The Suffering (USA)

Supported Disc Formats & Revisions

  • Target Title: The Suffering (USA) — Original Xbox (Title ID 0x4D570015 / MW-021, XDK 1.0.5788.1, sole disc executable /Default.xbe)
  • Supported Disc Layouts (mounted read-only in place):
    • Standard game-partition XISO (.xiso.iso / .iso, XDVDFS volume descriptor at offset 0x10000)
    • Full Redump Xbox DVD image (.iso, game partition offset 0x18300000, XDVDFS volume descriptor at 0x18310000)
  • Supported USA Retail Revisions:
    • extract-xiso XISO (Default.xbe SHA-1 0a4c4e597da1f3b154099ab432c1326cc3dcb08c)
    • Unpatched Redump XISO / DVD (Default.xbe SHA-1 55c902f622047484bc6c7ea4b1b1d714da2096fc)
  • Unsupported Formats / Regions:
    • Compressed archives (.7z, .zip, .rar, .gz) must be extracted to .xiso.iso or .iso first.
    • PAL / non-USA regional releases are not currently supported (detected and rejected cleanly with ERR_UNSUPPORTED_REVISION).

Quick Start (End-User Release Packages)

Windows (TheSuffering-Recomp-v1.6.3-win64-launcher.zip)

You do not need Visual Studio, CMake, Python, or manual file extraction to play from a packaged Win64 launcher release:

  1. Unpack the archive into any writable folder (for example, C:\Games\TheSuffering\).
  2. Launch suffering.exe to open the Pre-Game Graphical Launcher (PerMonitorV2 DPI-aware Segoe UI interface with full keyboard & controller support):
    • Select your legally owned Disc Image: Click Browse Disc Image... (or let the first-launch picker guide you) to select your The Suffering (USA) .xiso.iso or .iso. suffering.exe validates it read-only (XDVDFS volume, /Default.xbe, Title ID 0x4D570015, supported USA Retail SHA-1) and persists its path in settings.toml.
    • Configure Hardware Preset, Upscaling, Display & GPU, Controls & Audio: Pick one of 4 one-click Hardware Presets (Handheld / iGPU, 1080p Mainstream, 1440p High, 4K Ultra), choose your upscaler, display adapter, and Mouse & Keyboard / Controller bindings, and click PLAY.
    • Check for Updates & One-Click Self-Update: The launcher checks GitHub Releases automatically in the background on startup (and anytime via Check for Updates in the header bar). When a new version is available, an Update Alert banner lets you click Update Now to download, verify (SHA-256), stage, and relaunch into the new build automatically without touching settings.toml, hdd\ saves, or your disc image — or click Open Release Page to view full release notes.
    • First-Launch Local Compilation: On first launch only, suffering.exe uses the bundled compiler\ tools (xbe_recomp.exe, clang.exe, lld-link.exe) with RAM-bounded parallelism to compile suffering.dll locally from your disc's Default.xbe with a live progress bar (typically ~15–45 seconds).
  3. Subsequent Launches & Skip-Launcher Option:
    • suffering.dll is reused automatically (compiler\work\suffering\built.txt).
    • Enable "Skip launcher on future starts" inside the launcher to boot straight into gameplay on future runs.
    • To reopen the Pre-Game Launcher anytime while skipping is enabled, hold Shift while starting suffering.exe, pass --launcher, or re-enable "Show Pre-Game Launcher on Startup" inside the in-game F1 overlay (Launcher & Diagnostics).
Native Linux x86_64 & Steam Deck (TheSuffering-Recomp-v1.6.3-linux-x86_64.tar.gz)

Runs 100% natively on Linux Vulkan 1.2 + SDL3 with zero Proton overhead and zero system LLVM dependencies on stock read-only SteamOS:

  1. Extract the tarball into a writable directory (for example, ~/Games/TheSuffering/):
    mkdir -p ~/Games/TheSuffering
    tar -xzf TheSuffering-Recomp-v1.6.3-linux-x86_64.tar.gz -C ~/Games/TheSuffering
    cd ~/Games/TheSuffering
    
  2. Optional — Register in Steam Deck Gaming Mode & Desktop Menu:
    ./install-steamdeck.sh
    
    • Idempotently installs the 256x256 PNG icon, XDG .desktop entry (~/.local/share/applications/the-suffering-recomp.desktop + ~/Desktop/), and adds "The Suffering (Native Recomp)" directly to Steam's shortcuts.vdf (backs up existing shortcuts.vdf to shortcuts.vdf.bak first; remove anytime with ./install-steamdeck.sh --uninstall).
    • Important: Do NOT force a Proton compatibility tool in Steam Properties — this is a native Linux ELF64 Vulkan executable!
  3. Launch ./suffering (or launch from Steam Gaming Mode):
    • Opens the Pre-Game Graphical Launcher (auto-fills 1280x800 in Gamescope on Steam Deck, auto-detects the Steam Deck (1280x800) preset with AMD FSR 1.0 Quality 67% 854x480 -> 1280x720 cleanly centered in 1280x800, 4x AF, and exact 60 FPS pacing on both 60 Hz LCD and 90 Hz OLED).
    • Built-In Gamepad + Touch + Mouse XISO File Browser: Click Browse Disc Image... to open the in-app Dear ImGui file browser with a Quick-Jump sidebar (Game Folder, Home, Downloads, Desktop, auto-detected Steam Deck microSD /run/media/mmcblk0p1 & /run/media/<user>/*, /), touch-friendly rows, live read-only ValidateDiscImage badge, and full gamepad navigation (D-Pad/Stick, A open/select, B up, LB/RB sidebar <-> list) — zero GTK/KDE portal hangs in Gaming Mode! Desktop Linux users also get an optional "System Dialog..." button.
    • First-Launch Local Compilation: Compiles libsuffering.so once locally from your XISO using the bundled self-contained compiler/{xbe_recomp,clang,ld.lld,lib/*} with zero /usr/include or system packages needed.
    • Built-In Update Checker & Self-Updater: Includes the same Check for Updates header button, automatic startup update alerts, Update Now (linux-x86_64.tar.gz staging & relaunch preserving settings.toml and hdd/), and Open Release Page support on Desktop Linux & Steam Deck.
    • **Cross