Initialise native Rust port of Ratchet & Clank: Going Commando
Sets up the foundation for reimplementing the PS2 game in Rust rather than emulating it. Nothing is implemented yet; this is the scaffold, the verified target and the working agreements that keep a long project coherent. Target disc, verified against a real image: SCUS_972.68 v1.01, USA Black Label, NTSC 60 Hz boot ELF 2,618,684 bytes, SHA-1 bacda860...d098a77, entry 0x00131AE8 The entry point independently matches the value recorded by the rac2-gc-decomp community reference, which cross-confirms the identification. This is the exact build the upstream research pins; Greatest Hits v2.00 is a different binary and is not the target. NTSC matters beyond label compatibility: PAL discs run 50 Hz, which would make chargeboots and other speed-sensitive movement run at 5/6 speed. Verifying the disc before writing movement code avoids discovering that in Phase 5. Contents: - Five-crate workspace (formats, extract, game, video, engine) on Bevy 0.19.1, matching the version ReRAC uses so its Graphics Synthesizer and VU work stays portable. `cargo check --workspace` is clean. - tools/identify-disc.py, which reproduces the identification against any disc image and distinguishes a truncated dump from a non-PS2 image. - .githooks/pre-commit, refusing game data from entering git history: disc image extensions, asset directories, container signatures at offset 0, and files over 50 MiB. Verified against seven cases including a disc image renamed to look like source. Now that this pushes to a remote, this matters more than it would have locally. - AGENTS.md, the operating agreements: no game data ever, reproduce the PS2 float model rather than approximating it, bound every read, verify against the real disc. - PROVENANCE.md, recording that this follows ReRAC (ISC) and learns from rac2-gc-decomp (MIT). Wrench is used as a written specification only and no GPLv3 code is copied, since that would relicense everything derived from it. RAC2Decomp is explicitly not used: its provenance is disputed in the upstream community reference, and it targets the wrong region. - docs/roadmap.md, phased so the riskiest unknowns are retired early. The two that matter: overlay relocation transfers from ReRAC and makes 27 level overlays tractable, while VU1 microcode is binary and is the hardest single item. Phase 5 is a deliberately scoped Veldin vertical slice as the go/no-go.
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
//! Game logic for *Ratchet & Clank: Going Commando* (PS2).
|
||||
//!
|
||||
//! The rules, systems and behaviour of the game, reimplemented from the
|
||||
//! original code rather than wrapped around it. No emulation, no interpreter:
|
||||
//! this is a Rust implementation that is meant to behave the way the game does.
|
||||
//!
|
||||
//! # What belongs here
|
||||
//!
|
||||
//! * `hero` - Ratchet's controller. Movement on a **spherical** planet,
|
||||
//! which is what distinguishes this game: reaching for the
|
||||
//! camera and the collision code changes gravity handling
|
||||
//! across the whole world, and is the main reason the first
|
||||
//! game's movement code does not transfer.
|
||||
//! * `chargeboots`- hold and release timing, chained jumps and the dash.
|
||||
//! * `weapons` - the wrench and the weapon set, plus the weapon modification
|
||||
//! system (per-weapon bitmasks: lock-on, shock, acid, ...).
|
||||
//! * `gadgets` - the Pyrocitor, Bomb Glove, Glove of Doom and friends.
|
||||
//! * `moby_update`- the per-class update dispatch, driven by each level's
|
||||
//! `lvl.vtbl` class table. Classes that are identical across
|
||||
//! levels are shared; the rest are resolved through the
|
||||
//! overlay relocator in `gc-formats`.
|
||||
//! * `collision` - queries against the collision world.
|
||||
//! * `progression`- bolts, the Gadgetron vendor, RPG upgrades and unlocks.
|
||||
//! * `save_game` - the IFF chunk save format, and importing a Ratchet & Clank
|
||||
//! (2002) save to unlock the legacy weapons for free.
|
||||
//! * `memcard` - the 25-state memory-card finite state machine and its UI.
|
||||
//!
|
||||
//! # The float model
|
||||
//!
|
||||
//! The Emotion Engine's FPU is not IEEE-754 in every respect: it has no
|
||||
//! denormals, and rounding differs in places. Gameplay code here reproduces
|
||||
//! that model rather than using Rust's native `f32`, because the difference is
|
||||
//! visible in the movement and the camera. See `docs/plan/float-model.md`.
|
||||
//!
|
||||
//! # Timing
|
||||
//!
|
||||
//! The game is 60 Hz (this disc is NTSC). Constants are expressed per tick at
|
||||
//! that rate. PAL discs run 50 Hz and would need different timing throughout.
|
||||
Reference in New Issue
Block a user