Code: Select all
10 REM ##########################################################
20 REM #Type in program adapted from the book #
30 REM #"ORIC ATMOS, vos programmes BASIC et langage machine #
40 REM #Authors : Michel Bussac and Gil Espèche #
50 REM #Editor : CEDIC NATHAN (1984) #
60 REM #Original Title : Mission Bonbardement #
70 REM ##########################################################
80 REM # Move with A,Z, < and >
90 REM # Fire with space bar
100 REM 'BomberZ
110 REM 'machine code
120 REM #the assembly routine can be used in any game
130 REM #for this copy the series of DATA given here and
140 REM #the folowing code :
150 REM # FOR R=0 TO #8D
160 REM # READ A
170 REM # POKE #400+R,A
180 REM # NEXT
190 REM #It can be used in two different ways :
200 REM # - With DOKE 0,#BBA9:DOKE 2,#BBA8:CALL#400, you should obtain
210 REM # a scrolling from right to left
220 REM # - With both the same DOKE, but calling the routine in #431, you should obtain
230 REM # a scrolling from right to left plus the plotting of two characters that you must
240 REM # define at the beginning of the game in #4FD and #4FE. Moreover, used in this way,
250 REM # this code takes care of keybord handlingand moves the characters according
260 REM # to the keys pressed.
270 DATA #A2,#00,#A0,#00
280 DATA #B1,#00,#91,#02
290 DATA #C8,#C0,#26,#D0
300 DATA #F7,#A9,#20,#91
310 DATA #02,#18,#A5,#02
320 DATA #69,#28,#85,#02
330 DATA #48,#A5,#03,#69
340 DATA #00,#85,#03,#68
350 DATA #18,#69,#01,#85
360 DATA #00,#A5,#03,#69
370 DATA #00,#85,#01,#E8
380 DATA #E0,#1C,#D0,#D2
390 DATA #60,#A0,#01,#A9
400 DATA #20,#91,#04,#88
410 DATA #10,#FB,#20,#00
420 DATA #04,#AD,#08,#02
430 DATA #A2,#01,#C9,#94
440 DATA #F0,#0E,#C9,#8C
450 DATA #F0,#19,#A2,#28
460 DATA #C9,#AE,#F0,#13
470 DATA #C9,#AA,#D0,#1E
480 DATA #8A,#18,#65,#04
490 DATA #85,#04,#A5,#05
500 DATA #69,#00,#85,#05
510 DATA #4C,#72,#04,#86
520 DATA #06,#A5,#04,#38
530 DATA #E5,#06,#85,#04
540 DATA #A5,#05,#E9,#00
550 DATA #85,#05,#A0,#01
560 DATA #B1,#04,#C9,#20
570 DATA #D0,#0E,#88,#10
580 DATA #F7,#A0,#01,#B9
590 DATA #FD,#04,#91,#04
600 DATA #88,#10,#F8,#60
610 DATA #A9,#01,#8D,#FC
620 DATA #04,#60
630
640 REM #Graphics for characters
650 'Graphics
660 DATA 0,48,56,60,31,31,31,7
670 DATA 0,0,0,0,48,60,63,32
680 DATA 30,45,45,45,30,18,33,63
690 DATA 1,1,2,4,8,16,32,32
700 DATA 63,0,0,0,0,0,0,0
710 DATA 32,32,16,8,4,2,1,1
720 DATA 0,0,0,0,0,0,0,63
730 DATA 0,30,33,63,18,12,0,0
740 DATA 45,24,61,35,51,62,37,35
750 DATA 0,0,16,56,24,4,2,1
760
770 REM #Clear Screen, disable keyboard sound
780 CLS:POKE#26A,10
790 PLAY 0,7,0,0
800
810 REM #Load Machine Code
820 FOR R=0 TO #8D
830 READ A
840 POKE #400+R,A
850 NEXT
860
870 REM #Load Graphics
880 FOR R=0 TO 79
890 READ A
900 POKE#B508+R,A
910 NEXT
920
930 REM #Introduction
940 REM introduction
950 CLS:PAPER 0:INK2
960 PRINT
970 PRINT CHR$(138);CHR$(134);SPC(15)"Bomber Z"
980 PRINT CHR$(138);CHR$(133);SPC(15)"Bomber Z"
990 PRINT
1000 PRINT "Controls :"
1010 PRINT "Up - A"
1020 PRINT "Down - Z"
1030 PRINT "Left - <"
1040 PRINT "Right - >"
1050 PRINT "Fire - [Space]
1060 PRINT
1070 PRINT CHR$(135);" ";CHR$(35);" Radar --> 5 Pts"
1080 PRINT
1090 PRINT CHR$(135);" ";CHR$(40);" Flying mine --> 1 Pts"
1100 PRINT
1110 PRINT
1120 PRINT "Press any key to Start":GET A$:GET A$
1130 CLS
1140 REM #Prepare the screen, load two caracters for the assembly routine in #4FD,and init score
1150 PAPER 0:INK7:DOKE #4FD,#2221:AC=#25:SC=0
1160
1170 REM #delete 'CAPS'
1180 FOR R=0 TO 3:POKE#BBA4+R,32:NEXT
1190
1200 REM #Show up the battle field, and start the engines sound effects
1210 FOR R=0TO38
1220 POKE#BBD0+R,39:POKE#BE28+R,37:SOUND4,R,5
1230 NEXT
1240
1250 REM #Prepare the tables for the machine code routine
1260 DOKE 4,#BD18:M=#BE4E:HM=15:POKE#4FC,0
1270
1280 REM #Start of the main loop:vectors initialization for horizontal scrolling
1290 REM loop
1300 DOKE0,#BBA9:DOKE2,#BBA8:POKE#BBF6,39
1310
1320 REM #Shoot test
1330 IF T=1 THEN POKE MT,32:GOTO 1390
1340
1350 REM #Test for fire key
1360 IF PEEK(#208)=#84 THEN 1840
1370
1380 REM #scoll the screen and move the plane
1390 REM Do_Scrolling
1400 CALL#431
1410
1420 REM #collision test
1430 IF PEEK(#4FC)=1 THEN 2050
1440
1450 REM #Shoot second test
1460 IF T=1 THEN 1860
1470
1480 REM #Random evolution of the game
1490 REM update_field
1500 AZ=INT(RND(1)*5)
1510 ON AZ GOTO 1580,1640,1700,1770
1520
1530 REM flat_mountain
1540 IF AC=#26 OR AC=#23THEN M=M+40:HM=HM+1
1550 POKEM,37:AC=#25
1560 GOTO 1290
1570
1580 REM ascending_mountain
1590 IF HM-1<4 THEN 1530
1600 IF AC=#24 OR AC=#25 THEN M=M-40:HM=HM-1
1610 POKEM,36:AC=#24
1620 GOTO 1290
1630
1640 REM descending_mountain
1650 IF HM+1>20 THEN 1530
1660 IF AC=#26 OR AC=#23 THEN M=M+40:HM=HM+1
1670 POKEM,38:AC=#26
1680 GOTO 1290
1690
1700 REM radar
1710 IF AC=#26 THEN 1730
1720 GOTO 1530
1730 REM new_radar
1740 POKEM,35:AC=#23
1750 GOTO 1290
1760
1770 REM mine
1780 IF INT(RND(1)*2)=0 THEN 1530
1790 HB=INT(RND(1)*HM)
1800 POKE#BC1E+40*HB,40
1810 GOTO 1530
1820
1830 REM #Shoot handlers
1840 REM Create_Fire_Shot
1850 T=1:MT=DEEK(4):GOTO 1290
1860 REM Move_Fire_Shot
1870 MT=MT+40
1880 IFDEEK(MT-1)<>#2020THEN1910
1890 POKEMT,42:GOTO 1490
1900
1910 REM Boom
1920 IF PEEK(MT)=35THEN 1950
1930 IF PEEK(MT)=40THEN 1970
1940 GOTO1990
1950 REM boom_radar
1960 SC=SC+5:POKEMT,41:GOTO1990
1970 REM boom_mine
1980 SC=SC+1:POKEMT,32:GOTO1990
1990 REM boom_common
2000 T=0:SHOOT
2010 PAPER7:PAPER0
2020 PLAY0,7,0,0:SOUND4,6,5
2030 GOTO 1490
2040
2050 REM game_lost
2060 FOR R=0 TO 10
2070 PAPER7:PAPER0
2080 SOUND4,3*R,15
2090 NEXT
2100 EXPLODE
2110 WAIT50
2120 CLS:INK3:PRINT"Your Score:";SC;" Points."
2130 PRINT:PRINT:PRINT:PRINT
2140 PRINT:PRINTSPC(10)"You loose ..."
2150 PRINT:PRINT:PRINT
2160 PRINT"Play again ?":GET A$:GET A$
2170 IF A$="Y" THEN 940