tron-room-demo: free-running hardware benchmark build for the T-Deck
Split the sketch into a device-agnostic renderer core (RoomViewCore.h: RGB565 rasterizer, camera, world sim — no emulator dependencies) plus a thin emulator shell (keyboard pump + the 565-to-8888 presentation blit). Add fw/ as a self-contained PlatformIO project (own platformio.ini pointing at the shared boards/, lib/ and src/netdeck headers — per-env src_dir is not supported by PlatformIO, so NetDeck's top-level config stays untouched). fw/RoomViewHW.ino is the firmware twin: the core rasterizes directly into a TFT_eSprite's frameBuffer() (16-bit, PSRAM) and presents with the proven NetDeck startWrite/pushSprite/endWrite pattern. The loop free-runs and reports true throughput over USB serial every 2 s: fps + average render vs. push split. Verified: emulator render unchanged (smoke frame identical), pio RoomViewHW env builds clean for ESP32-S3 (346 KB flash), make netdeck dual build green.
This commit is contained in:
@@ -52,7 +52,39 @@ make clean
|
||||
```
|
||||
|
||||
The Makefile is the template's, with two changes: `APP ?= RoomView`
|
||||
and `-I ../../src/netdeck` on the include path.
|
||||
and `-I ../src/netdeck` on the include path.
|
||||
|
||||
## On the real T-Deck (ESP32-S3) — free-running benchmark
|
||||
|
||||
The renderer lives in `RoomViewCore.h`, device-agnostic and shared 1:1
|
||||
between the emulator sketch and the firmware twin
|
||||
`fw/RoomViewHW.ino`. On hardware the core draws straight into a
|
||||
`TFT_eSprite`'s `frameBuffer()` (16-bit RGB565, PSRAM — the same
|
||||
full-frame pipeline as NetDeck's M1 anti-flicker pattern) and pushes
|
||||
with `startWrite()/pushSprite(0,0)/endWrite()`.
|
||||
|
||||
The loop is deliberately **free-running** — no pacing — and prints a
|
||||
report over USB serial every 2 s:
|
||||
|
||||
```
|
||||
RoomViewHW: 120 frames in 2001ms = 60.0 fps | render 12.3 ms, push 14.8 ms
|
||||
```
|
||||
|
||||
That `render` / `push` split is the answer to "how quickly does this
|
||||
run on real hardware": render is the software rasterizer, push is the
|
||||
SPI transfer to the panel.
|
||||
|
||||
Build, flash and watch:
|
||||
|
||||
```bash
|
||||
pio run -d tron-room-demo/fw -t upload
|
||||
pio device monitor # 115200 baud
|
||||
```
|
||||
|
||||
(The demo has its own `fw/platformio.ini` pointing at the shared
|
||||
`boards/`, `lib/` and `src/netdeck` headers — NetDeck's own builds are
|
||||
untouched. Keyboard input is emulator-only; on hardware the camera
|
||||
drifts on its own orbit.)
|
||||
|
||||
## Safety hatch / CLI options
|
||||
|
||||
|
||||
Reference in New Issue
Block a user