From 5ffb4a5d2c9f6b04263aaf3a3a750d1a6826e7a5 Mon Sep 17 00:00:00 2001 From: nstbayless Date: Sun, 28 Jul 2024 08:30:30 -0700 Subject: [PATCH] minimum vcancel --- _common.asm | 2 ++ _custom_jump.asm | 4 ++++ patch-jp.asm | 3 +-- patch-us.asm | 3 +-- 4 files changed, 8 insertions(+), 4 deletions(-) create mode 100644 _common.asm 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...