Chapter 1
Chapter 2
Chapter 3
TABLE OF CONTENTS
INTRODUCTION. » 2 e+e ee eee
Features wee ee ee
system Description». + ee eee
VIC Description . 2. eee eee
VIC Theory of Control... + ~~
SYNC and BLANKING .- +... +++
(BUS STRUCTURES tee
pd@ress Buse
Data 60g)
System Memory Map
VIC Memory Mapes ee ee ee ee
PIC Memory Map. - > ++ + se ees
Synchronization of Microprocessor to
VIC FUNCTIONS . 2. e+e ee eee
Vertical Sync Control Register . . .
Vertical Blanking Control Register .
RDY Line Control .- ++ +++
Horizontal Counter Resets ..-..
Page
23
29
30
33
35
37
38
aL
43
45
46
48
52
57TABLE OF CONTENTS
(continued)
Object and Projectible Size and Repeats . .
Color Control Registers . +s... . eee
Border Size and Foreground Control Registers
Object Scan Direction Control Registers .
Foreground Font Registers ..... 2.4%
Sound Selection Registers ...--+++.-
Sound Frequency Selection Registers ....
Sound Output Level Registers... 1.24%
Object Font Registers -. 1... .e eee
Projectible Enable Registers... .....
Border Enable Registers ........4-
Horizontal Movement Control Registers ...
Object Font Register Selects. ......-
Border Enable Select Register .......
Projectible Tracking and Disable Registers .
Horizontal Movement Enable Control... ..
Horizontal Movement Register Reset... .
Object Coincidence Register Reset .....
Coincidence and Input Registers ......
ii
78
80
82
83
84
86
90
92
93
98
100
lol
103Chapter 4
Chapter 5
TABLE OF CONTENTS
(continued)
CONTROLLERS .. 2. +
System 1/0... ++ .-
Joystick Controllers...
Paddle Controllers . . .
Keyboard Controllers - «
Steering Controllers...
Front Panel Control Switches
PROGRAMMING 2 2. + se
Page
106
114
116
iis
122
124INTRODUCTION
The Atari Video Interface Circuit (VIC) is controlled by a
Microprocessor (MPU) through a series of instructions contained in
a computer program. ‘The program is stored in a Read Only Memory
(ROM) and is executed according to a set of predefined algorithms
and flowcharts developed by the programmer. The MPU also requires
some Random Access Memory (RAM) in order to execute the program
and to store temporary results of the various routines executed.
Also required is a Peripheral Interface Circuit (PIC) to communi-
cate with the external controls (i.e., switches, potentiometers,
etc.).
The VIC is an object-oriented device in that it will directly
generate an object which can be moved under the control of the
MPU. The object is not generated through the use of screen RAM,
but rather from an object generator to which we supply the object
shape (font) as needed for the generation of the object on the
video screen. The object has 8 Bits of Horizontal Font Data. The
horizontal placement of the object is made by the VIC. However
we can move the object left or right from the position by
controlling the Movement section of the VIC. Vertical positioning
is under the direct control of the MPU. ‘The Objects can be
Programmed to three different Horizontal sizes and can be repeated
one or two times after the original Object.The VIC generates a non-universal object called a Projectile
The Projectiles can be programmed to only 4 different Horizontal
sizes. The Projectiles have all of the motion capabilities of the
Objects. The Projectiles can also be programmed to repeat one or
two times after the original Projectile.
The VIC also controls a non-universal object generator called
the Border, which has all the motion capabilities of the Objects
and Projectiles, but which is like the Projectiles and does not
have the font capability of the Objects. The Border can only make
4 different shapes horizontally like the Projectiles versus 255
for an Object. The Border also cannot be repeated horizontally as
the Objects and Projectiles can.
‘The Foreground appears as a type of screen RAM on a one-line
basis, in that it cannot be moved horizontally and covers the
entire horizontal visible area of the video screen.
The Sound Section works under the control of the MPU to
generate complex sounds. ‘The Sound section generates 10 different
sound wave shapes that are used as building blocks for complex
sounds. The MPU can control the frequency and amplitude for each
of the two Sound channels.The Vic has a Concidence detection circuit which checks for
coincidence between each of the Objects, Projectiles, Border, and
Foreground.
There is also a set of Input circuits that can be used as
digital inputs and for performing an Analog to Digital conversion
for use with the Player controls.
The VIC has a Color Generator circuit that generates all of
the signals needed to produce a color picture on a standard NTSC
Color Television.FEATURES
2 General Purpose Objects
3 Dedicated Objects
Object Duplication (2 Programmable Repeat Objects
Object Size and Movement Under Microprocessor Control
Programmable Object Priority
280 nsec Object Resolution
Programmable Forecround
Programmable Foreground Repeat or Mirroring
128 Programmable Colors
Programmable Vertical Syne and Vetical Blanking Timing
2 Programmable Sound Generators
4 Analog Potentiometer Inputs
2 Digital Inputs (Edge Sensitive Progrenmable
4 Displayable Colors per Horizontal Scan Line
4 Chip Select Lines for Address Decoding
40 Pin Dual-In-Line Package
Page Zero Microprocessor OperationSYSTEM DESCRIPTION
The Atari Video Interface Circuit (VIC) is designed for use
in a Microprocessor controlled Video Game System. It provides all
the game circuits on a single N-Channel MOS LSI Integrated
Circuit. Circuits are provided for both analog and digital player
inputs, Foreground, moving Objects, Projectiles, Border, and audio
signals.
The Microprocessor used in the system is the 6507. The ROMS
used are the 2316 (16K) or 2332 (32K). The PIC is a 6532. The
VIC is a custom circuit.
The game is Microprocessor controlled and each game
definition is stored as a program in the ROM. ‘The ROM contains
the game rules, the score font, the object font, the background
font or algorithm, and the sound algorithms. Each ROM can contain
more than one game or variations of a game depending on game
complexity.
The VIC develops Composite Video with Color Burst according
to the NTSC video standard and uses a 3.579545 MHZ oscillator
frequency. ‘The display is non-interlaced.
A block diagram of the system is shown in Figure 1. The
Microprocessor reads the stored program in the ROM and controls
the generation of the video output by the VIC.The VIC generates the Horizontal Sync, Horizontal Blanking,
Color Burst, and Video Signals which contain the Color and
Luminence signals. The Microprocessor keeps track of the number
of horizontal lines scanned and controls the VIC to generate the
Vertical Blanking and Sync. The VIC generates the sounds under
control of the Microprocessor, which can control the frequency,
shape, and amplitude.
The Microprocessor uses the PIC and VIC as the I/O interface
for the player controllers (digital), player potentiometers
(analog), and the front panei controls (digital). The system
scratchpad RAM and Stack are in a 128 byte RAM in the PIC which
also contains a programmable @ bit timer.
The 128 byte RAM in the PIC is shared between the MPU stack
and the system scratchpad RAM. The RAM is address transparent
between $0080 thru $O0FF and $0160 thru $01FF. That is to say
that the same RAM appears in both of these address ranges
simultaneously and care must be exercised not to let the stack
alter the scratchpad RAM being used by the program-
VIDEO RE
PROGRAM
ROM BUFFER >To Tv
eo MODULATOR
2.316 OR 2332
VIDEO
ouTPUT
SOUND
vic |outeut
SYSTEM
RAM
PLAYER
CONTROLS
ATARI VIDEO. GAME BLOCK DIAGRAM
‘ FIGURE | REV A 7-23-81
4
DVIC DESCRIPTION
The VIC is a Bus oriented device. The Microprocessor address
and Data Busses enter the VIC and access the major functional
areas. With the Address Bus the Microprocessor selects the area
it desires to communicate with. ‘The information is presented or
received from the selected area on the Data Bus.
An external oscillator provides the 3.58 MHZ clock frequency
for the VIC. THe VIC then divides it by 3 to generate the clock
for the Microprocessor.
The VIC internally generates the Horizontal Sync, Blanking,
and Color Burst and generates 4 displayable colors per line
(Object A/Projectile A, Object B/Projectile B, Border/Foreground,
and Background). Each color is independently programmable, and
each one has a priority over the other. Some of the priorities
can be altered by the Microprocessor. There are 128 Programmable
colors for each of the above.
There are two fully programmable Objects (Object A and
Object B). Each of these Objects is 8 bits wide and is fully
programmable which means that there are 255 visible combinations
of display for each Object. There are two Object Font Registers
for each Object. Each Object Font Register contains one Byte (8
bits) of data. The direction in which the data is scanned can be
reversed. The horizontal size of the bits in the Object displaycan be programmed to be 1, 2, or 4 units wide, Each of the
Objects can be programmed to be repeated one or two times after
the original and at different intervals from the original Object.
There are two dedicated objects (Projectile A and Projec-
tile B) that are related to the main Objects (Object A and Object
B). These Projectiles can only be 1, 2, 4, or 8 units wide. Pro-
jectile A can be programmed to track the horizontal movement of
Object A. Projectile B can be programmed to track the horizontal
movement of Object B. The Projectiles can be repeated hori-
zontally in conjunction with the associated Object. Projectile A
is repeated exactly as Object A and Projectile B is repeated
exactly as Object B.
There is also a dedicated object (Border) that can be moved
or used as a ball, Border, or center line. The Border can only be
1, 2, 4, or 8 units wide. ‘The Border cannot be repeated.
The Foreground is a 20 bit memory that can be displayed in
one of four methods horizontally. Each bit is 4 units wide and
the active Foreground area is 160 units wide. The Foreground
memory acts as a register. The register is 2-1/2 bytes of RAM (20
bits). The Forearound Register is displayed two times each line
(40 bits/line).
An object can be made to appear over or under the Foreground
and Border and can appear over or under another object based on apriority system. Object A, Object B, Projectile A, and Projectile
B can be programmed as higher or tower priority than the Fore-
ground and Border.
Object A and Projectile A are always a higher priority than
Object B and Projectile B.
The horizontal movement of each Object (A and B), Projectile
(A and B), and the Border is controlled by the Microprocessor.
Each of these 5 can be moved left or right relative to the
Horizontal Reference Counter. Movement can be from -7 to +8
horizontal units per horizontal line sweep.
The VIC has a coincidence detection circuit that indicates
when any two Objects, Projectiles, Foreground, Border, or any
combination of the above are coincidental with each other. A set
of 15 comparators compares each object against the other and
stores the result in a set of registers which can be read and
reset by the Microprocessor.
The VIC has 4 analog inputs with Schmitt triggers for
accurate repeat detection of the player potentiometer setting.
The analog inputs use a resistor-capacitor circuit for the time
constant; the resistor is a potentiometer that is controlled by
the player. Each input has a progammable discharge transistor
that can be turned on to discharge the capacitor in the RC timing
circuit.
-10-There are also 2 Trigger inputs which can be used as latching
Input Ports. Whenever one of these inputs goes to a level,
this transition is stored in a latch that can be reset under
software control. ‘The latching mode is programmable and when
turned off the data at the Trigger inputs is passed directly to
the MPU when read.
The VIC contains two Sound genertors each of the Sound
generators are connected to one of the two Sound Output pins.
The Sound Generator consists of a Programmable Divider that
@ivides the horizontal sweep frequency, a Sound Generator, and a
Programmable Output Driver. ‘The Divider can be programmed to
divide the 15.7 KHZ horizontal sweep frequency by 1 to 32. The
Sound Circuit is programmable for 10 different sounds and tones
This circuit can produce a series of sounds from a simple tone to
a complex random noise. The Output Driver can be programmed for
15 different output levels.
alaea2 Al ao | |CS3] |tS2 [esi CSO [enw [ee FREQUENCY SOUND Coven 2 sip)
Le] [=] | wewer Lofsouno |_af tay '
Seeceseeee ee eeectecceeeeeeeeasaas | -_&
ae ADDRESS Bus FREQUENCY souno {sf cever | ___'SNb
— DECODER TIMING 8 8 8 2
AS
080 Vv Lum
be! l —
. LuM
LJ DATA FOREGROUND -
Bus GENERATOR OBJFCT ORJECT Se
COUNTER GENERATOR RIORIT ae
oR2 a A I LOGIC GENERATOR Lum
5 ONTAL [== folPRovective] .fPRovecTILE
ORS mage COUNTER [SAGENERATOR
A A
_ Vv vy
pR4 ¥ OBJECT OBJECT
W COUNTER GENERATOR COINCIDENCE
MASTER 1J
oF5-—— COUNTER 2
: a PROJECTILE | . [PROJECTILE READ
TIMING COUNTER GENERATOR Locic cr
DBS AD.
vy yy Vv
BORDER Rorver |_|
oe7 LI [a COUNTER [> GENERATOR
i OSC) Isvnc| | ROY 0 Tor] |ToR| Pot] |Pot| [Pot] [ror
IN J t 2 A 8 c
REV A 7-246!
VIC BLOCK DIAGRAM
FIGURE 2
-l2-084 085] |o86} |087 READ
LOGIC
— RDB7
pB3 [—........ RDB
= -——_——___—______—> 087
0B2 > 'DB6
Li DATA BUS} 085
On4
a DRIVERS S bas
| +> 2
> dB!
080 . -——___—_———> 80
02
— 02 o2 TO READ
pane] ee | REA > LOGIC
Bus fon
TIMING
essay --7———$ 82e
i ADORESS
se —| DECODER
02 WRITE
eH) Ss
Si 22
eH a
[= She 10
{ 2
READ
| Losi
Ao
REV B 4/27/81
-13-ci
$03 >—_|
DBO
OBI
$00
$02
SOA
$20
ane
BLANKING
MASTER
COUNTER
cer
H6
SOUND CLK
C BLANKING
HCO
HCo2
HME
: RIN
LIN
sco
: : sca2
NC]
Hs
MASTER COUNTER LOGIC
FIGURE 4
REV A 4729/81
-I4-FOREGROUND
GENERATOR
FGND
FOREGROUND GENERATOR
LOGIC
REV A 4/29/81
FIGURE 5 7HORIZONTAL
HCO! >___ MOVEMENT
OBJECT A
Hco2>—— HORIZONTAL
HME > HORIZONTAL
Ds7 > MOVEMENT MOVEMENT
ies cLock OBJECT B
08s > GENERATOR HORIZONTAL
084 MOVE MENT
$20 5 PROJECTILE A
$21 > HORIZONTAL,
$22>—___| MOVEMENT.
$23, PROJECTILE 8
$24 HORIZONTAL
$28 RESET MOVEMENT
BORDER:
HORIZONTAL
MOVEMENT
REVA 4/29/81
FIGURE 6 -16-cLock >———___}
HORIZONTAL
MOVEMENT ponued
BORDER COUNTER
$14>——_
SOA
1c
fe BORDER
$27 GENERATOR Ls BoRDER
DAS
DB4 ‘
BI
DBO
Co
BORDER
REV A 4/28/81
FIGURE 7 ItcLocK >————+ OBJECT
COUNTER
HZNTAL
MOTION >]
OBJ-AB
$10,311
$04,305 >—————___
$10, S1E
$28,829
DBO
$25,326
$1B,$1C
$1C,$1B
$08,300
OBJECT FONT
TIMING GENERATOR
-——> Pu TK
OBJECT FONT
GENERATOR
> OBJECT
AB
OBJECT GENERATOR LOGIC
FIGURE 8
REVA 7-21-81
-18-CLOCK
PROJECTILE
A,B
COUNTER
$I0,Si PROJECTILE
a AB Gia
oreo GENERATOR “
PROJECTILE A,B
REV A
0 . : 7/3781
FIGURE 9 2 19-H6
Cc BLNK
OBJECT A
OBJECT B
PROJECTILE A
PROJECTILE 8
BORDER
FOREGROUND
SOA
v
cLock’ Cc ty yy C4 C8
CLR BRST FLAG
PRIORITY
LOGIC
OBJECT
COLOR
GENERATOR
-E| ]2
es
Ze
NS
=
BS
=
coLoR
BURST
GENERATOR erst]
LW
COLOR LoGiC
FIGURE 10 REVA 4/28/81
=20-ROBT
RDBS
VERTICAL
> Banking
a READ LOGIC
A2> DECODER
Al>—
ee $0 $0
OBJECT A>——_,
OBJECT B>——_ COINCIDENCE
PROJECTILE A> DETECTION
PROJECTILE B>—_—} Locic
BORDER>——— '
FOREGND >———_ i.
STROBE
$2C
READ,
087 >
086 >——_
08! >——+ INPUT
$01 >——+ READ
. LOGIC
POT Por
c 0
FIGURE
REVA 4/28/81
" -2l-SIA
$19
080
CLOCK OB! CLOCK
GENERATOR DB2 | GENERATOR
SOUND A SOUND 8B
SOUND A
WAVEFORM
GENERATOR
SOUND 8B
WAVE FORM
GENERATOR
TONE SOUND
LEVEL LEVEL
GENERATOR GENERATOR
SND B
OUT
SOUND
GENERATORS
REV A
4/30/80
FIGURE {2
22+VIC THEORY OF CONTROL
The VIC is an Object oriented video circuit that is
controlled by the Microprocessor. ‘The VIC automatically generates
the Horizontal scan for the Video System but the Microprocessor
provides the Vertical scan for each frame.
The Microprocessor controls the Vertical Blanking and the
Vertical Sync. The Microprocessor keeps track of the Horizontal
line scan count and the Vertical position of the objects. At the
correct Vertical position’ the Microprocessor enables the objects
and supplies the font to the object generator one line at a time
until the objects have been fully displayed.
The VIC keeps track of the horizontal positon of each object
and retains that horizontal positon until directed to move the
object left or right by the Microprocessor. There are 160
distinct horizontal locations for an object.
Horizontal motion of an object is the movement left or right
at a constant rate (i.e., 1 horizontal unit per frame, 2
horizontal units per frame, or 1 horizontal unit every other
frame).
Vertical motion of an object is the movement up or down at a
constant rate (i.e., 1 horizontal line per frame, 2 horizontal
lines per frame, or 1 horizontal line every other frame).
aoaDiagonal movement of. an object is the combination of
horizontal and vertical motion of an object at the same time. The
apparent direction of movement of an object can be determined by
using vector arithmetic. Motion in any one plane can be defined
as being either positive (+) or negative (
The two directions of motions are divided into two planes;
one called X, for horizontal motion, and one called ¥, for
vertical motion. These two planes of motion will intersect each
other at a 90 degree angle and will form the basis of an X-¥ graph
on which can be shown vectored motion. Vertical motion towards
the top of the screen will be positive (+¥) and towards the bottom
of the screen will be negative (-¥). Horizontal motion towards
the right will be positive (+x) and towards the left will be
negative (-X). The X-¥ graph is then broken into four quadrants
and each of the quadrants is numbered from 1 to 4. The first
quadrant is in the upper right hand corner and is represented by
both +X and +¥ motion, the second quadrant is the lower right
quadrant and is the +X and -Y motion, The third quadrant is the
lower left quadrant and is the -x and -¥ motion, the fourth
quadrant is the upper left quadrant and is -x and +4¥ motion.
The horizontal movement range provided by the VIC is -7 to +8
horizontal units each time the motion is enabled. The motion
logic (HMENB) is normally enabled only one time per frame or
less. The maximum amount of horizontal motion normally used is
less than 7 units per frame.
-24-For the purpose of this example which should cover most
applications the vertical motion will be limited from -8 to +8
horizontal lines per frame. As seen in figure 13 the amount of
the motion can be shown as a vector using the value of horizontal
motion and vertical motion on the graph in figure 14 and the
distance from the intersection of the X and Y axis to the value of
motion is the relative speed of the object.
In figure 15 vector A shows a moderate rate of motion in the
first quadrant, the object motion shown by vector B is in the
opposite direction at half of the rate of vector A. Both of these
examples show movement where the number of horizonatal units of
motion are equal to the number of horizontal lines of vertical
motion. Vector C shows an example of a motion vector where x an ¥
are not equal.
Figure 14 can be used to calculate the angles of motion that
can be generated on the screen using the VIC. It should be noted
that the aspect ratio of the Video Screen is 4:3 and the actual
angle seen will vary with this relationship. By making copies of
figure 14 it will be possible to actually draw each vector and
examine the rate of movement and the angle.
~25-ee
+ +7.
+ +6
4TH QUADRANT + +5 IST QUADRANT
(-x,+Y) on (4X,4¥)
+3
ie
+1
-7-6 -5 -4 -3 -2
™* ob p> Dy
TEMP
#S0F
SB
4$0FsB EOR #$07
ASL A
RTS
Note: This program is from an Activision Game Program.
-133-TEE
aStzSs bbe
ATARI TV GAME Cun
se MAIN PC poanD(2.070) >|
(2.040)
40 2i
Lf VLA LA LALALAN SANSA LA IA AA
625
hp N
PIN Now
i em (DENT
MINT TT TT ooo
t 20
wre FES
1404 T + (060,
ssoiF | 088
L {
(40) (toss) (023)
4 090) - O15)
1 (045)
.032 TYP, (orsy TR
PACKAGE DRAWING AND PINOUT
(200)
(600)
PLASTIC PACKAGE