ATARI® PERSONAL COMPUTER SYSTEM HARDWARE MANUAL NOTICE TO ALL PERSONS RECEIVING THIS DOCUMENT Reproduction is forbidden without the specific written permission of ATARI, INC., Sunnyvale, CA 94086. No right to reproduce this document, nor the subject matter thereof, is granted unless by written agreement with, or written permission from the Corporation. COPYRIGHT 1980 ATARI, INC. CO16555 = - 10/80 Every effort has been made to ensure that this manual is an accurate document. However, due to the ongoing improvement and update of the computer software and hardware, ATARI, INC. cannot guarantee the accuracy of printed material after the date of publication, nor can ATARI, INC. accept responsibility for errors or omissions. YY | TABLE OF CONTENTS Bee TNTRODUGT LEON 6-0:6.6.6 «66.06 a0 06s 6.616 ote © 616 6 6166 66 6 66 es ieee Il. DESCRIPTION OF HARDWARE cccccccccccccccccccccolliol Ae ANTIG and’ CTL Aw0:6 0 © 0:0: 6 4016 0.0.00:0.61s 0 sce 66 6.) Lot Be POKEY «ccc ccccccccccccccccccsccccccccccelle23 C. SERIAL PORTccocccccccccccccccccccccccseelle2) D. INTERRUPT SYSTEMecccccscccccccccccccceco lle 28 Ee CONTROLLERS «ccc c cc cccccccccccccccccceceelle 30 | Oe HARDWARE REGIS Ci ets ee bree ree ele we eléke ae eee ee ea be Ae PAL cccccccccccccccvcccccccsevescccccccelliel Be INTERRUPT CONTROL ec coccccccccccccccccvcelliiel C. TV LINE CONTROL ec ccc cc cc ccrccrcccccccccvcellile3 De GRAPHICS CONTROL. ccocccccccvrccccccccccceollleo4 Ee PLAYERS AND MISSILES cccocccccccccccccceellleY Fe AUD LO e606: 0:0:0: 06:0 0.6.4.0 6 «0100 040 60.0 0.0 siete oe oe LLL 12 Ge KEYBOARD and SPEAKER. cccccccccccccccceelllelS He SERIAL PORT ec coccccccvccrccccccccccccccceollieol/ I. CONTROLLER PORTS ecccccccccccccccccccceel lle l9 TV. SAMPLE DISPLAY PROGRAM 6.0646 616 6 wie 5 6 «0a 6.6 0c8 66 eo Leek Ve HARDWARE REGISTER LESES @®eeeaeoeoeoeoeseeeeseeseeseseeoeeee @ oVe 1 A e ADDRES S ORDER @eeeoeseseeeeeeeeeeeeeeeeeeeneeeee @ V e A B e ALPHABETICAL ORDER. @eseeeeeoeeoeeeeeseeseeneeeeee @ oVe 5 Vie PO IAGU ow wot lara oer e a6 eb ere 6 6 e26 eb 6 6.86) oer ON 8 6 616 ah ee elk A e MEMORY MAP @eeeaeoeeoeeoeeeseeeeeeeeeeesneeaeeeneeeese @ VI e l Be NTSC and PAL DESPILAY oss ecele oiete ie eels ee ee eee Vo Lee Cs SCHEMA UG) S ees :6 661056006. 656. 6 weet e e166 ere 6 Wi eele ee eS APPENDIX A: USE OF PLAYER/MISSILE GRAPHICS WITH BASIC APPENDIX B: MIXING GRAPHICS MODES APPENDIX C: PINOUTS 2 AG hs i. INTRODUCTION ww The ATARI (R) 800™™ and ATARI 400'™ Personal Computer Systems contain a 6502 microprocessor, 4 1/0 chips, operating system ROM, expandable RAM, and several MSI chips for address decoding and data bus buffering. This manual is primarily intended to describe the 4 I/O chips in sufficent detail to allow experienced programmers to create assembly language programs, such as video games. All four Input/Output chips are controlled by the microprocessor by writing directly into their registers which are decoded to exist in microprocessor memory space just as RAM does. These I/O chips can also be interrogated by the microprocessor by reading similar registers. Many registers are write only and cannot be read after they are written. In some cases, reading from the same address gives the value contained in a separate read only registere Some write only registers are strobes. No data bits are needed in this case since the presence of the address on the bus is what triggers the requested action. The usual convention is to use the STA (Store Accumulator) instruction for such registers. For example, STA WSYNC performs the wait for Sync function. STX (Store X) or STY (Store Y) would work just as well. In BASIC, a POKE could be used (the data could be anything). Reading a register is accomp- lished by using any of the load instructions (LDA, LDX etc.)- In BASIC a PEEK would be used- When the hardware register names are defined in an equate list, the programmer can refer to the registers by name rather than using the addresses directly. It is really not necessary for the programmer to know which I/O functions are performed by which of the 4 chips, however it does help in learning these functions. This manual should be used in conjunction with the Operating System (OS) Manual, a 6502 programming manual, and the ATARI 400/800 Basic Reference Manual. CHIP NAME FUNCTION ANTIC DMA(Direct Memory Access) control NMI (Non-Maskable Interrupt) control Vertical and Horizontal fine scrolling Light pen position registers Vertical line counter WSYNC (wait for horizontal sync) CTIA Priority control (display of overlapping objects) Color-Lumimance control (colors and brightness assigned to all objects including DMA objects from ANTIC) PLAYER-—MISSILE objects (4 players and 4 missiles) Graphics registers Size control Horizontal position control Collision detection between all objects Switches and triggers (miscellaneous I/O functions) CHIP NAME FUNCTION POKEY Keyboard scan and control serial communications port (bidirectional) Pot scan (digitizes position of 8 independent pots) Audio generation (4 channels) Timers IRQ (maskable interrupt) control from peripherals Random number generator PIA Controller (Joystick) jacks read or write Peripheral control and interrupt lines IRQ (maskable) interrupt control from peripherals Section II describes the hardware in some detail, including the various graphics modes. Section III lists the hardware registers one at a time, describing what each bit is used for. It is organized by functional groups (interrupts, graphics, audio, etc.). Section IV contains a sample display program. Section V contains various figures and block diagrams of the system. Sections VI and VII list the hardware registers in address order and alphabetical order. Section VII includes hex and decimal addresses, the OS shadow registers and the page numbers where more infor- mation can be found. I~ DESCRIPTION OF HARDWARE Ae ANTIC AND CTIA TV Display: The ANTIC and CTIA chips generate the television display at the rate of 60 frames per second on the NTSC (US) system. The PAL (European) system is different and is described in the section on NTSC vs PAL. Each frame consists of 262 horizontal TV lines and each line is made up of 228 color clocks, as shown in figure VI-3. The 6502 microprocessor runs at 1.79 MHz. This rate was chosen so that one machine cycle is equivalent in length to two color clocks. One clock is approximately equal in width to two TV lines. In any graphics mode, the display is divided up into small squares or rectangles called pixels (picture elements). The highest resolution graphics mode has a pixel size of 1/2 color clock by 1 TV line. A sample display list is given in section IV. The current TV line may be determined by reading the vertical counter (VCOUNT). This register gives the line count divided by 2. There are 262 lines per frame so VCOUNT runs from 0 to 130 (0 to 155 on the PAL system). The 0 point occurs near the end of vertical blank (see figure VI.5). Vertical blank (VBLANK) is the time during which the electron beam returns back to the top of the screen in preparation for the next frame. The Atari 800 does not do interlacing, so each frame is identical unless the program which is being executed changes the display. Vertical sync (VSYNC) occurs during the fourth through sixth lines of vertical blank (VCOUNT = hex 7D through 7F). This tells the TV set where each frame starts. After VSYNC, there are 16 more lines of VBLANK for a total of 22 lines of VBLANK. The display list jump and wait instruction (to be described later) causes the display list graphics to start at the end of VBLANK. Operating System (0S): The ATARI 400/800 comes with a 10K Operating System (OS) in ROM. The OS affects some of the hardware registers, so it will be mentioned from time to time in this manual. Refer to the OS manual for more details. The OS descriptions in this manual apply to the version that was being distributed when this manual was written. The OS supports most of the hardware graphics modes (BASICS, GRAPHICS, PLOT, and DRAWTO commands). The OS always displays 24 background lines after the end of vertical blank. This convention is used at Atari to compensate for television sets which overscan. Most TV’s are designed so that the edges of the picture are cut off. This is fine for ordinary broadcasts, but with a computer it is essential for all important information to be displayed on the screen. It is fairly common for four to eight color clocks at the right or left edge of the picture to overscan. A TV set that has excessive overscan may have to readjusted to obtain a satisfactory display. Tiel The OS uses 192 TV lines for its display and devotes the remaining 24 lines to overscan. It uses the standard display width of 160 color clocks. The hardware will allow displays of any length, but it is recom- ‘a, mended that the standards be followed. The exception might be a border or other information which is merely decorative and not essential to use of the program. OS Shadowing: Since many of the hardware registers are write-only and cannot be read the OS has a number of "shadow registers" in RAM. Every TV frame during vertical blank the OS takes the values in some of its shadow registers, and writes them out to the corresponding hardware register. The OS does attract color shifting on all of the color registers if ATRACT (on OS register) is negative. This is to prevent damage to the TV screen phosphors which can occur if the brightness is turned up too high and the same high-luminance display is left on for a long time. The OS also reads the joysticks and other controllers during vertical blank and stores the results in shadow registers, so that user programs do not have to include code to unpack the data. There are a few interrupt-related registers which the OS changes or reads during interrupt processing. Programs usually access the OS shadow registers instead of accessing the hardware directly. However, the OS shadowing can be disabled by changing the vertical blank and interrupt vectors (see OS manual). WSYNC: In addition to a Vertical Blank Interrupt, which allows the Microprocessor to synchronize to the vertical TV display, this system also provides a Wait for Horizontal Sync (WSYNC) command that allows the microprocessor to synchronize itself to the TV horizontal line rate. This sync takes effect when the processor writes to an I/O location called WSYNC, whenever it desires horizontal synchronization. Writing to this address sets a latch which pulls to zero a pin on the microprocessor called READY. When READY goes to zero the microprocessor stops and waits. The latch is automatically reset (returning READY true) at the beginning of the next horizontal blank interval, releasing the microprocessor to resume program execution. Object DMA (Direct Memory Access): The primary function of the Antic chip is to fetch data from memory (independent of the microprocessor) for display on the TV screen. It does this with a technique called "Direct Memory Access" or DMA. It requests the use of the memory address and data bus by sending a signal called HALT to the microprocessor, causing the processor to become "TRI-STATE" (open circuit) all during the next computer cycle. The ANTIC chip then takes over the address bus and reads any data it wishes from memory. Another name for this type of DMA is "cycle stealing". Once initiated, this DMA is completely and automatically controlled by the Antic chip without need for futher microprocessor intervention. There are two types of DMA: Playfield and Player-Missile (see Figure II.2). The playfield DMA control circuit on the Antic chip resembles a small dumb microprocessor. By halting the main microprocessor it can fetch its own instructions from memory (the display list) addressed by its - program counter(display list pointer). Each instruction defines the type 4 (alpha character or memory map), and the resolution (size of bits on the screen), and the location of the data in memory which is to be displayed on the next group of lines. Ele In order to begin this DMA the main microprocessor must store a display list of instructions in memory, store data to be displayed in memory, tell the ANTIC where the display list is (initialize the display list pointer) and enable the DMA control flags on the ANTIC (DMACTL register). In addition to the playfield DMA described above, the ANTIC chip simultaneously controls another DMA channel. This type of DMA addresses PLAYER-MISSILE graphics data stored in memory and passes the graphics data on to the CTIA chip graphics registers. This type of DMA (if enabled) occurs automatically, interspersed with the playfield DMA described previously. This PLAYER-MISSILE DMA has no display list or instructions, and is therefore much simpler than the PLAYFIELD DMA. In addition to the two types of display DMA, the ANTIC chip also generates DMA addresses for the refresh of the dynamic memory RAM used in this system. This is also completely automatic and need be consider- ed by the programmer only if he is concerned with real-time programming where an exact count of the computer cycles is important. Color-luminance: A color-luminance register is used on the CTIA chip for each Player-Missile and Playfield type. Each color-lum register is loaded by the microprocessor with a code representing the desired color and luminance of its corresponding Player-Missile or Playfield type. As the serial data passes through the CTIA chip it is "impressed" with the color and luminance values contained in these registers, before being sent to the TV display. In areas of the screen where there are no objects the background color (COLBK) is displayed. The CTIA also does collision detection (to be described later). Priority: When moving objects, such as players and missiles, overlap on the TV screen (with each other or with Playfield) a decision must be made as to which object shows in front of the other. Objects which appear to pass in front of others are said to have Priority over them. Priority is assigned to all objects by the CTIA chip before the serial data from each object is combined with the other objects and sent to the TV screen. The priority of objects can be controlled by the microprocessor by writing into the control register PRIOR. The functions of the bits in this register are given in the table in the PRIOR register description in section III. Players and Missiles: The players and missiles are small objects which can be moved quickly in the horizontal direction by changing their position registers. They are called players and missiles because they were originally designed to be used in games for objects such as airplanes and bullets. However, there are many other possible applications for them. The four player-missile color registers, in conjunction with the four playfield color registers and the background color register, make it possible to display 9 different colors at the same time. Pies OBJECTS (no objects = background) GRAPHICS PLAYFLIELD 4 PLAYERS 4 MISSILES MEMORY_MAP CHARACTERS controlled by Display list instructions id AD GCRACTIOD tags (DMACTL ) Playfield DMA Enable Enable MICRO PROCESSOR Figure II.2 0 = eH a DAE TOME 2 Aeee SOURCES LIGAs There are a total of four players and four missiles. The four YY missiles may be grouped together and used as a 5th player. These objects are positioned horizontally by 8 horizontal position registers (HPOS (X))- These registers may be reloaded at any time by the proces- sor, allowing an object to be replicated many times across a horizontal TV line. The shape of a player-missile is determined by the data in its graphics register (GRAF (X))- Players have independent 8 bit graphics registers. The four missiles have 2 bit registers (located within one address). These registers may also be reloaded at any time by the processor, although they are usually changed during horizontal blank time. The data in each graphics register is placed on the display whenever the horizontal sync counter equals the corresponding horizon- tal position register.e The same data will be displayed every line unless the graphic registers are reloaded with new data. The player-missile graphic registers may be reloaded by the micro- processor (GRAF (X)), or automatically from memory with direct memory access (DMA) (see figure II.3). The programmer must place the object graphics in memory, write the player-missile base address (PMBASE), and enable player-missile DMA (DMACTL, GRACTL). The transfer of object graphics from memory to display is then fully automatic. PMBASE specifies the most significant byte (MSB) of the address of the player-missile graphics. The location of the graphics for each object is determined by adding an offset to PMBASE *256 (decimal). The bytes between the base address and the missile data are not used by Antic, so they are available to the programmer. Only the five most significant bits of PMBASE are used with single-line resolution and the six most significant bits are used with two-line resolution. This means that the location of the graphics in memory is restricted to certain page boundaries. Two-line resolu- tion means that each byte of data is repeated for two lines. (see DMACTL, bit 4). 640 (decimal) bytes (5X128) are required for two-line resolution and 1280 bytes (5x256) for one-line resolution. Each byte in the player graphics area represents eight pixels which are to be displayed on the corresponding line(s) of the TV screen. A 1 indicates that the player’s color-lum is to be displayed in that pixel. The graphics may be anything, not just rectangles like the ones in figure II.3. The player graphics may fill the entire height of the screen or they may be only a couple of lines high if the rest of the display data is all O’s. Each byte in the missile display also represents eight pixels, two pixels for each missile. Each pixel may be l, 2, or 4 color clocks, and is determined by the SIZE registers. Playfield: Playfield is always generated by DMA. There are four playfields, each identified by its own color-lum register and collision detection. Playfield is generated by two different DMA techniques: memory map and character. Both methods provide lists of instructions in memory, independent of the player-missile generation. hal es Player-Missile Base Address (PMBASE) = MSB of address. Resolution is controlled by bit 4 of DMACTL. » PMBASE*100 (hex) ADDRESS OFFSET Two-line One-line resolution resolution (hex) (hex) Missile TV SCREEN +180 +300 3 2 1 0 Number ny ~T pp TT OT M = fate |e 17) | le Me +200 +400 m | | 11MO my | — i J PO | P2 Lo | | i +280 +400 Ee ee er ee! © | M3 Pee | +300 +600 I caer | | PZ | | Horizontal position nee ~<~for each object is set +380 +700 = independently by 8 ___ i | horizontal position P3 an registers. +400 +800 Each section of memory maps directly Player-Missile onto total height of TV screen. Vertical screen Object vertical position is determined map in memory only by its location in its section of memorye One byte of memory equals l or 2 television lines vertically. Figure II.2 PULA. BOR SoM S sk LE DMA be Unlike players and missiles, there are no horizontal position registers for playfield. Each player can only have one byte of display per line. Playfield, on the other hand, may require up to 48 bytes per line because it can fill the entire width of the screen. There are three different playfield widths: narrow (128 color clocks), standard (160 color clocks), and wide (192 color clocks). The width is selected by storing into DMACTL. The advantage of a narrower width is that less RAM is required and fewer machine cycles are stolen for DMA. The OS graphics modes use the standard screen width. Display List: The display list is a sequence of display instructions stored in memory. These instructions are either one (1) byte or three (3) bytes long. The display list can be considered a display program, and the Display List Counter that fetches these instructions can be thought of as a display program counter. (10 bit counter plus 6 bit base register.) The display list counter can be initialized by writing to DLISTH and DLISTL. (or OS shadow registers SDLSTH and SDLSTL). Once initialized this counter value is used to address the display list, fetch the instruc- tion, display one (1) to sixteen (16) lines of data on the TV screen, increment the Display List Counter, fetch the next display instruction, and so on automatically without microprocessor control (see DLISTL and DLISTH)- DLISTL and DLISTH should be altered only during vertical blank or when DMA is disabled (see DMACTL). Each instruction defines the type (alpha character or memory map) and the resolution (size of bits on screen) and the location of data in memory to be displayed for a group (1 to 16) of lines. Each group of lines is called a display block. THE DISPLAY LIST CANNOT CROSS A 1K BYTE MEMORY BOUNDARY UNLESS A JUMP INSTRUCTION IS USED. DLISTH (MSB DLISTL (LSB ae Pe oe ee ee ae ee ee ee ee ee D7 [D6 [D5 |p4 |p3 |p2 [D1 |DO D7 [D6 [D5 |pD4 |pD3 |pD2 |D1 [DO 15 Pe TS OT ed Fixed (6 bits) Counter (10 bits) DISPLAY LIST COUNTER II./7 Display Instruction Format: Each instruction consists of either an opcode only, or of an opcode followed by two (2) bytes of operand. ———— Single Byte Display Instruction “ ----Triple Byte Display Instruction The opcode is always fetched first and placed in the Instruction Register.e This opcode defines the type of instruction (1 or 3 bytes) and will cause two more bytes to be fetched if needed. If fetched, these next two (2) bytes will be placed in the Memory Scan Counter, or in the Display List Counter (if the instruction is a Jump). Display Instruction Register (IR): This register is loaded with the opcode of the current display list instruction. It cannot be accessed directly by the programmer. There are three basic types of display list instructions: blank, jump, and display. Blank (l-—byte) D7|D6{D5{D4} O} O} O| O This instruction is used to create 1 to 8 blank lines on the display (blackground color). D7 1 = display list instruction interrupt “» D6 —- D4 0-7 = 1-8 blank lines D3 - DO 0 = blank Jump (3-bytes) De POON etek OE Oy Ot ak This instruction is used to reload the Display List Counter. The next two bytes specify the address to be loaded (LSB first). D7 1 = display list instruction interrupt D6 0 = jump (creates one blank line on display) 1 = jump and wait until end of next vertical blank D5-D4 X = don’t care D3-D0 1] = jump Display (1 or 3 bytes) D7|1D6|D5/|D4|D3/|D2/D1/D0 This instruction specifies the type of display for the next display block. D7 1 = display list instruction interrupt D6 O = 1 byte instruction 1 = 3 byte instruction (reload Memory Scan Counter using address in next two bytes, LSB first). “a D5 1 = vertical scroll enable | D4 1 = horizontal scroll enable D3-DO 2-F = display mode (memory or character map - see following pages). II.8 age | SddO0d0 NOILONALSNI AVIdSIG €°II eansty (UuaxeTDS UIPTA pAepue/eyAS) STTI. TeUOZTAOWH Jo Asquny (sodfQ pToetyAeTd + punorisy0eg) saioToD Jo azsquny | T1909 zed sout—T AL jo azoquny se | | | | Gi) da}) da) do; Aad} AaV~_ d6, a8); aL, a9 | aS; ay| ae} Ac} at} dod |\da|aa|aq|ao|aal|avl|]a6laeg|az|a9|a¢|a7| aE] 97] aT] FO] CT" 9" 091) <4 |di|aa|aa|ao| aa] av| a6] ag|az|a9|as| av] ae|az|at| aol (Z°7°O9T) a suOTJONISUI Ppa 1931900 }99 (90 10V1906 19819071909: 06 197190197 190T190.1 (T*Z7°O9T) a apow dey Arouey |da|aqu|aqa|ao|ag|avia6l|ag|azi|a9|as|aqv|ae|az|at|ao| (oC OO) a lval Val Va|vVoOlvalVV|V6élVvs|VZ|V9IlVS|V7IVE|V7ZI|VI| VO (7°7°08) 4 l6dl6a/6al60|6al6v166/68/6216916S/67/6€]|67/6T]/60| CHC De) 3% lsa|/salsalsolsalsviséeélssisziso9lesi|sr7iselszistl|sol (87°07) dvVW [LGa[ LAL LGILZOILZAILZVIZ6IZ8IZZIZ9IZSI2Z71ZE1Z7/ZTIZo| «6(9TSSf07) =, l9d/9d|9a|90/9a19V19619819219919S|947/9€E19719T| 90 Co7 G00): 4 suoT}oOnijsuy lcd|Ga]salcolcalsvl]scélcslczi|solsclisri[celozli[stlso|] (9TSr‘O7) , epow tazoeAeYO lvalvaleralrolrvalryvilvelvslyzly7olevslyrylvelyzl|y71ti|70| (O°o" OR) | [Jed ECALECIEOlEGIEVIEC6IESIELZIECIIESIEVIECElTEZTIETIEO] CoTszsor) ,, (234q € OST®#) Rag Wace bad aren Ai Gra a Ace Ag aren pres a Wale Aw Se (bare a rae (8°7°0O7) UHO yuUeT_ *F19A TOF BFeM Q dune fw Fou F: ae ato oT oF. Fh of oh sh dey aqAL (uoTZoOnAjysuT o34q €) dune Fou | - f- + & Frey fF f FF - & FT {hot dwe SouTT g yUueT lf tf & | 2 bb & GOar f- Jk ff. b a # shox 8 ou Sout, £ nay € YuelT” Poo Fe doe ek ow ok OO a oC: si soutTyT 7 yueT” fot - & yf tf -§ JO6r ¢ i CR -f oF Sb Pon Cai eUuTT T AueTA Roh TF ose fe ou OBA EO PE. EGO T ATd | be ee Oe a a FANnAIAS UT UOTJonaAysuy AeTAdstgq PERC ePoeheabeahedpe aes. LdNddaLNil LSNI (934q €) ueos ATOWSM PROT NVOS Wan Cl BUET[TOIIS TBVTIAVA TOUOSA BUTT TOI9S Te UOoZTAOP TOUOSH Bit 7 of a display list instruction can be set to create a display list interrupt if bit 7 of NMIEN is set. The display list interrupt code can change the colors or graphics during the middle of the TV display. The type of interrupt is determined by checking NMIST. NMIRES clears NMIST.- The current OS will vector through VDSLST (Hex 200 and 201) to the user’s display list interrupt routine. See the OS manual for program- ming details. Bits 5 and 4 of a display type of display list instructions are used to enable vertical and horizontal scrolling. The amount of scrolling depends on the values in the VSCROL and HSCROL registers (to be described later). Memory Scan Counter: This counter is not directly accessible by the programmer. It is loaded with the value in the last 2 bytes of a 3 byte (non-Jump) instruction. This counter points to the location (address) in memory of data to be directly displayed (memory map display) or to the location of character name strings to be indirectly displayed (character display). A single byte instruction does not reload this counter. This implies a continuation in memory of data to be displayed from that displayed by the previous instruction. Since this counter really consists of 4 bits of register and 12 of actual counter, a continuous memory block cannot cross 4K byte memory boundaries, unless the counter is repositioned with a 3 byte Load Memory Scan Counter instruction. MSB third byte of 3 byte LSB Second byte of 3 byte instruction byte instruction D5 1- Tato: EZ Fixed (4 bits) Counter (12 bits) Memory Map Display Instructions: Data in memory (addressed by the Memory Scan Counter) is displayed directly when executing a memory (bit) map display instruction. As data is being displayed it is also stored in a shift register so that it can be redisplayed for as many TV lines as required by the instruction. II.10 “a — Memory Scan Counter Addresses each byte One line worth of memory is loaded into the shift register Shift register data is displayed for four TV scan lines in this example. In Instruction Register (IR) display modes 8 through F, one or two bits of memory are used to specify what is to be displayed on each pixel of the screen. Pixel sizes range from 1/2 clock by 1 TV line to 4 clocks by 8 TV lines. The OS and BASIC support most of these graphics modes (BASIC GRAPHICS command). Two modes, C and E, are not supported by the OS. These modes have rectangular pixels, which are approximately twice as wide as they are high. In IR mode F, only one color (COLPF2) can be displayed. Two different luminances are available. If a bit is a zero, then the luminance of the corresponding pixel comes from COLPF2. If the bit is a one, them the luminance is determined by the contents of COLPFl (abbreviated to PFl). In IR modes 9,B, and C, two different colors can be displayed. A zero indicates background color and a one indicates PFO color. The difference between the various modes is in the size of the pixels. In IR modes 8,A,D, and E, two bits are used to specify the color of each pixel. This allows four different colors to be displayed. However, only four pixels can be packed into each byte, instead of eight as in the previous modes. The bit assignments are shown below. SHIFT REGISTER a ee ee a: 2 bits form one pixel 5 Memory Map Display Modes | os | [Colors |Pixels|Bytes|]Scan |Color | | Bit | | | and |Inst.| per | per | per |Lines|Clocks|Bits |Values|Color | |BASIC|Reg. | Mode | Std. |Std. | per | per |per | in | Reg. | |Modes | HEX Line | Line|Pixel|Pixel |Pixel|Pixel |Select| | | | | | | | | | OO | BAK | | 3 | 8 | 4 | 40 | 10] 8 | 4 | 2. ‘P04 | PFO | | | | | | | | | | 10 | PFl | | | | | | | | | | 11 | pF2 | | | | | | | | | | | | | 4 | 9 | 2 ; B20 £ TO | --% iP 2 | 1 | O | BAK | | | | | | | | | | 1 | PFO | SLE! AE Se eRe Le RES eee SAC e ST SONS See Le | | | | | | | | | 0O | BAK | , S& o A 4 | 80 | 20 | 4 | 2 |. v2. “OF | PFO | | | | | | | | | | 10 | PF1 | | | | | | | | | eo ee es | | | | | | | | | | | | 6 | B | 2 ‘|{|160 | 20] 2 | 1 | 1 | O J BAK f | | | | | | | | | 1 | PFO | [RRC RRS ENR, CONROE CREAN: AMER SC AAREESTIE UMN | (SOO mINOe, meee seS | | | | | | | | | | | | - | c | 2 | 160 | 20] 1 | 1 | 1 | O | BAK | 7 | | | | | | | | 1 | PFO | ET Renee: MOSM ENN (LOSE! NUTT CSUMRE TE EONS AUC Nee we | | | | | | | | | 0O | BAK | YZ ils De 4 | 160 | 40 | 2 | 1 i 2 it OL | PFO | | | | | | | | | ee es | | | | | | | | | 2) See es ee | | | | | | | | | 0O | BAK | | - | E | 4 | 160 | 40] 1 | 1 | 2 | Ol | PFO | | | | | | | | | PiG- | -BFb | | | | | | | | | | 11 | PF2 | | | | | | | | | | | | | 8 | F | 1% | 320 | 40o[ 1 | % | 1 | O | PF2 | | | | | | | | | | 1 | PFI | fis i2 Character Display Instructions: The first step in using the character map mode is to create a character set in memory (or the built-in OS YY character set at hex E000 may be used). The character set contains eight bytes of data for the graphics for each character. The meaning of the data depends on the mode. The character set can contain 64 or 128 characters, also depending on the mode. The MSB (Most Significant Byte) of the address of the character set is stored in CHBASE (or the OS Shadow CHBAS). Only the most significant six or seven bits of CHBAS are used (see CHBASE description in section III)- The other one or two bits and the LSB of the address are assumed to be zero, so the character set must start at an acceptable page boundary. The next step is to set up the display list for the desired mode. Then the actual display is set up- This consists of a string of character mames or codes. Each name takes one byte. The last 6 or 7 bits of the mame selects a character. For a 64 character set, the name would range from O through 63 (decimal). For a 128 character set, the range would be 0 through 127 (decimal). The upper one or two bits of the name byte are used to specify the color or other special information, depending on the mode. Character names (codes) are fetched by the memory scan counter, and are placed in a shift register. On any given line of display the shift register rotates, changing only the name portion of the character address, as shown below. After a full line of character data has been displayed the line counter will increment. The next line again addresses all characters by name for that line number. In 20 character per line modes the seven most significant bits of CHBASE are used. This requires that the character set to start upon a 512 byte memory boundary. The set must contain 64 charcters, 8 bytes each, giving a total of 512 bytes for the set. The 40 character per line modes use the six most significant bits of CHBASE,forcing the character set to start on a IK byte memory boundary. The set must have 128 characters of 8 bytes each. This gives a total of 1024 bytes for the set. | Hex | Graphics | Chars. | Number | Bytes | Number | Bytes | | Code | Mode | Per | of | per | of Char. | in | Line Colors Char. in set Char Set | | | | | | | | Z 0 40 2 8 128 1024 | | | | | | | | 3 _ 40 2 8 128 1024 | | | | | | | | 4 o 40 4 8 128 1024 | | | | | | | | 5 = 40 4 8 128 1024 | | | | | | | | 6 ih 20 5 8 64 12 | | | | | | | | 7 2 20 5 8 64 a17 Character Display Internal codes for (20 Character per line mode example) characters . in memory Codes (names) Stored in Shift Register F X Register Color Address portion of Register Character name Select CHBASE Counter — < dP l. 5] | | | | | | | | foe i | | | | | | | | | | | | | | | | | | [Bit lade PEs | = 1 | | | | | | | | | - | O | BAK | ae: Set ees 5 20° i 38 off ot fk a 6200 eat | PFO | | | | | | | | 2OlS i pBE ta | | | | | | | OP oa ee ey WS [ieee ott eee peee Oe eed |e eee eee et an ee ele kee ieen eee eet | | | | | | | | - {| O | BAK | aos nn ae Ge, e 2205 Ge ob eat | 1 | OO | | PFO | | | | | | | | ae 6 8 AN Is CANNY aks 355 7 | | | | | | (RS NY ee | As Fs | Civ] Vertical and Horizontal Fine Scrolling: Playfield objects are difficult “s to move smoothly- Memory map playfield can be moved by rewriting sections of memorye- However, this is extremely time-consuming if large sections of the screen must be moved smoothly. Character playfield objects can be moved easily in a jerky fashion by changing the memory scan counter. However, this results in a large position jump from one character position to another, not a smooth motion. For this reason hardware registers (VSCROL and HSCROL) and counters are provided to allow smooth horizontal or vertical motion, up to one character width horizontally and up to one character height vertically. After this much smooth motion has been done by increasing the value in these registers, memory is rewritten or the memory scan counter is modified and smooth motion is resumed for another character distance. Vertical Scrolling: A zone of playfield on the screen can be scrolled upward by using VSCROL and bit 5 of the display list instruction. The display blocks at the upper and lower boundaries of the zone must have a variable vertical size. In particular, the first display block within that zone must be shortened from the top, and the last display block must be shortened from the bottom (i-e.- not all of the top and bottom blocks will be displayed). The vertical dimension of each display block is controlled by a 4 bit counter within the ANTIC, called the “Delta Counter’ (DCTR). Without vertical scrolling, it starts at O on the first line, and counts up to a standard value, determined by the current display instruction. (Ex: for upper and lower case text display, the end value is 9. For 5 color character displays, it is 7 or 15.) If bit 5 of the instruction remains unchanged between consecutive display blocks, then the second block is displayed in the normal fashion. If bit 5 of the instruction goes from 1 to 0 between two consecutive display blocks, the second block will start with Delta = 0, as usual, but will count up until delta=VSCROL, instead of the standard value. This shortens that display block from the bottom. To define a vertically scrolled zone, the most direct method is to set bit 5 to l in the first display instruction for that zone, and in all consecutive blocks but the last one. If the VSCROL register is not rewrittren on the fly, this results in a total scrolled zone that has a constant number of lines (provided that the VSCROL value does not exceed the standard individual block size). If N is the standard block size, the top block will be N-VSCROL lines (N > VSCROL ), and the last block will be VSCROL + 1 lines: (N-VSCROL) + (VSCROL + 1) = N + 1- Shown on the following page is an example of a scrolled zone, top block, for 8 VSCROL values for N = 8. Horizontal scrolling is described under HSCROL in section III. 1is1s VSCROL=9% VSCROL=1 VSCROL=2 VSCROL=3 VSCROL=4 VSCROL=5 VSCROL=6 VSCROL=7 pit 5 =9 =17 oe | 2x8+1 | | | \ l | \ \ l \ | l l | { l ! ( To: ios 10 = oo; ; Simple Display List Example: BASIC starts out in OS graphics mode 0 which displays 40 characters across by 24 rows.e- This is IR mode 2 with a standard screen width. The OS sets up the display list near the top of RAM with room for the character names at the top of RAM. On a 32 K=-byte machine, the display list would start at hex /7C20. The next three bytes are hex 70’s to create 24 blank lines. The next byte is a hex 42. The 4 tells the hardware to reload the memory scan counter with the following address (7C40). This is the address of the data to be displayed. The 2 tells the hardware to display one line of IR mode 2 characters. The next 23 bytes specify 23 more lines of mode 2 characters. Hex 41 is the code for jumping and waiting until the end of the next vertical blank. The address to jump to is /7C20, the start of the display list. The next 960 bytes are the list of characters to be displayed, 40 bytes per line. The OS must set up the display list pointer (DLISTH and DLISTL) to the Starting address of the display list (7C20). It also sets CHBASE to the MSB of the address of the character set (EO). This is a simple example because only one mode is used and the memory scan counter is only loaded at one point. It is possible to have different modes on different lines, change character sets and colors, etc., as shown in the example in Section IV. IIT.19 OS Mode 0 Display List (40 chars x 24 lines) Address (hex) Data (hex) ~ 7C20 70 70 24 blank lines 70 42 reload memory scan counter with 7C40, 40 IR mode 2 7G Z 2 Z ° 23 more IR mode 2 instructions 2 Zz Z 41 Jump back to 7C20 and 20 wait for end of vertical blank. TC 7C40 } 960 bytes of display data (character names) Cycle Counting: As explained previously, the ATARI 800 6502 micropro- cessor runs at a rate of 114 machine cycles per TV line (1.79 MHZ). There are 262 lines per TV frame and 60 frames per second on the NTSC (US) system. (The PAL (Europeon) system is different. See the section on NTSC vs. PAL.) Each machine cycle is equivalent in length to 2 color clocks. There are 228 color clocks on a TV line. The highest resolution graphics modes have a pixel size of 1/2 color clock by 1 TV line. Horizontal blank takes 40 machine cycles. This is when the beam returns to the left edge of the screen in preparation for displaying the next TV line. A wait for Sync (WSYNC) instruction stops the 6502. The processor is restarted exactly 7 machine cycles before the beginning of the next TV line. The program can thus change graphics or colors during horizontal blank in preparation for the next line. The ANTIC chip steals cycles from the 6502 in order to do memory refresh and fetch graphics data when needed. The general rule to remember is that each byte fetched from memory requires one machine cycle. If a display list memory map instruction extends over several lines then the data is only fetched on the first line. Memory refresh takes 9 cycles out of every line, unless pre-empted by a high-resolution graphics modee Memory refresh continues during vertical blank. Missile DMA takes one cycle per line in the one-line resolution mode and one cycle every other line in the two line resolution mode.e Missile DMA can be enabled without doing player DMA. However, if player DMA is enabled then missile DMA will also be done (see DMACTL, GRACTL bits). a“ Player DMA requires 4 cycles every one or two lines, depending on the resolution used. II.20 Each fetch of a display list byte takes one cycle, so three cycles are required for a three byte instruction. Player/missile and display list instruction fetch DMA take place during horizontal blank, if they are required for the next line. In memory map modes, the graphics data is fetched as needed throughout the first line of the display list instruction, then saved by ANTIC for use in succeeding lines. In character modes, the character codes are fetched during the first line of each row of characters, along with the graphics data needed for that line.e On the next lines, only the graphics data is fetched, since ANTIC remembers the character codes. In the 40 x 24 character mode, with a standard screen width, most of the cycles during the top line of each row of characters are requried to fetch the character codes and data, so there is only time for one memory refresh cycle instead of the usual nine-e- Less DMA is required with a narrow screen width so two memory refresh cycles would occur in this case. The memory refresh is done fast enough to make up for the lost cycles in the high resolution modes. Once memory refresh starts on a line, it occurs every four cycles unless pre-empted by DMA. All interrupts reach the 6502 near the end of horizontal blank. With standard or narrow screen widths, refresh DMA starts after the end of horizontal blank. The time at which ANTIC does cycle stealing is deterministic, but depends on the graphics mode, screen width and whether or not horizontal scrolling is enabled. Horizontal scrolling requires extra graphics data: see HSCROL. ANTIC does horizontal scrolling of an even number of color clocks by delaying the time at which it DMA’s the data. To do an odd number of color clocks (which involves half of a machine cycle), ANTIC has a one color clock internal delay. Theoretically, it is possible to write a program which changes graphics or colors "on the fly", i-e. during the middle of a TV line. However, with all the DMA going on, the cycle counting gets to be quite complicated, and is beyond the scope of this manual. There are a number of delays associated with the display of graphics. These occur in the ANTIC and the CTIA. The ANTIC sends data to the CITA which adds in the color information. Thus the timing for changing colors on the fly is different from that for changing graphics on the fly. BB Eero | Horizontal Blank DMA Timing When DMA is enabled, cycles are stolen at the times shown below. End of ere | Horizontal Blank ne 20 machine cycles (40 color clocks) 1-9 refresh cycles. char.e and graphics WSYNC data DMA (depends on graphic mode) Interrupt Address DMA (3-byte display list instruction) Player Display list instruction fetch DMA Missile DMA Cycle Counting Example: This example uses the 40 character by 24 line display list given on page II.24. This display list is 32 bytes long so display list DMA takes 32 machine cyclese It takes 960 cycles to DMA the characters and 8*960 to DMA the character data. The refresh DMA takes 9 cycles for each of 262 lines, except for the 24 lines where the characters are read, where only 1 refresh cycle occurs. DMA description Machine cycles display list 32 characters 40x24 = 960 character data 960x8 =7680 refresh 262x9-24x8 =2166 total 10838 Thus the total DMA per frame is 10838 machine cycles. One frame is 262 lines with 114 machine cycles per line for a total of 29868 machine cycles per framee Thus 36% of each frame is required for DMA in OS graphics mode Q. NTSC vs. PAL Systems: There are two versions of the ATARI 800: the NTSC (United States T.V. standard) and PAL (one of the European T.V. standards). The PAL system has been designed so that most programs will run without being modified. However, some differences may be noticeable. There is a hardware register (PAL) which a program can read to determine which type of system it is running on and adjust accordingly. iiece The PAL T.V. has a slower frame rate (50 Hz. instead of 60 Hz.) so games will be slower unless an adjustment is made.e PAL has more T.V. oS lines per frame (312 instead of 262). The Atari 800 hardware compensates for this by adding extra lines at the beginning of vertical blank. Display lists do not have to be altered. However, their actual vertical height will be shorter. PAL ATARI 800 colors are similar to NTSC because of a hardware modification. Be POKEY Audio: There are 4 semi-independent audio channels, each with its own frequency, noise, and volume control. Each has an 8 bit "divide by N" frequency divider, controlled by an 8 bit register (AUDFX). (See audio-serial port block diagram.) Each channel also has an 8 bit control register (AUDCX) which selects the noise (poly counter) content, and the volume. Frequency Dividers: All 4 frequency dividers can be clocked simltane- ously from 64 KHZ or 15 KHZ. (AUDCTL bit 0)- Frequency dividers 1 and 3 can alternately be clocked from 1.79 MHZ (AUDCTL bits 6 and 5). Dividers 2 and 4 can alternately be clocked with the output of dividers 1 and 3 (AUDCTL bits 4 and 3). This allows the following options: 4 channels of 8 bits resolution, 2 channels of 16 bit resolution, or 1 channel of 16 bit and 2 channels of 8 bit. Poly Noise Counters: There are 3 polynomial counters (17 bit, 5 bit and 4 bit) used to generate random noise. The 17 bit poly counter can be reduced to 9 bits (AUDCTL bit 7). These counters are all clocked by 1.79 MHZ. Their outputs, however, can be sampled independently by the four audio channels at a rate determined by each channel’s frequency divider. Thus each channel appears to contain separate poly counters (3 types) clocked at its own frequency. This poly counter noise sampling is controlled by bits 5,6 and 7 of each AUDCX register. Because the poly counters are sampled by the "divide by N" frequency divider, the output obviously cannot change faster than the sampling rate. In these modes (poly noise outputted) the dividers are therefore acting as "low pass" filter clocks, allowing only the low frequency noise to pass. The output of the noise control circuit described above consists of pure tones (square wave type), or polynomial counter noise at a maximum frequency set by the "divide by N" counter (low pass clock). This output can be routed through a high pass filter if desired (AUDCTL bits 1 and Z)% Lie2o Audio Noise Filters: VOL Low pass noise cut off set by Divide by N counter. Low Frequency Noise Frequency Any channel noise output (without high pass filter) VOL Channel 3 Channel l - by N - by N Frequency Channel 1 output (with high pass filter) VOL Channel 4 Channel 2 (or 3 & 4) (or 1 & 2) - by N - by N Frequency Channel 2 output (with high pass filter) Clock IL.24 High Pass Filters: The high pass filter consists of a "D" flip flop and an exclusive-OR Gate. The noise control circuit output is sampled by YY this flip flop at a rate set by the "High Pass" clock. The input and output of the Flip Flop pass through the exclusive-OR Gate. If the flip flop input is changing mich faster than the clock rate, the signal will pass easily through the exclusive-OR Gate. However, if it is lower than the clock rate, the flip flop output will tend to follow the input and the two exclusive-OR Gate inputs will mostly be identical (11 or 00) giving very little output. This gives the effect of a crude high pass filter, passing noise whose minimum frequency is set by the high pass clock rate.e Only channels 1 and 2 have such a high pass filter. The high pass clock for channel l comes from the channel 3 divider. The high pass clock for channel 2 comes from the channel 4 divider. This filter is included only if bit 1 or 2 of AUDCTL is true. Volume Control: A volume control circuit is placed at the output of each channel. This is a crude 4 bit digital to analog converter that allows selection of one of 16 possible output current levels for a logic true audio input. A logic zero audio input to this volume circuit always gives an open circuit (zero current) output. The volume selection is controlled by bits O thru 3 of AUDCX. "Volume Control only" mode can be invoked by forcing this circuit’s audio input true with bit 4 of AUDCX. In this mode the dividers, noise counters, and filter circuits are all discon- nected from the channel output. Only the volume control bits (0 to 8 of AUDCX) determine the channel output current. The audio output of any channel can be completely turned off by writing zero to the volume control bits of AUDCX. All ones gives maximum volume. Ce SERIAL PORT The serial port consists of a serial data output (transmission) line, a serial data input (receiver) line, a serial output clock line, a bi-directional serial data clock line, and other miscellaneous control lines described in the Operating System Manual. Data is transmitted and received as 8 bits of serial data preceded by a logic zero start bit, and succeeded by a logic true stop bit. Input and output clocks are equal to the baud (bit) rate, not 16 times baud rate. Transmitted data changes when the output clock goes true. Received data is sampled when the input clock goes to zeroe Serial Output: The transmission sequence begins when the processor writes 8 bits of parallel data into the serial output register (SEROUT) (see audio and serial port block diagram). When any previous data byte trans- mission is finished the hardware will automatically transfer new data from (SEROUT) to the output shift register, interrupt the processor to indicate an empty (SEROUT) register (ready to be reloaded with the next byte of data), and automatically serially transmit the shift register contents with start-stop bits attached. If the processor responds to the interrupt, and reloads SEROUT before the shift register is completely transmitted, the serial transmission will be smooth and continuous. Eie2o Output data is normally transmitted as logic levels (+4V=true OV=False). Data can also be transmitted as two tone information. This mode is selected by bit 3 of SKCTL.- In this mode audio channel 1 is transmitted in place of AY logic true, and audio channel 2 in place of logic zero. Channel 2 mst be the lower tone of the tone pair. The processor can force the data output line to zero (or to audio channel 2, if in two tone mode) by setting bit 7 of SKCTL. This is required to force a break (10 zeros) code transmission. serial Output Clock: The serial output data always changes when the serial output clock goes true. The clock then returns to zero in the center of the output data bit time. The baud (bit) rate of the data and clock is determined by audio channel 4 audio channel 2, or by the input clock, depending on the serial mode selected by bits 4, 5, and 6 of SKCTL. (See chart at end of this section.) Serial Input: The receiving sequence begins when the hardware has received a complete 8 bit serial data word plus start and stop bits. This data is automatically transferred to the 8 bit parallel input register (SERIN), and the processor is interrupted to indicate an input data byte ready to read in SERIN. The processor must respond to this interrupt, and read SERIN, before the next input data word reception is complete, otherwise an input data "over-run" will occur. This over-run will be indicated by bit a) 5 of SKSTAT (if bit 5 of IRQST is not RESET (true) before next input complete), and means input data has been lost. This bit should be tested whenever SERIN is reade Bit 7 of SKSTAT should also be tested to detect frame errors caused by extra (or missing) data bits. Direct Serial Input: The serial data input line can be read directly by the microprocessor if desired, ignoring the shift register, by reading DLE-4 Of SKSIATs Bi-Directional Clock: This clock line is used to either receive a clock from an external clock source for clocking transmitted or received data, or is used to supply a clock to external devices indicating the transmit or reception rate. This clock line direction is determined by the serial mode selected by bits 4, 5, and 6 of SKCTL. (See mode chart at the end of this section.) Transmitted data changes on the rising edge of this clock. Received data is sampled on the trailing edge of this clock. Asynchronous Serial Input: Unclocked serial data (at an approximately known (+5%) rate) can be received in the asynchronous modes.e. The receive (input) shift register is clocked by audio channel 4. Channels 3 and 4 should be used together (AUDCTL bit 3 = 1) for increased resolution. In asynchronous modes, channels 3 and 4 are reset by each start bit at the “a beginning of each serial data byte. This allows the serial data rate to be slightly different from the rate set by channels 3 and 4. II .26 Serial Mode Control: There are 6 useful modes (of the possible 8) controlled by bits 4, 5, and 6 of SKCTL. These are described on the next page. Note that two tone output (bit 3 of SKCTL) may be used in any of these modes except for the bottom pair. This is because channel 2 is used to set the output transmit rate and is therefore not available for one of the two tones. Note that the output clock rate is identical to the output data rate. serial Mode Control (see also register description SKCTL): Force Break [D7 [D6 |D5|D4|D3|D2|D1|DO| SKCTL REGISTER Pot scan and keyboard CTRL | | J | a ae ro ob f 4 | ‘te f 4 Two Tone Control | | {| | | | [ | | | | | | | | Mode Control Bits A=asynchronous | {| |[ [Out | Out | In | Bi-Dir | | D6/D5|D4|Rate Clock Rate Clock Comments oe oa ee | | | ext |Trans. & Receive rates set by | lO |0 |O Jext | ext | ext | input [external clock. Also internal | | | | | | | | [clock phase reset to zero. | | | | | | | chan | ext |Trans. rate set by external | lO ]O |1 Jext | ext | 4 | input |clock. Receive asynch. (ch. 4) | A CH3 and CH4) A. | | | chan |Trans. & Receive rates set by | lO |1 [0 |[chan| chan | chan | 4 [Chane 4. Chan. 4 output on Bi-| 4 4 4 output Directional clock line. lO |1 |1 |CH4 | CH4 | CH4 | INot Useful | A A A input | | | |ehan|] chan | ext | ext |[Trans. Rate Set by Chan. 4 | 11 Jo |o | 4 | 4 | | input |Receive Rate set by External | Clock. | l1 |O {1 |CH4 | CH4 | CH4 | INot Useful | A A A input | | | |Chan| Chan | Chan | Chan |Trans. rate set by chan. 2 | it. fi. 70. |}.2-. |, 2 | 2 | 4 |Recieve rate set by chan. 4 Chan. | Output 4 out on Bi-Direct. Clock line. a | | | | Input |Trans. Rate set by Chan. 2. Re-| [1 [1 |1 [Chan| Chan | Chan | not |ceive async. (chan 3&4) Bi-Dir.| S ge hh 2-w 2@ _ | used |Clock not used (Tri-state condi- | | | | | | | A | | tion) | Two tone (bit3) not useable in these modes iiez? De INTERRUPT SYSTEM There are two basic types of interrupts defined on the microprocessor: o, NMI (non maskable interrupt) and IRQ (interrupt reqest). It is recommended that a thorough understanding of these interrupt types be acquired by reading all chapters concerning interrupts in the 6502 microprocessor programming and hardware manuals. In this system NMI interrupts are used for video display and reset. IRQ interrupts are used for serial port communication, peripheral devices, timers, and keyboard inputs. NMI Interrupts: Even though NMI interrupts are "unmaskable" on the micrprocessor, this system has interrupt enable (mask) bits for NMI function. (Bits 6 and 7 of NMIEN) When these bits are zero NMI interrupts are disabled (masked) and prevented from causing a microprocessor NMI interrupt.e (see NMIEN register description) The 3 types of NMI interrupts are: l. D/ = Instruction Interrupt (during display time any display instruction with bit 7/7=l will cause this interrupt to occur (if enabled) at the start of the last video line displayed by that instruction.) 2% D6 = Vertical Blank Interrupt (interrupt occurs (if enabled) at the beginning of the vertical blank time interval.) ‘a, a% D5 = Reset Button Interrupt (pushing the SYSTEM RESET button will cause this interrupt to occur.) Since any of these interrupts will cause the processor to jump to the same NMI address, the system also has NMI status bits which may be examined by the processor to determine which source caused the NMI interrupt. Bits 5, 6, and 7 of NMIST serve this function (see NMIST register description). These status bits are set by the corresponding interrupt function (even if the interrupt is masked from the processor by NMIEN). The status bits may be reset together by writing to the address NMIRES. Two of the interrupt enable bits (bits 6 and 7 of NMIEN) are cleared automatically during system power turn on and therefore these NMI interrupts are initially disabled (masked), preventing any power turn on service routine from being interrupted before proper initialization of registers and pointers.* They can then be enabled by the processor whenever desired, by writing into bits 6 and 7 of NMIEN. Except for the reset button interrupt, they can also be disabled by the processor by writing a zero into bits 6 or 7 or NMIEN. The reset button cannot be disabled, allowing an unstoppable escape from any possible "hangup" condition. These NMI interrupt functions are each separated in time (to prevent overlaps) and converted to pulses by the system hardware, in order to supply NMI transitions required by the microprocessor logic. ~ * —- NOTE: Bit 5 is never disabled and therefore the Reset Button should not be pressed during power turn on. II.28 IRQ Interrupts: IRQ interrupts are all "maskable" together by one bit of the status register on the microprocessor. This bit is set to the disable condition automatically by power turn on to prevent interrupt of power turn on service routines.** In addition to this processor IRQ mask bit, there are separate system IRQ interrupt enable bits for each IRQ interrupt function (bits 0 thru 7 of IRQEN). These bits are not initialized by power turn on, and must be initialized by the program before enabling the processor IRQ. The 8 types of IRQ interrupts are: D7 = BREAK KEY (depression of the break key) D6 = OTHER KEY (depression of any other key) D5 = SERIAL INPUT READY (Byte of serial data has been received and is ready to be read by the processor in SERIN register). D4 = SERIAL OUTPUT NEEDED (Byte of serial data is being transmitted and SEROUT is ready to be written to again by the processor). D3 = TRANSMISSION FINISHED (serial data transmission is finished. Output shift register is empty). D2 = TIMER #4 (audio divider #4 has counted down to zero) Dl = TIMER #2 (audio divider #2 has counted down to zero) DO = TIMER #1 (audio divider #1 has counted down to zero) In addition to the above IRQ interrupts (enabled by bits O through 7 of IRQEN and identified by status bits O thru 7 of IRQST) there are two more system IRQ interrupts which are generated over the serial bus Proceed and Interrupt lines. D7 of PACTL DO of PACTL D7 of PBCTL DO of PBCTL peripheral "A" interrupt status bit peripheral "A" interrupt enable bit peripheral "B" interrupt status bit peripheral "B" interrupt enable bit These last two interrupts are automatically disabled by power turn on, and their status bits are reset by reading from port A register and port B register.e (See PORTA, PACTL, PORTB, and PBCTL Register descriptions.) The IRQEN register, like the NMIEN register, enables interrupts when its bits are 1 (logic true). The IRQST however (unlike the NMIST) has interrupt status bits that are normally logic true, and go to zero to indicate an interrupt request. The IRQST status bits are returned to logic true only by writing a zero into the corresponding IRQEN bit. This will disable the interrrupt and simultaneously set the interrupt status bit to one. Bit 3 of IRQST is not a latch and does not get reset by interrupt disable. It is zero when the serial out is empty (out finished) and true when it is not. **x* — NOTE: An NMI also disables the I bit. IL.29 INTERRUPT SUMMARY | | | | | STATUS | NAME FUNCTIONS ENABLE STATUS RESET | | | | | | | | | Display | NMIEN | NMIST | Address | | NMI [Instruction |(Bits 6 thru 7)|(Bits 5 thru 7)| NMIRES | |INTERRUPTS|Vert. Blank | Normally Zero | Normally Zero |(Resets all NMI | Reset Button Disabled) no interrupt) |status together) | | | | | | | | | KEYS | IRQEN | -IRQST | Reset (to true) | | | Serial |(Bits 0 thru 7)|(Bits 0 thru 7)| By Zero in | | | ports | zero is | Normally True | Corresponding | | | Timers | (Disabled)* |[(no interrupt) | Bit of IRQEN | | | | | | (except Bit 3)*| | IRQ | | | | | | INTERRUPTS | Peripheral | DO of PACTL | D7 of PACTL | Reset by | | | A [Normally Zero |Normally Zero | Reading PORT A | | | Disabled) no interrupt) Register | | | | | | | | | Peripheral | DO of PBCTL Ds 9G PBCTL | Reset by | | | B [Normally Zero |Normally Zero | Reading PORT B | Disabled) no interrupt) Register | Ee CONTROLLERS A variety of controllers can be plugged into the four jacks on the front of the console. This includes joysticks, paddle (pot), twelve-key keyboard, and light pen (when available). The controller ports are read through the PORTA and PORTB regisers and the POT and TRIG registers. The OS reads these registers during vertical blank and stores into its own RAM locations. These are STICK, PADDLO through PADDL7, PTRIG’S and STRIG’S. The OS sets up PORTA AND PORTB for input. This is done by setting PACTL or PORTB (Port Control) bit 2 to a O (to select the direction control register), then writing all O0’s to the desired port. PACTL (PBCTL) bit 2 is then changed back to a l, allowing the program to read from the porte The ports can also be set up for output by writing 1°s instead of 0’s while the direction control mode is selected. Joysticks: The joysticks have four switches, one each for right (R), left (L), back (B) and forward (F). These switches are read through PORTA and PORTB. A fifth switch is activated by pressing the red trigger button. The trigger buttons are read from TRIGO through TRIG3. A value of O indicates that a button has been pressed and a 1 indicates that it has not been pressed. II. 30 The TRIG registers are normally read directly, but they can be used ‘oe in a latched mode. Writing a zero to bit 2 of GRACTL disables the latches and sets them to l. Writing a l to bit 2 enables the latches. If a joy- stick trigger button is pushed at any time while bit 2 of GRACTL is l the latch value will change to zero and stay that way. A program can use this to determine whether the joystick trigger buttons have ever been pressed during a certain period of time. Paddles: The paddles come in pairs, so eight paddles can be connected to the four jacks. The paddles are read by storing into POTGO, then reading the POT registers at least 228 lines later. The values range from 0 (with the paddle turned to the right) to 228 (paddle turned counter-clockwise). The value indicates how many TV lines it takes to charge up the capacitor which is the series with the potentiometer. Turning the knob to the right lowers the resistance, so the capacitor charges up quickly. Turning the knob to the left increases the resistance and the charging time. The capacitor dump transistors are used to discharge the capacitors so that a new reading can be mode. The POTGO command clears the counters and turns off the dump transistors to allow the capacitors to charge upe The ALLPOT register contains one bit for each paddle. When the capacitor has charged up to the threshold value the ALLPOT bit changes fron one to zero and the POT register contains the correct readings. Bit 2 of SKCTL (Serial Port Control) enables fast pot scane In this mode, It takes only two scan lines to charge up the capacitors to the maximum level instead of 228 lines. Bit 2 is first set to 0 to dump the capacitors. Then Bit 2 is set to l to start the pot scan. The fast pot scan is not as accurate as the normal scan mode. Bit 2 of SKCTL must be set to O to use normal scan mode. Otherwise, the capacitors will never dump- Note that some paddles have a range smaller than 0 to 228 due to differences in the pots. The left and right paddle triggers for each paddle pair are read from the left and right bits for the corresponding joystick (PORTA or PORTB). Keyboard Controllers: Each keyboard controller has a twelve-key pad and plugs into a joystick controller port. The first step in using the keyboard is to select a row by setting the port direction to output and writing a 0 to the bit in the PORTA or PORTB register which selects the desired row (see PORTA, SECTION III). The other rows should have l1’s written to them. Columns are read through the POT and TRIG registers (see controller PORT PINOUT chart in section III). Appendix H of the BASIC Reference Manual contains a Basic program which reads the controllers. The first and second columns of the keyboard use the same pins as the pots for the paddle controllers, so they are read by reading the POT (or PADDL) registers. When a button is pushed, the pot line is grounded, so the pot capacitors never charge up to the threshold level and the reading is 228 (the maximum). When the button in the selected row and column is not pushed the capacitor is connected to +5V through a relatively small resistor, giving a POT value of about 2 (this may vary). Since the reading is not critical, the fast pot scan mode can be used, so that only a 2 line wait is required between selecting the row and reading the POT register. The convention has been adopted of comparing the POT reading with 10 (decimal). If is it greater than 10 then the button has been pressed. The third column is read through the joystick trigger line, so it works just like a joystick trigger (O=button is pressed, l=not pressed). Liesl Light Pen: A light pen is a device that can detect the electron beam as it sweeps across the TV screen. It is used to point directly at an image on the TV display- Applications include selecting menu items and drawing lines. The ATARI 400/800 hardware was designed so that a light pen can be plugged into any of the joystick controller ports (see end of section EET) When any one of the joystick trigger lines (pin 6) is pulled low, the ANTIC chip takes the current VCOUNT value and stores it in PENV. The horizontal color clock value (0-227 decimal) is stored in PENH. The least significant bit is inaccurate and should be ignored. Since there are a number of delays involved in displaying the data and changing the light pen register, each system mst be cal brated. Software which uses the light pen should contain a user-interactive calibration routine. For example, the user could point the light pen at a crosshair in the center of the screen and the program could compute the required horizontal offset. PENH will wrap around from 227 to O near the right hand edge of a standard width display because of the delay. The pen will not work if it is pointed at a black area of the screen, since the electron beam is turned off. It is a good idea to read two (or more) values and average them, since the user will probably not hold the pen perfectly steady. Eieoe IIL. HARDWARE REGISTERS This section lists the hardware registers and Operating System (OS) shadow registers. In the following descriptions, true always refers to a bit whose value is l. A. PAL (D014) Not 1 3.1 D2. DL LINOE Used Used 1 1 1 NTSC (US TV) 0 0 0 PAL (European TV) This byte can be read by a program to determine which type of system the program is running on. Be INTERRUPT CONTROL NMIEN (Non Maskable Interrupt Enable) (D40E): This address writes data to the NMI interrupt enable bits. 0 = disabled (masked) 1 = enabled | Nl Not DZ D6 Used D7 Display List Instruction Interrupt Enable. This bit is cleared by Power Reset, and may be set or cleared by the processor. D6 Vertical Blank Interrupt Enable. This bit is cleared by Power Reset, and may be set or cleared by the processor. SYSTEM RESET Button Interrupt This interrupt is always enabled. The SYSTEM RESET button should not be pressed during power turn on. (Set to hex 40 by OS IRQ code.) yO et NMIST (Non Maskable Interrupt Status) (D40F): This address read the NMI Status Register (Read by OS NMI code). “ O = no interrupt 1 = interrupt | | | Not D7 D6 D5 Used D7 This bit identifies an NMI interrupt caused by bit 7 of a Display List Instruction. D6 This bit identifies an NMI interrupt caused by the beginning of vertical blank. D5 This bit identifies an NMI interrupt caused by the SYSTEM RESET button. NMIRES (NMI Status Register Reset) (D40F): This write address resets the Non Maskable Interrupt Status Register (NMIST). Used ( Written by OS NMI code.) a“ IRQST (IRQ Interrupt Status) (D20E): This address reads the data from , the IRQ Interrupt Status Register. © l = Interrupt = No Interrupt ees | Break Key Interrupt Other Key Interrupt Serial Input Data Ready Interrupt Serial Output Data Needed Interrupt Serial Output (Byte) Transmission Finished Interrupt * Timer 4 Interrupt Timer 2 Interrupt Timer 1 Interrupt o > il S GeO ou a * — NOTE: Used for generation of 2 stop bitse See IRQ description in section II (no direct reset on bit 3). Lites IRQEN (IRQ Interrupt Enable) (D20E): This address writes data to the IRQ & Interrupt Enable bits. 0 disable, corresponding IRQST bit is set to l 1 = enable D7 Break Key Interrupt Enable D6 Other Key Interrupt Enable D5 Serial Input Data Ready Interrupt Enable D4 Serial Output Data Needed Interrupt Enable D3 Serial Out Transmission Finished Interrupt Enable D2 Timer 4 Interrupt Enable D1 Timer 2 Interrupt Enable DO Timer 1 Interrupt Enable OS SHADOW: POKMSK (hex 10) Use AND’s and OR’s to change one bit in POKMSK without affecting the others. Store the desired value in both IRQEN and POKMSK. C. TV LINE CONTROL VCOUNT (Vertical Counter) (D40B): This address reads the Vertical TV Line Counter (8 most significant bits). VO not read. V8 V7 V6 V5 V4 V3 V2 Vl VO Two line resolution supplied. WSYNC (Wait for Horizontal Blank Synchronism — ieee. wait until start of next TV line.) (D40A): This address sets a latch that pulls down on the RDY line to the microprocessor, causing it to wait until this latch is automatically reset by the beginning of horizontal blank. Display list interrupts may be delayed by 1 line if WSYNC is used. (Used by OS keyboard click routine.) Lit. D. GRAPHICS CONTROL DMACTL (Direct Memory Access Control) (D400): This address writes data into the DMA Control Register. Not | | | | | | Used D5 D4 D3 D2 D1 DO D5 = 1 Enable ietnieeion fetch DMA D4 = 1 1 Line P/M resolution D4 = O 2 line P/M resolution D3 = 1 Enable Player DMA D2 = 1 Enable Missile DMA D1,DO = O O No Playfield DMA = QO 1 Narrow Playfield DMA (128 Color Clocks) = 1 O Standard Playfield DMA (160 Color Clocks) = 1 1 Wide Playfield DMA (192 Color Clocks) See GRACTL. OS Shadow: SDMCTL (22F) default value hex 22 GRACTL (Graphics Control)(DOI1ID): This address writes data to the Graphic Control Register. Not | | | Used D2 Dil DO D2 = 1 Enable latches on TRIGO - TRIG3 inputs (latches are cleared and TRIGO —- TRIG3 act as normal inputs when this control bit is zero). Dl = 1 Enable Player DMA to Player Graphics Registers. DO 1 Enable Missile DMA to Missile Graphics Registers. DMA is enabled by setting bits in both DMACTL and GRACTL. Setting DMACTL only will result in cycles being stolen but no display will be generated. III .4 CHACTL (Character Control) (D401): This address writes data into the Character Control Register. Not | | | Used D2 Di DO D2 Character Vertical Reflect Bit. This bit is sampled at the beginning of each line of characterse If true it causes the line of characters to reflect (invert) vertically (for upside down characters). D1 Character Video Invert Flag (used for 40 Character Mode only). If bit 7 of character code is true this flag causes that character to be blue on white (if normal colors are white on blue). DO Character Blank (Blink) Flag (used for 40 Character Mode only). If bit 7 of character code is true this flag causes that character to blank. Blinking characters are produced by setting bit 7 of the characters to 1, then periodically changing DO of CHACTL. OS SHADOW: CHACT (2F3) DLISTL( Display List Low _)(D402): This address writes data into the low byte of the Display List Counter. Display 7 6 5 4 3 Z 1 0 List Counter Bit OS SHADOW: SDLSTL (hex 230) Position. DLISTH (Display List High) (D403): This address writes data into the high byte of the Display List Counter. Display 1) 14 3 LZ ll 10 9 8 List Counter Bit Position. OS SHADOW: SDLSTH (HEX 231) The Display List is a list of display instructions in memory. These instructions are addressed by the Display List Counter. Loading these registers defines the address of the beginning of the Display List. (See sections I and II.) vy Note: The top 6 bits are latches only and have no count capability, therefore the display list can not cross a 1K byte memory boundary unless a jump instruction is used. III.5 DLISTL and DLISTH should be changed only during vertical blank or with DMA disabled. Otherwise, the screen may roll. Bit 7 of NMIEN must be set in order to receive display list interrupts. CHBASE (Character Address Base Register) (D409): This address writes data into the Character Address Base Register. The data specifies the most significant byte (MSB) of the address of the desired character set (see section II). Note that the last 1 or 2 bits are assumed to be 0. 40 Character Modes D7 1D6"- D>: 1 D4. 1D TD2Z * CHBASE re ene SEIT OA AM eT LT TEETH, Poa cae te he PO 9 8 7 6 5 4 S Z HM 0 $e Base Address Char Name Line Counter 20 Character Modes D7 1D6. [D5 (D4 -1D3 1D2. [Di | * CHBASE Sad ie ee © oS ORE i eas ee ee 9 8 7 6 2 4 3 Z 1 @) SE SST SPACE ApEn EE a RCNA TNR GAME ALM a ECTS Base Address Char Name Line Counter OS SHADOW: CHBAS (2F4) PMBASE (Player-Missile Address Base Register) (D407): This address writes data into the Player-Missile Address Base Register. The data specifies the MSB of the address of the player and missile DMA data (see section II). One Line Resolution D7 {D6 |D5 |D4 {D3 not used PMBASE jo a a) Ne a a te 8 9 8 7 6 5 4 5 2 i 0 Type 3. (COLPF3)-. This allows missiles to be positioned together with a common color for use as a fifth player. D3: DZ. “Dl. Priority Select (Mutually Exclusive). & DO These bits select one of 4 types of priority. Objects with higher priority will appear to move in front of objects with lower priority. PFO PFO PF1 PF1 Higher PO PF2 PZ PO P3 PI - PF2 P2 prs + PS | | | | Priority Pl ||PF3 + P5 : | | | | P3 BAK BAK NOTE: The use of Priority bits in a "non-exclusive" mode (more than 1 bit true) will result in objects (whose priorities are in conflict) turning BLACK in the overlap region. EXAMPLE: PRIOR code = 1010 This will black PO or Pl if they are over PFO or PFl. It will also black P2 or P3 if they are over PF2 or “a PF3. In the one-color 40 character modes, the luminance of a : . pixel in a character is determined by COLPFl, regardless of the priority. If a higher priority player or missile overlaps the character then the color is determined by the player’s color. OS SHADOW: GPRIOR (26F) COLPFO - COLPF3 (Playfield Color) (DO16, DO17, D018, D019): These addresses write data to the Playfield Color-Lum Registers. | | | | | | | D7 D6 D5 D4 | D3 D2 D1 DO (see COLBK for bit assignment) OS SHADOWS: COLORO - 3 (2C4-2C7) III.8 COLBK (Background Color) (DOI1A): This address writes data to the Background Color-Lum Register. Ss Color Luminance | | | | | D7 | pé | D5 | D4 | D3 | D2 | D1 Used Zero Luminance (black) Maxe Luminance(white) Grey Gold Orange Red-Orange Pink Purple Purple-Blue Blue Blue Light-Blue Turquoise Green-Blue Green Yellow-Green Orange-Green Light-Orange = RH RHR kK RK OOOO COCO 0C CO See = OO OC 0. HS Oo 0 O'O Rt © Ore OO ee © Oe OO RFP OrFOFOrFOrFOrFOrFOFO OS SHADOW: COLOR4 (2C8) Ee PLAYERS AND MISSILES DMACTL, GRACTL, PMBASE and PRIOR also affect players and missiles. COLPMO - COLPM3 (Player-Missile Color) (D012, DO13, D014, DO15): These addresses write to the Player-Missile Color-Lum Registers. Missiles have the same color-lum as their player unless missiles are used as a 5th player (see bit 4 of PRIOR). A 5th player missile gets its color from COLPF3. | | | | | | | D7 | Dé | D5 | D4 | D3 | D2 | D1 | DO (see COLBK for bit assignments) OS SHADOWS: PCOLRO - 3 (2C0-2C3) GRAFPO — GRAFP3 (Player Graphics Registers): (PO DOOD, Pl DOOE, P2 _ DOOF, P3_ D010): These addresses write data directly into the Player Graphics Registers, independent of DMA. If DMA is enabled then the graphics registers will be loaded automatically from the memory area specified by PMBASE(see page II.3). | | | | | | | D7 | D6 | D5 | D4 | D3 | D2 | D1 | DO Left Right GRAFM (Missile Graphics Registers) (D011): This address writes data directly into the Missile Graphics Register, independent of DMA. D716 05. [DA |) P34 en2°4 D1. | wD0 lo ako) eee ee M3 M2 Ml MO SIZEPO - SIZEP3 (Player Size) (PO D008, Pl D009, P2 DOOA, P3 DOOB): These addresses write data into the Player Size Control Registers. el ee Used Dil Register (Player) 0 0 Normal Size (8 color clocks wide) 0 1 Twice Normal Size (16 color clocks wide) si 0 Normal Size t 1 4 Times Normal Size (32 color clocks wide) With normal size objects, each bit in the graphics register corresponds to one color clock. For larger objects, each bit is extended over more than one color clock. “a SIZEM (Missile Size)(DO0OC): This address writes data into the Missile Size Control Register. | | | | Horizontal Size By ieeD6u Dye tes OZ De DO Register (Missile) M3 M2 Ml MO 0 0 Normal Size (2 color clocks wide) 0 a Twice Normal Size (4 color clocks wide) 1 0 Normal Size , 1 4 Times Normal Size (8 color clocks wide) HPOSPO — HPOSP3 (Player Horizontal Position) (PO DOOO, Pl pDOOIL1, P2 D002 P3 D003): These addresses write data into the Player Horizontal Position Register (see display diagram in section IV). The horizontal positon value determines the color clock location of the left edge of the object. Hex 30 is the left edge of a standard width screen. Hex DO is the right edge of a Standard screen. a“ Litto HPOSMO — HPOSM3 (Missile Horizontal Position) (MO D004, Ml _ D0OO5, M2 D006, M3 D007): These addresses write data into the Missile Horizontal Position Registers (see HPOSPO description). VDELAY (Vertical Delay) (DOIC): This address writes data into the Vertical Delay Register. P3 PZ PI PO M3 M2 Ml MO VDELAY is used to give one-line resolution in the vertical po- sitioning of an object when the 2-line resolution display is enabled. Setting a bit in VDELAY to 1 moves the corresponding object down by one TV line. If player-missile DMA is enabled then changing the verticai location of an object by more than one line is accomplished by moving bits around in the memory map. If DMA is disabled then the vertical location can be set up by assembly language code which stores data into the graphics registers at the desired line. MOPF, MIPF, M2PF, M3PF (Missile to Playfield Collisions) (DOO0O, DOOI, DOO2, D003): These addresses read Missile to Playfield Collisions. A 1 bit means that a collision has been detected since the last HITCLR. Not Used | | | | zero forced D3 D2 Dil DO 3 2 1 0 Playfield Type POPF, PIPF, P2PF, P3PF (Player to Playfield Collisions) (D004, DOO5, DOO06, DOO7): These addresses read Player to Playfield Collisions. Not Used | | | | zero forced D3 D2 D1 DO 3 Z 1 0 Playfield Type MOPL, MIPL, M2PL, M3PL (Missile to Player Collision) (D008, DOO9, DOOA, DOOB): These addresses read Missile to Player Collisions. Not Used | | | | zero forced D3 D2 Di DO 3 Zz 1 0 Player Number POPL, PIPL, P'PL, P3PL_ (Player to Player Collisions) (DOOC, DOOD, DOOE, DOOF): These addresses read Player to Player Collisions Not Used | | | | zero forced D3 D2 Di DO 3 2 1 0 Player Number (Player O against Player 0 is always a zero). Etc. Piles HITCLR (Collision "HIT" Clear) DOIE This write address clears all collision bits described above. ~ Not = Used F. AUDIO AUDCTL (Audio Control) (D208): This address writes data into the Audio Mode Control Register. (Also see SKCTL two-tone bit 3 and notes). D7 Change 17 bit poly into a 9 bit below poly. D6 Clock Channel 1 with 1.79 MHZ, instead of 64 KHZ. DS Clock Channel 3 with 1.79 MHZ, instead of 64 KHZ. D4 Clock Channel 2 with Channel 1, instead of 64 KHZ (16 BIT). D3 Clock Channel 4 with Channel 3, instead of 64 KHZ (16 BIT). D2 Insert Hi Pass Filter in Channel 1, clocked by Channel 3. (See section II.) D1 Insert Hi Pass Filter in Channel 2, clocked by Channel 4. DO Change Normal 64 KHZ frequency, into 15 KHZ. Exact Frequencies: The frequencies given above are approximate. The “ Exact Frequency (fin) that clocks the divide by N counters is given below (NTSC only, PAL different). FIN FIN roximate 1.79 MHZ 1.78979 MHZ - Use modified formula for fout 64 KHZ 63.9210 KHZ - Use normal formula for fout | Ga an 45 A 15.6999 KHZ The Normal Formula for output frequency is: Fout = Fin/2N Where N = The binary number in the frequency register (AUDF), plus 1 (N=AUDF+1). The MODIFIED FORMULA should be used when Fin = 1-/79 MHZ and a more exact result is desired: Fout = Fin 2(AUDF + M) = 4 42 8 bit counter CAUDCTE bit 3 or 4 = 0) 7 if 16 bit counter (AUDCTL bit 3 or 4 = 1) Where: M M fi Os Be Br AUDF1, AUDF2, AUDF3, AUDF4 (Audio Frequenc D200, D202, D204, D206 These addresses write data into each of the four Audio Frequency Control Yy Registers. Each register controls a divide by "N" counter. Note: "N" is one greater than the binary number in Audio Frequency Register AUDF(X). AUDC1, AUDC2, AUDC3, AUDC4 (Audio Channel Control) (D201, D203 D205, D207): These addresses write data into each of the four Audio Control Registerse Each Register controls the noise content and volume of the corresponding Audio Channel. Noise Content or Distortion Volume Divisor "N" set by audio frequency register. - 17 BIT poly - 5 BIT poly - N - 5 BIT poly -N - 2 - 4 BIT poly - 5 BIT poly - N - 5 BIT poly -N —- 2 - 17 BIT poly -N - Pure Tone - N —- 2 - 4 BIT poly -N - Force Output - Lowest Volume (Off) - Half Volume - Highest Volume Litel3 PITCH VALUES FOR THE MUSICAL NOTES-AUDCTL =0, AUDC = hex AX AUDF Hex Dec HIGH C LD 29 NOTES B 1F 31 A# or Bb 21 33 A 23 3» G# or Ab Zo 37 G 28 40 F# or Gb 2A 42 F 2D 45 E 2F 47 D# or Eb 32 50 D 35 a3 C# or Db 39 a7 C 3G 60 B 40 64 A# or Bb 44 68 A 48 Vz G# or Ab 4C 76 G 51 81 F# or Gb 55 85 F 5B 91 E 60 96 D# or Eb 66 102 D 6C 108 C# or Db ved 114 MIDDLE C . 79 L21 B 80 128 A# or Bb 88 136 A 90 144 G# or Ab 99 153 G A2 162 F# or Gb AD 173 F B6 182 E 05 | 193 D# or Eb GC 204 D D9 217 LOW C# or Db E6 230 NOTES C F3 243 STIMER (Start Timer) (D209): This write address resets all audio frequency dividers to their "AUDF" value. These dividers generate timer interrupts when they count down to zero (if enabled by IRQEN). (also see IRQST) Lie RANDOM (Random Number Generator) (D20A): This address reads the high order 8 bits of a 17 bit polynomial counter (9 bit, if bit 7 of AUDCTL=1). a | | | | | | | D7 | Dé | D5 | D4 | D3 | D2 | DI | DO Ge KEYBOARD AND SPEAKER v CONSOL (Console Switch Port) (DOIF): This address reads or writes data from the console switches and indicators. (Set to 8 by OS Vertical Blank code.) Not Used | | | | zero forced) D3 D2 D1 DO Hex 08 should be written to this address before reading the switches. Ones written will pull down on the switch line. CONSOL Bit Assignment: DO Game Start D1 Game Select - 0 means switch pressed. D2 Option Select D3 #=\Loudspeaker - should be held at 1 except when writing 0 momentarily. OS writes a 1 during vertical blank. KBCODE (Keyboard Code) (D209): This address reads the Keyboard Code, and is usually read in response to a Keyboard Interrupt (IRQ and bits 6 or 7 of IRQST). See IRQEN for information on enabling keyboard interrupts. See SKCTL bits 1 and O for key scan and debounce enable. | | | | | | | D706. (D5 | DA [ebaet Do pie DO D7 D6 Control Key Shift Key Read by OS into shadow CH when key is hit. The OS has a get character function which converts the keycode to ATASCII (Atari ASCII). 5 i DR KEYCODE TO ATASCII CONVERSION car_|u.c. fu.c. Jom | leone ea? fu.c. fo.c. lorem CAP LeCe. {U.C. {CTRL CODE {CAP LeC.e. {Ue-Ce |CTRL 6C 4C OC 20 2C 5B 00 bd 6A SPACE 3B CODE 00 D> hI oO —O re ri td ae ws) > nw ~” SS ya ov A. OO 40-3 © eis ae WY * = special handling Liteco He SERIAL PORT (see peripheral connector on console) SKCTL (Serial Port control) (D20F): This address writes data into the register that controls the configuation of the serial port, and also the Fast Pot Scan and Keyboard Enable. (Bits are normally zero | | | | | | | and perform the functions D7 D6 D5 D4 D3 D2 Dl DO shown below when true.) D7 Force Break (force serial output to zero (space))* D6 D5 Serial Port Mode Control (see mode chart at end of Serial port description, page II.34). D3 Two Tone (Serial output transmitted as two tone signal instead of logic true/false.) D2 Fast Pot (Fast Pot Scane The Pot Scan Counter completes its sequence in two TV line times instead of one frame time. The capacitor dump transistors are completely disabled.) D1 Enable Key Scan (Enables Keyboard Scanning circuit) DO Enable Debounce (Enables Keyboard Debounce circuits) DO-D1l (Both Zero) Initialize (State used for testing and initializing chip) ** OS SHADOW: SSKCTL (hex 232) The OS enables key scan and debounce and may change the other bits for different I/O operations. In particular, an aborted cassette operation may leave the two tone bit in the true state, causing undesirable audio signals. This may be corrected by writing hex 13 to both SKCTL and SSKCTL after doing I/O and/or before modifying the audio registers. * NOTE: When powered on, serial port output may stay low even if this bit is cleared. To get S.P. high (mark), send a byte out (recommend OO or FF). **NOTE: There is no original power on state. Pokey has no reset pin. Titel? SKSTAT (Serial Port-Keyboard Status) (D20F): This address reads the Status register giving information about the serial port and keyboard. | | | | | | | (Bits are normally true D7 D6 D5 D4 D3 | D2 {| Dil DO and provide the following information when zero.) D7 = 0 = Serial Data Input Frame Error D6 = O = Serial Data Input Over-run Latches must be D5 = 0 = Keyboard Over-run reset = 1 (SKRES ) D4 = 0 = Direct from Serial Input Port (D5 and D6 are set to D3 = 0 = Shift Key Depressed zero when new data and same bit of IRQST D2 = 0 = Last Key is Still Depressed is zero) Dl = 0 = Serial Input Shift Register Busy DO = 1 Not Used (Logic True) SKRES (Reset above Status Register) (D20A): This write address resets bits 7, 6, and 5 of the Serial Port-Keyboard Status Register to l. SERIN (Serial Input Data) (D20D): This address reads the 8 bit parallel holding register that is loaded when a full byte of serial input data has been received. This address is usually read in response to a serial data in interrupt (IRQ and bit 5 of IRQST).- Also see IRQEN. l. Clock In 2 Clock Out 3. Data In to computer 4. GND or Data Out of Computer 6. GND 7. Command 8. Motor Control 9. Proceed 10. +5 / Ready ll. Audio In 12. +12 LS Interrupt See serial port description in OS manual for more details. III.18 SEROUT (Serial Output Data) (D20D): This address writes to the 8 bit parallel holding register that is transferred to the output serial shift register when a full byte of serial output data has been transmitted. This address is usually written in response to a serial data out interrupt (IRQ and bit 4- of IRQST). 5 ie CONTROLLER PORTS (front of console) PORTA (Port _ A)(D300): This address reads or writes data from Player 0 and Player 1 controller jacks if bit 2 of PACTL is true. This address writes to. the direction control, register if bit. -2 of PACTE- is zero<« 1/0 for both ports (A and B) goes through a 6520/6820 Data Register-Addressed if bit 2 of PACTL is l. Joystick Operation | | | | | | | O=Switch pressed D7 D6 DS D4 D3 D2 D1 DO l=Switch not pressed Right Back Right Back Left Fwd. Left Fwd. Neen Nee, gee Stickl Stick0O (Jack 2) (Jack 1) Paddle Operation | | | | | | | O=Switch pressed D7 D6 D5 D4 D3 D2 D1 DO l=Switch not pressed | L_.. PTRIG2 | L—. PTRIGO PTRIG3 PTRIGI Keyboard Controller Operation | | | | | | | Deo SDo. (D5 4) D4 pa | 2D BO Top Row 2nd Row Jack “i 3rd Row 4rd Row Top Row 2nd Row Jack 2 3rd Row 4th Row Direction Control Register-—Addressed if bit 2 of PBCTL is 0 | | | | | | | D7 D6 D5 D4 D3 D2 D1 DO Each bit corresponds to a jack pin O=input l=output OS SHADOWS: STICKO (hex 278), STICK1 (279), PTRIGO-3 (27C-27F III.19 PACTL (Port A Control) (D302): This address writes or reads data from the Port A Control Register. D7 D3 D2 DO | | | | | | Port A Control D6 D5 D4 D3 D2 D1 DO Register 0) 1 1 xX X 0 Xx set up register as shown (X = described below) (Read only) Peripheral A Interrupt Status Bit. Serial bus Proceed line. (Reset by reading Port A Register. Set by Peripheral A Interrupt.) Peripheral Motor Control line on serial bus (write). (O = On 1 = Off) Controls Port A addressing described above (write). (1 = Port A Register 0 = Direction Control Register). Peripheral A Interrupt Enable Bite. (Write) 1 = Enable. Reset by power turn-on or processor. Set by Processor. PORTB (Port B)(D301): This address reads or writes data from Player 2 and Player 3 controller jacks if bit 2 of PBCTL is true. This address writes to the direction control register if bit 2 of PBCTL is zero. I/O for both ports (A and B) goes through a 6520/6820. Data Register-Addressed if bit 2 of PBCTL is l Joystick Operation | | | | | | | O=Switch pressed D7 D6 D5 D4 D3 D2 Di DO l=Switch not pressed Right Left ee ee ee ee Back Right Back Fwd. Left Fwd. Stick3 Stick2 (Jack 4) (Jack 3) Paddle Operation O=Switch pressed l=Switch not pressed PTRIG4 PTRIG5 PTRIG6 PTRIG/ Keyboard Controller Operation D5 D4 D3 D2 Di DO Top Row 2nd Row Jack 3 3rd Row 4rd Row Top Row 2nd Row Jack 4 3rd Row 4th Row III.20 Direction Control Register-Addressed if bit 2 of PBCTL is 0 | | | | | | | ‘oe D7 D6 D5 D4 D3 D2 Di DO Each bit corresponds to a jack pin O=input l=out put OS SHADOWS: STICK2 (hex 27A), STICK3 (27B), PTRIG4-7 (280-283) PBCTL (Port B Control) (D303): This address writes or reads data from the Port B Control Register. Read Onl | | | | | | | Port B Control D7 D6 D5 D4 D3 D2 D1 DO Register x 0 i ! xX xX 0 xX Set up register as shown (X=Described below) D7 (Read only) Peripheral B Interrupt Status Bit. Serial bus Interrupt line. Reset by Reading Port B Register. Set by Peripheral B Interrupt. D3 Peripheral Command Identification. Serial bus Command Line. D2 Controls Port B addressing described above. (l= Port B Register O = Direction Control Register) DO Peripheral B Interrupt Enable Bit. 1 = Enable. Reset by power turn-on or processore Set by processor. (Set to hex 3C by OS IRQ code) POTO — POT/ (Pot Values) (D200-D207): These addresses read the value (0 to 228) of 8 pots (paddle controllers) connected to the 8 lines pot port. The paddle controllers are numbered from left to right when facing the console keyboard. Turning the paddle knob clockwise results in decreasing pot values. The values are valid only after 228 TV lines following the "POTGO'" command described below or after ALLPOT changes. Each Pot Value (0-228) OS SHADOWS: PADDLO - 7 (hex 270-277) TiteZ! ALLPOT (All Pot Lines Simultaneously) (D208): This address reads the present state of the 8 line pot port. Capacitor dump transitors must be turned off by either going to fast pot scan mode (bit 2 of SKCTL) or starting pot scan (POTGO). | | | | | | | D7 D6 D5 D4 D3 Dz Dil DO Pot number: 0 7 6 > 4 3 2 L 0 1 Pot register value is valid. Pot register value is not valid. 8 Pot Line States POTGO (Start Pot Scan) (D20B): No Data Bits Used This write address starts the pot scan sequence. The pot values (POTO -— POT7) should be read first. This write strobe is then used causing the following sequence. l. Scan Counter cleared to zero. 2. Capacitor dump transistors turned off. 3. Scan Counter begins counting. 4e Counter value captured in each of 8 registers (POTO - POT7) as each pot line crosses trigger voltage. Se Counter reaches 228, capacitor dump transistors turned One (Written to by OS vertical blank code) TRIGO, TRIG1, TRIG2, TRIG3 (Trigger Ports)(O DOI10, 1 DOll, 2 DO12 3 D013): These addresses read port pins normally connected to the joystick controller trigger buttons. Not Used | 0 = button pressed Zero Forced) DO = button not pressed — | OS SHADOWS: STRIGO-3 (hex 284-287) NOTE: TRIGO thru TRIG3 are normally read directly by the microprocessor. However, if bit 2 of GRACTL is 1, these inputs are latched whenever they go to logic zero. These latches are reset (true) when bit 2 of GRACTL is set to 0O. III.22 PENH (Light Pen Horizontal Color Clock Position) (D40C): This address reads the Horizontal Light Pen Register (based on the horizontal color clock counter in hardware). The values range from 0 to decimal 227. Wraparound vy occurs when the pen if near the right edge of a standard-width screen. PENH and PENV are modified when any of the joystick trigger lines is pulled low. H/7 H6 H5 H4 H3 2: “it HO OS SHADOW: LPENH (hex 234) PENV (Light Pen Vertical TV Line Position) (D40D): This address reads the Vertical Light Pen Register (8 most significant bits, same as VCOUNT). LP8 r 4 6 5 4 3 2 1 O LPO not read. Two line resolution supplied. OS SHADOW: LPENV (hex 235) Front Panel (Controller) Jacks as I/O Parts: PIA (6520/6820) Out: TIL levels, 1 load In : TTL levels, 1 load Port A Circuit (typical): (A) Jack Port Port 5. Cireuit {tyoicaL): o+5 4.7K 6520 220 Jack "Trigger" Port Circuit (typical): CTIA. Trice Jack Ti bee so Controller Port Pinout: Male Female & (console) (connector) Controllers HARDWARE JOVSLIGK PADDLE (POT KEYBOARD REGISTERS VARIABLES Forward Top Row* Bit 0 or 4*%* | Bit O*** Back 2nd Row* Bit l or 5** Bit ]1***x Left A(Left)Trigger 3rd Row* Bit 2 or 6%** PTRIGO,2,4,6 Bit 2%*** Right B(Right)Trigger Bottom Row*| Bit 3 or 7*% PIRIGI (33957 Bit 3**%x POT B(Right) ist) Column: |] POT: 143, 5.:7 PADDL 1.35947 Trigger Button 3rd Column TRIGO,1,2,3 SITRIGO, 15255 +5 +5 GND POTA (Left) 2nd Column POT: °O.254, 0 PADDLO,2,4,6 * Write **X PORTA or PORTB eee STICK. 0. 1. 2 or 3 ITII.24 Y IV. SAMPLE PROGRAM This assembly language program illustrates the use of players, missiles, and display lists. The diagram on the next page shows what the display looks like and which objects are used. The comments in the program listing describe how it works. IV.1 ° (xo) sanqte, 13a4sT3ey UOTITSOg [TBWUOZTIO aeTTSstW/1eheTd Od J6 OL UG JE 8t CW ZW SOTTSSTW /12keTa y8ty souty g Aq ssoroe sdaqoerey) QT a. 661 Mm 681 AV1dSId yUsty Saut{T 9T Aq ssoade siaqoeAeYD OT SMOY g 10 LYVLS qa LAV SANIT AL bal cu (he olf : * wu ae ; ae : 91 Py | ibaa Let a SoutTyT yUPTE 77 2] ete a hataa ce i et Uren rerH ig ey era | a tei ‘NS MOWRY yuUeTE TeITIAIA FO ee 9ZT nes c6l 891 (Teupoep) <——————S8490T) A0TOD AVIdSId SUYAAOAXHO bh SANIT AL ANB Td 38° B23 = BANU IE B9te rae! O39 = 2XxNb1E Bore a 6S = SANE Brra Gé BPs = GAN 1G G2ra aad Ors = PANN Ta Bcre af BCs = CDINND1E Btba SANIT ANDI ¢! OTs = CANYH IE B6re SNIV AL AND Td TF! 2) = THANE 1d BEB €S3aLl48 29 NOILONALSNI dWine ‘ t = dWNr 88re SATSyN3S T10d9S WLINOZIdOH ‘ 3 = ISH 8226 SANSENA VW10sd9S WIITLASA ‘ acs = ISA B9rG CS3LA9 ©) SALNMOD NBOS WAW GvOTSa ‘ Ors = QuO1ad 6Sza (Sal4Aqd ©> ANKE WOLLYAA LXS3N 3O ONS TILNN LIBM ANY dWNL ‘ Tes = ILMdWe Gpre CSMLYLS IWN 4O 2 LIE) LdNadaint L517 Aw IdSIdS 68s = INI 62290 ‘ 0220 SaLbNDA LSI AWIdSIG! Otza ‘ 86828 4879 = N3IWN 86c0 GBcas = LSISGA 88co AIScBS = a¥Olad9 62°80 28¢9$ = 3SVEWd 69ce dTeas = WLIoveo BScee TECOS = HLS10S 8¢ceo Orcus = W1S170S 6226 BI~CBS = @A109d B2cR 8660$ = @d3aZIS Btce 86604 = @dSOdH 93¢c@ ACCOS = WLOWIS 4674 ABrIdsS = VWLObBWG Bete 6GFd = 3SY¥EH9D B2TS 5 8916 S3LWNOA (608 Tdbib> NASTIOD’ BSTe ‘ BT s) ‘SD0TSaLdvoD WOAS BzTO LON ‘“S90IALSHD SSIGWSaSSH SHL HLIM SNA HOIHM WHAD0Ad D3aSHd Wed YU SI SIHL‘S 3279 31315504 SI NOTLYZIWILd0 ASHLYNA LNd ‘“WHa AAWS G1 JASN 3AW SADTaAL Mad WS OTTH ‘Wd 49 DALlATII345 NOTLHWDO1 SHL LH SLAWLS WHADOAd SHLS Banta Sa4a0408. LHO Ta ONS L449) -SHL d04 935!) age Saulss Ih 66 Sd3lSI934 40109 AHL DONISONKHID’S 63 LNOHLIM SAONOD 9 S3AI9D SIHL ‘S3IaAKNOS O34 3HL 404 GSASN Jab SdaAU Id‘ B2 ‘QAW08 SHL 30 SAxSd4808 WOLLOA ONW dOL SHL INH SA3ADFHD SHL 39NIWaAd‘S 69 GL UNI ddibW) AALIHAHHD S350 HITHM L51I7 AWIdSID WH 40 A1dbIHAS Nw SI STIHL! @S ‘ Ob O26T Iablb LHOITaAdOD! BF ‘ 92 We/TE7L MHH- 9 Ad AW V4>10 taqdADGHD 668 IdHly. JIWOIL Ot 62868 4266 6S66 Brag pm )) 6cee BTBea 6688 T8680 OTe 8288 4¢08 TFeaa 8800 30¢d 8828 Aj97O 20¢”d dgteq Frce pas 4) BIC 306d 80069 jzCB 40>) 6069 8664 LV 2 ~ NOILWSIN1 WedadOdd F SS38d0ddb 35a SATISSIW asAb 1d ‘ B6B6SF = Gnd Ca¥bHD 30 SVESW © dh 13S OL QSSN> AO WI saGs0a ‘ BI = a0819 CaaLNdWO3> TF asad 1d ‘ O8¢ = td CNYUWNHD 6 AaAU Id ‘ @ = Bd19 Gab0s 30 Sda0d08s WOLLOG GN dOl 40S GsaSN': 4 = 430808 CX) wOSaNd ‘ is = sano zf = ONIX Y3SASSHID AABNIGAO ‘ Tt =Y3xISHI SaunosS ALldWSS 8 = AldWS3 7 13S ASLIVAYHD SYSADSHD WII3dS AOA $3003‘ f S3LvNOS SHAaAISHI ‘ { ASJOLNI-@.- = IGN ASAOLNI-6- = I6N ASOLNI-8- = ISN ASOLNI-T- = ITN ASOLNI-A. = IA SASOLNI-L- = pa ASJOLNI-a- = ta ASOLNI-d- = Id 4SSOLNI-O- = 10 ASOLNI-1,- = Il ASOLNI-H- = IH ASAOLNI-9- = Id SSOLNI-3- = ia ASOLNI-d- = Iq SASOLNI-J- = Id S30 INI -U; = I ASOINI= 2 = IdS $3009 a3sLIvadbHID TWNASLNI ‘ c “JITYSNNNBHd 1b 3Sb9D asaddfi SOS 3dGOD TWNASLNI 139 OL Gasn: Oc = ASOLNI 398d Orso Br8B G286 BT8e 88688 8626 8826 228 8926 8S26 Gr2G 8220 8c26 BT28 6626 6638 8896 6298 8996 8S98 BrSG 6298 8298 @Tt98 8898 @6S8 88S 62956 8996 6SSG 2 2 4) @zS6 8cSB @TSB 68S8 B6>6 G68re G2>0 6865S BI86 8806 6608 eos [666 7BB6 T8668 6686 BTS 6126 Stas TT6e 6268 2B C266 8266 ACOG 6006 8288 2286 S266 206 =CBG TCG 6666 6286 6866 B8/TZ/7= MBHS D AG AUIdSIO SHSAIAHD BGS Idbib IV.4 a3aqso08 WOLL0a ‘ ST+* AB TIdSIC deb04d ‘ *+9T«S gavod jo asqs0s dol’ OT +* S39¥SS3W IIDSYLY -- SAHHOD 4O SNIT dol‘ BC+ i f O8$+* é f O8S+* tT aaAd 1d!‘ B8s+* SIJIHdvAD BO ASA 1d“ B8s+x SIIHd'bAS JATISSIW! BSF+* A8T#+4Wd =* Qaqglog =* dSdaq =* Qadgdol =* Be & & =* ASadNOd‘ @ ‘44s ‘ASS [ASF 64453 (AAS 44S ‘CO ALAG © CZ) AOSANI! TIS ‘99S ‘ILS ‘BTS ‘STS ‘ATS “O9F$ “TINS ALAGg- C2) ONIN! IOS ‘AAS ‘LIS “LIS “GHS “CHS “ALS ‘DTS ALA © CT) ASAISHD! IFS ‘32$ ‘445s (44S (44S “AAS ALS DTS ALAG (8) ANHIE’ BB ‘OB ‘A ‘A‘B‘B‘S 3AlAd © BO9F+9INd =m d9 ¢ CQ3SN 34H ¢-@ S39009 AINO) 135 daLIbaWHD SdaNDAHI WI3ddS -- 49° 398d © f BATY OSTT OPTT BztT O2TT OTTT BATT BAYT B36T O620T 88 a4 Fe a4 Fe | Aa i 88 z3 99 Jz St 8ST It 99 23 Jz SZ > 29 =~ Sv Ec. Fa 3 Jz 36 a3 Fe a4 i 32 Jz 88 12) 4) 85 28 88 86 88 213) 2e9S 9¢9S S29S ¥eo9G 2eC9S c2o9S T23S 8239S 4t9S 3t9S aTt3¢S JtIS at3sc YTSG 6T9S STIS 29S 9T3G StS PTOS TIS etgsc TT9G @t9¢ 4069S 4369S Qe9S J69S g69S WO9S 6869S 869G 2095S 39696 S69S PBIG LOIS 2O9S TO3S B89G Fabs Pars O8/TE7E MYHS 3 49d AWIdSID SH43AD3HD GCOS IAbILY iV 26 TLOBHA Jest Ila Wd = BB ud] CSAIGW Set> NSASYIS MONSUN “AISUNS BW Wed “Sada SANIT ¢ Wed “DIEYUNS BWdO HOLSS NOILONALSNI £ S3S¥SHO =YLS 9S¢7d9# WOT Hd ¢ dHIN ANB Ta TWWOILASA ONTaNd TWWHWAON OL ADWE JSYEHD SONKBHI TIIM SO SHI‘ ‘SOTHdBAD SASADSHD WII3dS sOd AUIdSID 30 HLOIM OGNb 350g ASLOVAWHID SSDNBHS ‘ ‘SSTONGH LdNddSLNI LSIT Ab 1dSId Y3aA0 LabLS NSHL “ANH TIGA LXSN 404d LIBM‘ CAb1d SWH9 OL IWILNSSSS LON LNG ‘“NBDSHSAO ABWD ARIHOG WOLLOS ‘Sé6éT-TéET ‘ ‘¢S-AL Wb NO N3S89S NO 38 DINOHS> AvIdSIC TIHWYAON 40 ONS G6T-68T ‘ ‘SaabNOS SNOIAAdd 4O WOLLOS Saab SANIT SSaHL LXAN 838T-Z2T G2U-290: 99T-TST S Q@ST-SPT * prT-6cCT : Sct-zert ° CCU-26T S 9OT-TOT S BaT-Ss ‘ vS-62' Sa -25* ‘SYuNOS LXSN AO dOL=SSNI71 2 LS¥1 e9-2S ‘ } 9S-Tr ‘ ‘BawnNssS SNOIAS4dd JO WOLLOS=S3SNI1 & LSAISA Gb-Gz ‘ SYY¥HD NOILNIOSSY SANIT CxXSxX9T ‘b=t-6T ‘ CSSaBNDS/SANIT ec —- NSAMLSENI S39bdS HLIM Sd¥HD 4O SANIT 8) GebOssSanISHI SSaedvNoS AO MOY LSYHId 4AO dOL 8t-2T!‘ (S3sunos. 20° MOS 1S) 40: dOl. Sil SNiT 1Se)>) SdvHo: + d6698 956 SP 9982 te 98 a 28 @S 28 @S 28 6S 28 6S 28 8S 28 6S 28 8S 28 OT 38 88 S88 9b 82 @2 G2 TS9S @S9S a¢9S a¢os 8FSS 9P9S Sv9s TP9G crass Ve9os BP9G AZ9S 3293S dz29S 3z3S @z9¢G ¥z9G 6229S 8=9S 2279S bo BO Sz9S bzr9G LE9G cz9G TI9IS Bz9G Acgs 3¢c9S I3e9IS 829¢ ¥29S 6239S 8229S 8329S B8/TI/E MYHS JD AG AW IdSIDO SHRADSHD BOS Idi IVe7 ‘ @6T2 A‘8T$+5d49 YLS a8tc 2G8666 4322S A‘8T$+eda9 =Y1S @2te SSeYWNOS AOA SOIHdNND AaAW Td AZIIWILINI‘’ Otte £ B6Te B=4 TILNN SNNILNOS ‘ digi JANdq 668C 25400 3c¢2S Aad @38G2e 88 Aces A‘T-dsa9gl0d w1S B20C PGzvE6 Be2S 4 ‘T-daad0l lS dlal 6982 PStTté6 8e2S 4308d08+s08d1D# dT 8S8C bI6H 92S 9T# AdT Brac Bt6y %e2S £ @26e ‘Sas3q0d09 WOLLOS GNH dOl AZT IWILINI’ ocee £ @t6C 2d01 ANd BeBe WABT Cees Aad Bé6é6T 88 Te2S A ‘> T$+z2BWao YLS 2d971 BS6T TSt666 ATZS aS$# 407 82617 3S6¥ 3T2S 36$# bd1 Q@36T 3664 YTZS ‘ @S6T Sa3q9408 404d SOIHdBND FTISSIW AZITWWILINI’ GbET ‘ G6Z6T dILINI ANA Bz2é6T 3380 8t2S ANI BTé6T 83 2t2S xX ‘OOr$+AWd WLS BG6T bSEGd6 bT2S % ‘BBl$+dWid bWLS B68t ~See6d6 TTZ2S x ‘@B2$+EWd BLS 88st ¢cS86d6 4382S X% ‘OBTS$+9Wd YS B28T TS66d6 aeZ2S % ‘GWd YS B898T 8S86d6 8862S dILINI 6S8t xbL BPrstT dy 22S Oe vWdT 6zst B886y SBZS ‘ 62st Wud avaT1DS Bat ‘ Q68T VLSWIAS «BLS B862T 764708 2802S 328% BIT B82t 3c6b O82S £ B22) €SNIO1D B94) N3Sd9DS JSaBOINKLS “SIGYNS BWI Wd ‘S3a SANIT @ Wed ‘S1ISKN3S YBWd HOL3SA NOTLINALSNI’ B92T A1ayIavA WLIW SSO LINI‘ BS2T ‘ Bb2T G02F+AWd = Bz2T 2359S £ 6221 3435H NOTiINGsxS LablsS =— 39009 NOTIVZI WILT * 6tZt ‘ @82T 390d © BE9T 2S9S O8/TL/7E MBHS FJ AG AW TIdSITD SASADSHOD BGS IabLlY Iv.8 419449 % ‘6C+9dv098 TE-G62 SAeWKNGS HO SADAId aaLNdWOD! Td15+daAIDSHIe * ‘OSKO0A TT-6 S3dHNUS NO SANRZId NYWNH S 6d19+d 3 4dSHIR Ti AbIdSIO Gado ‘SIdNSA3SLNI ANKIaA @ LSI AWUIdSIOC SAIAYNA BDF 4dAdS=xX ‘ NATWN T+L15 150% 992/’dGHIN#F LS 1S0A CaS 12 MOLISA LdNddaLNI LSID AwIdSIGOS AdEVaHING 93a ALIaGIad SO‘ dOladd SadaAu 1d A3SA0 Oldd S3SAbL dd ‘CHYOTO9D JIISSIW HOS Fsd ASN AIBUNS ASA Td HLS ‘ bTs# 3aSvaWd SIUIHdbAD SATISSIW/ASAB Id SAO SS3800b 40 ASW! 9Sc/EWdH WLoIbdd ‘$938 SOIHdvAD OL BWI SFTISSIW/dAsaAw Id JIGYNS ‘ cH HLS10S SSaddd¥ 40 GSW’ 9S¢/dS0# WLS10S CaS) SS3Nddb LabLiS 1511 AWIdSIO’ dds edSd# NOTLYZITWWILINI ASAOd PNI A “@A10Id 4 ‘TaLI C3an9 L-NO0 SI 1S93ea> 3Z1S IWWAON SANWIL & SALBSIGNI Tes A ‘“Bd3azIS dss‘ A ‘@dSOdH A VALt SdO109 ONY SNOILISOd JAISSIW ONY d3A0 1d SH cNI SoH SAdsNOS ALISOddO NI W114‘ dst# ZNI SIIHdbAD SAIVISSIW 40 LS3a! A‘STS$+T AWA YOF# 148 749 OLS bd BLS 7) xo1 d1d4d ¢ SZIVILINI ‘ XLS BLS O71 BLS ud BLS bd) BLS W071 BLS ud71 WLS bo) BLS bd71 cf ¢ ‘JILIN ‘SO! 1d Aad BLS uO7 BLS BxXL BLS W971 s PNI AZITWILINI ‘ Ad] 994 Ada dos 1dd “ad ANI Wd HLS W071 bHd . B122 0822 BESS Q39¢ O29¢ a992e OS92 BP92e 8x92 8c9~ BT92 8892 86S2 6ES2 6292 69S/e esse BrSe 6zS2e B2S2 6tSe GES2e G62 B82 B2ve B9b~e eSbe Orbe BLP Bebe BTS G6Pe B62e B8z~e a2ze 89 GSz22 GPre BTze Bez? 6T&? aBz?e 66C7 68ce O2ee¢ G9Ce oSce oPe~e BZ? BClS? Btce 66cC CAGT = a) OSrTdEe TS6 666496 TO6H 86cb $03638 cCOTBIE 9S6u 760808 GPréy 261908 btéy $d2698 @S6U 8ddTdas 266 c6tzas 996 cOBEI8 8cé6u Q36T Ss COBIEE 2S6369 B6d8GE6 v8 606066 2S8064 cS2¢S BS2S 3r2S J3e2S Bees 6P2S 8Pr2S 2¢2S Pr2S ch2G Fees B8/Tz2-= MYHS JD Ag AWIdSIC SASADSHD BGS Tal iv .9 £ @fee £ 62c2 £ Ober £ G62 Sid B6TZ B9 2492S Tdidn Soa B3Tz Hd6g S425 ABL B2Tz ty $02S Cy LObALENS> aba1D SI Addo! T-$# 39S Q@9Tz 7663 €92G BxL BSTz v8 T42S ABL BPTe 8y 8602S Ots# Idd Bzbz @T69 3902S JV acte 8t 9902S BAL Otte 86 JI2S B6Te CdidN dd 8602 BABT b32S 6L 330 686z OGGCS9 2492S x3d 6262 WD 9925 ANT B9Bz 83 S92S ANI BSBF 82 %92S ANI Braz 83 2392S ANI Bz6z 83 ¢c32S 14357 OL GSLSIHS SMO AOS! A‘OTE+dSddG WLS Bc@l PSPrEes AaZS % ‘>-Qav0g bd1 BT6e sjrIADE JaZsS LHOIA OL GSLSIHS SMOS dOS‘' A‘?+dSdYE BLS 6682 PS9C66 6382S x ‘dav08 Ol 666c BS0008 3482S CdidN 8362 . 61 vis 626C BGH82d08 LaZS SNIWS3aBNOS +! T-b# Yd) 8962 266 Ta2S TFd1dN @S62 oe Ad) OPEC B66 42S 153517 ddddN = TE JawNds ‘ To# xd Bz6e Ate db2S aHIdN B26? ‘ O6té6e Wea AU TdSId OL Ga¥vO0d ASNDSHD 4O SALAS @E SAOW OL ANILNOASNS -- AHIdN‘! BB6zZ £ 8682 ‘ 8882 ‘ 8282 £ @982 dOO1 dwWf BS82 2S2¢bIr YW2S YHIdN 3 ASL Brse 2GdbGe 22S dO071 8&82e ‘ 282 d35N 38 GiNOD LdNYASLNI ANHIEA ¥ XO 3YN3SH GSad0d¥ 39 QiINOD JINO1 WHADOsd SHAADSHD SHL‘ BT8z2 ‘34H SJIHdYNS OL AeXvbOd 3ANW OL dOOT! 8882 ‘ 622 SONI da B82c 25307 Sb2S x39 B222 WO pH2S Xx WIL bls O922 ’GB@e@d6 TH2S 4‘AdOQI WO] SONI OS22 266318 3é6é2S Hoe AdT Brie StcH J62S ’ OZ 2¢ SNI1D 4W1dSIC 3DNSSAW OL 39HSS3W LHOIYAdOD SAOW! B222 O38/TL/Z MBHS 9 AG AW IdSID SASADSHD BGS Idb1H IV.10 2 50+IGN ‘2 50+1SN ‘2 S0+I GN ‘TSO+I TN SCAO+1I ‘CS0+ 1a “CS0+1IY “CSOT SCSO+IU 3LAG © SOFTEE S0+TH “20419 "s041! “s0+Ta “s0+1 A s04+Id “s0+10"S0tIO “idS SLAs c3n1a> Y¥O109 Tad AOS! CSLIHM) SO1IOD esd AOd! ¢d34d> 4xO109 @4d AOA! 39uSS3aW ONNOADAIBS ADEA - AE‘ CSSATISSIW @ SHBHI> ASGHOEd MOWISA SS94SS3W IN’ SdHaxISHI SLIHM Sa¥aLoI¥abHD 3N198 S39¥uSS3SW ONY SYSAXISHID Jd3aq Zaid ? -Cdd ‘ ‘Tad ‘ ‘Bad ‘ abs Bess 68S @ 3ldAa 9¢$ 31iAg~ a6$ 3iAa - 88$ 31iAd © 92$ 3ldAd” CS3eBNOS dex) SARA d &S PIS “HLS ‘HTS ‘HTS 3LAd © a8rz AdOD B2bz TaL9l B9¢e 240 BSbt 2A0 BbbE dO Othe £ Bere »OS6T Tabi LHOTaAdOD. ! Btez £ BOPz B6z2z B8zz QB2zz O9tzr @Srz Opzt PIGLI SBtte 31Wayl YO WI!S S2te S=$ ‘BIS ‘STS ‘DGS ‘DES ‘92S ‘ISS ‘'IBTF JLAG~ TW ‘CW ‘TW OW 430a y et =< fale lead a4 £ OtEe 2142 ap 2 ILI G62f £ O82 ‘TW OHLIM DASH 1d ANH EW FP CWS B2CE O09 LA3dT=TW 844990409 LHOTd=Obl! O92F ‘€S83S39N0R AGIS) SSAITISSIW INH (S3eKNOS) SoaAU 1d JO NOILISOd WINOZIAOH’ OG7E @8/TE/7E MYHS BblYD! Bb2r 1.) a42S H3A2S 6432S 8342S 242S 9425 SA2S badS i Fd, 242S TA2S 6342S 332s 3432S d32S J432S g32S ¥32S 632S B88 888a 8880 8342S 2352S 932S G3¢2S ba2s 2432S c32S t3a2S G32S 4392S 3902S gda2zs 3992S g92S vd2S 692S 8902S 3 AG ABIdSID Sa3xAD3HD O68 IabdLH bt ee a! V. HARDWARE REGISTER LISTS v& Ae ADDRESS ORDER CTIA ADDRESSES WRITE READ Address Name Description DOFF REPEAT AS BELOW 7 MORE TIMES D020 DOF Read Consol SW. Port DOLE [| HITCLR |Collision Clear | DOID | GRACTL |Graphic Control | DOIC [| VDELAY |Vert. Delay | D918 | PRIOR [Priority Select =F» { DO1A | COLBK |Col-lum Bkgnd | DO19 | COLPF3_|Color-lum of 3 [| D018 L JCOLPW2. (Playiiedd, 2. DO17 fe OOLPRI. | Playiield - Wn DO16 | COLPFO [Playfield O = [| DO15 | COLPM3 |Color-lum of 3 0 | DO14 READ PAL/NTSC bits DO13 Read Joystick DO12 Trigger DO11 Buttons DO10 DOOF P3PL Read Player DOOE GRAFP 1 Graphics Player l DOOD GRAFPO Graphics Player 0 DOOC SIZEM Size All Missiles to Player Collisions rd fd ird WO {© fr Ih ok lack lack jac) ee | mae | od | sa DOOB M Read Missile DOOA To Player D009 Collisions D008 M DOO7 HPOSM3 Horze Posit.e Missile 3 |__HPOSM3 _| DO06 HPOSM2 Horze Posite Missile 2 Read Player To Playfield DOO5 Collisions DOO4 | HPOSMO |Horz. Posit. Missile 0O D003 M3PF Read Missile DOO2 | HPOSP2 |Horz. Posite Player 2 2PF To Playfield DOOL | HPOSP1 |Horz. Posit. Player 1 1PF Collisions 9 x 4 bg [hd [hd [to © | [NO [WIO aoe Laol lack lack lac, hey feed Pf fd ec DOOO HPOSPO Horze Posit.e Player O MOPF Vel ANTIC ADDRESSES WRITE | READ & Address Description D4FF REPEAT (AS BELOW) 15 MORE TIMES D410 Reset NMI NMI Interrupt D40F NMIRES Interrupt Status NMIST Status Register NMI Interrupt D40D PENV Vertical D40C PENH Horizontal D40B VCOUNT Counter D40A WSYNC Synchronism D409 CHBASE Address Red D408 Player-Missile Base D407 PMBASE Address Register D406 D405 VSCROL Register D404 HSCROL Register Display List D403 DLISTH Pointer (High Byte Display List D402 DELS. Pointer (Low Byte D401 CHACTL Register D400 DMACTL Register Ve2 POKEY ADDRESSES WRITE READ Name Description Description D2FF REPEAT (AS BELOW) 15 MORE TIMES D210 D20F SKCILS Control SKSTAT Status Register D20E LROEN Enable LROST Status Register D20D SEROUT Output Reg. Input Register 5 lanl SE D20B POTGO Sequence Vertical Line D20A SKRES SKSTAT ) RANDOM Generator D208 AUDCTL Audio Control ALLPOT Port State Wr [cell PE D207 AUDC4 Control POT 7 OE [ea EP D206 AUDF4 Frequenc POT 6 eed Audio Channel 4 D205 AUDC3 Control POT 5 Read the D204 AUDF3 Frequenc POT 4 each POT PE | alll D203 AUDC2 Control POT 3 eR Fie OP D202 AUDF2 Frequenc POT 2 OE Ele D201 AUDC1L Control Pol. 1 PE Fait D200 AUDF1 Frequenc POT O PIA ADDRESSES WRITE READ Address Description D3FF Repeat as shown below many times D304 D303 PBCTL PORT B CONTROL PBCTL Same as write D302 PACT: PORT A CONTROL PACTL Same as write roms Direction Register joes | PORTB If PBCTL Bit 2-0 PORTB Same as write D301 Jack 2 & Jack 3 Are 0 x D300 Jack O & Jack 1 Are Q0 #* * NOTE: Output data is retained in Jack Output Registers. If direction bits are true, a read of the jacks will read old data from these registers. Jack 2 & Jack 3 If Direction Bits Are 1 #* Direction Register If PACTL Bit 2=0 Jack O & Jack 1 If Direction Bits Are l * Be ALPHABETICAL ORDER Hardware Register OS Shadow Address Address Name Description Dec |Name Hex{|Dec Read 8 line Pot Port State Audio Channel 1 Control Audio Channel 2 Control Audio Channel 3 Control Audio Channel 4 Control Control Audio Channel 1 Frequency Audio Channel 2 Frequency Audio Channel 3 Frequency Channel Frequenc Character Control Character base address Color-Luminance of Background Color Luminance of Playfield 0 Color Luminance of Playfield l Luminance Playfield 2 Color Luminance of Playfield 3 Color Luminance of Player-Missile Color Luminance of Player-Missile Luminance Player-Missile Color Luminance of Player-Missile Console Switch Port Display List Pointer (high byte) Display List Pointer (low byte) Direct Memory Access (DMA) Control Graphic Control Graphics for all Missiles Graphics for Player 0 Graphics for Player l Graphics for Player 2 Graphics for Player 3 Colission Clear Horizontal Position of Missile Horizontal Position of Missile Horizontal Position of Missile Horizontal Position Missile Horizontal Position of Player 0 Horizontal Position of Player 1 Horizontal Position of Player 2 Horizontal Position Player 3 Horizontal Scroll Interrupt Request (IRQ) Enable IRQ Status Keyboard Code Missile O to Playfield Collisions Missile 0 Player Collisions Missile 1 to Playfield Collisions 1 2 2 ALLPOT AUDC 1 AUDC2 AUDC3 AUDC4 AUDCTL AUDF 1 AUDF2 AUDF3 AUDF4 CHACTL CHBASE COLBK COLPFO COLPF1 COLPF2 COLPF3 COLPMO COLPM1 COLPM2 COLPM3 CONSOL DLISTH DLISTL DMACTL GRACTL GRAFM GRAFPO GRAFP1 GRAFP2 GRAFP3 HITCLR HPOSMO HPOSM1 HPOSM2 HPOSM3 HPOSPO HPOSP1 HPOSP2 HPOSP3 HSCROL IRQEN IRQST KBCODE MOPF MOPL MIPF MIPL M2PF M2PL y fe bo 756 712 708 709 710 Tack 704 705 706 PCOLR3 107 Set to 8 during VBLANK SDLSTH] 231/561 SDLSTL]| 230] 560 SDMCTL | 22F {559 POKMSK]10 |16 CH 2FC] 764 Missile to Player Collisions Missile Playfield Collisions Missile Player Collisions Hardware Register OS Shadow Address Address Name Description Hex Dec {Name Hex Dec M3PF Missile 3 to Playfield Collisions =) M3PL Missile 3 to Player NMIEN |Non-Maskable Interrupt (NMI) Enable Set to $40 by IRQ code NMIRES|NMI reset written to by NMI code NMIST {NMI Status read by NMI code POPF 0 Playfield Collisions POPL O to Player Collisions PIPE 1 to Playfield Collisions P1PL 1 Player Collisions P2PF 2 Playfield Collisions P2PL 2 Player Collisions P3PF 3 to Playfield Collisions P3PL 3 to Player Collisions PACTL Control Set to $3C by IRQ Code PAL PAL/NTSC indictor PBCTL {Port B Control Set to $3C by IRQ Code PENH Light Pen Horizontal Position LPENH 234 564 PENV |Light Pen Vertical Position LPENV 235 565 PMBASE|Player Missile Base Address PORTA STICKO, 11278 .2791632.,633 PORTB 634,635 POTO 624 POT1 625 POT2 626 POT3 PADDL3 627 POT4 PADDL4 628 “ws POT5 PADDL5 629 - POT6 PADDL6 630 POT7 Pot 7 (right paddle controller) PADDL7 631 POTGO {Start POT Scan Sequence WRITTEN DURING VBLANK PRIOR |Priority Select GPRIOR 2 6F 623 RANDOM|Random number generator SERIN {Serial Port Input SEROUT|Serial Port output SIZEM {Sizes for all missiles SIZEPO|Size of Player 0 SIZEP1|Size of Player l SIZEP2|Size of Player 2 SIZEP3|Size of Player 3 SKCTL {Serial Port Control SSKCTL 362 SKREST/Reset Serial Port Status (SKSTAT) SKSTAT{Serial Port Status STIMER|Start Timer TRIGO {Joystick Controller Trigger 0 STRIGO 284 644 TRIG] | Joystick Controller Trigger 1 STRIGL 285 645 TRIG2 |Joystick Controller Trigger 2 STRIG2 286 646 TRIG3T|] Joystick Controller Trigger 3 STRIG3 287 647 VCOUNT |Vertical Line Counter VDELAY|Verical Delay VSCROL|Vertical Scroll WSYNC |Wait for Horizontal Sync arr 54282 |Used herpes sega! keyboard here yeeros! routine VI. FIGURES YY Ae MEMORY MAP DOOO-D7FF CFFF _ 8000 7FFF 2000 1FFF * RAM expansion can actually exten to BFFF. However, the ROM cartridges will deselect the RAM. Deselection occurs on 8K boundaries. FUNCTION Operating System And Math Routines Hardware Addresses Reserved for Future OS < ROM Cartridge (Colleen left and right slot and Candy single slot all address to Expansion * RAM initially supplied in the product units are RAM expandable only at the factory. to 2FFF (16K) when fully extended. VI-l They can accept RAM up WoL — WOLLYSA Ted AVv1dSI0 ATdSIG TWLNOZINOH Wd ONV sin] AV IdS!d SSIN SIMWA BS.1SI9O3aI NOILISOd “WLNOZIGBOH DNASA , 8 ONASA Cf! sz fe 13S G es a ee “| IN BA S2l ps oe 135 < (GW3a SHDOND UO1I0OD 26!) O mi Ga Aw aSio S70 1D ao) 22 G < 4 QAalsAvid Baim { m : ; 5 me ‘ Z S Wn m a P NaaX0S 3 Se ee 0 ig S>IDONID AONIOD OF! N YaLNSD C Seana OTlaAW Td davaNnv ls i 2 - mn fh § f Z 5 a C : s m Q Z Oo W) S 0 C O | |B i | CG 1 SADONID AONOD g2i 5 A Bear O1Wals Awd ~MOzaivN (Awdsia ” 5 vis) LUwvLs) Beeston >NV IBA B i ~ | |\1asse ae 2 A A ee = “ULDA L3S3e itt I ! | | | a ;, l ‘EY/onisn 13538 Sa ONASA L3S3e" | mmnZ pay at Fk liz Gm mi ~xonasa 135 Lz ONASA 13s T10 VOU NZ ye NT nm O bm a _ ute ip $9 ie ior oe ey yt rae 4P9 dy a 0S GE we XK Kn oT Q nu b 2 Ut v mach b i. U a 0 Ov IHVLV oI QuYvVOg HYSAHLONWN | 43S3y No {¢ J Y3MOd 437 y " -1041NO9 . GOW ONINWNS sh | oaaiAl YO10D 8 3ONSNINNT Y3NVIdS GuUVOSA3N 4¥3A99INL S3NI1 ~oa ikea > w sna viva pe oz S am x oO x m @ x Mm ao is so > Ss) > D 2 SCL? Sn@ ssauaav o 4¥371 -TOYUINOD 3100Vd ¥300930 “1 AYOW AW 49019 Y3LSVN X 4 » 0 d CONTROLLER 400 MOTHER BOARD Ci2i-cr2zs Ss cws- cee cre 006 (4x) | | . .001(8x) Cig7-cis4 Ct8i-c1s6 008 (8%) —— i = b§ t= = agais ates Sss3 zozn52 7G fol jet — Les i t re aaa alli ill us n 2"e:9.9.4% — | ser eee a Se << CREREREEEEE 58238358 3 eainen alae — -RYETESEERELE | GA ELTE t 600 eral erie > ~-a2 ene 6682105 sOdlV oles) Cc, now ds} ces 325335 EEE pesizeas 233235382 222 ssszsuse g¥ 3g gs mea, U ato +340 a cao e101 - ¥, ———. we fp | ple st ind 27 ET Lge 510 cts | lf il | ‘ cae fia w7y ue [ uss ae Sra tte) ezenl eter y C143 c180 J | 6epf] ater 2 ’ 4 : Lb < RSS Se ae ee yy ae) I c Ae SRE, 4) eS FE a: mms a BS SSeS Ae EA if - ae eT aa Qa eee) : 5 Kasai ¢ ers SMe Re 2 eee ae (SSSR Geena © eh eS eee ee & . b) RI34-RI49 8 ° @ sotex) ‘ #180 8-RIS0K ' ova TO ’ RiBs- RIS4 (s0(en) 0 EE EOI TIE ELE REET IE L ET IIS CLE TER ELD RAT IIE IELTS SASS TSE IBIBO B ig EAR OBEN SG ITE BENE TIS IEP CEES AMR CLE NET. IR OE RE BPD Oe Se Ee ees oe Be eS ae an ER ee EN Oe eI ee a att EE Pe ee ead eR win TRS Ee RE oe eee ye || aise ‘ re oe i a sf Me LG ¥ 9119 | | 92 s 3 — ix 7 fl 91I9-€219 j . 9011-€017 vs+Q bd : ‘ = ity 2210 1219 ' Bae We +H Eee ONINANS ERE hahaa 100° (xz) rye 2 vosiu ree} See SB Bae Ae ESS |v PA eee) ES EES vo+0 be andino = €2 £3 Lid =e ] ae WOuS ML’? Olu io («CAA 0819 Ly0" TT) GLSG6IG'E 101X = |; ™ ot 9914 r 7 6219 99lu 280 ONNOS i9iu vy £010 volo 2 919 9010 u3xin o1any osiy vs+¢ Ole " sa s4028 met 9Siu col wt e219 ms as+C @ 39Vd QYVOd YSHLOW OOv cond D as+ a olf -SANIOd dd 183i a a a aaa: (QUvVOG YSHLOW OL) cOc ft log f MOvVl Waashdikd3ad OL NOSIA3Z 1731 OL ¥OLV ~TAS AY LIOA 21 ¥31iTi4 2 7 a Idd u3allid 31ddikv uY3td “(1934 1soo@g 3901u8 JOVLIOA OObv IYVILV 4 : (uaidvav A HIOLIMS A HOLIMS 0 YAMOd GUVOG AlddNS UYAMOd saa feel wous) Ni W3MOd A|ddN$ 100° £0zs £129 06 202s 2 %0z1 : waM0d zz" 2d o vozr YAMOd OOV 0022 A ¥0z49 $029 Ol €02z4uo 1029 + 4 Oly ZO2u9 2029 GNVNNOD 03390ud ——> Ni OIGNV idNud3 ni cit A0V3U/VS + Gnd WWuw3Hditad aon ast vSt 2+ lYVLV WVY OINVNAG 8 Sye Linoutlo 193748 + —_ a | q | tinouro = SVWO Av14a =< O O p 4 m oO a zo S3NI1 SS a3u00V m Cc ® ae a SE hl SUNI1 SSauddv “| ~ a v oo a JIAVN] O “As NO1193S m > A pt \ { O esas Nt viva re SINIT vivo ' Ind Viva “ul 8K RAM moras! UNLESS OTHERWISE sPEeciriaD (A) ALL CAPACITORS ARE IN pF (@) ALL RESISTORS ARE Im CHS, 1/4w, 8% ATARI PART NO. a = heed .-§ = = » ~ oO — 2 4 °o 1S) ° = . & Q «x w = C014366 CO 14365 si «| O o| Tt a;e w 215 =| =< = > sat. POLS ©) b+ ‘ I

