The-Darkness-Recomp README

The project's README from github.com/portingpete/The-Darkness-Recomp. As one markdown file: README.md.

The Darkness Recomp

A native Windows x64 port of The Darkness (Xbox 360). The 360 executable is translated to C++ ahead of time and built into DarkRecomp.exe with a D3D11 renderer — no emulation at runtime.

Bring your own game dump. This repo contains no game code, assets, or binaries. Dump your Xbox 360 copy and drop the files into Darkness/ (step 1 below).

Playable today: full gameplay, mouse look + controller input, video settings (resolution, FOV, gamma, bloom, frame cap, VSync), XMA audio, and saves.

Download and play

Download the Windows release. Choose The-Darkness-Recomp-v...-windows-x64.zip under Assets. The GitHub Source code downloads are for building the project yourself.

  1. Right-click the Windows ZIP and choose Extract All.
  2. Copy your own extracted Xbox 360 game dump into the included Darkness folder: the original default.xex, Content, System, and all the other files and folders from your dump. No XexTool preparation is required.
  3. Double-click Launch.cmd to play with sound.

Use LaunchWithSettings.cmd to choose settings and language before playing.

No compiler, Python, or separate audio setup is needed for the Windows release. Use 64-bit Windows 10/11 with a Direct3D 11-capable graphics device. See START_HERE.txt for the folder layout and troubleshooting. An ISO alone is not enough; use an extracted dump of the supported game revision. The port decodes default.xex in memory at startup; _uncrypted.xex and basefile.exe are no longer required.

Click the game window to capture the mouse. F1 shows controls, F2 toggles capture, and Esc releases it. Graphics options are in Options > Video Settings. Choose Language there or in the settings launcher: System default, English, German, French, Spanish, or Italian. In-game language changes save automatically and take effect after restarting. See CONTROLS.md for details.

Preparing the game files

Copy the original extracted files into Darkness, then launch the game. The runtime uses Windows' built-in AES provider to decode default.xex and expand its zero-filled blocks in memory. It checks both the original file and decoded image against the AOT build's SHA-256 hashes before executing game code. The source generator also reads the original default.xex directly. Existing prepared files may be left in the folder; they are not read.

Checking the supported game revision

For builds with original-file loading, run this in your Darkness folder:

Get-FileHash .\default.xex -Algorithm SHA256 | Format-List

The supported original file's SHA-256 is (case does not matter):

default.xex  aace35a8f9bcdc7f28aeab9ff8cf3bdf200353f5c83705f6284487347acb3c5f

Direct decoding reproduces the previous memory image exactly (SHA-256 180b7fc8f57462f6bac3404ecab061a8d79914c7a3e9a12c238bd3449e72d049). The tested XEX metadata reports Title ID 545407EE, Media ID 0F213645, version 0.0.0.1, and All Regions. That does not establish compatibility with every USA/Canadian/international disc revision; the generated hash is the decisive check for this revision.

If the hash differs, report the hash and your disc revision. Do not post game files. If the game closes after launch, also attach the newest build_native/run/desktop-*/runtime.log. A different result can indicate a different revision or a modified dump. Previously published releases may still require prepared files; use a build containing the original-file loader.

Build from source

1. Game files — from your own dumped copy, fill in Darkness/:

Use the original extracted dump; no decrypted executable or raw image is needed.

Darkness/
  default.xex               # original encrypted executable
  Content/  Content_Eng/ .../ ExtraContent/
  System/                   # engine shaders and system data

darkness_switch_tables.toml already ships with the repo — keep it and add the rest from your dump. Nothing else under Darkness/ is committed.

2. Build — one step (dependency setup + generator + translation + XMA codec + compile + tests):

powershell -ExecutionPolicy Bypass -File tools\build.ps1

The build downloads the pinned XenonRecomp source and applies the bundled Darkness patches automatically. Existing checkouts from the old setup instructions are supported too. The first build needs an internet connection.

You'll need 64-bit Windows, Git, Visual Studio 2022 with the ClangCL toolset, CMake 3.24+, Python 3.11+, and ~15 GB free. Output lands in build_native/Release/.

The XMA audio build also requires MSYS2 at C:\msys64 with MinGW64 GCC and make, plus standalone LLVM at C:\Program Files\LLVM (for llvm-lib.exe).

3. Play — double-click Launch.cmd:

