Advertisement
Zeldara109

Teleport when pressing A or B, with sound effect

Sep 22nd, 2016
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. level13C: ; teleport when pressing A or B, with sound effect
  2. LDA #$FF ;\ disable pausing
  3. STA $13D3 ;/
  4. LDA $15 ; load controller data 1
  5. AND #$80 ; filter out only "A or B" bit
  6. BNE TeleportToScreenExit
  7.  
  8. STZ $15 ;\
  9. STZ $16 ;| zero out controller data
  10. STZ $17 ;|
  11. STZ $18 ;/
  12. DontTeleport:
  13. RTS
  14.  
  15. TeleportToScreenExit:
  16. LDA #$15 ;\ play sound effect (path revealed)
  17. STA $1DFC ;/
  18. LDA #$06 ;\
  19. STA $71 ;| teleport
  20. STZ $88 ;|
  21. STZ $89 ;/
  22. RTS
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement