Files
mazegame/projects/mazegame
jurjen.ladeniusandClaude Opus 4.8 7c24daaf14 Eliminate per-move scroll flash with wrap-around (torus) scrolling
Movement previously ended each step by blanking the display, resetting the
scroll offset to 0, bulk-HMMM-shifting the whole viewport back to a canonical
origin, and pasting the new strip. That blank was visible as a flash on every
move.

Treat the 256x256 VRAM page as a torus instead. New g_BaseX/g_BaseY hold the
resting hardware scroll offset (a multiple of 64); a move animates the scroll
register from base to base +/- 64 and fills the newly exposed edge into the
VRAM cells that scroll off the opposite side, then keeps the new offset as the
resting base. No offset reset, no bulk shift, no strip paste, no blank -- so
no flash. All fill targets are base-relative; at base 0 they reduce exactly to
the previous code, and the fill timing is base-invariant.

Route all gameplay VRAM drawing (tiles, sprite, compositors, cat-sense arrow)
through the base via a new WriteVV helper that splits writes at the 256-column
wrap. The minimap overlay draws at absolute coords, so it zeroes the offset
while shown and restores the base on exit.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-01 16:02:39 +02:00
..