A.N.A.L.O.G. ISSUE 44 / JULY 1986 / PAGE 117

Blast!

32K Cassette or Disk

by Steven Grimm

The control room of the Space Defense Center was chaotic. Technicians milled about, carrying their reams of printouts; white-haired scientists debated the reliability of the McPherison fusion shield in outer space, and military officials barked orders to nobody in particular.

The date was September 23; the year was 2140. Titan 16, a research probe orbiting the planet Pluto, had picked up evidence of an object traveling at near light speed. This in itself wasn’t particularly remarkable. Several natural phenomena were known to attain speeds of that magnitude. What was making the scientists and the military so nervous was that the object was headed directly toward Earth. Even more ominous: it had changed course to avoid a comet in its path.

If the thing continued on its present course, it would reach Earth in less than ten days. The world trembled with anticipation. Almost everyone agreed that it was an alien artifact of some sort.

That was about the only thing everyone could agree on. One person’s answer to the important questions was as good as any other’s… What was it? Were there aliens on board? Would they be friendly? Most important, why was the object coming?

Five days later, the first photographs of the object were transmitted to Earth by Titan 8, orbiting Saturn. The subject was a blue dome of about 50 meters in diameter. It was covered with black and green markings, presumably writing of some sort. On the dome’s base, two dish-shaped devices like radio telescopes were attached. There was a large hole in the center of the base of the dome.

Still the artifact hurtled toward the Earth. Finally, as predicted by the scientists, it reached its “target.” Unfortunately, it seemed to know more about Earth than the Earth’s creatures knew about it. It was in geosynchronous orbit directly above the Space Defense Center.

The planet waited. For two days, the object hovered over the Space Defense Center. It was decided to send fifteen of Earth’s newest ships to meet the object and attempt to make contact.

The messenger ships were 6 kilometers from the artifact when seven creatures emerged from its large hole. They sped toward the greeting party, seized the ships and dragged them into the craft. The ships were never heard from again.

Nobody was quite sure what to make of this hostility from the alien ship. The World Congress debated for 48 hours before deciding to send three more ships to meet it. This set of ships would be armed, however. If the creatures wanted to come out and steal more of Earth’s fleet, they’d have a fight on their hands.

You are the pilot of the three ships. As you approach the alien craft, the two dishes detach from the dome and separate. There’s a brief flash of light, then a gray force field springs into being between your command ship and the alien vessel.

The creatures emerge from the artifact. They penetrate the field easily. If your ship is destroyed you’ll be teleported to one of the remaining ones, so you aren’t that concerned with your safety. You doubt that they can stand up to the high-energy particle beam generator mounted on the front of your ship, anyway.

Indeed, you clear away the first twelve creatures with ease. But what’s this? The field is coming closer! It will be harder to dodge the creatures now…

Typing it in.

Listing 1 is the BASIC data used to create both disk and cassette versions of Blast! Those readers who are interested in how the game works may obtain the assembly listing on either the magazine disk version or the ANALOG Computing TCS.

Disk users should refer to the M/L Editor article on page 38 for typing instructions.

If you have a cassette system, type in Listing 1, then add the lines shown in Listing 2. Type RUN and press RETURN. The program will begin checking the data statements, printing the line numbers as it goes. It will alert you to any problems. Fix any incorrect lines and rerun the program until all errors are eliminated.

When all your data lines are correct, the computer will beep twice and prompt you to READY CASSETTE AND PRESS RETURN. Now, insert a blank cassette in your recorder, press the RECORD and PLAY buttons simultaneously, and hit RETURN. The message WRITING FILE will appear, and the program will create a machine language boot tape version of Blast!, printing each data line number as it goes. When the READY prompt appears, the game is recorded and ready to play. CSAVE the BASIC program on a separate tape before continuing.

To play the game, rewind the tape created with the BASIC program to the beginning. Turn the computer off and remove all cartridges. Press the PLAY button on your recorder and turn on your computer, while holding down the START key. If you have an XL or XE series computer, you must hold the START and OPTION keys when you turn on the power. The computer will beep once. Hit RETURN, and Blast! will load and run automatically.

Blast!ing away.

Using a joystick in port 0, you control the movement of the current command ship. Pressing the fire button activates the particle beam generator, firing one burst forward.

Your ship is destroyed when a creature touches it. You’re then transported to the next ship in your fleet, to continue the battle. If you have no ships remaining (surprise!), the game ends.

Occasionally, the alien craft will release one of the captured Earth ships. Shooting the captured ship will transport it to Earth, where it will be refitted with weaponry and launched to join your fleet.

There are two modes of difficulty in Blast! — each of which can be set in one of two ways. The first variable is speed, which can be fast or slow. Here, “speed” refers to how frequently the alien ship releases creatures. The beings themselves always move at the same rate.

The second mode is the skill level — easy or hard. When set on easy, the creatures will move in the same direction as the alien ship does. Choosing hard causes them to move in a random direction, once they’re released. This setting mainly affects the later levels of Blast!, when anticipating where the creatures will be is a large part of the strategy.

From the title page, press the OPTION button to switch between fast and slow. Press SELECT for hard and easy. Hitting START or the joystick button will begin the game.

Take a hint.

Might as well get a few tips to improve your scoring.

  1. Always stay as far away as possible from the right and left edges of the screen. It’s very easy to be trapped in a corner, with no route of escape.
  2. Aim before firing. Your game won’t last too long if you hold down the fire button without looking at what you’re doing.
  3. During the later levels, it’s helpful to shoot the creatures before they penetrate the force field and start bouncing around. Try to anticipate where they’ll be, so that you can time your shots properly. (This is what makes hard so tricky.)
  4. Play slow and easy until you can complete the game every time. The later levels are next to impossible if you aren’t an ace at the game.

I’ve won three times with Blast! set to fast and hard, so it is possible. Good luck!


Steven Grimm is a senior in high school. He plans to attend the University of California at Santa Cruz, where he’ll major in computer science.

Listing 1.
BASIC Listing.

