Author Topic: Study of 464 Only Game Helicopter / Destination Saturn from ACU.  (Read 272 times)

0 Members and 1 Guest are viewing this topic.

Offline AMSDOS

  • Supporter
  • 6128 Plus
  • *
  • Posts: 3.549
  • Country: au
    • index.php?action=treasury
    • Programs for Turbo Pascal 3
  • Liked: 812

This game has 8 Levels, all of which have their own sections, which take you to the next should you be successful. @Johnny Olsen sent me a copy of the Original Code from ACU, along with a Level Selector version (both 464 Only) to see the Later levels.


What I've started doing is dissect the Listing, simplify it straight into it's Level core, which is where all the 464 Only problems are occurring and code that into something which will work on all Systems (I hope).
Like other early 464 games, a TXT RD CHAR has been setup to read what’s onscreen from a MC routine because 464s didn’t have COPYCHR$(#0) as standard and problems start occurring on the other machines, when different PEN(s)/PAPER(s)/Graphics are used, because the 464 didn’t make a fuss about what colours were used.
In the 1st stage of this game it seems PAPER is the culprit  - the Bricks use PAPER 4 to get that Green colour along with PEN 1 for the Grey colour. A simple test of changing PAPER 4 to PAPER 0 on line 10 confirmed that when PAPER 0 was used the Helicopter didn’t fall through the top platform.


This is what I had for Level 1 after I stripped other parts of the game:


Code: [Select]
8 pu=0:wal=11:db=224:ENV 1,5,3,5:ENV 2,15,-1,4:ENT 1,15,-1,4
9 GOSUB 9200:GOSUB 9000
10 MODE 0:INK 3,13:INK 4,22:PEN 3:PAPER 4:INK 0,1:FOR q=1 TO 20:LOCATE q,20:PRINT CHR$(135):NEXT
11 BORDER 1
12 INK 6,9
20 FOR f=2 TO 19:LOCATE 1,f:PRINT CHR$(135):LOCATE 20,f:PRINT CHR$(135):NEXT
21 fs=0
30 LOCATE 1,1:FOR q=1 TO 20:LOCATE q,1:PRINT CHR$(135):NEXT
40 FOR f=12 TO 19:LOCATE 13,f:PRINT CHR$(135):NEXT f
45 FOR f=14 TO 19:LOCATE f,5:PRINT CHR$(135):NEXT
50 INK 5,16:PEN 5:PAPER 0:FOR q=1 TO 25:x=INT(RND*10)+2:y=INT(RND*15)+3:LOCATE x,y:PRINT CHR$(138):NEXT q
90 wl=96
95 INK 9,5:INK 10,23:WINDOW #1,1,20,21,25:PAPER #1,9:PEN #1,10:CLS#1
110 x=18:y=4
111 PLOT 607,96,6:DRAWR 32,0,6
120 INK 7,8
125 b1=INT(RND*10)+2:b2=INT(RND*9)+3:LOCATE b1,b2:CALL &A000:IF CHR$(PEEK(&A007))<>" " THEN 125
126 IF wal=4 THEN FOR d=1 TO 8:SOUND 4,106,-1,0,1,1,15:NEXT:CLS#1:LOCATE#1,6,1:PRINT#1,"WELL DONE!":LOCATE #1,1,3:PRINT#1,"Phase >1< Completed.":END
127 PEN 3:PAPER 4:LOCATE b1,b2:PRINT CHR$(135)
130 PEN 7:PAPER 0:LOCATE x,y:PRINT CHR$(129)CHR$(130)
131 wl=wl+1
132 PLOT 416,wl:DRAW 606,wl,6
133 IF wl=db THEN PLOT 416,wl,6:DRAWR -33,0:DRAW 383,96,6:FOR f=96 TO wl:SOUND 1,1,1,2,0,0,10:PLOT 33,f,6::DRAW 383,f,6:NEXT f:END
140 a=x:b=y
150 IF INKEY(9)=0 THEN GOSUB 300:GOTO 170
160 GOSUB 350
170 IF INKEY(63)=0 THEN GOSUB 250
180 IF INKEY(71)=0 THEN GOSUB 400
185 IF INKEY(47)=0 THEN GOSUB 450
186 IF x=b1 AND y+1=b2 AND pu=0 THEN pu=1:sc=sc+5:LOCATE x,y+1:PRINT" ":SOUND 1,478,-1,0,1,0,2
190 LOCATE a,b:PAPER 0:PRINT"  "
192 IF pu=1 AND x=12 AND y=wal-1 THEN LOCATE 13,wal:PEN 3:PAPER 4:sc=sc+5:PRINT CHR$(135):SOUND 2,71,-1,15,2,1,15:wal=wal-1:pu=0:PEN 5:PAPER 0:db=db+16:GOTO 125
200 GOTO 130
250 IF x>=20 THEN RETURN
251 LOCATE x+2,y:CALL &A000:IF CHR$(PEEK(&A007))<>" " THEN RETURN
260 x=x+1:RETURN
300 IF y=1 THEN RETURN
310 LOCATE x,y-1:CALL &A000:IF CHR$(PEEK(&A007))<>" " THEN RETURN
320 IF fs=0 THEN LOCATE x+1,y-1:CALL &A000:IF CHR$(PEEK(&A007))<>" " THEN RETURN
330 y=y-1:RETURN
350 IF y=20 THEN RETURN
360 LOCATE x,y+1:CALL &A000:IF CHR$(PEEK(&A007))<>" " THEN RETURN
370 IF fs=0 THEN LOCATE x+1,y+1:CALL &A000:IF CHR$(PEEK(&A007))<>" " THEN RETURN
380 y=y+1:RETURN
400 IF x<=1 THEN RETURN
401 LOCATE x-1,y:CALL &A000:IF CHR$(PEEK(&A007))<>" " THEN RETURN
410 x=x-1:RETURN
450 REM
455 LOCATE x,y+1:CALL &A000:a$=CHR$(PEEK(&A007))
460 PAPER 0:PEN 8:LOCATE x,y+1:PRINT a$:FOR f=26 TO 0 STEP -1:INK 8,f:SOUND 1,930,4,4,0,0,4:FOR q=1 TO 11:NEXT q:NEXT f
470 LOCATE x,y+1:PRINT" ":PEN 1:RETURN
9000 RESTORE 9010:FOR f=0 TO 6:READ a$:POKE &A000+f,VAL("&"+a$):NEXT:RETURN
9010 DATA cd,60,bb,32,07,a0,c9
9200 SYMBOL AFTER 129
9210 RESTORE 9220:FOR q=0 TO 19:READ a,b,c,d,e,f,g,h:SYMBOL 129+q,a,b,c,d,e,f,g,h:NEXT q:RETURN
9220 DATA 170,8,62,79,127,63,146,127,130,13,14,251,244,192,0,128,255,254,250,248,248,240,208,128,255,158,12,8,8,0,0,0,255,127,95,31,31,15,11,1,0,0,36,0,36,0,0,0,254,254,254,0,191,191,191,0,126,24,44,94,191,191,223,126,60,126,255,126,255,126,255,255
9230 DATA 60,102,223,191,191,255,126,60,28,56,28,56,28,56,28,56,24,12,6,6,6,70,126,0,0,0,129,0,129,0,0,0,0,0,0,24,36,36,24,189,171,213,171,213,171,213,171,213,60,36,24,126,24,60,36,102,24,36,36,24,189,126,36,102,170,255,255,136,85,34,85,136
9240 DATA 12,240,14,129,255,255,255,255,0,0,0,192,248,255,255,255


In order to make the code compatable with all systems, I changed the TXT RD CHAR routine into an array. On this occasion, I’ve setup a 2D string based array, everything which gets placed onto the Screen goes into the Array as well, from my tests done it looks like Level 1 checks out fine. As suggested from Johnny Olsen, I’ve modified Line 131 so the wl variable is incremented by 0.75 instead of 1, this variable controlled the speed of the dam rising which was quite difficult, I also had to modify line 133 so if the water level (wl) is greater than the dam wall (db) the overspill is carried out and the program exits there (I haven’t included a game over routine in this instance).


Code: [Select]
8 pu=0:wal=11:db=224:ENV 1,5,3,5:ENV 2,15,-1,4:ENT 1,15,-1,4
9 GOSUB 9200
10 MODE 0:INK 3,13:INK 4,22:PEN 3:PAPER 4:INK 0,1:DIM sc$(20,20):FOR q=1 TO 20:LOCATE q,20:PRINT CHR$(135):sc$(q,20)=CHR$(135):NEXT
11 BORDER 1
12 INK 6,9
20 FOR f=2 TO 19:LOCATE 1,f:PRINT CHR$(135):sc$(1,f)=CHR$(135):LOCATE 20,f:PRINT CHR$(135):sc$(20,f)=CHR$(135):NEXT
21 fs=0
30 LOCATE 1,1:FOR q=1 TO 20:LOCATE q,1:PRINT CHR$(135):sc$(q,1)=CHR$(135):NEXT
40 FOR f=12 TO 19:LOCATE 13,f:PRINT CHR$(135):sc$(13,f)=CHR$(135):NEXT f
45 FOR f=14 TO 19:LOCATE f,5:PRINT CHR$(135):sc$(f,5)=CHR$(135):NEXT
50 INK 5,16:PEN 5:PAPER 0:FOR q=1 TO 25:x=INT(RND*10)+2:y=INT(RND*15)+3:LOCATE x,y:PRINT CHR$(138):sc$(x,y)=CHR$(138):NEXT q
90 wl=96
95 INK 9,5:INK 10,23:WINDOW #1,1,20,21,25:PAPER #1,9:PEN #1,10:CLS#1
110 x=18:y=4
111 PLOT 607,96,6:DRAWR 32,0,6
120 INK 7,8
125 b1=INT(RND*10)+2:b2=INT(RND*9)+3:LOCATE b1,b2:IF sc$(b1,b2)<>"" THEN 125
126 IF wal=4 THEN FOR d=1 TO 8:SOUND 4,106,-1,0,1,1,15:NEXT:CLS#1:LOCATE#1,6,1:PRINT#1,"WELL DONE!":LOCATE #1,1,3:PRINT#1,"Phase >1< Completed.":END
127 PEN 3:PAPER 4:LOCATE b1,b2:PRINT CHR$(135):sc$(b1,b2)=CHR$(135)
130 PEN 7:PAPER 0:LOCATE x,y:PRINT CHR$(129)CHR$(130):sc$(x,y)=CHR$(129):sc$(x+1,y)=CHR$(130)
131 wl=wl+0.75
132 PLOT 416,wl:DRAW 606,wl,6
133 IF wl>db THEN PLOT 416,wl,6:DRAWR -33,0:DRAW 383,96,6:FOR f=96 TO wl:SOUND 1,1,1,2,0,0,10:PLOT 33,f,6:DRAW 383,f,6:NEXT f:CLEAR:END
140 a=x:b=y
150 IF INKEY(0)=0 THEN GOSUB 300:GOTO 170
160 GOSUB 350
170 IF INKEY(1)=0 THEN GOSUB 250
180 IF INKEY(8)=0 THEN GOSUB 400
185 IF INKEY(47)=0 THEN GOSUB 455
186 IF x=b1 AND y+1=b2 AND pu=0 THEN pu=1:sc=sc+5:LOCATE x,y+1:PRINT" ":sc$(x,y+1)="":SOUND 1,478,-1,0,1,0,2
190 LOCATE a,b:PAPER 0:PRINT"  ":sc$(a,b)="":sc$(a+1,b)=""
192 IF pu=1 AND x=12 AND y=wal-1 THEN LOCATE 13,wal:PEN 3:PAPER 4:sc=sc+5:PRINT CHR$(135):sc$(13,wal)=CHR$(135):SOUND 2,71,-1,15,2,1,15:wal=wal-1:pu=0:PEN 5:PAPER 0:db=db+16:GOTO 125
200 GOTO 130
250 IF x>=20 THEN RETURN
251 LOCATE x+2,y:IF sc$(x+2,y)<>"" THEN RETURN
260 x=x+1:RETURN
300 IF y=1 THEN RETURN
310 LOCATE x,y-1:IF sc$(x,y-1)<>"" THEN RETURN
320 IF fs=0 THEN LOCATE x+1,y-1:IF sc$(x+1,y-1)<>"" THEN RETURN
330 y=y-1:RETURN
350 IF y=20 THEN RETURN
360 LOCATE x,y+1:IF sc$(x,y+1)<>"" THEN RETURN
370 IF fs=0 THEN LOCATE x+1,y+1:IF sc$(x+1,y+1)<>"" THEN RETURN
380 y=y+1:RETURN
400 IF x<=1 THEN RETURN
401 LOCATE x-1,y:IF sc$(x-1,y)<>"" THEN RETURN
410 x=x-1:RETURN
450 REM
455 LOCATE x,y+1:a$=sc$(x,y+1)
460 PAPER 0:PEN 8:LOCATE x,y+1:PRINT a$;:FOR f=26 TO 0 STEP -1:INK 8,f:SOUND 1,930,4,4,0,0,4:FOR q=1 TO 11:NEXT q:NEXT f
470 LOCATE x,y+1:PRINT" ":sc$(x,y+1)="":PEN 1:RETURN
9200 SYMBOL AFTER 129
9210 RESTORE 9220:FOR q=0 TO 19:READ a,b,c,d,e,f,g,h:SYMBOL 129+q,a,b,c,d,e,f,g,h:NEXT q:RETURN
9220 DATA 170,8,62,79,127,63,146,127,130,13,14,251,244,192,0,128,255,254,250,248,248,240,208,128,255,158,12,8,8,0,0,0,255,127,95,31,31,15,11,1,0,0,36,0,36,0,0,0,254,254,254,0,191,191,191,0,126,24,44,94,191,191,223,126,60,126,255,126,255,126,255,255
9230 DATA 60,102,223,191,191,255,126,60,28,56,28,56,28,56,28,56,24,12,6,6,6,70,126,0,0,0,129,0,129,0,0,0,0,0,0,24,36,36,24,189,171,213,171,213,171,213,171,213,60,36,24,126,24,60,36,102,24,36,36,24,189,126,36,102,170,255,255,136,85,34,85,136
9240 DATA 12,240,14,129,255,255,255,255,0,0,0,192,248,255,255,255


I kept the original line numbers the same for reference, and for building a new game. The only other changes I made were the keys, the updated version uses Cursor Keys - Left, Right & Up to Control the Helicopter and Space is still used to destroy the blobs onscreen (from above).
« Last Edit: 10:21, 02 March 19 by AMSDOS »
* Using some of the hardly used Amstrad compilers :D
* I use Firmware in my Assembly code :P
* Have interpreted some BASIC 1.1 programs for BASIC 1.0. :)

