Movies, scenarios and the first routes #20
Loading…
Reference in a new issue
No description provided.
Delete branch "routes"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Movies, scenarios and the first two routes (brief §8.2-8.3). Fixes #19.
What
docs/movies.md): text, header with ROM CRC32, version, power-on seed (D2), start point (power_onorsram <crc32>), emulator revision (ff6_debug_emulator_revision,HW_EMULATOR_REVISION=lakesnes-048a0d7+4), frame count, end hashes (picture, WRAM, SRAM, FNV-1a 64); then run-length pad states. No ROM data.--moviereplays and checks the end hashes (exit 1 on mismatch, warns on another emulator revision; with--serve, replays first then serves),--recordwrites the movie of a fixed run or of a drive-server session. Server: per-frame pad history,loadrestores the history saved with the slot (abandoned branches are dropped from the movie),poketaints the history (movie refused until an earlier slot is loaded), new commandsmovie <path>andhash.tools/scenario.pyplays ff6rewrite-style JSON (wait,hold ... for,until <var> <op> <value>with optional tapping,expectby RAM-map name,validate_portsin shadow withnot-runreporting) through the drive server and compiles it to a movie. Exampletests/scenarios/title_new_game.json. Drive-server clienttools/ff6drive.py.nmi_handler(bank = running mode),dialog_keypress_state,menu_cursor_index,menu_next_state,battle_menu_input,battle_menu_char,battle_cmd_cursor,battle_commands,battle_hp. The btlgfx menu vars sit $30 lower in JP (STATE_BY_VERSION).tests/routes/):behaviours.py(mode, confirm dialog, battle policy that moves the command cursor to the preferred command by readingbattle_commands/battle_cmd_cursor, sub-list and target confirmation, battle end detection, open the field menu, menu cursor moves, checkpoints with reload and reseeded jitter),run_route.py(record / check / replay; movie comments carry route, scripts SHA-256, ff6cli SHA-256, ROM SHA-256 and the semantic checkpoint).title_to_first_battle_win: power-on -> New Game -> opening -> first Narshe battle won -> settled on the field.field_menu_tour: starts from the first route's movie, opens the main menu, enters Item, Skills, Equip, Relic, Status, Config (first character where asked), checks the menu state of each screen, tries Save (refused: no save point), closes the menu.rom.movie.*(record/replay/session/poke, fast),rom.scenario.title_new_game(fast),route.<route>.<ver>(run + compare with the committed movie: frames, end hashes, checkpoint) andmovie.<route>.<ver>(replay), labelslow, skipped without ROM.Python3::Interpreterit was run under wine in mingw builds (tools.gen_state*failed there).Results
Checkpoints (identical US and JP): map 0x13 (Narshe), party HP {Terra 63, Wedge 68, Vicks 70}, event bits
...4100020000000800...010001C0; menu states item 0x08, skills 0x0A, equip 0x36, relic 0x59, status 0x0C, config 0x0E, save 0x05. Final screenshots inspected (party in Narshe after the battle; main menu; equip screen).Movie end hashes: title_to_first_battle_win US picture DA60C0464121BD2D wram 68B2D0337F251BFB, JP wram 1A7824E724F82571; field_menu_tour US picture 27FCC519A7906E3D wram 14FA1122B7FE966E, JP wram 4215481F7E8DA00D. Replays match on Linux (release) and on the mingw build under wine.
Validation
ctestrelease, all 24 tests (fast + slow), -j2: 100 % passed, 865 s. Routes ~108-122 s each, movie replays the same; rom.ports 326/329 s; rom.movie 18 s; rom.scenario 7 s.ctestdebug-LE slow: 13/13 passed (rom.movie 60 s, rom.scenario 73 s).tools/ram_map_check.py: 196 vars, 0 errors, 0 warnings, 159 JP listing checks;gen_state.py --checkclean.Notes
HW_EMULATOR_REVISION, then the movies are regenerated withrun_route.py --record.🤖 Generated with Claude Code