1000 DATA 255,255,0,32,239,47,0,0,0,0,0,0,0,0,0,28,3818
1010 DATA 28,28,28,0,28,28,0,0,63,63,63,63,63,63,0,0,5833
1020 DATA 248,252,62,63,63,62,63,63,63,63,63,63,63,63,252,252,6001
1030 DATA 62,63,63,62,252,248,0,0,255,255,255,255,255,255,0,0,1998
1040 DATA 3,7,15,31,63,63,0,0,240,248,252,254,63,63,255,255,1985
1050 DATA 63,63,63,63,63,63,0,0,15,31,60,60,31,15,0,0,4811
1060 DATA 255,255,0,0,192,240,0,0,15,15,15,15,15,15,0,0,5260
1070 DATA 63,63,15,15,15,15,0,0,252,252,240,240,240,240,0,0,8317
1080 DATA 240,240,240,240,240,240,0,127,99,99,99,103,103,127,0,28,4907
1090 DATA 12,12,12,30,30,30,0,127,3,3,127,96,96,127,0,126,276
1100 DATA 6,6,127,7,7,127,0,112,112,112,112,119,127,7,0,127,1789
1110 DATA 96,96,127,7,7,127,0,126,102,96,127,99,99,127,0,127,3172
1120 DATA 103,7,14,28,28,28,0,62,54,54,127,119,119,127,0,127,1403
1130 DATA 99,99,127,7,7,7,0,28,28,28,0,28,28,28,252,254,1605
1140 DATA 255,255,255,255,254,252,15,15,0,0,15,15,15,15,15,15,7912
1150 DATA 15,15,15,15,15,15,240,240,240,240,240,240,240,240,240,240,9065
1160 DATA 0,0,240,240,240,240,0,0,8,28,20,85,119,93,0,62,913
1170 DATA 54,54,127,119,119,119,0,126,102,102,127,115,115,127,0,127,4526
1180 DATA 103,96,96,96,99,127,0,126,99,99,115,115,115,126,0,127,4229
1190 DATA 96,96,127,112,112,127,0,127,96,96,127,112,112,112,0,127,4266
1200 DATA 99,96,112,119,115,127,0,54,54,54,127,119,119,119,0,24,1520
1210 DATA 24,24,28,28,28,28,0,3,3,3,7,103,103,127,0,51,7113
1220 DATA 51,51,124,115,115,115,0,48,48,48,112,112,112,127,0,127,2608
1230 DATA 75,75,107,107,107,107,0,115,123,111,119,119,119,119,0,127,4500
1240 DATA 99,99,103,103,103,127,0,127,99,99,127,112,112,112,0,127,4229
1250 DATA 99,99,99,99,111,124,0,126,102,102,127,115,115,115,0,127,4399
1260 DATA 96,96,127,3,3,127,0,127,31,28,28,28,28,28,0,99,7277
1270 DATA 99,99,115,115,115,127,0,99,99,99,119,118,118,126,0,67,3477
1280 DATA 67,67,107,107,107,127,0,103,103,103,60,115,115,115,0,99,3037
1290 DATA 99,99,127,28,28,28,0,127,115,3,127,112,115,127,0,30,963
1300 DATA 24,24,24,24,30,0,0,64,96,48,24,12,6,0,0,120,5952
1310 DATA 24,24,24,24,120,0,0,8,28,54,99,0,0,0,0,0,4095
1320 DATA 0,0,0,0,255,0,112,80,77,0,16,13,13,13,13,13,5798
1330 DATA 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,3098
1340 DATA 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,3108
1350 DATA 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,3118
1360 DATA 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,3128
1370 DATA 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,3138
1380 DATA 13,13,13,13,141,0,71,146,34,65,0,34,112,112,112,112,1740
1390 DATA 112,112,112,112,112,112,112,112,71,166,34,65,102,34,112,112,4149
1400 DATA 240,71,186,34,7,112,6,112,6,112,112,112,112,112,7,112,2792
1410 DATA 112,7,112,112,7,65,120,34,34,44,33,51,52,1,0,32,6780
1420 DATA 32,0,0,51,35,47,50,37,26,16,16,16,0,0,0,0,3521
1430 DATA 0,0,39,33,45,37,0,47,54,37,50,0,0,0,0,0,3908
1440 DATA 0,0,0,0,2,3,2,0,7,8,10,11,13,14,12,15,2652
1450 DATA 0,0,0,0,0,0,0,0,4,5,4,6,4,9,2,27,2292
1460 DATA 29,30,28,31,0,0,0,0,0,0,162,185,128,179,180,165,5269
1470 DATA 182,165,174,128,167,178,169,173,173,0,0,0,0,172,161,179,6730
1480 DATA 180,154,144,144,144,0,168,169,167,168,154,144,144,144,0,0,6717
1490 DATA 0,0,0,0,0,239,240,244,233,239,238,0,115,108,111,119,237
1500 DATA 0,0,0,0,0,0,0,0,0,243,229,236,229,227,244,0,9096
1510 DATA 101,97,115,121,0,0,0,0,112,114,101,115,115,0,243,244,6317
1520 DATA 225,242,244,0,116,111,0,98,101,103,105,110,0,40,80,120,3085
1530 DATA 160,200,240,24,64,104,144,184,224,8,48,88,128,168,208,248,1114
1540 DATA 32,72,112,152,192,232,16,56,96,136,176,216,0,40,80,120,6004
1550 DATA 160,200,240,24,64,104,144,184,224,8,48,88,128,168,208,248,1134
1560 DATA 32,72,112,152,192,232,16,56,96,136,176,216,0,40,80,120,6024
1570 DATA 160,200,240,24,64,104,144,184,224,8,48,88,128,168,208,248,1154
1580 DATA 32,72,112,152,192,232,16,56,96,136,176,216,0,0,0,0,2364
1590 DATA 0,0,0,1,1,1,1,1,1,2,2,2,2,2,2,2,1811
1600 DATA 3,3,3,3,3,3,4,4,4,4,4,4,5,5,5,5,2181
1610 DATA 5,5,5,6,6,6,6,6,6,7,7,7,7,7,7,7,2511
1620 DATA 8,8,8,8,8,8,9,9,9,9,9,9,10,10,10,10,2881
1630 DATA 10,10,10,11,11,11,11,11,11,12,12,12,12,12,12,12,3211
1640 DATA 13,13,13,13,13,13,14,14,14,14,14,14,138,74,74,24,7035
1650 DATA 121,70,35,133,128,185,166,35,105,16,133,129,138,41,3,10,2429
1660 DATA 105,2,72,160,0,177,130,170,200,177,130,133,132,104,168,177,1077
1670 DATA 130,72,200,177,130,133,131,104,133,130,184,80,11,165,128,24,6687
1680 DATA 105,40,133,128,144,2,230,129,160,0,177,130,145,128,200,196,910
1690 DATA 132,144,247,152,24,101,130,133,130,144,2,230,131,202,208,221,2738
1700 DATA 96,173,68,36,72,173,69,36,72,169,169,141,68,36,169,0,4471
1710 DATA 141,69,36,32,6,36,104,141,69,36,104,141,68,36,96,169,3676
1720 DATA 48,141,7,212,162,0,138,157,0,50,157,0,51,157,128,49,3743
1730 DATA 232,208,244,169,0,141,8,208,141,10,208,141,11,208,169,192,363
1740 DATA 141,12,208,169,1,141,9,208,169,48,141,2,208,169,200,141,9685
1750 DATA 3,208,169,120,141,1,208,169,124,141,7,208,169,8,141,192,9270
1760 DATA 2,169,136,141,193,2,169,204,141,194,2,141,195,2,96,160,8350
1770 DATA 0,185,47,44,157,0,50,232,200,192,8,144,244,96,165,140,215
1780 DATA 24,101,141,133,140,201,10,176,4,169,1,133,141,201,144,144,8789
1790 DATA 4,169,255,133,141,165,140,24,105,44,141,7,208,56,233,4,6363
1800 DATA 141,1,208,76,152,38,152,72,162,0,189,55,44,153,128,50,5130
1810 DATA 232,200,224,7,144,244,104,24,105,2,168,169,0,153,128,49,5933
1820 DATA 169,192,153,129,49,96,162,0,189,62,44,153,0,51,189,72,4645
1830 DATA 44,153,128,51,232,200,224,10,144,238,96,72,164,142,185,70,387
1840 DATA 35,133,128,185,166,35,24,105,16,133,129,160,38,104,145,128,6299
1850 DATA 136,208,251,96,189,97,37,170,160,94,189,82,44,153,0,50,5642
1860 DATA 232,200,192,101,144,244,96,0,7,14,21,28,35,42,49,56,9772
1870 DATA 63,0,0,0,0,181,144,133,133,181,156,133,132,181,180,48,9128
1880 DATA 14,230,132,165,132,201,83,208,18,169,255,149,180,208,12,198,2566
1890 DATA 132,165,132,197,142,208,4,169,1,149,180,165,133,24,117,168,8841
1900 DATA 133,133,201,8,208,4,169,1,149,168,201,142,144,4,169,255,668
1910 DATA 149,168,165,132,149,156,165,133,149,144,96,181,156,168,142,107,1549
1920 DATA 37,181,144,56,233,4,170,96,133,130,132,131,32,181,37,32,5660
1930 DATA 6,36,174,107,37,96,162,11,181,192,240,53,48,41,41,254,7643
1940 DATA 168,10,141,4,210,185,6,47,72,185,7,47,168,104,32,194,5508
1950 DATA 37,246,192,181,192,201,16,144,24,32,100,38,206,126,38,169,7017
1960 DATA 0,141,5,210,76,11,38,32,111,37,169,152,160,44,32,194,5397
1970 DATA 37,202,16,196,173,109,37,240,41,41,7,170,189,232,38,141,8368
1980 DATA 6,210,162,22,160,47,134,130,132,131,174,108,37,238,109,37,7788
1990 DATA 172,109,37,192,89,144,12,32,91,36,169,0,141,109,37,141,4116
2000 DATA 7,210,96,76,6,36,149,144,169,10,149,156,165,141,172,132,9403
2010 DATA 39,240,9,173,10,210,41,1,208,2,169,255,149,168,169,1,8504
2020 DATA 149,180,169,128,149,192,238,127,38,96,169,152,133,130,169,44,9900
2030 DATA 133,131,32,181,37,32,91,36,174,107,37,169,0,149,192,206,7880
2040 DATA 127,38,96,0,0,0,169,12,141,126,38,169,0,141,110,37,3001
2050 DATA 141,125,38,141,127,38,162,79,149,144,202,16,251,96,198,138,728
2060 DATA 208,75,173,110,37,208,37,173,125,38,201,12,240,30,173,10,6608
2070 DATA 210,41,7,208,23,165,140,24,105,3,141,108,37,169,5,141,4492
2080 DATA 109,37,141,110,37,169,166,141,7,210,208,22,173,127,38,201,9143
2090 DATA 6,176,26,174,125,38,224,12,176,19,165,140,32,64,38,238,6698
2100 DATA 125,38,169,165,174,131,39,240,2,169,101,133,138,96,20,40,5810
2110 DATA 80,120,200,120,80,40,173,124,2,208,8,165,139,201,8,240,9100
2120 DATA 2,198,139,173,125,2,208,8,165,139,201,144,240,2,230,139,1420
2130 DATA 165,139,24,105,48,141,0,208,96,173,129,39,240,44,206,129,9186
2140 DATA 39,206,129,39,206,129,39,174,129,39,142,2,210,169,3,157,7393
2150 DATA 128,49,157,129,49,157,130,49,169,0,157,134,49,157,135,49,6352
2160 DATA 157,136,49,224,26,176,31,32,97,39,173,132,2,208,23,165,5964
2170 DATA 139,24,105,3,141,130,39,105,48,141,4,208,169,94,141,129,7356
2180 DATA 39,169,196,141,3,210,96,174,129,39,169,0,157,128,49,157,7538
2190 DATA 129,49,157,130,49,157,131,49,157,132,49,157,133,49,141,129,7654
2200 DATA 39,169,0,141,3,210,96,0,0,0,0,169,16,133,129,169,3825
2210 DATA 0,133,128,168,162,15,145,128,200,208,251,230,129,202,208,246,7433
2220 DATA 32,121,36,169,0,141,47,2,32,230,39,169,250,141,197,2,7725
2230 DATA 169,166,141,198,2,169,60,141,196,2,169,0,141,48,2,169,5400
2240 DATA 34,141,49,2,169,3,141,29,208,169,214,141,0,2,169,39,5588
2250 DATA 141,1,2,32,101,228,169,46,141,47,2,96,72,169,134,141,6432
2260 DATA 10,212,141,26,208,169,10,141,22,208,104,64,165,20,197,20,6363
2270 DATA 240,252,96,169,0,133,141,169,80,141,0,210,169,72,141,1,7101
2280 DATA 210,164,141,32,0,37,32,230,39,32,230,39,32,230,39,32,4057
2290 DATA 230,39,32,230,39,230,141,165,141,201,17,144,228,169,1,133,163
2300 DATA 141,169,80,133,140,169,0,141,1,210,96,0,32,97,39,166,4573
2310 DATA 143,189,149,40,133,142,169,168,141,1,210,173,37,40,141,0,6303
2320 DATA 210,56,233,5,168,32,32,37,32,230,39,32,230,39,32,230,6010
2330 DATA 39,238,37,40,173,37,40,56,233,11,48,223,197,142,144,219,555
2340 DATA 240,217,169,170,32,53,37,169,80,141,0,210,162,0,189,140,8121
2350 DATA 40,141,197,2,9,96,141,1,210,32,230,39,32,230,39,32,4828
2360 DATA 230,39,232,224,9,144,231,169,100,141,1,210,169,240,141,0,651
2370 DATA 210,96,2,8,14,14,12,10,8,6,4,15,30,40,45,50,5909
2380 DATA 55,60,65,70,72,162,94,32,201,36,169,76,133,139,169,124,8410
2390 DATA 141,0,208,76,97,39,162,127,169,0,149,128,202,16,251,141,9895
2400 DATA 26,44,32,27,44,32,133,39,32,32,43,32,237,39,169,0,2000
2410 DATA 141,37,40,133,143,32,38,40,169,2,141,26,44,32,27,44,303
2420 DATA 32,159,40,32,128,38,141,30,208,76,130,42,72,138,72,152,6059
2430 DATA 72,206,0,1,160,32,174,0,1,142,10,212,142,22,208,232,8197
2440 DATA 136,16,246,104,168,104,170,104,64,169,32,141,244,2,169,0,7293
2450 DATA 141,47,2,141,8,210,141,29,208,32,230,39,169,250,141,197,1928
2460 DATA 2,169,168,141,198,2,169,200,141,199,2,169,120,141,48,2,7248
2470 DATA 169,34,141,49,2,169,230,141,0,2,169,40,141,1,2,169,4028
2480 DATA 192,141,14,212,32,127,41,169,42,141,47,2,173,132,2,208,6189
2490 DATA 3,76,176,40,173,31,208,201,6,208,3,76,176,40,201,5,6470
2500 DATA 208,21,173,132,39,73,1,141,132,39,32,127,41,173,31,208,5767
2510 DATA 201,7,208,249,76,70,41,201,3,208,209,173,131,39,73,1,6882
2520 DATA 141,131,39,16,229,173,131,39,10,10,105,3,170,160,3,189,5416
2530 DATA 168,41,153,22,35,202,136,16,246,173,132,39,10,10,105,3,3551
2540 DATA 170,160,3,189,176,41,153,42,35,202,136,16,246,96,115,108,8346
2550 DATA 111,119,102,97,115,116,101,97,115,121,104,97,114,100,32,97,5814
2560 DATA 39,169,60,141,129,39,32,230,39,32,216,36,32,216,36,206,7379
2570 DATA 129,39,16,242,169,0,162,255,157,0,51,202,208,250,169,8,1077
2580 DATA 141,1,210,169,24,141,0,210,169,97,141,129,39,174,129,39,7767
2590 DATA 32,201,36,32,216,36,32,216,36,32,230,39,206,129,39,173,7987
2600 DATA 129,39,201,22,208,231,169,0,141,1,210,165,139,56,233,3,8810
2610 DATA 41,254,141,129,39,32,216,36,32,216,36,32,230,39,165,140,7764
2620 DATA 205,129,39,208,240,162,128,32,230,39,202,16,250,154,76,220,2296
2630 DATA 43,169,0,133,77,173,11,212,201,30,208,249,32,216,36,32,8616
2640 DATA 216,36,173,11,212,201,105,144,249,32,208,37,32,145,42,169,8717
2650 DATA 170,32,53,37,173,126,38,208,3,32,10,43,173,252,2,201,6738
2660 DATA 33,208,36,169,255,141,252,2,169,0,141,1,210,141,3,210,8987
2670 DATA 141,5,210,141,7,210,173,252,2,201,33,208,249,169,255,141,5108
2680 DATA 252,2,169,100,141,1,210,96,32,43,42,32,240,38,32,19,2792
2690 DATA 39,32,91,43,76,130,42,173,0,208,41,4,240,103,141,30,5812
2700 DATA 208,162,11,173,130,39,56,245,144,201,11,144,44,202,16,243,9876
2710 DATA 173,109,37,240,80,162,22,160,47,134,130,132,131,174,108,37,8106
2720 DATA 172,109,37,32,91,36,169,0,141,109,37,141,7,210,32,97,4724
2730 DATA 39,238,26,44,32,27,44,208,44,173,129,39,56,233,16,245,7956
2740 DATA 156,32,0,43,201,10,176,197,181,192,16,193,169,1,149,192,564
2750 DATA 181,144,24,105,4,149,144,32,73,43,32,97,39,169,8,141,3741
2760 DATA 5,210,141,4,210,96,201,0,16,5,73,255,24,105,1,96,4047
2770 DATA 169,0,32,53,37,230,143,165,143,201,10,208,3,76,184,41,7555
2780 DATA 32,38,40,76,128,38,169,16,141,163,34,141,164,34,141,165,7819
2790 DATA 34,96,162,2,56,189,163,34,105,0,201,26,144,2,169,16,4496
2800 DATA 157,163,34,202,16,239,96,168,32,44,43,136,208,250,96,166,856
2810 DATA 143,189,81,43,76,65,43,1,2,3,4,5,6,8,10,15,5557
2820 DATA 20,173,4,208,41,4,240,89,141,30,208,32,97,39,169,0,5234
2830 DATA 133,137,32,43,42,32,43,42,32,43,42,32,43,42,32,43,8423
2840 DATA 42,166,137,32,78,37,230,137,165,137,201,10,144,228,230,137,2963
2850 DATA 166,137,32,100,38,198,137,16,247,169,0,141,127,38,169,12,6766
2860 DATA 56,237,126,38,141,125,38,206,26,44,173,26,44,48,19,32,2219
2870 DATA 27,44,169,76,133,139,169,124,141,0,208,141,30,208,76,159,9705
2880 DATA 40,96,104,104,169,0,141,47,2,141,1,210,141,3,210,141,7288
2890 DATA 5,210,141,7,210,32,230,39,169,102,141,48,2,169,34,141,6756
2900 DATA 49,2,162,2,189,163,34,9,128,157,252,34,202,16,245,232,1819
2910 DATA 224,3,240,23,189,5,35,221,252,34,144,4,240,241,208,11,970
2920 DATA 162,2,189,252,34,157,5,35,202,16,247,169,42,141,47,2,6068
2930 DATA 169,0,141,29,208,162,64,32,230,39,202,208,250,76,3,41,8547
2940 DATA 0,169,32,162,0,236,26,44,144,2,169,0,157,153,34,232,7552
2950 DATA 224,3,208,241,96,24,60,36,165,165,231,189,0,0,24,60,5364
2960 DATA 66,90,165,255,0,7,8,16,224,60,224,16,8,7,0,224,4005
2970 DATA 16,8,7,60,7,8,16,224,0,90,60,165,165,231,189,0,7004
2980 DATA 66,60,60,165,231,189,0,0,60,36,189,231,126,0,0,0,3684
2990 DATA 60,36,255,255,0,0,0,0,60,255,255,0,0,0,0,0,802
3000 DATA 126,255,0,0,0,0,0,60,126,0,0,0,0,0,24,60,6570
3010 DATA 0,0,0,0,0,0,24,0,0,0,0,0,0,0,7,4,3347
3020 DATA 162,44,186,44,210,44,234,44,0,0,0,0,0,15,240,0,1118
3030 DATA 0,51,252,0,0,63,204,0,0,15,240,0,0,48,12,0,9336
3040 DATA 0,0,0,0,0,3,252,0,0,12,255,0,0,15,243,0,1602
3050 DATA 0,3,252,0,0,12,3,0,0,0,0,0,0,0,255,0,7730
3060 DATA 0,3,252,192,0,3,63,192,0,0,255,0,0,3,0,192,2504
3070 DATA 0,0,0,0,0,0,63,192,0,0,255,48,0,0,252,240,6048
3080 DATA 0,0,63,192,0,0,192,48,0,0,0,0,6,3,16,45,6845
3090 DATA 34,45,52,45,70,45,0,0,0,5,80,0,17,84,0,21,6833
3100 DATA 68,0,5,80,0,16,4,0,0,0,0,1,84,0,4,85,6151
3110 DATA 0,5,81,0,1,84,0,4,1,0,0,0,0,0,85,0,5188
3120 DATA 1,21,64,1,84,64,0,85,0,1,0,64,0,0,0,0,5621
3130 DATA 21,64,0,69,80,0,85,16,0,21,64,0,64,16,6,3,6786
3140 DATA 98,45,116,45,134,45,152,45,0,0,0,5,80,0,16,84,8904
3150 DATA 0,21,4,0,5,80,0,0,0,0,0,0,0,1,84,0,4983
3160 DATA 4,21,0,5,65,0,1,84,0,0,0,0,0,0,0,0,4230
3170 DATA 85,0,1,5,64,1,80,64,0,85,0,0,0,0,0,0,5526
3180 DATA 0,0,21,64,0,65,80,0,84,16,0,21,64,0,0,0,6449
3190 DATA 5,3,180,45,195,45,210,45,225,45,0,0,0,5,80,0,741
3200 DATA 16,20,0,20,4,0,5,80,0,0,0,0,1,84,0,4,5284
3210 DATA 5,0,5,1,0,1,84,0,0,0,0,0,85,0,1,1,4964
3220 DATA 64,1,64,64,0,85,0,0,0,0,0,21,64,0,64,80,7568
3230 DATA 0,80,16,0,21,64,5,3,250,45,9,46,24,46,39,46,9614
3240 DATA 0,0,0,5,80,0,16,4,0,16,4,0,4,16,0,0,4284
3250 DATA 0,0,1,84,0,4,1,0,4,1,0,1,4,0,0,0,3730
3260 DATA 0,0,85,0,1,0,64,1,0,64,0,65,0,0,0,0,5396
3270 DATA 0,21,64,0,64,16,0,64,16,0,16,64,5,3,64,46,7323
3280 DATA 79,46,94,46,109,46,0,0,0,5,80,0,16,4,0,16,6188
3290 DATA 4,0,0,0,0,0,0,0,1,84,0,4,1,0,4,1,4280
3300 DATA 0,0,0,0,0,0,0,0,85,0,1,0,64,1,0,64,5946
3310 DATA 0,0,0,0,0,0,0,21,64,0,64,16,0,64,16,0,6086
3320 DATA 0,0,4,3,134,46,146,46,158,46,170,46,0,0,0,5,64
3330 DATA 80,0,16,4,0,0,0,0,0,0,0,1,84,0,4,1,4654
3340 DATA 0,0,0,0,0,0,0,0,85,0,1,0,64,0,0,0,4948
3350 DATA 0,0,0,0,21,64,0,64,16,0,0,0,3,3,192,46,8192
3360 DATA 201,46,210,46,219,46,0,0,0,5,80,0,0,0,0,0,6768
3370 DATA 0,0,1,84,0,0,0,0,0,0,0,0,85,0,0,0,4814
3380 DATA 0,0,0,0,0,21,64,0,0,0,2,3,238,46,244,46,2146
3390 DATA 250,46,0,47,0,0,0,1,64,0,0,0,0,0,80,0,5704
3400 DATA 0,0,0,0,20,0,0,0,0,0,5,0,6,45,88,45,6303
3410 DATA 170,45,240,45,54,46,124,46,182,46,228,46,13,4,32,47,2967
3420 DATA 84,47,136,47,188,47,0,0,0,0,0,252,0,0,12,48,9388
3430 DATA 192,0,3,51,0,0,60,252,240,0,3,155,0,0,3,155,2849
3440 DATA 0,0,3,155,0,0,0,236,0,0,0,236,0,0,0,48,9557
3450 DATA 0,0,0,48,0,0,0,48,0,0,0,0,0,0,0,63,5034
3460 DATA 0,0,3,12,48,0,0,204,192,0,15,63,60,0,0,230,2498
3470 DATA 192,0,0,230,192,0,0,230,192,0,0,59,0,0,0,59,762
3480 DATA 0,0,0,12,0,0,0,12,0,0,0,12,0,0,0,0,3768
3490 DATA 0,0,0,15,192,0,0,195,12,0,0,51,48,0,3,207,771
3500 DATA 207,0,0,57,176,0,0,57,176,0,0,57,176,0,0,14,51
3510 DATA 192,0,0,14,192,0,0,3,0,0,0,3,0,0,0,3,4826
3520 DATA 0,0,0,0,0,0,0,3,240,0,0,48,195,0,0,12,9007
3530 DATA 204,0,0,243,243,192,0,14,108,0,0,14,108,0,0,14,9953
3540 DATA 108,0,0,3,176,0,0,3,176,0,0,0,192,0,0,0,8644
3550 DATA 192,0,0,0,192,0,224,2,225,2,3,41,8856

