← Back to The Vault

Vault Entry

[📷 suggested: annotated die shot or block diagram of the VIC-II]

Overview

The MOS Technology VIC-II (6567 NTSC / 6569 PAL) is the Commodore 64’s video chip. It paints the 40×25 character screen, drives eight hardware sprites, and lets programmers scroll backgrounds smoothly in hardware. Its quirks—especially badlines—defined the timing tricks that demo coders exploited for decades.

Fast facts

  • Display modes: 320×200 hi-res (two colours per cell) or 160×200 multicolour (four colours per cell).
  • Palette: 16 fixed colours with famously rich blues and browns.
  • Sprites: eight 24×21 pixel sprites, independently positioned and stretchable.
  • Timing: steals CPU cycles on certain scanlines, so code must dance around the raster beam.

[📷 suggested: capture comparing standard sprite usage versus a multiplexed sprite column]

Registers by job

  • $D000–$D00F — Sprite X/Y positions and enable flags.
  • $D010 — High X bits for sprites (values over 255).
  • $D011 — Vertical scroll, screen enable, bitmap mode toggle, raster high bit.
  • $D012 — Raster line counter, crucial for timed interrupts.
  • $D015 — Master sprite enable register.
  • $D016 — Horizontal scroll, multicolour mode toggle.
  • $D018 — Memory pointers for character set and screen RAM.
  • $D019/$D01A — Interrupt status/control; acknowledge raster IRQs here.
  • $D021–$D02E — Background and sprite colour registers.

Famous quirks

  • Badlines: every eighth raster line, VIC-II halts the CPU for 40 cycles to fetch character data. Miss your timing and animation glitches appear.
  • Sprite priority: sprites can pass in front of or behind the background with per-sprite control bits.
  • Open borders: carefully timed writes to $D011 and $D016 remove the top/bottom border for full-screen effects.
  • Sprite crunching: repositioning sprites mid-frame creates the illusion of more than eight on screen—critical for shooters.

Lesson connections

  • BASIC Block 1 touches the VIC-II when we POKE colour registers for background changes.
  • Block 3 introduces sprite basics and explains why screen memory lives at $0400.
  • Later assembly lessons revisit raster interrupts and badline avoidance for smooth scrolling and multiplexing.

Historical notes

  • Designed by Al Charpentier and the MOS team in under a year, reusing ideas from the VIC chip but adding sprites and scrolling.
  • The chip’s affordability let Commodore ship arcade-like visuals in a $595 home computer, undercutting competitors dramatically.
  • Demo groups like Crest and Censor Design still find new raster tricks four decades later.

See also