Repository navigation
firmware: GeoRAM preload falls back to georam.tmp or .bak when georam.ram is missing - #73
Merged
SensoriumEmbedded merged 2 commits intoOct 26, 2026
Conversation
kfox
force-pushed
the
georam-preload-fallback
branch
from
October 26, 2026 20:22
843d0ac to
3b726db
Compare
Owner
|
Thank you Kelly! Four card states on a TR+ with this merged onto main, using 512K images whose every page carries a tag so the saved
|
SensoriumEmbedded
marked this pull request as ready for review
October 26, 2026 22:05
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Builds on #72 (the GEOS 64 user guide); merge that first. Until then this PR also shows its commit.
Saving GeoRAM (
SaveRAMBanksReplacing) writesgeoram.tmp, renamesgeoram.ramtogeoram.bak, then renamesgeoram.tmptogeoram.ram. If power drops between the two renames, there is nogeoram.ramon the card, and GEOS starts with empty GeoRAM even though the new save (.tmp) and the previous one (.bak) are both there.With this change, the GeoRAM preload (
LoadRAMBanksReplacedin RAMBanks.c, next to the save) falls back whengeoram.ramis missing:georam.tmp, but only if its size is exactly the full GeoRAM image. Any other size is a torn write and is skipped.georam.bak.The GEOS 64 user guide says that the next launch after a power loss during a save loads the newest complete save. Serial logs which file was loaded. Nothing is renamed or repaired at load time: the next save already handles a missing
georam.ram. The.tmp/.bakextensions are now shared constants, so save and load use the same names. The REU preload is unchanged, because the REU saves to numbered files rather than replacing one.Verification
npm run build:trandnpm run build:tr-plus: both build.npm test: 258 pass, 0 fail.Review
One single-pass code review at medium effort found no defects. It traced every point where power could drop during the save against the new load order. It also noted one limitation: if the GeoRAM size changes between boots (it depends on free RAM), a complete
.tmpis skipped and.bakis loaded instead. That is the intended conservative choice.