Listing 2.
BASIC Listing.

10 REM *** BLAST! ***
20 REM CASSETTE MAKER PROGRAM
40 DIM DAT(16):LINE=990:RESTORE 1000:TRAP 120:? "CHECKING DATA"
50 LINE=LINE+10:? "LINE:";LINE:FOR X=1 TO 16:READ DAT:IF DAT<8 OR DAT>255 THEN 220
60 DAT(X}=DAT:NEXT X:DATLIN=PEEK(183)+PEEK(184)*256:IF DATLIN<>LINE THEN ? "LINE ";LINE;" MISSING!":END
70 TOTAL=LINE:FOR X=1 TO 16
80 IF PASS=2 THEN PUT #1,DAT(X):NEXT X:READ CHKSUM:GOTO 50
90 TOTAL=TOTAL+DAT(X)*X:IF TOTAL>9999 THEN TOTAL=TOTAL−10000
100 NEXT X:READ CHKSUM:IF TOTAL=CHKSUM THEN 50
110 GOTO 220
120 IF PEEK(195)<>6 THEN 220
130 IF PASS=0 THEN 200
160 FOR X=1 TO 128; PUT #1,0:NEXT X:CLOSE #1:END
200 ? "READY CASSETTE AND PRESS RETURN";:OPEN #1,8,128,"C:":RESTORE 230:FOR X=1 TO 40:READ N:PUT #1,N:NEXT X
210 ? :? "WRITING FILE":PASS=2:LINE=990:RESTORE 1000:TRAP 120:GOTO 50
220 ? "BAD DATA: LINE ";LINE:END
230 DATA 0,32,210,31,249,31,169,0,234,234,234,169,60,141,2,211,169,0,141,231,2,133,14,169,56,141,232,2
240 DATA 133,15,169,3,133,10,169,41,133,11,24,96

