Home » Personal collection » Commodore tapes » Commodore_64 » drawer_tr_tape01a_d60_c64_tape.wav » pacman1
pacman1
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 tapes » Commodore_64 » drawer_tr_tape01a_d60_c64_tape.wav |
Filename: | pacman1 |
Read OK: | ✔ |
File size: | 0CD7 bytes |
Load address: | 0801 |
Exec address: | 0000 |
File contents
10 REM PACMAN 20 PRINTCHR$(147);:X=RND(-TI) 30 DIM M$(18,17):DIM G(3,4):DIM G$(3):PWRC=20 40 PWRTIM=0:TMR=0:SC=0:L1=3:L2=3:GOSUB980 50 GOSUB1070 60 GOSUB 760:GOSUB 780:GOSUB 220 70 GOSUB 970:IF PWRTIM-TMR>0 THEN TX=9:TY=8 80 IF PWRTIM-TMR<0 THEN TX=PX:TY=PY 90 GOSUB 300 100 A$=STR$(SC):LSC=LEN(A$):Q=32-LSC:Z=1 110 GOSUB 940 120 GOSUB 220 130 Q=31:Z=3:A$=STR$(L1):GOSUB 940 140 IF FOOD>0 AND L1=L2 THEN GOTO 60 150 IF L1<>L2 THEN L2=L2-1:GOSUB 1070:GOSUB1110 160 IF FOOD=0 THEN GOSUB980 170 IF L1>0 THEN 50 180 GOSUB 950:IFK$<>"" THEN 180 190 Q=24:Z=10:A$="GAME OVER":GOSUB940 200 Z=12:A$="PRESS ANY KEY":GOSUB940 210 GOTO 40 220 HIT=0:FOR L=1 TO 3 230 IF G(L,1)=PX AND G(L,2)=PY AND TMR>PWRTIM AND G(L,4)=1 THEN HIT=1 240 IF G(L,1)=PX AND G(L,2)=PY AND TMR>PWRTIM AND G(L,4)=2 THEN GOTO 260 250 GOTO 270 260 G(L,4)=3:G$(L)=CHR$(34):SC=SC+150 270 NEXT L 280 IF HIT=1 THEN L1=L1-1 290 RETURN 300 FOR L=1 TO 3 310 X=G(L,1):Y=G(L,2):GD=G(L,3):GC=G(L,4) 320 Q=X:Z=Y:A$=M$(X,Y):GOSUB 940 330 IF G(L,4)=3 THEN TX=3:TY=8:IF X=9 AND Y=7 THEN GD=2:GOTO 350 340 GOSUB 450 350 IF GD=1 OR GD=3 THEN X=X+(GD-2) 360 IF GD=0 OR GD=2 THEN Y=Y+(GD-1) 370 XX=X:IF XX=1 THEN X=16 380 IF XX=17 THEN X=2 390 IF G(L,4)=3 AND G(L,1)=9 AND G(L,2)=9 THEN G$(L)="*":GC=1 400 IF G(L,4)=2 AND TMR>PWRTIM THEN GC=1:G$(L)="*" 410 Q=X:Z=Y:A$=G$(L):GOSUB 940 420 G(L,1)=X:G(L,2)=Y:G(L,3)=GD:G(L,4)=GC 430 NEXT L 440 RETURN 450 GOSUB 760:N=INT(RND(0)*6+1) 460 XX=-2:IF GD<2 THEN XX=2 470 FF=0:IF GD=1 OR GD=3 THEN FF=1 480 IFFF=1 THEN IF M$(X+(GD-2),Y)="#" AND U$="#" AND D$="#" THEN GD=GD+XX:RETURN 490 IFFF=0 THEN IF M$(X,Y+(GD-1))="#" AND L$="#" AND R$="#" THEN GD=GD+XX:RETURN 500 IF FF=1 AND U$="#" AND D$="#" THEN RETURN 510 IF FF=0 AND L$="#" AND R$="#" THEN RETURN 520 IF GD=0 AND U$="#" THEN GOSUB 640:RETURN 530 IF GD=1 AND L$="#" THEN GOSUB 700:RETURN 540 IF GD=2 AND D$="#" THEN GOSUB 640:RETURN 550 IF GD=3 AND R$="#"THEN GOSUB 700:RETURN 560 IF N>4 THEN RETURN 570 IF GD=1 OR GD=3 THEN GOSUB 610:RETURN 580 IF L$="#" AND TX>X THEN GD=3:RETURN 590 IF R$="#" AND TX<X THEN GD=1 600 RETURN 610 IF U$="#" AND TY>Y THEN GD=2:RETURN 620 IF D$="#" AND (TY<Y OR X=9) THEN GD=0 630 RETURN 640 IF L$="#" THEN GD=3:RETURN 650 IF R$="#" THEN GD=1:RETURN 660 IF TX>X AND N<5 THEN GD=3:RETURN 670 IF TX<=X AND N<5 THEN GD=1:RETURN 680 GD=3:IF N=5 THEN GD=1 690 RETURN 700 IF U$="#"THEN GD=2:RETURN 710 IF D$="#" THEN GD=0:RETURN 720 IF TY>Y AND N<5 THEN GD=2:RETURN 730 IF TY<Y AND N<5 THEN GD=0:RETURN 740 GD=0:IF N=5 THEN GD=2 750 RETURN 760 O$=M$(X,Y):U$=M$(X,Y-1):D$=M$(X,Y+1):L$=M$(X-1,Y) 770 R$=M$(X+1,Y):RETURN 780 GOSUB950:IF K$<>"" THEN C$=K$ 790 X=PX:Y=PY:GOSUB760 800 Q=PX:Z=PY:A$=" ":GOSUB940:M$(PX,PY)=" " 810 IF C$="A" AND U$<>"#" THEN PY=PY-1 820 IF C$="Z" AND D$<>"#" THEN PY=PY+1 830 IF C$="N" AND L$<>"#" THEN PX=PX-1 840 IF C$="M" AND R$<>"#" THEN PX=PX+1 850 IF O$="." THEN FOOD=FOOD-1:SC=SC+10 860 IF O$<>"+" THEN 900 870 FOOD=FOOD-1:SC=SC+10:PWRTIM=TMR+PWRC 880 FORL=1TO3:IFG$(L)="*" THEN G$(L)="O":G(L,4)=2 890 NEXT L 900 XX=PX:IF XX=1 THEN PX=16 910 IF XX=17 THEN PX=2 920 Q=PX:Z=PY:A$="C":GOSUB 940 930 RETURN 940 POKE 211,Q+1:POKE214,Z+1:SYS58732:PRINTA$;:RETURN 950 GET K$:RETURN 960 RETURN 970 TMR=TMR+1:RETURN 980 RESTORE 990 FOR A=1 TO 16 1000 READA$:Q=1:Z=A:GOSUB940 1010 FORB=1TO17:M$(B,A)=MID$(A$,B,1):NEXT B 1020 NEXT A 1030 Q=20:Z=1:A$="SCORE:":GOSUB940 1040 Z=3:A$="LIVES:":GOSUB940 1050 FOOD=127 1060 RETURN 1070 FORL=1 TO 3:G(L,1)=L+7:G(L,2)=9:G(L,3)=0:G(L,4)=1:G$(L)="*":NEXTL 1080 PX=9:PY=13:X=PX:Y=PY 1090 C$="" 1100 RETURN 1110 FORZ=1TO16:FORQ=1TO17:A$=M$(Q,Z):GOSUB940:NEXTQ:NEXTZ:RETURN 1120 DATA "#################" 1130 DATA "#+......#......+#" 1140 DATA "#.#.###.#.###.#.#" 1150 DATA "#.#.#...#...#.#.#" 1160 DATA "#.....#.#.#.....#" 1170 DATA "#.#####.#.#####.#" 1180 DATA "#...............#" 1190 DATA "###.#.## ##.#.###" 1200 DATA " ...#.# #.#... " 1210 DATA "###.#.#####.#.###" 1220 DATA "#...............#" 1230 DATA "#.#.####.####.#.#" 1240 DATA "#.#...#. .#...#.#" 1250 DATA "#.###.#.#.#.###.#" 1260 DATA "#+......#......+#" 1270 DATA "#################"
� PACMAN $ ��(147);:X��(�TI) M � M$(18,17):� G(3,4):� G$(3):PWRC�20 t( PWRTIM�0:TMR�0:SC�0:L1�3:L2�3:�980 ~2 �1070 �<