PROGRAMMER'S CARD

Hardware Register OS Shadow
  Address   address
Name Description Hex Dec Name Hex Dec
ALLPOT
AUDC1
AUDC2
AUDC3
AUDC4
Read 8 line Pot Port State
Audio Channel 1 Control
Audio Channel 2 Control
Audio Channel 3 Control
Audio Channel 4 Control
D208
D201
D203
D205
D207
53768
53761
53763
53765
53767
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
AUDCTL
AUDF1
AUDF2
AUDF3
AUDF4
Audio Control
Audio Channel 1 Frequency
Audio Channel 2 Frequency
Audio Channel 3 Frequency
Audio Channel 4 Frequency
D208
D200
D202
D204
D206
53768
53760
53762
53764
53766
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
CHACTL
CHBASE
COLBK
COLPF0
COLPF1
Character Control
Character base address
Color Luminance of Background
Color Luminance of Playfield 0
Color Luminance of Playfield 1
D401
D409
D01A
D016
D017
54273
54281
53274
53270
53271
CHART
CHBAS
COLOR4
COLOR0
COLOR1
2F3
2F4
2C8
2C4
2C5
755
756
712
708
709
COLPF2
COLPF3
COLPM0
COLPM1
COLPM2
Color Luminance of Playfield 2
Color Luminance of Playfield 3
Color Luminance of Player-Missile 0
Color Luminance of Player-Missile 1
Color Luminance of Player-Missile 2
D018
D019
D012
D013
D014
53272
53273
53266
53267
53268
COLOR2
COLOR3
PCOLR0
PCOLR1
PCOLR2
2C6
2C7
2C0
2C1
2C2
710
711
704
705
706
COLPM3
CONSOL
DLISTH
DLISTL
DMACTL
Color Luminance of Player-Missile 3
Console Switch Port
Display List Pointer (high Byte)
Display List Pointer (low Byte)
Direct Memory Access (DMA) Control
D015
D01F
D403
D402
D400
53269
53279
54275
54274
54272
PCOLR3
Set to 8
SDLSTH
SDLSTL
SDMCTL
2C3
during
231
230
224
707
VBLANK
561
560
559
GRACTL
GRAFM
GRAFP0
GRAFP1
GRAFP2
Graphic Control
Graphics for all Missiles
Graphics for Player 0
Graphics for Player 1
Graphics for Player 2
D01D
D011
D00D
D00E
D00F
53277
53265
53261
53262
53263
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
GRAFP3
HITCLR
HPOSM0
HPOSM1
HPOSM2
Graphics for Player 3
Colission Clear
Horizontal Position of Missile 0
Horizontal Position of Missile 1
Horizontal Position of Missile 2
D010
D01E
D004
D005
D006
53264
53278
53252
53253
53254
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
HPOSM3
HPOSP0
HPOSP1
HPOSP2
HPOSP3
Horizontal Position of Missile 3
Horizontal Position of Player 0
Horizontal Position of Player 1
Horizontal Position of Player 2
Horizontal Position of Player 3
D007
D000
D001
D002
D003
53255
53248
53249
53250
53251
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
HSCROL
IRQEN
IRQST
KBCODE
M0PF
Horizontal Scroll
Interrupt Request (IRQ) Enable
IRQ Status
Keyboard Code
Missile 0 to Playfield Collisions
D404
D20E
D20E
D209
D000
54279
53774
53774
53769
53248
 
POKMSK
 
CH
 
 
10
 
2FC
 
 
16
 
764
 
M0PL
M1PF
M1PL
M2PF
M2PL
Missile 0 to Player Collisions
Missile 1 to Playfield Collisions
Missile 1 to Player Collisions
Missile 2 to Playfield Collisions
Missile 2 to Player Collisions
D008
D001
D009
D002
D00A
53256
53249
53257
53250
53258
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
M3PF
M3PL
NMIEN
NMIRES
NMIST
Missile 3 to Playfield Collisions
Missile 3 to Player
Non-Maskable Interrupt (NMI) Enable
NMI reset
NMI Status
D003
D00B
D40E
D40F
D40F
53251
53259
54286
54287
54287
 
 
Set to $40 by IRQ code
written to by NMI code
read by NMI code
POPF
POPL
P1PF
P1PL
P2PF
Player 0 to Playfield Collisions
Player 0 to Player Collisions
Player 1 to Playfield Collisions
Player 1 to Player Collisions
Player 2 to Playfield Collisions
D004
D00C
D005
D00D
D006
53252
53260
53253
53261
53254
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
P2PL
P3PF
P3PLPF
PACTL
PAL
Player 2 to Player Collisions
Player 3 to Playfield Collisions
Player 3 to Player Collisions
Port A Control
PAL/NTSC indicator
D00E
D007
D00F
D302
D014
53262
53255
53263
54018
53268
 
 
 
