Advertisement
gnamp

Dominic Land for the Atari 2600

Dec 8th, 2015
476
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.08 KB | None | 0 0
  1. rem Generated 02/11/2015 12:26:30 by Visual bB Version 1.0.0.548
  2. rem **********************************
  3. rem *<filename> *
  4. rem *<description> *
  5. rem *<author> *
  6. rem *<contact info> *
  7. rem *<license> *
  8. rem **********************************
  9.  
  10.  
  11. playfield:
  12. ................................
  13. XXX...X...X.X..X.X..X.X..XX.....
  14. X..X.X.X.X.X.X.X.XX.X.X.X.....X.
  15. X..X.X.X.X.X.X.X.X.XX.X.X....X.X
  16. XXX...X..X...X.X.X..X.X..XX...X.
  17. ................................
  18. ...X....X......XXX..X..X.XXX....
  19. ..X.X...X.....X...X.XX.X.X..X...
  20. ...X....X.....XXXXX.X.XX.X..X...
  21. ........XXXX..X...X.X..X.XXX....
  22. ................................
  23. end
  24.  
  25. COLUBK = $BC
  26. COLUPF = $BE
  27. ; COLUP0 = $3E
  28. ; COLUP1 = $3E
  29.  
  30. dim _Sound0 = c
  31. dim _Chan0_Duration = x
  32. dim _C0 = e
  33. dim _V0 = f
  34. dim _F0 = g
  35.  
  36.  
  37. player0x=50:player0y=50
  38. player1x=20:player1y=20
  39. missile0height=4:missile0y=255
  40. NUSIZ0 = 16
  41.  
  42.  
  43.  
  44.  
  45. sprites
  46.  
  47. player0:
  48. %00111100
  49. %00011000
  50. %11111111
  51. %01111110
  52. %00111100
  53. %00111100
  54. %00011000
  55. %00011000
  56. end
  57.  
  58. player1:
  59. %00101010
  60. %01001001
  61. %00101010
  62. %00110110
  63. %01111111
  64. %01011101
  65. %01101011
  66. %00111110
  67. end
  68.  
  69. if missile0y>240 then goto skip
  70. missile0y=missile0y-2:goto draw_loop
  71.  
  72. skip
  73. if joy0fire then missile0y = player0y-2:missile0x = player0x+4: _Sound0 = 4 : _Chan0_Duration = 12 : _V0 = 8 : _F0 = 22
  74. draw_loop
  75. drawscreen
  76.  
  77. if player1y<player0y then player1y=player1y+1
  78. if player1y>player0y then player1y=player1y-1
  79. if player1x<player0x then player1x=player1x+1
  80. if player1x>player0x then player1x=player1x-1
  81. player1x=player1x:player1y=player1y
  82.  
  83. if joy0up then player0y=player0y-1:goto jump
  84. if joy0down then player0y=player0y+1:goto jump
  85. if joy0left then player0x=player0x-1:goto jump
  86. if joy0right then player0x=player0x+1:goto jump
  87.  
  88. if collision(missile0,player1) then score=score+1:player1x=rand/2:player1y=0:missile0y=255
  89. if collision(player0,player1) then score=score-1:player1x=rand/2:player1y=0:missile0y=255
  90.  
  91. jump
  92.  
  93. ;***************************************************************
  94. ;
  95. ; Channel 0 sound effect check.
  96. ;
  97. ;```````````````````````````````````````````````````````````````
  98. ; If no channel 0 sound effect is on, skip all channel 0
  99. ; sound effect subsections.
  100. ;
  101. if !_Sound0 then goto __Skip_Channel_0
  102.  
  103. ;```````````````````````````````````````````````````````````````
  104. ; Decreases the channel 0 duration counter.
  105. ;
  106. _Chan0_Duration = _Chan0_Duration - 1
  107.  
  108. ;```````````````````````````````````````````````````````````````
  109. ; If channel 0 duration counter is zero, end current sound
  110. ; effect.
  111. ;
  112. if !_Chan0_Duration then goto __Clear_Channel_0
  113.  
  114.  
  115.  
  116.  
  117. ;***************************************************************
  118. ;
  119. ; Channel 0 sound effect 4.
  120. ;
  121. ; The volume and the frequency changes.
  122. ;
  123. ;```````````````````````````````````````````````````````````````
  124. ; If sound 4 isn't on, skip this subsection.
  125. ;
  126. if _Sound0 <> 4 then goto __Skip_Chan0_Sound_004
  127.  
  128. ;```````````````````````````````````````````````````````````````
  129. ; Sets the tone, volume and frequency.
  130. ;
  131. AUDC0 = 4 : AUDV0 = _V0 : AUDF0 = _F0
  132.  
  133. ;```````````````````````````````````````````````````````````````
  134. ; Only looks at the even/odd bit.
  135. ;
  136. temp5 = _Chan0_Duration & %00000001
  137.  
  138. ;```````````````````````````````````````````````````````````````
  139. ; Decreases volume only when _Chan0_Duration is an odd number.
  140. ;
  141. if temp5 && _V0 then _V0 = _V0 - 1
  142.  
  143. ;```````````````````````````````````````````````````````````````
  144. ; Decreases the frequency variable.
  145. ; DM edited this to decend through the pitches - strangely by changing - to +
  146. if _F0 then _F0 = _F0 + 1
  147.  
  148. ;```````````````````````````````````````````````````````````````
  149. ; Jumps to end of channel 0 area.
  150. ;
  151. goto __Skip_Channel_0
  152.  
  153. __Skip_Chan0_Sound_004
  154.  
  155.  
  156.  
  157. ;***************************************************************
  158. ;
  159. ; Channel 0 sound effect 5.
  160. ;
  161. ; The tone, volume, and frequency changes.
  162. ;
  163. ;```````````````````````````````````````````````````````````````
  164. ; If sound 5 isn't on, skip this subsection.
  165. ;
  166. if _Sound0 <> 5 then goto __Skip_Chan0_Sound_005
  167.  
  168. ;```````````````````````````````````````````````````````````````
  169. ; Sets the tone, volume and frequency.
  170. ;
  171. AUDC0 = _C0 : AUDV0 = _V0 : AUDF0 = _F0
  172.  
  173. ;```````````````````````````````````````````````````````````````
  174. ; Flips the tone between 4 and 12.
  175. ;
  176. _C0 = _C0 ^ 8
  177.  
  178. ;```````````````````````````````````````````````````````````````
  179. ; Only looks at the even/odd bit.
  180. ;
  181. temp5 = _Chan0_Duration & %00000001
  182.  
  183. ;```````````````````````````````````````````````````````````````
  184. ; Decreases volume only when _Chan0_Duration is an odd number.
  185. ;
  186. if temp5 && _V0 then _V0 = _V0 - 1
  187.  
  188. ;```````````````````````````````````````````````````````````````
  189. ; Decreases the frequency variable.
  190. ;
  191. if _F0 then _F0 = _F0 - 1
  192.  
  193. ;```````````````````````````````````````````````````````````````
  194. ; Jumps to end of channel 0 area.
  195. ;
  196. goto __Skip_Channel_0
  197.  
  198. __Skip_Chan0_Sound_005
  199.  
  200.  
  201.  
  202. ;***************************************************************
  203. ;
  204. ; Other channel 0 sound effects go here.
  205. ;
  206. ;***************************************************************
  207.  
  208.  
  209.  
  210. ;***************************************************************
  211. ;
  212. ; Jumps to end of channel 0 area. (This catches any mistakes.)
  213. ;
  214. goto __Skip_Channel_0
  215.  
  216.  
  217.  
  218. ;***************************************************************
  219. ;
  220. ; Clears channel 0.
  221. ;
  222. __Clear_Channel_0
  223.  
  224. ;```````````````````````````````````````````````````````````````
  225. ; Turns off channel 0 sound variable and mutes channel.
  226. ;
  227. _Sound0 = 0 : AUDV0 = 0
  228.  
  229.  
  230.  
  231. ;***************************************************************
  232. ;
  233. ; End of channel 0 area.
  234. ;
  235. __Skip_Channel_0
  236.  
  237. goto sprites
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement