I saw the very useful tutoiral at http://wiird.l0nk.org/forum/index.php/topic,2582.0.html (http://wiird.l0nk.org/forum/index.php/topic,2582.0.html). However, how would you determine the HEX code associated with the ASM code for detecting when a particular button is pressed? For example, I want to perform a search that finds all addresses with the HEX representation of the ASM code that detects/checks for the C button on the nunchuk being pressed. Is this possible?
Are you trying to, for example, find the jump code by seeing who reads the jump button? Or something to that effect?
Well, there are multiple copies of the button states in memory, but even if you knew which copy the game was looking at...the machine code (I believe you call this "HEX code/representation") depends on several things, like type of load it's doing, what register is holding the pointer, what register the value will go into, and the pointer offset. If you knew the game was using, for example, lha r0,16(r3) to load the button states into r0, then you could search memory for that instruction. Now, the button states are *probably* loaded with lha. You might be able to guess the offset. But the registers they use will change based on the whims of the compiler, so you probably can't figure out what registers they're using. Your best bet would be setting Read breakpoints on the memory, and hoping that they're reading the copy that you're breaking on (remember those multiple copies?)
Thanks again!