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.
82 lines
2.0 KiB
TOML
82 lines
2.0 KiB
TOML
[workspace]
|
|
resolver = "2"
|
|
members = [
|
|
"crates/gc-formats",
|
|
"crates/gc-extract",
|
|
"crates/gc-engine",
|
|
"crates/gc-game",
|
|
"crates/gc-video",
|
|
]
|
|
|
|
[workspace.package]
|
|
version = "0.1.0"
|
|
edition = "2021"
|
|
rust-version = "1.85"
|
|
license = "MIT OR ISC"
|
|
publish = false
|
|
|
|
# The PS2's Emotion Engine is a MIPS R5900 with a 128-bit vector unit and a
|
|
# float model that differs from x86 in ways that matter for this game (no
|
|
# denormals, specific rounding). Every ported routine must reproduce that model
|
|
# rather than Rust's native f32, or the game will subtly not feel right.
|
|
# See docs/plan/float-model.md.
|
|
[workspace.dependencies]
|
|
gc-formats = { path = "crates/gc-formats" }
|
|
gc-extract = { path = "crates/gc-extract" }
|
|
gc-game = { path = "crates/gc-game" }
|
|
gc-video = { path = "crates/gc-video" }
|
|
|
|
anyhow = "1"
|
|
thiserror = "2"
|
|
bytemuck = { version = "1", features = ["derive", "min_const_generics"] }
|
|
sha1 = "0.10"
|
|
|
|
# Bevy 0.19.1 is the engine ReRAC uses; matching it keeps the GS/VU work portable.
|
|
#
|
|
# default-features = false avoids the cpal audio backend, which needs system
|
|
# ALSA development headers on Fedora (alsa-lib-devel). Audio decode lives in
|
|
# gc-video and is the last phase of the port, so the host audio backend is not
|
|
# needed to build. Re-enable "audio" and install alsa-lib-devel when it is.
|
|
bevy = { version = "0.19.1", default-features = false, features = [
|
|
"std",
|
|
"bevy_asset",
|
|
"bevy_color",
|
|
"bevy_core_pipeline",
|
|
"bevy_gizmos",
|
|
"bevy_log",
|
|
"bevy_mesh",
|
|
"bevy_pbr",
|
|
"bevy_render",
|
|
"bevy_shader",
|
|
"bevy_sprite",
|
|
"bevy_state",
|
|
"bevy_text",
|
|
"bevy_ui",
|
|
"bevy_window",
|
|
"bevy_winit",
|
|
"bevy_animation",
|
|
"bevy_gltf",
|
|
"png",
|
|
"ktx2",
|
|
"zlib",
|
|
"zstd_rust",
|
|
"tonemapping_luts",
|
|
"multi_threaded",
|
|
"x11",
|
|
"wayland",
|
|
"keyboard",
|
|
"mouse",
|
|
"gamepad",
|
|
] }
|
|
|
|
[profile.dev]
|
|
# Iterate fast on our own code; do not rebuild dependencies unoptimised.
|
|
opt-level = 1
|
|
|
|
[profile.dev.package."*"]
|
|
opt-level = 3
|
|
debug = false
|
|
|
|
[profile.release]
|
|
lto = "thin"
|
|
codegen-units = 1 |