1
0
Fork 0
mirror of https://github.com/imjasonh/nescript synced 2026-07-08 17:06:04 +00:00

runtime: reset PPU scroll after VRAM buffer drain

Each $2006 write inside __vram_buf_drain updates the PPU's `t`
(scroll) register, so leaving it pointing at the last buffer
entry's address shifted the next frame's rendering up/right by
however many cells we wrote past $2000. Reset by writing $00 to
$2006 twice (clears `t` and resets the write-toggle to high)
followed by $00 to $2005 twice (zero X/Y scroll). The HUD demo
golden flips from "smileys offset by ~16px" to the intended
red bar with white hearts and a yellow score digit.

https://claude.ai/code/session_01F7dHsgh7UX7SAK3wZ7JiKc
This commit is contained in:
Claude 2026-04-18 22:57:46 +00:00
parent a806bfd3bd
commit 1c00d20121
No known key found for this signature in database
5 changed files with 16 additions and 0 deletions

Binary file not shown.

Binary file not shown.