GitHub Hot Board

GitHub Hot Board · Repository archive

nikolaygorb/ArmyOfTwoRecomp

Army of Two (Army of 2) 2008 [Xbox360] game static recompilation project based on RexGlue-SDK (This description comes from the repository itself.)

C++#army-of-two#rexglue#rexglue-recomp

Data at November 1nikolaygorb

Best

#260

Underappreciated Gems

100

Total stars

1

Total forks

1

Days on boards (30d)

License: MITLast push: October 27Open issues: 1Collected since 2026-10-25; unknown = not yet harvested

README

Army Of Two XBOX360 Recompilation

Army of Two

A static recompilation of Army of Two (2008, EA Montreal / Electronic Arts, Xbox 360; Title ID 4541084C, retail hash AA1EA03FEC9A549C) to native x86-64 (Windows / Linux), built on the ReXGlue SDK.

Static recompilation translates the Xbox 360 PowerPC code inside the game's default.xex into native C++ that compiles and runs on a PC. There is no emulator and no interpreter in the loop; file I/O, GPU commands, audio and threading go through the ReXGlue runtime.


Status

Everything works smoothly - codegen runs clean, the build compiles, and the executable boots to real GPU rendering.

Modern TU-version with multiplayer and GPU-native render for Windows is ArmyOfTwoRecompilation. My project won't be able to keep up with the development of the fork. If you need multiplayer, you're better off using ArmyOfTwoRecompilation project instead.

Project-side additions on top of the plain recompilation:

  • Native mouse look (src/mouse/) - raw 1:1 mouse input fed straight into the game camera on foot (sensitivity on the Source-games scale), with FOV-aware zoom scaling; LMB fires and RMB aims. Stick emulation stays in charge elsewhere. See ao2_mouse_* in settings/README.md.
  • GPU wait hook (src/render/gpu_wait_hook.cpp) - the render thread yields instead of busy-spinning while it waits for command-buffer space (ao2_gpu_wait_mode).
  • Ported xenia-canary game patches (FPS unlock, MSAA fix, 16x AF).
  • Language selection (src/language_hook.cpp) - set user_language in settings/hardware.toml (1 English, 2 Japanese, 3 German, 4 French, 5 Spanish, 6 Italian) and restart. Anything else falls back to English.
  • Split-screen / local co-op - max_local_users = 2 and keyboard_own_player = true in settings/hardware.toml sign in a second local player: keyboard + mouse is player 1, the first gamepad is player 2 (or use two gamepads, or up to 4 players in automatic mode). Each player keeps their own profile settings; saves are shared. See settings/split-screen.md for device assignment (input_player1/2) and troubleshooting.

Requirements

  • CMake 3.25+
  • Git (SDK submodule + patches)
  • Ninja
  • Clang / LLVM
  • ABGX360 to dump the Xbox 360 disc, or extract-xiso to unpack an existing ISO
  • Your own legally-owned copy of Army of Two, extracted from the Xbox 360 disc/ISO

The ReXGlue SDK is a git submodule - see Getting the SDK.

Getting the SDK

The ReXGlue SDK is pinned as a git submodule in thirdparty/rexglue-sdk and built together with the game:

git clone --recursive <this repo>
# or, in an existing clone:
git submodule update --init --recursive

Local SDK fixes live in thirdparty/patches/ and are applied to the submodule at configure time by cmake/apply_sdk_patches.cmake (idempotent; the submodule itself is never edited).