Set to $3C by IRQ Code
 
PBCTL Port B Control D303 54019 Set to $3C by IRQ Code
PENH
PENV
PMBASE
PORTA
Light Pen Horizontal Position
Light Pen Vertical Position
Player Missile Base Address
Port A
D303
D40C
D40D
D300
54284
54285
54279
54016
LPENH
LPENV
 
STICK0,1
234
235
 
278,279
564
565
 
632,633
PORTB
POT0
POT1
POT2
POT3
Port B
Pot 0
Pot 1
Pot 2
Pot 3
D301
D200
D201
D202
D203
54017
53760
53761
53762
53763
STICK1,3
PADDL0
PADDL1
PADDL2
PADDL3
27A,27B
270,
271
272
273
634,635
624
625
626
627
POT4
POT5
POT6
POT7
Pot 4
Pot 5
Pot 6
Pot 7 (right paddle controller)
D204
D205
D206
D207
53764
53765
53766
53767
PADDL4
PADDL5
PADDL6
PADDL7
274
275
276
277
628
629
630
631
POTGO Start POT Scan Sequence D20B 53771 WRITTEN DURING VBLANK
PRIOR
RANDOM
SERIN
SEROUT
SIZEM
Priority Select
Random number generator
Serial Port Input
Serial Port Output
Sizes for all missiles
D01B
D20A
D20E
D20D
D00C
53275
53770
53774
53773
53260
GPRIOR
 
 
 
 
26F
 
 
 
 
623
 
 
 
 
SIZEP0
SIZEP1
SIZEP2
SIZEP3
SKCTL
Size of Player 0
Size of Player 1
Size of Player 2
Size of Player 3
Serial Port Control
D008
D009
D00A
D00B
D20F
53256
53257
53258
53259
53775
 
 
 
 
SSKCTL
 
 
 
 
232
 
 
 
 
562
SKREST
SKSTAT
STIMER
TRIG0
TRIG1
Reset Serial Port Status (SKSTAT)
Serial Port Status
Start Timer
Joystick Controller Trigger 0
Joystick Controller Trigger 1
D20A
D20F
D209
D010
D011
53770
53775
53769
53264
53265
 
 
 
STRIG0
STRIG1
 
 
 
284
285
 
 
 
644
645
TRIG2
TRIG3
VCOUNT
VDELAY
VSCROL
Joystick Controller Trigger 2
Joystick Controller Trigger 3
Vertical Line Counter
Vertical Delay
Vertical Scroll
D012
D013
D40B
D01C
D405
53266
53267
54283
53276
54277
STRIG2
STRIG3
 
 
 
286
287
 
 
 
646
647
 
 
 
WSYNC
Wait for Horizontal Sync
D40A 54282
Used by Keyboard
click routine
 
 


ANTIC MODES
 
ANTIC MODE # 2 3 4 5 6 7 8 9 A B C D E F
OS MODE # 0 - - - 1 2 3 4 5 6 - 7 - 8
DISPLAY TYPE CHAR CHAR CHAR CHAR CHAR CHAR MAP MAP MAP MAP MAP MAP MAP MAP
SCAN LINES 8 10 8 16 8 16 8 4 4 2 1 2 1 1
COLOR CLOCKS 4 4 4 4 8 8 4 2 2 1 1 1 1 1/2
PIXELS/LINE 40 40 40 40 20 20 40 80 80 160 160 160 160 320
BYTES/LINE 40 40 40 40 20 20 10 10 20 20 20 40 40 40
# OF COLORS 2.5 2.5 5 5 5 5 4 2 2 2 2 4 4 2
BYTES/SCREEN 960 800 960 480 480 240 240 480 960 1920 3840 3840 7680 7680
 
