sram: Create module for helper functions to access cartridge SRAM save memory #813
+170
−1
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.
I put together a simple module to help access (read/write) SRAM saves to improve SRAM "support" from "it's easy to do but figure it out yourself" to "just call these".
Untested so far; please help me test before merging.
Side note: I think it would be nice to move PI register definitions from dma.h into its own pi.h header and properly define all the registers, including DOM1/DOM2 setup registers. Ideally, we would also use the "access via volatile struct" pattern over preprocessor definitions but that would require a lot of refactoring all over the place so perhaps that ship has sailed. Let's discuss here or on Discord.