Breakpoint at 'monster seeing you' MH3

Started by Stuff, August 15, 2011, 07:33:03 AM

Previous topic - Next topic

Stuff

Monster Can't See You [Stuff]
041386BC 48000048

But I didn't arrive to this with what we discussed here. So you can say I learned very little from this thread. >.<

80138700 was a good candidate because it calls something that decides whether it spotted you because you hit it or it spotted you because it saw/sensed you. The reason I chose that other address was because noping 80138700 still let the monster sense your presence, it just wouldn't know your there. Like it saw you but you were cloaked in a smoke bombs. Between 0x6BC and 0x700 were a few bls that probably each did something about awareness so I preferred branching over all of them.

[spoiler]801386B4:  4828C161    bl   0x803c4814
801386B8:  2C030000   cmpwi   r3,0
801386BC:  48000048   b   0x80138704 ##was bne- 0x48
801386C0:  881D046A   lbz   r0,1130(r29)
801386C4:  2C000000   cmpwi   r0,0
801386C8:  4082003C   bne-   0x80138704  ##It might be better to poke this instead
801386CC:  7FA3EB78   mr   r3,r29
801386D0:  4800086D   bl   0x80138f3c
801386D4:  7FA3EB78   mr   r3,r29
801386D8:  4BFF760D   bl   0x8012fce4
801386DC:  7FA3EB78   mr   r3,r29
801386E0:  4BFF8A71   bl   0x80131150
801386E4:  7FA3EB78   mr   r3,r29
801386E8:  4BFF2F65   bl   0x8012b64c
801386EC:  7FA3EB78   mr   r3,r29
801386F0:  4BFF3705   bl   0x8012bdf4
801386F4:  7FA3EB78   mr   r3,r29
801386F8:  4BFF3F09   bl   0x8012c600
801386FC:  7FA3EB78   mr   r3,r29
80138700:  4BFF42AD   bl   0x8012c9ac
80138704:  7FA3EB78   mr   r3,r29
80138708:  4BFF999D   bl   0x801320a4[/spoiler]

The method I used to get to this code was the walk to blr you described in another thread. Walk to blr->step into-> nop the branch above and see what happens. This took 2 "walk to blr step into"s and a little experimenting to find the super caller. Walk to blr is awesomeness. I made a few codes for kirby today using this method.

Just trying to let you know that you didn't waste your time helping me with this only to see this code never happen. >.< Many thanks o.0b.
.make Stuff happen.
Dropbox. If you don't have one, get it NOW! +250MB free if you follow my link :p.

Mod code Generator ~50% complete but very usable:
http://dl.dropbox.com/u/24514984/modcodes/modcodes.htm

dcx2

You don't have to walk to blr.  This can be painful when there's a big loop.

There are two types of step out; "leaf" and "frame".  Leaf is what you use when the return address is already in the LR.  This is because leaf functions do not store the return address on the stack.  Frame is what you use when the return address is on the stack.  This is because most functions will push the LR onto the stack so they can call their own functions.

You can also just left-click Step Out.  It will attempt to guess whether the function is leaf or frame and go to the right caller.

You can also go to the disassembly tab and double-click the call stack list box.  It's a lot easier than walking the stack through the BP tab.

Stuff

Hmm. Interesting. Well it looks like I needed to go through a lesser method to see this.

80130788 ##BP
8012CBB8 ##The caller I arrived to first with walk to blr
80138700 ##And this is 80138700 that I just mentioned. My second walk to blr.

I can feel better about double clicking call stack now. So does Call Stack "Step Out"(not actually doing it) multiple times or something like that?
.make Stuff happen.
Dropbox. If you don't have one, get it NOW! +250MB free if you follow my link :p.

Mod code Generator ~50% complete but very usable:
http://dl.dropbox.com/u/24514984/modcodes/modcodes.htm

dcx2

Each stack frame has a pointer to the previous stack frame, generating a linked list of stack frames.  Immediately "below" this pointer is the LR save word for that frame.  The Call Stack is generated by traversing the linked list of stack frames and extracting the LR save word in each frame.

Stuff

ah. That is pretty cool. I just can't believe I had trouble understanding any of this. >.>
Still, I think I leveled up again today XD. Time to tackle potential codes I've left on queue.
.make Stuff happen.
Dropbox. If you don't have one, get it NOW! +250MB free if you follow my link :p.

Mod code Generator ~50% complete but very usable:
http://dl.dropbox.com/u/24514984/modcodes/modcodes.htm