Make a game load something else?

Started by wiiztec, November 22, 2009, 03:23:29 AM

Previous topic - Next topic

wiiztec

Is there a codetype that will tell the game when it tries to read a value at an address to read a different value at a different address?
If there's any code at all that you want to be button activated, or even able to toggle on & off, and I have the game, just PM me and I'll make it happen

Romaap

No, there is no codetype that does that.
But it is possible with ASM.

wiiztec

#2
lol the only thing I know about ASM is in your video about breakpoints

If there's any code at all that you want to be button activated, or even able to toggle on & off, and I have the game, just PM me and I'll make it happen

Almas

Find the address you want it to read from. Put a "read" breakpoint on this address. Make sure "specific value" or whatever is checked (that is, it doesn't break on addresses near your value).

Execute the breakpoint several times, checking to see exactly how many different addresses (this is the part at the bottom) read from your address. It may be the case that you have to insert assembly branches at more than one of them. If the address is only read from infrequently (e.g. it doesn't continually do it the moment you set up the breakpoint), then try navigating through menus, changing the circumstances etc. to try and discover any other places that may read it).

The "read" command will more than likely be of the form "lwz rx, n(rm)". Find a single safe register at the part you will be writing a branch to. Write a C2 branch codetype to this address. In it, use your safe register to load the address you want the value to be read from (e.g. if it is an absolute address 0x80581234 then we would have lis rs, 0x8058 ori rs, rs, 0x1234. For a relative address, use this to find the start of the tree then a series of lwz rs, p(rs) to go down it until you have your desired value), then have the last command be lwz rx, 0(rs).

If you don't understand that, watch the ASM video again. Not that I know what's in the ASM video. But it probably has enough.

wiiztec

I ended up using an easier but incomplete method of switching the names of 2 files to each other with the file system tree then going to the addresses in memory viewer and making GCT code lines out of all of them

I ended up with this

Final valley music switcher [wiiztec]
  057E96E0 62676D5F
  057E96E4 7374675F
  057E96E8 7368756D
  057E96EC 61747375
  057E96F0 5F67635F
  057E96F4 6763342E
  057E96F8 62727374
  057E96FC 6D006267
  057E9700 6D5F7374
  057E9704 675F7368
  057E9708 756D6174
  057E970C 73755F65
  057E9710 785F6578
  057E9714 312E6272
  057E9718 73746D00
  E0000000 80008000
switches the music that normally plays in the final valley stage for the music that plays when the match is Naruto vs Sasuke

When I set read breakpoint it broke when any stage was about to load and when I used exact match option it didn't break at all
If there's any code at all that you want to be button activated, or even able to toggle on & off, and I have the game, just PM me and I'll make it happen