WET Recompiled

WET Recompiled is a native Windows port of WET using static recompilation with support for any frame rate and resolution scaling.

README

WET Recompiled

A native Windows port of WET (Xbox 360, 2009) made by static recompilation: the game's PowerPC code is translated to C++ and compiled for x64, then run on a small runtime that plays the part of the console. Graphics and audio use Xenia's GPU and audio emulation; the recompiler is XenonRecomp.

This repository contains no game data. You need your own copy of WET (title ID 425307DB). The build extracts your disc and generates the C++ on your machine; nothing derived from the game is ever committed.

Features

  • Plays through the game: Direct3D 12 rendering (Vulkan fallback), full audio, saves, intro and cutscene videos.
  • Any frame rate from 30 to 360 FPS (or match the monitor) at the correct game speed; G-Sync / FreeSync work.
  • Resolution scaling to 1440p or 4K, AMD FSR / CAS and NVIDIA Image Scaling, FXAA, and a film grain slider.
  • Controllers: Xbox, PlayStation 4/5 (USB or Bluetooth), Switch Pro and others, up to four, with rumble.
  • Keyboard and mouse: WASD movement and mouse aim.
  • Achievements with on-screen pop-ups and a list in the overlay.
  • Shader cache, so shader compilation stutter only happens once.
  • An in-game settings overlay (F1) and a launcher with settings and a Play button.

Building (Windows 10/11, 64-bit)

You need your WET disc image. Visual Studio is not required.

The easy way: WetSetup.exe. Download it from the latest release, pick your ISO and a folder, press Install. It downloads whatever tools are missing (Git, CMake, Ninja, Clang, Python - into the install folder, nothing system-wide), the source code, extracts your disc and builds; then the desktop shortcut starts the launcher. Run it again to update and rebuild. The first build takes 10-30 minutes and about 14 GB of disk.

By hand:

1. Install the tools (once):

2. Build (Command Prompt or PowerShell):

git clone --recursive https://github.com/zonehammer/wet-recomp.git
cd wet-recomp
python tools\build.py --iso "D:\path\to\WET.iso"

This extracts the disc into game\extracted, recompiles default.xex into generated\ppc and builds everything. The first build compiles ~250 MB of generated C++ (5โ€“15 minutes on a modern CPU); later, python tools\build.py only redoes what changed.

With Visual Studio 2022 and "C++ Clang tools for Windows", run python tools\build.py --toolchain clang-cl from an x64 Native Tools prompt instead.

3. Play: build\runtime\WetLauncher.exe (settings, then Play) or build\runtime\WetRecomp.exe (straight in).

Ready-to-run folder: python tools\package.py --with-game --with-saves --zip makes dist\WET-Recomp-<version> with the launcher, the game exe, a player README and the licence notices. It contains code translated from your copy of the game, so it is for your own machines only: don't upload or share it.

Controls

ActionControllerKeyboard / mouse
MoveLeft stickWASD
Camera / aimRight stickMouse
Shoot / LTRT / LTLeft / right click
A / B / X / YA / B / X / Y (PlayStation: Cross / Circle / Square / Triangle)Space / Esc / X / Y
Bumpers / triggersLB / RB, LT / RTQ / E, Z / C
D-pad, Start, BackD-pad, Start (Options), Back (Share / touchpad)Arrows, Enter, Backspace
Stick clicksL3 / R3Left Shift / V

Every keyboard key can be rebound: in the F1 overlay (Keyboard bindings: click an action, press a key), with the launcher's Keyboard... button, or in wet.ini (key_a = SPACE, two keys as key_lb = Q, F).

Key
F1Settings overlay (frame rate, resolution, scaling, film grain, mouse, controllers, achievements); frees the mouse
F6Cycle the frame rate
F11Fullscreen
F8Save the next 48 frames to frames\ (bug reports)
F10Profiler on/off (profile.txt, bug reports)

Settings live in wet.ini next to the exe; the mouse buttons can be rebound there (mouse_left = RT ...) as well as the keys. Widescreen / ultrawide (widescreen = 1, also in F1 and the launcher) fills 21:9 and 32:9 screens with a wider view and keeps the HUD 16:9 in the middle. The field of view is fov (horizontal degrees at 16:9, 90 = original; also in F1 and the launcher). Direct mouse aim (mouse_direct, on by default) turns the camera by how far the mouse moves, with no stick speed limit. Saves, achievements.ini and the shader cache are in game\hdd. WetRecomp.exe --console shows the log live; wet.log always has it.

How it works

  1. tools/prepare_game.py extracts the disc into game/extracted/.
  2. A patched XenonRecomp translates default.xex into ~440 C++ files in generated/ppc/, guided by config/WET_config.toml and config/WET_switch_tables.toml (jump tables found by tools/find_jump_tables.py).
  3. runtime/ provides what the console did: guest memory with the 0xA/0xC/0xE physical views, threads and synchronisation, files, input, achievements and ~240 kernel/XAM functions.
  4. The GPU commands the game submits run through Xenia's command processor, shader translator and caches (runtime/src/gpu/xenia_bridge.cpp); XMA audio is decoded by Xenia's decoder and played with XAudio2.

Repository layout

config/       XenonRecomp configuration for WET
patches/      changes to XenonRecomp and Xenia (applied automatically by CMake)
runtime/      the host program (src/, src/kernel/, src/gpu/, xenia_shim/)
launcher/     the settings launcher
tools/        build.py, package.py, disc extraction and analysis scripts
cmake/        builds the parts of Xenia and SDL2 the runtime needs
ci/           stand-in for the generated code, for CI builds without game files
thirdparty/   XenonRecomp and Xenia (git submodules)
game/         YOUR game files (ignored by git)
generated/    generated C++ (ignored by git)

Status and known issues

  • Intro and cutscene videos run at 30 FPS ("Videos at 30 FPS", on by default) to avoid a flicker at the top of the picture caused by a timing race at higher frame rates.
  • Achievements earned in saves from before achievement support aren't shown as unlocked.
  • Tested on one game copy and a few PCs; please report problems with "Report a bug..." in the launcher (it zips wet.log, wet.ini and system info).

Planned work is in ROADMAP.md.

Credits

Legal

WET Recompiled's own code is released under the MIT licence; the third-party projects keep their own licences. This project contains no game code or assets and is intended for people who own a legitimate copy of WET. It is not affiliated with or endorsed by Bethesda Softworks or Artificial Mind and Movement. WET is a trademark of its respective owner.