aboutsummaryrefslogtreecommitdiffstats
path: root/src/kdata.asm
diff options
context:
space:
mode:
authoruser <user@clank>2026-07-18 21:32:16 +0200
committeruser <user@clank>2026-07-18 21:32:16 +0200
commit74825c20ada40a3bf1fffb4a35f3063b7844aea6 (patch)
tree83986703f68091347ece6baaff8aa39abb5f2da5 /src/kdata.asm
parentdocs: drop the link-drop investigation writeup (diff)
downloadgbos-74825c20ada40a3bf1fffb4a35f3063b7844aea6.tar.gz
gbos-74825c20ada40a3bf1fffb4a35f3063b7844aea6.tar.xz
gbos-74825c20ada40a3bf1fffb4a35f3063b7844aea6.zip
term: cache tile attrs in COL_BUF's spare stride bytes (3.5x scroll)
term_write_tilemap's attribute pass ran color_setup - the full Fano palette walk - for all 360 tiles on every scroll. render_tile already computes the attr when a tile changes, so store it (COL_BUF + slot*64 + ACACHE + tcol; the stride's 24 spare bytes were free) and the attr pass becomes a table read. update_cursor_attr reads the cache too. term_init now redraws before writing the tilemap so the cache is warm. Measured entry-to-return with the emulator cycle counter, ANSI test screen content: term_write_tilemap 723k -> 114k T-cycles (6.3x), term_scroll 857k -> 248k (3.5x) - a scroll drops from ~12 frames of guest CPU to ~3.5.
Diffstat (limited to 'src/kdata.asm')
0 files changed, 0 insertions, 0 deletions