Advertisement
Guest User

Untitled

a guest
May 26th, 2011
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. JMP Main : JMP Main : JMP Main : JMP Return : JMP Return : JMP Return : JMP Return
  2.  
  3.  
  4. Main:
  5. REP #$20 ; Set accumulator to 16-bit
  6. LDA $0F34 ; Load Coins
  7. CMP #$03E8 ;
  8. BCS Enough ;Branch if enough...
  9. SEP #$20 ;\
  10. LDY #$01 ;Otherwise solid
  11. LDA #$30
  12. STA $1693
  13. RTL
  14. Enough:
  15.  
  16. SEP #$20 ; set accumulator to 8-bit
  17. BEQ Return
  18. REP #$20 ;set accumulator to 16-bit again
  19. LDA $0F34 ; Load Coins
  20. SEC ;\
  21. SBC #$03E8 ;| Subtract 500 coins and store
  22. STA $0F34 ;/
  23. SEP #$20 ; set accumulator back to 8-bit
  24. LDY #$00 ;Act like 25...
  25. LDA #$25
  26. STA $1693
  27.  
  28. Shatter:
  29. PHY ;preserve map16 high
  30.  
  31. PHB ;need to change bank
  32. LDA #$02
  33. PHA
  34. PLB ;to 02
  35. LDA #$00 ;default shatter
  36. JSL $028663 ;shatter block
  37. PLB ;restore bank
  38. Vanish:
  39. LDA #$02 ;erase self
  40. STA $9C
  41. JSL $00BEB0 ;generate blank block
  42.  
  43. PLY ;restore map16 high
  44. RTL
  45. Return:
  46. RTL
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement