For stepping backwards one frame at a time, consider an emulator that makes an automatic save state every second, for the last two minutes (120 states), and keeps track of controller input for every frame of those two minutes.
- At any point, you can immediately rewind to any of those previous seconds and then play back everything to present.
- To jump to a particular frame in those two minutes, restore the state for that second, then replay 0 to 59 frames.
- To step backwards one frame, jump to the previous frame using the above technique. This will get slower the closer you get to the next second, as it will involve up to 59 emulated frames for every step.
- To quickly step backwards one frame a time for several frames, restore the most recent save state, then emulate up to the current time and SAVE THE IMAGES for each frame into a buffer. So if you were currently at frame 50 since the last save state and stepped back one frame, you'd build up 49 images for the previous frames. Then stepping back would be immediate, just display the next earlier frame from the buffer. To reduce delay for the first backwards frame step, you could perhaps always save the last 60 graphic images or something.
- To eliminate the delay for the image buffer technique when the buffer is exhausted, you can be refilling the buffer for the previous second while the user is stepping through the next. Say the user starts at the 60th frame in the buffer, then steps backwards one frame. Display the 59th and restore the save state for the previous second and generate the first frame in place of the 60th. Then when the user steps back to the 58th frame, run the emulator forwards one frame and put that where the 59th was. Once the user steps back to the first frame in the buffer, you've got it full with the previous 60 frames, no delay.
This can be extended to allow rewinding back to the beginning of the movie by having a second level of save states every 30 seconds or so. Then when rewinding before the two-minute set of save states, you'd go back to the closest 30-second state and run until the desired point, making the one-second save states along the way.
The main two issues are the speed of the emulator and how big save states are. For example, if an emulator can run at 2x realtime, then the first backwards step could take half a second worst-case (any after that would be instant). This could be reduced by saving states more often; for example saving states every half second would reduce this to 1/4 second.
QuickNES (for Windows) implements this technique, though the emulator is insanely fast (about 21x real-time on a 400 MHz machine).