News for hackers. Stuff that matters.
Re:Galaga, Pac-Man, Donkey Kong Emulator for ESP32 by unwind on Friday January 27, 2023 @03:07AM (#34543783)
Very impressive!

It's weird for projects like this, that you become constrained by the modern hardware being "too good". The display, a fairly generic 320x240 LCD driven by the ILI9341 controller, is 16 or 18 bits per pixel. That gives 65,536/262,144 colors, and I guess Galaga would be fine with what, 16? 64?

The display is interfaced over serial SPI at maximum clock of 40 MHz, which means sending one screeenful of pixels takes (320x240x16)/40e6 = 0.03072 seconnds. That is where the 30 Hz update rate comes from.

I had to check the datasheet [1] but of course the display controller does not support any fewer colors, so you can't speed it up by scaling down. Too bad. :(

Edit: add link, remove half-finished thought.

[1]: https://cdn-shop.adafruit.com/datasheets/ILI9341.pdf

Re:Galaga, Pac-Man, Donkey Kong Emulator for ESP32 by CliffyA on Friday January 27, 2023 @06:22AM (#34544863)
The display also supports partial updates, so you can just upload a few sub rectangles of what has changed onscreen. AKA "dirty rectangles". You can get over 60fps depending on how much is changing, and since these games are on a static background, that's not much.