F6 Help...

Started by Macopride64, April 11, 2013, 05:54:57 AM

Previous topic - Next topic

Macopride64

Game&Watch Black Costume Color Modifier [Macopride64]
284A646E 00006A22
F6000002 90809260
00000078 005E0000
00010003 0000012C
14000084 VVVVVV00
140000A0 XXXXXX00
1400B964 YYYYYY00
1400B980 ZZZZZZ00
E0000000 80008000

With the code above, I thought F6 would search once every time 0x804A646E = 6A22... but it doesn't. How can I make it search once every time 0x804A646E hits 6A22?

wiiztec

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

Macopride64

#2
Thanks for the link, wiiztec.

I've come up with this:

4E000028 00000000
30000000 F6000302
16000000 00000008
F6000002 90809260
E0000000 80008000

284A646E 00006A22
F6000002 90809260
00000078 005E0000
00010003 0000012C
14000084 VVVVVV00
140000A0 XXXXXX00
1400B964 YYYYYY00
1400B980 ZZZZZZ00
E0000000 80008000

When 804A646E = 6A22 it keeps searching over and over again. I want it to search once every time 804A646E = 6A22. Any ideas on how I could do that?

By the way, the activator is needed because FitGameWatch00.pac is loaded a few seconds after G&W is selected.

Bully@Wiiplaza

Quote from: Macopride64 on April 12, 2013, 11:27:20 AM
When 804A646E = 6A22 it keeps searching over and over again. I want it to search once every time 804A646E = 6A22. Any ideas on how I could do that?
Lagging your game is unavoidable this way. :/

There is a non-F6 solution though by doing a normal pointer search.
That may not be what you want, but I would prefer it.
No lag, no compares.
My Wii hacking site...
http://bullywiihacks.com/

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

~Bully

Macopride64

Quote from: Bully@Wiiplaza on April 12, 2013, 01:34:15 PM
Lagging your game is unavoidable this way. :/

There is a non-F6 solution though by doing a normal pointer search.
That may not be what you want, but I would prefer it.
No lag, no compares.

Well, I can't do that, Dolphin can't do pointers. :(


Anyway, back to the F6 method. I'm getting quite lost. I mean, this is stupid:

2877216E 00000009 #If game is on main menu
4E000020 00000000
16000000 00000028
F6000001 90809260
E0000000 80008000
20770C20 01A10002 #If map is archives
F6000001 90809260
47454F4D 01A10002
14001820 91BCB8A0
E0000000 80008000

When I boot up the game and go to the main menu, everything is fine, working just like I want. But after I play a game on Archives and return to the main menu, the F6 code keeps searching over and over again. How is this possible if the activator tells the F6 code to search when 80770C20 = 01A10002 (archives)? And why doesn't it happen the first time I go to the main menu?

By the way, this is a GoldenEye code.

Bully@Wiiplaza

You can, do a ram dump and use dr. pepper´s pointer search app. Easy.
My Wii hacking site...
http://bullywiihacks.com/

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

~Bully

dcx2

#6
An F6 code has three states, signified by the second to last byte.  F6000n01, n = state

1) uninitialized, n=0.  When the code handler encounters an uninitialized F6, it executes the search, and will replace n with either 3 or 1 depending on success or failure.

2) success, n=3.  The range parameter (second word of the code, XXXXYYYY) is replaced with a pointer.  The code handler will treat the F6 as a successful if code type ("code execution status set to true").  The F6 will also load po with the pointer.

3) failure, n=1.  The code handler will treat the F6 as a failed if code type ("code execution status set to false").  po is not changed.

In order to run the F6 again, you will need to reset n to 0 (and XXXXYYYY).  F6 was not intended to be used this way; it was intended to do one search and be done for the rest of the game.  But we're hackers and we never do stuff the way it was intended :)

If you don't want to search after a success, you can place some extra code after your 4E that checks for success or failure.  If success, don't reset F6 code.

---

So your code checks 8077216E = 9.  If so, it will automatically reset the F6, allowing it to search again.  Every single frame at the main menu will reset your F6.

Then, if 80770C20 = 01A10002, the F6 will execute.  If n=0, it will search.  If n=3, it will load po and execute your 14 code.

So on the main menu, your F6 is doing nothing.  You're constantly resetting it, but it won't execute because your 20 code is false.

Once you go to Archives, your 28 code is false and you stop resetting the F6.  The 20 code is true, the F6 searches, and every frame after that it executes your 14 code.

Once you leave Archives, 80770C20 is probably still 01A10002.  But now you're at the main menu, too.  So every frame, the 28 is true, the F6 is reset, the 20 is true, the F6 searches...and then the next frame, your 28 resets the F6, the 20 causes the F6 to search again...ad infinitum.

I would consider adding another 28 code that checks for NOT the main menu, right after your 20 code.  This will keep your F6 from executing on the main menu.

Macopride64

#7
Hmm, I didn't know that, Bully. Thanks.

I thought a Gecko was a must when it came to pointers.


Quote from: dcx2 on April 13, 2013, 08:08:01 PM
But we're hackers and we never do stuff the way it was intended :)
I hear that. :P

Thanks, dcx2. I'll look into this.


EDIT:
I tried a pointer, but that messed up the game. The code I posted (the code for GoldenEye) is a texture swap. The pointer code messed up the textures. Just like pointers mess up other stuff in GoldenEye. Any ideas on how this can be fixed?

Stupid address... You're right, dcx2. It the address was still on 01A10002, it shouldn't be on that... strange, lol. Anyway, I used another address for the if code, and all went good until the code froze when the F6 tried to reapply itself.