HIGH ORDER INSTRUCTION BITS: SPECIAL INSTRUCTION CODES:
D7: display list interrupt 00-70 blank 1 through 7 scan lines
D6: load memory scan register 01 JMP: jump (over 1K boundary)
D5: vertical scroll enable 41 JVB: jump and wait for vblank
D4: horizontal scroll enable SPECIAL INSTRUCTION CODES:


USEFUL OS EQUATES
LABEL ADDRESS DESCRIPTION
 
PAGE ZERO
 
DOSVEC 0A DOS vector
DOSINI 0C warm start address
RTCLOK 12 real-time clock, 3 bytes
ATTRACT 4D attract mode flag
DRKMSK 4E dark mask for attract
COLRSH 4F scrambles color for attract
SAVMSC 58 points to beginning of screen data
 
PAGE TWO
 
VDSLST 200 display list interrupt vector
VPRCED 202 proceed line IRQ vector
VINTER 204 interrupt line IRQ vector
VBREAK 206 software break (00) IRQ vector
VKEYBD 208 keyboard IRQ vector
VVBLKI 222 immediate vblank interrupt vector
VVBLKD 224 deferred vblank interrupt vector
 
ROM VECTORS
 
EDITRV E400 E: device handler
SCRENV E410 S: device handler
KEYBDV E420 K: device handler
PRINTV E430 P: device handler
CASETV E440 C: device handler
DISKIV E450 D: device handler
DISKINV E453 disk interface
CIOV E456 central input-output vector
SIOV E459 serial input-output vector
SETVBV E45C routine for setting vectors
SYSVBV E45F vertical blank routine vector
XITVBV E462 exit vertical blank routines
SIOINV E465 serial input-output initialization
SENDEV E468 send enable routine
INTINV E46B interrupt handler initialization
CIOINV E46E CIO initialization
BLKBDV E471 blackboard mode (memo pad)
WARMSV E474 warm start entry point
COLDSV E477 cold start entry point
RBLOKV E47A cassette read block vector
CSOPIV E47D cassette open for input vector



IOCB STRUCTURE
 
RELATIVE
ADDRESS
LABEL DESCRIPTION SET BY
0 ICHID handler ID CIO on OPEN
1 ICDNO device number CIO on OPEN
2 ICCMD I/O command byte user
3 ICSTA status (errors) CIO on return
4 ICBAL buffer address (low) user
5 ICBAH buffer address (high) user
6 ICPTL put character pointer CIO
7 ICPTH put character pointer CIO
8 ICBLL buffer length/byte count user/CIO
9 ICBLH buffer length/byte count user/CIO
A ICAX1 D2=read, D3=write on OPEN user
B ICAX2 auxilliary information user
C-F ICAX3-ICAX6 auxilliary information CIO


BIT ASSIGNMENTS FOR SELECTED HARDWARE REGISTERS

REGISTER D7 D6 D5 D4 D3 D2 D1 D0
AUDCX distortion volume
only
bit
volume
AUDCTL 17-bit poly
changes into
9-bit poly
clock Ch 1
w/ 1.79 Mhz
not 64 Khz
clock Ch 3
w/ 1.79 Mhz
not 64 Khz
clock Ch 2
w/ Ch 1
not 64 Khz
clock Ch 4
w/ Ch 3
not 64 Khz
hi-pass
filter in
Channel 1
hi-pass
filter in
Channel 3
use
15 Khz
not 64 Khz
CHACTL           vertical
reflect
video
invert
video
blank
CONSOL         speaker option select start
DMACTL     display list
instruction
DMA enable
1=1-line PM
0=2-line PM
enable
player DMA
enable
missile DMA
playfield width
GRACTL           latch
TRIG-3
enable
players
enable
missiles
IRQEN
(IRQST)
BREAK
key
other
key
serial
input data
ready
serial
output data
needed
SOTF timer
4
timer
2
timer
1
NMIEN display
list
interrupt
vertical
blank
interrupt
           
NMIST " " SYSTEM
RESET
         
PRIOR GTIA mode selection multiple
color
players
fifth
player
enable
PF0-PF1
P0-P3
PF2-PF3
PF0-PF3
P0-P3
- - -
P0-P1
PF0-PF3
P2-P3
P0-P3
PF0-PF3
- - -
PORTA,B right left back forward right left back forward

Return to Table of Contents | Previous Chapter | Next Chapter