Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- dim rand16 = z
- dim sw = d
- dim debounce = e
- dim jf = f
- dim cntr = g
- gosub clear
- COLUPF = $4A
- COLUBK = $42
- debounce = $00
- main
- if cntr <> 32 then skip_fire
- temp1 = ((jf ^ $80) | INPT4) & $80 : jf = INPT4
- if temp1 then goto draw
- cntr = 0
- skip_fire
- sw = 0
- if cntr & $08 then sw = sw - 1
- temp1 = (cntr ^ $04) & $04
- if temp1 then sw = rand
- gosub debounce
- if cntr & $08 then pfpixel cntr 0 on else pfpixel cntr 0 off
- if sw & 1 then pfpixel cntr 1 on else pfpixel cntr 1 off
- if debounce & 1 then pfpixel cntr 2 off else pfpixel cntr 2 on
- if c & 1 then pfpixel cntr 4 on else pfpixel cntr 4 off
- if b & 1 then pfpixel cntr 5 on else pfpixel cntr 5 off
- if a & 1 then pfpixel cntr 6 on else pfpixel cntr 6 off
- cntr = cntr + 1
- draw
- drawscreen
- goto main
- debounce
- temp1 = sw ^ debounce
- rem reset counter
- b = b | temp1
- a = a | temp1
- rem increment counter
- b = b ^ a
- a = a ^ $FF
- rem if the counter has counted to three toggle debounce
- debounce = (b & a) ^ debounce
- return
- clear
- playfield:
- ................................
- ................................
- ................................
- ................................
- ................................
- ................................
- ................................
- ................................
- ................................
- ................................
- ................................
- ................................
- end
- return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement