10 B=1:C=2:D=3:SPRITEON:O=50:A$="NINTENDO
20 CLS:CGENC:CGSETB,B:LOCATE19,7:PRINT"{K2|K2}":LOCATE8,8:PRINT"STAR  DUST {K6|K6}":LOCATE19,9:PRINT"{K1|K1}
25 LOCATE6,15:PRINT"PUSH START BUTTON":GOSUB260:GOSUB370:GOSUB390:FORI=6TO22:COLORI,15,B:NEXT:E=A:F=D
30 PALETB B,A,RND(52),A,A:IFSTRIG(A)<>B GOTO30
40 W=A:GOSUB390:VIEW:DEFSPRITEA,(A,B,A,A,A)="ピプペポ":POKE&H684,&HD5:DEFSPRITEC,(A,B,A,A,A)="XYZ「
50 X=120:Y=A:K=A:L=87:SPRITEA,X,150:SPRITEC,K,L:G=A:H=-12:GOSUB270:V=A:POKE&H326,X:POKE&H32B,Y:CALL&H320:PAUSE99
60 S=STICK(A):IFS ANDB ANDG<12G=G+C
70 IFS ANDC ANDG>-12G=G-C
80 IFX AND4 ANDH<-6H=H+C
90 IFS AND8 ANDH>-12H=H-C
100 X=X+G:Y=Y+H:M=M-G:N=N-H:K=K-G:L=L-H:IFV=B R=R-G:IFR>255ORR<A V=A:SPRITEB
110 IFX>255X=X-255
120 IFX<A X=X+255
130 IFY<A Y=Y+239
140 IFK>255K=K-255
150 IFK<A K=K+255
160 IFL>239L=L-239
170 POKE&H326,X:POKE&H32B,Y:CALL&H320:P=P+(SGN(120-M))*C:Q=Q+(SGN(150-N))*C:M=M+P:N=N+Q:IFM>255ORM<A ORN>239ORN<A GOSUB270
180 SPRITEC,M,N:IFABS(120-M)<12ANDABS(150-N)<12ORABS(120-K)<32ANDABS(150-L)<32POKE&H4000,&HF,&HF4,&HFF,&HB:F=F-B:GOSUB270:IFF<A GOTO280
190 S=STRIG(A):IFS=A GOTO210
200 IFV=A V=B:R=124:U=160:IFS=4 V=C
210 IFV=A GOTO60
220 U=U-30:IFU<A U=A:V=A:SPRITEB:GOTO240
230 SPRITEB,R,U:IFABS(R-M)<12ANDABS(U-N)<20POKE&H4000,&H4F,&HCF,&HFF,&H8:SPRITEB:E=E+B:W=W+B:V=A:IFW<5GOSUB270
240 IFW>9GOTO380
250 GOTO60
260 POKE&H4015,&H17:POKE&H320,&HA9,&H90,&H8D,A,&H20,&HA9,&H78,&H8D,&H5,&H20,&HA9,A,&H8D,&H5,&H20,&H60:RETURN
270 M=K:N=L:P=A:Q=A:RETURN
280 FORI=A TO4:SPRITEI:DEFMOVE(I)=SPRITE(10,I*C,B,25):POSITIONI,120,150:MOVEI:NEXT:PAUSE150:GOSUB390:X=240
290 CLS:CGEND:POKE&H680,&H47,&H41,&H4F,&H56,A,A,A,A,&H4D,&H45,&H45,&H52:GOSUB370
300 X=X-B:SPRITEA,112,X:SPRITEC,128,X:PALETS A,14,X,X,X:IFX>80GOTO300
310 PAUSE99:IFE>O O=E:GOSUB320
315 SPRITEA:SPRITEC:GOTO20
320 LOCATE8,12:PRINT"HIGH SCORE !!":X=12:Y=96:A$="
325 S=STICK(A):Y=Y+(S=C)-(S=B):X=X-(STRIG(A)=4)*(X>12):IFY>180Y=32
330 IFY<32Y=180
340 LOCATEX,15:PRINTCHR$(Y)" ":PAUSE7:IFSTRIG(A)<>8GOTO325
350 X=X+B:BEEP:IFX<22GOTO325
360 FORI=12TO22:A$=A$+SCR$(I,15):NEXT:RETURN
370 LOCATE13,A:PRINT"HIGH "RIGHT$("0000"+MID$(STR$(O),C,4),4)"0  ":LOCATEA,A:PRINT"SCORE "RIGHT$("0000"+MID$(STR$(E),C,4),4)"0":LOCATE13,B:PRINT"NAME "A$:RETURN
380 FORI=A TO4:SPRITEI+B:DEFMOVE(I)=SPRITE(10,I*C,B,25):POSITIONI,M,N:MOVEI:NEXT:E=E+F*10:LOCATE7,14:PRINT"CLEAR BONUS"F*100:GOSUB370:PAUSE300:F=F+B:GOTO40
390 ERAA,B,C,D,4:RETURN
