Raster Tricks 101
Bending the beam on the Commodore 64
Raster timing turns the VIC-II into a multitool: split-screen status bars, colour gradients, sprite multiplexing, and more.
[🎥 suggested: animation showing raster bars changing colour mid-frame]
Overview
Raster tricks rely on synchronising code with the VIC-II’s electron beam. By running instructions on precise scanlines, programmers can change colours, scroll values, and sprite positions mid-frame—creating effects the hardware wasn’t “supposed” to do.
Fast facts
- Raster interrupts: writing to
$D011/$D012and enabling$D01Afires an IRQ when the beam hits a chosen line. - Split screens: update background colours or character sets during the IRQ to create HUDs and “status bars.”
- Sprite multiplexing: reposition sprites after they’ve been drawn so they reappear lower down the screen, effectively increasing the sprite count.