Offline AMSDOS

  • Supporter
  • 6128 Plus
  • *
  • Posts: 3.549
  • Country: au
    • index.php?action=treasury
    • Programs for Turbo Pascal 3
  • Liked: 812
In Level 2 of this game, your Helicopter has to fly through an underground cave, COPY is used to make the Helicopter Move Up, releasing it to Move Down - it's a really tough level.  >:(


Like Level 1, TXT RD CHAR is used again to determine if the Helicopter has hit the Cave roof or the bottom, which works fine on the 464, though isn't totally convincing as the Helicopter occupies two character spaces, and the backside of it can remove bits of that Cave. When I tested on the 6128, the Collision Test worked for the Roof Side of the Cave, though the Helicopter wasn't detecting the Ground side of the cave and simple moving through it like it wasn't there.


Code: [Select]

8 ENV 1,5,3,5:ENV 2,15,-1,4:ENT 1,15,-1,4
600 BORDER 14:INK 2,14:PAPER 0:PEN 2:PAPER 0:MODE 0:GOSUB 9000:GOSUB 9200
605 cr=0
607 WINDOW #1,1,20,21,25:INK 9,5:INK 10,23:PAPER #1,9:PEN #1,10:CLS#1
610 g=10:FOR f=20 TO 1 STEP-1:ud=-uod:FOR q=1 TO g-2:LOCATE f,q:INK 2,14:PAPER 2:PRINT " ":NEXT q:LOCATE f,q:PAPER 0:PEN 2:PRINT CHR$(132+ud)
620 FOR r=g+5 TO 20:PAPER 2:LOCATE f,r:PRINT" ":NEXT r:LOCATE f,g+4:PAPER 2:PEN 0:PRINT CHR$(132+ud):PAPER 0:PEN 1:uod=INT(RND*3)-1:g=g+(uod AND g>1 AND g<16):NEXT
625 PEN 1:PAPER 0
630 FOR f=1 TO 10:LOCATE 19,f:PRINT"  ":NEXT
640 INK 4,26:FOR f=1 TO 10:LOCATE 19,f:SOUND 1,478-(f*5),1,6:PEN 4:PRINT CHR$(129)CHR$(130):FOR q=1 TO 200:NEXT q:LOCATE 19,f:PRINT"  ":NEXT f
650 x=19:y=11
660 LOCATE x,y:PRINT CHR$(129)CHR$(130):a=x:b=y
665 IF cr=1 THEN INK 2,6,24:SPEED INK 2,2:FOR c=5 TO 15:SOUND 7,1000,2,7,0,0,3:INK c,INT(RND*20):PEN c:PRINT CHR$(22)CHR$(1):LOCATE x,y:PRINT CHR$(INT(RND*12)+173)CHR$(INT(RND*12)+173):FOR wa=1 TO 50:NEXT wa:NEXT c:PRINT CHR$(22)CHR$(0):PEN 1:END
670 IF INKEY(9)=0 THEN y=y-1:GOTO 685
680 y=y+1
685 x=x-1:sc=sc+1:IF x=0 THEN GOTO 800
690 LOCATE x,y:CALL &A000:IF CHR$(PEEK(&A007))<>" " THEN cr=1
695 FOR q=1 TO 7:SOUND 1,800,1,7,0,0,10:SOUND 1,800,1,0,0,0,10:NEXT q
700 LOCATE a,b:PRINT"  "
710 GOTO 660
800 FOR d=1 TO 8:SOUND 4,106,-1,0,1,1,15:NEXT:CLS#1:LOCATE#1,6,1:PRINT#1,"WELL DONE!":LOCATE #1,1,3:PRINT#1,"Phase >2< Completed.":END
9000 RESTORE 9010:FOR f=0 TO 6:READ a$:POKE &A000+f,VAL("&"+a$):NEXT:RETURN
9010 DATA cd,60,bb,32,07,a0,c9
9200 SYMBOL AFTER 129
9210 RESTORE 9220:FOR q=0 TO 19:READ a,b,c,d,e,f,g,h:SYMBOL 129+q,a,b,c,d,e,f,g,h:NEXT q:RETURN
9220 DATA 170,8,62,79,127,63,146,127,130,13,14,251,244,192,0,128,255,254,250,248,248,240,208,128,255,158,12,8,8,0,0,0,255,127,95,31,31,15,11,1,0,0,36,0,36,0,0,0,254,254,254,0,191,191,191,0,126,24,44,94,191,191,223,126,60,126,255,126,255,126,255,255
9230 DATA 60,102,223,191,191,255,126,60,28,56,28,56,28,56,28,56,24,12,6,6,6,70,126,0,0,0,129,0,129,0,0,0,0,0,0,24,36,36,24,189,171,213,171,213,171,213,171,213,60,36,24,126,24,60,36,102,24,36,36,24,189,126,36,102,170,255,255,136,85,34,85,136
9240 DATA 12,240,14,129,255,255,255,255,0,0,0,192,248,255,255,255


My version again simply replaces the use of TXT RD CHAR with a 2D String Array, which results in a game playing the same way as the original was on the 464, I haven't tried correcting the way the collision detection was from the original game as the level is hard enough as it is.


Code: [Select]

8 ENV 1,5,3,5:ENV 2,15,-1,4:ENT 1,15,-1,4
600 BORDER 14:INK 2,14:PAPER 0:PEN 2:PAPER 0:MODE 0:GOSUB 9200
605 DIM sc$(20,20):cr=0
607 WINDOW #1,1,20,21,25:INK 9,5:INK 10,23:PAPER #1,9:PEN #1,10:CLS#1
610 g=10:FOR f=20 TO 1 STEP-1:ud=-uod:FOR q=1 TO g-2:LOCATE f,q:INK 2,14:PAPER 2:PRINT " ":sc$(f,q)=" ":NEXT q:LOCATE f,q:PAPER 0:PEN 2:PRINT CHR$(132+ud):sc$(f,q)=CHR$(132+ud)
620 FOR r=g+5 TO 20:PAPER 2:LOCATE f,r:PRINT" ":sc$(f,r)=" ":NEXT r:LOCATE f,g+4:PAPER 2:PEN 0:PRINT CHR$(132+ud):sc$(f,g+4)=CHR$(132+ud):PAPER 0:PEN 1:uod=INT(RND*3)-1:g=g+(uod AND g>1 AND g<16):NEXT
625 PEN 1:PAPER 0
630 FOR f=1 TO 10:LOCATE 19,f:PRINT"  ":sc$(19,f)="":sc$(20,f)="":NEXT
640 INK 4,26:FOR f=1 TO 10:LOCATE 19,f:SOUND 1,478-(f*5),1,6:PEN 4:PRINT CHR$(129)CHR$(130):sc$(19,f)=CHR$(129):sc$(20,f)=CHR$(130):FOR q=1 TO 200:NEXT q:LOCATE 19,f:PRINT"  ":sc$(19,f)=" ":sc$(20,f)=" ":NEXT f
650 x=19:y=11
660 LOCATE x,y:PRINT CHR$(129)CHR$(130):sc$(x,y)=CHR$(129):sc$(x+1,y)=CHR$(130):a=x:b=y
665 IF cr=1 THEN INK 2,6,24:SPEED INK 2,2:FOR c=5 TO 15:SOUND 7,1000,2,7,0,0,3:INK c,INT(RND*20):PEN c:PRINT CHR$(22)CHR$(1):LOCATE x,y:PRINT CHR$(INT(RND*12)+173)CHR$(INT(RND*12)+173):FOR wa=1 TO 50:NEXT wa:NEXT c:PRINT CHR$(22)CHR$(0):PEN 1:CLEAR:END
670 IF INKEY(9)=0 THEN y=y-1:GOTO 685
680 y=y+1
685 x=x-1:sc=sc+1:IF x=0 THEN GOTO 800
690 IF sc$(x,y)<>"" THEN cr=1
695 FOR q=1 TO 7:SOUND 1,800,1,7,0,0,10:SOUND 1,800,1,0,0,0,10:NEXT q
700 LOCATE a,b:PRINT"  "
710 GOTO 660
800 FOR d=1 TO 8:SOUND 4,106,-1,0,1,1,15:NEXT:CLS#1:LOCATE#1,6,1:PRINT#1,"WELL DONE!":LOCATE #1,1,3:PRINT#1,"Phase >2< Completed.":CLEAR:END
9200 SYMBOL AFTER 129
9210 RESTORE 9220:FOR q=0 TO 19:READ a,b,c,d,e,f,g,h:SYMBOL 129+q,a,b,c,d,e,f,g,h:NEXT q:RETURN
9220 DATA 170,8,62,79,127,63,146,127,130,13,14,251,244,192,0,128,255,254,250,248,248,240,208,128,255,158,12,8,8,0,0,0,255,127,95,31,31,15,11,1,0,0,36,0,36,0,0,0,254,254,254,0,191,191,191,0,126,24,44,94,191,191,223,126,60,126,255,126,255,126,255,255
9230 DATA 60,102,223,191,191,255,126,60,28,56,28,56,28,56,28,56,24,12,6,6,6,70,126,0,0,0,129,0,129,0,0,0,0,0,0,24,36,36,24,189,171,213,171,213,171,213,171,213,60,36,24,126,24,60,36,102,24,36,36,24,189,126,36,102,170,255,255,136,85,34,85,136
9240 DATA 12,240,14,129,255,255,255,255,0,0,0,192,248,255,255,255



* Using some of the hardly used Amstrad compilers :D
* I use Firmware in my Assembly code :P
* Have interpreted some BASIC 1.1 programs for BASIC 1.0. :)

Offline AMSDOS

  • Supporter
  • 6128 Plus
  • *
  • Posts: 3.549
  • Country: au
    • index.php?action=treasury
    • Programs for Turbo Pascal 3
  • Liked: 812
Level 3 of this game actually works on All CPCs because it doesn't use TXT RD CHAR, however I've carved it up just to Highlight the code.


In this level you have to rescue some characters stuck in a trench with your Helicopter, like level 1 I modified the Z,X, Copy Keys to move the Helicopter to use Left, Right Arrow Keys & Space to lower the Rescue Claw. The objective in this level is to rescue 5 characters and you have 10 Attempts. There's no Time Limit in this level, but is still hard since the characters move all over the place so quickly. The best chance seems to be when they are on either end.


Code: [Select]

8 ENV 1,5,3,5:ENV 2,15,-1,4:ENT 1,15,-1,4
9 GOSUB 9200
801 PEN 1:INK 0,26:INK 1,0:PAPER 0:BORDER 9:MODE 0:CLS
810 at=10:FOR f=15 TO 20:LOCATE 1,f:INK 2,9:PAPER 2:PRINT"                    ":NEXT f
820 INK 3,14:INK 4,4:PEN 3:PAPER 4:FOR f=1 TO 5:LOCATE f,14:PRINT CHR$(146):NEXT f
825 INK 3,14:INK 4,4:PEN 3:PAPER 4:FOR f=14 TO 20:LOCATE f,14:PRINT CHR$(146):NEXT f:PEN 1:PAPER 0
830 FOR f=10 TO 13:LOCATE 16,f:PAPER 1:PRINT"     ":NEXT f
835 LOCATE 15,9:INK 5,3:PAPER 5:PRINT"      "
837 WINDOW #1,1,20,21,25:INK 9,5:INK 10,23:PAPER #1,9:PEN #1,10:CLS#1
840 PEN 1:PAPER 0
850 x=14:y=8:co=0
855 GOSUB 910:pe=INT(RND*5)+6
856 GOSUB 911
860 LOCATE x,y:PRINT CHR$(129)CHR$(130):a=x:b=y
863 LOCATE pe,14:PRINT CHR$(142):pp=pe
865 IF INKEY(8)=0 THEN IF x>1 THEN x=x-1
870 IF INKEY(1)=0 THEN IF x<14 THEN x=x+1
880 IF INKEY(47)=0 THEN br=1:at=at-1:GOSUB 910:FOR f=9 TO 12:LOCATE x,f:PRINT CHR$(139):NEXT f:LOCATE x,13:PRINT CHR$(140):FOR f=1 TO 200:NEXT f:FOR f=9 TO 13:LOCATE x,f:PRINT" ":NEXT f:IF x=pe THEN GOSUB 920:IF co=5 THEN 1000 ELSE GOTO 855
885 IF br=1 THEN br=0:GOSUB 911
890 pe=pe+INT(RND*3)-1:IF pe>13 THEN pe=13
891 IF pe<6 THEN pe=6
895 LOCATE pp,14:PRINT" ":LOCATE a,b:PRINT"  "
900 GOTO 860
910 LOCATE #1,1,1:PRINT#1,"ATTEMPTS:"at" ":LOCATE #1,1,3:PRINT#1,"RESCUED :"co" ":RETURN
911 IF at=0 THEN END
912 RETURN
920 co=co+1:LOCATE pe,14:PRINT" ":sc=sc+20:RETURN
1000 SPEED INK 8,8:LOCATE #1,1,3:PEN #1,1:PAPER 0:PAPER#1,0:PRINT#1,"Phase >3< Completed.":LOCATE #1,6,1:PRINT#1,"WELL DONE!":FOR d=1 TO 8:SOUND 4,106,-1,0,1,1,15:NEXT:END
9200 SYMBOL AFTER 129
9210 RESTORE 9220:FOR q=0 TO 19:READ a,b,c,d,e,f,g,h:SYMBOL 129+q,a,b,c,d,e,f,g,h:NEXT q:RETURN
9220 DATA 170,8,62,79,127,63,146,127,130,13,14,251,244,192,0,128,255,254,250,248,248,240,208,128,255,158,12,8,8,0,0,0,255,127,95,31,31,15,11,1,0,0,36,0,36,0,0,0,254,254,254,0,191,191,191,0,126,24,44,94,191,191,223,126,60,126,255,126,255,126,255,255
9230 DATA 60,102,223,191,191,255,126,60,28,56,28,56,28,56,28,56,24,12,6,6,6,70,126,0,0,0,129,0,129,0,0,0,0,0,0,24,36,36,24,189,171,213,171,213,171,213,171,213,60,36,24,126,24,60,36,102,24,36,36,24,189,126,36,102,170,255,255,136,85,34,85,136
9240 DATA 12,240,14,129,255,255,255,255,0,0,0,192,248,255,255,255
* Using some of the hardly used Amstrad compilers :D
* I use Firmware in my Assembly code :P
* Have interpreted some BASIC 1.1 programs for BASIC 1.0. :)