ReGTA CTW — PC Recomp

# ReGTA CTW — PC Recomp **A native PC future for Chinatown Wars PSP.** **by Benji Paname** [![Version](https://img.shields.io/badge/milestone-0.1.4--alpha-orange)](CHANGELOG.md) [![Tests](https://img.shields.io/badge/local_tests-163_passed-brightgreen)](docs/STATUS.md) [![Warnings](https://img.shields.io/badge/compiler_warnings-0-brightgreen)](docs/STATUS.md) [![Platform](https://img.shields.io/badge/platform-Windows_x64-blue)](#build-and-run) [![Language](https://img.shields.io/badge/runtime-Rust-dea584)](#repository-layout) [![License](https://img.shields.io/badge/license-GPL--3.0--only-blue)](LICENSE) [![Discord](https://img.shields.io/badge/Discord-benjamin060936-5865F2?logo=discord&logoColor=white)](https://discord.com/users/601648068277960714) ReGTA CTW is an independent reverse-engineering and native-port project for **Grand Theft Auto: Chinatown Wars**, targeting the European PSP release **ULES-01347, version 1.01**. The goal is to rebuild the PSP experience in Rust for Windows x64, reading game data from the user's own disc image without a PSP CPU emulator in the runtime. > **Pre-alpha — no public playable download.** No game executable, ROM, ISO or proprietary game assets are offered for download. The local prototype is unfinished; no release date or complete gameplay parity is promised. Building from source requires the tools and personal game copy described below. The city, player movement, cameras, navigation, vehicles and combat already have prototype implementations. The work ahead is to verify their behaviour against the PSP original and connect them into a complete game. **165 passing tests and 166 indexed code overlays are progress measurements, not proof of full-game equivalence.** **[Support on Tipeee](https://fr.tipeee.com/benji-paname/)** · [Support via PayPal](https://paypal.me/BenjiLsg) · **[Discord: benjamin060936](https://discord.com/users/601648068277960714)** Support helps sustain Benji Paname's reverse engineering, native development and documentation. It does not buy the game, game assets or early access, and does not guarantee completion or a release date. [Project website source](docs/index.html) · [Implementation status](docs/STATUS.md) · [Changelog](CHANGELOG.md) · [Publish with GitHub Pages](docs/PUBLISHING.md) · [YouTube Creator Kit](docs/YOUTUBE_CREATOR_KIT.md) ## Status [![original code ported](docs/assets/badge-overall.svg)](docs/progress.html) [![routines](docs/assets/badge-routines.svg)](docs/progress.html) [![progress map](docs/assets/progress.svg)](docs/progress.html) Share of the original game's code, by size, implemented in native Rust (`src/`). Green is the ported part of each class. 100% measured from our Rust codebase. Updated on every push to main; see [how it is measured](docs/progress.html). ## Next milestones - Review the English-first presentation and four horizontal/vertical, black/transparent logo variants; see [branding provenance](docs/BRANDING.md) for the outstanding Bruce Mikita license documentation. - YouTube first-look film: review the new local edit and upload kit in [`docs/YOUTUBE_CREATOR_KIT.md`](docs/YOUTUBE_CREATOR_KIT.md). - Expand story missions execution engine across Boss contacts with scripted cutscene staging. - Continue PSP behaviour comparisons, progression and save work before considering a public playable release. ## Build and run Requirements: Windows x64, a Rust toolchain with a matching Windows linker, and a legally obtained personal ISO of the supported PSP release. The current local validation uses Rust 1.90.0 with the GNU Windows target. Cargo dependencies are pinned in `Cargo.lock`. From the repository root, in PowerShell: ```powershell .\Compiler.ps1 -Test .\outputs\CTW-Rust\CTW-Rust.exe --iso "D:\Games\Chinatown-Wars-PSP.iso" --slice ``` The compiler runs with warnings treated as errors, tests the workspace, and updates the executable only after success. Unit tests use generated synthetic fixtures and do not require an ISO or extracted game tables. Local validation on **25 October 2026: 163 passed, 0 failed, 0 ignored, 0 compiler warnings**. This is a local result, not a hosted CI badge. For desktop launchers, set `CTW_ISO` in the launching environment or pass `--iso` to a launcher: ```powershell .\outputs\CTW-Rust\Presenter-la-demo.cmd --iso "D:\Games\Chinatown-Wars-PSP.iso" ``` The existing `outputs/CTW-Rust/Compiler.ps1 -Test` entry point remains supported. The executable keeps its technical name `CTW-Rust.exe` for existing shortcuts; the Cargo package is `regta-ctw`. Build cache: `target/`. See [build instructions](docs/BUILDING.md) for portable toolchains, offline builds, private integration checks and troubleshooting. ## Current scope | Area | Current implementation | Remaining work | | --- | --- | --- | | Resources and world | PSP ISO/WAD/PAK readers, textures, models, map and collisions | Continue format validation and completeness checks | | Player and cameras | Movement, rolling, obstacle traversal, PSP/mobile/DS camera profiles | Establish remaining PSP behaviour and collision parity | | Navigation and HUD | PSP radar resources, health/armour display, route guidance, large map | Finish original interface behaviour and GPS fidelity | | Pedestrians and props | PSP pavement graph, population and prop systems | Validate AI decisions and interactions against PSP | | Vehicles and combat | Driving, traffic, weapons, explosions and police prototypes | Replace unverified behaviour and Android reference dependencies | | Sound, weather and statistics | Native audio infrastructure, radio/weather managers, stats structures | Verify integration, PSP provenance and complete save support | | Full game progression | Not complete | Missions, scripting and complete campaign/save behaviour | The three camera profiles, French/English interface, keyboard/XInput controls and optional locally supplied HD replacements remain available. No texture pack is included in this repository. ## 📊 Verifiable Progress & Implementation Map > [!NOTE] > **Progress Measurement Policy**: Third-party progress charts (e.g. from Android C++ decompilations) measure Android ELF symbols. In contrast, ReGTA CTW is an independent native Rust port targeting the European PSP release (**ULES-01347 v1.01**). Original PSP routine coverage is unmeasured pending a reviewed build-specific routine inventory (`docs/progress/psp-routines.json`). We present **verifiable, testable counts** from our local codebase rather than an unverified percentage. ### 🎯 Key Verified Metrics (Local Codebase) | Metric | Measured Value | Verification Method | |---|---|---| | **Passing Unit Tests** | **163 tests / 0 failures** | `Compiler.ps1 -Test` (100% deterministic synthetic fixtures) | | **Compiler Warnings** | **0 warnings** | Enforced via `-D warnings` in Cargo build profile | | **Active Rust Modules** | **45 modules** (25,018 lines) | Pure native Rust x86_64 in `src/` | | **PSP Code Overlays Indexed** | **166 overlays** | Verified against `OVERLAYS.PAK` directory table | | **Street Races Implemented** | **16 circuits** | Broker, Dukes, Bohan & Algonquin with AI racers (`src/races.rs`) | | **Safehouse Properties** | **21 planques** | Property ownership, stash box & wardrobe (`src/safehouse.rs`) | | **Collectible Challenges** | **100 cameras, 35 rampages, 30 jumps** | LCPD cameras, 35 Rampages, 30 USJ Stunt Jumps (`src/collectibles.rs`) | | **Drug Wars Economy** | **81 dealers, 7 gangs, 6 commodities** | Wholesale pricing, price-drop emails & inventory bag (`src/drugs.rs`) | | **Story Boss Contacts** | **8 boss storylines** | Kenny, Chan, Zhou, Hsin, Heston, Lester, Rudy, Xin Shan (`src/missions.rs`) | | **Vehicle Audio & Radio** | **11 radio stations** | In-car tuning & stream manager (`src/radio.rs`) | | **Odd Jobs (Missions Ambulantes)** | **5 services** | Taxi, Vigilante, Firefighter, Paramedic, Noodle Delivery (`src/jobs.rs`) | ### 🧭 Reference Repositories & Upstream Alignment ReGTA CTW independently cross-references two separate upstream projects without importing their binaries: - **`ctw-native`** (Android 4.4.243 / C++) : `b0506abc` — *Gameplay algorithms, class names and porting methodology; verify PSP Europe differences.* - **`psp-recomp`** (PSP USA ULUS-10490 1.01 / C++ + PSP HLE) : `6562163b` — *Overlay analysis, original control flow and rendering/audio research; validate against ULES-01347 1.01.* ## Repository layout ```text src/ Active Rust implementation and unit tests tools/build/ Canonical compiler implementation tools/maintenance/ Storage audit, cleanup and repository checks tools/research/ Index of preserved local research scripts docs/ Build, status, release and research documentation data/tables/ Private local tables (ignored; provenance documented) references/ Source references and provenance, no game binaries outputs/CTW-Rust/ Compatibility manifest, launchers and local executable work/ Preserved private research (ignored) target/ Single regenerable Cargo cache (ignored) ``` The root Cargo workspace retains the package manifest under `outputs/CTW-Rust/` so existing build commands continue to work. The implementation has a single source location: `src/`. ## Support & Contact Support **Benji Paname's reverse-engineering, documentation and native-port development**, or get in touch: - **Discord**: [benjamin060936 (ID: 601648068277960714)](https://discord.com/users/601648068277960714) (contact direct pour collaborations / reverse-engineering) - **[Support on Tipeee](https://fr.tipeee.com/benji-paname/)** - [One-time support through PayPal.Me](https://paypal.me/BenjiLsg) Contributions are optional. They do not purchase the game, provide game assets or grant rights to Rockstar's intellectual property. No game download, completion date or access tier is promised in exchange. These links were supplied by the project owner. ## License and provenance Source code: **GPL-3.0-only**. See [LICENSE](LICENSE) and [THIRD_PARTY.md](THIRD_PARTY.md) for upstream work and component credits. This repository contains no ISO, decrypted PSP executable, extracted game archive, texture pack or audio asset. Optional private tables and research artifacts are excluded from Git. Supply your own supported game copy; do not submit proprietary resources in issues or pull requests. This is an independent fan research project, not affiliated with or endorsed by Rockstar Games or Take-Two Interactive. Game assets and trademarks remain the property of their respective owners. [Changelog](CHANGELOG.md) · [Release process](docs/RELEASING.md) · [Developer handoff](outputs/CTW-Rust/AI_HANDOFF_GUIDE.md)