MiataDrive: flicker-free framebuffer rendering + 80 MHz SPI
Render every frame into a full-frame TFT_eSprite (16 bpp, PSRAM) and push it to the panel in one continuous SPI stream — direct scattered draw calls raced the panel scan-out and flickered. renderRoad split into projection and draw passes: the sky now fills down to the topmost road row (fixes the stale band at the horizon over crests) and the nearest segment is extended to the screen bottom (fixes the wobbling stale strip). fillTrap uses incremental edge interpolation. SPI raised to 80 MHz via build flag (Setup210 define guarded) so the frame push fits the 33 ms budget.
This commit is contained in:
@@ -57,6 +57,11 @@ graphics.
|
||||
corners with their turning sprite, mirrored on right-hand bends.
|
||||
- **Scoring / laps**: 3 laps, 75 s + 45 s per lap, −300 for a crash.
|
||||
- **Sound**: engine + event blips via `sound_engine.*` (I2S on device).
|
||||
- **Rendering**: on hardware the whole frame is composed in a PSRAM-backed
|
||||
`TFT_eSprite` framebuffer and pushed to the panel in one continuous SPI
|
||||
stream at 80 MHz — no half-drawn frames (flicker) and a stable ~30 fps.
|
||||
If your panel shows artifacts at 80 MHz, drop `SPI_FREQUENCY` to 40000000
|
||||
in `platformio.ini`.
|
||||
|
||||
All graphics — including the title screen, which renders the start line
|
||||
under the arch with your selected car parked on the road — come from the
|
||||
|
||||
Reference in New Issue
Block a user