MOS 6560 VIC

The 6560 VIC (Video Interface Chip)
This is the VIC chip used in the Commodore VIC-20. For the Commodore 64 you want to look at the 6567 VIC-II.
Taken from the original Commodore mos technology datasheet
OCR Source: Archive.org mos_6560_6561_vic.pdf. Some spelling mistakes may remain due to the poor quality of the source material.

6560/6561 VIDEO INTERFACE CHIP

GENERAL DESCRIPTION

The 6560 Video Interface Chip (VIC) is designed for color video graphics applications such as low cost CRT terminals, biomedical monitors, control system displays and arcade or home video games.

It provides all of the circuitry necessary for generating color programmable character graphics with high screen resolution. VIC also incorporates sound effects and A/D converters for use in a video game environment.

FEATURES

  • Fully expandable system with a 16K byte address space
  • System uses industry standard 8 bit wide ROMS and 4 bit wide RAMS
  • Mask programmable sync, generation, NTSC-6560, PAL-6561
  • On-chip color generation (16 colors)
  • Up to 600 independently programmable and movable background locations on a standard TV
  • Screen centering capability
  • Screen grid size up to 192 Horizontal by 200 Vertical dots
  • Two selectable graphic character sizes
  • On-chip sound system including:
    • Three independent, programmable tone generators
    • White noise generator
    • Amplitude modulator
  • Two on-chip 8 bit AID converters
  • On-chip DMA and address generation
  • No CPU wait states or screen hash during screen refresh
  • Interlaced/Non-interlaced switch
  • 16 addressable control registers
  • Light gun/pen for target games
  • 2 modes of color operation

Variants

Chip Region Note
6560 NTSC
6561 PAL
6561E PAL Ceramic, used in early VIC-20's
6561-101 PAL

THEORY OF OPERATION

In order to produce programmable color characters, VIC accesses external memory which can be divided into three areas: character pointers, display characters and color pointers. The character pointer area is a block of bytes in RAM (typically 506 bytes called the Video Matrix) in which each byte points to a particular character to be displayed. The character area consists of a set of 8 or 16 byte blocks (usually called cells) which contain the actual dot patterns to be displayed. These character cells can be located in either RAM or ROM depending on how the objects are to be displayed or moved on the screen. The color pointer area is a block of nybbles in RAM (typically 506-4 bit nybbles called the Color Matrix). The 4 bit color pointers are used to define the color of any character which is to be displayed and to select one of the two color modes.

It is the task of an external microprocessor to organize the Video Matrix, Color Matrix and Character Cells into the proper format to display the data desired on-screen.

Typical Video Matrix

To understand the operation of VIC more completely, consider the diagram shown in Figure 1. This is a typical Video Matrix, in which 22 characters horizontally by 23 characters vertically are to be displayed, yielding a total of 506 character display locations, with a screen resolution of 176 horizontal by 184 vertical dots. Each one of these character display locations has a corresponding character pointer, or index, which specifies (points at) a character to be displayed in that particular location. In the example shown, rectangle (B,15) has a character index of 2B. This means character number 2B is to be displayed in that rectangle. VIC will fetch the character index value 2B and perform an address computation to locate the desired character to be displayed. The computation is quite simple. If 8 x 8 character cells are selected, the index is left shifted 3 times (multiply by 8) and the starting address of the character cells, found in VIC Control Register CR5, is added to the left shifted value. In this case, the character cell starting address is 3400 (in HEX) which is added to the left shifted value of the character index to yield the actual character location in memory of 3558 (in HEX). Note here that the actual character displayed is an eight dot by eight dot matrix which can be stored in either ROM or RAM. Also, the number of times that any particular character can be displayed is unlimited. By using the same character index (2B for example) elsewhere on the grid, the character data will be displayed again. Alternately, through the use of a simple software driver, VIC can be used as a bit mapped display system provided enough RAM is available (approximately 4K bytes of cell RAM).

REGISTER DESCRIPTION

There are sixteen eight-bit control registers within the 6560 which enable the microprocessor to control all the operating modes of VIC.

VIC Control Registers
Name Address B7 B6 B5 B4 B3 B2 B1 B0 Description
CR0 00 I SX6 SX5 SX4 SX3 SX2 SX1 SX0 Screen Origin X
CR1 01 SY7 SY6 SY5 SY4 SY3 SY2 SY1 SY0 Screen Origin Y
CR2 02 Bv9 M6 M5 M4 M3 M2 M1 M0 No of Video Matrix Columns
CR3 03 R0 N5 N4 N3 N2 N1 N0 D No of Video Matrix Rows
CR4 04 R8 R7 R6 R5 R4 R3 R2 R1 Raster Value
CR5 05 BV13 BV12 BV11 BV10 BC13 BC12 BC11 BC10 Base Address Control
CR6 06 LH7 LH6 LH5 LH4 LH3 LH2 LH1 LH0 Light Pen Horizontal
CR7 07 LV7 LV6 LV5 LV4 LV3 LV2 LV1 LV0 Light Pen Vertical
CR8 08 PX7 PX6 PX5 PX4 PX3 PX2 PX1 PX0 POT X
CR9 09 PY7 PY6 PY5 PY4 PY3 PY2 PY1 PY0 POT Y
CR10 0A S1 F16 F15 F14 F13 F12 F11 F10 FIN1
CR11 0B S2 F26 F25 F24 F23 F22 F21 F20 FIN2
CR12 0C S3 F36 F35 F34 F33 F32 F31 F30 FIN3
CR13 0D S4 F46 F45 F44 F43 F42 F41 F40 FIN4
CR14 0E CA3 CA2 CA1 CA0 A3 A2 A1 A0 Amplitude
CR15 0F CB3 CB2 CB1 CB0 R CE2 CE1 CE0 Color Control

