Commodore VIC-20#

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

Commodore VIC-20 (by Evan-Amos, public domain)

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

$0000-$03FF

RAM (zero page, stack, 1K standard)

$0400-$0FFF

3K RAM expansion slot (unpopulated unless expansion installed)

$1000-$1FFF

RAM (4K, standard on all models)

$2000-$3FFF

BLK1 cartridge ROM

$4000-$5FFF

BLK2 cartridge ROM

$6000-$7FFF

BLK3 cartridge ROM

$8000-$8FFF

Character generator ROM

$9000-$93FF

VIC-I I/O registers

$9400-$97FF

Color RAM (1K nibbles)

$9800-$9BFF

I/O 2 (joystick, RS-232)

$9C00-$9FFF

I/O 3 (cassette, user port)

$A000-$BFFF

BLK5 cartridge ROM (autostart)

$C000-$DFFF

BASIC ROM

$E000-$FFFF

KERNAL ROM

VIC-I Registers#

The VIC-I chip is controlled through registers at $9000-$900F:

Address

Function

$9000

Horizontal centering / screen origin

$9001

Vertical centering / screen origin

$9002

Number of columns / video matrix base

$9003

Number of rows / character cell height

$9004

Raster position (read)

$9005

Character generator base address

$9006

Light pen horizontal position

$9007

Light pen vertical position

$9008

Paddle X

$9009

Paddle Y

$900A

Sound channel 1 frequency

$900B

Sound channel 2 frequency

$900C

Sound channel 3 frequency

$900D

Noise channel frequency

$900E

Auxiliary color / volume

$900F

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 the A0 30 C3 C2 CD autostart signature

  • PRG format (.prg) - Commodore program file with a two-byte load address header

Comments