home *** CD-ROM | disk | FTP | other *** search
- 5 rem space for sprites x
- 10 rem space for sprites x
- 15 rem space for sprites x
- 20 rem space for sprites x
- 25 rem space for sprites x
- 30 rem space for sprites x
- 35 rem space for sprites x
- 40 rem space for sprites x
- 45 rem space for sprites x
- 50 rem space for sprites x
- 55 rem space for sprites x
- 60 rem space for sprites x
- 65 rem space for sprites x
- 70 rem space for sprites x
- 75 rem space for sprites x
- 90 dim sp(10),n(60),v%(500,3),w%(500,3),c$(16)
- 95 goto10210:skipround music player and main loop which are time-critical
- 100 remplay a tune(nv voices,kk notes in part 1
- 105 forj=1tonv:p(j)=0:d(j)=0:t(j)=ti:nextj
- 110 forj=1tonv
- 115 if t(j)>ti then 130
- 120 t(j)=t(j)+d(j):x=v%(p(j),j)
- 125 y=w%(p(j),j):p(j)=p(j)+1:d(j)=y*dv:m(j)=n(x)
- 130 nextj
- 140 f=0
- 145 forj=1tonv
- 150 ift(j)<=tithen sp(j+7)=m(j):f=1
- 155 nextj
- 160 iff=0then 145
- 165 ifp(1)<=kkthen110
- 170 return
- 500 goto5000 :rem pointer to moved code
- 2000 rem golden rain(1)
- 2005 sp(7)=a+64080
- 2010 oncwgoto2020,2040,2045,2050
- 2020 ifrnd(0)>0.04then 2100
- 2030 cw=2:cn=50:poke2040,34:pokev+21,peek(v+21)+1:pokev+39,1+7*rnd(0)
- 2035 sp(10)=no:goto2100
- 2040 cw=3:poke2040,35:goto2100
- 2045 cw=4:poke2040,36:goto2100
- 2050 cw=2:poke 2040,34:cn=cn-1
- 2060 ifcn=0then cw=1:pokev+21,peek(v+21)-1
- 2100 rem ground explosions
- 2110 ongrgoto2120,2140,2145,2150
- 2120 ifrnd(0)>0.1 then 2540
- 2130 gr=2:poke2041,37:pokev+21,peek(v+21)+2:pokev+40,1+7*rnd(0)
- 2135 sp(10)=no:goto2540
- 2140 gr=3:poke2041,38:goto2540
- 2145 gr=4:poke 2041,39:goto2540
- 2150 gr=1:poke v+21,peek(v+21)-2
- 2540 rem rocket(2)
- 2610 onqagoto2620,2670,2690,2710,2730
- 2620 ifrnd(0)>0.05orba=4 then2740
- 2630 qy=250:qx=int(350*rnd(0)):qv=-19
- 2640 qh=int((350-qx-300*rnd(0))/20):poke2045,33:pokev+44,1+7*rnd(0)
- 2650 sp(5)=a+256*qx+qy
- 2660 pokev+21,peek(v+21)+32:qa=2:goto2740
- 2670 qx=qx+qh:qy=qy+qv:qv=qv+1
- 2680 sp(5)=a+256*qx+qy:ifqv=3thenqa=3:sp(10)=no:qn=2:poke2045,37:goto2740
- 2690 qn=qn-1:if qn=0then qn=3:qa=4:poke2045,38
- 2700 goto2740
- 2710 qn=qn-1:ifqn<>0then goto2740
- 2715 qn=5:qa=5:poke2045,39:goto2740
- 2720 sp(5)=sp(5)-11*257:goto2740
- 2730 qn=qn-1:ifqn<>0then 2740
- 2732 qa=1:pokev+21,peek(v+21)-32
- 2735 pokev+23,peek(v+23)and223:pokev+29,peek(v+29)and223
- 2740 rem balloon
- 2810 onbagoto2820,2850,2870,2882
- 2820 if rnd(0)>0.02then 3000
- 2830 sp(6)=a+350*256+80:bp=350 :ba=2:poke2046,42 :pokev+23,peek(v+23)+64
- 2835 poke v+29,peek(v+29)+64
- 2840 pokev+45,1+7*rnd(0):pokev+21,peek(v+21)+64:goto3000
- 2850 bp=bp-1:sp(6)=sp(6)-256
- 2860 ifbp=0thenpokev+21,peek(v+21)-64:ba=1
- 2865 if bp=0thenpokev+23,peek(v+23)-64:pokev+29,peek(v+29)-64
- 2867 goto3000
- 2870 bn=bn-1:ifbn<>0then3000
- 2880 ba=4:poke2046,41:pokev+45,1:bp=80:pokev+21,peek(v+21)+64:goto3000
- 2882 s1=0:s2=0:ift1<tqthens1=n(v%(p1,1)):t1=t1+dv*w%(p1,1):p1=p1+1
- 2884 ift2<tqthen s2=n(v%(p2,2)):t2=t2+dv*w%(p2,2):p2=p2+1
- 2886 sp(8)=s1:sp(9)=s2
- 2890 bp=bp+1:ifbp=213thenpokev+21,peek(v+21)-64:ba=1
- 2900 sp(6)=sp(6)+1
- 3000 p=peek(v+30)and96:if(p<>96)or(ba<>2)or(qa<>2)then 3500
- 3010 rem rocket/balloon collision
- 3015 p1=0:p2=0:t1=tq+5:t2=t1
- 3020 qa=3:qn=2:poke2045,39:sp(10)=no:bn=8:ba=3:pokev+21,peek(v+21)-64
- 3030 sp(6)=sp(6)+1028:poke v+23,peek(v+23)-64:pokev+29,peek(v+29)-64:goto2000
- 3500 tq=tq+1:poke v+21,peek(v+21)or128:iftq<500 or ba<>1then 2000
- 3505 forj=1to1000:nextj
- 3510 forj=0to10:sp(j)=0:pokevv+24,0
- 3515 pokev+21,0
- 3520 print"[147] finally, two pieces "
- 3525 print
- 3530 print" by wolfgang amadeus
- 3540 [153]" m o z a r t
- 3550 print:print" first, andante"
- 3560 gosub 5040:gosub100
- 3570 print:print" next, an allegro "
- 3580 gosub 5040:gosub100
- 3590 restore:
- 3600 print:print "the whole program will now be repeated"
- 3700 forj=832to1000:reada:nextj
- 3710 pokevv+4,0:pokevv+11,0:pokevv+18,0:pokevv+24,0
- 3720 goto10290
- 4000 c$(1)=" [144] [146] black"
- 4010 c$(2)=" [146] white"
- 4030 c$(3)=" [146] red"
- 4040 c$(4)=" [159] [146] cyan"
- 4050 c$(5)=" [156] [146] purple"
- 4060 c$(6)=" [146] green"
- 4070 c$(7)=" [146] blue"
- 4080 c$(8)=" [158] [146] yellow"
- 4090 c$(9)=" [129] [146] orange"
- 4100 c$(10)=" [149] [146] brown"
- 4110 c$(11)=" [150] [146] light red"
- 4120 c$(12)=" [151] [146] dark gray"
- 4130 c$(13)=" [152] [146] medium gray"
- 4140 c$(14)=" [153] [146] light green"
- 4150 c$(15)=" [154] [146] light blue"
- 4160 c$(16)=" [155] [146] light gray"
- 4170 poke 53280,1:poke53281,6:poke208*256+21,0
- 4180 print"[147] hello. welcome to the cbm commodore 64[146]"
- 4190 print
- 4200 print" here are some bars of colour to help
- 4210 [153]" adjust your set"
- 4220 [153]
- 4230 [137]10300
- 5000 [143] set up notes in n
- 5010 a[178]2[174]31[170]33[172]2[174]16:q[178]720:p[178]2[174](1[173]12)
- 5020 [129]jj[178]1[164]60: n(jj)[178]a[170]q:q[178]q[172]p:[130]jj
- 5030 [143] enter here if n already set up
- 5040 vv[178]212[172]256:n(5)[178]a
- 5050 [135] nv,ns,at,d,s,dv
- 5060 [129]jj[178]1[164]nv:pp(jj)[178]0:[130]jj
- 5065 [129]kk[178]1[164]ns
- 5070 [135]dn
- 5075 [139]dn[177]1 [167][129]jj[178]1[164]nv:pq(jj)[178]pp(jj):[130]jj
- 5078 [129]jj[178]1[164]nv
- 5080 [135]a$:[135]b$
- 5090 [129]tt[178]1[164][195](a$)
- 5100 v%(pp(jj),jj)[178][198]([202](a$,tt,1))[171]35
- 5110 w%(pp(jj),jj)[178][198]([202](b$,tt,1))[171]48:pp(jj)[178]pp(jj)[170]1
- 5120 [130]tt,jj
- 5121 [139] dn[178]1[167] 5129 :[143] copy repeated bar
- 5122 [129]jj[178]1[164]nv
- 5123 pr[178]pp(jj)
- 5124 v%(pp(jj),jj)[178]v%(pq(jj),jj):w%(pp(jj),jj)[178]w%(pq(jj),jj)
- 5125 pq(jj)[178]pq(jj)[170]1:pp(jj)[178]pp(jj)[170]1
- 5126 [139] pq(jj)[179]pr [167] 5124
- 5127 [130] jj
- 5129 [130]kk
- 5130 kk[178]pp(1)[171]1
- 5140 [129]jj[178]0[164]nv[171]1
- 5150 [151]vv[170]7[172]jj[170]5,16[172]at[170]d
- 5160 [151] vv[170]7[172]jj[170]6,16[172]s
- 5170 [130]jj
- 5180 [151]vv[170]24,15
- 5190 [142]
- 6100 [143] machine code routine to service sprites and sound generators
- 6110 [143] it updates their position every interrupt
- 6120 [131]165,47,133,251,165,48,133,252,160,0,177,251,201,83,208,8,200,177,251
- 6130 [131]201,80,240,38,136,200,200,177,251,133,253,200,177,251,133,254,24,165,251
- 6140 [131]101,253,133,251,165,252,101,254,133,252,197,50,208,212,165,251
- 6150 [131]197,49,208,206,76,49,234
- 6160 [131]152,24,105,6,168,162,0,200,200,24,177,251,41,1,240,1,56,102,255,200
- 6170 [131]177,251 ,157,0,208,200,177,251,157,1,208,232,232,200,224,16,208,225
- 6180 [131]165,255,141, 16,208
- 6182 [131]162,0,200,200,177,251,240,29,169,0,157,4,212,177,251,157,4,212,169,0
- 6184 [131]145,251,200,177,251,157,1,212,200,177,251,157,0,212,76,208,3
- 6186 [131]200,200,200,138,24,105,7,170,224,21,208,209,76,49,234
- 6190 [143] insert wedge (code at 988)
- 6200 [131]120,169,64,141,20,3,169,3,141,21,3,88,96
- 6205 [143] sprite data- bright dot
- 6210 [131]0,0,0,0,0,0,0,0,0
- 6215 [131]0,0,0,0,0,0,0,0,0
- 6220 [131]0,0,0,0,0,0,0,24,0
- 6225 [131]0,60,0,0,60,0,0,24,0
- 6230 [131]0,0,0,0,0,0,0,0,0
- 6235 [131]0,0,0,0,0,0,0,0,0
- 6240 [131]0,0,0,0,0,0,0,0,0
- 6300 [143] golden rain(1)
- 6310 [131]0,32,0,8,132,136,18,0,2
- 6315 [131]32,162,164,9,16,146,48,105,40
- 6320 [131]64,146,2,0,170,160,148,100,0
- 6325 [131]0,90,2,72,36,144,0,124,8
- 6330 [131]66,124,32,0,124,0,144,124,4
- 6335 [131]66,124,136,0,124,0,32,124,36
- 6340 [131]0,124,0,77,125,18,0,124,0
- 6350 [143] golden rain(2)
- 6360 [131]0,64,0,17,2,68,36,0,1
- 6365 [131]65,33,82,16,0,0,33,105,8
- 6370 [131]16,146,32,1,18,2,4,36,160
- 6375 [131]144,72,0,0,36,2,72,124,144
- 6380 [131]0,124,8,66,124,33,0,124,0
- 6385 [131]144,124,4,66,124,136,32,124,0
- 6390 [131]0,124,4,5,124,0,72,125,18
- 6400 [143] golden rain(3)
- 6410 [131]0,128,0,34,1,34,72,64,4
- 6415 [131]130,16,161,16,128,4,2,36,128
- 6420 [131]16,146,8,32,8,32,2,164,2
- 6425 [131]4,72,160,144,36,0,0,124,2
- 6430 [131]72,124,144,0,124,8,66,124,33
- 6440 [131]0,124,0,144,124,4,66,124,136
- 6445 [131]32,124,0,0,124,4,5,124,0
- 6450 [143] explosion(1)
- 6455 [131]0,0,0,0,0,0,0,0,0
- 6460 [131]0,0,0,0,0,0,0,0,0
- 6465 [131]0,0,0,0,56,0,0,198,0
- 6470 [131]1,147,0,3,73,128,2,16,192
- 6475 [131]3,66,192,1,137,128,0,195,0
- 6480 [131]0,124,0,0,0,0,0,0,0
- 6485 [131]0,0,0,0,0,0,0,0,0
- 6500 [143] explosion(2)
- 6505 [131]0,0,0,0,0,0,0,0,0
- 6510 [131]0,0,0,0,16,0,0,16,128
- 6515 [131]8,57,0,4,198,0,3,33,128
- 6520 [131]6,0,192,12,72,224,12,4,120
- 6525 [131]62,0,96,6,16,192,3,36,192
- 6530 [131]5,129,160,8,254,16,0,48,0
- 6535 [131]0,32,0,0,32,0,0,0,0
- 6550 [143] explosion(3)
- 6555 [131]0,16,0,0,16,0,0,16,16
- 6560 [131]73,16,32,32,17,64,18,20,128
- 6565 [131]8,17,64,68,2,16,2,84,0
- 6570 [131]17,9,8,32,0,32,0,72,127
- 6575 [131]254,0,0,0,2,4,18,32,72
- 6580 [131]4,36,32,8,160,144,18,32,8
- 6585 [131]32,33,4,64,32,2,0,32,0
- 6600 [143] moon
- 6605 [131]252,0,0,63,240,0,15,252,0
- 6610 [131]7,255,128,3,255,240,1,255,248
- 6615 [131]0,255,252,0,127,254,0,63,254
- 6620 [131]0,63,255,0,63,255,0,63,255
- 6625 [131]0,63,255,0,127,254,0,127,254
- 6630 [131]0,255,252,1,255,248,3,255,224
- 6635 [131]7,255,128,31,248,0,254,0,0
- 6650 [143] parachute
- 6655 [131]0,254,0,15,255,224,62,251,248
- 6660 [131]126,250,252,254,26,254,254,216,126
- 6665 [131]126,30,252,127,255,252,32,0,8
- 6670 [131]16,0,16,8,0,32,4,0,64
- 6675 [131]2,0,128,1,1,0,0,130,0
- 6680 [131]0,84,0,0,124,0,0,56,0
- 6685 [131]0,40,0,0,108,0,0,0,0
- 6700 [143] commodore balloon
- 6705 [131]0,127,0,1,255,192,3,255,224
- 6710 [131]3,231,224,7,217,240,7,223,240
- 6715 [131]7,217,240,3,231,224,3,255,224
- 6720 [131]3,255,224,2,255,160,1,127,64
- 6725 [131]1,62,64,0,156,128,0,156,128
- 6730 [131]0,73,0,0,73,0,0,62,0
- 6735 [131]0,62,0,0,62,0,0,28,0
- 7500 [143] gavotte by g.f.handel
- 7502 [131]3,2,0,10,0,15
- 7505 [131]1
- 7510 [131]"(onoqojsqstsqovtsqoqonoqojsqstsqovtsqoq"
- 7520 [131]"811112211112222222241111221111222222224"
- 7530 [131]"((jjlolnolij(jjlolnolij"
- 7540 [131]"88442211222484422112224"
- 7550 [131]"(7;>cbcecb@gec<@><;97;>cbcecb@gec<@>"
- 7560 [131]"842211112222222211114221111222222224"
- 7565 [131]2
- 7570 [131]"jhglhgejgechgecbcbcec>hghjgeghejcbcegec"
- 7580 [131]"211421142112222411112211111111221111224"
- 7590 [131]"cgece(ecbc(cc@>(((ccbcecb;"
- 7600 [131]"42112221122222288621111224"
- 7610 [131]";7496427;479;><;9;79bc7><;@<>27"
- 7620 [131]"4224211222222222222222211222224"
- 8000 [143] marines march
- 8010 [131]2,2,0,12,0,1
- 8015 [131]1
- 8020 [131]"(aehhhhhmhefhhfcaaehhhhhmhefhhfcaml"
- 8030 [131]"81122223121122226112222312112222611"
- 8040 [131]"(5599(9(9(9(9999(44(4(4(459999(99(9(9(9(9999(44(4(4(459999("
- 8050 [131]"81111111111111122111111111111221111111111112211111111111122"
- 8055 [131]1
- 8060 [131]"jfjfhjhmljfjmhaehhhhhmhefhhfca"
- 8070 [131]"222231211222261122223121122227"
- 8080 [131]"(:(5(:(5(9999((:(5(:(5(9999(99(9(9(9(9999(44(4(4(459999"
- 8090 [131]"1111111111112211111111111122111111111111221111111111113"
- 8500 [143] andante
- 8510 [131]2,2,3,11,0,17
- 8515 [131]2
- 8520 [131]"(momoqmhhhoqoqrohhhtlmolmvsomltqvtsst("
- 8530 [131]"44111122224111122224111141111111122422"
- 8540 [131]"(eheaeheheahmlmolhlololhe(hjghmoooh("
- 8550 [131]"444111111114111111111111224442222422"
- 8595 [131]2
- 8600 [131]"tqrtvroqrtrqoqmrqo(rqomltrqomjvromllm("
- 8610 [131]"41111411111111224224111141111111122422"
- 8620 [131]"(qnj(olhmljomaeah(olh(emj(gh((a("
- 8630 [131]"22222222222211112422222223122422"
- 8700 [143] allegro
- 8710 [131] 2,2,1,9, 0,10
- 8715 [131]2
- 8720 [131]"(qtrqom(mooooqm(mooooqmoqrtvxyvqst(tvxyvstvstvxytxvtvxyvstvst("
- 8730 [131]"82222242222211422222112111111222242211111111111111111111111142"
- 8740 [131]"(mqomhe(ehhhhe(ehhhhe(mlolomomololomomol("
- 8750 [131]"82222242222224222222448222222222222222242"
- 8795 [131]2
- 8800 [131]"htqvtrotrqmrqomt(qtrqomoqrtvxyxmoqrtqomxy(t(r(o(m(hmmmhqqqmtoqm("
- 8810 [131]"2626262626444424222222111111118111111118222222224222222222243142"
- 8820 [131]"(amjomlhmlkjhfgh(mqomhe(qrotrq(qrotrq(q(o(h(e(<aaa<eeeah<a("
- 8830 [131]426262626244444422222242222224222222222222224222222222224442"
- 10210 forj=832 to 1000
- 10220 reada:pokej,a:nextj
- 10230 sys(988)
- 10240 rem make space for sprites
- 10250 a=peek(43)+256*peek(44)
- 10260 if a> 2048+14*64then 10290
- 10270 poke 43,peek(a):poke 44,peek(a+1):goto10250
- 10290 goto4000
- 10300 for j=1to10:printc$(j): q0=2048+64*j:gosub11000:nextj
- 10305 forj=11to16:print c$(j):fork=1to 200:nextk,j
- 10310 v=208*256
- 10312 print" now turn up the volume ... and wait"
- 10315 gosub 5000:gosub100
- 10318 fork=1to2000:nextk
- 10320 poke53280,0:poke 53281,0:print"[147]"
- 10330 pokevv+24,0
- 10340 print "[147] [155] night falls ....and here is"
- 10350 print" a short display of fireworks for you
- 10360 [129] j[178]1[164] 30:[151] 1134[170]460[172][187](0),46:[129]k[178]1[164]100:[130]k,j
- 10400 [143]set up main loop
- 10405 sp(8)[178]2[174]31[170]2[174]16:sp(9)[178]2[174]31[170]2[174]16
- 10410 a[178]2[174]31:vv[178]212[172]256:[151]vv[170]19,12:[151]vv[170]20,0
- 10420 sp(0)[178]a[170]50[172]256[170]200:sp(1)[178]a[170]280[172]256[170]180
- 10430 sp(7)[178]a[170]250[172]256[170]80:[151]v[170]46,7:[151] 2047,40:[151]v[170]21,128
- 10440 no[178]2[174]31[170]129[172]2[174]16[170]5000:[151]vv[170]24,15
- 10450 cw[178]1:gr[178]1:qa[178]1:ba[178]1:[141]5040:tq[178]0
- 10460 [151] 2042,33:[151]2043,33:
- 10470 [151] v[170]23, 3:[151] v[170]29, 3
- 10480 [137] 2000
- 11000 [143] set up a sprioite in location q0
- 11010 [129]jj[178]0[164]62
- 11020 [135] kk
- 11030 [151]q0[170]jj,kk
- 11040 [130]jj
- 11050 [142]
-