Overview of the VIC-20 system¶
A partial implementation of a Commodore VIC-20.
Core library: Highbyte.DotNet6502.Systems.Vic20.
CPU: the NMOS 6502 model (nmos6502), as in the real machine.
Current capabilities¶
- Run VIC-20 Basic from ROM (user-supplied Kernal, Basic, and Chargen ROM files).
- VIC-I character-mode display
- 22 columns × 23 rows, NTSC (60 Hz).
- Border rendering (5 character columns each side, 1 row top/bottom).
- Background and border color via VIC-I register
$900F. - 16 background colors (
$900Fhigh nibble), 8 foreground/border colors (low nibble). - Auxiliary color via VIC-I register
$900E. - Rasterizer path sources character glyphs from the active VIC-I character base address in ROM or RAM (
$9005). - Rasterizer path supports per-cell multicolor rendering via color RAM bit 3.
- VIC-I display position registers
$9000(horizontal) and$9001(vertical) decoded and used by the rasterizer to offset the character area within the TV canvas.
- Two VIA 6522 chips
- VIA1 — keyboard matrix scanning, system timer (CA1 raster IRQ from VIC-I).
- VIA2 — user port, additional timer.
- VIC-I raster interrupt via VIA1 CA1, used by KERNAL for keyboard scan and cursor blink.
- Host-agnostic rasterizer render path (
Vic20Rasterizer). - Host-agnostic command-stream render path (
Vic20VideoCommandStream) for lightweight glyph rendering. - PETSCII screen code rendering with glyph-to-Unicode conversion.
- Host-agnostic input handling (VIA-based keyboard matrix).
- Avalonia Desktop, Avalonia Browser (WASM), and Terminal (TUI) UI.
Not yet implemented¶
- Audio (no SID or other audio chip emulation — the VIC-20 has no SID; the VIC-I has limited built-in sound via
$900A–$900Ewhich is not yet emulated). - Disk drive support (no VIC-1541 or equivalent).
- Joystick / game port input.
- PAL variant (NTSC only at present).
- RAM expansion (unexpanded memory map only).
- Dynamic host resizing when a program changes column/row count or character height at runtime (the Avalonia canvas is a fixed size; only the rendered area adjusts).
- Note: the VIC-I chip has no bitmap graphics mode — the VIC-20 supports character-mode display only.
- Light pen support.
Implementation libraries¶
For the libraries used to render and accept input, see Libraries.
Monitor commands¶
Additional machine code monitor commands specific to the VIC-20 system:
Commands:
lv VIC-20 - Load a VIC-20 PRG file from file picker dialog.
llv VIC-20 - Load a VIC-20 PRG file from host file system.
sv VIC-20 - Save a VIC-20 PRG file to host file system.
For general monitor commands, see Monitor library.