Skip to content

Commit

Permalink
labelling WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
nstbayless committed Jul 22, 2024
1 parent 343ca15 commit d7263ad
Show file tree
Hide file tree
Showing 4 changed files with 140 additions and 66 deletions.
70 changes: 39 additions & 31 deletions patch.asm
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ BANK $5
BASE $8000

FROM $BF07
staircheck:
LDY #$00
STY hspfra
LDA vspint
Expand All @@ -31,29 +32,29 @@ 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:
DB $00,$80,$C0,$40
Table_BF44:
DB $80,$00,$40,$C0

After_Table_FB44
disp_check_diagonals:
LDA Table_BF40,X
STA $11
LDA Table_BF44,X
Expand All @@ -63,7 +64,7 @@ After_Table_FB44
LDY #$58
LDA #$07
JMP $FFCA
LBF5D:
land:
LDA #$12
STA simon_state
LDX #$0A
Expand Down Expand Up @@ -138,10 +139,10 @@ BANK $7
BASE $8000

FROM $BF55
LBF55:
__return_false:
CLC
RTS
LBF57:
__return_true:
SEC
RTS
LDX $06
Expand Down Expand Up @@ -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:
Expand All @@ -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
Expand Down Expand Up @@ -270,6 +271,7 @@ FROM $95F1
DB $D0,$04
NOP
NOP
__walk_to_stair_right
FROM $9629
LDA #$FF
Expand Down Expand Up @@ -333,6 +335,7 @@ FROM $A5A3
FROM $BF39
LDA #$01
STA hspint,X
custom_jump:
LDA #$97
PHA
LDA #$76
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -423,6 +430,7 @@ LBFDA:
RTS
LBFE6:
JMP $9A43
crouch_direction:
LDA control_held
LSR A
BCC LBFF3
Expand Down
Binary file added pre_stair_patch.ips
Binary file not shown.
66 changes: 66 additions & 0 deletions pre_stair_patch.txt
Original file line number Diff line number Diff line change
@@ -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
70 changes: 35 additions & 35 deletions working.nes.E.nl
Original file line number Diff line number Diff line change
@@ -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#

0 comments on commit d7263ad

Please sign in to comment.