-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Save states #2
Comments
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Save states are going to be tricky for a few reasons. First, there needs to be a way to stop all the tasks and collect info, and then to get everything loaded up again. There's probably a natural point for this when the CPU takes an NMI: the PPU won't be busy, and the CPU will just be fetching an instruction. Second, state is scattered around in the various registers, memories, and caches and would need to be tracked down to store and then reconstitute on reload. In particular mapper state is sometimes only in the TLB, though I've tried to make efforts in later mapper implementations to save that for reload. This is all going to get out of sync very easily as code changes.
A simpler approach, for memory-resident saves, is to have an exception handler copy all RDRAM (the stock 4MB), DMEM, and registers into the expansion memory, which is currently unused. It ought to even be possible to fit this in SRAM; a lot of buffers and the ROM don't need to be saved. It'd be unstable across versions, I'd probably include the N64 ROM checksum to check compatibility.
The text was updated successfully, but these errors were encountered: