diff --git a/patch.asm b/patch.asm index 92004b3..842d425 100644 --- a/patch.asm +++ b/patch.asm @@ -9,6 +9,7 @@ BANK $5 BASE $8000 FROM $BF07 +staircheck: LDY #$00 STY hspfra LDA vspint @@ -31,21 +32,21 @@ LBF12: NOP NOP LDX #$00 -LBF2A: +stair_loop_start: TXA PHA - JSR After_Table_FB44 + JSR disp_check_diagonals PLA - BCC LBF38 + BCC + CMP #$02 BPL LBF9A - BMI LBF5D -LBF38: + BMI land ++ NOP TAX INX CPX #$04 - BMI LBF2A + BMI stair_loop_start RTS Table_BF40: @@ -53,7 +54,7 @@ Table_BF40: Table_BF44: DB $80,$00,$40,$C0 -After_Table_FB44 +disp_check_diagonals: LDA Table_BF40,X STA $11 LDA Table_BF44,X @@ -63,7 +64,7 @@ After_Table_FB44 LDY #$58 LDA #$07 JMP $FFCA -LBF5D: +land: LDA #$12 STA simon_state LDX #$0A @@ -138,10 +139,10 @@ BANK $7 BASE $8000 FROM $BF55 -LBF55: +__return_false: CLC RTS -LBF57: +__return_true: SEC RTS LDX $06 @@ -195,9 +196,9 @@ LBF87: LDA (stairs),Y AND #$F0 CMP $11 - BEQ LBF55 + BEQ $BF55 CMP $12 - BEQ LBF57 + BEQ $BF57 LBFB2: INY LBFB3: @@ -214,14 +215,14 @@ LBFB7: BEQ LBFCA SEC SBC #$01 - BCC LBF55 + BCC $BF55 BCS LBFD2 LBFCA: CLC ADC #$01 NOP CMP #$0F - BPL LBF55 + BPL $BF55 LBFD2: STA tmp_y LDA tmp_x @@ -270,6 +271,7 @@ FROM $95F1 DB $D0,$04 NOP NOP +__walk_to_stair_right FROM $9629 LDA #$FF @@ -333,6 +335,7 @@ FROM $A5A3 FROM $BF39 LDA #$01 STA hspint,X +custom_jump: LDA #$97 PHA LDA #$76 @@ -342,22 +345,24 @@ LBF44: LDY #$00 LDA control_held AND #$03 - BEQ LBFC0 + BEQ hstall JSR $9769 - BEQ LBFAA + BEQ check_vstall LSR A - BCC LBF5C + BCC __turn_left +__turn_right: INY STY hspint DEY -LBF5C: - BEQ LBF99 +__turn_left: + BEQ __jumping_contd DEY STY hspint LDY #$01 - BPL LBF99 + BPL __jumping_contd +custom_knockback: LDA $4A - BEQ LBF93 + BEQ __return_to_knockback LDA vspint BMI LBF88 LDA #tmp_y @@ -372,24 +377,24 @@ LBF5C: LDA #$16 STA imgsin LBF88: - JMP LBF93 + JMP __return_to_knockback LBF8B: LDA #$1C STA vsp_control LDA $A689,Y -LBF93: +__return_to_knockback: LDA #tmp_y LDY hspint RTS -LBF99: +__jumping_contd: LDA simon_state CMP #tmp_y - BNE LBFAA + BNE check_vstall LDA imgsin CMP #$10 - BEQ LBFAA + BEQ check_vstall STY facing -LBFAA: +check_vstall: LDA control_held AND #$80 BNE LBFBF @@ -401,20 +406,22 @@ LBFAA: STA vspint LBFBF: RTS -LBFC0: +hstall: STA hspint - JMP LBFAA + JMP check_vstall +jumping_attack: JSR LBF44 JMP $97A3 +stair_jumping: LDA control_pressed AND #$80 - BEQ LBFDA + BEQ __recover_step LDA #$06 STA simon_state PLA PLA RTS -LBFDA: +__recover_step: LDA simon_state CMP #$14 BEQ LBFE6 @@ -423,6 +430,7 @@ LBFDA: RTS LBFE6: JMP $9A43 +crouch_direction: LDA control_held LSR A BCC LBFF3 diff --git a/pre_stair_patch.ips b/pre_stair_patch.ips new file mode 100644 index 0000000..106ccf6 Binary files /dev/null and b/pre_stair_patch.ips differ diff --git a/pre_stair_patch.txt b/pre_stair_patch.txt new file mode 100644 index 0000000..6887bd9 --- /dev/null +++ b/pre_stair_patch.txt @@ -0,0 +1,66 @@ +====== IPS summary ====== +hunks: 12 +regular hunks: 12 +RLE hunks: 0 +sum of hunk lengths: x000000FD bytes (253 bytes) +========= hunks ========= + +regular hunk on bytes x038348-x03834C (5 bytes) +EA EA 20 66 BF + + +regular hunk on bytes x03938E-x03938F (2 bytes) +3E BF + + +regular hunk on bytes x039440-x039441 (2 bytes) +C6 BF + + +regular hunk on bytes x0394DA-x0394DB (2 bytes) +C6 BF + + +regular hunk on byte x039760 (1 byte) +08 + + +regular hunk on bytes x039767-x039786 (32 bytes) +1C 9D D8 05 A9 00 9D C1 05 A9 16 8D 00 04 A9 00 +8D 09 05 60 FF FF FF FF FF 60 FF FF FF FF FF FF + + +regular hunk on bytes x039931-x039932 (2 bytes) +E9 BF + + +regular hunk on bytes x0399B4-x0399B7 (4 bytes) +20 CC BF EA + + +regular hunk on bytes x039ABC-x039ABD (2 bytes) +CC BF + + +regular hunk on bytes x039C31-x039C32 (2 bytes) +3E BF + + +regular hunk on bytes x03A5B3-x03A5B4 (2 bytes) +3E BF + + +regular hunk on bytes x03BF49-x03C00D (197 bytes) +A9 01 9D F2 04 A9 97 48 A9 76 48 20 65 97 A5 2A +29 03 F0 73 4A 90 0C A0 00 A2 01 8E F2 04 10 40 +4A 90 4E A0 01 A2 FF 8E F2 04 4C 99 BF A5 4A F0 +29 AD 20 05 30 19 A9 08 8D 65 05 A5 49 F0 13 A5 +48 C9 02 D0 0D A9 38 8D D8 05 A9 16 8D 00 04 4C +93 BF A9 1C 8D D8 05 B9 89 A6 A9 08 AC F2 04 60 +AD 65 05 C9 08 D0 0A AD 00 04 C9 10 F0 03 8C A8 +04 A5 2A 29 80 D0 0F AD 20 05 10 0A A9 1C 8D D8 +05 A9 00 8D 20 05 60 8D F2 04 4C AA BF 20 44 BF +4C A3 97 A5 28 29 80 F0 08 A9 06 8D 65 05 68 68 +60 AD 65 05 C9 14 F0 05 A5 2A 29 40 60 4C 43 9A +A5 2A 4A 90 05 A2 00 8E A8 04 4A 90 05 A2 01 8E +A8 04 4C 0C 84 diff --git a/working.nes.E.nl b/working.nes.E.nl index a1793e5..eda9492 100755 --- a/working.nes.E.nl +++ b/working.nes.E.nl @@ -1,48 +1,48 @@ $81FE#Getting hit# $823A#... which way for knockback# $8307#knockback step# -$BF3E#custom jump# +$8723#adjust x if no effect prevents# +$874B#(directly adjust x)# +$88F2#custom fall# +$936C#move..?# +$942F#attack# +$94C9#jump attack step# +$952D#standing step:# +$95BF#.. up (climb stairs)# +$95EF#.. walk to stair (left)# +$95F5#.. walk to stair (right)# +$9624#begin jump# +$965F#CCCCCCCCCCCCCCCCC# +$9662#BBBBBBBBBBBBBBBBB# +$9663#AAAAAAAAAAAAAA# +$9765#zero hspfra# +$9769#air control direction# +$976A#BBBBBBBBBBBBBBBBBBBB# +$976B#load jump direction control# +$9770#AAAAAAAAAAAAAAAAAAAAAA# +$9776#CCCCCCCCC# $9777#jump step# -$98C6#adjust not-y, vspint (always)# +$97A3#.. not ncsly. air-attacking# +$97AD#.. moving left# +$97C1#..moving right# $9856#adjust vspint# +$98C6#adjust not-y, vspint (always)# $98FB#adjust vspint# $9900#check max velocity# +$9920#crouching# +$99A4#stair idle# +$9AAB#stair move# $9F20#grant jump# -$942F#attack# +$B8E4#thrown dagger# +$BF3E#custom jump# +$BF57#.. turn right# +$BF5C#.. turn left# +$BF66#custom knockback# +$BF93#.. return to knockback# $BF99#jumping (continued)# -$BFC0#hstall# $BFAA#check vstall# +$BFC0#hstall# $BFC6#jumping attack# $BFCC#stair jumping# -$9AAB#stair move# $BFDA#.. recover step# -$936C#move..?# -$9920#crouching# -$BFE9#crouch direction# -$88F2#custom fall# -$9624#begin jump# -$BF66#custom knockback# -$BF93#.. return to knockback# -$9765#zero hspfra# -$94C9#jump attack step# -$B8E4#thrown dagger# -$9770#AAAAAAAAAAAAAAAAAAAAAA# -$976B#load jump direction control# -$976A#BBBBBBBBBBBBBBBBBBBB# -$9776#CCCCCCCCC# -$BF57#.. turn right# -$9769#air control direction# -$BF5C#.. turn left# -$97A3#.. not ncsly. air-attacking# -$97C1#..moving right# -$874B#(directly adjust x)# -$8723#adjust x if no effect prevents# -$97AD#.. moving left# -$95F5#.. walk to stair (right)# -$95EF#.. walk to stair (left)# -$95BF#.. up (climb stairs)# -$9663#AAAAAAAAAAAAAA# -$9662#BBBBBBBBBBBBBBBBB# -$965F#CCCCCCCCCCCCCCCCC# -$952D#standing step:# -$99A4#stair idle# +$BFE9#crouch direction# \ No newline at end of file