Skip to content

Avoid saving to SRAM when loading preset or savestate - #276

Merged
idlechild merged 3 commits into
tewtal:next-updatefrom
idlechild:next-update
Aug 13, 2026
Merged

Avoid saving to SRAM when loading preset or savestate#276
idlechild merged 3 commits into
tewtal:next-updatefrom
idlechild:next-update

Conversation

@idlechild

Copy link
Copy Markdown
Collaborator

Also fix a couple issues in the next-update branch.

Even though tile tables uses crossbank, the starting value of $E68800 was chosen so each tile table fits within a bank. Starting at $E68000 was causing some issues (try jumping to LN or bubble mountain preset). Also made freespace report the $800 bytes available at the start of bank $E6 (which I had forgotten existed, so nice to know about).

@InsaneFirebat

Copy link
Copy Markdown
Collaborator

If the goal is to cut down on SRAM writes overall, I would axe !sram_seed_x/y entirely. It was a weird idea to keep the seed rolling forever since it only cycles when the menu is open, but can be used without the menu ever being opened.

We should add a comment on the tilegraphics org. I figured it was just a remnant of things moving over time.

@idlechild

Copy link
Copy Markdown
Collaborator Author

Meh, it's fine to leave that.

This change came from a review I did of SRAM usage, where I was expecting to find we write to SRAM a lot but we actually weren't. The write-on-load was the only SRAM write I thought was dumb and could be improved.

We read from SRAM a lot but it's not a problem to do that.

@idlechild
idlechild merged commit 75d4bd7 into tewtal:next-update Aug 13, 2026
1 check passed
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.

2 participants