diff --git a/_common.asm b/_common.asm new file mode 100644 index 0000000..3a70158 --- /dev/null +++ b/_common.asm @@ -0,0 +1,2 @@ +VSP_CONTROL_ZERO_VSPEED=$1C +MINIMUM_VSP_CANCEL=$0E \ No newline at end of file diff --git a/_custom_jump.asm b/_custom_jump.asm index e786b81..7444160 100644 --- a/_custom_jump.asm +++ b/_custom_jump.asm @@ -97,6 +97,10 @@ check_vcancel: BNE __vcancel_rts LDA vspint ; already moving downward? BPL __vcancel_rts + lda vsp_control + cmp #MINIMUM_VSP_CANCEL + bcc __vcancel_rts + LDA #VSP_CONTROL_ZERO_VSPEED STA vsp_control diff --git a/patch-jp.asm b/patch-jp.asm index f51e517..2b0ecb1 100644 --- a/patch-jp.asm +++ b/patch-jp.asm @@ -4,8 +4,7 @@ include "pre.asm" include "ram-jp.asm" include "offsets-jp.asm" - -VSP_CONTROL_ZERO_VSPEED=$1C +include "_common.asm" MACRO BANKSWAP bank lda #bank diff --git a/patch-us.asm b/patch-us.asm index e04a04e..d4c88e2 100644 --- a/patch-us.asm +++ b/patch-us.asm @@ -4,8 +4,7 @@ include "pre.asm" include "ram-us.asm" include "offsets-us.asm" - -VSP_CONTROL_ZERO_VSPEED=$1C +include "_common.asm" MACRO BANKSWAP bank ; unclear why we | $80, but everyone else is doing it...