# Asura's Wrath Recompiled
PC port of Asura's Wrath (`default.xex`, Title ID `43430817`) via Xbox 360 static PowerPC recompilation to C++23, rendered by the in-repo Vulkan renderer `mantra`.
> Note: made and tested on Linux. Windows (x64, ARM64) and Linux ARM64 builds are cross-compiled from Linux, less tested. An **experimental Android** build exists (arm64; touch controls or a controller; see [Android](#android-experimental)).
https://www.youtube.com/playlist?list=PLVyuezqTsTB0
> Original illustration by Satoshi Sakai
---
## TL;DR (first run)
1. Have your copy of the game ISO ready.
2. Download your platform's build from [Releases](https://github.com/PauloUbirajara/asuras-wrath-recomp/releases) (or [build it](#3-build)).
3. Start `asura_wrath` (the `.AppImage` on Linux, the single `.exe` or the zip's `asura_wrath.exe` on Windows, the APK on Android): the launcher opens. On a first start it picks up a game folder, saves and DLC `.zip`s placed next to it.
4. **Game data > Folders**: drop the `.iso` on the window and let it extract (Android: **Game › Extract an .iso…**).
5. **Game data > Shaders**: build the shader cache (about 10 minutes, once), or **Import** `mantra_shaders.mshc` from the release.
6. **Play**.
---
## 1. Requirements
**To play**
- Your copy of the Xbox 360 game ISO (`Asura's Wrath.iso`), or its extracted files.
- A GPU with Vulkan 1.1+ and up-to-date drivers; 64-bit Linux or Windows 10+ (x64 or ARM64), or Android 9+ (arm64).
- Windows: the [Visual C++ Redistributable](https://aka.ms/vs/17/release/vc_redist.x64.exe).
**To build**
- The extracted game (`extracted/default.xex`): the first build recompiles it. [extract-xiso](https://github.com/XboxDev/extract-xiso) extracts the `.iso`.
- Linux: clang-20, CMake 3.25+, Ninja, glslc (shaderc), Vulkan drivers, Git.
- Windows (native build): Visual Studio 2022 Build Tools (Windows SDK + C runtime), LLVM clang 20+ on PATH, CMake 3.25+, Ninja, Git, the Vulkan SDK.
- Windows (cross build from Linux): the Linux requirements plus lld-20, llvm-20 (`llvm-rc`, `llvm-ar`, `llvm-mt`) and Python 3 (packaging); `tools/setup_windows_cross.sh` downloads Microsoft's SDK and runtime (see below).
- Android (built on Linux): JDK 17+, the Android SDK (`platforms;android-35`, `build-tools;35.0.0`, `ndk;28.2.13676358`) in `$ANDROID_HOME` or `~/Android/Sdk`, CMake 3.25+, Ninja (details in [android/README.md](android/README.md)).
---
## 2. Setup
### Clone Repository
```bash
git clone --recursive https://github.com/PauloUbirajara/asuras-wrath-recomp.git
cd asuras-wrath-recomp
git -C thirdparty/XenosRecomp submodule update --init --recursive
```
---
## 3. Build
> Requires the .iso contents in `extracted/` to build (the first build recompiles `extracted/default.xex`).
```bash
mkdir -p extracted/
extract-xiso -x asura_wrath.iso -d extracted/
```
### Option A: Using CMake Presets (Linux)
```bash
cmake --preset linux-amd64-release
cmake --build out/build/linux-amd64-release --parallel
```
### Option B: Using Build Scripts (Linux)
```bash
# Build binary (out/build/linux-amd64-release/)
./build.sh
# Build for any x86-64 CPU with SSE4.1 (the default is tuned for your CPU: -march=native)
./build.sh --portable
# Other options: --debug, --codegen, --clean (./build.sh --help)
```
### Option C: Windows, native (PowerShell)
Run from a *Developer PowerShell for VS 2022* (x64), so clang finds the Windows SDK:
```powershell
# Build binary (out\build\win-amd64-release\)
.\build.ps1
# Portable build (for sharing); other options: -Config debug|relwithdebinfo, -Codegen, -Clean
.\build.ps1 -Portable
```
### Option D: Windows, cross-compiled from Linux
Builds `asura_wrath.exe` on Linux with clang-20 targeting the MSVC ABI and lld-link. Microsoft's Windows SDK and C/C++ runtime can't be redistributed, so a script downloads them (through [xwin](https://github.com/Jake-Shadle/xwin)) into `out/toolchain/xwin`; running it accepts [Microsoft's license](https://go.microsoft.com/fwlink/?LinkId=2086102).
```bash
# Once: Windows SDK 10.0.22621 + MSVC runtime (~600 MB; --debug-libs for Debug builds)
tools/setup_windows_cross.sh
# The Linux build first: the Windows build runs its codegen tool
./build.sh
# Windows build (out/build/win-amd64-release-cross/); --portable for sharing, --debug
./build.sh --windows --portable
```
The same with presets: `cmake --preset win-amd64-release-cross` then `cmake --build out/build/win-amd64-release-cross --parallel` (toolchain file `cmake/windows-cross.cmake`; `XWIN_DIR` and `LLVM_SUFFIX` override the SDK folder and the `-20` suffix).
### Option E: Android (experimental), from Linux
Gradle builds the same CMake project with the NDK, plus a Kotlin launcher (see [android/README.md](android/README.md)).
```bash
# APKs in android/app/build/outputs/apk/release/ (universal, arm64-v8a, x86_64)
./build.sh --android
# One ABI only (faster)
ASURA_ABIS=arm64-v8a ./build.sh --android
```
The first build also cross-builds DXC for the on-phone shader builder (about 8 minutes per ABI); later builds reuse it.
### Package
```bash
# A release: portable build, then the archive + AppImage named after the version
./build.sh --portable
tools/package.sh --appimage --clean --version 0.1.0
# out/package/
# ├── asuras-wrath-recomp-0.1.0-linux-x86_64.tar.gz
# ├── asuras-wrath-recomp-0.1.0-linux-x86_64.AppImage
# └── SHA256SUMS-linux
```
Without `--version`, the files are named after the git tag on HEAD (`v0.1.0` → `0.1.0`), else the short commit; uncommitted changes only print a warning. `--clean` deletes earlier packages in `out/package`; the staging folders are always removed. The AppImage needs appimagetool (`APPIMAGETOOL=`, PATH, or `../appimagetool/appimagetool`), which downloads its runtime unless `APPIMAGE_RUNTIME=` is set.
Windows packages are a `.zip` (binaries, `assets/`, a `README.txt`) and, from the cross build, the same files as one `.exe`: it unpacks them once per version into `%LOCALAPPDATA%\asura_wrath_recomp\app\` and starts the game from there, keeping `launcher.cfg` next to itself, as the AppImage does (`tools/winpack/`).
```bash
# Cross build on Linux: out/package/asuras-wrath-recomp--windows-x86_64.{zip,exe} + SHA256SUMS-windows
./build.sh --windows --portable
tools/package.sh --windows --version 0.1.0
```
```powershell
# Native build on Windows: out\package\asuras-wrath-recomp--windows-x86_64.zip + SHA256SUMS.txt
.\build.ps1 -Portable
tools\package.ps1 -Version 0.1.0
```
Android packages are the APKs, copied with the version in the name:
```bash
# out/package/asuras-wrath-recomp--android-{universal,arm64-v8a,x86_64}.apk + SHA256SUMS-android
./build.sh --android
tools/package.sh --android --version 0.1.0
```
Everything at once (Linux tar.gz + AppImage, Windows zip, APKs), from the builds already made:
```bash
./build.sh --portable && ./build.sh --windows --portable && ./build.sh --android
tools/package.sh --all --clean --version 0.1.0
```
`tools/package.sh` refuses a Windows or Android build older than the sources, so a failed build isn't packaged under the new version.
The Windows build links the Microsoft C++ runtime dynamically: players without it install the [Visual C++ Redistributable (x64)](https://aka.ms/vs/17/release/vc_redist.x64.exe) (the zip's README says so).
For a GitHub release, attach the files in `out/package`. The default build is tuned for your CPU and may not run on others, so share only `--portable` builds. Players supply their own game: never attach game files or a shader cache built from them.
---
## 4. Run
### Folder layout
The AppImage and the single `.exe` are one file. A folder next to it is optional; on a first start the launcher picks these up:
```
├── asura_wrath(.AppImage / .exe) # or the tar.gz / zip contents
├── extracted/ # the game (default.xex); or set in Game data > Folders
├── / # optional: a Files folder or Xenia's content/
└── *.zip # optional: DLC
```
### Where files go
Everything the game writes goes to one *Files folder*, set in **Game data > Folders**:
| OS | Default *Files folder* |
| :--- | :--- |
| Linux | `~/.local/share/asura_wrath_recomp` |
| Windows | `Documents\asura_wrath_recomp` |
| Android | `Android/data/org.asurawrath.recompiled/files/asura_wrath_recomp` |
Inside: saves and achievements (`/43430817/`, the same layout as Xenia's `content` folder), `cache/` (shader cache, fonts), `logs/`, `traces/` and installed DLC.
`launcher.cfg` (the launcher's settings) sits next to the launcher (the program, `.AppImage` or `.exe`). If that folder isn't writable, it goes in the default *Files folder*. The single `.exe` unpacks its program files to `%LOCALAPPDATA%\asura_wrath_recomp\app\`.
### Launcher
The launcher opens first:
| Page | What's there |
|---|---|
| **Game data** | Game folder or `.iso`, *Files folder*, shader cache, DLC, saves |
| **Controls** | Button test, remapping, deadzones, vibration, Turbo, keyboard/mouse, controller setup |
| **Achievements** | Unlocked / locked |
| **Settings** | Language (incl. PT-BR and Russian fan translations), display, graphics, frame rate, skip intro |
| **Report an issue** | Logs, frame traces, and one `.zip` for a bug report |
| **About** | Version and system details |
**Play** starts the game; **Esc** in game opens the launcher over it. Keys (rebindable): F3 trace a frame, F7 achievements, `` ` `` console.
To report a bug: if the picture looks wrong, trace that moment (F3, or Back › Trace on Android), then *Report an issue > Make the report* and attach the `.zip` to your issue with what you did and what went wrong.
*Settings > Graphics* changes the game's own Unreal Engine settings (next start): Low / Medium / High (= Xbox 360) / Ultra where the game has more, and effects that can be turned off.
### Android (experimental)
Android 9+, arm64 (or x86_64), Vulkan 1.1.
1. Install the APK (`…-arm64-v8a.apk`, or the universal one).
2. Pick the extracted game (**Game › Choose folder**), or extract the `.iso` on the phone (**Game › Extract an .iso…**).
3. Build the shader cache on the phone (slow; keep it charging), or **Import** one built on a computer (the `.mshc` works on every platform).
4. **Play**. Back opens the in-game menu.
Touch controls hide while a controller is connected; *Controls > Touch layout* moves them. Snapdragon phones can load a custom driver such as Turnip (*Settings > GPU driver*). Expect low frame rates on mid-range phones; lower *Render resolution* and *Graphics* settings help. More: [android/README.md](android/README.md).
## 5. Credits
- Powered by **ReXGlue** (https://github.com/rexglue/rexglue-sdk), an open-source static recompilation framework for Xbox 360 software.
- Shader translation by **XenosRecomp** (https://github.com/hedge-dev/XenosRecomp), © hedge-dev and contributors, MIT License (`thirdparty/XenosRecomp/LICENSE.md`): `mantra_shadergen` uses it to turn the game's Xenos shaders into the shader cache.
- Brazilian Portuguese translation (*Settings > System > Language > Português (Brasil) - joao13*) by **XEX Brasil** and **Brazilian Warriors** (Xujozer, Angel Forgotten, Sergio-F), revised by JMC360, published at https://joao13traducoes.com/2021/07/x360-asura-wrath-xex-brasil-e-brazilian-warriors/. It ships in `assets/translations/pt-BR` (`CREDITS.txt` there), with the few lines it left in Spanish or untranslated completed; `tools/make_ptbr_pack.py` rebuilds it from the downloaded patch. Its translated images (title menu, Game Over, end screens) are included; the launcher gives the game a table of contents (`Xbox360TOC.txt`) with their new sizes, as the patch does.
- Russian translation (*Settings > System > Language > Русский - void2012*) by **void2012**, a fan translation of the PS3 release from Russian forums. It ships in `assets/translations/ru` (`CREDITS.txt` there): its text and its redrawn fonts (the patch draws Cyrillic in place of Latin-1 letters), converted to the Xbox 360's files by `tools/make_ru_pack.py` from the translated PS3 game's `COOKEDPS3` folder, with "True Episode 18" translated as well. The menus' pictures stay in English, as in the patch. The Episode 19-22 DLC's subtitles are not translated: the patch left them in English, and they come with the DLC.
- UI touch controls made possible by using **kenney.nl** Xbox and PlayStation gamepad assets (https://kenney.nl/assets/input-prompts)
- *Asura's Wrath* and its artwork are © **CAPCOM** (https://www.capcom.com). The launcher and pop-up images in `assets/ui` come from the game, with some parts edited by hand for the launcher. The game itself, its fonts and other assets are not included: they are read from your own copy.
- Fallback fonts: **Noto Serif** and **Noto Serif CJK JP** (https://notofonts.github.io), © The Noto Project Authors and Google, under the SIL Open Font License 1.1 (`assets/ui/OFL.txt`). `NotoSerifJP-Launcher.awf` is a subset rendered from Noto Serif CJK JP.
---
## 6. Issues
- Most episodes seem to work, though might not reflect 1:1 with console.
- There is a cutscene in episode 11 that has a minor visual inconsistency when fps > 30 (might happen in other episodes that I did not look)
- Android is experimental: slow on mid-range phones.
- (DLC) Did not test the animation episodes
- (DLC) Did not test dlc upload/playthrough on phone
---
## 7. TODO
- [ ] Port to Android (experimental build available; needs performance work)
- [ ] Test all episodes
- [ ] Improve performance
- [x] Add touch controls for Android
- [x] Make DLCs work
- [x] Port to Windows (natively or cross-compiled from Linux;)
- [x] Make consistent builds
- [x] Make it easier to build & run