0100 .OPT NO LIST 0110 ; 0120 ; THE CLASH OF KINGS 0130 ; BY: Bryan Schappel 0140 ; and Barry Kolbe 0150 ; 0160 ; Chess section by: 0170 ; Bryan Schappel (c) 1985 0180 ; 0190 ; Equates 0200 ; 0210 PMBASE = $D407 ;PM base 0220 GRACTL = $D01D ;PM enable 0230 HPOSP0 = $D000 ;Horizontal 0240 HPOSP1 = $D001 ;P/M positions 0250 HPOSP2 = $D002 0260 HPOSP3 = $D003 0270 HITCLR = $D01E ;hit clear 0280 SIZEP0 = $D008 ;P/M sizes 0290 SIZEP1 = $D009 0300 SIZEP2 = $D00A 0310 SIZEP3 = $D00B 0320 SDMCTL = $022F ;DMA screen 0330 SDLSTL = $0230 ;display list 0340 GPRIOR = $026F ;priority reg 0350 PCOLR0 = $02C0 ;P/M colors 0360 PCOLR1 = $02C1 0370 PCOLR2 = $02C2 0380 PCOLR3 = $02C3 0390 COLOR0 = $02C4 ;Playfield 0400 COLOR1 = $02C5 ;colors 0410 COLOR2 = $02C6 0420 COLOR3 = $02C7 0430 COLOR4 = $02C8 0440 COLPF0 = $D016 ;hardware color 0450 COLPF1 = $D017 ;registers 0460 COLPF2 = $D018 0470 COLPF3 = $D019 0480 COLBK = $D01A 0490 WSYNC = $D40A ;wait for sync 0500 CHBAS = $02F4 ;char set 0510 VDSLST = $0200 ;DLI vector 0520 NMIEN = $D40E ;NMI enable 0530 SKCTL = $D20F ;sound controls 0540 AUDCTL = $D208 0550 AUDF1 = $D200 ;freq. registers 0560 AUDF2 = $D202 0570 AUDF3 = $D204 0580 AUDF4 = $D206 0590 AUDC1 = $D201 ;volumes + 0600 AUDC2 = $D203 ;distortions 0610 AUDC3 = $D205 0620 AUDC4 = $D207 0630 VSCROL = $D405 ;vertical scrol 0640 CONSOL = $D01F ;console keys 0650 STICK0 = $0278 ;joy stick 0660 STRIG0 = $0284 ;fire button 0670 RTCLOK = $14 ;jiffy clock 0680 SETVBV = $E45C ;Set VBLANK vec 0690 SYSVBV = $E45F ;system Vblank 0700 XITVBV = $E462 ;exit VBV 0710 ATRACT = $4D ;atract mode 0720 BOOT? = $09 ;boot flag 0730 DOSINI = $0C ;init vector 0740 COLDST = $0244 ;cold start 0750 RANDOM = $D20A ;random number 0760 ; 0770 MYPM = $1000 ;P/M memory 0780 PLR0 = MYPM+$0400 0790 PLR1 = MYPM+$0500 0800 PLR2 = MYPM+$0600 0810 PLR3 = MYPM+$0700 0820 GAMBRD = $0600 ;current board 0830 HTAB = $06B0 ;hit table 0840 MYSCRN = MYPM 0850 MYLINE = MYSCRN+$01E8 0860 SCRTAB = $0700 ;scr mem table 0870 SLN1 = MYSCRN ;scroll memory 0880 SCMEM = MYSCRN 0890 PMB = MYPM ;player base 0900 ZPAGE = $00 ;zero page 0910 ; 0920 BORD = $01 ;border char 0930 BAR = $02 ;hit point bar 0940 STAR = $03 ;boulder(star) 0950 ; 0960 ; Zero page usage 0970 ; 0980 *= $80 0990 INDR *= *+2 ;indr temp hold 1000 TABPOS *= *+1 ;table posit 1010 PLRX *= *+1 ;cursor X-pos 1020 PLRY *= *+1 ;cursor Y-pos 1030 SCR *= *+2 ;screen pntr 1040 SCROLC *= *+1 ;scroll index 1050 SAVEY *= *+1 ;Y hold 1060 SAVEX *= *+1 ;X hold 1070 MOVED *= *+1 ;last move 1080 IND2 *= *+2 ;temp indr hold 1090 PLAYER *= *+1 ;current PLYR 1100 SAVEA *= *+1 ;temp A hold 1110 OLDPOS *= *+1 ;old TABPOS 1120 OLDPCE *= *+1 ;old piece 1130 OMOVE *= *+1 ;old move 1140 MEN1 *= *+1 ;lives left 1150 MEN2 *= *+1 1160 LINES *= *+1 ;lines scrolled 1170 DCLOR *= *+1 ;DLI color 1180 DLIX *= *+1 ;DLI save X 1190 INTC *= *+1 ;DLI base color 1200 WINNER *= *+1 ;battle winner 1210 PLRTYPE *= *+2 ;player type 1220 TIMER *= *+2 ;fade timer 1230 VTIME *= *+1 ;plyr def timer 1240 STIME *= *+1 ;sound timer 1250 PTYPE *= *+1 ;plyr type 1260 RFLG *= *+1 ;who hit flag 1270 EXEC *= *+1 ;vblank exec flg 1280 WSR *= *+1 ;whirley sound 1290 PMFR *= *+2 ;player pntrs 1300 PMTO *= *+2 1310 XTEM *= *+1 ;save x 1320 TEMP *= *+1 ;temp location 1330 XPOS0 *= *+1 ;plyr positions 1340 XPOS1 *= *+1 ;x coord 1350 XPOS2 *= *+1 1360 XPOS3 *= *+1 1370 YPOS0 *= *+1 ;ditto-y coord 1380 YPOS1 *= *+1 1390 YPOS2 *= *+1 1400 YPOS3 *= *+1 1410 SCX *= *+2 ;scr pos of plyr 1420 WC *= *+2 ;wall check flg 1430 SAVST *= *+2 ;saves sticks 1440 X1 *= *+1 ;store x 1450 X2 *= *+1 ;store x 1460 ZAP *= *+2 ;plyr hit flag 1470 BSR *= *+1 ;blowup snd reg 1480 MISM *= *+2 ;miss direction 1490 MISF *= *+2 ;missile from 1500 MIST *= *+2 ;missile to 1510 HTS *= *+2 ;# hits left 1520 HSCL *= *+2 ;h scrl reg 1530 VSCL *= *+2 ;v scrl reg 1540 UDFL *= *+1 ;missile Up/Dn? 1550 MSR *= *+1 ;missile sound 1560 MTIME *= *+1 ;missile timer 1570 PFLG *= *+1 ;hit plyr flg 1580 PCX *= *+1 ;store x 1590 TRY *= *+1 ;other plyr pos 1600 ZTIME *= *+1 ;maze timer 1610 MZR *= *+1 ;random maze ptr