[](#-the-quarry)
[](#-forging-the-weapon-build)
[](#-the-ritual-how-it-works)
[](https://github.com/sp00nznet/xboxrecomp)
[](#-the-hunters-log-roadmap)
[](#-the-quarry)
[](#-the-quarry)
[](./LICENSE)
[](./CONTRIBUTING.md)
*"We are the Left Hand of God, Gabriel."* — and now his game runs without the console.
**[How to play](#-how-to-play)** ·
**[Roadmap](#-the-hunters-log-roadmap)** ·
**[Bestiary](#-the-bestiary-subsystems)** ·
**[How it works](#-the-ritual-how-it-works)** ·
**[Build](#-forging-the-weapon-build)** ·
**[Contribute](./CONTRIBUTING.md)**
---
## 🩸 What is this?
**GabrielRecomp** is an unofficial, fan-made **native PC port** of **Van Helsing** (Saffire / Vivendi Universal Games, 2004) for the **original Xbox**.
It is a **static recompilation**: the game's own x86 code is translated **ahead of time** into C, compiled with a modern compiler, and linked against a runtime that stands in for the Xbox kernel, Direct3D 8, DirectSound and the rest of the XDK. There is no emulator and no interpreter at play time — Gabriel's crossbow fires on your CPU directly.
> [!NOTE]
> No Van Helsing recompilation existed for any platform when this project started. The Xbox version was chosen over the PS2 one on purpose: it is the better-looking release, and an x86 + D3D8 game has no VU/GS/IOP hardware to emulate.
> [!CAUTION]
> **This repository contains no game code or data**: no disc images, no `default.xbe`, no extracted assets, no generated C, no built game executables. Everything game-derived is produced **on your own PC, from your own copy**. Please don't ask for disc images.
---
## 🎮 How to play
> [!IMPORTANT]
> **Not playable yet.** The project is in early bring-up (see the [roadmap](#-the-hunters-log-roadmap)). There are no releases yet. Watch / star the repo to know when the first one lands.
When it is playable, you will need:
| | |
|---|---|
| 🎯 **Game** | *Van Helsing* for the **original Xbox** — the worldwide release, serial **VU-041** (Title ID `56550029`) |
| 💿 **Your copy** | A dump of **your own disc**: a full ISO (Redump), an XISO, or an extracted folder with `default.xbe` + `data/` + `media/` |
| 🖥️ **PC** | 64-bit Windows 10/11 with a Direct3D 11 GPU |
| 🚀 **Easiest way** | [RecompLauncher](https://recomplauncher.com): pick your disc image and press Play — it checks the copy, prepares it and starts the game |
---
## 🕯️ The Hunter's Log (roadmap)
| | Phase | Milestone | Status |
|:-:|---|---|:-:|
| ✝️ | **0** | Prior-art search, platform choice (Xbox over PS2), toolkit evaluation | ✅ Done |
| 🔍 | **1** | XBE identification — VU-041, XDK **5788**, 13 sections, entry `0x000F9F6F` | ✅ Done |
| 🗡️ | **2** | Disassembly of every code section (`.text` + statically linked XDK) — **13,354** functions | ✅ Done |
| 🧪 | **3** | Library identification & calling-convention recovery — 13,354 ABI entries (1,476 `thiscall`) | ✅ Done |
| ⚒️ | **4** | Lift to C — **13,365/13,365** functions, 0 failed, ~1.36M lines of C; native `GabrielRecomp.exe` builds with MSVC | ✅ Done |
| 🌕 | **5** | Boot bring-up: kernel bridge ✅, file I/O ✅, **logos, copyright and the full intro movie on screen** ✅, menus + controller ✅, **first level (Notre Dame) playable on screen** ✅ | ✅ Done |
| ⚡ | **6** | Direct3D 11 renderer for the NV2A executor — own swap chain, internal resolution scaling (`VH_SCALE`), fixed-function vertex stage on the GPU, native BC textures; gameplay ~58 fps (60 Hz vsync) at 1× and 2× (CPU rasteriser: ~4) | ✅ Done |
| 🐺 | **6b** | Audio (DirectSound/DSP), controller mapping, saves | 🟡 In progress |
| 🎨 | **6c** | Renderer accuracy: register combiners on the GPU, 4 texture stages, cube maps, fog | ✅ Done |
| 🏰 | **7** | Playable start-to-finish + extras: widescreen, high FPS, resolution scaling | ⬜ Pending |
| 📦 | **8** | Release pipeline: build-on-player-PC setup step, RecompLauncher listing | ⬜ Pending |
Detailed notes for every step live in [`context/`](./context/).
---
## 🦇 The Bestiary (subsystems)
Every monster Gabriel faces is a piece of the Xbox that has to be slain — reimplemented natively on the PC.
| | Monster | Subsystem | What has to happen | Status |
|:-:|---|---|---|:-:|
| 🧛 | **Count Dracula** | Direct3D 8 / NV2A (`D3D`, `D3DX`, `XGRPH` sections, `.psh`/`.vsh` shaders) | XDK D3D lifted as-is; NV2A pushbuffer executed by the toolkit, drawn by our **D3D11 renderer** (register combiners in a pixel shader) | 🟡 gameplay renders with combiners + fog |
| 🧟 | **Frankenstein's Monster** | Xbox kernel (159 imports: memory, files, threads, crypto, HAL) | Stitch every import onto Win32 | 🟡 159/159 bridged |
| 🐺 | **The Wolf Man** | DirectSound + DSP (`DSOUND`, `DOLBY`, `xbxDSP1.bin`) | Software mixer, ADPCM, streams, effects image | ⬜ |
| 🧪 | **Mr. Hyde** | x87 FPU stack, SSE/MMX inside game code | Lift faithfully, precision included | ⬜ |
| 🦇 | **The Brides** (Aleera, Marishka, Verona) | XMV movies (`XMV` section, 14 `.xmv` files) | Decode Xbox Media Video onto a texture | ✅ intro plays |
| 🔧 | **Igor** | XAPI: controllers, saves, `XPP` peripheral code | Pads through XInput/SDL, saves under one data folder | 🟡 USB pad model wired |
| ⛏️ | **The Dwergi** | MSVC CRT / LIBCMT | Mostly lifted as-is; a few hand overrides | ⬜ |
---
## 🔮 The Ritual (how it works)
```mermaid
flowchart TB
A[💿 Your Van Helsing disc VU-041] -->|extract| B[default.xbe + data/ + media/]
B --> C[xbe_parser headers · sections · kernel imports]
C --> D[disasm functions · CFG · jump tables]
D --> E[func_id + abi_analysis CRT · XDK · game · calling conventions]
E --> F[recomp x86 → C]
F --> G[MSVC]
H[xboxrecomp runtime kernel · D3D8→D3D11 · DSound · XInput] --> G
I[GabrielRecomp overrides game hooks & fixes] --> G
G --> J[🗡️ GabrielRecomp.exe]
```
**What lives where**
- **This repo** — game-specific configuration, hand-written overrides, the launcher/setup program, docs. Clean-room only.
- **[sp00nznet/xboxrecomp](https://github.com/sp00nznet/xboxrecomp)** — the title-agnostic recompiler and runtime libraries (MIT; parts derived from xemu under LGPL-2.1+).
- **Your PC** — your dump, the generated C, and the built game. These never leave it.
---
## 📂 Repository layout
```text
GabrielRecomp/
├── 📁 .github/ issue forms, PR template
├── 🖼️ assets/ project artwork (original, no game assets)
├── 📜 context/ project context, roadmap, RE notes, launcher readiness
├── 💿 game/ your dump goes here (git-ignored)
├── 🧰 tools/ toolkit checkouts (git-ignored)
├── 🤖 AGENTS.md rules for AI coding agents & contributors
├── 🚀 recomplauncher.json
├── 🤝 CONTRIBUTING.md · CODE_OF_CONDUCT.md · SECURITY.md
└── ⚖️ LICENSE GPL-3.0
```
---
## ⚒️ Forging the weapon (build)
> For developers. Players: wait for a release.
Prerequisites
- Windows 10/11 x64
- Visual Studio 2022 (MSVC, *Desktop development with C++*) and CMake
- Python 3.10+ with `capstone` (`py -3 -m pip install capstone`)
- Git
- Your own dump of *Van Helsing* (Xbox, VU-041)
Pipeline (current state)
```bash
git clone https://github.com/johnatan28/GabrielRecomp.git
cd GabrielRecomp
git clone https://github.com/sp00nznet/xboxrecomp.git tools/xboxrecomp
git -C tools/xboxrecomp checkout 37b61d589168adee3680fabd51805ee81427bf07
git -C tools/xboxrecomp apply ../patches/xboxrecomp-local.patch # see tools/patches/README.md
# put default.xbe + data/ + media/ from YOUR disc into game/
cd tools/xboxrecomp
py -3 -m tools.xbe_parser ../../game/default.xbe --json ../../game/default_analysis.json
py -3 -m tools.disasm ../../game/default.xbe -v # every code section, ~3 min
py -3 -m tools.func_id ../../game/default.xbe -v
py -3 -m tools.abi_analysis ../../game/default.xbe -v
py -3 -m tools.recomp ../../game/default.xbe --game-name "Van Helsing" --all --split 250 --gen-dir ../../src/recomp/gen
cd ../..
# build (Visual Studio 2022, x64) and run from the repo root
cmake -S . -B build -G "Visual Studio 17 2022" -A x64
cmake --build build --config Release --parallel
build\Release\GabrielRecomp.exe
```
`scripts\run-dev.bat` runs it with the bring-up flags that reach gameplay. Renderer options
(environment variables):
| Variable | Effect |
|---|---|
| `VH_SCALE=2` | internal resolution ×2 (1–4; 1 = original 640×480) |
| `VH_VSYNC=1` | present with vsync |
| `VH_PRESENT=toolkit` | let the toolkit window present instead of the renderer's swap chain |
| `VH_RENDERER=cpu` | toolkit CPU rasteriser instead of Direct3D 11 (slow, for comparison) |
| `VH_NO_RC=1` | skip the register combiners (stage 0 × diffuse), for comparison |
`-DVH_PROFILE_SYMBOLS=ON` at configure time writes a PDB for `scripts/prof.py` (sampling profiler).
---
## 🔍 The quarry
Known facts about the target binary
| Field | Value |
|---|---|
| Title | Van Helsing |
| Title ID / serial | `56550029` / **VU-041** (worldwide, region mask `0x7`) |
| Build | 2004-03-16, `c:\van\src\build\xbx\release\van.exe` |
| XDK | **5788** (XAPILIB, D3D8, XBOXKRNL, LIBCMT, XMV, D3DX8, XGRAPHC, DSOUND) |
| Base / entry | `0x00010000` / `0x000F9F6F` |
| Code | `.text` 1.23 MB + statically linked XDK sections |
| Media | XMV movies, Xbox shaders (`.psh`/`.vsh`), DSP image, `*.GRP.bin` archives |
| Redump | [VU-041 — Van Helsing](http://redump.org/disc/19506) |
---
## 🤝 Contributing
Hunters are welcome. Read [CONTRIBUTING.md](./CONTRIBUTING.md) first — the clean-room rules are not optional. Good first targets: function naming evidence, runtime HLE for an XDK call, D3D8 render-state coverage, testing on your hardware.
Please follow the [Code of Conduct](./CODE_OF_CONDUCT.md). Security issues: see [SECURITY.md](./SECURITY.md).
---
## 🙏 Credits
- **[xboxrecomp](https://github.com/sp00nznet/xboxrecomp)** by sp00nznet and contributors — the static recompilation toolkit this port is built on.
- **[xemu](https://github.com/xemu-project/xemu)** and **[Cxbx-Reloaded](https://github.com/Cxbx-Reloaded/Cxbx-Reloaded)** — reference for Xbox hardware and API behaviour.
- **[Redump](http://redump.org)** — disc preservation data used to verify dumps.
- **Saffire** — for making the game in the first place.
---
## ⚖️ Legal
GabrielRecomp is an independent, non-commercial preservation and engineering project. It is **not affiliated with, endorsed by, or associated with** Universal Pictures, Universal Interactive, Vivendi Universal Games, Saffire, or Microsoft. *Van Helsing* and all related names and marks belong to their respective owners. Xbox is a trademark of Microsoft.
The code in this repository is licensed under the **GNU General Public License v3.0** — see [LICENSE](./LICENSE).
🗡️ Made by a fan, for the fans of Transylvania's finest monster hunter.