DOA2U Native PC Port

DOA2U Native PC Port is a Windows, macOS, and Linux port of Dead or Alive 2 Ultimate built by static recompilation.

README

Dead or Alive 2 Ultimate logo

DOA2U Native PC Port

A native Windows, macOS and Linux port of Dead or Alive 2 Ultimate (Xbox), built by static recompilation, with the goal of rewriting it into readable source.

Latest release CI License: GPL-3.0-or-later Platform: Windows | macOS | Linux

Download · Features · Bring-up notes · Report a bug

Sister projects: DOA3 · DOAXBV

Join the Discord

Support me on Ko-fi

Important

This project ships no game files. You need your own legally obtained copy of Dead or Alive Ultimate (Xbox, USA), Disc 2. It is not affiliated with or endorsed by the game's rights holders.

About

The DOA2 game executable on Ultimate's second disc is lifted to C with a static recompiler, then linked against a hand-written runtime that replaces the Xbox kernel imports and the game's Direct3D 8, DirectSound and input libraries (XDK build 5849) with native Windows equivalents: Direct3D 11 or Vulkan, XAudio2 and SDL3. On macOS and Linux the same runtime renders through SDL_GPU (Metal or Vulkan) and plays through SDL3 audio. The rest of the game still runs as generated code. The plan is to replace game logic with readable, hand-written source while the game keeps running.

