home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 222 / 222.d81 / testcard (.txt) < prev    next >
Encoding:
Commodore BASIC  |  2002-01-01  |  11.2 KB  |  342 lines

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