EXPLANATION OF CONTROL REGISTER FUNCTIONS

CR0 Bits 0-6 determine how far from the left-hand side of the T.V. screen the first column of characters will appear. It is used to Horizontally center various sizes of video matrices on-screen. Bit 7 selects interlaced scan mode (I = 1).
CR1 Determines how far from the top of the T.V. screen the first row of characters will appear. It is similarly used to vertically center various sizes of video matrices onscreen.
CR2 Bits 0-6 set the number of columns in the Video Matrix. Bit 7 is part of the Video Matrix address found in CR5
CR3 Bits 1-6 set the number of rows in the Video Matrix. Bit 0 is used to select either 8 x 8 character matrices (D = 0) or 16 x 8 character matrices (D = 1). Bit 7 is part of the RASTER value found in CR4
CR4 Contains the number of the line currently being scanned by the T.V. raster beam
CR5 Bits 0-3 determine the starting address of the character cell space. (Note that these bits form bits A13 through A10 of the actual address.) Bits 4-7 (along with Bit 7 of CR2) determine the starting address of the Video Matrix (these bits form bits A13 through A9 of the actual address)
CR6 Contains the latched horizontal position of the light gun/pen.
CR7 Contains the latched vertical position of the light gun/p
CR8 Contains the digitized value of POTX.
CR9 Contains the digitized value of POTY.
CRA Bits 0-6 set the frequency of the first audio oscillator.
Bit 7 turns the oscillator on ( = 1) or off ( = 0)
CRB Same as CRA for second audio oscillator
CRC Same as CRA for third audio oscillator.
CRD Same as CRA, but sets frequency of noise source.
CRE Bits 0-3 set the volume of the composite audio signal (Note that at least one sound generator must be turned on for any sound to be produced).
Bits 4-7 contain the Auxiliary color code used in conjunction with the “Multicolor” mode of operation.
CRF Bits 4-7 select 1 of 16 colors for the background common to all characters. (Essentially, they set the color of the background area within the Video Matrix.)
Bits 0-2 select 1 of 8 colors for the exterior border area of the screen (all area outside the Video Matrix).
Bit 3 determines whether the Video Matrix will be displayed as different colored characters on a common background color (R = 1) or inverted (R = 0), that is, all characters will be the same color (the background color in CRF) while each character’s background will now be a different color, determined by the code in the Color RAM.
Note that the R bit has no effect when Multicolor mode is selected and that CRF also functions differently in this mode. Refer to the section called “Operating Modes” for complete information.

COLOR OPERATING MODES

VIC incorporates two modes of color operation. HI-RES (high resolution) mode and Multicolor mode. Basically, the operating mode affects how the Character Cell information will be translated into dots on the TV screen. The operating mode is determined by the MSB of the color pointer associated with each character location in the Video Matrix. If the MSB of a character’s color pointer is zero, then that character will be displayed in HI-RES mode. Alternately, if the MSB is one, the character will be displayed in Multicolor mode

With HI-RES mode selected, there is a one-to-one correspondence between Character Cell bits and the dots displayed on-screen. That is, all one bits of a character will be displayed in one color, and all zero bits in another color. The foreground color of the character is specified by the remaining 3 bits of the character’s color pointer, while the character’s background color is specified by Register F (CRF).

With Multicolor mode selected, each TWO bits of a character cell correspond to ONE dot on-screen and the color of that dot is determined by the two-bit code. Unlike HI-RES mode, in which only two colors can be displayed in a single character, Multicolor mode allows four colors per character; however, since two bits of cell data now correspond to a single dot on-screen, the horizontal resolution is half that of the HI-RES mode. That is, each 8x8 Character Cell in memory maps onto an 8x4 character on-screen (8 lines of 4 dots each). Note that the amount of memory required for these 8x4 Multicolor characters is the same as that for 8x8 HI-RES characters, the data is simply mapped differently on-screen.

In Multicolor mode, the two bits which make up a dot select one of four colors for that dot. The four codes created by these two bits tell VIC where to find the color information for the dot. The color of the dot can be either the Background color (in C R F), the Exterior Border color in (CRF), the Auxiliary color (in C R E) or the Foreground color (bits 0 thru 2 of the character’s color pointer).

The Multicolor mode color select codes are:

Mode Colour
00Background color (CRF)
01Exterior Border color (CRF)
10Foreground color (Color RAM)
11Auxiliary color (CRE)

