Pikmin [GPIE01] (NTSC-U)

Started by goemon_guy, July 15, 2011, 09:05:17 PM

Previous topic - Next topic

goemon_guy

Pikmin 1.0
GPIE01

Infinite and Max Blue Pikmin (goemon_guy)
023D1E02 000003E7

Infinite and Max Red Pikmin (goemon_guy)
023D1E06 000003E7

Infinite and Max Yellow Pikmin (goemon_guy)
023D1E0A 000003E7

Day Modifier (goemon_guy)
0039DA17 000000XX
Replace XX with your day. (1-30)

Have all Areas Available (goemon_guy)
0439D8E0 0000001F

Infinite Health -Olimar- (goemon_guy)
04100084 60000000

One Hit Kills (goemon_guy)
04145B28 D1C30058

Time Manipulator (goemon_guy)
80000000 8039DA04
2839D360 00000002
86910000 3F800000
2839D361 00000001
86910000 BF800000
2839D361 00000004
040518DC 60000000
2839D361 00000008
040518DC D0030014
E0000000 80008000
D-left to rewind
D-right to advance
D-down to stop time
D-up to resume time
*Thanks to dcx2 for helping with the code.


And a quick question to go along with this, as well :
Is it possible to use Gecko Registers on Gamecube games?
-Currently hacking the following game(s):
...
Request a code via PM, if you wish.

dcx2

Yes, you can use Gecko Registers on GameCube games.  All WiiRD code types still apply, except maybe F2/F4/F6 codes.

goemon_guy

That's weird, because when I tried to make a code for this game with Gecko Registers, it doesn't work. (Crashes the game upon activating the code.)

82000000 8039da04 # Load the address into Gecko Register
2839D360 00000002 # Button Activator
86900000 00000001 # Increase float value by 1
84000000 8039da04 # Write the value back to the address
E0000000 80008000 # Terminator

Any suggestions?
-Currently hacking the following game(s):
...
Request a code via PM, if you wish.

dcx2

82000000 = 8 bit load.  Try 82200000.  You also want 84200000 for the write, too.  And 00000001 is not a floating point 1.  3F800000 is a floating point 1.

Also, if the game crashes, you can go to the Breakpoint tab and press Step Into.  It will show you what instruction failed.  If you're clever enough, you can fix the instruction and hit run and it will un-crash.  But you MUST make sure that you have hit at least one breakpoint before this technique works.

You can also shorten that code a bit.  I would try this.  Note that this technique works ONLY for 32-bit values; 8- and 16-bit values require 82 and 84 code types.

80000000 8039DA04
2839D360 00000002
86910000 3F800000
E0000000 80008000

goemon_guy

dcx2 strikes again! It's fixed.

I swear, everytime that I have trouble with a code, you always fix it! XD

Thanks alot!
-Currently hacking the following game(s):
...
Request a code via PM, if you wish.

dcx2

#5
No problem, glad I could help.

Also, when you make C2 codes or other ASM patches, be careful.  GameCube games only have 24MB of RAM to work with, unlike Wii games that have 24+64 MB with MEM2.  Therefore, GameCube games will do a lot of ASM swaps.

Any time I make a GameCube ASM code (either with an 04 write or a C2), I do the following:

From a cold boot of the Wii, launch the GameCube game.  At the intro screen, most swappable ASM will not be loaded.  So stay at the intro screen and look in the disassembly tab around the address of interest.  If the correct ASM is loaded, then that ASM is probably static and you can safely 04/C2 it.  If you don't see the right ASM, then it's dynamically swapped into memory when needed.

For dynamic ASM, you generally need an F2 code type.  Gecko OS Mod doesn't support that yet; I have mentioned it to WiiPower and he has it on his to-do list.

EDIT:

We can shorten your code some more.  Add 1 to an if code to make it apply one end-if.  You can save the terminator for the very end.

Time Manipulator (goemon_guy)
80000000 8039DA04
2839D360 00000002
86910000 3F800000
E0000000 80008000
80000000 8039DA04

2839D361 00000001
86910000 BF800000
E0000000 80008000
2839D361 00000004
040518DC 60000000
E0000000 80008000
2839D361 00000008
040518DC D0030014
E0000000 80008000

goemon_guy

I'll have to check that later on, then!

Thanks for the tip.
What exactly is the F2 Codetype, anyways?
-Currently hacking the following game(s):
...
Request a code via PM, if you wish.

dcx2

There's a problem with one of your codes.  This code is too long.  The 60000000 line will be interpreted as a 60 code type.  It won't crash the game, but you should get rid of the last line.

One Hit Kills (goemon_guy)
C2145B28 00000001
D1C30058 00000000
60000000 00000000

---

An F2 code type is a C2 code that conditionally patches ASM.  What it does is XOR together a series of values to make a hash of sorts.  If the hash matches, then the code is hooked.  If the hash does not match, the code is not hooked.

It's purpose is to ensure that the environment around a hook is as expected.  If any instructions don't match, the hash will probably be wrong and it prevents the code from hooking when it's not supposed to.  Gecko.NET has some commands that help you automatically calculate the correct values for an F2 code.

EDIT:

F2 documentation on the database - http://www.geckocodes.org/index.php?arsenal=1#F2

goemon_guy

Quote from: dcx2 on July 15, 2011, 10:07:15 PM
EDIT:

We can shorten your code some more.  Add 1 to an if code to make it apply one end-if.  You can save the terminator for the very end.

Time Manipulator (goemon_guy)
80000000 8039DA04
2839D360 00000002
86910000 3F800000
E0000000 80008000
80000000 8039DA04

2839D361 00000001
86910000 BF800000
E0000000 80008000
2839D361 00000004
040518DC 60000000
E0000000 80008000
2839D361 00000008
040518DC D0030014
E0000000 80008000

I applied the changes.

Quote from: dcx2 on July 15, 2011, 10:15:32 PM
There's a problem with one of your codes.  This code is too long.  The 60000000 line will be interpreted as a 60 code type.  It won't crash the game, but you should get rid of the last line.

One Hit Kills (goemon_guy)
C2145B28 00000001
D1C30058 00000000
60000000 00000000


Also will apply that change to the code! (In theory, couldn't that code also be simply: 04145B28 D1C30058?)
-Currently hacking the following game(s):
...
Request a code via PM, if you wish.

dcx2

1) You forgot to add 1 to the second, third, and fourth if-codes.  Adding 1 to the address will automatically apply one end-if.  2839D361 00000001

2) Yes, you can replace the C2 code with an 04 code since it patches only one instruction

goemon_guy

Whoops, I didn't even notice that you changed the button activators! I fixed the codes, applying the above, though.
-Currently hacking the following game(s):
...
Request a code via PM, if you wish.