Advertisement
Zeldara109

autosave-asar.asm

Mar 3rd, 2019
589
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. ; Alcaro's old autosave patch, xkas->asar conversion
  2. ; This patch autosaves whenever you gain control on the overworld, such as after clearing a level, dying, or walking to another level
  3.  
  4. !bank = $800000
  5.  
  6. org $04920F|!bank
  7. LDX #$2C
  8. autoclean JSL Autosave
  9. JSR.w $9037
  10. LDX $0DD5
  11. BEQ NotAutoWalk
  12. LDA.w $905F,x
  13. STA $08
  14. STZ $09
  15. REP #$30
  16. LDX $04
  17. LDA $7ED000,x
  18. AND #$00FF
  19. LDY #$000A
  20. -
  21. CMP.w $906C,y
  22. BNE +
  23. JMP $9411
  24. NOP #1
  25. +
  26. DEY
  27. DEY
  28. BPL -
  29.  
  30. org $04925A|!bank
  31. NotAutoWalk:
  32.  
  33. org $04904F|!bank
  34. JSL $009BC9|!bank ;autosave, don't show save prompt
  35. NOP
  36.  
  37. org $04903F|!bank
  38. BEQ $00 ;save even on levels that have already been beaten
  39.  
  40. freedata
  41.  
  42. Autosave:
  43. -
  44. LDA $1F02,x
  45. STA $1FA9,x
  46. DEX
  47. BPL -
  48. RTL
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement