WiiRd forum

Wii & Gamecube Hacking => Wii Game hacking help => Topic started by: joonn on May 16, 2011, 12:05:40 AM

Title: super mario galaxy 2 help transformation codes !!
Post by: joonn on May 16, 2011, 12:05:40 AM
Hi guys can someone teach me how to use the code transformation for super mario galaxy 2? I can only turn into mario m flight who can say how to use the other changes???

Please let me know how to use other changes! This is the link for the code! http://wiird.l0nk.org/forum/index.php/topic,6425.0.html
Title: Re: super mario galaxy 2 help transformation codes !!
Post by: Arudo on May 16, 2011, 02:23:08 AM
Have you actually read it properly?

QuoteHow to use
Button 2 cycles through this transformation list:

    * Flying Mario
    * Cloud Mario
    * Rock Mario
    * Rainbow Mario
    * Fire Mario
    * Bee Mario
    * Spring Mario
    * Boo Mario


Button 1 applies/unapplies the selected transformation if it is loaded.  Holding button 2 and then pressing button 1 once resets the selected transformation to the the beginning of the transformation list.  Holding button 2 and then pressing button 1 twice toggles whether transformation enhancers are applied.  Holding button 2 and then pressing button 1 three times toggles whether the selected transformation is always loaded (to select a transformation which is not set to always be loaded, go to Starship Mario).

The only transformation that is always available by default is Flying Mario.  Other transformations will only be loaded if the game requires it for the current galaxy or if they are manually toggled on from Starship Mario
.

See the bolded part.
Title: Re: super mario galaxy 2 help transformation codes !!
Post by: joonn on May 16, 2011, 10:33:09 AM
so I  transform for other changes I have to first load the starship but how should I do as I do in this video so I trasfprmarmi for other changes I have to first load the starship but how should I do as I do in this video http://www.youtube.com/watch?v=TdsaIxGzMNw&feature=related I'm sorry for the inconvenience but I do not understand!!
Title: Re: super mario galaxy 2 help transformation codes !!
Post by: Bully@Wiiplaza on May 16, 2011, 11:17:48 AM
can´t it be shortened and explained how the coding works?
I would then create one with less lines since some features aren´t totally needed in my opinion... :eek:
Title: Re: super mario galaxy 2 help transformation codes !!
Post by: dcx2 on May 16, 2011, 02:55:56 PM
joonn appears to be using Google Translate, so we should be careful about reading intention from the words.

---

I don't think brkirch's code is even done yet.  Also, I'm not sure how kosher it would be to finish someone else's code after he put so much effort into it and posted it.  Of course, if we did do anything it would definitely include some note giving him credit for doing it first.

In theory, there's a function Transform() somewhere.  It is called immediately upon coming in contact with some transformation object, like a bee mushroom.  We can use Y.S. function call macro if we figure out the right input parameters for the Transform() function.

That said, with the notes given, it might be more complicated than that.  Stuff may have to be loaded from disc first, which means finding a way to tell the game "load this stuff".  This may ultimately make it large.

And you still have to find Transform().  Ideally, an execute BP on a bl that only hits upon collision with some transforming mushroom.  I can get you to a mushroom in memory if you use the P2GrabWarp publisher code.  It will give you a pointer to any specific object that you can grab with P2.

I would start with a 1up mushroom, because the life address is known, and the code that detects a collision with a mushroom is probably shared between 1ups and transformations.  Look around the call stack below where the 1up write breakpoints to the lives.  Set some execute breakpoints to see if you can find code that breaks when you hit any mushroom, but never hits any other time.

Then create two Step Logs.  Use Step Until with a condition of SRR0 == (address of the matching blr for "touch any mushroom" XBP function).  Set XBP, go hit a 1up, then Step Until.  You'll hopefully get a complete map of how the game processes the 1up.  Now set XBP again, and go hit some transforming mushroom, and Step Until again.  You'll hopefully get a map of processing those.  Open up two copies and compare side by side.

