The ST7789 receives pixel bytes high-byte-first, and TFT_eSprite's pushSprite sends the sprite buffer raw — which is why the sprite's own primitives store colors byte-swapped (drawPixel: color = color>>8 | color<<8). RoomViewCore wrote native little-endian values instead, so every pixel reached the panel byte-swapped: BG 0x0002 showed as green (0x0200), the fogged floor 0x0882 as pink (0x8208) — exactly the symptoms reported from hardware. The core now stores pixels in panel wire order (toWire byteswap on store, one 16-bit rotate per pixel); the emulator blit unswaps before the 565-to-8888 expansion, so its output is pixel-identical. Also add -O2 to the firmware env: PlatformIO's default -Os optimizes for size and was likely a large part of the 13 fps report.
36 lines
1.1 KiB
INI
36 lines
1.1 KiB
INI
; 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
|
|
-O2
|
|
-I../../src/netdeck
|
|
-I..
|