The Big Screen. The 3.5" has been on the shelf for most of a year — it booted, it crashed every half minute, and nothing about it was ready to hand to anybody. It is in the flasher from this release, marked BETA, and it says so on its own boot screen every time it starts.
It stopped crashing, and the reason was not ours. Random panics on that board and no other, for weeks, blamed on heap corruption in its two-pass drawing. The black box had forty-eight of them recorded with their program counters, and a live backtrace named it: TFT_eSprite::setWindow() clamps the window it is handed to width()/height(), and those report the VIEWPORT, not the buffer. The 3.5" lays a 480x320 viewport over a 480x160 one, so a write could land 76 KB past the end of the allocation. Every other board has a viewport that IS its buffer, so it has been correct there for years — only a band buffer pulls the two numbers apart.
Every screen is buffered now. That board has only ever buffered five of them; everything else drew straight at the glass, one rectangle at a time, which is what the flicker was — and on the update screen, a diagonal tear, because the panel was scanning rows out while they were still being drawn into. It also meant a menu, which does not change from one frame to the next, was re-sent to the panel in full forever. SETTINGS went from repainting the screen every frame to sending nothing at all: zero rows, 1.7 ms, and one page idles at 0.4.
And it uses the screen it has. The layout was always responsive, but the text inside was not, and neither were the numbers measured by hand against a render years ago — so the boxes grew and the letters did not. That is worse than it sounds, because the 3.5" is 165 pixels to the inch against the 2.8"'s 143: the same glyph is physically smaller on the bigger screen. Headings, buttons, menu rows and the alert card are sized from the panel now, and the menu rows got taller with their letters, which is the part your thumb notices.
The 2.8" does not move a pixel. Two of those fixes would have reached it — the mascot's size ceiling and the phone handset's position — so both are keyed on the panel's long side, which follows the 3.5" through either rotation and which no smaller panel meets in either. The 3.5" takes the worse deal where there is one. This is checked rather than promised: the emulator renders any panel size now, and all sixteen screens are byte-identical at 320x240 and at 240x320, before and after.
Two frame-rate fixes came with it. The mascot's size ceiling was dead code — the SIZE setting defaults to 85%, and that path recomputed the scale with a floor and no roof — which is also why a SquachMesh visit drew two figures at the same full size standing on top of each other. And on the 3.5" the second of its two drawing passes now declines whole blocks it cannot reach, instead of being clipped one primitive at a time: 26 to 31 frames a second on the main screen, and 19 ms of drawing off the aquarium.
The actually-useful part
Added
- The 3.5" (ST7796) is in the flasher as a BETA, at 80 MHz only — there is no slower build for it, so the overclock box is disabled for that board.
- Its boot screen and DIAGNOSTICS both say BETA.
- The emulator renders any panel size (
--size WxH), withrender_all.shandcompare_shots.shbeside it to diff every screen between two sizes.
Changed
- Every screen on the 3.5" draws into its frame buffer instead of onto the panel; menus that are not changing send no rows at all.
- Headings, buttons, menu rows, the pinned BACK strip, the message composer and the alert card are sized from the panel on that board; its menu rows are taller to match.
- The main screen's second drawing pass skips blocks outside its band: 26 to 31 fps, and nine per-row art loops clamp to the band they are drawing.
- The
[frame]serial line reports the whole frame's rows, not one band's.
Fixed
- Random
LoadStoreErrorpanics on the 3.5", caused by a window write clamped to the viewport instead of the buffer. - The UPDATE screen's flicker and diagonal tearing on that board.
- The DESK clock's animated backdrops drawing the top half of the screen twice.
- A SquachMesh visit drawing two full-size mascots on top of each other.
- The phone handset running off the right edge in portrait.
- The alert screen taking the two-column landscape layout in portrait.
