Changes
/* Rewind feature */
Importantly, this doesn't use a lot of CPU or RAM. It just means creating a save state every second and keeping a log of all inputs.
Users can stop rewinding whenever they want. They just have to press and hold a rewind button to play the game backward at 1x speed. Hold the buttonWhen released, and time goes backward; release it, and time goes would go forward again.
To avoid confusion, the image would get a sepia filter when rewinding, showing that time is moving backward.