WiiRd forum

Wii & Gamecube Hacking => Wii Game hacking help => Topic started by: Deathwolf on July 18, 2010, 12:18:28 AM

Title: 4E Codetype
Post by: Deathwolf on July 18, 2010, 12:18:28 AM
what does 4E pointer codetype do? ???

4E000000 00000000 =
po
points to next code's first 32bits.

4E000004 00000000 =
po
points to next code's second 32bits.

please a example on a real code.


thanks

Title: Re: 4E Codetype
Post by: James0x57 on July 18, 2010, 01:41:22 AM
http://geckocodes.org/index.php?arsenal=1&ct=4e

You know where the codes go in memory when they're being used? THAT is the address the code grabs. A code example wouldn't really help.

4E is useful for modifying the code itself in memory.
Title: Re: 4E Codetype
Post by: dcx2 on July 18, 2010, 03:56:00 AM
My Mario Size Roller uses the 4E code type to turn the CC code type into a one-shot.  Without it, Mario would keep growing or shrinking while the button was pressed, instead of just only growing or shrinking once per press.

The trick is that the CC code type actually has 4 states.  0 = on and 1 = off, but there's also 2 = on and if is true, 3 = off and if is true.  So what I do is start with a CC code that's off = 1.  Then, when the button activator becomes true, the code handler modifies the CC code so that it's 2 = on and if is true.  However, my code then over-writes the 2 with a 3 = off and if is true.  This prevents the code from being run again.

The 4E code type makes the po point at the part of the CC code type that I want to change.

4E00000C 00000000
28750A02 00004002
CC000000 00000001
14000000 00000003
....
E0000000 80008000
Title: Re: 4E Codetype
Post by: Deathwolf on July 18, 2010, 09:17:11 AM
hmm does it also works with a health code?

4E00XXXX 00000000
14355193 000000XX
E0000000 80008000
Title: Re: 4E Codetype
Post by: James0x57 on July 18, 2010, 11:17:57 AM
Health Address at 80355190
4E000004 00000000 //set po to next red colored text's address
14000008 000000XX //write at po + 8 (the next green colored text), this value
04355190 11223344 //write green value to blue 32 bit address
E0000000 80008000 //reset ba and po to 80000000

So you could use this to change the value of the health that gets written if you added more lines. 11223344 never gets put as the health. Whatever value 000000XX is will be the health.
Title: Re: 4E Codetype
Post by: Deathwolf on July 18, 2010, 11:36:10 AM
okay thanks