multi 28 problem

Started by CrimsoN@DC, August 20, 2012, 12:09:35 AM

Previous topic - Next topic

CrimsoN@DC

Well, I found an address in wii plays Tanks! That removes all the marks left by your tank, by making the ground appear covered in those marks.  So I tried this:

28371D2A 00008000
040C1E80 60000000
E0000000 80008000
280C1E80 60000000
040C1E80 E0030000
E0000000 80008000

However, it won't work.  So I disabled the bottom half of the code, and activated it, it wasn't my button activator because it worked, so I applied the bottom half again and it read correctly, and turned the value back.  Why is this? O_o
Gotta question?  PM me and hopefully I can help ^^

My website:
Disturbed Core

Bully@Wiiplaza

Quote from: CrimsoN@DC on August 20, 2012, 12:09:35 AM
28371D2A 00008000 # Press Home to activate
040C1E80 60000000 # nop
E0000000 80008000 # terminator
280C1E80 60000000 # if code is nop´ed
040C1E80 E0030000 # write default instruction
E0000000 80008000 # terminator
What this basically does is, eliminate the code effect every time it´s about to take effect. Bad...
maybe you wanted this?

28371D2A 00008000
040C1E80 60000000
E2100000 00000000
040C1E80 E0030000
E0000000 80008000
If button isn´t pressed, disable code

Or:

28371D2A 00008000
040C1E80 60000000
CC000000 00000000
040C1E80 E0030000
E0000000 80008000
Press the button to toggle

Or:

28371D2A 00008000
040C1E80 60000000
28371D2B 0000ZZZZ
040C1E80 E0030000
E0000000 80008000
Press first button to enable, second to disable
My Wii hacking site...
http://bullywiihacks.com/

My youtube account with a lot of hacking videos...
http://www.youtube.com/user/BullyWiiPlaza

~Bully

CrimsoN@DC

Well the nop comes with a weird side effect of the game screen being stretched vertically, so we have to nop and un-nop to get the effect.   Perhaps I can write a small routine for this, with a delay between the application to the code, and the check.
Gotta question?  PM me and hopefully I can help ^^

My website:
Disturbed Core

dcx2

That's not how the code handler works...

Pretend there's a big while loop.

while (1) {
  CalculateNextFrameInfo();
  DrawNextFrame();
}

What the code handler does (usually, if using VBI hook), is it runs after the frame has drawn to the screen and while the Wii is wasting time waiting for the vertical blank to arrive.

while (1){
  CalculateNextFrame();
  DrawNextFrame();
  RunCodeHandler();
}

Note that ALL codes are executed in the code handler.  Then the game runs.  Then the code handler is executed again.

You want 800C1E80 to be one value when doing some calculations, but then you want it to be a different value for other calculations.  But you can't do that with standard code types.  The code handler runs, does your patches, and then ALL of the calculations are run.  Remember, the code handler runs "outside" of the game, so to speak.  It doesn't run inbetween calculations.

In order to make this work, you will need to use a C2 hook.  This will replace the ASM at 800C1E80 entirely.  Then, whenever 800C1E80 is executed, the game code will take a temporary detour to your hack while calculating the next frame.  This allows you to execute different things while the game is running, since those different things can't be executed when the code handler is running because the game isn't being executed at that moment.