You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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: