Commodore VIC-20#
Open 8bitworkshop IDE
Click here to program the VIC-20 in the 8bitworkshop IDE now!
VIC-20 Specifications#
- Lifespan
1980-1985
- Media
Cassette tape, cartridge, floppy disk (optional)
- CPU
MOS Technology 6502 @ 1.02 MHz (NTSC)
- Memory
5K RAM (3.5K usable), 20K ROM (BASIC + KERNAL + character generator)
- Display
22x23 text, 176x184 bitmap (with color cells), 16 colors
- Sound
4-channel sound (3 square wave + 1 noise) via the VIC-I chip
- Input
Keyboard, joystick (via adapter), paddles
- Best-selling game
No single pack-in title; popular cartridges included Jupiter Lander and Gorf

History#
The VIC-20 was introduced by Commodore in 1980 as a low-cost home computer. It was designed by a team that included Al Charpentier, who designed the MOS 6560/6561 Video Interface Chip (VIC-I), hence the name, alongside engineers such as Bob Yannes (who later co-founded Ensoniq).
At a retail price of $299, the VIC-20 was the first computer to sell one million units. It was positioned as a “friendly” introductory computer, sold in department stores rather than just computer shops. Its simple plug-and-play nature and game cartridges made it popular with families.
The VIC-20 was succeeded by the Commodore 64 in 1982, which used the same 6502 CPU and the VIC-II chip (a significantly more powerful video chip).
Hardware#
The VIC-20 is based on the MOS 6502 CPU running at 1.02 MHz (NTSC) or 1.108 MHz (PAL). The system is built around the MOS 6560/6561 VIC-I video interface chip:
CPU : MOS 6502 @ 1.02 MHz (NTSC) / 1.108 MHz (PAL)
Video : MOS 6560/6561 VIC-I
Sound : VIC-I provides 4 channels (3 square + 1 noise)
RAM : 5 KB (3.5 KB available to BASIC)
ROM : 20 KB (BASIC 2.0, KERNAL, character generator)
Video#
The VIC-I chip generates the display, which can operate in several modes:
Text mode - 22 columns x 23 rows of 8x8 characters
Multi-color bitmap mode - 176x184 pixels using 4x8 color cells
Standard bitmap mode - 176x184 pixels with 8x8 color cells
Each character or color cell can be one of 16 colors. The VIC-I generates its timing from the 14.318 MHz master clock (NTSC), which also limits the display to 22 columns in text mode - narrower than most home computers of the era.
The character generator ROM contains 256 8x8 characters: 128 uppercase/graphics characters and 128 reversed characters. It can be redirected to RAM to create custom character sets.
Sound#
The VIC-I provides four sound channels:
Channel 1 - square wave, low-frequency (20 Hz - 4.4 kHz)
Channel 2 - square wave, medium-frequency
Channel 3 - square wave, high-frequency
Noise channel - white noise
Each channel has its own volume control. Sounds are generated by writing frequency
values to registers in the VIC-I chip’s I/O space at $900A-$900F.
Memory Map#
The VIC-20 memory map is unusual: the 6502’s 64 KB address space is only partially populated with RAM, and the cartridge ports and I/O regions are mapped in the middle of the address space.
Address Range |
Description |
|---|---|
|
RAM (zero page, stack, 1K standard) |
|
3K RAM expansion slot (unpopulated unless expansion installed) |
|
RAM (4K, standard on all models) |
|
BLK1 cartridge ROM |
|
BLK2 cartridge ROM |
|
BLK3 cartridge ROM |
|
Character generator ROM |
|
VIC-I I/O registers |
|
Color RAM (1K nibbles) |
|
I/O 2 (joystick, RS-232) |
|
I/O 3 (cassette, user port) |
|
BLK5 cartridge ROM (autostart) |
|
BASIC ROM |
|
KERNAL ROM |
VIC-I Registers#
The VIC-I chip is controlled through registers at $9000-$900F:
Address |
Function |
|---|---|
|
Horizontal centering / screen origin |
|
Vertical centering / screen origin |
|
Number of columns / video matrix base |
|
Number of rows / character cell height |
|
Raster position (read) |
|
Character generator base address |
|
Light pen horizontal position |
|
Light pen vertical position |
|
Paddle X |
|
Paddle Y |
|
Sound channel 1 frequency |
|
Sound channel 2 frequency |
|
Sound channel 3 frequency |
|
Noise channel frequency |
|
Auxiliary color / volume |
|
Color registers |
Programming#
The VIC-20 shipped with Commodore BASIC 2.0 in ROM, but the 8bitworkshop IDE focuses on 6502 assembly language and C (via the CC65 compiler).
Binary Formats#
The 8bitworkshop IDE can load VIC-20 programs in two formats:
Cartridge format (
.bin) - 8K ROM image in the BLK5 ($A000) autostart range, including theA0 30 C3 C2 CDautostart signaturePRG format (
.prg) - Commodore program file with a two-byte load address header