Listing 3.
Assembly Listing.

;BLAST!
;
	*=	$2000
;
CHARSET
	.BYTE	$00,$00,$00,$00,$00,$00,$00,$00
	.BYTE	$00,$1C,$1C,$1C,$1C,$00,$1C,$1C
	.BYTE	$00,$00,$3F,$3F,$3F,$3F,$3F,$3F
	.BYTE	$00,$00,$F8,$FC,$3E,$3F,$3F,$3E
	.BYTE	$3F,$3F,$3F,$3F,$3F,$3F,$3F,$3F
	.BYTE	$FC,$FC,$3E,$3F,$3F,$3E,$FC,$F8
	.BYTE	$00,$00,$FF,$FF,$FF,$FF,$FF,$FF
	.BYTE	$00,$00,$03,$07,$0F,$1F,$3F,$3F
	.BYTE	$00,$00,$F0,$F8,$FC,$FE,$3F,$3F
	.BYTE	$FF,$FF,$3F,$3F,$3F,$3F,$3F,$3F
	.BYTE	$00,$00,$0F,$1F,$3C,$3C,$1F,$0F
	.BYTE	$00,$00,$FF,$FF,$00,$00,$C0,$F0
	.BYTE	$00,$00,$0F,$0F,$0F,$0F,$0F,$0F
	.BYTE	$00,$00,$3F,$3F,$0F,$0F,$0F,$0F
	.BYTE	$00,$00,$FC,$FC,$F0,$F0,$F0,$F0
	.BYTE	$00,$00,$F0,$F0,$F0,$F0,$F0,$F0
	.BYTE	$00,$7F,$63,$63,$63,$67,$67,$7F
	.BYTE	$00,$1C,$0C,$0C,$0C,$1E,$1E,$1E
	.BYTE	$00,$7F,$03,$03,$7F,$60,$60,$7F
	.BYTE	$00,$7E,$06,$06,$7F,$07,$07,$7F
	.BYTE	$00,$70,$70,$70,$70,$77,$7F,$07
	.BYTE	$00,$7F,$60,$60,$7F,$07,$07,$7F
	.BYTE	$00,$7E,$66,$60,$7F,$63,$63,$7F
	.BYTE	$00,$7F,$67,$07,$0E,$1C,$1C,$1C
	.BYTE	$00,$3E,$36,$36,$7F,$77,$77,$7F
	.BYTE	$00,$7F,$63,$63,$7F,$07,$07,$07
	.BYTE	$00,$1C,$1C,$1C,$00,$1C,$1C,$1C
	.BYTE	$FC,$FE,$FF,$FF,$FF,$FF,$FE,$FC
	.BYTE	$0F,$0F,$00,$00,$0F,$0F,$0F,$0F
	.BYTE	$0F,$0F,$0F,$0F,$0F,$0F,$0F,$0F
	.BYTE	$F0,$F0,$F0,$F0,$F0,$F0,$F0,$F0
	.BYTE	$F0,$F0,$00,$00,$F0,$F0,$F0,$F0
	.BYTE	$00,$00,$08,$1C,$14,$55,$77,$5D
	.BYTE	$00,$3E,$36,$36,$7F,$77,$77,$77
	.BYTE	$00,$7E,$66,$66,$7F,$73,$73,$7F
	.BYTE	$00,$7F,$67,$60,$60,$60,$63,$7F
	.BYTE	$00,$7E,$63,$63,$73,$73,$73,$7E
	.BYTE	$00,$7F,$60,$60,$7F,$70,$70,$7F
	.BYTE	$00,$7F,$60,$60,$7F,$70,$70,$70
	.BYTE	$00,$7F,$63,$60,$70,$77,$73,$7F
	.BYTE	$00,$36,$36,$36,$7F,$77,$77,$77
	.BYTE	$00,$18,$18,$18,$1C,$1C,$1C,$1C
	.BYTE	$00,$03,$03,$03,$07,$67,$67,$7F
	.BYTE	$00,$33,$33,$33,$7C,$73,$73,$73
	.BYTE	$00,$30,$30,$30,$70,$70,$70,$7F
	.BYTE	$00,$7F,$4B,$4B,$6B,$6B,$6B,$6B
	.BYTE	$00,$73,$7B,$6F,$77,$77,$77,$77
	.BYTE	$00,$7F,$63,$63,$67,$67,$67,$7F
	.BYTE	$00,$7F,$63,$63,$7F,$70,$70,$70
	.BYTE	$00,$7F,$63,$63,$63,$63,$6F,$7C
	.BYTE	$00,$7E,$66,$66,$7F,$73,$73,$73
	.BYTE	$00,$7F,$60,$60,$7F,$03,$03,$7F
	.BYTE	$00,$7F,$1F,$1C,$1C,$1C,$1C,$1C
	.BYTE	$00,$63,$63,$63,$73,$73,$73,$7F
	.BYTE	$00,$63,$63,$63,$77,$76,$76,$7E
	.BYTE	$00,$43,$43,$43,$6B,$6B,$6B,$7F
	.BYTE	$00,$67,$67,$67,$3C,$73,$73,$73
	.BYTE	$00,$63,$63,$63,$7F,$1C,$1C,$1C
	.BYTE	$00,$7F,$73,$03,$7F,$70,$73,$7F
	.BYTE	$00,$1E,$18,$18,$18,$18,$1E,$00
	.BYTE	$00,$40,$60,$30,$18,$0C,$06,$00
	.BYTE	$00,$78,$18,$18,$18,$18,$78,$00
	.BYTE	$00,$08,$1C,$36,$63,$00,$00,$00
	.BYTE	$00,$00,$00,$00,$00,$00,$FF,$00
;
; Zero page equates
;
ADDER	=	$80
PTR	=	$82
EXPCOUNT	=	$89
ALCOUNT	=	$8A
SHIPX	=	$8B
MOTHERX	=	$8C
MOTHERDX	=	$8D
FORCEY	=	$8E
ROUND	=	$8F
XTAB	=	$90
YTAB	=	$9C
DXTAB	=	$A8
DYTAB	=	$B4
DSTAB	=	$C0	;STATUS
;
; OS equates
;
STRIG0	=	$0284
HPOSP0	=	$D000
M0PF	=	$D000
P0PF	=	$D004
HITCLR	=	$D01E
AUDF1	=	$D200	;Force field
AUDC1	=	$D201
AUDF2	=	$D202	;Laser
AUDC2	=	$D203
AUDF3	=	$D204	;Monster death
AUDC3	=	$D205
AUDF4	=	$D206	;Needle falling
AUDC4	=	$D207
RANDOM	=	$D20A
;
SCREEN	=	$1000
;
; game screen dl
;
MAINDL
	.BYTE	$70,$50,$4D
	.WORD	SCREEN
	.BYTE	$0D,$0D,$0D
	.BYTE	$0D,$0D,$0D,$0D
	.BYTE	$0D,$0D,$0D,$0D
	.BYTE	$0D,$0D,$0D,$0D
	.BYTE	$0D,$0D,$0D,$0D
	.BYTE	$0D,$0D,$0D,$0D
	.BYTE	$0D,$0D,$0D,$0D
	.BYTE	$0D,$0D,$0D,$0D
	.BYTE	$0D,$0D,$0D,$0D
	.BYTE	$0D,$0D,$0D,$0D
	.BYTE	$0D,$0D,$0D,$0D
	.BYTE	$0D,$0D,$0D,$0D
	.BYTE	$0D,$0D,$0D,$0D
	.BYTE	$0D,$0D,$0D,$0D
	.BYTE	$0D,$0D,$0D,$0D
	.BYTE	$0D,$0D,$0D,$0D
	.BYTE	$0D,$0D,$0D,$0D
	.BYTE	$0D,$0D,$0D,$0D
	.BYTE	$0D,$0D,$0D,$0D
	.BYTE	$0D,$0D,$0D,$0D
	.BYTE	$0D,$0D,$0D,$0D
	.BYTE	$0D,$0D,$0D,$0D
	.BYTE	$0D,$0D,$8D,0
	.BYTE	$47
	.WORD	SCORELN
	.BYTE	$41
	.WORD	MAINDL
;
; "GAME OVER" display list
;
GODL
	.BYTE	$70,$70,$70,$70
	.BYTE	$70,$70,$70,$70
	.BYTE	$70,$70,$70,$70
	.BYTE	$47
	.WORD	GOLN
	.BYTE	$41
	.WORD	GODL
;
; Title page dl
;
TITLEDL
	.BYTE	$70,$70,$F0
	.BYTE	$47
	.WORD	TITLEPG-20
	.BYTE	$07,$70,$06,$70
	.BYTE	$06,$70,$70,$70
	.BYTE	$70,$70,$07,$70
	.BYTE	$70,$07,$70
	.BYTE	$70,$07,$41
	.WORD	TITLEDL
;
; Score line
; (at bottom, in graphics 2)
; Ships at +7
; score at +17
;
SCORELN
	.SBYTE	"BLAST! @@  SCORE:000"
;
; Game over
;
GOLN	.SBYTE	"      GAME OVER     "
;
; Prelim. title page
; Last at +46, high at +55
; Speed at +72, skill at +92
;
	.BYTE	0,0,0,0,2,3,2,0,7,8,10,11,13,14,12,15,0,0,0,0
TITLEPG	.BYTE	0,0,0,0,4,5,4,6,4,9,2,27,29,30,28,31,0,0,0,0
	.SBYTE	"  BY STEVEN GRIMM   "
	.SBYTE	" LAST:000 HIGH:000  "
	.SBYTE	"     option slow    "
	.SBYTE	"     select easy    "
	.SBYTE	"press start to begin"
;
; Y tables for bitmap routine
;
TABLO
	.BYTE	0,40,80,120,160,200,240
	.BYTE	24,64,104,144,184,224
	.BYTE	8,48,88,128,168,208,248
	.BYTE	32,72,112,152,192,232
	.BYTE	16,56,96,136,176,216
	.BYTE	0,40,80,120,160,200,240
	.BYTE	24,64,104,144,184,224
	.BYTE	8,48,88,128,168,208,248
	.BYTE	32,72,112,152,192,232
	.BYTE	16,56,96,136,176,216
	.BYTE	0,40,80,120,160,200,240
	.BYTE	24,64,104,144,184,224
	.BYTE	8,48,88,128,168,208,248
	.BYTE	32,72,112,152,192,232
	.BYTE	16,56,96,136,176,216
