Advertisement
MolSno

you can do the duckwalk! cool!

Jan 3rd, 2013
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.52 KB | None | 0 0
  1. ;Pseudonym's Duckwalking Patch Bugfix
  2. ;By: Chdata/Fakescaper
  3. ;
  4. ;Bugs Fixed:
  5. ;You'd always face left after ducking
  6. ;If you duck and jump your left and right movements were really slow
  7. ;Probably three other things but I forgot of the origional had these problems
  8.  
  9. header
  10. lorom
  11.  
  12. !Freespace = $9B8000
  13.  
  14. org $8F49 ;hook here
  15. JSL Maincode
  16.  
  17. org !Freespace
  18. db "STAR"
  19. dw Endcode-Maincode-1
  20. dw Endcode-Maincode-1^-1
  21.  
  22. Maincode:
  23. LDA $73 ;Mario is ducking flag
  24. BEQ .Return ;If you're not ducking return
  25. LDA $77 ;If you're
  26. AND #$04 ;not blocked from below
  27. BEQ .Return ;return
  28. LDA $187A ;If riding Yoshi
  29. BNE .Return ;Return
  30. ;INC $0EF9 ;Random Indicator that this code is running
  31. LDA $15 ;01=Right, 02=Left
  32. AND #$03 ;Only keep Left and Right values
  33. BEQ .Return ;If not pressing either return
  34. CMP #$03 ;If you're pressing both buttons
  35. BEQ .Return ;Return
  36. LSR A ;Bitshift Left -->
  37. TAX ;A into X
  38. LDA XSpeeds,x ;Get Xspeeds
  39. STA $7B ;Store to Mario's Xspeed adress
  40. LDA $7B ;Mario's Xspeed
  41. BPL .Righto ;If Plus (80-FF) you're moving to the right
  42. STZ $76 ;00=Left
  43. BRA .Return ;And Return
  44. .Righto ;Moving to the right
  45. LDA #$01 ;01=Right
  46. STA $76 ;Face Right
  47. .Return ;And return
  48. LDA.w $0DBE ;Replaced code
  49. INC A ;Replaced code
  50. LDX #$10 ;Replaced code
  51. LDY #$00 ;Replaced code
  52. RTL ;Return
  53. XSpeeds: ;Left & Right
  54. db $08,$F7 ;If you don't want Mario's "Sliding Dust" to appear, use the values... db $07,$F8
  55. Endcode:
  56. print "I'm psychic, I knew that you would patch this."
  57. print "-Chdata-"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement