Changes

Jump to: navigation, search

Emulators

186 bytes removed, 27 October
/* Rewind feature */
Only the RetroArch CPC emulator has a proper rewind feature: [https://youtu.be/YwilYlSe5LQ Demonstration of rewind in RetroArch]. To reverse the game, the user press and hold the rewind button. And at any point, releasing the button makes time goes forward again.
A very simple approach would be to make a SNA for each One 128KB snapshot per frame and limit the RAM snapshot to 128KB, which is ok for 99% of CPC software. For a allows 10-seconds long of rewind functionality, only with 64MB RAM is needed (128KB * 50 frames * 10 seconds)of memory for the rewind feature. A more efficient approach is to store method saves only the previous RAM values that are changed in RAM between two 2 frames, so that RAM can be restored when rewinding. This allows for long allowing much longer rewinds, (even of a if the CPC is equipped with a 4MB RAM expansion. Proof of it is ) while using less memory, as shown by 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.
8,326
edits