Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;Pseudonym's Duckwalking Patch Bugfix
- ;By: Chdata/Fakescaper
- ;
- ;Bugs Fixed:
- ;You'd always face left after ducking
- ;If you duck and jump your left and right movements were really slow
- ;Probably three other things but I forgot of the origional had these problems
- header
- lorom
- !Freespace = $9B8000
- org $8F49 ;hook here
- JSL Maincode
- org !Freespace
- db "STAR"
- dw Endcode-Maincode-1
- dw Endcode-Maincode-1^-1
- Maincode:
- LDA $73 ;Mario is ducking flag
- BEQ .Return ;If you're not ducking return
- LDA $77 ;If you're
- AND #$04 ;not blocked from below
- BEQ .Return ;return
- LDA $187A ;If riding Yoshi
- BNE .Return ;Return
- ;INC $0EF9 ;Random Indicator that this code is running
- LDA $15 ;01=Right, 02=Left
- AND #$03 ;Only keep Left and Right values
- BEQ .Return ;If not pressing either return
- CMP #$03 ;If you're pressing both buttons
- BEQ .Return ;Return
- LSR A ;Bitshift Left -->
- TAX ;A into X
- LDA XSpeeds,x ;Get Xspeeds
- STA $7B ;Store to Mario's Xspeed adress
- LDA $7B ;Mario's Xspeed
- BPL .Righto ;If Plus (80-FF) you're moving to the right
- STZ $76 ;00=Left
- BRA .Return ;And Return
- .Righto ;Moving to the right
- LDA #$01 ;01=Right
- STA $76 ;Face Right
- .Return ;And return
- LDA.w $0DBE ;Replaced code
- INC A ;Replaced code
- LDX #$10 ;Replaced code
- LDY #$00 ;Replaced code
- RTL ;Return
- XSpeeds: ;Left & Right
- db $08,$F7 ;If you don't want Mario's "Sliding Dust" to appear, use the values... db $07,$F8
- Endcode:
- print "I'm psychic, I knew that you would patch this."
- print "-Chdata-"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement