Home » Personal collection » Commodore disks » disk32a_commodore_disk_user_3_7.d64 » maze generator
maze generator
This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.
Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.
Tape/disk: | Home » Personal collection » Commodore disks » disk32a_commodore_disk_user_3_7.d64 |
Filename: | maze generator |
Read OK: | ✔ |
File size: | 1004 bytes |
Load address: | 0801 |
Exec address: | 0000 |
Duplicates
There is 1 duplicate copy of this file in the archive:
- Arnold website » magazines_cdu » magazines_cdu_cdu307_cdu307.d64 » maze generator
- Personal collection » Commodore disks » disk32a_commodore_disk_user_3_7.d64 » maze generator
File contents
10 POKE 53280,0:POKE 53281,11 20 X=X+1 30 IF X=1 THEN PRINT"<clr><cursor down><cursor right><white>LOADING MACHINE CODE....":LOAD"MAZE.MC",8,1 100 GOSUB 10000 110 PRINT"<clr><cursor down><cursor right>🭾AUSE FOR THOUGHT...":GOSUB 2080 120 GOSUB 1000 130 IF N=42 AND DI=5 THEN 30000 140 ON G GOSUB 2000 150 IF EA=1 THEN PRINT"<clr><cursor down><cursor right><text mode>🭶ATEN !!":GOTO 30010 160 GOTO 120 170 J1=PEEK(56320):IF J1<>127 THEN J=J1 1000 J1=PEEK(56320):IF J1<>127 THENJ=J1 1010 U=J=126:D=J=125:L=J=123:R=J=119 1020 O=ME:GOSUB 1500 1030 N=PEEK(M) 1040 IF N<>32 AND N<>90 AND N<>42 THEN 1090 1050 IF N=42 AND DI<5 THEN 1090 1060 ME=M:POKE O,32 1070 IF N=90 THEN DI=DI+1:POKE 1955,DI+48 1080 IF DI=5 AND N=90 THEN PRINT"<home><black><cursor right><cursor right><cursor right><cursor right><cursor right><cursor right><cursor right><cursor right><cursor right><cursor right><cursor right>GO.FOR.THE.EXIT!!!!"; 1090 IF CH=87 THEN CH=81:GOTO 1110 1100 CH=87 1110 POKE ME+54272,14:POKE ME,CH 1120 RETURN 1500 M=ME+L-R+U*40-D*40:RETURN 2000 Q=Q-1:IF Q<0 THEN Q=3 2010 W=PEEK(PO+T(Q)) 2020 IF W=32 OR W=90 THEN 2060 2030 IF W=81 OR W=87 THEN EA=1:GOTO 2060 2040 IF Q<3 THEN Q=Q+1: GOTO2010 2050 Q=0:GOTO 2010 2060 POKE PO,Z:PO=PO+T(Q):POKE PO+54272,0:Z=PEEK(PO):POKE PO,43 2070 RETURN 2080 PRINT"<white>" 2090 SYS 52600,0,18,10,0,0,88:PRINT"-DIAMONDS: 0-"CHR$(142) 2100 FOR CO=1 TO 5 2110 P=1065+INT(RND(1)*19)*2+INT(RND(1)*10)*80 2120 POKE P,90:POKE 54272+P,0 2130 NEXT 2140 ME=1025:DI=0:CH=81:EA=0 2150 T(1)=-40:T(3)=40:T(2)=-1:T(0)=1 2160 PO=1901:Z=32:S=5 2170 POKE 1941,42 2180 RETURN 10000 PRINT"<clr><cursor down><cursor right><text mode>╲AZE 🭷EMO" 10010 PRINT"<cursor right>🮂🮂🮂🮂🮂🮂🮂🮂🮂" 10020 PRINT"<cursor down><cursor right>🭰HIS MACHINE CODE PROGRAM CONSTRUCTS" 10030 PRINT"<cursor right>RECTANGULAR MAZES DEPENDING ON" 10040 PRINT"<cursor right>SPECIFIED DIMENSIONS. ♠S IT IS IN" 10050 PRINT"<cursor right>MACHINE CODE, IT IS VERY FAST." 10060 PRINT"<cursor right>🭰YPICALLY A FULL SCREEN SIZE MAZE WILL" 10070 PRINT"<cursor right>TAKE LESS THAN A SECOND TO DESIGN." 10080 PRINT"<cursor down><cursor right>🭲EFORE STARTING THE MAZE, YOU WILL" 10090 PRINT"<cursor right>NEED TO SAY WHICH PAGE IN MEMORY THE" 10100 PRINT" MAZE IS TO BE PLACED. ♠ DEFAULT" 10110 PRINT" POSITION '0' WILL AUTOMATICALLY PUT" 10120 PRINT" THE MAZE AT THE END OF 🭲♠♥╮🭸 MEMORY." 10130 PRINT"<cursor down><cursor right>🭵OU WILL ALSO NEED TO STATE THE" 10140 PRINT" HORIZONTAL AND VERTICAL DIMENSIONS" 10150 PRINT" AS WELL AS THE ♣,🭵 COORDINATES ON" 10160 PRINT" SCREEN (THIS MAKES NO DIFFERENCE ON A" 10170 PRINT" PRINTER). 10180 GOSUB 20000 10190 PRINT"<clr><cursor down><cursor right>╲AZE 🭷EMO" 10200 PRINT" 🮂🮂🮂🮂🮂🮂🮂🮂🮂" 10210 PRINT"<cursor down><cursor right>🭰HE SYNTAX FOR THE ╲AZE PROGRAM IS:" 10220 PRINT"<cursor down> ♥🭵♥ 52600,🭾AGE,🭴ORIZONTAL,╳ERTICAL," 10230 PRINT" ♣ 🭾OSITION (0-39),🭵 🭾OSITION (0-24)," 10240 PRINT" 🭸HARACTER (E.G. '65' FOR 'A' '88'='X')" 10250 PRINT"<cursor right>0,0 FOR ♣,🭵 IS THE TOP-LEFT OF SCREEN" 10260 PRINT"<cursor down><cursor right>🭰O PRINT A DUPLICATE OF A MAZE, THE" 10270 PRINT" SYNTAX IS:" 10280 PRINT"<cursor down><cursor right>♥🭵♥ 53010,♣ 🭾OS,🭵 🭾OS,🭸HARACTER" 10290 PRINT"<cursor down><cursor right>🭵OU MAY PREFER TO DEFINE THESE:" 10300 PRINT"<cursor right><cursor down>╲♦=52600 : ╲🭾=53010 AND USE ♥🭵♥ ╲♦,.." 10310 PRINT"<cursor right><cursor down>TO SAVE REMEMBERING THOSE ADDRESSES." 10320 GOSUB 20000 10330 PRINT"<clr><cursor down><cursor right>╲AZE 🭷EMO" 10340 PRINT"<cursor right>🮂🮂🮂🮂🮂🮂🮂🮂🮂" 10350 PRINT"<cursor down><cursor right>♠ FULL SCREEN SIZE MAZE HAS 18,10" 10360 PRINT" AS 🭴ORIZONTAL/VERTICAL DIMENSIONS." 10370 PRINT" 🭰HE MINIMUM IS 1,1 AND MAXIMUM 🭴ORIZ" 10380 PRINT" DIMENSION IS 63 (THIS IS OFTEN" 10390 PRINT" TOO BIG FOR MOST PRINTERS ANYWAY!)" 10400 GOSUB 20000 10410 PRINT"<text mode><clr><cursor down><cursor right>╲AZE 🭷EMO" 10420 PRINT"<cursor right>🮂🮂🮂🮂🮂🮂🮂🮂🮂" 10430 PRINT"<cursor down><cursor right>🭰RY SOME MAZES:" 10440 INPUT "<cursor down><cursor right>🭴ORIZ,╳ERT: 18,10<cursor left><cursor left><cursor left><cursor left><cursor left><cursor left><cursor left>";H,V 10450 IF H>18 THEN H=18 10460 IF H<1 THEN H=1 10470 IF V>10 THEN V=10 10480 IF V<1 THEN V=1 10490 INPUT " ♣,🭵 🭾OSITION: 0,0<cursor left><cursor left><cursor left><cursor left><cursor left>";X,Y 10500 IF X>39 THEN X=39 10510 IF X<0 THEN X=0 10520 IF Y<0 THEN Y=0 10530 IF Y>24 THEN Y=24 10540 INPUT " 🭸HARACTER: 255<cursor left><cursor left><cursor left><cursor left><cursor left>";C 10550 C=ABS(C):IF C>255 THEN C=255 10560 IF C<33 THEN C=33 10570 GOSUB 20000:PRINT"<clr><cursor down><cursor right>🭰HINKING...." 10580 SYS 52600,0,H,V,X,Y,C 10590 INPUT"<cursor down><cursor right>♠NOTHER MAZE YES 🭽.╯.<cursor left><cursor left><cursor left><cursor left><cursor left><cursor left><cursor left><cursor left><cursor left><cursor left>";K$ 10600 IF LEFT$(K$,1)="Y" THEN 10410 10610 PRINT"<clr><cursor down><cursor right>╲AZE 🭷EMO" 10620 PRINT"<cursor right>🮂🮂🮂🮂🮂🮂🮂🮂🮂" 10630 PRINT"<cursor down><cursor right>🭰HE MAZES CAN BE PRINTED ON A PRINTER" 10640 PRINT"<cursor right>BY:" 10650 PRINT"<cursor down><cursor right>🭽🭾🭶╱ 4,4:🭸╲🭷 4:♥🭵♥ 52600,...." 10660 PRINT"<cursor down><cursor right>🭾RINT#4:CLOSE 4 10670 PRINT"<cursor down><cursor right>🭵OU CAN ALSO CHANGE THE PITCH AND" 10680 PRINT" SIZE BEFOREHAND IF YOUR PRINTER CAN DO" 10690 PRINT" THIS. ╳ERY SMALL CHARACTER SIZES GIVE" 10700 PRINT" SOME VERY TRICKY MAZES!" 10710 GOSUB 20000 10720 PRINT"<clr><cursor down><cursor right>╲AZE 🭷EMO" 10730 PRINT"<cursor right>🮂🮂🮂🮂🮂🮂🮂🮂🮂" 10740 PRINT"<cursor down><cursor right>╮ HAVE WRITTEN A LITTLE GAME TO SHOW" 10750 PRINT" ONE POSSIBLE USE OF THE ROUTINE. 🭵OU" 10760 PRINT" MUST COLLECT THE FIVE BLACK DIAMONDS" 10770 PRINT" AROUND THE MAZE THEN HEAD FOR THE EXIT" 10780 PRINT" (AN ASTERISK AT THE BOTTOM-RIGHT OF" 10790 PRINT" THE MAZE.)" 10800 PRINT"<cursor down><cursor right>🭸ONTROL IS VIA ╰OYSTICK IN 🭾ORT ╮╮." 10810 PRINT"<cursor down> 🭵OU CAN ALSO HAVE A LITTLE MEANIE TO" 10820 PRINT" AVOID IF YOU WANT ('+')." 10830 INPUT "<cursor down><cursor right>🭷O YOU WANT THIS YES PLEASE!<cursor left><cursor left><cursor left><cursor left><cursor left><cursor left><cursor left><cursor left><cursor left><cursor left><cursor left><cursor left><cursor left>";K$ 10840 IF LEFT$(K$,1)="Y" THEN G=1 20000 PRINT"<cursor down><cursor right>🭾RESS A ╯EY...."; 20010 GET K$:IF K$="" THEN 20010 20020 RETURN 30000 PRINT"<clr><cursor down><cursor right><text mode>○ELL 🭷ONE !" 30010 INPUT"<cursor down><cursor right>🭷O YOU WANT TO PLAY THAT AGAIN";K$ 30020 IF LEFT$(K$,1)="Y" THEN 110 30030 PRINT"<clr><cursor down><cursor right>🭻EMEMBER.....🭰HERE'S ONLY ONE WAY <cursor down><cursor right>🭰HROUGH....." 30040 END
� 53280,0:� 53281,11 $ X�X�1 _ � X�1 � �"�LOADING MACHINE CODE....":�"MAZE.MC",8,1 kd � 10000 �n �"��AUSE FOR THOUGHT...":� 2080 �x � 1000 �� � N�42 � DI�5 � 30000 �� � G � 2000 �� � EA�1 � �"��ATEN !!":� 30010 �� � 120 � J1��(56320):� J1��127 � J�J1 5 �J1��(56320):� J1��127 �J�J1 Y �U�J�126:D�J�125:L�J�123:R�J�119 i �O�ME:� 1500 t N��(M) � � N��32 � N��90 � N��42 � 1090 � � N�42 � DI�5 � 1090 � $ME�M:� O,32 � .� N�90 � DI�DI�1:� 1955,DI�48 8� DI�5 � N�90 � �"�GO.FOR.THE.EXIT!!!!"; 6 B� CH�87 � CH�81:� 1110 @ LCH�87 Z V� ME�54272,14:� ME,CH ` `� y �M�ME�L�R�U�40�D�40:� � �Q�Q�1:� Q�0 � Q�3 � �W��(PO�T(Q)) � �� W�32 � W�90 � 2060 � �� W�81 � W�87 � EA�1:� 2060 � �� Q�3 � Q�Q�1: �2010 Q�0:� 2010 4� PO,Z:PO�PO�T(Q):� PO�54272,0:Z��(PO):� PO,43 :� C �""