The ESP32 Rainbow is powered by the impressive ESP32-S3, a dual-core 240 MHz processor with 512 KB of internal RAM. To make things even better, I’ve chosen to use one of Espressif’s modules which bundles essential support ICs and includes an extra 8 MB of PSRAM.
To put that into perspective, the ZX Spectrum—the machine we’re emulating—had just 48 KB of RAM. The PSRAM in the ESP32 module gives us about 170 times the memory of the original Spectrum! With so much extra capacity, I started wondering: what if we could use it to create something really fun? That’s when the idea for Time Travel was born.
How Time Travel Works
The concept is simple but powerful: every second or so, the firmware takes a snapshot of the emulator’s state and stores it in PSRAM. These snapshots act as save points, allowing you to step back and forth through time in a game. Lose a life? No problem! With Time Travel mode, you can rewind to just before things went wrong and try again.
Activating Time Travel is easy: press the boot button and the ESP32 Rainbow enters Time Travel mode. You can then navigate through the stored snapshots and resume gameplay from any point. It’s a real game-changer, literally!
Memory and Snapshot Storage
Of course, there are practical limits to how much history we can store. For standard 48 K Spectrum games, there’s plenty of space for snapshots. Even for 128 K games, where memory usage is higher, we can theoretically store around 60 snapshots, giving us about 60 seconds of gameplay history (if snapshots are taken once per second).
To make this even more efficient, I’ve implemented a system that checks which memory banks have changed between snapshots and only stores the differences. This approach allows us to extend the number of snapshots, potentially capturing even more history.
For now, I’m planning to strike a balance: about 30 seconds of snapshots seems ideal for most scenarios. This leaves plenty of headroom in the PSRAM for other exciting features I’m working on.
You can see it in action in this video, it works really well!
Project Progress
Fully Funded! The campaign is a success, but there’s still time to join in. The campaign runs until December 20th, so spread the word!
CE Certification. The test board has arrived in China. I’m cautiously optimistic but realistic, it might not pass on the first try. Fingers crossed!
More Firmware Updates. Time Travel is just the beginning. While the hardware often gets the spotlight, it’s the software that truly brings this project to life. Without it, we wouldn’t have anything! Stay tuned for more updates as I keep adding features.
And if you haven’t backed the project yet…. jump on board, you could be our 100th customer!