A work-in-progress decompilation of the Wii and Xbox 360 versions of Need for Speed: Undercover.
This repository does not contain any game assets or assembly whatsoever. An existing copy of the game is required.
Supported versions:
SPEED_DEBUG_OPT_EN_US: 2008-12-11 Prototype (Xbox 360)RX9E69: US Release build (Wii)
On Windows, it's highly recommended to use native tooling. WSL or msys2 are not required.
When running under WSL, objdiff is unable to get filesystem notifications for automatic rebuilds.
- Install Python and add it to
%PATH%.- Also available from the Windows Store.
- Download ninja and add it to
%PATH%.- Quick install via pip:
pip install ninja
- Quick install via pip:
-
Install ninja:
brew install ninja
wibo, a minimal 32-bit Windows binary wrapper, will be automatically downloaded and used.
- Install ninja.
wibo, a minimal 32-bit Windows binary wrapper, will be automatically downloaded and used.
-
Clone the repository:
git clone https://github.com/dbalatoni13/nfsuc.git
-
Install dependencies (PS2 only)
python -m pip install -r requirements.txt
-
Configure:
python configure.py
To use a version other than
SPEED_DEBUG_OPT_EN_US, specify it with--version, for example--version RX9E69. -
Build:
ninja
-
Extracting the binaries
-
GC: Extract
NFSMWRELEASE.ELF, copy it intoorig/GOWE69, and convert it into a DOL using the following command:./build/tools/dtk elf2dol ./orig/GOWE69/NFSMWRELEASE.ELF ./orig/GOWE69/sys/main.dol
-
Xbox 360: simply rename
NfsMWEuropeGerMilestone.exetoNfsMWEuropeGerMilestone.xexand copy it to./orig/EUROPEGERMILESTONE/ -
PS2: Copy
NFS.ELFto./orig/SLES-53558-A124/
-
-
Sharing large assets across git worktrees
If you use multiple git worktrees, you can deduplicate the large immutable inputs and downloaded tool binaries while keeping each worktree's generated build files separate:
python tools/share_worktree_assets.py link --all
This shares the ignored debug/tool assets under the git common directory, including extracted
orig/*contents,symbols/*, and downloaded tool binaries underbuild/. It intentionally does not sharebuild.ninja,objdiff.json,compile_commands.json, or per-worktree object outputs.After creating a fresh worktree, bootstrap its local generated files with:
python tools/share_worktree_assets.py bootstrap
bootstraplinks the shared assets for the current worktree, runsconfigure.py, generates the local split config when needed, and rerunsconfigure.pyso fresh worktrees end up withbuild.ninja,objdiff.json, andcompile_commands.jsonwithout manual copying.
Once the initial build succeeds, an objdiff.json should exist in the project root.
Download the latest release from encounter/objdiff. Under project settings, set Project directory. The configuration should be loaded automatically.
Select an object from the left sidebar to begin diffing. Changes to the project will rebuild automatically: changes to source files, headers, configure.py, splits.txt or symbols.txt.
