← Back to The Vault

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.

C64 Raster interruptsTimingDemo scene 1982–2024

[🎥 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/$D012 and enabling $D01A fires 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.

See also