WiiRd forum

Wii & Gamecube Hacking => Wii Game hacking help => Topic started by: memememememe on April 04, 2010, 03:06:45 PM

Title: Pointer Code Help?
Post by: memememememe on April 04, 2010, 03:06:45 PM
Hi everyone,

This is sort of in relation to my post here: http://wiird.l0nk.org/forum/index.php/topic,5367.0.html (http://wiird.l0nk.org/forum/index.php/topic,5367.0.html)

As you can see i managed to resolve my problem...but, now i have another!

I now have(8bit Value):
Pointer: 8083F7F8
Offset: 28B
Desired Value: 05

I managed to turn that into a "48000" code and started celebrating and jumping around the room... Untill.
My problem took form! When i finished the round it said that i won(Yay =]) Then the screen went black and the game froze(Boo =[).

My theory on this is than upon entering the stage selection menu the code became un-used and when the code decided to write my value it froze my game.=[

This is probably a common problem and because i have only had my "Gecko" since last friday i am unaware of the solution.

Please help!

Thanks in advance.

Ps: I was unsure where to put this so move it if you must!

Title: Re: Pointer Code Help?
Post by: memememememe on April 05, 2010, 06:03:23 AM
hmm, my pointer isn't working anymore.

Maybe you can help me. I'm looking for a time counter but can only find my address if the MEM range is at 90.
Is that OK or am i doing something wrong?

Oh, and for future reference what does the :DE000000 80008180 line do?

Thanks
Title: Re: Pointer Code Help?
Post by: wiiztec on April 05, 2010, 06:16:52 AM
It checks to see if the value of the address contained in the pointer is a valid address between 80000000 & 81800000 since you say the pointer always points to an address in MEM2 than you should change that line to 90009340
Title: Re: Pointer Code Help?
Post by: wiiztec on April 05, 2010, 04:57:02 PM
No 4A just sets the pointer to the address you specify 48 sets the pointer to the value at the address you specify
Title: Re: Pointer Code Help?
Post by: dcx2 on April 05, 2010, 10:14:55 PM
Quote from: wiiztec on April 05, 2010, 04:57:02 PMNo 4A just sets the pointer to the address you specify 48 sets the pointer to the value at the address you specify

4A = take your value 8083F7F8 and load it directly into the po so that po = 8083F7F8

48 = take your value 8083F7F8, go to that location in memory and grab that value (dereference in programmer lingo) and put that value into po so that po = [8083F7F8] = 9xxxxxxx.

Quote from: memememememe on April 05, 2010, 06:03:23 AMOh, and for future reference what does the :DE000000 80008180 line do?

When doing things like switching levels, the game will often go through objects and zero/null out pointers before creating new objects.  If your code runs while one of those pointers is nulled, you're going to try to load or store to a portion of memory that does not exist.  This is going to cause the game to lock up, because the processor won't let you read/write to nonexistent memory.

The DE code-type checks to make sure that the po is loaded with a valid pointer.  (CE code type is for ba)  So if the game is nulling out pointers and your 48 codetype loads a null pointer into the po, the DE code-type will notice the pointer is not between 80000000 and 81800000 and prevent your code from executing.  Note that code is checking to make sure the po is set to a valid MEM1 address, which is why wiiztec told you to use DE000000 90009340 instead, because that will make sure it's a valid MEM2 address (i.e. between 90000000 and 93400000)
Title: Re: Pointer Code Help?
Post by: memememememe on April 06, 2010, 07:44:35 AM
Not sure if you read my last post on the forum but i was screwing up the search by setting the MEM range to 90.

Anyway i thought i had found my pointer but upon testing it, it failed.
I have re-tried but to no avail.
Please what am i doing wrong!

I'm looking for the time counter so i put it to unknown value and keep doing less than searches but am only able to find my value when its set to 90.

Is that wrong?

Well when i find my values i put them into the pointer slots and do an 80 dump.
It will return values but i don't think they work.
Am i doing something wrong? And what type of value should i be searching for?

Thanks

Edit: If you need i will provide images.
Title: Re: Pointer Code Help?
Post by: wiiztec on April 06, 2010, 01:28:42 PM
Just to get things straight this is the code you tried right?

48000000 8083F7F8
DE000000 90009340
1400028B 00000005
E0000000 80008000