Urbz recomp

Urbz recomp is a native PC port of The Urbz: Sims in the City for Windows that allows users to play the game with F1 to open settings and F2 for the frame-time graph.

README

The Urbz: Sims in the City - static recompilation

An unofficial native PC port of the original Xbox release of The Urbz: Sims in the City (USA), produced by statically recompiling the game's x86 XBE with the XboxXBERecomp SDK (vendored in sdk/).

This repository contains no game code and no game assets. It holds tooling, configuration and host-side glue only. You must supply your own legally acquired copy of the disc.

Run it on Windows

You supply the game: the USA Xbox release, as a disc image or as the files from one.

  1. Download Urbz.zip from Releases and unzip it anywhere.
  2. Put your disc image in the assets folder beside Urbz.exe, so you have Urbz.exe and assets\<anything>.iso. A whole-disc dump or a plain xiso both work, and so do extracted files (default.xbe with its DATA and movies folders beside it).
  3. Run Urbz.exe. It mounts the image as the console's D: and boots the game.

You need Windows 10/11 x64, a Direct3D 12 GPU, and an Xbox-style controller - the game only reads a pad, there is no keyboard mapping. The first run writes settings.toml, logs\ and hdd\ (where saves go) beside the exe. In game, F1 opens settings (display mode, resolution, aspect ratio, ultrawide, vsync, frame cap, render scale, anisotropic filtering) and F2 the frame-time graph.

If it says the game is missing, the assets folder has no image or extracted default.xbe in it. The exe only runs the XBE it was recompiled from - SHA-1 5712b6a3..., USA retail; any other build is offered as a warning you have to confirm, and will not run properly if you take it.

Status

StageState
Disc image read and extracted (tools/xiso_extract.py)done - 44 files, see docs/iso-extract.md
XBE identified and analysed (tools/xbe_info.py)done - see docs/xbe-analysis.md
XDK build matched against the SDK's signature setdone - XDK 5849, supported by sdk/xdk/5849
Toolchain (clang 23.1.3 + ninja + cmake)done - see docs/toolchain.md
Repo scaffolded from the SDK templatedone
config/game.toml written by xbe_symbolsdone - 130 of 238 XDK functions located
Recompilation and native builddone - 15,942 functions, Urbz.exe boots and opens its window, see docs/status.md
Kernel import coverage (tools/kernel_coverage.py)123 of 124 covered, see docs/kernel-coverage.md
Remaining console-surface gapssee docs/gap-analysis.md

The game

FieldValue
Title ID0x45410060 (EA, serial 96)
RegionNorth America
XBEdefault.xbe, 3,035,136 bytes, SHA-1 5712b6a3e2eaaacfcae228cf6154ade499a0033c
Linked2004-10-07
XDK1.0.5849 (XAPILIB, XBOXKRNL, LIBCMT, D3D8, XGRAPHC, DSOUND, XMV)
Kernel imports124 ordinals

The build is pinned to this exact XBE. A different region or revision needs its own analysis pass.

Layout

assets/        your disc image and/or the files extracted from it (never committed)
config/        game.toml - the recompiler config written by xbe_symbols, then hand-corrected
docs/          analysis and bring-up notes
sdk/           XboxXBERecomp SDK checkout (recompiler, runtime, XDK HLE, D3D12 renderer)
src/common/    host-side code: game_info.cpp defines app::kGame
src/game/      hooks and overrides for recompiled functions (src/game is excluded from the host glob)
tools/         xiso_extract.py (XDVDFS reader), xbe_info.py (XBE reader), env.bat (toolchain PATH)
generated/     recompiler output (never committed)

Build it from source

  1. Put your disc image in the repository root, or default.xbe plus its DATA and movies folders in assets/.
  2. Extract it:
    python tools/xiso_extract.py info    "<your>.iso"
    python tools/xiso_extract.py extract "<your>.iso" assets
    
  3. Check that the XBE is the one this configuration targets:
    python tools/xbe_info.py assets/default.xbe --json build/xbe_info.json --markdown docs/xbe-analysis.md
    
    The SHA-1 must match the table above.
  4. Install the toolchain and build:
    tools\env.bat
    build.bat
    
    build.bat configures the release preset, builds xbe_symbols, writes config/game.toml from the XBE and the SDK's XDK 5849 signatures, then recompiles the XBE and builds Urbz.exe into out/build/release. The first build is long: it compiles one C++ function per guest function.

Working on the port

  • Never edit anything in generated/; it is rewritten on every recompile.
  • Behaviour changes go in src/game/ as X86_FUNC(sub_XXXXXXXX) overrides (call __imp__sub_XXXXXXXX for the original) or as [[hook]] entries in config/game.toml.
  • Analysis mistakes are corrected in config/game.toml with [[function]], [[switch]] and [xbe] data_ranges.
  • python sdk/tools/symbols/xbe2pe.py config/game.toml game.exe writes a flat PE with the recompiled functions as exports, for symbol work in Ghidra.

Legal

Bring your own disc. Do not commit or distribute the XBE, the disc image, extracted assets, or any key material. assets/, generated/, *.iso and out/ are ignored by git for that reason. The SDK is MIT licensed; see sdk/LICENSE and sdk/THIRD_PARTY.txt.