WiiRd forum

Wii & Gamecube Hacking => Wii Game hacking help => Topic started by: Linkums on November 03, 2008, 12:48:06 AM

Title: [solved] Set value at this location to the value at that location
Post by: Linkums on November 03, 2008, 12:48:06 AM
Alright, so I found the address of the max and the address of what you have. I want what you have to equal the max at all times. I could make it 999 but that just doesn't look as nice, you end up with negative numbers some of the time and everything.

So what I want to do is write the value at
80EA4D74 (the max)
to
80EA22AC (what you have)

How do I do this? (and while I'm at it, comparisons. if I wanted to see if the value at 80EA4D74 was greater than the value at 80EA22AC)
I'm just starting all this, but I've had some programming classes and did the Mario Galaxy tutorials. I figure this is pretty easy, thanks for the help.
Title: Re: How do I set value at this location to the value at that location
Post by: biolizard89 on November 03, 2008, 01:44:54 AM
Quote from: Linkums on November 03, 2008, 12:48:06 AM
Alright, so I found the address of the max and the address of what you have. I want what you have to equal the max at all times. I could make it 999 but that just doesn't look as nice, you end up with negative numbers some of the time and everything.

So what I want to do is write the value at
80EA4D74 (the max)
to
80EA22AC (what you have)

How do I do this? (and while I'm at it, comparisons. if I wanted to see if the value at 80EA4D74 was greater than the value at 80EA22AC)
I'm just starting all this, but I've had some programming classes and did the Mario Galaxy tutorials. I figure this is pretty easy, thanks for the help.
If you look at the code type documentation, the Gecko Register code types look like they're what you want.  Basically, load the value at 80EA4D74 into a Gecko Register, and then save it to 80EA22AC.

(Anyone is welcome to correct me if I'm wrong.  :) )
Title: Re: How do I set value at this location to the value at that location
Post by: Linkums on November 03, 2008, 02:31:00 AM
Booya! I got it, I was afraid of those Gecko registers but that's not really so bad. Thanks.
Title: Re: [solved] Set value at this location to the value at that location
Post by: Panda On Smack on November 03, 2008, 10:15:19 AM
Can you post what you did to see how you used the registers please?

I'm hoping to start using them and some examples would be great

ta
Title: Re: [solved] Set value at this location to the value at that location
Post by: Linkums on November 03, 2008, 02:46:23 PM
Surely. I guess I did it right, because it works... Not sure if I have to reset something afterward for the next person or what... I don't think I do.

these are for elebits...
No noise restriction
82200000 80EA4D74
84200000 80EA22AC
First part has 822 which means it'll load the 32 bit value located at the second part (80EA4D74) into the gecko register. The next line starts with 842 which means it will put the 32 bit value in the gecko register into the specified location (80EA22AC).

Now, if you want to do another one, you can put it in a different gecko register (you have 0-F). To change which register you are accessing, you change the last digit in the first part. Like this:
82200001 80EA4D74
84200001 80EA22AC
It was saving and loading from register 0, but now it's register 1.

...and that's all I've needed to do so that's all I know how to do right now.