As a bonus, the Step Log will also help you figure out the input parameters you need to call the transformation function.  Then you can use Y.S. function call macro.
Title: Re: super mario galaxy 2 help transformation codes !!
Post by: Bully@Wiiplaza on May 16, 2011, 03:29:46 PM
 :( I´m not ready yet to do such things... (thought it can be done with a RAM write to the right adress)
However, I once tried to BP execute brkrichs adress and it didn´t execute at all.

I don´t even know how to force a function to execute when your Breakpoint hits!

Example:

You take the BP Write from substract starbit() and call the function add coins().

You shoot a starbit (-1) and your coins amount is increased (e.g. +5) by calling the coins function

How can link them like this then?
Title: Re: super mario galaxy 2 help transformation codes !!
Post by: joonn on May 16, 2011, 03:50:46 PM
now I'm starting to understand how the code works but I can not understand how you set the transformation on the star ship!
Title: Re: super mario galaxy 2 help transformation codes !!
Post by: dcx2 on May 16, 2011, 04:16:44 PM
Quote from: joonn on May 16, 2011, 03:50:46 PM
now I'm starting to understand how the code works but I can not understand how you set the transformation on the star ship!

There is a room on Starship Mario that has all the transformation mushrooms that you have collected so far.  You should try that.

---

Quote from: Bully@Wiiplaza on May 16, 2011, 03:29:46 PM
Example:
You take the BP Write from substract starbit() and call the function add coins().

You shoot a starbit (-1) and your coins amount is increased (e.g. +5) by calling the coins function

How can link them like this then?

Find the function add_coins() using Write BP on coins.  Now the most important part - walk the call stack one level.  You should find the bl that brought you to your WBP.  Just before the bl, the game will be loading r3, maybe r4-r10, with all kinds of stuff (pointer to the coins, number of coins to add, etc).  If you want to call add_coins(), you will also have to set r3 etc up with exactly the same stuff.

r3-r10 are like bullets in a gun.  bl is like pulling the trigger.  If you don't put the right bullets into the gun, it will explode/crash.

If I ever finish hacking ToS:DotNW (RPGs are so much fun to hack!) then I'll try to do this as an example.
Title: Re: super mario galaxy 2 help transformation codes !!
Post by: joonn on May 16, 2011, 05:08:27 PM
I now have total control over the code know how to use 100% sorry for the trouble and thanks a lot!!!
Title: Re: super mario galaxy 2 help transformation codes !!
Post by: Bully@Wiiplaza on May 16, 2011, 08:05:21 PM
Quote from: dcx2 on May 16, 2011, 04:16:44 PM
Find the function add_coins() using Write BP on coins.  Now the most important part - walk the call stack one level.  You should find the bl that brought you to your WBP.  Just before the bl, the game will be loading r3, maybe r4-r10, with all kinds of stuff (pointer to the coins, number of coins to add, etc).  If you want to call add_coins(), you will also have to set r3 etc up with exactly the same stuff.

r3-r10 are like bullets in a gun.  bl is like pulling the trigger.  If you don't put the right bullets into the gun, it will explode/crash.

If I ever finish hacking ToS:DotNW (RPGs are so much fun to hack!) then I'll try to do this as an example.
Great, I´m looking forward to it ;D
I´d stop asking now and wait for the tut then...
Thx for writing it!!
Title: Re: super mario galaxy 2 help transformation codes !!
Post by: joonn on May 17, 2011, 12:05:05 AM
mario ice but do not know anything yet???
Title: Re: super mario galaxy 2 help transformation codes !!
Post by: Arudo on May 17, 2011, 02:39:23 AM
I'm sorry, I don't understand what you're trying to say.
Title: Re: super mario galaxy 2 help transformation codes !!
Post by: dcx2 on May 17, 2011, 02:45:44 AM
I think he's asking about Ice Mario.  Supposedly brkirch was trying to find a way to load Ice Mario even though he is not actually in this game anywhere.
Title: Re: super mario galaxy 2 help transformation codes !!
Post by: Arudo on May 17, 2011, 03:21:31 AM
Hmm. I see.
Title: Re: super mario galaxy 2 help transformation codes !!
Post by: Bully@Wiiplaza on May 17, 2011, 07:39:09 AM
get the function/value/instruction from SMG from Ice Mario and execute it on SMG2.
It may work, like the "flying Mario" code, which is pretty epic, since it doesn´t exist anymore in the second version!
I´m confident O0
Brkirch´s coding work is a bit too slow in my opinion, we should at least try to assist him or we´ll get the final code really late.
Title: Re: super mario galaxy 2 help transformation codes !!
Post by: joonn on May 17, 2011, 02:26:01 PM
In fact it has already shown in this video http://www.youtube.com/watch?v=EUBR_TnGrvs&translated=1 i incredible !!