====== RED ALERT ======
{{:tandy_color_computer:redaler0.png }}
You have penetrated the enemy planet's refueling station.
You must pilot your spacecraft through the cavern that houses the fuel dump.
The terrain is rough and changes radically.
Be very careful; the survival of your planet depends on you.
Use the Arrow keys to move your ship left, right, up and down; the greater and less than signs fire left
and right and the space bar fires down.
Try not to hit the walls as that costs points.
Good hunting!
| |
===== SCREENSHOTS =====
Instructions 1: \\
{{:tandy_color_computer:redalert1.png}}
Instructions 2: \\
{{:tandy_color_computer:redalert2.png}}
Playing: \\
{{:tandy_color_computer:redalert3.png}}
===== SOURCE =====
A type-in BASIC program by Simon Parker and Peter Lear converted for Tandy Color Computers with 16K RAM and Extended Color BASIC by Scott McCann, 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 'RED ALERT : BY SIMON PARKER AND PETER LEAR:16K TRS-80 EXTENDED BASIC VERSION ADAPTED BY SCOTT MCCANN
20 GOSUB 520
30 M=270:N=270:C0=0:S=0
40 J=9:G=9:CC=.5:DD=.9:TIMER=0
50 CLS
60 FORI=0TO480STEP32:PRINT@I,CHR$(175);STRING$(30," ");CHR$(175);:NEXT
70 PLAY"T255"
80 B=RND(100)/100
90 PRINT@0, "SCORE-";S;
100 IF TIMER>3960ANDTIMER<6930THENCC=.65:DD=.8:CO=2
110 IF TIMER>6930THENCC=.75:DD=.7:CO=1
120 C=RND(100)/100
130 IFB0ANDG>18THENG=G-1:J=J-1
180 IFJ+G>28THENJ=J-1:G=G-1
190 IFJ<1THENJ=1
200 IFG<1THENG=1
210 GOSUB270
220 IFRND(8)=5THENPRINT@509-J,CHR$(132);
230 IF RND(3)=2 THENPRINT@480+G,"@";
240 PRINT@480,STRING$(G,175+16*CO);
250 PRINT@512-J,STRING$(J,175+16*CO);
260 GOTO80
270 IFJO=0THENC$=INKEY$:IFC$=CHR$(94)THENU=-32ELSEIFC$=CHR$(10)THENU=32ELSEIFC$=CHR$(8)THENU=-1ELSEIFC$=CHR$(9)THENU=1ELSEU=0
280 IFJO=0 THENIF C$="@" THEN GOSUB370 ELSEIF C$=" "THENGOSUB420
290 IFJO=1 THENQ=JOYSTK(0):Z=JOYSTK(1):IF(Z<21ANDQ>21ANDQ<42)THENU=-32ELSEIF(Z>42ANDQ>21ANDQ<42)THENU=32ELSEIFQ<21THENU=-1ELSEIFQ>42THENU=1ELSEU=0
300 IFJO=1THENIF PEEK(65280)=126ORPEEK(65280)=254THENGOSUB420 ELSE IF INKEY$=" "THEN GOSUB370
310 IFM+U<64ORM+U>511THENM=M-U
320 M=M+U:P=PEEK(1024+M):PP=PEEK(1025+M)
330 PRINT@N-32," ";:PRINT@N-64," ";:PRINT@M-32,CHR$(132)CHR$(136);:PRINT@M,CHR$(139)CHR$(135);
340 IFP=139ORPP=135 THEN 360
350 IFP<>96ORPP<>96 THEN PLAY"O3":FORK=1TO10:PRINT@M-32,CHR$(136+K)CHR$(132+K);:PLAYSTR$(K):NEXT:GOTO490
360 N=M:RETURN
370 I=M-33
380 P=PEEK(I+1024):IFP=94THENS=S+250
390 IF P=64THENS=S+200:PRINT@I,CHR$(35)" ";:PLAY"O3DEFGG":RETURN
400 IF P=175ORP=191ORP=207 THEN S=S-50:PLAY"O4DO1DO3F":PRINT@I,CHR$(134)" ";:PRINT@I,CHR$(137);:RETURN
410 PRINT@I,CHR$(60)" ";:I=I-1:GOTO380
420 I=M
430 P=PEEK(I+1024):PP=PEEK(I+1025):IFP=132ORPP=132THENS=S+50:PLAY"O1DFDDG"
440 IFP=64ORPP=64THENS=S+200:PLAY"ABCDE"
450 IFP=175+16*CO ORPP=175+16*CO THENRETURN
460 PRINT@I,CHR$(133)CHR$(138);::PRINT@I," ";
470 I=I+32:IFI>M+150ORI>511THEN RETURN
480 GOTO430
490 FORK=1TO90:NEXT:CLS:PRINT@0,"YOUR SCORE WAS:";S
500 PRINT:INPUT"TRY AGAIN (Y/N)";AA$:IF AA$="Y"THENGOTO30
510 CLS:PRINT"BYE.":END
520 CLS:PRINT@12,"RED ALERT"
530 PRINT@192,"";:INPUT"(1) JOYSTICK OR (2) KEYBOARD";A:IF A=1THENJO=1:GOTO630
540 IF A=2 THEN JO=0:GOTO560
550 GOTO530
560 CLS:PRINT"TO MOVE USE: ":PRINT
570 PRINT" UP ARROW"
580 PRINT"LEFT ARROW RIGHT ARROW"
590 PRINT" DOWN ARROW"
600 PRINT:PRINT" @ FIRES TO THE LEFT":PRINT" FIRES DOWNWARD":
610 IF INKEY$<>""THENRETURN ELSE GOTO610
620 SOUND44,44
630 CLS:PRINT" USE JOYSTICK TO MOVE UP,DOWN,RIGHT AND LEFT."
640 PRINT" USE JOYSTICK BUTTON TO FIRE DOWNWARD AND TO FIRELEFT."
650 GOTO610
===== 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 remove the following from line 510 to avoid normal speed in the game:
... :POKE65494,0:END
===== RUNNING IN EMULATORS =====
You can type-in and run the BASIC directly from command line with XRoar:
$ xroar -machine cocous REDALERT.BAS
You can create a virtual floppy disk to load and run from in MAME:
$ decb dskini REDALERT.DSK
$ decb copy REDALERT.BAS REDALERT.DSK,REDALERT.BAS -t
$ mame cocoe -ramsize 16K -window -resolution 1920x1080 -skip_gameinfo -flop1 REDALERT.DSK
RUN"REDALERT
Requires a cocoe.zip ROM pack in ${HOME}/mame/roms and the [[https://sourceforge.net/p/toolshed/wiki/Documentation/|Toolshed]] utilities to build the DECB disk image.
===== RTS =====
Return to [[:Tandy Color Computer:TRS-80 Colour Computer Space Adventures]] :: [[:Tandy Color Computer:]]