A.N.A.L.O.G. ISSUE 76 / SEPTEMBER 1989 / PAGE 16
Skeet Shoot is a one-player action game written in 100% machine language that will run on all 8-bit Atari computers. Type in Listing 1 using M/L Editor, then load Skeet Shoot using Atari’s DOS binary load.
Once the game is booted up, the title screen will appear. Press START to begin. The gunsight will appear in the middle of the screen. Be aware that gravity pulls the gunsight down. Press the joystick up to release the clay skeets.
The object of the game is to get the highest possible score. The skeets are slung out at random speeds—slow, medium and fast. The score for hitting the slow skeets is ten points, 25 for the medium and 50 for the fast.
At the bottom of the screen are counters that record the number of skeets hit, the number of shells that have been used, your score and the number of the round that you are on. There are 30 rounds in all.
At the end of the game, you get five points for every shell not used. There is a total of 60 shells, but you are allowed only two shells per round.
Press START to play again.
Tracy Jacobs, a high school student, has been programming his 800 XL for about five years, and programming in assembly language with his older brother, Michael, an electronics technician, for a little over a year.
1000 DATA 255,255,30,72,180,80,169,69,133,12,169,72,133,13,169,0,3744 1010 DATA 162,0,157,0,64,157,0,65,157, 0,66,157,0,67,157,0,741 1020 DATA 68,157,0,69,157,0,70,157,0,7 1,232,208,229,160,0,185,8144 1030 DATA 20,80,170,200,185,20,80,141, 0,96,72,24,173,80,72,105,3422 1040 DATA 1,141,80,72,173,81,72,105,0, 141,81,72,104,202,208,231,8707 1050 DATA 200,192,124,208,218,169,144, 141,48,2,169,80,141,49,2,169,5602 1060 DATA 192,141,14,212,169,150,141,0 ,2,169,79,141,1,2,169,0,2001 1070 DATA 141,22,72,169,242,141,26,208 ,169,64,141,7,212,169,88,141,8543 1080 DATA 192,2,141,194,2,169,134,141, 195,2,169,10,141,193,2,169,6588 1090 DATA 120,141,0,208,141,1,72,141,1 ,208,169,0,141,2,208,141,5852 1100 DATA 3,72,141,3,208,141,4,72,141, 8,72,141,7,72,141,24,1603 1110 DATA 72,141,25,72,141,28,72,141,2 6,72,169,16,141,46,100,141,3570 1120 DATA 47,100,141,48,100,141,239,99 ,141,240,99,141,241,99,141,22,9229 1130 DATA 100,141,23,100,141,24,100,16 9,62,141,47,2,169,3,141,29,2209 1140 DATA 208,169,120,141,0,72,169,208 ,141,12,72,141,13,72,169,1,3490 1150 DATA 141,8,208,141,9,208,32,13,78 ,169,1,141,5,72,141,6,1495 1160 DATA 72,162,0,32,152,76,32,85,76, 32,77,78,162,0,189,52,2364 1170 DATA 73,157,135,96,232,224,11,240 ,14,76,38,73,51,43,37,37,1439 1180 DATA 52,0,51,40,47,47,52,189,0,22 4,157,0,64,189,255,224,8792 1190 DATA 157,255,64,232,208,241,169,6 4,141,244,2,162,80,189,221,78,1082 1200 DATA 157,8,64,202,16,247,173,31,2 08,201,6,208,249,141,30,208,827 1210 DATA 162,0,189,120,73,157,135,96, 232,224,11,240,45,76,106,73,7175 1220 DATA 0,0,0,0,0,0,0,0,0,0,0,173,11 ,212,201,123,1390 1230 DATA 208,249,173,42,2,208,3,32,10 1,77,173,11,212,201,123,240,9127 1240 DATA 249,173,17,72,201,2,48,64,24 0,0,32,215,77,32,242,77,5442 1250 DATA 169,114,141,0,208,141,1,72,1 69,130,141,0,72,32,13,78,1738 1260 DATA 169,0,141,1,210,173,120,2,20 1,14,208,249,169,0,141,17,6609 1270 DATA 72,173,10,210,141,16,72,169, 0,141,42,2,169,18,141,29,2139 1280 DATA 72,32,101,77,169,0,133,77,76 ,134,77,173,11,72,201,1,3548 1290 DATA 240,25,16,20,174,28,72,224,2 ,16,19,173,16,208,201,0,3640 1300 DATA 240,3,76,6,74,76,211,74,76,2 44,74,76,28,75,172,120,5457 1310 DATA 2,174,1,72,185,45,79,201,0,2 40,19,16,10,56,224,40,3022 1320 DATA 144,2,202,202,76,38,74,56,22 4,204,176,2,232,232,142,1,8882 1330 DATA 72,142,0,208,76,178,74,172,1 20,2,185,61,79,240,21,16,4685 1340 DATA 2,48,20,56,173,0,72,201,212, 176,9,32,140,74,32,140,4426 1350 DATA 74,32,140,74,76,131,73,56,17 3,0,72,201,16,144,245,32,5501 1360 DATA 102,74,32,102,74,32,102,74,3 2,102,74,76,131,73,24,173,2869 1370 DATA 10,72,105,14,141,9,72,174,0, 72,172,10,72,202,185,77,5053 1380 DATA 79,157,0,68,232,200,204,9,72 ,208,243,169,0,157,0,68,6620 1390 DATA 206,0,72,96,24,173,10,72,105 ,14,141,9,72,174,0,72,1268 1400 DATA 172,10,72,169,0,157,0,68,232 ,185,77,79,157,0,68,200,5964 1410 DATA 232,204,9,72,208,243,238,0,7 2,96,24,173,10,72,105,14,3414 1420 DATA 141,9,72,174,0,72,172,10,72, 185,77,79,157,0,68,232,5273 1430 DATA 200,204,9,72,208,243,240,0,7 6,47,74,169,0,141,42,2,3163 1440 DATA 169,0,141,29,72,173,42,2,208 ,3,32,101,77,174,28,72,2331 1450 DATA 232,142,28,72,169,15,141,11, 72,238,8,72,173,1,72,141,3927 1460 DATA 1,208,24,173,10,72,105,9,141 ,9,72,174,0,72,172,10,1917 1470 DATA 72,185,137,79,157,0,69,232,2 00,204,9,72,208,243,206,11,9938 1480 DATA 72,76,83,75,173,10,72,105,9, 141,9,72,174,0,72,172,3070 1490 DATA 10,72,169,0,141,11,72,169,0, 157,0,69,232,200,204,9,6196 1500 DATA 72,208,244,174,8,72,32,32,78 ,32,152,78,76,131,73,141,4171 1510 DATA 29,72,169,0,141,42,2,32,101, 77,96,173,13,208,41,4,1988 1520 DATA 208,13,173,13,208,141,30,208 ,41,8,208,49,76,131,73,173,6095 1530 DATA 5,72,201,15,16,236,238,7,72, 173,5,72,105,22,141,5,2725 1540 DATA 72,169,42,32,71,75,174,7,72, 32,32,78,32,133,78,169,2691 1550 DATA 128,32,190,78,173,27,72,32,1 84,75,76,90,75,173,6,72,3372 1560 DATA 201,15,16,25,238,7,72,173,6, 72,105,22,141,6,72,169,2953 1570 DATA 42,32,71,75,32,190,78,173,27 ,72,32,184,75,76,131,73,4114 1580 DATA 24,109,25,72,141,25,72,169,0 ,109,24,72,141,24,72,32,875 1590 DATA 77,78,96,174,23,72,232,142,2 3,72,224,49,208,13,173,6,5670 1600 DATA 72,105,3,141,6,72,169,0,141, 23,72,24,173,6,72,105,1772 1610 DATA 4,141,9,72,174,13,72,172,6,7 2,202,185,90,79,157,0,4886 1620 DATA 71,232,200,204,9,72,208,243, 169,0,157,0,71,206,13,72,5850 1630 DATA 173,13,72,201,24,240,70,96,1 74,23,72,232,142,23,72,224,7871 1640 DATA 49,208,13,173,5,72,105,3,141 ,5,72,169,0,141,23,72,1662 1650 DATA 24,173,5,72,105,4,141,9,72,1 74,12,72,172,5,72,202,3933 1660 DATA 185,90,79,157,0,70,232,200,2 04,9,72,208,243,169,0,157,9785 1670 DATA 0,70,206,12,72,173,12,72,201 ,24,240,68,96,32,242,77,6597 1680 DATA 238,26,72,238,17,72,173,10,2 10,141,15,72,32,5,77,105,2596 1690 DATA 8,141,3,208,141,4,72,169,208 ,141,13,72,169,1,141,6,4117 1700 DATA 72,169,0,141,28,72,141,0,210 ,141,1,210,141,28,2,174,5103 1710 DATA 26,72,224,31,240,45,32,32,78 ,32,171,78,141,30,208,96,5374 1720 DATA 32,215,77,238,17,72,173,10,2 10,141,14,72,32,255,76,141,6873 1730 DATA 2,208,141,3,72,169,208,141,1 2,72,169,1,141,5,72,141,4479 1740 DATA 30,208,96,169,5,32,184,75,17 4,8,72,232,142,8,72,224,7099 1750 DATA 60,240,3,76,187,76,162,0,189 ,246,76,157,135,96,232,224,2172 1760 DATA 9,240,3,76,208,76,173,31,208 ,201,6,240,11,169,0,141,7110 1770 DATA 2,208,141,3,208,76,222,76,32 ,13,78,76,144,72,39,33,2462 1780 DATA 45,37,0,47,54,37,50,173,14,7 2,76,8,77,173,15,72,891 1790 DATA 201,85,48,17,201,170,48,8,16 ,1,96,169,50,76,18,77,1252 1800 DATA 169,118,76,18,77,169,192,76, 18,77,32,16,76,173,16,72,2134 1810 DATA 56,201,50,144,102,32,16,76,1 73,16,72,56,201,160,144,91,6066 1820 DATA 32,16,76,76,147,77,32,203,75 ,56,173,0,72,201,212,176,8345 1830 DATA 3,32,140,74,173,16,72,56,201 ,50,144,14,32,203,75,173,5738 1840 DATA 16,72,56,201,160,144,3,32,20 3,75,76,227,73,174,29,72,6022 1850 DATA 189,219,79,141,0,210,232,189 ,219,79,141,1,210,232,189,219,4315 1860 DATA 79,141,28,2,232,142,29,72,16 9,255,141,42,2,96,173,14,5419 1870 DATA 72,201,85,48,22,201,170,48,1 45,16,29,173,15,72,201,85,5119 1880 DATA 48,35,201,170,48,160,16,42,7 6,227,73,174,3,72,202,142,7123 1890 DATA 3,72,142,2,208,76,34,77,174, 3,72,232,142,3,72,142,5233 1900 DATA 2,208,76,34,77,174,4,72,202, 142,3,208,142,4,72,76,4680 1910 DATA 62,77,174,4,72,232,142,3,208 ,142,4,72,76,62,77,173,5413 1920 DATA 5,72,105,4,141,9,72,174,12,7 2,172,5,72,169,0,157,3649 1930 DATA 0,70,232,200,204,9,72,208,24 4,96,173,6,72,105,4,141,6661 1940 DATA 9,72,174,13,72,172,6,72,169, 0,157,0,71,232,200,204,8360 1950 DATA 9,72,208,244,96,162,0,169,0, 232,157,0,68,157,0,69,4740 1960 DATA 224,255,208,245,32,102,74,96 ,160,0,138,56,233,100,144,4,6639 1970 DATA 200,170,176,248,24,152,105,1 6,141,19,72,160,0,138,56,233,6596 1980 DATA 10,144,4,200,170,176,248,24, 152,105,16,141,20,72,138,105,6228 1990 DATA 16,141,21,72,96,173,25,72,13 3,212,173,24,72,133,213,32,6921 2000 DATA 170,217,32,230,216,160,0,177 ,243,48,3,200,208,249,41,127,1013 2010 DATA 162,4,56,233,32,157,6,100,22 4,0,240,16,202,136,192,255,1562 2020 DATA 240,5,177,243,24,144,235,200 ,169,48,208,230,96,173,19,72,158 2030 DATA 141,22,100,173,20,72,141,23, 100,173,21,72,141,24,100,96,3840 2040 DATA 173,19,72,141,239,99,173,20, 72,141,240,99,173,21,72,141,7956 2050 DATA 241,99,96,173,19,72,141,46,1 00,173,20,72,141,47,100,173,5824 2060 DATA 21,72,141,48,100,96,173,16,7 2,56,201,160,176,17,56,201,7176 2070 DATA 50,176,6,169,10,141,27,72,96 ,169,25,141,27,72,96,169,4851 2080 DATA 50,141,27,72,96,56,120,216,2 4,24,24,24,225,0,0,0,98 2090 DATA 0,0,0,0,0,0,124,12,12,124,96 ,96,124,0,0,0,8222 2100 DATA 124,12,124,12,124,0,0,0,0,0, 54,62,6,60,195,195,1589 2110 DATA 195,195,195,195,60,0,56,108, 108,108,108,108,56,0,0,0,880 2120 DATA 56,108,108,108,56,0,0,0,0,0, 28,54,28,85,0,0,5938 2130 DATA 0,0,0,0,0,0,0,0,0,0,1,1,1,0, 255,255,71 2140 DATA 255,0,0,0,0,0,0,0,0,0,1,255, 0,0,1,255,9561 2150 DATA 0,0,1,255,0,16,16,16,0,0,0,1 46,0,0,0,16,5517 2160 DATA 16,16,0,56,124,254,0,48,120, 252,0,32,112,248,0,32,4384 2170 DATA 112,0,0,0,0,0,0,0,0,0,0,0,0, 20,65,8,3665 2180 DATA 34,8,32,132,32,80,128,16,128 ,64,128,32,0,0,0,0,8102 2190 DATA 0,0,0,0,124,124,124,124,124, 124,124,0,0,0,72,138,2422 2200 DATA 72,174,22,72,189,188,79,232, 142,22,72,141,10,212,141,26,7067 2210 DATA 208,141,24,208,169,30,205,22 ,72,208,5,169,0,141,22,72,4507 2220 DATA 104,170,104,64,242,242,242,2 42,242,242,226,210,194,178,162,146,890 8 2230 DATA 130,114,98,82,66,2,2,2,4,4,4 ,4,4,4,4,4,3982 2240 DATA 4,4,4,20,143,6,18,138,4,16,1 33,2,14,130,10,10,8320 2250 DATA 130,12,0,0,0,20,132,4,18,134 ,4,16,136,4,14,138,9460 2260 DATA 4,40,45,1,40,42,2,40,36,2,0, 0,0,10,143,10,6058 2270 DATA 9,138,8,8,135,7,7,133,6,6,13 1,5,200,0,200,0,1656 2280 DATA 160,0,3,0,1,5,2,9,28,0,1,5,2 ,9,6,0,3135 2290 DATA 34,10,5,0,1,4,2,8,30,0,1,4,2 ,8,4,0,2993 2300 DATA 36,10,43,0,1,3,2,7,32,0,1,3, 2,7,2,0,3067 2310 DATA 38,10,81,0,1,1,2,6,34,0,1,1, 2,6,40,10,3883 2320 DATA 1,0,1,51,1,40,1,47,1,52,1,51 ,1,26,17,0,4940 2330 DATA 1,51,1,35,1,47,1,50,1,37,1,2 6,11,0,1,40,4770 2340 DATA 1,41,1,52,1,51,1,26,18,0,1,5 0,1,47,1,53,5467 2350 DATA 1,46,1,36,1,26,11,0,240,240, 240,194,0,96,130,130,7730 2360 DATA 130,130,130,140,140,141,141, 141,141,141,141,141,130,130,130,130,82 3 2370 DATA 130,130,130,130,130,130,130, 130,2,65,144,80,0,226,2,227,7088 2380 DATA 2,30,72,0,0,0,0,0,0,0,0,0,0, 0,0,0,2658
.OPT NOLIST .OPT OBJ ; *** SKEET SHOOT *** ;programed by Tracy and Mike Jacobs ;programed in Mac/65 by OSS inc. *= $4000 PLAYERS .DS $0400 ;RESERVED PLAYER0 .DS $0100 ;MEMORY FOR PLAYER1 .DS $0100 ;PLAYERS PLAYER2 .DS $0100 PLAYER3 .DS $0100 DOSVIN = $0C ;RESET POINTER SDLSTL = $0230 ;DL POINTER (LB) SDLSTH = $0231 ;DL POINTER (HB) INTL = $0200 ;DLI POINTER (LB) INTH = $0201 ;DLI POINTER (HB) NMIEN = $D40E ;INTERRUPT ENABLE WSYNC = $D40A ;WAIT HOR. SYNC CHSET = PLAYERS ;NEW CHAR SET HPOSP0 = $D000 ;HOR. PL0 HPOSP1 = $D001 ;HOR. PL1 HPOSP2 = $D002 ;HOR. PL2 HPOSP3 = $D003 ;HOR. PL3 SIZEP0 = $D008 ;SIZE OF PL0 SIZEP1 = $D009 ;SIZE OF PL1 SDMCTL = $022F ;(DMA) CONTROL GRACTL = $D01D ;GRAPHIC CONTROL PCOLP0 = $02C0 ;COLOR OF PCOLP1 = $02C1 ;PLAYERS PCOLP2 = $02C2 PCOLP3 = $02C3 PMBASE = $D407 ;P/M BASE STICK = $0278 ;JOYSTICK (A) TRIG0 = $D010 ;JOYSTICK TRIGGER VCOUNT = $D40B ;VER. LINE COUNT P1PL = $D00D ;PL1 TO PLAYERS HITCRL = $D01E ;COLLISSION CLR RANDOM = $D20A ;RANDOM # CHBAS = $02F4 ;CHARACTER BASE COLBK = $D01A ;BACKGROUND COLOR COLPF2 = $D018 ;COLOR PLAYFIELD2 FRO = $D4 ;FLOATING POINT # IFP = $D9AA ;(FP) CONVERSION FASC = $D8E6 ;CONVERSION (SUB) INBUFF = $F3 ;POINTER TO ; BUFFER ASCII CDTMV3 = $021C ;TIMER 3 CDTMF3 = $022A ;(3) FLAG/VECTOR CONSOL = $D01F ;CONSOL PORT KEYS AUDC1 = $D201 ;AUDIO(1) CONTROL AUDF1 = $D200 ;AUDIO(1) FREQ. AUDCTL = $D208 ;AUDIO CONTROL ATRACT = $4D ;MODE TIMER SCR = PLAYERS+$2000 ;DISPLAY DISP = SCR+$03E8 ;COUNTERS ; ;Reserved Bytes for Variables ; LOCATION .DS 1 ;PLAYER 1,2 Y POS PLX0 .DS 1 ;AIM X POS. PLX1 .DS 1 ;BULLET X POS. PLX2 .DS 1 ;SKEET1 X POS. PLX3 .DS 1 ;SKEET2 X POS. SKEE1 .DS 1 ;CHAR FOR SKEET1 SKEE2 .DS 1 ;CHAR FOR SKEET2 HIT .DS 1 ;HIT COUNTER SHOTS .DS 1 ;SHOT COUNTER TEMPO .DS 1 ;TEMPORARY REG. DRAW .DS 1 ;PLAYERS POINTER DIS2 .DS 1 ;LENGHT OF BULLET ;ON THE SCREEN LOSKEE1 .DS 1 ;Y POS. OF SKEE1 LOSKEE2 .DS 1 ;Y POS. OF SKEE2 DIRECT .DS 1 ;SKEET1 DIRECTION DIRECT2 .DS 1 ;SKEET2 DIRECTION SPEED .DS 1 ;WHICH SPEED CHECK .DS 1 ;# FINISH SKEES NUMBER .DS 1 ;MATH REGISTERS HUNDRED .DS 1 TEN .DS 1 ONE .DS 1 DLIREG .DS 1 ;DLI REGISTER CSIZE .DS 1 ;SKEETS DISTANCE SCOREH .DS 1 ;HI BYTE OF SCORE SCOREL .DS 1 ;LO BYTE OF SCORE ROUND .DS 1 ;ROUND COUNTER POINT .DS 1 ;VALUE OF SKEETS TSHOT .DS 1 ;STAY OF BULLET AUINDX .DS 1 ;AUDIO REG. ; ;START SET UP ; LDA #<BEGIN ;WHEN RESET IS STA DOSVIN ;PRESS LDA #>BEGIN ;GAME WILL STA DOSVIN+1 ;START OVER. ; ; CLEAR MEMORY FOR PLAYER, ; CHARACTER SET, AND SCREEN ; LDA #0 LDX #0 CLEAR STA PLAYERS,X STA PLAYERS+$0100,X STA PLAYERS+$0200,X STA PLAYERS+$0300,X STA PLAYERS+$0400,X STA PLAYERS+$0500,X STA PLAYERS+$0600,X STA PLAYERS+$0700,X INX BNE CLEAR ; BEGIN LDY #0 ;DRAW CONTST LDA CHARDT,Y ;CHARACTERS TAX ;ON THE INY ;SCREEN LDA CHARDT,Y STORDT STA SCR PHA CLC LDA STORDT+1 ADC #1 STA STORDT+1 LDA STORDT+2 ADC #0 STA STORDT+2 PLA DEX BNE STORDT INY CPY #124 BNE CONTST ; ;SET UP SCREEN ; SUS LDA #LST&255 STA SDLSTL LDA #LST/256 STA SDLSTH LDA #192 STA NMIEN LDA #DLI&255 ;SET DLI STA INTL LDA #DLI/256 STA INTH LDA #0 STA DLIREG LDA #242 STA COLBK ; ; SET UP P/M GRAPHICS ; START LDA #>PLAYERS STA PMBASE LDA #88 STA PCOLP0 STA PCOLP2 LDA #134 STA PCOLP3 LDA #$0A STA PCOLP1 LDA #120 STA HPOSP0 STA PLX0 STA HPOSP1 ; ;CLEAR REGISTERS LDA #0 STA HPOSP2 STA PLX2 STA HPOSP3 STA PLX3 STA SHOTS STA HIT STA SCOREH STA SCOREL STA TSHOT STA ROUND ; CLEAR NUMBERS ON SCREEN LDA #16 STA DISP+70 STA DISP+71 STA DISP+72 STA DISP+7 STA DISP+8 STA DISP+9 STA DISP+46 STA DISP+47 STA DISP+48 ; ; SET UP SCREEN POINTERS ; LDA #62 STA SDMCTL LDA #3 STA GRACTL LDA #120 STA LOCATION LDA #208 ;SET SKEETS STA LOSKEE1 ;IN THERE STA LOSKEE2 ;STARTING LDA #1 ;POSITION STA SIZEP0 STA SIZEP1 JSR CLRAIM ;CLEAR GUNSIGHT LDA #1 STA SKEE1 STA SKEE2 LDX #0 JSR RESET JSR RESET2 JSR TSCORE ; ; PRINT TITLE IN SKY ; LDX #0 PRINT LDA SKESHO,X STA SCR+135,X INX CPX #11 BEQ LCHAR JMP PRINT SKESHO .SBYTE "SKEET SHOOT" ; ; REDEFINE CHARACTER SET ; LCHAR LDA $E000,X STA CHSET,X LDA $E0FF,X STA CHSET+$FF,X INX BNE LCHAR LDA #>CHSET STA CHBAS LDX #80 CHANCH LDA CHDATA,X STA CHSET+8,X DEX BPL CHANCH ; ; WAIT FOR (START) KEY ; CKEY LDA CONSOL CMP #6 BNE CKEY STA HITCRL ; ;CLEAR TITLE ; LDX #0 CSCR LDA CLRSCR,X STA SCR+135,X INX CPX #11 BEQ PULL JMP CSCR CLRSCR .SBYTE " " ; ; VCOUNT DELAY ROUTINE ; CHK LDA VCOUNT CMP #123 BNE CHK LDA CDTMF3 BNE CHK2 JSR AU0 CHK2 LDA VCOUNT CMP #123 BEQ CHK2 LDA CHECK CMP #2 BMI DIR BEQ PULL ; ; BEGIN PLAY ; PULL JSR CLRSKE1 ;CLEAR SKEET1 JSR CLRSKE2 ;CLEAR SKEET2 LDA #114 ;SET PLAYERS STA HPOSP0 ;TO THERE STA PLX0 ;POSITIONS LDA #130 ;AND WAIT STA LOCATION ;FOR THE STICK JSR CLRAIM ;TO BE PUSH UP LDA #0 STA AUDC1 ;CLEAR AUDIO ; ;WAIT FOR STICK TO BE PUSHED UP ; PULLS LDA STICK CMP #14 BNE PULLS LDA #0 STA CHECK LDA RANDOM ;LOAD RANDOM # STA SPEED ;FOR SPEED. LDA #0 ;MAKE SLINING STA CDTMF3 ;SOUND. LDA #18 STA AUINDX JSR AU0 LDA #0 STA ATRACT DIR JMP PICKDIR ;RELEASE SKEETS. ; COU LDA DIS2 ;COUNT LENGTH OF CMP #1 ;BULLET ON BEQ CLRSHOT ;THE SCREEN BPL GOBULL ; ;JOYSTICK CONTROL ; TRIG LDX TSHOT ;COUNT SHOTS THAT CPX #2 ;HAVE BEEN FIRED BPL LRMOVE ;IF TWO HAS BEEN LDA TRIG0 ;FIRED THEN YOUR CMP #0 ;OUT OF SHELL BEQ FIRE JMP LRMOVE FIRE JMP SHOT ;FIRE GUN GOBULL JMP SHOOT ;DISPLAY BULLET CLRSHOT JMP ERASE ;CLEAR SHOOT LRMOVE LDY STICK ;MOVE YOUR LDX PLX0 ;AIM LEFT OR LDA STRX,Y ;RIGHT CMP #0 BEQ STOHOZ BPL RIGHT LEFT SEC CPX #40 BCC LEFT2 DEX DEX LEFT2 JMP STOHOZ RIGHT SEC CPX #204 BCS STOHOZ INX INX STOHOZ STX PLX0 STX HPOSP0 JMP HMOVE UDMOVE LDY STICK ;MOVE YOUR AIM LDA STRY,Y ;UP OR DOWN BEQ MAC BPL MDN BMI MUP MDN SEC LDA LOCATION CMP #212 BCS MAC JSR MOVEDN JSR MOVEDN JSR MOVEDN MAC JMP CHK MUP SEC LDA LOCATION CMP #16 BCC MAC JSR MOVEUP JSR MOVEUP JSR MOVEUP JSR MOVEUP JMP CHK MOVEUP CLC ;MOVE PL0 UP LDA DRAW ADC #14 STA TEMPO LDX LOCATION LDY DRAW DEX LOOPUP LDA PIC,Y STA PLAYER0,X INX INY CPY TEMPO BNE LOOPUP LDA #0 STA PLAYER0,X DEC LOCATION RTS ; MOVEDN CLC ;MOVE PL0 DOWN LDA DRAW ADC #14 STA TEMPO LDX LOCATION LDY DRAW LDA #0 STA PLAYER0,X INX LOOPDN LDA PIC,Y STA PLAYER0,X INY INX CPY TEMPO BNE LOOPDN INC LOCATION RTS ; HMOVE CLC ;HOZ. MOVE LDA DRAW ADC #14 STA TEMPO LDX LOCATION LDY DRAW LOOPH LDA PIC,Y STA PLAYER0,X INX INY CPY TEMPO BNE LOOPH BEQ JUMPUP JUMPUP JMP UDMOVE ; ; SHOOT AT THE SKEET ; SHOT LDA #0 ;MAKE AUDIO STA CDTMF3 ;GUN SHOT LDA #0 STA AUINDX LDA CDTMF3 BNE CONTS JSR AU0 CONTS LDX TSHOT ;DISPLAY BULLET INX ;15 LOOPS ON THE STX TSHOT ;SCREEN LDA #15 STA DIS2 INC SHOTS SHOOT LDA PLX0 STA HPOSP1 CLC LDA DRAW ADC #9 STA TEMPO LDX LOCATION LDY DRAW BULLET LDA PIC2,Y STA PLAYER1,X INX INY CPY TEMPO BNE BULLET DEC DIS2 JMP COLL ; ERASE LDA DRAW ;ERASE THE BULLET ADC #9 STA TEMPO LDX LOCATION LDY DRAW LDA #0 STA DIS2 CLRLOP LDA #0 STA PLAYER1,X INX INY CPY TEMPO BNE CLRLOP LDX SHOTS ;CHANGE SHOT REG. JSR DISPNUM JSR PUTSHOT JMP CHK ; SOUMAK STA AUINDX LDA #0 STA CDTMF3 JSR AU0 RTS ; ;COLLISION ; COLL LDA P1PL AND #$04 BNE CCOLOR ; COLL2 LDA P1PL STA HITCRL AND #$08 BNE HIT2 JMP CHK ; CCOLOR LDA SKEE1 ;SHOT SKEET1 CMP #15 ;CHECK IF IT BPL COLL2 ;HAS BEEN HIT INC HIT ;BEFORE. LDA SKEE1 ;NO! ADC #22 ;CHANGE CHARACTER STA SKEE1 ;MAKE SOME LDA #42 ;NOISE JSR SOUMAK ;AND GIVE ME LDX HIT ;SOME POINTS. JSR DISPNUM JSR PUTHIT LDA #128 JSR SCSP LDA POINT JSR B16 JMP COLL2 ; HIT2 LDA SKEE2 ;SHOT SKEET2 CMP #15 ;SAME AS BEFORE BPL MAC2 INC HIT LDA SKEE2 ADC #22 STA SKEE2 LDA #42 JSR SOUMAK JSR SCSP LDA POINT JSR B16 MAC2 JMP CHK ; B16 CLC ;16-BIT MATH ADC SCOREL ;ADDITION STA SCOREL ;ROUTINE LDA #0 ADC SCOREH STA SCOREH JSR TSCORE RTS ; SMALL2 LDX CSIZE ;KEEP TRACK INX ;OF SKEET STX CSIZE ;DISTANCE CPX #49 BNE SKEE2UP MAKE2 LDA SKEE2 ;CHANGE ADC #3 ;CHARACTER OF STA SKEE2 ;THE SKEET LDA #0 STA CSIZE ; ; P/M OF SKEET (2) ; SKEE2UP CLC LDA SKEE2 ADC #4 STA TEMPO LDX LOSKEE2 LDY SKEE2 DEX LOOPSK2 LDA MG,Y STA PLAYER3,X INX INY CPY TEMPO BNE LOOPSK2 LDA #0 STA PLAYER3,X DEC LOSKEE2 LDA LOSKEE2 CMP #24 BEQ RESET2 RTS ; SMALL1 LDX CSIZE ;KEEP TRACK INX ;OF DISTANCE STX CSIZE ;SKEET1 CPX #49 BNE SKEE1UP MAKE1 LDA SKEE1 ;CHANGE CHARACTER ADC #3 STA SKEE1 LDA #0 STA CSIZE ; ; P/M OF SKEET (1) ; SKEE1UP CLC LDA SKEE1 ADC #4 STA TEMPO LDX LOSKEE1 LDY SKEE1 DEX LOOPSK1 LDA MG,Y STA PLAYER2,X INX INY CPY TEMPO BNE LOOPSK1 LDA #0 STA PLAYER2,X DEC LOSKEE1 LDA LOSKEE1 CMP #24 BEQ RESET RTS ; ; RESET REGISTERS & COUNT ROUNDS ; RESET2 JSR CLRSKE2 INC ROUND INC CHECK LDA RANDOM STA DIRECT2 JSR SIDE2 ADC #8 STA HPOSP3 STA PLX3 LDA #208 STA LOSKEE2 LDA #1 STA SKEE2 LDA #0 STA TSHOT STA AUDF1 STA AUDC1 STA CDTMV3 LDX ROUND CPX #31 BEQ ADDUP JSR DISPNUM JSR PUTROD STA HITCRL RTS ; ; RESET SKEET1 REGISTERS ; RESET JSR CLRSKE1 INC CHECK LDA RANDOM STA DIRECT JSR SIDE1 STA HPOSP2 STA PLX2 LDA #208 STA LOSKEE1 LDA #1 STA SKEE1 STA HITCRL RTS ; ADDUP LDA #5 ;AT END OF GAME JSR B16 ;GIVE 5 POINTS LDX SHOTS ;FOR EVER BULLET INX ;THAT IS LEFT. STX SHOTS CPX #60 BEQ GAME JMP ADDUP ; GAME LDX #0 ;DISPLAY ON OVER LDA END,X ;THE SCREEN STA SCR+135,X ;GAME OVER INX CPX #9 BEQ JAM JMP OVER ; JAM LDA CONSOL ;WAIT FOR CMP #6 ;START KEY TO BEQ AGAIN ;BEGIN. LDA #0 ; STA HPOSP2 ;GET PLAYERS 1,2 STA HPOSP3 ;OUT OF THE JMP JAM ;WAY ; AGAIN JSR CLRAIM JMP START ; END .SBYTE "GAME OVER" ; SIDE1 LDA DIRECT ;SKEET ONE JMP SIDE ;DIRECTION SIDE2 LDA DIRECT2 ;SKEET TWO SIDE CMP #85 ;DIRECTION BMI LSIDE CMP #170 BMI MIDDLE BPL RSIDE RE RTS RSIDE LDA #50 ;LEFT SIDE JMP RE MIDDLE LDA #118 ;MIDDLE JMP RE LSIDE LDA #192 ;RIGHT SIDE JMP RE SKEEU2 JSR SMALL1 ;MOVE SKEET1 LDA SPEED ;UP SEC CMP #50 BCC PICK2 JSR SMALL1 LDA SPEED SEC CMP #160 BCC PICK2 JSR SMALL1 JMP PICK2 SKEE2U2 JSR SMALL2 ;MOVE SKEET2 SEC ;UP LDA LOCATION CMP #212 BCS PAST JSR MOVEDN ;GRAVITY PAST LDA SPEED SEC CMP #50 BCC GOUP JSR SMALL2 LDA SPEED SEC CMP #160 BCC GOUP JSR SMALL2 ; GOUP JMP COU ; ;MAKE 16-BIT AUDIO WITH SUSTAIN ; AU0 LDX AUINDX LDA SOUND1,X STA AUDF1 INX LDA SOUND1,X STA AUDC1 INX LDA SOUND1,X STA CDTMV3 INX STX AUINDX LDA #$FF STA CDTMF3 RTS ; PICKDIR LDA DIRECT ;MOVE IN WHAT CMP #85 ;DIRECTION BMI SLEFT ;SKEET1 CMP #170 BMI SKEEU2 BPL SRIGHT PICK2 LDA DIRECT2 ;MOVE DIRECTION CMP #85 ;SKEET2 BMI S2LEFT CMP #170 BMI SKEE2U2 BPL S2RIGHT JMP COU SLEFT LDX PLX2 ;MOVE SKEET1 DEX ;LEFT STX PLX2 STX HPOSP2 JMP SKEEU2 SRIGHT LDX PLX2 ;MOVE SKEET1 INX ;RIGHT STX PLX2 STX HPOSP2 JMP SKEEU2 S2LEFT LDX PLX3 ;MOVE SKEET2 DEX ;LEFT STX HPOSP3 STX PLX3 JMP SKEE2U2 S2RIGHT LDX PLX3 ;MOVE SKEET2 INX ;RIGHT STX HPOSP3 STX PLX3 JMP SKEE2U2 CLRSKE1 LDA SKEE1 ;CLEAR SKEET1 ADC #4 STA TEMPO LDX LOSKEE1 LDY SKEE1 BLANK1 LDA #0 STA PLAYER2,X INX INY CPY TEMPO BNE BLANK1 RTS CLRSKE2 LDA SKEE2 ;CLEAR SKEET2 ADC #4 STA TEMPO LDX LOSKEE2 LDY SKEE2 BLANK2 LDA #0 STA PLAYER3,X INX INY CPY TEMPO BNE BLANK2 RTS CLRAIM LDX #0 ;CLEAR AIM LDA #0 CLRLOOP INX STA PLAYER0,X STA PLAYER1,X CPX #255 BNE CLRLOOP JSR MOVEUP RTS DISPNUM LDY #0 ;DISPLAY NUMBER TXA ;ON THE SCREEN SEC L01 SBC #$64 BCC L02 INY TAX BCS L01 L02 CLC TYA ADC #$10 STA HUNDRED LDY #0 TXA SEC L03 SBC #$0A BCC L04 INY TAX BCS L03 L04 CLC TYA ADC #$10 STA TEN TXA ADC #$10 STA ONE RTS ; TSCORE LDA SCOREL ;PRINT SCORE STA FRO ;ON SCREEN LDA SCOREH STA FRO+1 JSR IFP JSR FASC LDY #0 S01 LDA (INBUFF),Y BMI S02 INY BNE S01 S02 AND #$7F LDX #4 S03 SEC SBC #$20 STA DISP+30,X CPX #0 BEQ S05 DEX DEY CPY #$FF BEQ S04 LDA (INBUFF),Y CLC BCC S03 S04 INY LDA #$30 BNE S03 S05 RTS PUTHIT LDA HUNDRED ;PUT # OF STA DISP+46 ;HITS ON LDA TEN ;SCREEN STA DISP+47 LDA ONE STA DISP+48 RTS PUTSHOT LDA HUNDRED ;PUT # OF STA DISP+7 ;SHOTS ON LDA TEN ;SCREEN STA DISP+8 LDA ONE STA DISP+9 RTS PUTROD LDA HUNDRED ;PUT # OF STA DISP+70 ;ROUNDS LDA TEN ;ON SCREEN STA DISP+71 LDA ONE STA DISP+72 RTS SCSP LDA SPEED ;SET VALUE OF SEC ;SKEETS CMP #160 ;DEPENDING ON BCS SC50 ;SPEED SEC CMP #50 BCS SC25 SC10 LDA #10 ;GIVE 10 FOR SLOW STA POINT RTS SC25 LDA #25 ;GIVE 25 FOR MED. STA POINT RTS SC50 LDA #50 ;GIVE 50 FOR FAST STA POINT RTS ; ; DATA FOR NEW CHARACTER SET ; CHDATA .BYTE 56,120,216,24,24 .BYTE 24,24,225 .BYTE 0,0,0,0,0,0,0,0 .BYTE 0,124,12,12,124 .BYTE 96,96,124 .BYTE 0,0,0,124,12,124,12,124 .BYTE 0,0,0,0,0,54,62,6 .BYTE 60,195,195,195,195 .BYTE 195,195,60 .BYTE 0,56,108,108,108 .BYTE 108,108,56 .BYTE 0,0,0,56,108,108,108,56 .BYTE 0,0,0,0,0,28,54,28 .BYTE 85,0,0,0,0,0,0,0 ; ;LEFT OR RIGHT DATA FOR STICK ; STRX .BYTE 0,0,0,0,0,1,1,1 .BYTE 0,-1,-1,-1,0,0,0,0 ; ;UP OR DOWN DATA FOR STICK ; STRY .BYTE 0,0,0,0,0,1,-1,0 .BYTE 0,1,-1,0,0,1,-1,0 ; ;GRAPHICS FOR AIM(GUNSIGHT) ; PIC .BYTE 16,16,16,0,0,0 .BYTE 146,0,0,0,16,16,16 ; ;GRAPHICS FOR SKEETS ; MG .BYTE 0,56,124,254,0,48,120 .BYTE 252,0,32,112,248,0,32 .BYTE 112,0,0,0,0,0,0,0,0 .BYTE 0,0,0,0,20,65,8,34,8 .BYTE 32,132,32,80,128,16 .BYTE 128,64,128,32,0,0,0,0,0 ; ;GRAPHICS FOR BULLET ; PIC2 .BYTE 0,0,0,124,124,124 .BYTE 124,124,124,124,0,0,0 ; ;DLI ROUTINE ; DLI PHA TXA PHA LDX DLIREG LDA TABLE,X INX STX DLIREG STA WSYNC STA COLBK STA COLPF2 DLOOP LDA #30 CMP DLIREG BNE A1 LDA #0 STA DLIREG A1 PLA TAX PLA RTI ; ;COLOR TABLE FOR SKY ; TABLE .BYTE 242,242,242,242,242 .BYTE 242,226,210,194,178 .BYTE 162,146,130,114,98,82 .BYTE 66,2,2,2,4,4,4,4,4,4 .BYTE 4,4,4,4,4 ; ;DATA FOR AUDIO SOUNDS ; SOUND1 .BYTE 20,$8F,6 .BYTE 18,$8A,4 .BYTE 16,$85,2 .BYTE 14,$82,10 .BYTE 10,$82,12 .BYTE 0,0,0 .BYTE 20,$84,4 .BYTE 18,$86,4 .BYTE 16,$88,4 .BYTE 14,$8A,4 .BYTE 40,$2D,1 .BYTE 40,$2A,2 .BYTE 40,$24,2 .BYTE 0,0,0 SOUND2 .BYTE 10,$8F,10 .BYTE 9,$8A,8 .BYTE 8,$87,7 .BYTE 7,$85,6 .BYTE 6,$83,5 ; ;DATA FOR SCREEN ; CHARDT .BYTE 200,0,200,0,160,0 .BYTE 3,0,1,5,2,9,28 .BYTE 0,1,5,2,9 .BYTE 6,0,34,10,5,0,1,4,2,8 .BYTE 30,0,1,4,2,8,4,0,36,10 .BYTE 43,0,1,3 .BYTE 2,7,32,0,1,3,2,7,2,0 .BYTE 38,10,81,0,1,1,2,6,34,0 .BYTE 1,1,2,6,40,10,1,0,1 .BYTE 51,1,40,1,47 .BYTE 1,52,1,51,1,26,17,0,1 .BYTE 51,1,35,1,47,1,50,1,37 .BYTE 1,26,11,0,1,40,1,41,1 .BYTE 52,1,51,1,26,18,0 .BYTE 1,50,1,47,1,53,1,46,1 .BYTE 36,1,26,11,0 ; ;DISPLAY LIST ; LST .BYTE $F0,$F0,$F0,$C2 .BYTE SCR&255,SCR/256 .BYTE $82,$82,$82,$82,$82 .BYTE $8C,$8C,$8D,$8D,$8D .BYTE $8D,$8D,$8D,$8D .BYTE $82,$82,$82 .BYTE $82,$82,$82,$82,$82,$82 .BYTE $82,$82,$82,2,$41 .WORD LST ; ;SCREEN DISPLAY ; .END