Note that the two-bit code is NOT itself a color code, rather it is a pointer to four different color codes, allowing greater color flexibility, as each code pointed to has either 3 or 4-bit resolution

6560 PIN SIGNAL DESCRIPTION

• Address Bus— Pins 21 thru 34

The 14 bit address bus (A0 thru A13) is bidirectional. During P∅2 = 1, the address pins are in the input mode. In this mode the microprocessor can access any of the sixteen VIC Control Registers. The high order pins of the Address Bus (A8 thru A13) act as Chip Select pins in this input mode. A true chip select condition occurs when A13 = A11 = A10 = A9 = A8 = 0 and A12 = 1, which equates to a VIC chip select address of 1000 in HEX. The lower order 4 bits of the address bus (A0 thru A3) are used as the control register select portion of the input address

During P∅1 = 1, the VIC address pins will be in the output mode if data (either Character Pointer or Character Cell) is to be fetched. In this mode, VIC will put out the address of the memory location to be fetched. The address from VIC will be valid 50ns after the rising edge of P∅1 and remain valid until the rising edge of P∅2.

• Read/Write— Pin 4

This signal is an input only on the 6560 and controls the flow of data between VIC and the microprocessor. When the R/W signal is low and the VIC chip select conditions have been satisfied, the microprocessor can write data into the selected VIC Control Register. If the R/W signal is high and the chip select conditions have been met, the microprocessor can read data from the selected VIC Control Register

It is important to note that all VIC/microprocessor data transfers can only occur when P∅2=1. During P∅1 the VIC will be fetching data from memory for display and the R/W signal must be held high to ensure that VIC will not write into any memory location

Data Bus— Pins 5 thru 16

The 12 bit data bus of the 6560, DB0 thru DB11f is divided into two sections. The lower order eight bits, DB0 thru DB7, are used both to interface to the microprocessor and fetch data needed for display, while the higher order 4 bits are used exclusively for retrieving color and mode information. The operation of the lower order eight bits (DB0 thru DB7) can also be separated into two categories: microprocessor interface and video data interface. During P 0 2=1, DB7 thru DB0 are used exclusively for data transmission between the microprocessor and VIC. During P 0 1 = 1, DB7 thru DB0 are used for fetching display data.

CLOCKS

Master Oscillator Clock Inputs— 0 A and 0 2, Pins 39 and 38

The 6560 requires a 14.31818 MHz (NTSC), TWO Phase Clock. The clock signals must be five (5) volts and non-overlapping. The 6561 requires a 4.436187 M H z clock for PAL standard

System Clocks— P 0 1 and P 0 2, Pins 35 and 36

These clocks are the master timing generator for the VIC System. They are five volt, nonoverlapping 1.02 MH z clocks capable of driving the capacitance of the 6512 microprocessor.

Memory Clock— 0 M (Option), Pin 37

This is a single phase 2.04 MHz clock used when memories in the VIC System require a strobe after the address bus is valid.

Analog to Digital Converters— POTX and POTY, Pins 17 and 18

These input pins are used to convert potentiometer position into a microprocessor readable 8 bit HEX number. This is accomplished by a simple RC time constant integration technique. The potentiometer is used to charge an external capacitor tied to the pot pin. Refer to application note No.1 (insert).

Composite Sound— Pin 19

This pin provides the output of the sound synthesizer portion of the 6560 shown in the VIC Block Diagram. It is a high impedance output (approximately 1Kfi) and must be buffered and amplified externally to drive a speaker

Composite Sync and Luminance— Pin 3

This pin is an open drain output which provides all the necessary video synchronization and luminance information required by a standard television. Refer to application note No. 1 (insert).

Composite Color— Pin 2

This signal provides the necessary color information required by a standard television to receive a full color picture. The composite color pin is a high impedance output buffer which provides the reference burst signal plus the color encoded phase and amplitude information at the proper 3.579545 M H z frequency. Refer to application note No. 1 (insert).

Reset— (Option), Pin 37

This input signal is used to synchronize the horizontal and vertical sync counter to an external signal.

Bus Available— (Option), Pin 37

This output signal indicates the state of VIC with respect to the video memory fetch. The pin will go low 2 ^sec. before VIC performs any memory access and will remain low until the entire screen has been refreshed.

Light Gun/Pen— (Option), Pin 37

This input signal causes the current dot position being scanned onto the screen to be latched into control registers 6 and 7, upon a negative going edge. This pin would be used in conjunction with a photo detector for use in a “target shoot” type game or for light pen applications. Refer to application note No. 1 (insert).

AVAILABLE AUXILIARY/BACKGROUND COLORS

Value Colour Value Colour
0Black8Orange
1White9Light Orange
2RedAPink
3CyanBLight Cyan
4MagentaCLight Magenta
5GreenDLight Green
6BlueELight Blue
7YellowFLight Yellow

AVAILABLE BORDER/CHACTER COLORS

Value Colour
0Black
1White
2Red
3Cyan
4Magenta
5Green
6Blue
7Yellow

Last modified October 22, 2021: Add 6560/6561 VIC (0ca1d3f)