Add manual adventure saves and a Start sidebar #12

Merged
rhett merged 3 commits from feature/manual-save-sidebar into main 2026-10-29 00:21:42 +00:00
Collaborator

Issues

Closes #7 — completes catch persistence: the existing catching/team behavior now retains caught ownership and remaining Poké Balls through explicit menu Save and restart.

Closes #8 — saves and restores map, position and facing with existing progress, indoor support, follower reset, legacy defaults and invalid-location fallback.

Related to #3 — the Start sidebar, input handling, pause behavior and updated controls are included. Team and Bag entries/submenus are not implemented, so that issue remains open.

Summary

  • Add a right-hand Start sidebar with Save / Close; remove the reset-position shortcut.
  • Save only through the menu. Gifts, catches, spent balls, partner changes, movement, startup, and exit do not autosave.
  • Persist the team, inventory/gift flags, rod, active partner, map, exact position, and facing in a 19-byte v6 record with CRC-16/CCITT-FALSE. Restore location before the first scene and music initialization.
  • Preserve non-writing v1–v5 loading. Invalid saved locations fall back safely while retaining valid progress; invalid live state is rejected before writes.
  • Avoid mGBA 0.10.5 EEPROM misdetection with the QST0 game code. Use byte-wide SRAM access, a startup-relocated EWRAM reader, and eight SRAM wait states.

Verification

  • ARM build and 65,536-byte ROM/header checks passed.
  • make check: 8 Python tests passed (0.022s); C checks passed for all rooms/facings, CRC/golden records, legacy migration, corruption/fallback, no-autosave/rollback, inventory, catches, fishing, partners, movement, rendering, and audio logic.
  • Reviewed options/saved/failed sidebar previews and ARM map/disassembly for the EWRAM reader and byte accesses.
  • Rhett confirmed saved versus unsaved Sprout behavior and the final v6 save/restart flow in mGBA using disposable ROM/save copies. Original saves and backups were preserved.

Compatibility and limits

  • Only explicit Save upgrades a legacy record to v6. Older builds cannot read v6; do not use them against newer saves.
  • One record only: interrupted writes/read-back failures can lose the previous save. CRC/read-back is not power-loss recovery or proof of emulator disk flush.
  • Physical cartridges and hot-removal protection remain unverified/unsupported.

Three separately reviewable commits; 792 additions / 141 deletions (651 net). Shared OpenCode/Riku configuration is not included.

## Issues Closes #7 — completes catch persistence: the existing catching/team behavior now retains caught ownership and remaining Poké Balls through explicit menu Save and restart. Closes #8 — saves and restores map, position and facing with existing progress, indoor support, follower reset, legacy defaults and invalid-location fallback. Related to #3 — the Start sidebar, input handling, pause behavior and updated controls are included. Team and Bag entries/submenus are not implemented, so that issue remains open. ## Summary - Add a right-hand Start sidebar with Save / Close; remove the reset-position shortcut. - Save only through the menu. Gifts, catches, spent balls, partner changes, movement, startup, and exit do not autosave. - Persist the team, inventory/gift flags, rod, active partner, map, exact position, and facing in a 19-byte v6 record with CRC-16/CCITT-FALSE. Restore location before the first scene and music initialization. - Preserve non-writing v1–v5 loading. Invalid saved locations fall back safely while retaining valid progress; invalid live state is rejected before writes. - Avoid mGBA 0.10.5 EEPROM misdetection with the QST0 game code. Use byte-wide SRAM access, a startup-relocated EWRAM reader, and eight SRAM wait states. ## Verification - ARM build and 65,536-byte ROM/header checks passed. - `make check`: 8 Python tests passed (0.022s); C checks passed for all rooms/facings, CRC/golden records, legacy migration, corruption/fallback, no-autosave/rollback, inventory, catches, fishing, partners, movement, rendering, and audio logic. - Reviewed options/saved/failed sidebar previews and ARM map/disassembly for the EWRAM reader and byte accesses. - Rhett confirmed saved versus unsaved Sprout behavior and the final v6 save/restart flow in mGBA using disposable ROM/save copies. Original saves and backups were preserved. ## Compatibility and limits - Only explicit Save upgrades a legacy record to v6. Older builds cannot read v6; do not use them against newer saves. - One record only: interrupted writes/read-back failures can lose the previous save. CRC/read-back is not power-loss recovery or proof of emulator disk flush. - Physical cartridges and hot-removal protection remain unverified/unsupported. Three separately reviewable commits; 792 additions / 141 deletions (651 net). Shared OpenCode/Riku configuration is not included.
LyokoAgents added 3 commits 2026-10-29 00:17:25 +00:00
rhett merged commit dd6b92300e into main 2026-10-29 00:21:42 +00:00
rhett deleted branch feature/manual-save-sidebar 2026-10-29 00:21:43 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: rory/pokemon-gba#12