TABHI
	.BYTE	0,0,0,0,0,0,0
	.BYTE	1,1,1,1,1,1
	.BYTE	2,2,2,2,2,2,2
	.BYTE	3,3,3,3,3,3
	.BYTE	4,4,4,4,4,4
	.BYTE	5,5,5,5,5,5,5
	.BYTE	6,6,6,6,6,6
	.BYTE	7,7,7,7,7,7,7
	.BYTE	8,8,8,8,8,8
	.BYTE	9,9,9,9,9,9
	.BYTE	10,10,10,10,10,10,10
	.BYTE	11,11,11,11,11,11
	.BYTE	12,12,12,12,12,12,12
	.BYTE	13,13,13,13,13,13
	.BYTE	14,14,14,14,14,14
WIDTH	=	$84
;
; Bitmap routine for Atari
;
; Enter:
; .x,.y screen coords to plot at
; PTR   pointer to bitmap:
;       height
;       width
;       pointer to shift 0
;       pointer to shift 1
;       pointer to shift 2
;       pointer to shift 3
;       start of data
;
PLOTMAP
	TXA
	LSR	A
	LSR	A
	CLC
	ADC	TABLO,Y
	STA	ADDER
	LDA	TABHI,Y
	ADC	#>SCREEN
	STA	ADDER+1
	TXA
	AND	#3
	ASL	A
	ADC	#2
	PHA
	LDY	#0
	LDA	(PTR),Y
	TAX
	INY
	LDA	(PTR),Y
	STA	WIDTH
	PLA
	TAY
	LDA	(PTR),Y
	PHA
	INY
	LDA	(PTR),Y
	STA	PTR+1
	PLA
	STA	PTR
	CLV
	BVC	?PM1.5
?PM1	LDA	ADDER
	CLC
	ADC	#40
	STA	ADDER
	BCC	?PM1.5
	INC	ADDER+1
?PM1.5	LDY	#0
?PM2	LDA	(PTR),Y
	STA	(ADDER),Y
	INY
	CPY	WIDTH
	BCC	?PM2
	TYA
	CLC
	ADC	PTR
	STA	PTR
	BCC	?PM3
	INC	PTR+1
?PM3	DEX
	BNE	?PM1
	RTS
;
; Erase bitmap - cheating
; method
;
ERASEBM	LDA	?PM2
	PHA
	LDA	?PM2+1
	PHA
	LDA	#$A9	;lda imm
	STA	?PM2
	LDA	#0
	STA	?PM2+1
	JSR	PLOTMAP
	PLA
	STA	?PM2+1
	PLA
	STA	?PM2
	RTS
PLAYER0	=	$3200
PLAYER1	=	$3280
PLAYER2	=	$3300
PLAYER3	=	$3380
;
; Player-missile routines.
; Includes player-missile init-
;  ialization and startup.
;
PMINIT	LDA	#[>PLAYER0]-2
	STA	$D407	;pmbase
	LDX	#0
	TXA
?PMI1	STA	PLAYER0,X
	STA	PLAYER2,X
	STA	PLAYER0-$80,X
	INX
	BNE	?PMI1
	LDA	#0
	STA	$D008	;sizep0
	STA	$D00A	;sizep2
	STA	$D00B	;sizep3
	LDA	#192
	STA	$D00C	;sizem
	LDA	#1
	STA	$D009	;sizep1
	LDA	#48
	STA	$D002	;hposp2
	LDA	#200
	STA	$D003	;hposp3
	LDA	#120
	STA	$D001	;hposp1
	LDA	#124
	STA	$D007	;hposm3
	LDA	#8
	STA	704
	LDA	#$88
	STA	705
	LDA	#$CC
	STA	706
	STA	707
	RTS
;
; Put up player's ship.
;
PUTSHIP
	LDY	#0
?PS2	LDA	PLAYER,Y
	STA	PLAYER0,X
	INX
	INY
	CPY	#8
	BCC	?PS2
	RTS
;
; Move mother ship one unit.
; X position of center is in
; MOTHERX.
;
MOVEMOM	LDA	MOTHERX
	CLC
	ADC	MOTHERDX
	STA	MOTHERX
	CMP	#10
	BCS	?MMOM1
	LDA	#1
	STA	MOTHERDX
?MMOM1	CMP	#144
	BCC	?MMOM2
	LDA	#-1
	STA	MOTHERDX
?MMOM2	LDA	MOTHERX
	CLC
	ADC	#44
	STA	$D007	;hposm3
	SEC
	SBC	#4
	STA	$D001	;hposp1
	JMP	ALIEN
;
; Plot mother ship in player 1
; with y-coord .y
;
PLOTMOM
	TYA
	PHA
	LDX	#0
?PMOM1	LDA	MOTHER,X
	STA	PLAYER1,Y
	INX
	INY
	CPX	#7
	BCC	?PMOM1
	PLA
	CLC
	ADC	#2
	TAY
	LDA	#0
	STA	MISSILES,Y
	LDA	#$C0
	STA	MISSILES+1,Y
	RTS
;
; Plot left and right force
; field generators in players
; at .y
;
PLOTGEN
	LDX	#0
?PGEN1	LDA	LEFTGEN,X
	STA	PLAYER2,Y
	LDA	RIGHTGEN,X
	STA	PLAYER3,Y
	INX
	INY
	CPX	#10
	BCC	?PGEN1
	RTS
;
; Plot up force field in color
; .a and at FORCEY
;
PLOTFIELD
	PHA
	LDY	FORCEY
	LDA	TABLO,Y
	STA	ADDER
	LDA	TABHI,Y
	CLC
	ADC	#>SCREEN
	STA	ADDER+1
	LDY	#38
	PLA
?PFIELD1	STA	(ADDER),Y
	DEY
	BNE	?PFIELD1
	RTS
;
; Put explosion number .x into
; player's ship area
;
PUTEXP
	LDA	TIMES7,X
	TAX
	LDY	#94
?PX1	LDA	SEXPLODE,X
	STA	PLAYER0,Y
	INX
	INY
	CPY	#101
	BCC	?PX1
	RTS
TIMES7	.BYTE	0,7,14,21,28,35,42,49,56,63
	.LOCAL
;
; Movement routines for the
; monsters.
;
?TEMP	.BYTE	0
NEEDLEX	.BYTE	0
NEEDLEY	.BYTE	0
NEEDLEF	.BYTE	0
?YT	=	$84
?XT	=	$85
;
; Move monster number .x
;
MOVE1
	LDA	XTAB,X
	STA	?XT
	LDA	YTAB,X
	STA	?YT
	LDA	DYTAB,X
	BMI	?M11
	INC	?YT
	LDA	?YT
	CMP	#83	;bottom
	BNE	?M12
	LDA	#-1
	STA	DYTAB,X
	BNE	?M12
?M11	DEC	?YT
	LDA	?YT
	CMP	FORCEY	;check field
	BNE	?M12
	LDA	#1
	STA	DYTAB,X
?M12	LDA	?XT
	CLC
	ADC	DXTAB,X
	STA	?XT
	CMP	#8
	BNE	?M13
	LDA	#1
	STA	DXTAB,X
?M13	CMP	#142	;rt side
	BCC	?M1X
	LDA	#-1
	STA	DXTAB,X
?M1X	LDA	?YT
	STA	YTAB,X
	LDA	?XT
	STA	XTAB,X
	RTS
;
; Get monster coords for bitmap
;
GETCOORD	LDA	YTAB,X
	TAY
	STX	?TEMP
	LDA	XTAB,X
	SEC
	SBC	#4
	TAX
	RTS
;
; Plot monster number .x as
; bitmap in (.y.a)
;
PLOTC	STA	PTR
	STY	PTR+1
	JSR	GETCOORD
	JSR	PLOTMAP
	LDX	?TEMP
	RTS
;
; Animate 12 monsters 1 cycle
; each.
;
CYCLE
	LDX	#11
?CYC1	LDA	DSTAB,X	;Status 0?
	BEQ	?CYC2
	BMI	?CYCM	;move if here
	AND	#$FE
	TAY		;get right
	ASL	A
	STA	AUDF3
	LDA	EXPLTAB,Y	;explosion
	PHA
	LDA	EXPLTAB+1,Y
	TAY
	PLA
	JSR	PLOTC	;next expl.
	INC	DSTAB,X
	LDA	DSTAB,X
	CMP	#16
	BCC	?CYC2
	JSR	KILLMON
	DEC	MONLEFT
	LDA	#0
	STA	AUDC3
	JMP	?CYC2
?CYCM	JSR	MOVE1	;move
	LDA	#<SQUARE
	LDY	#>SQUARE
	JSR	PLOTC	;draw
?CYC2	DEX
	BPL	?CYC1
	LDA	NEEDLEY	;Extra man here?
	BEQ	?CYCX	;No, go away
	AND	#7	;Yes, do next
	TAX		;sound
	LDA	NEEDLES,X
	STA	AUDF4
	LDX	#<NEEDLE	;Point to
	LDY	#>NEEDLE	;bitmap
	STX	PTR
	STY	PTR+1
	LDX	NEEDLEX
	INC	NEEDLEY	;Move it
	LDY	NEEDLEY	;Off the
	CPY	#89	;screen?
	BCC	?NEED1	;No, draw it
	JSR	ERASEBM	;Yes, erase
	LDA	#0	;And de-flag
	STA	NEEDLEY	;it.
	STA	AUDC4
?CYCX	RTS		;Exit here!!!
?NEED1	JMP	PLOTMAP
;
; Initialize monster .x at x-
; coord in .a
;
INITMON	STA	XTAB,X
	LDA	#10
	STA	YTAB,X
	LDA	MOTHERDX
	LDY	SKILL
	BEQ	?IMON1
	LDA	RANDOM
	AND	#1
	BNE	?IMON1
	LDA	#$FF
?IMON1	STA	DXTAB,X
	LDA	#1
	STA	DYTAB,X
	LDA	#$80
	STA	DSTAB,X	;status here
	INC	MONHERE
	RTS
;
; Kill monster number .x
;
KILLMON
	LDA	#<SQUARE	;erase it
	STA	PTR
	LDA	#>SQUARE
	STA	PTR+1
	JSR	GETCOORD
	JSR	ERASEBM
	LDX	?TEMP
	LDA	#0
	STA	DSTAB,X	;kill it
	DEC	MONHERE
?KM1	RTS
;
; Init a new wave of monsters
;
MONSTERS	.BYTE	0
MONLEFT	.BYTE	0
MONHERE	.BYTE	0
INITWAVE	LDA	#12
	STA	MONLEFT
	LDA	#0
	STA	NEEDLEF
	STA	MONSTERS
	STA	MONHERE
	LDX	#[16*5]-1
