06 – Ditali
Apparso da pagina 37 fino a pagina 42 de “Il libro dei giochi del Commodore 64”
Il listato pubblicato
Il programma
Il nostro listato digitato
Qui di seguito trovate il codice da copiare sul programma CBM prg Studio Il codice originale é stato modificato affinchè possa essere letto da CBM prg Studio. I caratteri speciali PETSCII (Screen Codes) presenti nel listato originale, sono stati singolarmente sostituiti da quelli standard utilizzati da CBM prg Studio. Attenzione – Grazie alla segnalazione di più utenti, i caratteri “<” e “>” potrebbero venir sostituiti dai rispettivi encoding html “<” e “>” . Qualora li trovaste, sostituite manualmente questi valori direttamente su CBM prg Studio, altrimenti il programma non funzionerà. Scusate per l’inconveniente tecnico.
10 rem **ditali**
20 print"{clear}{cyan}":poke53280,3:poke53281,2:poke649,1
30 poke52,48:poke56,48:clr
40 forj=12288to12350:readx:pokej,x:next
50 forj=12368to12502:readx:pokej,x:next
60 poke53272,(peek(53272)and240)+12
70 g=1024:h=55296:v=53248:dimb%(2,41)
80 forj=2to962step40:pokeg+j,10:pokeh+j,3:pokeg+j+1,10:pokeh+j+1,3
90 pokeg+j+34,10:pokeh+j+34,3:pokeg+j+35,10:pokeh+j+35,3:next
100 d$="opstopstopstopstopstopstop"
110 e$="qruvqruvqruvqruvqruvqruvqr"
120 f$="wx":g$="yz"
130 print"{home}":gosub1000
140 printtab(31)f$:printtab(31)g$:gosub1000
150 printtab(7)f$:printtab(7)g$:gosub1000
160 printtab(31)f$:printtab(31)g$:gosub1000
170 printtab(7)f$:printtab(7)g$:gosub1000
180 printtab(31)f$:printtab(31)g$
190 printtab(7)"klstopstopstopstopstopstop"
200 printtab(7)"mnuvqruvqruvqruvqruvqruvqr"
210 fork=0to35step7
220 forl=0to6
230 b%(0,k+l)=16:b%(1,k+l)=53+32*k/7:b%(2,k+l)=1
240 next:next
250 fork=0to28step14
260 forl=0to5
270 b%(0,k+l)=80+32*l:b%(2,k+l)=0
280 next:next
290 fork=7to35step14
300 forl=5to0step-1
310 b%(0,k+l+1)=80+32*(5-l):b%(2,k+l+1)=0
320 next:next
330 forj=0to2
340 t(j,0)=int(rnd(1)*29):t(j,1)=1
350 next
360 ift(0,0)=t(1,0)ort(1,0)=t(2,0)ort(2,0)=t(0,0)then340
370 poke2040,192:poke2041,192:poke2042,192
380 fortp=0to2:pokev+tp*2,b%(0,t(tp,0)):pokev+tp*2+1,b%(1,t(tp,0))
390 pokev+16,(peek(v+16)and(255-2^tp))+b%(2,t(tp,0))*2^tp:next:gosub1500
400 pokev+28,7:pokev+37,9:pokev+38,1:pokev+39,3:pokev+40,4:pokev+41,5
410 p=1:poke53280,9
420 geta$:ifa$=""then420
430 tp=val(a$)-4
440 iftp<0ortp>2then420
450 ift(tp,1)=0then420
460 tn=t(tp,0)+1
470 f=0:forj=0to2
480 ift(j,0)=tnandj<>tpthenf=1
490 next
500 iff=1then420
510 xs=b%(0,t(tp,0))+b%(2,t(tp,0))*256
520 xf=b%(0,tn)+b%(2,tn)*256
530 ys=b%(1,t(tp,0)):yf=b%(1,tn)
540 xd=xf-xs:yd=yf-ys
550 forj=1to20
560 x=xs+xd*j/20
570 y=int(ys+yd*j/20)+abs(10-j)-10
580 z=int(x/256):x=int(x-z*256)
590 z=(peek(v+16)and(255-2^tp))+z*2^tp
600 pokev+tp*2,x:pokev+16,z:pokev+tp*2+1,y
610 gosub1500:pokev+28,7:next
620 t(tp,0)=tn
630 iftn=41then800
640 ifp=2then410
650 p=2:poke53280,10
660 goto420
800 forj=1to10
810 t(tp,1)=0:gosub1500
820 fork=1to50:next
830 t(tp,1)=1:gosub1500
840 fork=1to50:next
850 next
860 t(tp,1)=0:gosub1500
870 f=1:forj=0to2
880 ift(j,1)=1thenf=0
890 next
900 t(tp,0)=42
910 iff=0then640
920 print"{clear}{white}{down*2}":poke53272,21
930 printtab(8)"il giocatore n.";p;" vince"
940 pokev+16,0
950 pokev,80:pokev+1,180:pokev+2,160:pokev+3,180:pokev+4,240:pokev+5,180
960 pokev+23,7:pokev+29,7:pokev+21,7
970 geta$:ifa$<>" "then970
980 pokev+21,0:pokev+23,0:pokev+29,0
990 clr:goto20
1000 printtab(7)d$:printtab(7)e$
1010 return
1500 x=t(0,1)+2*t(1,1)+4*t(2,1)
1510 pokev+21,x
1520 return
2000 data2,128,0,10,160,0,42,168,0,42,168,0,26,172,0,54,180,0,29,220,0
2010 data55,116,0,29,220,0,55,116,0,221,221,0,119,119,0,221,221,0,119,119,0
2020 data221,221,0,183,118,0,173,218,0,170,170,0,170,170,0,42,168,0,10,160,0
3000 data195,102,60,24,24,60,102,195,255,132,136,144,168,197,130,132
3010 data255,33,17,9,21,163,65,33,132,130,197,160,144,136,132,255
3020 data33,65,163,21,9,17,33,255,255,128,128,128,134,137,136,132
3030 data255,1,1,1,97,45,17,33,132,130,130,129,128,128,128,255
3040 data33,65,65,129,1,1,1,255,0,0,0,0,56,68,130,129
3050 data0,0,0,4,2,1,1,128,128,64,32,0,0,0,0
3060 data129,65,34,28,0,0,0,0,3,4,8,0,0,0,0,0
3070 data192,32,16,16,16,32,64,128,1,2,4,8,8,8,4,3,0,0,0,0,0,16,32,192
Il file .PRG del listato
Provalo direttamente sull’emulatore! Clicca sul pulsante per avviare!
Downloading…