Atari Assembler Course ---------------------- This section briefly describes the hardware in the Atari that help out the 6502 and you. The main workhorse is the ANTIC IC which handles display memory access with its own language called the Display List. The GTIA (or CTIA in older Ataris) helps ANTIC by interpreting Player/Missile graphics information and adding color and other attributes to the display. Another IC called POKEY handles sound and serial I/O. These three chips were custom made for the computer but the last chip, the PIA, is a standard IC and available "off-the-shelf"; it addresses the the front joy-stick ports. 8.1 ANTIC ANTIC is actually a Video Microprocessor with its own machine language called a Display List. It stops the 6502 to get its instruction and screen data with very little help from our program. Because it is synchronized with the TV display, ANTIC generates a non-maskable interrupt every 60th of a second. Also, we can force ANTIC to cause an interrupt at the end of any display line; these are called Display List Interrupts. All of these interrupts are "vectored" by the operating system for our use. Another function handled by ANTIC is scrolling. We can tell ANTIC in its display list to flag a character line for scrolling either horizontally or vertically. Then, we can move those lines a scan-line or pixel at a time by simply writing to the appropriate register. And because ANTIC allows us to point "indirectly" to the display data, we can keep moving new data smoothly. The "indirection" of display data (and the display list itself!) gives us endless display variations. Most computers have "fixed" display memory and modes; all "fancy" displays must be generated in software by addressing each pixel! With ANTIC, even the character set description may be pointed to indirectly. These "redefined" character sets makes game-programming much easier. Also, ANTIC may be used to control a light pen. When the pen is triggered, the horizontal and vertical display clocks are sent to the light-pen registers. If the trigger was caused by the TV's beam passing by the pen's tip, then the PENH and PENV values correspond to that physical location. 8.2 GTIA/CTIA The GTIA takes a stream of bits from the ANTIC chip and converts them to a displayable signal, with color, for our TV or monitor. In this process, it merges another set of display patterns sent by ANTIC. These objects, called Players and Missiles, are independent of the background display and may be positioned anywhere on the screen. GTIA also adds color and size to players and missiles and merges them with a selectable priority to the display. For game programming, we may read "collision" information concerning these objects and the background. GTIA also reads the joystick trigger buttons from the front ports and reads the Console keys on the right of the keyboard. The console speaker (keyboard clicker) is also addressed through the CONSOL register. 8.3 POKEY POKEY is an input and output IC that controls many features of the Atari computer. Interrupt requests, or IRQ's, are generated by POKEY through its audio timers, serial input/output registers, keyboard and BREAK key. The O/S uses many of these but, by changing their vectors, we can use them for our own functions. The audio subsystem generates four independent sound channels which are merged and sent to the TV. POKEY adds pitch, volume and noise to these channels and allows them to be "paired" for more resolution. These same audio timers are used to clock the serial I/O rate and to generate the two-tone data to the cassette recorder. Also, POKEY reads the keyboard key pressed and generates an interrupt. The resident keyboard handler decodes this value which represents the physical key switches and not ATASCII. We can read this directly but we must do the decoding ourselves. The paddle or "pot" values are calculated on the POKEY chip. The value is determined by counting how long it takes to discharge a fixed capacitor value. Because the paddle is a variable resistor, the time-constant of the circuit increases as the resistor's value increases. POKEY counts and saves this value in its POT registers. One last feature of POKEY is its RANDOM number register. This value is actually generated by the same circuitry that creates the audio noise. 8.4 PIA The PIA, or Peripheral Interface Adapter, is a pair of 8-bit registers that are connected through the joystick ports, four bits each. Each bit may be configured for input or output in any combination; the default is input so that the joysticks may be read. PIA has two interrupt lines located on the serial bus and are unused by Atari peripherals. REFER TO: Ch. 2 thru 7 of "De Re Atari", "Atari PCS Hardware Manual", "Mapping the Atari",Pgs. 108-141. Press !