Advertisement
Domiok

Bonus Stars Patch v1.0

Oct 9th, 2015
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1.  
  2. org $00D0E6
  3. autoclean JSL BonusStars
  4. NOP
  5.  
  6. freecode
  7.  
  8. BonusStars:
  9. LDY.B #$0B ; Set Y (game mode) to x0B (Fade to overworld)
  10. LDX.W $0DB3 ; \ Get bonus stars
  11. LDA.W $0F48,X ; /
  12. CLC ; \
  13. ADC #$05 ; | Adds 5 bonus stars to the player's bonus stars
  14. STA $0F48,X ; /
  15. CMP.B #$64 ; \ If bonus stars is less than 100,
  16. BCC EndProcess ; / branch to $8F73
  17. LDA.B #$FF ; \ Start bonus game when the level ends
  18. STA.W $1425 ; /
  19. LDA.W $0F48,X ; \
  20. SEC ; |Subtract bonus stars by 100
  21. SBC.B #$64 ; |
  22. STA.W $0F48,X ; /
  23. LDY.B #$11 ; Set Y (game mode) to x11 (Fade to overworld)
  24.  
  25. EndProcess:
  26. LDA.W $0F31 ; \
  27. RTL
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement