Table of Contents

PROTECTOR

You are on an intercept mission near the surface of Neptune.

Only you and your ship stand between the space colony an the attacking aliens.

They come in swarms of four at a time.

Can even your valiant ship keep up this deadly pace?

If you can ward off the aliens for two minutes, the colony will be saved.

Good luck!

SCREENSHOTS

Instructions:

Playing:

SOURCE

A type-in BASIC program by L. Braine converted for Tandy Color Computers with 16K RAM and Extended Color BASIC by Derek Simonson, published in TRS-80 Colour Computer Space Adventures.

Please note - this played through without crashing but there may still be typoes in this code.

10 CLS:PRINT@194,"PROTECTOR"
20 PRINTTAB(7)"BY L. BRAINE"
30 PRINTTAB(11)"CONVERSION BY"TAB(48)"DEREK SIMONSON"
40 FORX=5TO20STEP5
50 B$=STR$(X)
60 A$="T"+B$+"O3EO4CECDO3BO4CO3ABAG"
70 IFPEEK(16380)=0THENPLAYA$
80 NEXT
90 PRINT:PRINT"MISSION-> INTERCEPT             WHERE-> ABOVE NEPTUNE           ALIENS-> COME IN SWARMS OF FOUR TIME-> YOU HAVE TWO MINUTES     10 PTS-> HIT ALIENS IN CENTRE"
100 PRINT"CONTROLS-> KEYS(ARROWS, SPACE)             JOYSTICK(RIGHT)"
110 CLEAR200:PCLEAR4
120 PRINT:PRINT"PRESS FIRE BUTTON FOR JOYSTICK  HIT <ENTER> FOR KEYBOARD"
130 E=PEEK(65280):IFE=254ORE=126THENJK=1:GOTO150ELSEIFINKEY$=CHR$(13)THENJK=2:H=31:AF=1:GOTO150ELSE130
140 CLEAR200
150 DIM AL(5),PR(20),PL(16),BL(16),SB(5)
160 PX=20:PY=75
170 FORA=1TO4:A(A)=240:B(A)=RND(160):NEXT
180 PMODE3,1:PCLS5
190 DRAW"C7R6U2R6D2L4D6R4D2L6U2L6E3H3"
200 PAINT(130,97),7,7
210 GET(128,94)-(140,104),AL,G
220 PCLS:GET(128,94)-(140,104),SB,G
230 PCLS:DRAW"C6E8F12BU4U4L4D4R4BD8D4L4U4R4BU4G12H8L4U8R4"
240 GET(125,88)-(150,113),PL,G
250 PCLS:DRAW"R4U8L4H8G12BU4R4U4L4D4BD8R4D4L4U4BU4F12E8"
260 GET(108,80)-(133,103),PR,G
270 PCLS:GET(108,80)-(133,103),BL,G
280 PCLS:DRAW"BM0,191C6E5R4E4F6E6F4E9R10F9R5E6R8E3F8R5E7R3F3E4F8E7R6F8R4F3R7E10R3F4E8R3F7E6R6F3R10E4R4F4R4E4F11E4F10"
290 PAINT(20,191),6,6
300 SCREEN1,1
310 TIMER=0
320 IF TIMER>7200THEN 710
330 ON JK GOTO340,380
340 H=JOYSTK(0):V=JOYSTK(1)
350 A=PEEK(65280):IFA=254 OR A=126THENGOSUB560
360 PY=V*3
370 GOTO390
380 A$=INKEY$:IFA$=CHR$(94)THENPY=PY-10ELSEIFA$=CHR$(10)THEN PY=PY+10ELSEIFA$=CHR$(9)THENAF=1:GOTO410:ELSE IFA$=CHR$(8)THENAF=2:GOTO410ELSEIFA$=CHR$(32)THENGOSUB560
387 IF PY<1THENPY=1
390 IFPY>150THENPY=150
400 IFPY=LY THEN450
410 PUT(LX,LY)-(LX+25,LY+23),BL,PSET
420 IFH>31 ORAF=1THENPX=230:PUT(PX,PY)-(PX+25,PY+23),PL,PSET:S=-1
430 IFH<31ORAF=2THENPX=20:PUT(PX,PY)-(PX+25,PY+23),PR,PSET:S=1
440 LX=PX:LY=PY
450 N=N+1
460 IFN>4THENN=1
470 IFS=-1THENA(N)=A(N)+(RND(15)-3)
480 IFS=1THENA(N)=A(N)-(RND(15)-3)
490 PUT(LA(N),LB(N))-(LA(N)+12,LB(N)+10),SB,PSET
500 B(N)=B(N)+(RND(14)-7)
510 IF A(N)<1 THENA(N)=240ELSEIFA(N)>240THENA(N)=1
520 IFB(N)<1 THENB(N)=1ELSEIFB(N)>160THENB(N)=160
530 PUT(A(N),B(N))-(A(N)+12,B(N)+10),AL,PSET
540 LA(N)=A(N):LB(N)=B(N)
550 GOTO320
560 Q=PY+12
570 IF S=1THENFOR L=PX+26 TO 270STEP3ELSE FOR L=PX-1 TO 1 STEP-3
580 IFPPOINT(L,Q)=7THEN650
590 PSET(L,Q,6)
600 PSET(BL,BY,5)
610 BL=L:BY=Q
620 NEXT
630 PSET(BL,BY,5)
640 RETURN
650 SC=SC+5
660 FORN=1TO4
665 IFL<13THENL=13
670 IF A(N) <L AND A(N)+12>L THEN B(N)=RND(160):A(N)=240:SC=SC+10:PUT(L-12,Q-11)-(L+13,Q+12),BL,PSET:PLAY"T15CG#C#F":RETURN
680 NEXT
690 SOUND200,2
700 RETURN
710 FORA=1TO200STEP5
720 A$="T"+STR$(A)+"CG#C#F"
730 PLAYA$
740 NEXT
750 CLS:PRINTSTRING$(32, "=")
760 PRINT"YOUR 2 MINUTES HAS EXPIRED                    YOU SCORED";SC
770 PRINT"PLAY AGAIN (Y/N)"
780 A$=INKEY$:IFA$=""THEN780ELSEIFA$="Y"THENPOKE16380,1:RUNELSEPOKE16380,0

SPEEDING UP

Add the following lines at the top to disable BREAK key checking and switch the SAM into high-speed mode:

1 IF PEEK(&H3EB9)<>&H32 THEN CLEAR200,&H3EB0:FOR I=&H82B9 TO &H831E:POKE I-&H4400,PEEK(I):NEXT ELSE 6
2 FORI=0TO2:POKE &H3EBD+I,18:NEXT:I=&H3F1E
3 POKE I,&H26:POKE I+1,3:POKE I+2,&H7E:POKE I+3,&H83:POKE I+4,&H22:POKE I+5,&H7E
4 POKE I+6,&HA4:POKE I+7,&H4C
5 POKE &H019A,&H39:POKE &H019B,&H3E:POKE &H019C,&HB9:POKE &H019A,&H7E
6 POKE 65495,0

And add the following to the end of line 780 to restore normal speed on exit:

... :POKE65494,0

RUNNING IN EMULATORS

You can type-in and run the BASIC directly from command line with XRoar:

$ xroar -machine cocous PROTECT.BAS

You can create a virtual floppy disk to load and run from in MAME:

$ decb dskini PROTECT.DSK
$ decb copy PROTECT.BAS PROTECT.DSK,PROTECT.BAS -t
$ mame cocoe -ramsize 16K -window -resolution 1920x1080 -skip_gameinfo -flop1 PROTECT.DSK
RUN"PROTECT

Requires a cocoe.zip ROM pack in ${HOME}/mame/roms and the Toolshed utilities to build the DECB disk image.

RTS

Return to TRS-80 Colour Computer Space Adventures :: Tandy Color Computer