Movies, scenarios and the first routes (drive the game from its state) #19

Closed
opened 2026-10-29 10:40:55 +00:00 by Gatchan · 2 comments
Owner

Brief §8.2-8.3. Needed by #8 (RAM-executed code on menu/world/ending) and #11 (game behaviour with ports on).

  1. Movie format (versioned, documented in docs/): header with ROM CRC32 and version, power-on seed (decision D2), start point (power-on, or SRAM file hash), frame count, LakeSnes revision; then pad state per frame. ff6cli --movie <file> plays one; --record <file> writes the movie of a run (from --input or the drive server).
  2. Scenario format (from ff6rewrite, workdocs/reuse-audit.md §4): human-writable JSON, coarse timeline in seconds (wait, hold ... for), compiles to a movie.
  3. Routes (tests/routes/, Python over ff6cli --serve): a small behaviour library reading the RAM map by name (wait for a dialogue window and confirm, detect battle start/end, pick a battle command by reading the cursor, open the field menu), checkpoints with in-memory save/load and retry. First routes:
    • title_to_first_battle_win: power-on -> New Game -> opening -> first Narshe battle won -> back on the field; semantic checkpoint at the end (party HP, field map id, event flags).
    • field_menu_tour: open the main menu on the field and visit each sub-menu, then close.
      Each route records its movie (tests/movies/, no ROM data) and the hashes of build/ROM/script.
  4. A ctest per route (label slow, skipped without ROM), US and JP.
Brief §8.2-8.3. Needed by #8 (RAM-executed code on menu/world/ending) and #11 (game behaviour with ports on). 1. **Movie format** (versioned, documented in `docs/`): header with ROM CRC32 and version, power-on seed (decision D2), start point (power-on, or SRAM file hash), frame count, LakeSnes revision; then pad state per frame. `ff6cli --movie <file>` plays one; `--record <file>` writes the movie of a run (from `--input` or the drive server). 2. **Scenario format** (from ff6rewrite, `workdocs/reuse-audit.md` §4): human-writable JSON, coarse timeline in seconds (`wait`, `hold ... for`), compiles to a movie. 3. **Routes** (`tests/routes/`, Python over `ff6cli --serve`): a small behaviour library reading the RAM map by name (wait for a dialogue window and confirm, detect battle start/end, pick a battle command by reading the cursor, open the field menu), checkpoints with in-memory save/load and retry. First routes: - `title_to_first_battle_win`: power-on -> New Game -> opening -> first Narshe battle **won** -> back on the field; semantic checkpoint at the end (party HP, field map id, event flags). - `field_menu_tour`: open the main menu on the field and visit each sub-menu, then close. Each route records its movie (`tests/movies/`, no ROM data) and the hashes of build/ROM/script. 4. A ctest per route (label `slow`, skipped without ROM), US and JP.
Author
Owner

Starting: branch routes, delegated to a fresh agent, reviewed and merged by the main session.

Starting: branch `routes`, delegated to a fresh agent, reviewed and merged by the main session.
Author
Owner

Merged (PR #20). Main-session review: release ctest -LE slow 13/13; independent replay of tests/movies/title_to_first_battle_win.us_v10.ff6m with --port all=shadow: movie match (picture, WRAM, SRAM hashes) and battle/Rand 17/17 over the whole won battle; screenshots checked (Magitek beam during the battle at frame 9200, party back on the Narshe field at 10253). Agent run: 24/24 release tests incl. slow, US and JP.

Merged (PR #20). Main-session review: release `ctest -LE slow` 13/13; independent replay of `tests/movies/title_to_first_battle_win.us_v10.ff6m` with `--port all=shadow`: **movie match** (picture, WRAM, SRAM hashes) and `battle/Rand` **17/17** over the whole won battle; screenshots checked (Magitek beam during the battle at frame 9200, party back on the Narshe field at 10253). Agent run: 24/24 release tests incl. slow, US and JP.
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Gatchan/FF6Portage#19
No description provided.