?IWV1	STA	XTAB,X
	DEX
	BPL	?IWV1
	RTS
;
; Put a monster on at interval
; of $A5 or $85 moves
;
ALIEN	DEC	ALCOUNT
	BNE	?ALX
	LDA	NEEDLEF
	BNE	?AL0
	LDA	MONSTERS
	CMP	#12
	BEQ	?AL0
	LDA	RANDOM
	AND	#7
	BNE	?AL0
	LDA	MOTHERX
	CLC
	ADC	#3
	STA	NEEDLEX
	LDA	#5
	STA	NEEDLEY
	STA	NEEDLEF
	LDA	#$A6
	STA	AUDC4
	BNE	?ALS
?AL0	LDA	MONHERE
	CMP	#6
	BCS	?ALX
	LDX	MONSTERS
	CPX	#12
	BCS	?ALX
	LDA	MOTHERX
	JSR	INITMON
	INC	MONSTERS
?ALS	LDA	#$A5
	LDX	SPEED
	BEQ	?ALP
	LDA	#$65
?ALP	STA	ALCOUNT
?ALX	RTS
NEEDLES	.BYTE	20,40,80,120,200,120,80,40
;
; Player ship move routines
; (also laser handling)
;
	.LOCAL
;
; Move player's ship one
; cycle based on joystick.
;
MOVESHIP	LDA	$027C	;left stick?
	BNE	?MSHIP1	;no, do next
	LDA	SHIPX	;can he go further?
	CMP	#8
	BEQ	?MSHIP1	;no, exit
	DEC	SHIPX	;yes, do it
?MSHIP1	LDA	$027D	;check for right
	BNE	?MSHIPX
	LDA	SHIPX
	CMP	#144
	BEQ	?MSHIPX
	INC	SHIPX
?MSHIPX	LDA	SHIPX
	CLC
	ADC	#48
	STA	$D000	;do the move
	RTS
;
; Move player's laser one cycle
; or check for fire if no laser
; is up
;
MISSILES	=	PLAYER0-$80
MOVELASER	LDA	LASERY
	BEQ	?CFIRE
	DEC	LASERY
	DEC	LASERY
	DEC	LASERY
	LDX	LASERY
	STX	AUDF2
	LDA	#3
	STA	MISSILES,X
	STA	MISSILES+1,X
	STA	MISSILES+2,X
	LDA	#0
	STA	MISSILES+6,X
	STA	MISSILES+7,X
	STA	MISSILES+8,X
	CPX	#26
	BCS	?LEXIT
	JSR	CLRLASER
?CFIRE	LDA	STRIG0
	BNE	?LEXIT
	LDA	SHIPX
	CLC
	ADC	#3
	STA	LASERX
	ADC	#48
	STA	$D004	;hposm0
	LDA	#94
	STA	LASERY
	LDA	#$C4
	STA	AUDC2
?LEXIT	RTS
;
; Clear out laser.
;
CLRLASER	LDX	LASERY
	LDA	#0
	STA	MISSILES,X
	STA	MISSILES+1,X
	STA	MISSILES+2,X
	STA	MISSILES+3,X
	STA	MISSILES+4,X
	STA	MISSILES+5,X
	STA	LASERY
	LDA	#0
	STA	$D203	;AUDC2
	RTS
LASERY	.BYTE	0
LASERX	.BYTE	0
SPEED	.BYTE	0
SKILL	.BYTE	0
;
; Routines for title page,
; initialization, and
; game startup.
;
	.LOCAL
;
; Set up play screen:
; 1. Clear screen memory.
; 2. Initialize players
; 3. Do display list
; 4. Setup DLI
;
PLAYSCRN	LDA	#>SCREEN
	STA	ADDER+1
	LDA	#<SCREEN
	STA	ADDER
	TAY
	LDX	#$0F
?PSCN1	STA	(ADDER),Y
	INY
	BNE	?PSCN1
	INC	ADDER+1
	DEX
	BNE	?PSCN1
	JSR	PMINIT
	LDA	#0
	STA	559
	JSR	VBWAIT
	LDA	#$FA
	STA	709	;FORCE FIELD
	LDA	#$A6
	STA	710	;ALIENS
	LDA	#$3C
	STA	708	;EXPLOSION
	LDA	#<MAINDL
	STA	560
	LDA	#>MAINDL
	STA	561
	LDA	#3
	STA	53277	;gractl
	LDA	#<PLAYDLI
	STA	$0200
	LDA	#>PLAYDLI
	STA	$0201
	JSR	$E465	;SIOINV
	LDA	#46
	STA	559
	RTS
;
; Display list interrupt for
; play screen
;
PLAYDLI	PHA
	LDA	#$86
	STA	$D40A	;wsync
	STA	$D01A
	LDA	#$0A
	STA	$D016
	PLA
	RTI
;
; Wait for vertical blank.
;
VBWAIT	LDA	$14
?VBW1	CMP	$14
	BEQ	?VBW1
	RTS
;
; Lower mother ship (for game
; startup) and init her vars
;
LOWERMOM	LDA	#0
	STA	MOTHERDX
	LDA	#$50
	STA	AUDF1
	LDA	#$48
	STA	AUDC1
?LMOM1	LDY	MOTHERDX
	JSR	PLOTMOM
	JSR	VBWAIT
	JSR	VBWAIT
	JSR	VBWAIT
	JSR	VBWAIT
	JSR	VBWAIT
	INC	MOTHERDX
	LDA	MOTHERDX
	CMP	#17
	BCC	?LMOM1
	LDA	#1
	STA	MOTHERDX
	LDA	#80
	STA	MOTHERX
	LDA	#0
	STA	AUDC1
	RTS
;
; Lower generators to the proper
; height and do fancy force
; field startup (with sound).
;
?FLEVL	.BYTE	0
LOWERFORCE
	JSR	CLRLASER
	LDX	ROUND
	LDA	FORCELEV,X
	STA	FORCEY
	LDA	#$A8
	STA	AUDC1
?LFOR1	LDA	?FLEVL
	STA	AUDF1
	SEC
	SBC	#5
	TAY
	JSR	PLOTGEN
	JSR	VBWAIT
	JSR	VBWAIT
	JSR	VBWAIT
	INC	?FLEVL
	LDA	?FLEVL
	SEC
	SBC	#11
	BMI	?LFOR1
	CMP	FORCEY
	BCC	?LFOR1
	BEQ	?LFOR1
	LDA	#$AA
	JSR	PLOTFIELD
	LDA	#$50
	STA	AUDF1
	LDX	#0
?LFOR2	LDA	FORCETAB,X
	STA	709
	ORA	#$60
	STA	AUDC1
	JSR	VBWAIT
	JSR	VBWAIT
	JSR	VBWAIT
	INX
	CPX	#9
	BCC	?LFOR2
	LDA	#$64	;Force field
	STA	AUDC1	;Background
	LDA	#$F0	;Sound effect
	STA	AUDF1
	RTS
FORCETAB	.BYTE	$02,$08,$0E,$0E,$0C,$0A,$08,$06,$04
FORCELEV	.BYTE	15,30,40,45,50,55,60,65,70,72
;
; Put up and init player ship
;
DOSHIP
	LDX	#94
	JSR	PUTSHIP
	LDA	#76
	STA	SHIPX
	LDA	#76+48
	STA	$D000
	JMP	CLRLASER
;
; Combine it all into the startup
; sequence.
;
STARTUP	LDX	#$7F
	LDA	#0
?S1	STA	$80,X
	DEX
	BPL	?S1
	STA	NOSHIPS
	JSR	SHIPSLFT
	JSR	PLAYSCRN
	JSR	CLRSCR
	JSR	LOWERMOM
	LDA	#0
	STA	?FLEVL
	STA	ROUND
	JSR	LOWERFORCE
	LDA	#2
	STA	NOSHIPS
	JSR	SHIPSLFT
	JSR	DOSHIP
	JSR	INITWAVE
	STA	$D01E	;hitclr
	JMP	MLOOP
;
; DLI routine for title page
;
TITLEDLI	PHA
	TXA
	PHA
	TYA
	PHA
	DEC	256
	LDY	#32
	LDX	256
?TDLI	STX	$D40A	;wsync
	STX	$D016
	INX
	DEY
	BPL	?TDLI
	PLA
	TAY
	PLA
	TAX
	PLA
	RTI
;
; Display title page and wait
; for START.
;
DOTITLE
	LDA	#>CHARSET
	STA	756
	LDA	#0
	STA	559
	STA	$D208	;AUDCTL
	STA	53277	;gractl
	JSR	VBWAIT
	LDA	#$FA
	STA	709
	LDA	#$A8
	STA	710
	LDA	#$C8
	STA	711
	LDA	#<TITLEDL
	STA	560
	LDA	#>TITLEDL
	STA	561
	LDA	#<TITLEDLI
	STA	$0200
	LDA	#>TITLEDLI
	STA	$0201
	LDA	#$C0
	STA	$D40E	;nmien
	JSR	PUTSKILL
	LDA	#42
	STA	559
?DTL1
	LDA	STRIG0
	BNE	?DTL1.5
	JMP	STARTUP
?DTL1.5	LDA	53279
	CMP	#6
	BNE	?DTL2
	JMP	STARTUP
?DTL2	CMP	#5
	BNE	?DTL3
	LDA	SKILL
	EOR	#1
	STA	SKILL
?DOCON	JSR	PUTSKILL
?WTREL	LDA	53279
	CMP	#7
	BNE	?WTREL
	JMP	?DTL1
?DTL3	CMP	#3
	BNE	?DTL1
	LDA	SPEED
	EOR	#1
	STA	SPEED
	BPL	?DOCON
;
; Put skill level and speed up
; on title page.
;
PUTSKILL
	LDA	SPEED
	ASL	A
	ASL	A
	ADC	#3
	TAX
	LDY	#3
?PSK1	LDA	XSPEED,X
	STA	TITLEPG+72,Y
	DEX
	DEY
	BPL	?PSK1
	LDA	SKILL
	ASL	A
	ASL	A
	ADC	#3
	TAX
	LDY	#3
?PSK2	LDA	XSKILL,X
	STA	TITLEPG+92,Y
	DEX
	DEY
	BPL	?PSK2
	RTS
XSPEED	.SBYTE	"slowfast"
XSKILL	.SBYTE	"easyhard"
;
; "You Win" sequence (...?)
;
WIN
	JSR	CLRLASER	;No laser
	LDA	#60
	STA	LASERY
?W0	JSR	VBWAIT	;Delay
	JSR	MOVEMOM
	JSR	MOVEMOM
	DEC	LASERY
	BPL	?W0
	LDA	#0	;Erase
	LDX	#255
?WE	STA	PLAYER2,X	;the
	DEX		;Generators
	BNE	?WE
	LDA	#8	;Thrust
	STA	AUDC1	;sound
	LDA	#24
	STA	AUDF1
	LDA	#97
	STA	LASERY	;Move ship up
