The MOS 6567/6569 video controller (VIC-II)
and its application in the Commodore 64
Christian Bauer
28. August1996

converted to HTML by Andreas Grützmann
28. Juli 1999

Diese Dokumentation in deutsch
Deutsche Textversion (von Christian Bauer)
English Textversion (by Chrisian Bauer) - Komplettes Document inkl. Bilder, deutsche Version (140k) - complete document incl. pictures, english version (130k)

0. Contents
1. Introduction
2. The architecture of the Commodore 64
2.1. Overview
2.2. 6510 prozessor
2.3. 6567/6569 graphics chip
2.4. Memory
2.4.1. Memory map as seen by the 6510
2.4.2. Memory map as seen by the VIC
2.4.3. Memory access of 6510 and VIC
3. Description of the VIC
3.1. Block diagram
3.2. Registers
3.3. Color palette
3.4. Display generation and display window dimensions
3.5. Bad Lines
3.6. Memory access
3.6.1. The X coordinates
3.6.2. Access types
3.6.3. Timing of a raster line
3.7. Text-/bitmap display
3.7.1. Idle state/display state
3.7.2. VC and RC
3.7.3. Graphics modes Standard text mode (ECM/BMM/MCM=0/0/0) Multicolor text mode (ECM/BMM/MCM=0/0/1) Standard bitmap mode (ECM/BMM/MCM=0/1/0) Multicolor bitmap mode (ECM/BMM/MCM=0/1/1) ECM text mode (ECM/BMM/MCM=1/0/0) Invalid text mode (ECM/BMM/MCM=1/0/1) Invalid bitmap mode 1 (ECM/BMM/MCM=1/1/0) Invalid bitmap mode 2 (ECM/BMM/MCM=1/1/1) Idle state
3.8. Sprites
3.8.1. Memory access and display
3.8.2. Priority and collision detection
3.9. The border units
3.10. Display Enable
3.11. Lightpen
3.12. VIC interrupts
3.13. DRAM refresh
3.14. Effects/applications
3.14.1. Hyperscreen
3.14.2. FLD
3.14.3. FLI
3.14.4. Linecrunch
3.14.5. Doubled text lines
3.14.6. DMA delay
3.14.7. Sprite stretching
4. The adresses 0 and 1 and the $de00 area
Appendix A: Bibliography
Appendix B: Acknowledgements

This paper is an attempt to summarize the results of various people's examinations of the graphics chip "6567/6569 Video Interface Controller (VIC-II)" (simply called "VIC" in the following) used in the legendary Commodore 64, and to provide a complete reference to its specified and unspecified properties. It is primarily intended for C64 programmers and authors of C64 emulators, but should also be interesting to "outsiders" interested in hardware design and programming and hacking a computer up to the last bits. For this purpose, some general information (e.g. the C64 memory map) already known to experienced C64 programmers has been included as well.

The description of the unspecified properties is based on tests done by Marko Mäkelä, Andreas Boose, Pasi Ojala, Wolfgang Lorenz and myself (not to mention numerous others) during the last years. It also covers internal registers and workings of the VIC. As no schematics of the VIC are available it can of course only be speculative, but in all cases a model has been chosen that explains the observed phenomena with the minimally required circuitry. E.g. for the video matrix counter (VC), a model with two simple counters was given preference to a more elaborate one with a +40 adder.

Although some measurements have been done with an oscilloscope directly on the chip, most insights are based on test programs on the C64 and by comparing them with the implementation in single cycle emulations like "Frodo SC".