The task involves screen memory, colors, sprites, character sets, bitmap graphics, raster interrupts, scrolling, border/background, or VIC-II banking.
VIC-II base: $D000 / 53248.
| Decimal | Hex | Purpose |
|---|---|---|
| 53248-53263 | $D000-$D00F |
Sprite X/Y coordinates |
| 53264 | $D010 |
High bits for sprite X positions |
| 53265 | $D011 |
Control register 1; vertical scroll, screen on, bitmap, raster bit 8 |
| 53266 | $D012 |
Raster line low byte |
| 53267 | $D013 |
Light pen X |
| 53268 | $D014 |
Light pen Y |
| 53269 | $D015 |
Sprite enable bits |
| 53270 | $D016 |
Control register 2; horizontal scroll, multicolor |
| 53271 | $D017 |
Sprite Y expansion |
| 53272 | $D018 |
Memory control: screen and character/bitmap pointers |
| 53273 | $D019 |
Interrupt flags |
| 53274 | $D01A |
Interrupt enable |
| 53275 | $D01B |
Sprite/background priority |
| 53276 | $D01C |
Sprite multicolor enable |
| 53277 | $D01D |
Sprite X expansion |
| 53278 | $D01E |
Sprite-sprite collision |
| 53279 | $D01F |
Sprite-background collision |
| 53280 | $D020 |
Border color |
| 53281 | $D021 |
Background color 0 |
| 53282-53284 | $D022-$D024 |
Extra background/multicolor registers |
| 53285-53286 | $D025-$D026 |
Sprite multicolor registers |
| 53287-53294 | $D027-$D02E |
Sprite individual colors |
Default screen RAM: $0400 / 1024.
Default color RAM: $D800 / 55296.
Screen is 40 columns x 25 rows = 1000 character cells.
Cell address:
screen = 1024 + row * 40 + column
color = 55296 + row * 40 + column
$07F8-$07FF / 2040-2047.$D015 bits.Example enable sprite 0 in BASIC:
POKE 53269,PEEK(53269) OR 1
The VIC-II sees one 16K bank at a time. CIA #2 port A controls the video bank. All active screen RAM, character data, bitmap data, and sprite data must be visible inside the selected VIC bank.
To copy character ROM from CPU-visible $D000-$DFFF, you must bank character ROM in and I/O out. Since I/O disappears during that window, disable interrupts briefly and restore banking immediately.
$D012; bit 8 is in $D011.$D01A bit 0.$D019.$D018 layout.Powered by TurnKey Linux.