?W1	LDX	LASERY
	JSR	PUTSHIP
	JSR	MOVEMOM
	JSR	MOVEMOM
	JSR	VBWAIT
	DEC	LASERY
	LDA	LASERY
	CMP	#22
	BNE	?W1
	LDA	#0
	STA	AUDC1
	LDA	SHIPX	;Line ship up
	SEC		;with middle
	SBC	#3	;of mother
	AND	#$FE
	STA	LASERY
?W2	JSR	MOVEMOM
	JSR	MOVEMOM
	JSR	VBWAIT
	LDA	MOTHERX
	CMP	LASERY
	BNE	?W2
	LDX	#$80
?W3	JSR	VBWAIT
	DEX
	BPL	?W3
	TXS		;Clear stack
	JMP	DHS
;
; Main loop inner cycle
;
MAINCYCLE	LDA	#0
	STA	$4D	;NO ATTRACT
?MC1	LDA	$D40B	;VCOUNT
	CMP	#30
	BNE	?MC1
	JSR	MOVEMOM
	JSR	MOVEMOM
?MC2	LDA	$D40B
	CMP	#105
	BCC	?MC2
	JSR	CYCLE
	JSR	HITMON
	LDA	#$AA
	JSR	PLOTFIELD
	LDA	MONLEFT
	BNE	?ML0
	JSR	NXTLEV
?ML0
	LDA	764
	CMP	#33
	BNE	?MCYCX
	LDA	#255
	STA	764
	LDA	#0
	STA	AUDC1
	STA	AUDC2
	STA	AUDC3
	STA	AUDC4
?ML1	LDA	764
	CMP	#33
	BNE	?ML1
	LDA	#255
	STA	764
	LDA	#$64
	STA	AUDC1
?MCYCX	RTS
;
; Real main loop
;
MLOOP	JSR	MAINCYCLE
	JSR	MOVESHIP
	JSR	MOVELASER
	JSR	HITSHIP
	JMP	MLOOP
;
; Scorekeeping and collision
; detection routines
;
	.LOCAL
;
; Check for missile-pf2
; collision.  If it's there,
; clear it, find out which
; monster is hit, and kill
; it.  Then decrement the
; monsters left counter.
;
HITMON	LDA	M0PF	;Did the laser
	AND	#4	;hit a monster?
	BEQ	?HMX	;no, exit
	STA	HITCLR	;clear collision
	LDX	#11	;check monsters
?HM0	LDA	LASERX	;to see which
	SEC		;one was hit
	SBC	XTAB,X
	CMP	#11	;(monsters are
	BCC	?HM2	; 9 wide)
?HM1	DEX		;check next one
	BPL	?HM0	;if possible
	LDA	NEEDLEY	;Was it the
	BEQ	?HMX	;needle?
	LDX	#<NEEDLE	;Yes!
	LDY	#>NEEDLE
	STX	PTR
	STY	PTR+1	;Erase it
	LDX	NEEDLEX
	LDY	NEEDLEY
	JSR	ERASEBM
	LDA	#0	;De-flag it
	STA	NEEDLEY
	STA	AUDC4	;De-noise it
	JSR	CLRLASER
	INC	NOSHIPS	;Extra man
	JSR	SHIPSLFT
	BNE	?HMX	;branch always
?HM2	LDA	LASERY	;Now check the
	SEC		;y-coordinate.
	SBC	#16	;x-coord is ok
	SBC	YTAB,X	;if it gets here.
	JSR	ABSVAL
	CMP	#10
	BCS	?HM1
	LDA	DSTAB,X	;and it must be
	BPL	?HM1	;alive too!
	LDA	#1	;We found it!
	STA	DSTAB,X	;start killing...
	LDA	XTAB,X
	CLC		;adjustment for
	ADC	#4	;bitmap size
	STA	XTAB,X
	JSR	ADDPTS	;give points
	JSR	CLRLASER	;and stop laser
	LDA	#8	;Death sound
	STA	AUDC3
	STA	AUDF3
?HMX	RTS
;
; Take the absolute value of .a
;
ABSVAL	CMP	#0	;Set up flags
	BPL	?ABSX	;Positive, exit
	EOR	#$FF	;Otherwise do
	CLC		;two's-complement
	ADC	#1	;negative
?ABSX	RTS
;
; Lower force field by 8 and
; prepare next level.
;
NXTLEV	LDA	#0	;erase the
	JSR	PLOTFIELD	;force field
	INC	ROUND	;next round
	LDA	ROUND
	CMP	#10	;Last one?
	BNE	?NL1	;No
	JMP	WIN	;Yes, game won
?NL1	JSR	LOWERFORCE	;lower gens.
	JMP	INITWAVE	;setup monsters
;
; Clear score
;
CLRSCR	LDA	#$10	;Put
	STA	SCORELN+17	;zeros
	STA	SCORELN+18	;everywhere
	STA	SCORELN+19
	RTS
;
; Add 1 to score
;
ADDSCR	LDX	#2	;Last digit
	SEC
?ADS1	LDA	SCORELN+17,X	;Add
	ADC	#0
	CMP	#26	;Over 10?
	BCC	?ADS2	;No
	LDA	#16
?ADS2	STA	SCORELN+17,X
	DEX
	BPL	?ADS1
	RTS
;
; Add value in .a to score
;
ADDA	TAY
?ADDA1	JSR	ADDSCR
	DEY
	BNE	?ADDA1
	RTS
;
; Add points for hitting alien
;
ADDPTS	LDX	ROUND
	LDA	VALUES,X
	JMP	ADDA
VALUES	.BYTE	1,2,3,4,5,6,8,10,15,20
;
; Check for player ship hit.
;
HITSHIP
	LDA	P0PF	;Ship hit?
	AND	#4
	BEQ	?HSX	;no, exit
	STA	HITCLR	;clear collision
	JSR	CLRLASER	;clear laser
	LDA	#0	;and start melting
	STA	EXPCOUNT	;player's ship
?HS0	JSR	MAINCYCLE
	JSR	MAINCYCLE	;move monsters
	JSR	MAINCYCLE	;and delay
	JSR	MAINCYCLE	;while melting
	JSR	MAINCYCLE	;the ship.
	LDX	EXPCOUNT
	JSR	PUTEXP	;next melt...
	INC	EXPCOUNT
	LDA	EXPCOUNT	;and keep going
	CMP	#10
	BCC	?HS0
	INC	EXPCOUNT	;Remove the
?HS.5	LDX	EXPCOUNT	;monsters
	JSR	KILLMON	;one by one
	DEC	EXPCOUNT
	BPL	?HS.5
	LDA	#0	;no more on...
	STA	MONHERE
	LDA	#12	;but don't do
	SEC		;the whole wave
	SBC	MONLEFT	;again!
	STA	MONSTERS
	DEC	NOSHIPS	;lose a ship
	LDA	NOSHIPS
	BMI	GOVER	;Game over!!!
	JSR	SHIPSLFT
	LDA	#76
	STA	SHIPX	;center ship
	LDA	#76+48
	STA	HPOSP0
	STA	HITCLR
	JMP	DOSHIP	;and plot it
?HSX	RTS
;
; Game over
;
GOVER	PLA
	PLA
	LDA	#0	;DMA off
	STA	559
	STA	AUDC1
	STA	AUDC2
	STA	AUDC3
	STA	AUDC4
	JSR	VBWAIT
	LDA	#<GODL	;Game Over
	STA	560	;display
	LDA	#>GODL	;(simple, but
	STA	561	;it'll do...)
DHS	LDX	#2
?GV1	LDA	SCORELN+17,X	;Update
	ORA	#$80	;Last
	STA	TITLEPG+46,X	;Score
	DEX		;display
	BPL	?GV1
?GV2	INX
	CPX	#3
	BEQ	?GV4
	LDA	TITLEPG+55,X	;Hi-score?
	CMP	TITLEPG+46,X
	BCC	?GV3	;Nope...
	BEQ	?GV2
	BNE	?GV4
?GV3	LDX	#2	;Yep...
?GV3.5	LDA	TITLEPG+46,X
	STA	TITLEPG+55,X
	DEX
	BPL	?GV3.5
?GV4
	LDA	#42
	STA	559
	LDA	#0
	STA	53277
	LDX	#$40	;Wait a bit
?GO1	JSR	VBWAIT
	DEX
	BNE	?GO1
	JMP	DOTITLE	;and go back
;
; Display ships left.
;
NOSHIPS	.BYTE	0
SHIPSLFT
	LDA	#$20	;Ship symb.
	LDX	#0
?SLF2	CPX	NOSHIPS
	BCC	?SLF3
	LDA	#0
?SLF3	STA	SCORELN+7,X
	INX
	CPX	#3
	BNE	?SLF2
	RTS
;
; Shapes for various items
; in game.
;
	.LOCAL
;
; First are the shapes that
; go in players.
; 1. Player ship
; 2. Mother ship
; 3. Left force field generator
; 4. Right  "     "       "
; 5-. Explosion data for ship
;     (10 cycles, 7 bytes each)
;
PLAYER	.BYTE	$18,$3C,$24,$A5,$A5,$E7,$BD,$00
MOTHER	.BYTE	$00,$18,$3C,$42,$5A,$A5,$FF
LEFTGEN	.BYTE	0,7,8,$10,$E0,$3C,$E0,$10,8,7
RIGHTGEN	.BYTE	0,$E0,$10,8,7,$3C,7,8,$10,$E0
SEXPLODE
	.BYTE	0,$5A,$3C,$A5,$A5,$E7,$BD
	.BYTE	0,$42,$3C,$3C,$A5,$E7,$BD
	.BYTE	0,0,$3C,$24,$BD,$E7,$7E
	.BYTE	0,0,0,$3C,$24,$FF,$FF
	.BYTE	0,0,0,0,$3C,$FF,$FF
	.BYTE	0,0,0,0,0,$7E,$FF
	.BYTE	0,0,0,0,0,$3C,$7E
	.BYTE	0,0,0,0,0,$18,$3C
	.BYTE	0,0,0,0,0,0,$18
	.BYTE	0,0,0,0,0,0,0
;
; Bitmaps for aliens.
;
SQUARE	.BYTE	7,4	;height,width
	.WORD	SHIFT1
	.WORD	SHIFT2
	.WORD	SHIFT3
	.WORD	SHIFT4
SHIFT1
	.WORD	0,0
	.BYTE	$00,$0F,$F0,$00
	.BYTE	$00,$33,$FC,$00
	.BYTE	$00,$3F,$CC,$00
	.BYTE	$00,$0F,$F0,$00
	.BYTE	$00,$30,$0C,$00
SHIFT2
	.WORD	0,0
	.BYTE	$00,$03,$FC,$00
	.BYTE	$00,$0C,$FF,$00
	.BYTE	$00,$0F,$F3,$00
	.BYTE	$00,$03,$FC,$00
	.BYTE	$00,$0C,$03,$00
SHIFT3
	.WORD	0,0
	.BYTE	$00,$00,$FF,$00
	.BYTE	$00,$03,$FC,$C0
	.BYTE	$00,$03,$3F,$C0
	.BYTE	$00,$00,$FF,$00
	.BYTE	$00,$03,$00,$C0
