Files
Dejvino 23b3c88caa tron-room-demo: store the framebuffer in panel wire order (fixes swapped colors on HW)
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.
2026-11-16 22:49:06 +01:00
..