Getting the game data

  1. Dump the Xbox 360 disc with ABGX360 (verify against the hashes below) or extract an existing ISO with extract-xiso, which unpacks the disc's file tree.
  2. Copy the extracted contents directly into assets/, so default.xex sits at assets/default.xex alongside the rest of the disc's files (AO2Game/, $SystemUpdate/, ...).
  3. assets/ is gitignored (assets/* in .gitignore, with a couple of small tracked exceptions) - nothing from the disc is, or should be, committed to this repo.

Target retail release (verify your dump matches):

Field Value
Title ID 4541084C
Module Hash AA1EA03FEC9A549C
Media ID 7E3E9BEA

Build

cmake --preset win-amd64-release
cmake --build --preset win-amd64-release
cmake --preset linux-amd64-release
cmake --build --preset linux-amd64-release
cmake --preset mac-amd64-release
cmake --build --preset mac-amd64-release

Other presets (*-debug, *-relwithdebinfo, *-arm64) are listed in CMakePresets.json.

Codegen (translating assets/default.xex into generated/default/*.cpp) runs automatically as a build step (armyoftworecomp_codegen CMake target) whenever armyoftworecomp_manifest.toml or an included .toml changes. It can also be built on its own: cmake --build --preset win-amd64-release --target armyoftworecomp_codegen.

Run

cd out\build\win-amd64-release
.\armyoftworecomp.exe
cd out/build/linux-amd64-release
./armyoftworecomp
cd out/build/mac-amd64-release
./armyoftworecomp

Both --game_data_root and --gpu_plugin are optional: OnConfigurePaths() in src/armyoftworecomp_app.h defaults game_data_root to <repo_root>/assets when it isn't set via flag/env var, and gpu_plugin = "xenos" already lives in settings/hardware.toml.

Useful extra flags/env vars while developing:

Flag / env var Effect
--game_data_root <path> Overrides the default <repo_root>/assets game-files location.
--gpu_plugin xenos Overrides settings/hardware.toml's gpu_plugin. Only needed if you want a different plugin than the file specifies.
--graphics_backend d3d12|vulkan|any Forces the graphics API rexgpu-xenos uses (cvar, default "any", which picks D3D12 first). See settings/README.md.
--ao2_fps_unlock=true Ported xenia-canary game-patches "Unlock FPS" patch for Army of Two retail. Enabled by default in settings/hardware.toml. See settings/README.md.
--ao2_fps_unlock_mode=0|1|2 Frame-rate target when ao2_fps_unlock is on: 0=unlimited, 1=60 FPS, 2=30 FPS. Default 1.
--ao2_disable_msaa=true Ported xenia-canary game-patches "Black Shading Fix" (disables MSAA). Enabled by default in settings/hardware.toml.
--ao2_anisotropic_16x=true Ported xenia-canary game-patches "16x Anisotropic Filtering". Off by default.
--ao2_gpu_wait_mode=0|1|2 Render-thread wait for command-buffer space: 0=busy spin (original), 1=yield (default), 2=sleep 200us.
--max_local_users=1|2|3|4 Number of local (split-screen) players that can sign in. Shipped as 2 in settings/hardware.toml. See settings/split-screen.md.
--keyboard_own_player=true|false Keyboard + mouse as player 1 on their own, gamepads start at player 2. Shipped as true.

Logs are written to out\build\<preset>\logs\*.log (the exe is built WIN32, so nothing prints to the console).

Configuration

Rendering/window/vsync and input-backend defaults are checked in under settings/ (hardware.toml / mapping.toml), loaded automatically at startup. CLI flags and REX_* environment variables always override them - see settings/README.md for the full reference and precedence rules. Local multiplayer (split-screen) players and their controllers are configured there too; see settings/split-screen.md.

This is an unofficial, non-commercial fan project. It is not affiliated with, endorsed, sponsored or approved by Electronic Arts Inc., EA Montreal or Microsoft Corporation. Army of Two is a trademark of Electronic Arts Inc.; Xbox and Xbox 360 are trademarks of Microsoft Corporation. All trademarks belong to their respective owners.

This repository contains no game files, code or data from the game and does not distribute any. To use it you need your own legally owned copy of the game. Do not request or share game files in this project. The cover image is the property of Electronic Arts Inc. and is used for identification purposes only.

[IMPORTANT] This is DEMO of rexglue-sdk usage. It is a fan home-made research project.

Credits

Current rankings

  • 260

    Underappreciated Gems

    100 stars · 1 fork · Total stars (ascending)

    Underrated →

Momentum, past 30 days

Cumulative stars

Rank movement

Put your badge on the README · nikolaygorb/ArmyOfTwoRecomp[![Put your badge on the README](https://git.vaiox.xyz/api/badge/nikolaygorb/ArmyOfTwoRecomp.svg)](https://git.vaiox.xyz/en/repo/nikolaygorb/ArmyOfTwoRecomp)

Badge · 任何仓库都可以挂 —— 未上榜的仓库显示灰章,上完榜会自动点亮。

<a href="https://git.vaiox.xyz/en/repo/nikolaygorb/ArmyOfTwoRecomp"><img src="https://git.vaiox.xyz/api/badge/nikolaygorb/ArmyOfTwoRecomp.svg" alt="Put your badge on the README" height="20"></a>

← Back to boards

GitHub Hot BoardTime MachineDiscover联系我们 · Contact