- = = HI en = = “ Ly Moo—E 1 2 IG < G 6 LINES 3 mat | (gD) 13 Z Ly 32 | as UO | 4% q So : Move 7 | Move 7 | i 46 NES | SGLINES ai fi _ : $55 ~ G | IS 62 16O MONE LZ 6 3 es 2 LINES Gy 192 | JTUMNP—> a4 (@0) 13 ISS IWS 190 96 (0) 13 it 3: a samP>fGny oS | HL ExnAmyce #1 Mixing Graphics Modes, cont. Il. PROCEDURE. TO SET-UP SCREEN -IN MIXED MODES *< 1. Select modes desired, then look up which mode is the max RAM mode from table #2. example: modes selected - mode 1, mode 7, mode 2 mode 7 = max RAM mode 2. Use table #1. to calculate the number of mode lines such that the total: number of scan Lines = 1972. example: | | scan (| | | lines | | # mode | per | scan mode | line | mode | lines | | line | 1 6 8 48 7 56 2 ES 2 Z 16 32 19:2 TOTAG 3. If the max RAM mode is at the top of the screen, then skip this step: Calculate the LMS byte by setting the left nibble to 4. then use table 71 Go Lind the right nibble. for the graphics mode at the top of the screen. example: 1. left nibble = 4 Zs Fighe nibble for mode 1 <= 6 3. LMS byte = 46 (HEX) 4. Calculate the mode byte for each mode. Set the left nibble to 0, use table #1 to find the right nibble for each mode. example: | Left | Right| Mode Mode| Nibble] Nibble] Byte | | | (HEX) 1 0 6 06 7 8) D OD Z 0 7 07 B -3- Mixing Graphics Modes, cont. ‘a. sop ie PROCEDURE TO SET UP SCREEN -IN MIXED MODES, cont.: Ds Convert. ali bDytes to decimal. example: Byte (HEX) DEC LMS 46 70 Mode l 06 6 Mode 7 OD be Mode 2 07 7 6. Execute a graphics call on the computer using the max RAM mode (+16). example: GRAPHICS 7 + 16 7s PEEK the Display List pointer and wse it .to calculate O)| dow Se¥P0s0y) |