Skip to main content

Module movie

Module movie 

Source
Expand description

TAS movies — a versioned, deterministic recording of a play session.

A .r26m movie is a start point (either a fresh seeded power-on, per ADR 0006, or an embedded crate::SaveState blob — a branch point is exactly this) plus a per-frame log of every host input the 2600 exposes. Replaying a movie against the ROM it was recorded against reproduces the exact same run, by the same determinism contract save-states already rely on (ADR 0004: same seed/ROM/input ⇒ bit-identical output).

Deliberately mirrors crate::save_state’s structure and header conventions (magic + format version + rom_tag, postcard-encoded, a typed decode error) rather than inventing a parallel scheme — but is its own format with its own magic and version counter, since a movie and a save-state answer different questions (a whole run vs. one instant).

MovieFrame, this module’s per-frame record, is deliberately NOT rusty2600_frontend::input::InputState — this crate cannot depend on the frontend crate (the crate graph is one-directional: frontend depends on core, never the reverse). The frontend converts InputState <-> MovieFrame when recording/replaying.

Structs§

Movie
A recorded (or in-progress) TAS movie: a start point plus a per-frame input log.
MovieFrame
One frame’s worth of host input — everything a 2600 controller/console panel can drive. Console switches are per-frame fields (not header-level constants) because Select/Reset/Color/Difficulty can all change mid-run on real hardware, unlike a fixed NES controller.

Enums§

MovieError
Everything that can go wrong loading a movie. Mirrors SaveStateError’s shape for the same failure modes.
MovieRegion
The TV broadcast region a movie was recorded under. A small, deliberate duplication of rusty2600-frontend::palette::Region (three variants, not a shared abstraction) — this crate cannot depend on the frontend crate, and region here is just a label carried for reference/playback-config purposes, not palette data, so a full shared type isn’t warranted.
MovieStart
Where a movie’s recorded input starts from.