SHIFT4
	.WORD	0,0
	.BYTE	$00,$00,$3F,$C0
	.BYTE	$00,$00,$FF,$30
	.BYTE	$00,$00,$FC,$F0
	.BYTE	$00,$00,$3F,$C0
	.BYTE	$00,$00,$C0,$30
	.WORD	0,0
;
; Bitmap EXPL1
;
EXPL1	.BYTE	6,3
	.WORD	EXPL10,EXPL11,EXPL12,EXPL13
EXPL10
	.BYTE	$00,$00,$00
	.BYTE	$05,$50,$00
	.BYTE	$11,$54,$00
	.BYTE	$15,$44,$00
	.BYTE	$05,$50,$00
	.BYTE	$10,$04,$00
EXPL11
	.BYTE	$00,$00,$00
	.BYTE	$01,$54,$00
	.BYTE	$04,$55,$00
	.BYTE	$05,$51,$00
	.BYTE	$01,$54,$00
	.BYTE	$04,$01,$00
EXPL12
	.BYTE	$00,$00,$00
	.BYTE	$00,$55,$00
	.BYTE	$01,$15,$40
	.BYTE	$01,$54,$40
	.BYTE	$00,$55,$00
	.BYTE	$01,$00,$40
EXPL13
	.BYTE	$00,$00,$00
	.BYTE	$00,$15,$40
	.BYTE	$00,$45,$50
	.BYTE	$00,$55,$10
	.BYTE	$00,$15,$40
	.BYTE	$00,$40,$10
;
; Bitmap EXPL2
;
EXPL2	.BYTE	6,3
	.WORD	EXPL20,EXPL21,EXPL22,EXPL23
EXPL20
	.BYTE	$00,$00,$00
	.BYTE	$05,$50,$00
	.BYTE	$10,$54,$00
	.BYTE	$15,$04,$00
	.BYTE	$05,$50,$00
	.BYTE	$00,$00,$00
EXPL21
	.BYTE	$00,$00,$00
	.BYTE	$01,$54,$00
	.BYTE	$04,$15,$00
	.BYTE	$05,$41,$00
	.BYTE	$01,$54,$00
	.BYTE	$00,$00,$00
EXPL22
	.BYTE	$00,$00,$00
	.BYTE	$00,$55,$00
	.BYTE	$01,$05,$40
	.BYTE	$01,$50,$40
	.BYTE	$00,$55,$00
	.BYTE	$00,$00,$00
EXPL23
	.BYTE	$00,$00,$00
	.BYTE	$00,$15,$40
	.BYTE	$00,$41,$50
	.BYTE	$00,$54,$10
	.BYTE	$00,$15,$40
	.BYTE	$00,$00,$00
;
; Bitmap EXPL3
;
EXPL3	.BYTE	5,3
	.WORD	EXPL30,EXPL31,EXPL32,EXPL33
EXPL30
	.BYTE	$00,$00,$00
	.BYTE	$05,$50,$00
	.BYTE	$10,$14,$00
	.BYTE	$14,$04,$00
	.BYTE	$05,$50,$00
EXPL31
	.BYTE	$00,$00,$00
	.BYTE	$01,$54,$00
	.BYTE	$04,$05,$00
	.BYTE	$05,$01,$00
	.BYTE	$01,$54,$00
EXPL32
	.BYTE	$00,$00,$00
	.BYTE	$00,$55,$00
	.BYTE	$01,$01,$40
	.BYTE	$01,$40,$40
	.BYTE	$00,$55,$00
EXPL33
	.BYTE	$00,$00,$00
	.BYTE	$00,$15,$40
	.BYTE	$00,$40,$50
	.BYTE	$00,$50,$10
	.BYTE	$00,$15,$40
;
; Bitmap EXPL4
;
EXPL4	.BYTE	5,3
	.WORD	EXPL40,EXPL41,EXPL42,EXPL43
EXPL40
	.BYTE	$00,$00,$00
	.BYTE	$05,$50,$00
	.BYTE	$10,$04,$00
	.BYTE	$10,$04,$00
	.BYTE	$04,$10,$00
EXPL41
	.BYTE	$00,$00,$00
	.BYTE	$01,$54,$00
	.BYTE	$04,$01,$00
	.BYTE	$04,$01,$00
	.BYTE	$01,$04,$00
EXPL42
	.BYTE	$00,$00,$00
	.BYTE	$00,$55,$00
	.BYTE	$01,$00,$40
	.BYTE	$01,$00,$40
	.BYTE	$00,$41,$00
EXPL43
	.BYTE	$00,$00,$00
	.BYTE	$00,$15,$40
	.BYTE	$00,$40,$10
	.BYTE	$00,$40,$10
	.BYTE	$00,$10,$40
;
; Bitmap EXPL5
;
EXPL5	.BYTE	5,3
	.WORD	EXPL50,EXPL51,EXPL52,EXPL53
EXPL50
	.BYTE	$00,$00,$00
	.BYTE	$05,$50,$00
	.BYTE	$10,$04,$00
	.BYTE	$10,$04,$00
	.BYTE	$00,$00,$00
EXPL51
	.BYTE	$00,$00,$00
	.BYTE	$01,$54,$00
	.BYTE	$04,$01,$00
	.BYTE	$04,$01,$00
	.BYTE	$00,$00,$00
EXPL52
	.BYTE	$00,$00,$00
	.BYTE	$00,$55,$00
	.BYTE	$01,$00,$40
	.BYTE	$01,$00,$40
	.BYTE	$00,$00,$00
EXPL53
	.BYTE	$00,$00,$00
	.BYTE	$00,$15,$40
	.BYTE	$00,$40,$10
	.BYTE	$00,$40,$10
	.BYTE	$00,$00,$00
;
; Bitmap EXPL6
;
EXPL6	.BYTE	4,3
	.WORD	EXPL60,EXPL61,EXPL62,EXPL63
EXPL60
	.BYTE	$00,$00,$00
	.BYTE	$05,$50,$00
	.BYTE	$10,$04,$00
	.BYTE	$00,$00,$00
EXPL61
	.BYTE	$00,$00,$00
	.BYTE	$01,$54,$00
	.BYTE	$04,$01,$00
	.BYTE	$00,$00,$00
EXPL62
	.BYTE	$00,$00,$00
	.BYTE	$00,$55,$00
	.BYTE	$01,$00,$40
	.BYTE	$00,$00,$00
EXPL63
	.BYTE	$00,$00,$00
	.BYTE	$00,$15,$40
	.BYTE	$00,$40,$10
	.BYTE	$00,$00,$00
;
; Bitmap EXPL7
;
EXPL7	.BYTE	3,3
	.WORD	EXPL70,EXPL71,EXPL72,EXPL73
EXPL70
	.BYTE	$00,$00,$00
	.BYTE	$05,$50,$00
	.BYTE	$00,$00,$00
EXPL71
	.BYTE	$00,$00,$00
	.BYTE	$01,$54,$00
	.BYTE	$00,$00,$00
EXPL72
	.BYTE	$00,$00,$00
	.BYTE	$00,$55,$00
	.BYTE	$00,$00,$00
EXPL73
	.BYTE	$00,$00,$00
	.BYTE	$00,$15,$40
	.BYTE	$00,$00,$00
;
; Bitmap EXPL8
;
EXPL8	.BYTE	2,3
	.WORD	EXPL80,EXPL81,EXPL82,EXPL83
EXPL80
	.BYTE	$00,$00,$00
	.BYTE	$01,$40,$00
EXPL81
	.BYTE	$00,$00,$00
	.BYTE	$00,$50,$00
EXPL82
	.BYTE	$00,$00,$00
	.BYTE	$00,$14,$00
EXPL83
	.BYTE	$00,$00,$00
	.BYTE	$00,$05,$00
;
; Table of explosion addresses
;
EXPLTAB
	.WORD	EXPL1,EXPL2,EXPL3
	.WORD	EXPL4,EXPL5,EXPL6
	.WORD	EXPL7,EXPL8
;
; Bitmap NEEDLE
;
NEEDLE	.BYTE	13,4
	.WORD	NEEDLE0,NEEDLE1,NEEDLE2,NEEDLE3
NEEDLE0
	.BYTE	$00,$00,$00,$00
	.BYTE	$00,$FC,$00,$00
	.BYTE	$0C,$30,$C0,$00
	.BYTE	$03,$33,$00,$00
	.BYTE	$3C,$FC,$F0,$00
	.BYTE	$03,$9B,$00,$00
	.BYTE	$03,$9B,$00,$00
	.BYTE	$03,$9B,$00,$00
	.BYTE	$00,$EC,$00,$00
	.BYTE	$00,$EC,$00,$00
	.BYTE	$00,$30,$00,$00
	.BYTE	$00,$30,$00,$00
	.BYTE	$00,$30,$00,$00
NEEDLE1
	.BYTE	$00,$00,$00,$00
	.BYTE	$00,$3F,$00,$00
	.BYTE	$03,$0C,$30,$00
	.BYTE	$00,$CC,$C0,$00
	.BYTE	$0F,$3F,$3C,$00
	.BYTE	$00,$E6,$C0,$00
	.BYTE	$00,$E6,$C0,$00
	.BYTE	$00,$E6,$C0,$00
	.BYTE	$00,$3B,$00,$00
	.BYTE	$00,$3B,$00,$00
	.BYTE	$00,$0C,$00,$00
	.BYTE	$00,$0C,$00,$00
	.BYTE	$00,$0C,$00,$00
NEEDLE2
	.BYTE	$00,$00,$00,$00
	.BYTE	$00,$0F,$C0,$00
	.BYTE	$00,$C3,$0C,$00
	.BYTE	$00,$33,$30,$00
	.BYTE	$03,$CF,$CF,$00
	.BYTE	$00,$39,$B0,$00
	.BYTE	$00,$39,$B0,$00
	.BYTE	$00,$39,$B0,$00
	.BYTE	$00,$0E,$C0,$00
	.BYTE	$00,$0E,$C0,$00
	.BYTE	$00,$03,$00,$00
	.BYTE	$00,$03,$00,$00
	.BYTE	$00,$03,$00,$00
NEEDLE3
	.BYTE	$00,$00,$00,$00
	.BYTE	$00,$03,$F0,$00
	.BYTE	$00,$30,$C3,$00
	.BYTE	$00,$0C,$CC,$00
	.BYTE	$00,$F3,$F3,$C0
	.BYTE	$00,$0E,$6C,$00
	.BYTE	$00,$0E,$6C,$00
	.BYTE	$00,$0E,$6C,$00
	.BYTE	$00,$03,$B0,$00
	.BYTE	$00,$03,$B0,$00
	.BYTE	$00,$00,$C0,$00
	.BYTE	$00,$00,$C0,$00
	.BYTE	$00,$00,$C0,$00
;
	*=	$02E0
	.WORD	DOTITLE
	.END