-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2f8aefe
commit ddee96e
Showing
12 changed files
with
449 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
_custom_jump: | ||
if CUSTOM_JUMP_BANK == PLAYER_UPDATE_BANK | ||
jsr rts_if_cutscene | ||
JSR zero_hspfra | ||
else | ||
; return if in cutscene | ||
lda cutscene_timer | ||
beq __continue | ||
lda cutscene_input | ||
beq __continue | ||
rts | ||
__continue | ||
|
||
; zero out fractional hspeed | ||
lda #$00 | ||
sta hspfra | ||
endif | ||
LDA joypad_down | ||
AND #$03 ; 1=right, 2=left | ||
BEQ hcancel | ||
LSR A | ||
BCC air_control_left | ||
air_control_right: | ||
; if left and right, hcancel | ||
LSR A | ||
BCS hcancel | ||
; standard right | ||
LDY #$00 | ||
LDX #$01 | ||
STX hspint | ||
BPL __jumping_contd ; guaranteed | ||
air_control_left: | ||
LDY #$01 | ||
LDX #$FF | ||
STX hspint | ||
__jumping_contd | ||
|
||
; decide whether or not to set facing | ||
LDA simon_state | ||
CMP #8 ; jumping | ||
BNE check_vcancel | ||
LDA imgsin | ||
CMP #$10 | ||
set_facing: | ||
BEQ check_vcancel | ||
STY facing | ||
BNE check_vcancel ; guaranteed | ||
hcancel: | ||
STA hspint | ||
check_vcancel: | ||
LDA joypad_down | ||
AND #$80 ; holding jump button? | ||
BNE __vcancel_rts | ||
LDA vspint ; already moving downward? | ||
BPL __vcancel_rts | ||
LDA #VSP_CONTROL_ZERO_VSPEED | ||
STA vsp_control | ||
LDA #$00 | ||
STA vspint | ||
__vcancel_rts: | ||
RTS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
_custom_knockback: | ||
; if 0 hp, do normal knockback | ||
LDA hitpoints | ||
BEQ __return_to_knockback | ||
|
||
LDA vspint | ||
BMI custom_knockback_moving_upward | ||
|
||
LDA #8 ; jumping | ||
STA simon_state | ||
LDA $49 | ||
BEQ custom_knockback_moving_upward | ||
LDA $48 | ||
CMP #$02 | ||
BNE custom_knockback_moving_upward | ||
LDA #$38 | ||
STA vsp_control | ||
LDA #$16 | ||
STA imgsin | ||
JMP __return_to_knockback | ||
|
||
custom_knockback_moving_upward: | ||
LDA #VSP_CONTROL_ZERO_VSPEED | ||
STA vsp_control | ||
LDA $A689,Y | ||
__return_to_knockback: | ||
; resolve detour | ||
LDA #8 | ||
LDY hspint | ||
RTS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,29 @@ | ||
BASE=base.nes | ||
SRC=patch.asm | ||
BASE=base | ||
SRC=patch | ||
OUT=out | ||
|
||
echo "INCNES \"$BASE\"" > inc-base.asm | ||
which asm6f > /dev/null | ||
if [ $? != 0 ] | ||
then | ||
echo "asm6f is not on the PATH." | ||
continue | ||
fi | ||
builds=("us" "jp") | ||
|
||
asm6f -c -n -i "-dUSEBASE" "$SRC" "$OUT.nes" | ||
for build in "${builds[@]}"; do | ||
if [ ! -f $BASE-$build.nes ]; then | ||
echo "no base: $BASE-$build.nes" | ||
continue | ||
fi | ||
echo "INCNES \"$BASE-$build.nes\"" > inc-base.asm | ||
which asm6f > /dev/null | ||
if [ $? != 0 ] | ||
then | ||
echo "asm6f is not on the PATH." | ||
continue | ||
fi | ||
|
||
if [ $? != 0 ] | ||
then | ||
echo "error building." | ||
exit | ||
fi | ||
asm6f -c -n -i "-dUSEBASE" "-dBUILD_${build^^}" "$SRC-$build.asm" "$OUT-$build.nes" | ||
|
||
ipsnect "$OUT.ips" > "$OUT.map" | ||
if [ $? != 0 ] | ||
then | ||
echo "error building." | ||
exit | ||
fi | ||
|
||
ipsnect "$OUT-$build.ips" > "$OUT-$build.map" | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
detour_to_custom_knockback=$8338 | ||
standard_crouch=$9920 | ||
trevor_jump_table=$9376 | ||
attack=$942F | ||
jump_attack_step=$94C9 | ||
set_fall_state=$974F | ||
fall_adjust=$9756 | ||
standard_jump=$9777 | ||
standard_stair_idle=$99A4 | ||
standard_stair_walk=$9AAB | ||
sypha_jumptable=$9C19 | ||
alucard_jumptable=$A59B | ||
empty_bank_e=$BF39 | ||
setAndSaveLowerBank=$E2D0 | ||
PLAYER_UPDATE_BANK=$E | ||
CUSTOM_JUMP_BANK=$E |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
detour_to_custom_knockback=$834D | ||
standard_crouch=$9919 | ||
trevor_jump_table=$9381 | ||
attack=$943A | ||
jump_attack_step=$94D4 | ||
set_fall_state=$9748 | ||
fall_adjust=$974F | ||
standard_jump=$9770 | ||
standard_stair_idle=$998E | ||
standard_stair_walk=$9A93 | ||
sypha_jumptable=$9C02 | ||
alucard_jumptable=$A5B4 | ||
empty_bank_e=$BFAB | ||
empty_bank_0=$BED0 ; we actually can go a bit earlier | ||
setAndSaveLowerBank=$E2E6 | ||
PLAYER_UPDATE_BANK=$E | ||
CUSTOM_JUMP_BANK=$0 |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.