I'm currently digging through the Super Smash Brother Brawl code to try to find out how to hook into the animations of characters to play animations at a specific frame count.
I've located the piece of code that controls the flow of code to advancing to the next frame of animation, or breaking to a new animation at 0x8077f180:
SUBI ------ r0, r3, 1
CNTLZW -- r0, r0
RLWINM. - r0, r0, 27, 5, 31
BEQ ------- 0x8077f224
(Take branch = Continue current animation)
The problem is, I have no idea how r3 is obtained in this case. The link register is to 8077f17c, right before the branch function, but I stepped through over 100 lines of assembly and didn't get back to 8077f180. Is there any quick function within Dolphin, or external program to trace the path between two breakpoints?
Just as an aside because I want to vent; why the h-- is Brawl compiled in such a way that standard pointers aren't used often. So much obfuscation with taking a pointer to some junk value like FFFFCCCC, rotating it with a mask, then doing an indexed load to get the address of an important value.
I've located the piece of code that controls the flow of code to advancing to the next frame of animation, or breaking to a new animation at 0x8077f180:
SUBI ------ r0, r3, 1
CNTLZW -- r0, r0
RLWINM. - r0, r0, 27, 5, 31
BEQ ------- 0x8077f224
(Take branch = Continue current animation)
The problem is, I have no idea how r3 is obtained in this case. The link register is to 8077f17c, right before the branch function, but I stepped through over 100 lines of assembly and didn't get back to 8077f180. Is there any quick function within Dolphin, or external program to trace the path between two breakpoints?
Just as an aside because I want to vent; why the h-- is Brawl compiled in such a way that standard pointers aren't used often. So much obfuscation with taking a pointer to some junk value like FFFFCCCC, rotating it with a mask, then doing an indexed load to get the address of an important value.