Advertisement
felixnardella

The Solar System WIP1

Jul 9th, 2024
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.81 KB | None | 0 0
  1. 5 rem 'the solar system' by kimono v 0.2
  2. 10 poke53280,0:s=24576:sc=17408:dimsy(64)
  3. 15 x0=172:y0=148:rem planets center
  4. 20 rx=110:ry=100:xc=160:yc=108:rem orbitals radii & center
  5. 25 poke56576,(peek(56576)and252)or2:rem select bank 1
  6. 30 forx=0to62:ready:poke18496+x,y:next:rem sprite gen
  7. 35 poke53287,15:poke53288,10:poke53289,5:poke53290,2:poke53291,9:poke53292,8
  8. 40 poke53293,14:poke53294,6:rem sprites colors
  9. 45 poke53269,255:rem all 8 sprites visible
  10. 50 poke53272,peek(53272)or8:rem put bitmap in the 2nd half of vic bank 1 (24576)
  11. 55 poke53265,peek(53265)or32:rem enter in bitmap mode
  12. 60 rem clear graphic ram
  13. 65 rem cb$="":p1=peek(51):p2=peek(52)
  14. 70 rem poke51,64:poke52,127
  15. 75 rem forcn=1to125:cb$=cb$+chr$(0):next
  16. 80 rem poke51,p1:poke52,p2
  17. 82 fori=0to7999:pokes+i,0:next
  18. 85 rem clear color ram
  19. 90 rem cb$="pppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp"
  20. 95 rem cb$=cb$+cb$:cb$=cb$+left$(cb$,121)
  21. 100 rem print"{clear}"cb$cb$cb$cb$;:print"ppp";:poke18407,16
  22. 102 fori=0to999:pokesc+i,16:next
  23. 105 tw(0)=1:fori=1to7:tw(i)=tw(i-1)*2:next
  24. 110 goto140
  25. 115 rem plot x,y
  26. 120 p=s+320*int(y/8)+8*int(x/8)+(yand7)
  27. 125 pokep,peek(p)ortw(7-(xand7))
  28. 130 return
  29. 135 rem plot ellipses
  30. 140 s1=pi/2:forj=0to7:rx=rx-10:ry=ry-10
  31. 145 forfi=0tos1step.05
  32. 150 y1=ry*sin(fi):x1=rx*cos(fi)
  33. 155 x=xc+x1:y=yc+y1:gosub120
  34. 160 y=yc-y1:gosub120
  35. 165 x=xc-x1:gosub120
  36. 170 y=yc+y1:gosub120
  37. 175 next:next
  38. 180 fori=0to7
  39. 185 poke18424+i,33:rem sprites pointers
  40. 190 next
  41. 195 fori=0to7:readrx(i):next:rem assign orbit x radius
  42. 200 fori=0to7:readry(i):next:rem assign orbit x radius
  43. 205 fori=0to7:readsp(i):next:rem planets speed
  44. 210 fori=0to7:z=int(rnd(1)*40)+1:an(i)=z*i:next:rem init random planets pos
  45. 215 rem symbols
  46. 220 fori=0to63:readsy(i):next
  47. 225 rem chars gen
  48. 230 poke17947,112:rem yellow 16*7
  49. 235 fori=0to7:readsu(i):poke28888+i,su(i):next
  50. 240 fori=0to6:readt(i):poke24672+i,t(i):next
  51. 245 fori=0to6:readh(i):poke24680+i,h(i):next
  52. 250 fori=0to6:reade(i):poke24688+i,e(i):next
  53. 255 fori=0to6:reads(i):poke24704+i,s(i):next
  54. 260 fori=0to6:reado(i):poke24712+i,o(i):next
  55. 265 fori=0to6:readl(i):poke24720+i,l(i):next
  56. 270 fori=0to6:reada(i):poke24728+i,a(i):next
  57. 275 fori=0to6:readr(i):poke24736+i,r(i):next
  58. 280 fori=0to6:poke24752+i,s(i):next
  59. 285 fori=0to6:ready(i):poke24760+i,y(i):next
  60. 290 fori=0to6:poke24768+i,s(i):next
  61. 295 fori=0to6:poke24776+i,t(i):next
  62. 300 fori=0to6:poke24784+i,e(i):next
  63. 305 fori=0to6:readm(i):poke24792+i,m(i):next
  64. 310 fori=0to8:readco(i):poke17608+80*i,co(i):next:rem chars colors
  65. 315 forj=0to8:fori=0to7:poke26176+i+640*j,su(i):next:next
  66. 320 fori=0to6:poke26192+i,s(i):next
  67. 325 fori=0to6:readu(i):poke26200+i,u(i):next
  68. 330 fori=0to6:readn(i):poke26208+i,n(i):next
  69. 335 fori=0to6:poke26832+i,h(i):next
  70. 340 fori=0to7:poke26848+i,sy(i):next
  71. 345 fori=0to6:readv(i):poke27472+i,v(i):next
  72. 350 fori=0to7:poke27488+i,sy(i+8):next
  73. 355 fori=0to6:poke28112+i,e(i):next
  74. 360 fori=0to7:poke28128+i,sy(i+16):next
  75. 365 fori=0to6:poke28752+i,m(i):next
  76. 370 fori=0to7:poke28768+i,sy(i+24):next
  77. 375 fori=0to6:readj(i):poke29392+i,j(i):next
  78. 380 fori=0to7:poke29408+i,sy(i+32):next
  79. 385 fori=0to6:poke30032+i,s(i):next
  80. 390 fori=0to7:poke30048+i,sy(i+40):next
  81. 395 fori=0to6:poke30672+i,u(i):next
  82. 400 fori=0to7:poke30688+i,sy(i+48):next
  83. 405 fori=0to6:poke31312+i,n(i):next
  84. 410 fori=0to7:poke31328+i,sy(i+56):next
  85. 415 fori=0to6:readb(i):poke32504+i,b(i):next
  86. 420 fori=0to6:poke32512+i,y(i):next
  87. 425 fori=0to6:readk(i):poke32528+i,k(i):next
  88. 430 fori=0to6:readi(i):poke32536+i,i(i):next
  89. 435 fori=0to6:poke32544+i,m(i):next
  90. 440 fori=0to6:poke32552+i,o(i):next
  91. 445 fori=0to6:poke32560+i,n(i):next
  92. 450 fori=0to6:poke32568+i,o(i):next
  93. 455 rem main loop
  94. 460 fort=0to255
  95. 465 fori=0to7
  96. 470 an(i)=an(i)+sp(i):fi=an(i):rem angular distances & speeds
  97. 475 iffi>256thenfi=fi-256:rem mod 256, if fi>255
  98. 480 x=x0+rx(i)*cos(fi*pi/128):rem calc x pos
  99. 485 y=y0+ry(i)*sin(fi*pi/128):rem calc y pos
  100. 490 ifx<256thenms=msand(255-tw(i)):rem reset msb
  101. 495 ifx>255thenms=msortw(i):x=x-255:rem set msb if x>255 & update x pos
  102. 500 poke53264,ms:rem update msb reg
  103. 505 poke53248+i*2,x:rem update x pos
  104. 510 poke53249+i*2,y:rem update y pos
  105. 515 next:next
  106. 520 rem goto450
  107. 525 poke53265,peek(53265)and(223)
  108. 530 poke53272,21:poke53280,14
  109. 535 end
  110. 540 rem sprite
  111. 545 data 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  112. 550 data 0,0,0,28,0,0,62,0,0,127,0,0,127,0,0,127
  113. 555 data 0,0,62,0,0,28,0,0,0,0,0,0,0,0,0,0
  114. 560 data 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  115. 565 rem radius x
  116. 570 data 30,40,50,60,70,80,90,100
  117. 575 rem radius y
  118. 580 data 20,30,40,50,60,70,80,90
  119. 585 rem planets speed
  120. 590 data 14,6,4,2,.4,.14,.06,.02
  121. 595 rem hermes
  122. 600 data 20,28,34,34,28,8,28,8
  123. 605 rem venus
  124. 610 data 28,34,34,34,28,8,28,8
  125. 615 rem earth
  126. 620 data 62,73,73,127,73,73,62,0
  127. 625 rem mars
  128. 630 data 7,3,5,56,40,40,24,0
  129. 635 rem jupiter
  130. 640 data 50,74,18,34,66,127,2,0
  131. 645 rem saturn
  132. 650 data 112,32,32,60,34,36,2,0
  133. 655 rem uranus
  134. 660 data 8,28,42,28,34,42,34,28
  135. 665 rem neptune
  136. 670 data 153,153,153,90,60,24,126,24
  137. 675 rem su
  138. 680 data 60,126,255,255,255,255,126,60
  139. 685 rem t
  140. 690 data 127,24,24,28,28,28,28
  141. 695 rem h
  142. 700 data 97,97,97,127,115,115,115
  143. 705 rem e
  144. 710 data 127,96,96,127,112,112,127
  145. 715 rem s
  146. 720 data 127,99,96,127,3,99,127
  147. 725 rem o
  148. 730 data 127,103,103,99,99,99,127
  149. 735 rem l
  150. 740 data 96,96,96,112,112,112,127
  151. 745 rem a
  152. 750 data 62,54,54,127,115,115,115
  153. 755 rem r
  154. 760 data 126,102,102,126,115,115,115
  155. 765 rem y
  156. 770 data 99,99,99,127,28,28,28
  157. 775 rem m
  158. 780 data 127,219,219,219,219,219,219
  159. 785 rem planet colors
  160. 790 data 112,240,160,80,32,144,128,224,96
  161. 795 rem u
  162. 800 data 99,99,99,115,115,115,127
  163. 805 rem n
  164. 810 data 127,99,99,115,115,115,115
  165. 815 rem v
  166. 820 data 115,115,114,50,50,50,62
  167. 825 rem j
  168. 830 data 6,6,6,7,7,103,127
  169. 835 rem b
  170. 840 data 126,102,102,127,115,115,127
  171. 845 rem k
  172. 850 data 102,102,102,127,115,115,115
  173. 855 rem i
  174. 860 data 24,24,24,28,28,28,28
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement