8-Bit Software Online Conversion

Wall Wally - Listing

10REM" WALL WALLY by G.Leng 20 30DIM code 300:PROCassemble 40IFK%<>999Z%=0:K%=999 50MODE7:VDU23;8202;0;0;0;:PROCtitles 60DIMA%(19,75),C%(4,2),N%(4,2) 70MODE5 80VDU15,23;8202;0;0;0; 90FLAG=0:targ%=5000:liv%=3:col%=0:scr een%=1:sc%=0 100REPEAT 110PROCstart 120dead%=0 130PROCscreen 140COLOUR3:COLOUR128 150TIME=0:B%=0:CASH%=0:S%=0 160M%=0:m%=10-screen%:IFm%<1m%=1 170IFscreen%=1m%=-1 180REPEAT 190IFINKEY-74ANDB%<6G%=1 200IFINKEY-98PROCleft 210IFINKEY-67PROCright 220PROCcheck 230IFINKEY-73PROCup 240IFINKEY-105PROCdown 250PROCcheck 260M%=M%+1:IFM%=m%M%=0:PROCmeanie 270G%=0 280IFy%=72PROChalf 290UNTILy%=1ANDQ%=1ANDX%=1ORdead%=1 300IFdead%=1PROClife 310IFFLAG=1FLAG=0:Q%=0:X%=1:Y%=28:y%=1 :MX%=19:MY%=0:NX%=19:NY%=0:GOTO120 320*FX15,1 330IFFLAG=2PROCend:RUN 340DATA95,131,95,91,127,91,87,123,87 350 360REM WIN 370SOUND1,1,101,4:SOUND1,1,117,4:SOUND 1,1,129,4:SOUND1,1,149,8 380PROCscore 390col%=1 400IFscreen%<10:?&72=?&73 410screen%=screen%+1:FORI%=1TO5000:NEX T 420UNTIL0 430 440DEFPROCmeanie 450IFTIME MOD2=1NX%=MX%+SGN(X%-MX%) EL SENY%=MY%+SGN(Y%-MY%) 460IFNY%>30ORNY%<0MX%=NX%:MY%=NY%:ENDP ROC 470IFNX%=X%ANDNY%=Y%PROCmeanmove:SOUND 1,-15,50,8:PRINTTAB(8,Y%+1)"DEAD!":dead% =1:ENDPROC 480PRINTTAB(NX%,NY%); 490CALL code 500IF?&70=32PROCmeanmove 510ENDPROC 520 530DEFPROCmeanmove 540PRINTTAB(MX%,MY%)" "; 550MX%=NX%:MY%=NY% 560COLOUR1 570PRINTTAB(MX%,MY%)CHR$mean% 580COLOUR3 590mean%=mean%+1:IFmean%=230mean%=226 600SOUND&13,-8,mean%,1 610ENDPROC 620 630DEFPROCcol 640A%=RND(7):B%=RND(7):C%=RND(7) 650IFA%=B%ORB%=C%ORA%=C%GOTO640 660VDU19,1,A%;0;19,2,B%;0;19,3,C%;0; 670ENDPROC 680 690DEFPROCend 700RESTORE:FORN%=1TO9:READI%:SOUND1,1, I%,6:NEXT:SOUND&101,1,115,8:SOUND&102,1, 83,8 710IFsc%>Z%PRINT'"HI-SCORE!"':Z%=sc% 720I%=GET 730ENDPROC 740 750DEFPROClife 760FORN%=1TO5000:NEXT 770liv%=liv%-1:PROCscore 780IFliv%=0PRINT'"GAME OVER":FLAG=2 EL SEFLAG=1 790ENDPROC 800 810DEFPROCscore 820IFdead%=0T%=TIME DIV100:S%=(200-T%) *10+(6-B%)*100 830S%=S%+CASH% 840sc%=sc%+S% 850COLOUR1 860PRINTTAB(0,31):FORN%=1TO12:PRINT:NE XT 870IFdead%=0PRINTTAB(0,31)'"SCREEN ";s creen%;" COMPLETED."' 880IFdead%=0PRINT'"Blasters: ";6-B%;" x100=";(6-B%)*100 890IFdead%=0PRINT"Time: ";200-T%;" x 10=";(200-T%)*10 900PRINT"Cash: £";CASH%'' 910PRINT"Score:";S%''"TOTAL SCORE=";sc %' 920IFsc%>=targ% liv%=liv%+1:PRINT'"EXT RA LIFE!":SOUND3,-15,160,4:targ%=targ%+5 000 930PRINT'"Lives left:";liv% 940FORN%=1TO10:PRINT:NEXT 950COLOUR3 960ENDPROC 970 980DEFPROChalf 990SOUND1,1,129,4:SOUND1,1,157,4:SOUND 1,1,177,8 1000VDU30:CALLmess 1010FORN%=0TO10000:NEXT 1020PRINTTAB(0,0)"Time taken : ";INT(TI ME/100);"sec";SPC(20); 1030FORN%=0TO10000:NEXT 1040Q%=1:y%=y%-1 1050PRINTTAB(X%,Y%)" ";TAB(0,0)SPC(40); :Y%=Y%+1:PRINTTAB(X%,Y%);CHR$230; 1060ENDPROC 1070 1080DEFPROCstart 1090R%=RND(-screen%) 1100ENVELOPE1,1,0,0,0,0,0,0,120,-5,0,0, 120,0 1110VDU23,224,&40,&40,&FF,4,4,4,&FF,&40 1120VDU23,225,0,&7E,&42,&5A,&5A,&42,&7E ,0 1130VDU23,226,0,8,8,8,8,8,8,0 1140VDU23,227,0,0,4,8,16,32,0,0 1150VDU23,228,0,0,0,0,&3C,0,0,0 1160VDU23,229,0,0,32,16,8,4,0,0 1161VDU23,230,&C3,&24,&3C,&E7,&18,&66,& 81,&81 1170VDU19,3,6,0,0,0 1180RESTORE1250 1190FORI%=0TO19 1200READA%:SOUND2,1,A%+(screen%*8),8 1210PRINTTAB(0,0);20-I%;" ";:FORJ%=0TO7 2 1220A%(I%,J%)=RND(3)-1 1230NEXT:NEXT 1240SOUND2,1,17+(screen%*8),8 1250DATA65,81,73,85,81,93,85,101,93,81, 85,73,81,65,73,61,65,45,33,45 1260X%=1:Y%=28:y%=1 1270MX%=19:MY%=0 1280NX%=19:NY%=0 1290mean%=226 1300A%(X%,y%)=0 1310FORN%=0TO4:F%=RND(18):G%=RND(70):A% (F%,G%)=3:C%(N%,1)=F%:C%(N%,2)=G% 1320NEXT 1330FORN%=0TO4:F%=RND(18):G%=RND(70):A% (F%,G%)=4:N%(N%,1)=F%:N%(N%,2)=G% 1340NEXT 1350Q%=0 1360?&75=F% 1370IFscreen%>10?&75=8 1380ENDPROC 1390 1400DEFPROCscreen 1410*FX15,1 1420PRINTTAB(0,31)'"Press key.";:I%=GET 1430CLS:IFcol%=1PROCcol 1440col%=0 1450COLOUR1:COLOUR130 1460FORI%=0TO29 1470PRINTTAB(0,I%)CHR$224;TAB(19,I%)CHR $224; 1480NEXT 1490PRINTTAB(1,29)STRING$(18,CHR$224); 1500FORI%=0TO2:FORJ%=0TO2 1510IFA%(I%,J%)=1PRINTTAB(I%,29-J%)CHR$ 224; 1520NEXT:NEXT 1530COLOUR3:COLOUR128 1540FORN%=0TO4:G%=C%(N%,2):IFG%<28F%=C% (N%,1):PRINTTAB(F%,29-G%)"£"; 1550NEXT 1560FORN%=0TO4:G%=N%(N%,2):IFG%<28F%=N% (N%,1):PRINTTAB(F%,29-G%)CHR$225; 1570NEXT 1580PRINTTAB(X%,Y%);CHR$230; 1590COLOUR1:COLOUR130:PRINTTAB(X%-1,Y%+ 1)CHR$224;:COLOUR3:COLOUR128 1600ENDPROC 1610 1620DEFPROCcheck 1630P%=A%(X%,y%) 1640IFP%=3PROCcash 1650IFP%=4PROCnasty 1660IFY%=1PROCfind1 1670IFY%=29PROCfind2 1680IFTIME>20000SOUND1,-15,15,8:PRINTTA B(0,Y%)"OUT OF TIME!":dead%=1 1690ENDPROC 1700 1710DEFPROCfind1 1720FORN%=0TO4 1730IFC%(N%,2)=y%+1ANDY%=1PRINTTAB(C%(N %,1),Y%-1)"£" 1740IFN%(N%,2)=y%+1ANDY%=1PRINTTAB(N%(N %,1),Y%-1)CHR$225; 1750NEXT:ENDPROC 1760 1770DEFPROCfind2 1780FORN%=0TO4 1790IFC%(N%,2)=y%-1ANDY%=29PRINTTAB(C%( N%,1),Y%+1)"£" 1800IFN%(N%,2)=y%-1ANDY%=29PRINTTAB(N%( N%,1),Y%+1)CHR$225 1810NEXT:ENDPROC 1820 1830DEFPROCcash 1840N%=RND(100)+100 1850CASH%=CASH%+N% 1860PRINTTAB(X%-1,Y%+1);N%; 1870SOUND1,-10,200,4 1880A%(X%,y%)=0 1890N%=-1:REPEAT:N%=N%+1:UNTILC%(N%,1)= X%ANDC%(N%,2)=y% 1900C%(N%,1)=0:C%(N%,2)=75 1910ENDPROC 1920 1930DEFPROCnasty 1940dead%=1 1950PRINTTAB(8,Y%)"DEAD!" 1960SOUND1,-15,15,8 1970ENDPROC 1980 1990DEFPROCleft 2000IFX%=1ORA%(X%-1,y%)=1ENDPROC 2010PRINTTAB(X%,Y%)" "; 2020X%=X%-1 2030PRINTTAB(X%,Y%);CHR$230; 2040D%=y%-(30-Y%) 2050COLOUR1:COLOUR130 2060FORI%=y%-1TOy%+1 2070C%=A%(X%-1,I%) 2080IFC%=1PRINTTAB(X%-1,30-(I%-D%))CHR$ 224 2090NEXT 2100COLOUR3:COLOUR128 2110SOUND&12,-8,100+X%,1 2120ENDPROC 2130 2140DEFPROCright 2150IFX%=18ORA%(X%+1,y%)=1ENDPROC 2160PRINTTAB(X%,Y%)" "; 2170X%=X%+1 2180PRINTTAB(X%,Y%);CHR$230; 2190D%=y%-(30-Y%) 2200COLOUR1:COLOUR130 2210FORI%=y%-1TOy%+1 2220IFA%(X%+1,I%)=1PRINTTAB(X%+1,30-(I% -D%))CHR$224; 2230NEXT:COLOUR3:COLOUR128 2240SOUND&12,-8,100+X%,1 2250ENDPROC 2260 2270DEFPROCup 2280IFy%=124OR(A%(X%,y%+1)=1ANDG%=0)END PROC 2290IFG%=1ANDA%(X%,y%+1)=1B%=B%+1:SOUND &10,1,6,8:G%=0:A%(X%,y%+1)=0:COLOUR1:COL OUR130:FORN%=0TO60:PRINTTAB(X%,Y%-1)CHR$ 224;TAB(X%,Y%-1)" ";:NEXT:COLOUR3:COLOUR 128 2300PRINTTAB(X%,Y%)" "; 2310Y%=Y%-1:y%=y%+1 2320IFY%=0Y%=1:VDU30,11:COLOUR1:COLOUR1 30:PRINTTAB(0,0)CHR$224;TAB(19,0)CHR$224 ;:COLOUR3:COLOUR128:MY%=MY%+1 2330PRINTTAB(X%,Y%);CHR$230; 2340COLOUR1:COLOUR130 2350FORI%=X%-1TOX%+1 2360IFA%(I%,y%+1)=1PRINTTAB(I%,Y%-1)CHR $224; 2370NEXT 2380COLOUR3:COLOUR128 2390ENDPROC 2400 2410DEFPROCdown 2420IFy%=1ENDPROC 2430IFA%(X%,y%-1)=1:ENDPROC 2440PRINTTAB(X%,Y%)" "; 2450Y%=Y%+1:y%=y%-1 2460IFY%=30Y%=29:PRINTTAB(0,31):COLOUR1 :COLOUR130:PRINTTAB(0,Y%)CHR$224;TAB(19, Y%)CHR$224;:COLOUR3:COLOUR128:MY%=MY%-1 2470IFy%=1COLOUR1:COLOUR130:PRINTTAB(0, Y%+1)STRING$(20,CHR$224);:COLOUR3:COLOUR 128 2480PRINTTAB(X%,Y%);CHR$230; 2490COLOUR1:COLOUR130 2500FORI%=X%-1TOX%+1 2510IFA%(I%,y%-1)=1PRINTTAB(I%,Y%+1)CHR $224; 2520NEXT:COLOUR3:COLOUR128 2530ENDPROC 2540 2550DEFPROCtitles 2560FORN%=1TO2:PRINTCHR$141CHR$131" *** WALL WALLY ***":NEXT 2570RESTORE2660 2580REPEAT 2590READD$ 2600IFD$<>" "PRINTD$ 2610UNTILD$=" " 2620IFZ%<>0PRINTTAB(25,10);"Hi-score:"T AB(27,11)" ";;Z%; 2630VDU30 2640I%=GET:ENDPROC 2650 2660DATA" By Graham Leng" 2661DATA,," Use keys:" 2670DATA,," Z ` left" 2680DATA" X ` right" 2690DATA" * ` up" 2700DATA" ? ` down" 2710DATA" RTN ` blaster" 2720DATA,," Explore maze SCO RE FOR:" 2730DATA" Avoid nasties" 2740DATA" Collect cash Cash collected" 2750 DATA" Blast up only (max 6) Blas ters left" 2760DATA" Time limit 200 secs Time left" 2770DATA" Three lives" 2780DATA," Press key" 2790DATA" " 2800ENDPROC 2810 2820DEFPROCassemble 2830RESTORE3130 2840OSBYTE=&FFF4:OSASCI=&FFE3 2850?&72=0 2860FORN%=0TO3STEP3 2870P%=code 2880[OPT0 ½ OR OPTN% 2890LDA#&87:JSR OSBYTE 2900STX&70 2910RTS 2920 2930.mess LDX&72 2940.loop LDA data,X 2950BEQ end 2960CMP#32:BEQ over 2970SEC:SBC&75 2980.over JSR OSASCI 2990INX:JMP loop 3000.end INX 3010STX&73 3020RTS 3030.data 3040]:NEXT 3050FORN%=1TO10 3060READ A$ 3070[OPT0 3080EQUS A$ 3090EQUB 0 3100] 3110NEXT 3120ENDPROC 3130DATA ZHOO GRQH1 QRZ ILQG ½RXU ZD½ E DFN 3140DATA UV[ IHK I½[ [OPZ PZ [OL LHZ£ I P[ 3150DATA bLWW bLWWd NLOP` 3160DATA bcPh R^^[= ZTT` ^] V^X]V 3170DATA XBMM XBMMZ XJ[ 3180DATA ½JQQ ITSJ ½FQQ ½FQQ^J]UJWY 3190DATA RWWW888 aKVV aKVVc ]WK½^ K]]+ 3200DATA V^^S U^a P QTVX]]Ta 3210DATA ]IEL% [LEX E TPE]IV 3220DATA OZMI½ [½]NN) []XMZ IKM `` KPI UX