Command What it does
Launch.cmd Play with sound
LaunchWithSettings.cmd Choose settings and language, then play with sound
Launch.cmd mute Play muted
Launch.cmd preview Engine preview build (muted by default)
Launch.cmd stutter Play with sound while recording slow-frame timings
Launch.cmd performance / render-profile / steady-60 Diagnostic recording runs
Launch.cmd help Full usage

Extra arguments reach the game untouched, e.g. Launch.cmd play --fps 120.

Click the game window to capture the mouse (F1 controls guide, F2 toggle capture, Esc release).

Docs

Updating a downloaded release

Close the game, extract the new Windows ZIP into your existing game folder, and replace the included program files. Keep Darkness/, saves/, and DarkRecomp.settings.ini to preserve your game files, progress, and settings. You do not need to rebuild.

Updating a source build

Pull the latest version and run the build again:

git pull --ff-only
powershell -ExecutionPolicy Bypass -File tools\build.ps1

Keep your game dump and existing build directory. Unchanged generated files retain their timestamps so the native build can reuse previous compilation work.

If an older setup stopped with AOT gate: Generator failed (0), these same commands install the missing generator patches and regenerate the output.

Packaging a release

Maintainers can build, test, and package a Windows ZIP with:

python tools/package_release.py --version v0.1.1

Run from a clean, committed checkout with the build prerequisites installed. The ZIP and SHA-256 checksum land in build_native/releases/. The packager includes the launcher, runtime dependencies, notices, and audio-library source; game dumps, saves, settings, build tools, and diagnostic logs are excluded.

Tests

The build already runs the full suite. To re-run it later:

ctest --test-dir build_native -C Release --output-on-failure

Project layout

Path Contents
app/ Windows entry points and display settings
assets/ Button-prompt artwork bundled with the game
cmake/ CMake helpers
config/darkness.toml Translation configuration
renderer/ D3D11 backend and engine scene reconstruction
runtime/ Native kernel, audio, input, XMA, and filesystem bridges
tools/ Translator driver, build.ps1, shader/menu/XMA codegen
tests/ Native and contract tests run by CTest

License

GPLv3 — see COPYING, matching the upstream UnleashedRecomp / XenonRecomp toolchain this port builds on.

The-Darkness-Recomp (portingpete/The-Darkness-Recomp)

Searching Database…

这是什么?这是 Xbox 360 游戏《The Darkness》的原生 Windows 移植版,做法是将原始 360 可执行文件预先静态翻译成 C++,再用 DirectX 11 渲染器运行,全程不涉及模拟器。
这是模拟器,还是别的东西?这是一个静态重编译项目,不是模拟器:原始 Xbox 360 二进制文件被一次性(提前)反编译/翻译成 C++ 源码并编译成原生的 DarkRecomp.exe,因此不存在运行时 CPU 模拟。
怎么让它跑起来?从 Assets 区下载 Windows 版 ZIP,解压,把你自行提取的 Xbox 360 游戏转储复制到自带的 Darkness 文件夹里,然后双击 Launch.cmd 即可有声游玩(或先运行 LaunchWithSettings.cmd 选择视频设置和语言)。
我需要拥有原版游戏吗?需要。仓库不含任何游戏代码、资源或二进制文件;你必须自备自行提取的《The Darkness》Xbox 360 转储,并把文件放进 Darkness 文件夹。
任何一份 Xbox 360 光盘拷贝都能用吗?只有经过测试的特定游戏版本能保证可用;移植版运行前会用已知的 SHA-256 哈希校验你的 default.xex,其他光盘版本可能不兼容。
运行它需要什么硬件?一台 64 位 Windows 10 或 11 电脑,配支持 Direct3D 11 的显卡;使用预构建的 Windows 版本无需编译器、Python 或单独的音频设置。
可以用英语以外的语言游玩吗?可以,你可以在视频设置菜单或设置启动器中选择系统默认、英语、德语、法语、西班牙语或意大利语,选择会被保存并在重启后生效。
我可以调整哪些视频选项?分辨率、视场角、伽马、泛光(bloom)、帧率上限和垂直同步(VSync)都可在 Options > Video Settings 中调整。
它支持手柄吗,还是只支持鼠标键盘?两者都支持——游戏介绍中说明除了标准的鼠标键盘操作外,还支持鼠标视角和手柄输入。
Size
5.1 MB
Stars
298
Updated
CommitOct 16
Age
1mo
Commits · 90 Days