To reverse the game, users 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 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).
But way more efficient methods exist, like only storing the differences in RAM between 2 frames. That makes it possible to do long-rewinds of even 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.