Esteban V. Aguilar, Jr.
Fly down through the dangerous skies of the planet Dindrin to collect golden stones. Retrieve enough of them and you can win the game, but beware of the floaters, skimmers, and lizards. There are versions here for VIC, 64, and Atari. Several special Atari and 64 animation, multicolor sprite, and sound effects techniques are described in the accompanying notes
There's a strange planet
named Dindrin where multicolored floaters and a giant sky skimmer
drift through the daytime skies. On the surface of the planet,
vicious land hunters come up from the ground and set polished, golden
stones in the sun. It's a form of worship too obscure, too alien to
describe.
Suddenly a strange looking
hawk-like creature dives down and snatches a stone. With this program
and your VIC, you can experience what it's like to be one of the
Hawkmen of Dindrin.
The
"Hawkmen of Dindrin" is divided into two programs. The
first program makes custom characters and automatically loads the
main game program. When the game begins, you (the hawkman) start off
on the upper left corner of the screen under the cloud layer. You
will move across the screen and move lower after every line.
Maneuvering
is accomplished with your joystick. You may move backwards by pulling
left on the joystick. Whenever you want to go into a dive or fly
upwards, you must pull down or up (respectively) on the joystick. One
thing to keep in mind when ascending or descending is that you will
move diagonally rather than straight up or down. The winds are
powerful on Dindrin. Flying is an art form there.
Once in a while, an
obstacle such as the sky skimmer (moving above the surface) or a
floater (dominating the skies) will get in your way. When this
happens, you can press the red button on the joystick to extend the
hawkman's tongue to snap up its prey. You can also do this to obtain
points and energy. The skimmer is worth 5 points and 10 energy
credits. The floaters are worth 15 points and 20 energy credits.
There
are a couple of things to consider before playing the game. As time
passes, you will lose energy. If your energy gets too low, the screen
border will disappear. If your energy runs out, the game will end. If
you have sufficient energy, the border will remain on screen. Second,
when you're flying don't run into anything or you'll lose one of your
lives. Third, when the game starts after the program is loaded from
tape, press the stop button on the cassette player. Otherwise, the
joystick will not respond to your commands. To win, you must obtain
10,000 points.
Atari And Commodore 64 Notes
Charles Brannon, Program Editor
Several special programming tricks went into the making of the Atari and 64 versions of "The Hawkmen of Dindrin." Most striking is that the Atari and 64 program listings are very similar. The same basic program was used on both machines, but lines specific to each machine's graphics are of course modified. The joystick values returned by STICK(0) (Atari) and PEEK(56321)AND15 (64) are identical, making the game easier to translate.
Animated Characters
Take a look at the screen
photos for Hawkmen. A "patrol snake" sweeps across the
bottom of the screen. Airborne "floaters" pop up all over
the screen, grinning (as well they might). The hawkman's wings flap.
The luminous stones at the bottom of the screen are protected by
menacing lizards whose tongues wiggle venomously at you.
To
play the game, use a joystick plugged into the first port. Follow the
general instructions in the VIC article. The joystick response will
be strange and difficult to master, but it is predictable. Your
hawkman cannot stick out his tongue, but if you hold down fire, you
can safely bump into the smirking floaters (and get points for
them!).
How It's Done
Multicolored characters
are used on both the Atari and 64 for the stones and the lizards. The
patrol snake is a multicolored sprite on the 64 and is formed on the
Atari by overlaying two players to get three colors.
The
animation (wing flapping, tongue wiggling) is done by switching
between two custom character sets. Every object to be animated has
two alternate "views." The same image is copied into both
character sets for shapes that should not move, such as the stones or
the score line.
Special Machine
Language
A machine language routine
is used for smooth, even horizontal motion for the patrol snake.
Instead of being called when needed by BASIC, the machine language
routine runs continuously "in the background." The machine
language routine also flips the character set and, on the Atari,
produces a variable sound effect.
Countdown Timers
On the Atari, the machine
language is called automatically by Countdown Timer Two. To use the
countdown timer, store the address of your routine in CDTMA2 ($0228).
To start the automatic execution, store a clock value into CDTMV2
($021A). The clock value is measured in sixtieths of a second. The
time value is decremented every vertical blank, and when it hits
zero, your routine is called by an indirect JSR through CDTMA2. After
your routine executes, it should store a new timer value so that it
will be called again, and then return with RTS.
The
beauty of using the countdown timers instead of a vertical blank is
twofold: it's easier to set up and disable (to disable, just store a
zero into CDTMV2), and you can control how often it's called by the
timer value. The routine was being called every sixtieth of a second
(value of one), but the character set flipping was so fast it
blurred. So a higher value was used, and the snake was speeded up by
additional increments of its horizontal position.
Interrupting The
Commodore 64
We used the hardware
interrupt request (IRQ) on the Commodore 64. To place a machine
language routine so that it automatically executes every sixtieth of
a second, you change the IRQ vector at $0314 (it normally points to
the ROM interrupt routines) to point to your machine language
routine. After your routine executes, it exits with a JMP to the
normal ROM routine.
The
setup is a little tricky. While you're storing the new IRQ value, you
have to use SEI (SEt Interrupt disable bit) to prevent any interrupts
from happening. If you don't, an interrupt could occur after
you had stored the first byte of the vector value but before you
changed the second. The interrupt would then vector through a "half
baked" value,
and end up in limbo.
After
you've changed the IRQ vector, you clear the interrupt disable bit
(CLI) and return with RTS to BASIC. The machine language routine will
then be running continuously in the background, flipping the
character set and moving the sprite.
More On Multicolor
The now famous IRG mode 4
is used on the Atari for multicolored characters. See the Atari Notes
for Thunderbird (COMPUTE!, January 1983) for more information
on multicolored characters. Interestingly, the same character set
used on the Atari was used on the 64, even for multicolor. It turns
out that both machines use the same format for storing multicolor
patterns.
Commodore 64 Multicolor
Multicolor graphics are
really important for good arcade effects. A few years ago, graphic
objects (such as a tank or plane) were always a single color. But
increasing realism has been a feature of arcade graphics, and
multicolored objects are an important aspect of this realism.
Normally,
when you define a custom character set on the 64, you create eight
rows of pixels (picture elements, dots). Each row is eight dots (or
bits) wide. With multicolor, each row is divided up into four two-bit
pairs. Each pair of bits can hold a number from 0-3: 00, 01,10,11.
You use a different number for each color. This reduces the
resolution to four multicolor pixels per row, so the lizards and
stones are composed of two characters each. You also have to tell the
VIC-11 chip that you are using multicolor. Do this with:
POKE
53270,PEEK(53270) OR 16
Disable multicolor with:
POKE 53270,PEEK(53270)
AND 239
Here is a sample
multicolor shape:
rffr
r =red (arbitrary colors)
rbbb
b =blue
rbgg
g = green
rbgg
Let's say the binary codes
for red, green, and
blue
are (respectively) 01, 10, and 11. Substituting gives:
01
01 01 01 01010101
01
10 10 10 01101010
01
10 11 11 01101111
01
10 11 11 01101111
You
can change the colors according to this key:
00
Background #0 color register - 53281
01
Background #1 color register - 53282
10
Background #2 color register - 53283
11
Color in lower 3 bits in color memory.
That last line needs explaining. You know that to get
variously colored characters, you POKE a number from 0-15 into the
corresponding color memory location. However, colors 8-15 (accessed
by the Commodore key) are really multicolors. Multicolor characters
always are displayed with a color from 8-15. You won't get the eight
alternate colors (such as grey), but the normal color on the key (15
=yellow). Just add eight to the "normal" color number. So,
a bit value of 11 will take on the value in color memory. The other
colors will come from the color registers (00 is transparent).
Multicolored sprites are similar. Instead of the normal
24-bit resolution, the bits are grouped into 12 bit pairs. The colors
come from:
00 - Transparent, screen color
01 - Sprite multicolor register #0 53285
10 - Normal sprite color register
11 - Sprite multicolor register #1 53286
You tell the VIC-11 chip that you are using a
multicolored sprite by:
POKE 53276,PEEK(53276) OR (2↑X)
"x"
is the sprite number, from 0 to 7. You can mix multicolored and
regular sprites on the same screen. But all multicolored sprites will
share the same two multicolor registers.
Simple
SID Chip Sound
We
were able to get some nice sound effects on the Atari version (such
as the thrumming made by a lizard) by experimenting. But with the 24
registers of Commodore's sound synthesis chip, SID, trial and error
would take far too long. The "thrumming" noise is made by
playing a low-pitched tone through the SID using the variable pulse
wave and a fairly long (one second) decay. Another sound effect (I
can't really describe it) is made with white noise and a medium
decay. The high byte of the pitch is changed as the note is played.
There is also another sound effect created by the sawtooth waveform
affecting the low byte of the pitch.
Program 1:
Hawkmen --- VIC Version
Part 1. Save this first on tape.
10 POKE 368793:REM PART
ONE OF TWO PART PROGRAM,
20
PRINT"[CLEAR}{REV}HAWKMEN OF DINDRIN{OFF}"
50000
X=PEEK(56)-2:POKE52,X:POKE56,X:POKE51,PEEK(55):CLR
50010 CS=256*PEEK(52)+PEEK(51)
50020 FORT=CSTOCS+511:POKEI,PEEK(I+32768-CS):NEXT
50030 READX:IFX<0THEN50090
50040 FORI=XTOX+7:READJ:POKEI,J:NEXT
50050 GOTO50030
50090 DATA7512,0,28,54,255,48,30,0,0
50091 DATA7504,35,85,91,192,109,41,101,26
50092 DATA7496,255,126,60,60,60,60,255,255
50093 DATA7168,134,205,207,252,255,96,96,24
50094
DATA7432,0,0,0,255,0,0,0,0
50095
DATA7440,0,90,60,90,126,24,36,66
50096
DATA7448,0,24,36,66,66,66,36,255
50097
DATA7456,24,135,133,199,71,103,103,255
50098
DATA7464,24,207,1411,239,255,255,255,255
50099
DATA7472,0,0,0,170,85,0,0,0
50100
DATA7488,255,255,255,255,255,255,255,255
50101 DATA-1
63000
POKE198,5:POKE631,78:POKE632,69:POKE633,87:POKE634,13:POKE635,131:
END
Program 2:
"Hawkmen Of
Dindrin", Atari version.
Hawkmen -VIC Version
Part 2
1 REM PART TWO. SAVE AFTER
PART I ON TAPE
6 TI$="000000"
7 POKE36869,255
8 CLR:S1=36876:S2=36875:S3=36874:S4=36877
9 E=200:FC=38554
10 PRINT"{CLEAR}":POKE36879,122:SC=0:Y=7813:
V=36878:YC=38517:SK=8000:MKC=38800:TN=4:FL=7834
20 PRINT"{HOME}{04 DOWN}&&&&&&&&&&&&&&&&&&&&&&";
21
PRINT"{HOME}{DOWN}SCORE:":PRINT"ENERGY:"
22
FORA=0TO21:POKE8164+A,40:POKE38884+A,6:NEXTA
30
FORA=0TO21:POKE8142+A,35:POKE38862+A,5:NEXTA
35 PRINT"{HOME}{18 DOWN} 111+"
40 POKE36878,15
50 POKEYC,0:POKEY,0
51 J=PEEK(37151):E=E-1:GOSUB600
52 IFJ=94THENGOSUB100
53 IFJ=110THENQ=-l
54 IFJ=126THENQ=l
55 IFJ=118THENQ=23:POKES2,130
56 IFJ=122THENQ=-21:POKES2,210
57 POKEY,312:POKES2,0:IFY+Q<7790ORY+Q>=8163THEN500
58
PRINT"{HOME}LIFE:";TN:PRINT"{HOME}{DOWNI}{06RIGHT}";SC:
PRINT"{07RIGHT}{06
LEFT}";E:IFE<=0THEN1000
59 IFPEEK(Y+Q)=35THEN90
60 IFPEEK(Y+Q)=32THEN75
71 IFPEEK(Y+Q)<>32THEN500
75 Y=Y+Q:YC=YC+Q:POKEYC,0:POKEY,0
76 IFPEEK(Y+22)=36THEN300
80 GOTO51
90 Y=Y+Q:YC=YC+Q:POKEYC,0:POKEY,0:SC=SC+l00:E=E+100
92 FORI=lTO20:POKESI,220+I:NEXTI:POKESI,0
93 POKEY,32:Y=Y-22:YC=YC-22:POKEYC,0:POKE Y,0
96 GOTO51
100 IFY>=8138THENRETURN
101 E=E-3:IFE<=0THEN500
102 G=250
105 FORX=lTO3
110 IFPEEK(Y+X)<>32THEN135
115 POKEY+X,33:POKES3,G:G=G+I:NEXTX
119 B=3
120 FORX=BTO1STEP-1
125 POKEY+X,32:POKES3,G:G=G-1
129 POKES3,0
130 NEXTX:RETURN
135 IFPEEK(Y+X)=34THENE=E+20:SC=SC+15
140 IFPEEK(Y+X)=33ORPEEK(Y+X)=43THENE=E+10:SC--SC+5
145
POKES1,195:POKEY+X,42:B=X:FORJ=0TO60:NEXTJ
149 POKES1,0
150 GOTO120
300 POKEY,0
305
POKEYC+22,2:POKEYC,2:POKEY+22,41:POKEY,36
310 FORB=1TO100
315 POKEY,36
320 POKES4,187
325 POKEY,37
330 POKES4,127
335 NEXTB:POKES4,0
345 POKEY,32:POKEY+22,35
346 E=INT(E*.5)
350 TN=TN-l:IFTN=0THEN1000
351 Y=7813:YC=38533:GOTO50
500
IFPEEK(Y+Q)=36THENPOKEY+23,35:POKEY+22,36:GOTO300
501
Y=Y+Q:YC=YC+Q:POKEYC,2:POKEY,42
502 FORH=240TO220STEP-1
503
POKES3,H:NEXTH:POKES3,0
505 POKEY,32
506 TN=TN-l:IFTN=OTHEN550
507 YC=38533:Y=7813:GOTO50
550 GOTO1000
600
O=INT(RND(l)*22)+1:IFO=22THENO=0
601
O=INT(RND(l)*22)+I:IFO=22THENO=0
602 D=INT(RND(l)*2)+l
603
IFD=ITHENPOKE38862+O,4:POKE8142+O,36
604
IFD=2THENPOKE38862+O,5:POKE8142+O,35
605
POKE(SK-3),32:POKESK,33
606
IFPEEK(SK+l)=0THENY=Y+l:GOTO500
608 MKC=MKC+l:SK=SK+l
609
IFSK=8098THENSK=8076:MKC=38796:POKE8096,32:POKE8097,32:POKE8095,32
610 POKEMKC,8:POKESK,43
611
Z=INT(RND(l)*10)+l:IFZ<>5THEN650
612
F=INT(RND(l)*242)+l:IFPEEK(FL+F)<>32THEN612
614 W=INT(RND(1)*7)+l
615 IFW=7THEN614
616 POKEFC+F,W:POKEFL+F,34
625
IFE<100THENPOKE36879,127
626
IFE>100THENPOKE36879,122
650 RETURN
1000 PRINT"{CLEAR}"
1005 PRINT"IF YOU
WISH TO PLAY":PRINT"AGAIN, PRESS THE FIRE BUTTON."
1010 PRINT"{PUR}IF
NOT,THEN PRESS THE":PRINT"JOYSTICK DOWN."
1015 PRINT"YOUR
SCORE:";SC
1020 PRINT"YOUR TIME
:";VAL(TI$)
1023
IFSC>=10000THENPRINT"{REV}{RED}YOU HAVE WON{OFF}"
1025 J=0
1030 J=PEEK(37151)
1035 IFJ=94THENRUN
1040
IFJ=118THENPOKE36869,240:PRINT" {REV}HAWKMEN OF DINDRIN GAME
TERMINATED {OFF}":END
1050 GOTO1025
Program 3: Hawkmen
-Atari Version
"Hawkmen Of
Dindrin," Commodore 64 version.
100
REM {REV}HAWKMEN OF DINDRIN{OFF}
110 REM {REV}ATARI
VERSION{OFF}
120 REM
130 REM Enter
{REV}INVERSE VIDEO{OFF}with Atari logo key
140 GOSUB
530:ENERGY=500:GOTO 180
150 POSITION 1,1:? #6;ENERGY;"
";:POSITION 13-LEN(STR$(SCORE)),1:
? #6;SCORE;
160 IF ENERGY<=0 THEN 440
170 RETURN
180 IF STICK(0)<>15 THEN ST=STICK(0)
:POKE 77,0
190 IF RND(0)>0.95 THEN POSITION
19*RND(0),10*RND(0)+3:
PUT #6,ASC(FOOL$(INT(4*RND(0)+1)))
200 IF RND(0)<0.7 THEN 220
210 POSITION
INT(10*RND(0))*2,20+(RND(0)>0.5):C=33+2*(RND(0)>0.7):
? #6;CHR$(C);CHR$(C+1);
220 IF
PEEK(53252) OR PEEK(53253) THEN 440
230 COLOR PC:PLOT
PX,PY:ENERGY=ENERGY-1-9*(1-STRIG(0))
240 POSITION 1,1:? #6;ENERGY*(ENERGY >0);"
";:IF ENERGY<=0 THEN 440
250 NX=PX+12*(STICK(0)=1l):NY=PY(NX<0)+(NX>19):
NX=NX*(NX<20)+20*(NX<O)
260 NY=NY+(ST=13)-(ST=14):IF NY<3 OR
NY>20 THEN
ST=27-ST:NY=PY
270 LOCATE NX,NY,WHATSIT
280 IF NY>19
THEN Z=PX*2-20*(PX>9):LOCATE Z,NY+(PX>9),WHATSIT:
GOTO 330
290 IF WHATSIT=32 THEN COLOR 32:PLOT
PX,PY:PX=NX:PY=NY:GOTO 180
300 IF STRIG(0) THEN 440
310 COLOR
32:PLOT PX,PY:FOR W=15 TO 0 STEP -0.5:SOUND 0,W,12,8:SOUND
1,W,0,8:NEXT W
320 SOUND 0,0,0,0:SOUND 1,0,0,0:WHAT
SIT=32:SCORE=SCORE+10:
ENERGY=ENERGY-50:GOSUB 150:GOTO 280
330 ST=27-ST:IF WHATSIT<33 OR WHATSIT>34
THEN 360
340 POSITION Z,NY+(PX>9):PUT #6,32:P UT
*6,32:SCORE=SCORE+IO:
ENERGY=ENERGY+50
350 COLOR 32:PLOT
PX,PV:PX=NX:SCORE=SCORE+50:GOSUB 150:GOTO 180
360 IF WHATSIT=32 THEN 180
370 REM {REV}GRAB 'EM AND EAT 'EM
UP!{OFF}
380 POKE
DL+19,112:PQKE DL+20,4:COLOR 32:PLOT PX,PY
390 POSITION Z,NY+(PX>9):PUT #6,37:PUT
#6,38:POSITION Z,NY-2+(PX>9):
PUT#6,42:PUT #6,36
400 SOUND 0,255,2,15:FOR W=l TO
500: NEXT W:SOUND 0,0,0,0
410 POSITION Z,NY+(PX>9):PUT #6,35:PUT
#6,36:POSITION Z,NY-2+(PX>9):
PUT#6.32:PUT #6,32
420 POKE DL+19,6:POKE DL+20,6:GOTO 460
430 REM {REV}PLAYER MEETS HIS DEMISE{OFF}
440 FOR I=60 TO 0 STEP -4:SOUND
0,I,12,I/4:POKE 53274.PEEK(53770):
SOUND 1,I,2,I/4:POKE 53274.PEEK(53770)
450 COLOR ASC(EXPL$(16-I/4)):PLOT PX,PY:POKE
53274.PEEK(53770):NEXT I
460 COLOR 32:IF LIFE<3 THEN PLOT 15+ LIFE*2,1
470 PLOT PX,PY:LIFE=LIFE+1:IF LIFE<4 THEN
ENERGY=500:GOSUB 770:
GOTO 180
480 POKE 538,0:POKE 53248,0:POKE 53248,0:SOUND
2,0,0,0:SOUND 3,0,0,0
490 COLOR 32:PLOT 0,5:DRAWTO 19,5:PLOT 0,7:DRAWTO
19,7:POSITION 5,5:
?
#6;"G{REV}a{OFF}m{REV}e{OFF}
o{REV}v{OFF}e{REV}r{OFF}
500 POSITION 5, 7: ? *6; "press
{REV}START{OFF}:POKE 53279,8
510 IF PEEK(53279)<>6 THEN 510
520 RUN
530 REM {REV}INITIALIZATION{OFF}
540 CHSET=(PEEK(106)-12)*256:IF PEEK
(CHSET+8)=2 THEN 600
550 POKE 88,O:PoKE 89,CHSET/256-4:?
CHR$(125):REM {REV}Clear memory{OFF}
560 GRAPHICS I8:SETCOLOR 4,0,10:POSITION
4,5:? #6;"THE HAWKMEN":
POSITION 5,7:? #6;"{REV}of
dindrin{OFF}:SETCOLOR 1,4,4
570
DL=PEEK(560)+256*PEEK(561)+4
580 POKE
DL+12,6:POSITION 1,11:? #6; ready in {REV}15{OFF}seconds";
590 GOSUB
890:GOSUB 800
600 GRAPHICS
17:DL=PEEK(560)+256*PEEK(561)+4:DIM FOOL$(4),PC$(4),EXP
L$(16):RESTORE 630
610 FOR I=l TO 4:READ
A:FOOL$(I)=CHR $(A):NEXT I:FOR I=1 TO 4:READ A: PC$(I)=CHR$(A):NEXT I
620 FOR 1=1 TO 16:READ
A:EXPL$(I)=CHR$(A):NEXT I
630 DATA
41,169,9,137,43,171,11,139, 44,172,12,140,45,173,13,141,46,
174,14,142,47,175,15,143
640 POKE DL-1,71:POKE
DL+2,7:POKE DL+21,4:POKE DL+22,4:POKE DL+23,4: POKE DL+24,4:POKE
756,CHSET/256
650 SETCOLOR
0,13,14:SETCOLOR 1,7,12 :SETCOLOR 2,12,8:
SETCOLOR 3,4,14
:SETCOLOR 4,5,4
660 POSITION 0,0:?
#6;"{REV}ENERGY{OFF} score
{REV}lives{OFF}
670 POSITION 0,l:? #6;"
500{8 SPACES} 0 ";PC$(2,2);" ";PC$(3,3);"
";PC$(4,4);
680 POSITION 0,22:FOR
I=0 TO 19:PUT #6,39:PUT #6,40:NEXT I
690 POSITION 0,20:FOR
I=0 TO 19:PUT #6,33:PUT #6,34:NEXT I
700 POSITION 10,20:PUT
#6,35:PUT #6,36
710
PMBASE=CHSET-1024:P0=PMBASE+512:P1=P0+128:
POKE
54279,PMBASE/256:POKE 559,46:POKE 53277,3:POKE 623,32
720 POKE
704,4*16+8:POKE 705,14:POKE 53256,1:POKE 53257,1
730 RESTORE 740:FOR I=0
TO 4:READ A:POKE P0+90+I,A:NEXT I:
FOR I=0 TO 2:READ
A:POKE P1+91+I,A:NEXT I
740 DATA
12,30,255,8,6,4,240,2
750 FOR I=1 TO
5:POSITION 19*RND(0),10*RND(0)+3:R=INT(4*RND(0)+1):
? #6;FOOL$(R,R):NEXT I
760 SOUND
2,0,12,2:SOUND 3,0,12,2:A=USR(1664)
770
PX=5:PY=5:PC=ASC(PC$(LIFE+1,LIFE+1)):COLOR PC:PLOT PX,PY:
POKE 53278,0
780 IF STICK(0)=15 THEN
780
790 RETURN
800 RESTORE 810:FOR
I=1664 TO 1710:READ A:POKE I,A:NEXT I:RETURN
810 DATA
104,169,139,141,40,2
820 DATA
169,6,141,41,2,230,203,230,203
830 DATA
230,203,165,203,141,0
840 DATA
208,141,1,208,141,6,210
850 DATA
73,255,141,4,210,173,244,2
860 DATA
73,12,141,244,2,169
870 DATA 2,141,26,2,96
880 GOTO 880
890 FOR I=128 TO
471:Z=PEEK(57344+1):POKE CHSET+I,Z:
POKE
CHSET+I+1024,Z:NEXT I
900 RESTORE 940
910 READ A:IF A=-l THEN
RETURN
920 FOR J=0 TO 7:READ
B:POKE CHSET+A*B+J,B:NEXT J:GOTO 910
930 DATA
0,0,0,0,0,0,0,0,0
940 DATA
1,2,9,9,9,9,9,2,0
950 DATA
2,160,88,88,88,88,88,160,0
960 DATA
3,12,3,16,196,195,63,3,3
970 DATA
4,0,192,252,236,252,240,192,192
980 DATA
5,3,35,131,139,139,171,35,3
990 DATA
6,192,192,224,232,202,194,194,200
1000 DATA
7,64,80,84,85,85,85,85,85
1010 DATA
8,1,5,21,85,85,85,85,85
1020 DATA
9,0,102,219,36,126,137,66,60
1030 DATA
10,0,15,0,51,63,15,15,3
1040 DATA
128,0,0,0,0,0,0,0,0
1050 DATA
129,2,9,9,9,9,9,2,0
1060 DATA
130,160,88,88,88,88,88,160,0
1070 DATA
131,12,3,0,192,195,63,3,3
1080 DATA
132,0,192,252,204,252,240,192,192
1090 DATA 133,3,3,35,171,139,139,131,35
1100 DATA 134,192,200,194,194,202,232,224,192
1110 DATA 135,64,80,84,85,85,85,85,85
1120 DATA 136,1,5,21,85,85,95,85,85
1130 DATA 137,129,102,90,36,126,82,36,24
1140 DATA 138,0,15,0,48,63,3,15,15
1150 DATA 11,153,219,231,255,90,24,36,66
1160 DATA 139,24,90,231,255,219,153,36,66
1170 DATA 12,217,219,231,75,2,24,36,66
1180 DATA 13,216,225,235,69,7,2,40,66
1190 DATA 14,192,192,145,3,67,1,72,130
1200 DATA 15,192,128,8,1,1,0,16,128
1210 DATA 140,217,219,247,99,22,24,36,68
1220 DATA 141,216,225,227,71,23,130,32,66
1230 DATA 142,192,200,129,3,131,1,64,130
1240 DATA 143,192,144,0,1,1,0,8,128
1250 DATA -1
Program 4:
Hawkmen - Commodore 64
Version
100 REM HAWKMEN OF DINDRIN
110 REM COMMODORE 64
VERSION
120
POKE52,48:POKE56,48:CLR:GOSUB500:EN=500:GOTO160
130
PRINT"{HOME}{REV}{RED}";TAB(9)"{LEFT}";EN;"{BLU}";TAB(26-LEN(STR$(SC)));SC;
140 IF EN<=0THEN410
150 RETURN
160 IF(PEEK(56321)AND15)<>15THENJS=PEEK(56321)AND15
170 IFRND(l)>.9THENQ=LL*RND(l)+(15*RND(1)+2)*LL:
POKET+Q,FOOL:POKEC+Q,6*RND(1)+2
180 IFRND(I)<.7THEN200
190 Q=920+INT(20*RND(l))*2:Z=33-2*(RND(l)>
.7):POKET+Q,Z:POKET+Q+l,Z+l
200 IFPEEK(V+31)THEN410
210
Q=PX+LL*PY:POKET+Q,PC:POKEC+Q,6:EN=EN-1-9*(l-(PEEK(56321)AND16)/16)
215 PRINT"{HOME}{REV}{RED}"TAB(9);"{LEFT}"
;-EN*(EN>0);"{LEFT} ";:IFEN<=0THEN410
220
NX=PX+1+2*(JS=11):NY=PY+(NX<0)-(NX>39):NX=-NX*(NX<40)-40*(NX<0)
230 NY=NY-(JS=13)+(JS=14):IFNY<2ORNY>23THE
NJS=27-JS:NY=PY
240 WHATSIT=PEEK(T+NX+LL*NY)
250 IF NY>22 THEN 300
260
IFWHATSIT=32THENPOKET+PX+LL*PY,32:PX=NX:PY=NY:GOTO160
270 IFPEEK(56321)AND16THEN410
280 POKET+PX+LL*PY,32:POKES+24,15:POKES+5,
9:POKES+6,0:POKES+1,10
281
FORI=0TO10:POKES,I*20:POKES+4,32:POKES+4,33:NEXT:POKES+24,0
290 WHATSIT=32:SC=SC+10:EN=EN-50:GOSUB130:GOTO250
300 JS=27-JS:IFWHATSIT<33ORWHATSIT>34THEN330
305 Q=(NXAND254)+LL*NY:POKET+Q,32:POKET+Q+1,32:EN=EN+50
310 GOTO320
288
POKET+PX+LL*PY,32:Q=LL*NY+NX:POKET+Q,37:POKET+Q+1,38:
POKET+Q-LL,42
320 POKET+PX+LL*PY,32:PX=NX:SC=SC+50:GOSUB130:GOTO160
330 IFWH=32THEN160
340 REM GRAB'EM AND EAT 'EM UPI
350 POKET+PX+LL*PY,32:Q=LL*NY+(NXAND254):POKET+Q,37:
POKET+Q+1,38:POKET+Q-LL,42
360 POKET+Q-LL+1,36:POKEC+Q-LL,13:POKEC+Q-LL+1,13
370 POKES+24,15:POKES+1,0:POKES,255:POKES+3,8:POKES+2,0:
POKES+5,12:POKES+6,0
375
POKES+4,64:POKES+4,65:FORW=lTO1500:NEXT:POKES+4,64:
FORL=STOS+24:POKEL,0:NEXT
380 POKE T+Q,33:POKET+Q+1,34:POKET+Q-LL,32
:POKET+Q-LL+1,32
390 GOTO 430
400 REM PLAYER MEETS HIS DEMISE
410 POKES+24,15:POKES+5,9:POKES+6,0:POKES,200
420 FORI=0TO90STEP6:Q=PX+LL*PY:POKET+Q,44+
I/30:POKEC+Q,8*RND(l)
425
POKE53280,16*RND(l):POKES+l,I:POKES+4,128:POKES+4,129:NEXT
427 FORL=STOS+24:POKEL,0:NEXT
430 POKE53280,0:IFLI<3THENPOKET+35+LI*2,32
440
POKET+PX+LL*PY,32:Z=PEEK(V+31):LI=LI+l:IFLI<4THENEN=500:
GOSUB720:GOTO160
450 SYS52992:REM TURN OFF ML
460 PRINT"{HOME}{03 DOWN}{REV}";TAB(15);
"{BLK}G{RED}A{CYN}M{PUR}E{RIGHT}
{GRN}O{BLU}V{YEL}E{RED}R{BLU}"
470 PRINTTAB(7)"{DOWN}{REV}PRESS {RED}FIRE
{BLU}
TO PLAY AGAIN"
480 IF(PEEK(56321)AND16)THEN480
490 RUN
500 REM INITIALIZATION
510 POKE53280,0:POKE53281,1
515 T=1024:C=55296:S=54272:LL=40
520 CHSET=12288:IFPEEK(CHSET+264)=2 THEN 570
530 PRINT"{CLEAR}":C$="{BLK}{RED}{CYN}{
PUR){GRN}{YEL}{BLU}":FORI=lTO7:
PRINT"{HOME}{DOWN}";MID$(C$,I,l);:GOSUB2000:NEXT
550 PRINTTAB(10)"{03 DOWN}{02 RIGHT}{BLK}READY IN
{RED}22{BLK}SECONDS";
560 GOSUB750:GOSUB 840
570 PRINT"{CLEAR}";:FOOL=41
575 FORL=STOS+24:POKEL,0:NEXT
580 PC=43:POKE53282,10:POKE53283,2
590 POKE 53272,(PEEK(53272)AND240)OR12:REM ENABLE NEW
CHARACTER SET
600 POKE 53270,PEEK(53270)OR16 :REM SET MULTICOLOR MODE
610 PRINT"{HOME}{RED}{REV) ENERGY 500 {
BLU}
SCORE 0 {GRN} LIVES {OFF}{PUR}+ + +"
630 FORI=0TO39STEP2:Q=24*LL+I:POKET+Q,39:
POKET+Q+1,40:POKEC+Q,7:POKEC+Q+1,7:NEXT
640 FORI=0TO39STEP2:Q=23*LL+I:POKET+Q,33:
POKET+Q+1,34:POKEC+Q,13:POKEC+Q+l,13:NEXT
650 Q=10+23*LL:POKET+Q,35:POKET+Q+1,36
660 V=53248:REM START OF VIC-II CHIP REGISTERS
670 POKEV,220:POKEV+1,194:POKEV+21,1:POKEI
+39,7:POKE2040,13
680 POKEV+23,1:POKEV+29,1:POKE53285,3:POKE
53286,4:POKE53276,PEEK(53276)ORl
681 FORI=0TO63:POKE832+I,0:NEXT:RESTORE
685 FORI=0TO18:READA:POKE832+8+I,A:NEXT
690
DATA192,0,3,240,0,15,124,85,95,255,0,2,8,0,3,0,0,0,240
700 FORI=lTO5:Q=40*RND(1)+(10*RND(l)+3)*LL:
:POKET+Q,FOOL:POKEC+Q,6*RND(l)+2:NEXT
710 SYS52992:REM START ML ROUTINE
720 PX=5:PY=5:PC=43:POKET+PX+LL*PY,PC:POKEC+PX+LL*PY,6
730 IF(PEEK(56321)AND15)=15THEN730
740 RETURN
750 RESTORE:FORI=0TO18:READA:NEXT:FORI=0TO
96:READA:POKE52992+I,A:NEXT:RETURN
760 DATA 120,173,21,3,201,234,208,19
770 DATA 169,39,141,20,3,169,207,141
780 DATA 21,3,169,0,133,251,133,252
790 DATA 76,37,207,169,49,141,20,3
802 DATA 169,234,141,21,3,88,96,165
804 DATA 251,141,0,208,173,16,208,41
806 DATA 254,5,252,141,16,208,24,165
808 DATA 251,105,4,133,251,165,252,105
810 DATA 0,133,252,240,12,165,251,201
812 DATA 91,144,6,169,0,133,251,133
814 DATA 252,165,162,74,144,8,173,24
816 DATA 208,73,2,141,24,208,76,49
818 DATA 234
840 POKE56334,PEEK(56334)AND254:POKE1,PEEK(1)AND251
841
FORI=0TO511:POKE13312+I,PEEK(54272+I):POKE15360+I,PEEK(54272+I):NEXT
842 POKE1,PEEK(l)OR4:POKE56334,PEEK(56334)OR1
860 READA:IFA=-1THENRETURN
870 FORJ=0TO7:READB:POKECHSET+A*8+J,B:NEXTJ:GOTO860
880 DATA
32,0,0,0,0,0,0,0,0
890 DATA
33,2,9,9,9,9,9,2,0
900 DATA
34,160,88,88,88,88,88,160,0
910 DATA
35,12,3,16,196,195,63,3,3
920 DATA
36,0,192,252,236,252,240,192,192
930 DATA
37,3,35,131,139,139,171,35,3
940 DATA
38,192,192,224,232,202,194,194,200
950 DATA
39,64,80,84,85,85,85,85,85
960 DATA
40,1,5,21,85,85,85,85,85
970 DATA
41,0,102,219,36,126,137,66,60
980 DATA
42,0,15,0,51,63,15,15,3
990 DATA
288,0,0,0,0,0,0,0,0
1000 DATA
289,2,9,9,9,9,9,2,0
1010 DATA
290,160,88,88,88,88,88,160,0
1020 DATA
291,12,3,0,192,195,63,3,3
1030 DATA
292,0,192,252,204,252,240,192,192
1040 DATA
293,3,3,35,171,139,139,131,35
1050 DATA
294:192,200,194,194,202,232,224,192
1060 DATA
295,64,80,84,85,85,85,85,85
1070 DATA
296,1,5,21,85,85,85,85,85
1080 DATA
297,129,102,90,36,126,82,36,24
1090 DATA
298,0,15,0,48,63,3,15,15
1100 DATA
43,153,219,231,255,90,24,36,66
1110 DATA
299,24,90,231,255,219,153,36,66
1120 DATA
44,217,219,231,75,2,24,36,66
1130 DATA
45,216,225,235,69,7,2,40,66
1140 DATA
46,192,192,145,3,67,1,72,130
1150 DATA
47,192,128,8,1,1,0,16,128
1160 DATA
300,217,219,247,99,22,24,36,68
1170 DATA
301,216,225,227,71,23,130,32,66
1180 DATA
302,192,200,129,3,131,1,64,130
1190 DATA
303,192,144,0,1,1,0,8,128
1200 DATA -1
2000 PRINT" {REV} {02
RIGHTI} {02 RIGHT} {02 RIGHT} {03 RIGHT} {RIGHT}
{02 RIGHT} {RIGHT} {03
RIGHT} {RIGHT} {RIGHT} {03 RIGHT} "
2010 PRINT" {REV} {02 RIGHT} {RIGHT} {02 RIGHT}
{RIGHT}
{03 RIGHT} {RIGHT} {RIGHT} {02 RIGHT} {RIGHT} {RIGHT}
{03 RIGHT}
{02 RIGHT} "
2020 PRINT" {REV}
{RIGHT} {RIGHT} {RIGHT} {RIGHT} {RIGHT}
{03 RIGHT} {RIGHT} {RIGHT}
{RIGHT} {RIGHT} {03 RIGHT} {RIGHT} {RIGHT} "
2030 PRINT" {REV} {02
RIGHT} {RIGHT} {02 RIGHT} {RIGHT} {RIGHT}
{RIGHT} {RIGHT} {RIGHT}
{02 RIGHT} {03 RIGHT} {RIGHT} {03 RIGHT}
{02 RIGHT} "
2040 PRINT" {REV} {02
RIGHT} {RIGHT} {02 RIGHT} {02 RIGHT} {RIGHT} {02 RIGHT}
{02 RIGHT} {RIGHT} {03
RIGHT} {RIGHT} {RIGHT} {03 RIGHT} {03 DOWN}"
2060 PRINTSPC(15);"{REV})
{02 RIGHT} "
2070 PRINTSPC(15);"{REV}
{02 RIGHT} {02 RIGHT} "
2080 PRINTSPC(15);"{REV}
{02 RIGHT} {02 RIGHT}
2090 PRINTSPC(15);"{REV}
{02 RIGHT} {02 RIGHT} "
2100 PRINTSPC(15);"
{REV} {OFF}) {REV} {02 DOWN}"
2110 PRINT" {REV} {02
RIGHT} {RIGHT} {03 RIGHT} {RIGHT} {02 RIGHT}
{02 RIGHT} {RIGHT} {03
RIGHT} "
2120 PRINT" {REV} {02
RIGHT} {02 RIGHT} {03 RIGHT} {02 RIGHT} {RIGHT}
{02 RIGHT} {RIGHT} {02
RIGHT} {02 RIGHT } {02 RIGHT } {02 RIGHT} "
2130 PRINT" {REV }
{02 RIGHT } {02 RIGHT } {03 RIGHT } {RIGHT } {RIGHT } {RIGHT} {02
RIGHT } {RIGHT } {03 RIGHT} {02 RIGHT } {RIGHT } {RIGHT} "
2140 PRINT" {REV }
{02 RIGHT } {02 RIGHT } {03 RIGHT } {02 RIGHT } {RIGHT}
{02 RIGHT } {RIGHT } {02
RIGHT } {02 RIGHT } {02 RIGHT } {02 RIGHT}
2150 PRINT" {REV }
{02 RIGHT } {RIGHT} {03 RIGHT } {RIGHT } {02 RIGHT}
{03 RIGHT } {RIGHT }
{RIGHT } {03 RIGHT} "
2160 RETURN