Features

  • The whole game, recompiled. Boot, menus, character select, Story, Watch and the attract demo run on the original game code, lifted to C.
  • macOS and Linux. Native Metal and Vulkan builds through SDL_GPU, for Apple Silicon and Intel Macs, Linux PCs and the Steam Deck, from the same lifted program and HLSL shaders as Windows. A gamepad settings screen works in Steam Game Mode. See building on macOS and Linux.
  • Native renderer. Direct3D 11, or Vulkan through SDL_GPU, at 480p to 4K, the game's own 16:9 widescreen camera and menus (the 3D view also widened to 16:10, 21:9 or 32:9, the HUD and menus kept 16:9), MSAA up to 32x (8x on Vulkan) and SMAA Ultra. Water reflections render at the output resolution; bloom and lighting follow the game's own passes.
  • Xbox-like pacing. Frames flip on the next refresh as on the Xbox, at 60 fps, including heavy rain-stage fights at 4K. On Windows, VRR: On is for G-SYNC or FreeSync displays and tears on fixed-refresh ones; it is not yet verified on a VRR monitor.
  • Audio and movies. Music and voices through XAudio2, with 3D voices through the game's HRTF tables and I3DL2 reverb, in stereo or the game's own 5.1 surround mix. The intro and story movies play.
  • Controllers. Xbox, PlayStation and other SDL3 controllers, and the keyboard for player 1.
  • Free camera. Take the game's camera in fights and cutscenes and fly it anywhere, freeze the scene, hide the HUD and save screenshots. Turn it on in the launcher; see free camera.
  • Launcher. Launcher.exe picks resolution, anti-aliasing, widescreen, the renderer, VRR, an optional intro-movie skip, 5.1 surround, the unlock setting, random CPU costumes and the free camera, and remembers them. DOA2U.exe plays with the same choices. On release ZIPs after 0.1.10, the settings launcher on each platform can check GitHub for a newer release and install it from its UPDATE page; Check At Start turns the start-up check off.
  • PC Settings in the game. The game's own Options menu has a PC SETTINGS row after Video, drawn and translated like the game's rows, with the launcher's settings over two pages: the top Page row (left, right or confirm) turns from the display and audio settings to the gameplay ones. Unlocks, CPU Costumes and Free Camera change at once, and so do Resolution, MSAA and SMAA, on either renderer; the others say they apply the next time the game starts. Leaving the page saves them for the launcher too.
  • Combo damage and critical stun. Outside Sparring, the combo's damage shows under the game's own hit counter, and while a fighter is in a critical stun their life bar darkens the damage left before the stun breaks, as Sparring's bar does. Online both stay off.
  • Life bar colour. PC SETTINGS' Life Bar row picks the life bars' colour from 16, at once, or Custom: any colour, set as "lifeBarCustom": "RRGGBB" in private\launcher.json.
  • Hit voices. DOA2U's fighters are silent when hit; with your own copy of Dead or Alive 4, python tools/import_doa4_voices.py <DOA4>/snd.afs decodes every voice clip of all 15 fighters into private\doa4-voice-all\<fighter> and fills each fighter's selections folder from tools\doa4_voice_selections.json, a mapping of which DOA4 clip plays for what (it holds no audio), so every install gets the same hit voices from its own disc. To pick your own, put clips in that fighter's selections folder (the importer never overwrites one that has clips), named ..._HIT_LV1_01.wav, _HIT_LV2_, _HIT_LV3_ (light, medium and heavy hits) and ..._KO_01.wav, and the game plays them: grunts follow the damage taken (a heavy hit always, a combo once or twice), at least 0.7 seconds apart, and a KO always cries, in the KO replay too. Fighters without a selections folder stay silent. VoiceEditor.exe (built from tools\voice_editor.cs beside the launchers) does this for you: pick a fighter, add clips to its light, medium, heavy and KO lists from any WAV, play them, and tune how often they play; a running game picks up changes within a second. Its Save mapping button (or the importer's --save-selections) writes your picks back into the mapping file to share them. Hits are graded by the move's base damage, before combo scaling. It needs an ffmpeg with XMA support; on Windows the build fetches one into tools\ffmpeg. PC SETTINGS' Hit Voices row sets them Off, Quiet, Normal or Loud. Online they stay off, since a rollback would replay them.
  • Dynamic KO replay. PC SETTINGS' KO Replay row: with Dynamic (the default), a few frames after the KO hit the fight stands still and the game's own multi-angle replay, which DOA2U otherwise keeps for a human winner's few special moves, shows the hit three times from three cameras, the last at 85% speed, as Tekken Tag Tournament does; then the fall plays out live and the round moves on. KOs by the stage (hazards, fences, falls into another area) get no replay at all. Original keeps DOA2U's own replays. Offline only.
  • Quit Game. The main menu ends with a QUIT GAME entry, lettered and drawn like the game's own, that asks before it closes the game.
  • Jukebox. A JUKEBOX entry before Quit Game, with its own picture, opens a page of the game's own Options menu with the game's music: DOA2U's own 50 tracks from the disc, and the soundtracks of Dead or Alive 3 and Dead or Alive 4 from your own discs. Album and Track choose a track (left and right) and A plays or stops it; Play Mode is Repeat One, Play All or Shuffle (which move on after two loops, fading out). Assign To chooses any of the game's music (a fighter's theme, its remix, Character Select, the endings and so on) and A gives it the chosen track, from the next time that music starts; Assigned shows what it plays, and A there puts its own track back. Assignments are kept in jukebox\assignments.txt. The game's own sound is muted while a track plays; leaving the page returns to the main menu. Online the game plays its own music. To add an album, choose Import Disc on the launcher's JUKEBOX page, or drop the ISO on the launcher (a DOA3 or DOA4 disc is imported, any other disc builds the game), or run python tools/import_soundtrack.py <ISO or extracted folder>. DOA3's tracks are copied as they are; DOA4's are decoded with ffmpeg (the build fetches one into tools\ffmpeg) and encoded as ADX with their loops by recomp_adx_encode from the game's build, so build the game first. Albums go to a jukebox folder beside the launcher (jukebox\<album>), with the music of each disc's movies (opening, endings, logos) taken out of them as well; the build adds DOA2U's own movies' music as DOA2U-MOVIES, and the DOA1U album is the Dead or Alive Ultimate music on DOA2U's disc (DOA1\Sound). JukeboxEditor.exe (Edit Tracks on the launcher's JUKEBOX page; built from tools\jukebox_editor.cs) lists every album, plays a preview of any track, renames tracks and albums and picks what each of the game's music plays. To rename tracks by hand, open jukebox\<album>\names.txt (jukebox\doa2u for the game's own music): each line is file = name, and album = ... names the album. The game lists every track there when it starts, reads the names at start, and keeps them when you import again.
  • Mods. Files in a mods folder beside the launcher replace the game's files without touching the disc. Each folder in it is a mod that mirrors the disc: mods\<mod>\DOA2\doa2_op.sfd replaces a whole file, and a folder named after one of the game's archives replaces single entries in it, by their name in the archive or their number: mods\<mod>\DOA2\bgm.afs\bgm_doa2_ay.adx (or 10.adx) replaces Ayane's theme. An entry can be a plain WAV (8 to 32-bit PCM, mono or stereo, any rate): it is encoded to ADX once and kept in mods\.cache, and loops where its smpl chunk says or, if the track it replaces looped, over the whole song. Mods load by folder name, or in the order mods\order.txt lists them, and a later mod's file wins; a folder whose name starts with _ is off. The game's log (private\play-logs) lists every mod and file it serves. Netplay only pairs players whose mods are the same.
  • Sharper menus. Both renderers redraw the game's 2D art (menus, fonts, the HUD) at four times its size with xBRZ the first time each piece is shown, so it stays smooth at high resolutions. RECOMP_UI_UPSCALE=0 turns it off.
  • Saves. Your profile and unlocks save to private\play-disc; every character and costume is offered unless you choose Earn on the launcher's GAMEPLAY page. Your profile only ever saves what you have earned, so choosing Earn later gives it back as it was. The game's soft reset (Start + Back + both triggers) restarts it.
  • Built from your disc. Launcher.exe lifts the game from your ISO and refuses any executable other than the one the developers tested.

Status

Warning

0.3.2 Alpha is bring-up software. Story, Watch and the attract demo play in development runs on every stage, but many modes and characters have not been tried. A draw the port cannot render yet stops the game with a message in the log.

AreaState
Boot, menus, attract demo, character selectWorking
StagesEvery stage played
Story endingsEvery ending, its credits and epilogue play
Story, Ayane and Gen FuStages 1-6 cleared without a stop in scripted runs; the Tengu fight was lost each time
WatchFights played, including Kasumi vs Lei Fang on The Burai Zenin at 4K and 60 fps
Other characters, Versus, Tag, Survival, Time Attack, SparringNot yet played through
Tengu's stage, The MiyamaIn Stage Select, before Random, outside Tag; played in Sparring only, other modes not yet played through
Every character and costumeUnlocked by default (the launcher's Earn option leaves them to play); profiles save only what was earned
Native 16:9 widescreen, 16:10, 21:9 and 32:9, up to 4K, MSAA up to 32x, SMAA UltraWorking, chosen in the launcher; 32:9 tried only in the attract demo and Story character select, on Direct3D 11 and Vulkan
Vulkan renderer on WindowsWorking, chosen in the launcher; not yet tested on AMD; MSAA stops at 8x; VRR is Direct3D 11 only
Audio, including 3D voices and reverbWorking
Intro and story moviesPlay; the launcher can skip the intro ones
Xbox and other SDL3 controllers, keyboardWorking; keyboard drives player 1
Free camera, scene freeze, screenshotsWorking in the attract demo on macOS; a frozen stage's leaves and branches still move
Xbox Live menusReport no account; Yes quits to the desktop in place of the Dashboard
Online VersusRollback netplay from the Versus menu; test build
Hand-written game logicNot started; the game runs as generated code
macOS and LinuxBoot, menus and the attract demo render at 60 fps through Metal and Vulkan, with MSAA up to 8x and SMAA (building)

Known issues: a demanding moment on The Burai Zenin can still drop a single frame; the safari stage's heat haze does not ripple yet, and its water leaves a gap between the elephants' reflections. The game's bloom glows around bright surfaces as on the Xbox, which reads more strongly on a sharp 4K image.

Play the alpha

On macOS and Linux, including the Steam Deck, follow building on macOS and Linux instead.

Requirements: Windows 10/11 x64, internet access for the first build, and your Disc 2 ISO with about 6 GB free. The ZIP carries Python (with Capstone and Pillow) and CMake, so there is nothing to install. The build downloads the pinned llvm-mingw compiler (190 MB) into tools\llvm-mingw and checks its SHA-256; it needs no Visual Studio or administrator approval.

  1. Download the ZIP from the latest release and extract it into a new folder with a short path, such as C:\DOA2U.
  2. Open Launcher.exe and drag your Disc 2 ISO onto it (or choose it on the BUILD GAME page); the build starts at once. Wait for Build complete (about 10 minutes). The build stops unless it reproduces the exact program the developers tested.
  3. Pick resolution, MSAA, SMAA, widescreen, the renderer and VRR on VIDEO SETTINGS, stereo or 5.1 on AUDIO SETTINGS, the intro skip on MOVIES and Earn on GAMEPLAY to leave unlocks to play, then choose START GAME. A controller, the keyboard or the mouse all work. Your choices are remembered, and DOA2U.exe plays with them later.

The first launch copies about 700 MB of the game's disc archives into its hard-disk cache, which takes a few seconds. Saves and the cache live in private\play-disc. The package contains tools and source, never a prebuilt runner or game data. GitHub's automatic source archives lack the pinned lifter and extractor; use the release ZIP.

Controls: the first connected controller, or the keyboard for player 1: arrows are the D-pad, Enter is Start, Backspace is Back, Z/X are A/B, A/S are X/Y, Q/W are White/Black and E/R are the triggers. F3 turns on, or off again, a readout of the frame rate, the average frame time and the slowest frame of the last second; it starts off. F11 or Alt+Enter switches between a window and borderless fullscreen.

To rebind the keyboard, create private/keyboard.json with the buttons to change, for example {"a": "Space", "b": "Ctrl", "start": "Tab"}. Buttons are up, down, left, right, start, back, a, b, x, y, white, black, ltrig and rtrig; keys are A-Z, 0-9, F1-F9, F12, Up, Down, Left, Right, Enter, Backspace, Space, Tab, Shift, Ctrl and Esc. Buttons you leave out keep their keys, except that a key you give to one button leaves the button that had it. F10 is a Windows system key, and F11 and Alt+Enter are reserved for fullscreen, so none of them can be bound. F3 keeps its readout and, with the free camera turned on, F1, F12 and P keep their jobs, so a button bound to one of those does both. The free camera's own keys stay fixed, and while it flies the keyboard is the camera's.

Offline, hold Back for two seconds to quit to the desktop: A quits, B keeps playing.

Build from source

The public tests need no game files or lifter checkout:

git clone https://github.com/NoRain211/doa2u-re.git
cd doa2u-re
python -m unittest discover -s tools -p "test_*.py"
python tools/public_export.py verify --require-public-tree
cmake -S recomp-runtime -B build/recomp-runtime
cmake --build build/recomp-runtime --config Debug
ctest --test-dir build/recomp-runtime -C Debug --output-on-failure

To also test real PCM consumption on this PC's audio endpoint, configure with -DRECOMP_NATIVE_AUDIO_TEST=ON. Passing tests does not establish game compatibility.

To build the game from a clone, initialize the lifter and pass your ISO:

git submodule update --init tools/xboxrecomp
python tools/package_test.py --launchers .
python tools/build_game.py <your-disc-2.iso>
python tools/run_game.py --play

The importer extracts the disc once into private/imported-disc with XboxDev extract-xiso (on PATH, or bundled in the release ZIP), selects the game executable by its SHA-256 and leaves the ISO unchanged. Only that hash is published, in tools/build_game.py. A different ISO is staged first and replaces that extraction and receipt only if it verifies; a wrong disc keeps the previous import. After a runtime change, python tools/build_game.py --build-only reuses the authenticated lift; --lift-only generates without building. Generated C, receipts and logs stay in private/. The lift reads the committed function list in tools/doa2u/functions; --disassemble rebuilds that list from the executable (about 25 minutes) after a change to tools/doa2u/seed_functions.json or the lifter pin.

tools/doa2u/function_status.json is the decompilation registry. It records the Ghidra name for each tracked function and, once it is more than a name, its status (named, decompiled, bound or tested). A bound or tested entry also names the host source and symbol; the runtime replacement stays in recomp-runtime/program_manual.c or the adapter's own manual lookup. Raw decompiler output, generated C and retail bytes stay under private/.

AreaNamedDecompiledBound / testedTotalProgress
Game15746320624%
CRI middleware150153050%
SDK / CRT138131427349%
Untagged521131165320%
Total831308231,16228%

Statuses are exclusive; progress counts decompiled, bound and tested. The exporter rewrites this table from function_status.json after each refresh.

The initial decompiled entries are the named functions that already carry a Ghidra comment; the rest stay named until their bodies are worked through. python -m unittest discover -s tools -p "test_*.py" checks every registry address against the committed function list