branch subroutines for n.gief:
0886ba bsr $88ad4 --> ppp
0886be bsr $88b4c --> kkk
0886c2 bsr $88826 --> fab
0886c6 bsr $88c48 --> spd
0886ca bsr $88ef0 --> rgb/suplex
not 100% sure but 99% sure that these are the respective special moves for each routine, green hand rountines appear to be right after these BSRs, 5 or so debugger lines below.
By debugging inside some of these brunches i started to understand how some certain stuff works:
Memory addresses ff87e0 and ff87e2 are “2 byte words” that hold the current frame and the past frame inputs, respectively.
So, if ff87e4 is different from ff87e0, it means that some button was released or pressed during that frame transition.
The less significant algarism is the direction ( 1 = right, 2 = left, up = 8, sum directiosn to get diagonals etc…). The second less significative algarism is the punch button (1 = jab, 2 = strong, 4 = fierce, sum them for the combination, for example 7 means that PPP is being pressed) and the third is kick (works the same as the punch one) and the most significative is apparently not used.
So, if ff87e0 is holding a value of 0701 and ff87e2 has a value of 0700 it means that the player stopped holding right, while holding kkk the whole time.
Memory references to $392,A6 or $394,A6 are checks to the inputs mentioned above. (A6 usually contains the address FF844E, plus offset 392 = ff87e0 which is the addres mentioned above)
Now, going inside the ppp subroutine:
088ad4 move.w ($394,A6), D0 --reference to past input frame
088ad8 not.w D0
088ada and.w ($392,A6), D0 --reference to current input frame
088ade andi.w #$70, D0
088ae2 cmpi.w #$70, D0 – checks register value D0 with 70, which means that PPP is pressed
088ae6 bne $88b0e
on these instructions the game is checking if the the player just pressed PPP on that frame, and then it doesnt branch on the bne instruction…
This is quite fun to mess with, i will continue tomorrow, going to bed now.