Skip to main content

Module legacy_movie

Module legacy_movie 

Source
Expand description

v1.7.0 “Forge” Workstream G4 — legacy NES TAS movie import.

The historical pre-.fm2 / pre-.bk2 TASVideos corpus lives in a handful of small binary containers. This module adds importers for the NES-relevant ones so RustyNES can “play any NES TAS”:

  • .fcm — FCEUX / FCE Ultra legacy binary movie (FCM\x1A, version 2). A sparse toggle/delta input stream, not a per-frame bitmask dump.
  • .fmvFamtasia movie (FMV\x1A, fixed 144-byte header). A full per-frame byte-per-controller dump with a Famtasia-specific bit order.
  • .vmvVirtuaNES movie (VirtuaNES MV). A full per-frame dump; the layout is documentation-derived (TASVideos OtherEmulators/VMV), since BizHawk never shipped a .vmv importer.

Each parser mirrors the existing crate::movie_interop (.fm2) and crate::bk2_interop (.bk2) design: a pure byte→Movie transform that never panics on malformed input, returns StartPoint::PowerOn only, and reuses the canonical movie-import power-on alignment the .fm2 path established (a deterministic cold boot via Movie::seek_to_start), so an imported movie replays bit-for-bit.

§Mednafen .mc2 — deliberately rejected (it is a PC Engine format)

The v1.7.0 plan lists .mc2 under “Mednafen NES”, but BizHawk’s Mc2Import.cs is [ImporterFor("PCEjin/Mednafen", ".mc2")] and targets the PC Engine (PCE buttons B1/B2/Run/Select, platform PCE/PCECD) — there is no NES gamepad data in it. Rather than mis-map PCE buttons onto NES, the .mc2 path is a clean, documented rejection (import_mc2).

§The native button bit order

RustyNES’s Buttons bit layout is A=0, B=1, Select=2, Start=3, Up=4, Down=5, Left=6, Right=7 — the canonical NES order. The .fcm button index order and the .vmv bit order are identical to it, so those map straight through Buttons::from_bits_truncate. Famtasia .fmv uses a different bit order (Right=0, Left=1, Up=2, Down=3, B=4, A=5, Select=6, Start=7) and is permuted by fmv_byte_to_buttons.

This module is no_std-clean: it uses only core + alloc.

Structs§

LegacyMeta
Metadata recovered from a legacy movie that has no home on Movie.

Enums§

LegacyMovieError
Errors produced by the legacy movie importers.

Functions§

fmv_byte_to_buttons
Permute a Famtasia .fmv controller byte into RustyNES Buttons.
import_fcm
Import an FCEUX / FCE Ultra legacy .fcm movie.
import_fmv
Import a Famtasia .fmv movie.
import_mc2
“Import” a Mednafen .mc2 movie — always an error.
import_vmv
Import a VirtuaNES .vmv movie.