Changes

Emulators

No change in size, 31 January
/* Rewind feature */
A very simple approach would be to make a SNA for each frame and limit the RAM snapshot to 128KB, which is ok for 99% of CPC software. For a 10-seconds long rewind functionality, only 64MB RAM is needed (128KB * 50 frames * 10 seconds).
A more efficient approach is to store only the values that are changed in RAM between two frames, so that RAM can be restored when rewinding. This allows for long-rewinds, even of a CPC equipped with a 4MB RAM expansion. Proof of it is the GBA emulator [https://youtu.be/Sfc_1NKbiKg SkyEmu demonstrating super long rewind] while needing very few RAM.
For debugging, going back to the previous instruction is easily implemented. The emulator has to store the time when the previous instruction was executed so that he can go back to that instruction. In the same way, emulators can provide access to the previous HBL, IRQ, VBL, etc.
4,842
edits