Skip to content

Experiment with pwsav container saves - #10

Open
ATEMVEGETA wants to merge 3 commits into
h4lfheart:mainfrom
ATEMVEGETA:codex/pwsav-container-experiment
Open

ATEMVEGETA wants to merge 3 commits into
h4lfheart:mainfrom
ATEMVEGETA:codex/pwsav-container-experiment

Conversation

@ATEMVEGETA

Copy link
Copy Markdown

This builds on the virtual RTC/save-state idea with a cleaner single-container save file.

Changes:

  • Adds a rom.pwsav container with EEPROM, RTC metadata, and emulator state chunks.
  • Keeps compatibility with existing .sav/.rtc/.state files by importing them when no .pwsav exists yet.
  • Saves through a temporary file and atomic replace so an interrupted catch-up does not partially advance the save.
  • Replays missed RTC midnights through the emulated firmware instead of patching the 7-day history directly.
  • Keeps --no-menu support.

Local tests:

  • Near-midnight reopen cases passed, including close at 23:59:59, close at 00:00:00, and open-through-midnight.
  • Long catch-up test passed for hundreds of missed midnights.
  • Forced-kill during loading/catch-up left rom.pwsav byte-for-byte unchanged with no leftover temp file.

This is still an experiment and meant as a starting point for the .pwsav direction you mentioned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant