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:
Dejvino
2026-11-16 22:41:20 +01:00
parent 4ed0bc4a51
commit 5310079870
5 changed files with 709 additions and 485 deletions
+34
View File
@@ -0,0 +1,34 @@
; PlatformIO project for the tron-room-demo hardware benchmark.
;
; Standalone on purpose (the repo's top-level platformio.ini keeps
; src_dir = src/netdeck for NetDeck): this points back at the shared
; boards/, lib/ and src/netdeck/ headers, so the firmware twin of the
; emulator sketch builds without touching anything NetDeck depends on.
;
; pio run -d tron-room-demo/fw -t upload # flash the T-Deck
; pio device monitor # fps report every 2 s
;
; Free-running benchmark: no frame pacing. The serial line
; RoomViewHW: N frames in M ms = X fps | render Y ms, push Z ms
; is the true throughput of the shared RoomViewCore renderer + SPI push.
[platformio]
default_envs = RoomViewHW
src_dir = .
boards_dir = ../../boards
lib_dir = ../../lib
[env:RoomViewHW]
platform = espressif32@6.3.0
board = T-Deck
framework = arduino
upload_speed = 921600
monitor_speed = 115200
build_flags =
-DBOARD_HAS_PSRAM=1
-DCORE_DEBUG_LEVEL=1
-DARDUINO_USB_CDC_ON_BOOT=1
-DDISABLE_ALL_LIBRARY_WARNINGS
-DSPI_FREQUENCY=80000000
-I../../src/netdeck
-I..