Late-game and vehicle start points for the RAM-execution inventory (The End, ending, vehicles) #22

Open
opened 2026-10-29 15:37:20 +00:00 by Gatchan · 1 comment
Owner

Follow-up of #8. The RAM-execution trace (ff6cli --trace-ram, docs/ram_trace.md, branch ram-exec) now covers power-on, title, opening, field, battle, menu (field menu, name entry) and the first world map, US and JP. What the current route library cannot reach:

Not reached Trampoline writer (source) Handlers expected (US)
The End cutscene/the_end.asm TheEndNMI $E5:FCDF, TheEndIRQ $E5:FE15 (never enabled)
Ending cutscenes (world part, ending airship) world/init.asm EndingAirshipSceneNMI $EE:AB4D
World of Ruin cutscene (cutscene program part not yet executed) cutscene/title.asm CutsceneNMI (RAM)
Airship, chocobo, Vector approach, Magitek train world/init.asm, world/cutscene.asm VehicleNMI $EE:A509, AirshipIRQ $EE:A6B7, ChocoIRQ $EE:A6CF, VectorApproachIRQ $EE:A707, TrainNMI/TrainIRQ $EE:A94D/$EE:AA35
Battle exit $6B (rtl) written to the trampoline with interrupts off btlgfx/main.asm must never execute

Chocobo, the Vector approach and the Magitek train are mid-game; The End and the ending need a late-game start point. Movies already support start sram <crc32> (--save), so the start point can be an SRAM file. Proposal, to decide:

  1. Route-produced SRAM (faithful, slow to build). A route may end by saving at a save point; run_route.py writes the .srm into the build tree (never committed, it is produced from the user's ROM), and later routes start from sram:<route> the way after:<route> chains movies today. Chaining to Kefka's tower is many hours of emulated frames; acceptable for a nightly, not for ctest.
  2. SRAM synthesiser (fast, needs the save layout). tools/make_save.py <description.toml> writes one save slot from a readable description (party, levels, equipment, espers, event bits, map and position, vehicle) with the game's checksum, using the RAM map's SRAM/$1600-$1FFF names. No ROM data involved. Start points: Kefka's tower last save point (The End, ending), Blackjack in the air (airship IRQs), a chocobo stable, the Vector approach, the Phantom Train. The game validates the slot like any save, so a wrong field shows up as a refused or broken load.
  3. Both: (2) for coverage now, (1) later to confirm (2)'s saves are reachable states.

Then rerun the trace on those routes and fill the remaining rows of workdocs/ram-executed-code.md; any RAM-executed address outside the trampolines and the cutscene program image is a finding.

Follow-up of #8. The RAM-execution trace (`ff6cli --trace-ram`, `docs/ram_trace.md`, branch `ram-exec`) now covers power-on, title, opening, field, battle, menu (field menu, name entry) and the first world map, US and JP. What the current route library cannot reach: | Not reached | Trampoline writer (source) | Handlers expected (US) | |---|---|---| | The End | `cutscene/the_end.asm` | `TheEndNMI` `$E5:FCDF`, `TheEndIRQ` `$E5:FE15` (never enabled) | | Ending cutscenes (world part, ending airship) | `world/init.asm` | `EndingAirshipSceneNMI` `$EE:AB4D` | | World of Ruin cutscene (cutscene program part not yet executed) | `cutscene/title.asm` | `CutsceneNMI` (RAM) | | Airship, chocobo, Vector approach, Magitek train | `world/init.asm`, `world/cutscene.asm` | `VehicleNMI` `$EE:A509`, `AirshipIRQ` `$EE:A6B7`, `ChocoIRQ` `$EE:A6CF`, `VectorApproachIRQ` `$EE:A707`, `TrainNMI`/`TrainIRQ` `$EE:A94D/$EE:AA35` | | Battle exit `$6B` (`rtl`) written to the trampoline with interrupts off | `btlgfx/main.asm` | must never execute | Chocobo, the Vector approach and the Magitek train are mid-game; The End and the ending need a late-game start point. Movies already support `start sram <crc32>` (`--save`), so the start point can be an SRAM file. Proposal, to decide: 1. **Route-produced SRAM (faithful, slow to build).** A route may end by saving at a save point; `run_route.py` writes the `.srm` into the build tree (never committed, it is produced from the user's ROM), and later routes start from `sram:<route>` the way `after:<route>` chains movies today. Chaining to Kefka's tower is many hours of emulated frames; acceptable for a nightly, not for ctest. 2. **SRAM synthesiser (fast, needs the save layout).** `tools/make_save.py <description.toml>` writes one save slot from a readable description (party, levels, equipment, espers, event bits, map and position, vehicle) with the game's checksum, using the RAM map's SRAM/`$1600-$1FFF` names. No ROM data involved. Start points: Kefka's tower last save point (The End, ending), Blackjack in the air (airship IRQs), a chocobo stable, the Vector approach, the Phantom Train. The game validates the slot like any save, so a wrong field shows up as a refused or broken load. 3. Both: (2) for coverage now, (1) later to confirm (2)'s saves are reachable states. Then rerun the trace on those routes and fill the remaining rows of `workdocs/ram-executed-code.md`; any RAM-executed address outside the trampolines and the cutscene program image is a finding.
Author
Owner

User decision: both, option 1 first — routes advance through the game in order and leave real SRAM saves written by the game (world map saves allowed anywhere, save points), each next route starts from the previous SRAM file. The save builder (option 2) later, for what stays out of reach. Implementation starts with #26.

User decision: **both, option 1 first** — routes advance through the game in order and leave real SRAM saves written by the game (world map saves allowed anywhere, save points), each next route starts from the previous SRAM file. The save builder (option 2) later, for what stays out of reach. Implementation starts with #26.
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#22
No description provided.