Increase/decrease value with pointer code?

Started by Bully@Wiiplaza, October 27, 2010, 06:51:01 PM

Previous topic - Next topic

Bully@Wiiplaza

Hey guys,
it would be cool if someone can tell me, how I can write a pointer code as an increase/decrease value code like this non pointer code:

[spoiler]Increase/Decrease Home Goals [Bully@Wiiplaza]
28585EE2 00000010 -> Button for increase
4A000000 8XXXXXXX
94010000 00000000
A8000008 00000008
86000000 00000001
94010000 00000000
E0000000 80008000
28585EE2 00001000 -> Button for decrease
4A000000 8XXXXXXX
94010000 00000000
A8000008 00000008
86000000 FFFFFFFF
94010000 00000000
E0000000 80008000[/spoiler]

And this is the code, which should be "transformed" into the code above...
[spoiler]
Home score modifier [Nutmeg] PAL ported by Trackme

28585EE2 yyyyzzzzz
48000000 8XXXXXXX -> 48 Pointer prefix
10000007 000000XX
E0000000 80008000[/spoiler]

Thanks for helping! ;)
My Wii hacking site...
http://bullywiihacks.com/

My youtube account with a lot of hacking videos...
http://www.youtube.com/user/BullyWiiPlaza

~Bully

Bully@Wiiplaza

why, just why, does nobody mind to reply? :rolleyes:
My Wii hacking site...
http://bullywiihacks.com/

My youtube account with a lot of hacking videos...
http://www.youtube.com/user/BullyWiiPlaza

~Bully

Nutmeg

I don't understand what you are asking... Your code does use a pointer.  4A = set pointer to XXXXXXXX Then you used direct register operations.

-I'm curious on why my code got changed to 8 bits.
I'm inbetween your legs... that's not awkward.

Bully@Wiiplaza

#3
Quote from: Nutmeg on October 30, 2010, 02:38:32 AM
I don't understand what you are asking... Your code does use a pointer.  4A = set pointer to XXXXXXXX Then you used direct register operations.

-I'm curious on why my code got changed to 8 bits.
1.) because someone created the pointer from my score code per hand (trackme)
Don´t you know the increase/decrease hacks? Like Battle Manipulation from mdmwii.
It should be done for this score code, it´s not that hard, if you know how.
And I want to do it, since I can only know it with direct RAM write Mem80 +90 codes, but not with pointers yet. :rolleyes:
Where is the problem that nobody really helps here???? ???
My Wii hacking site...
http://bullywiihacks.com/

My youtube account with a lot of hacking videos...
http://www.youtube.com/user/BullyWiiPlaza

~Bully

dcx2

Your first code is a pointer code.

4A000000 8XXXXXXX

That means your pointer is 8XXXXXXX.  4A = Set Pointer to this explicit value

The second code is a pointer-in-pointer code.

48000000 8XXXXXXX

That means your pointer is [8XXXXXXX].  48 = Set Pointer to the value at the address specified

Nothing changes when you use 48 instead of 4A.  There is no magic trick, which is probably why no one replied to the thread...it would be like saying "okay, I can 02 write to this 16-bit value, so how do I 04-write the 32-bit value?"

Deathwolf

example:
u found a pointer and want to load into this address and pointer value.

address : 80156926
value aka pointer on address : 81503DCC

48000000 80156926 <--- load into value on this address (81503DCC)
so you load into address 81503DCC!

4A000000 80156926 <--- load only into 80156926 address
lolz

Bully@Wiiplaza

you two answered right after someone told me how to do that in a PM.

[spoiler]28585EE2 00000010 -> Button activator (-)
48000000 8XXXXXXX -> "Load" pointer at XXXXXXXX, this loaded pointer = po! (important)
DE000000 80008180 -> Check range Smiley
92010000 0000182F -> Load on Gecko register 0 (8 bits) the XXXXXXXX address(+po by default)
86000000 00000001 -> Simple operation "add" 1 to Gecko Register 0
94010000 0000182F -> Save Gecko register 0 on XXXXXX address (+po by default)-> display
94010000 00000B6F -> Save Gecko register 0 on XXXXXX address (+po by default)-> score
E0000000 80008000 -> End code
28585EE2 00001000 -> Button activator (+)
48000000 8XXXXXXX -> Load pointer at XXXXXXXX, this loaded pointer = po!
DE000000 80008180 ->Check range ;P
92010000 0000182F -> Load on Gecko register 0 (8 bits) the XXXXXXXX address (+po by default)
86000000 0000FFFF -> Simple operation "add" FF to Gecko register 0 (to substract)
94010000 0000182F -> Save Gecko register 0 on XXXXXXXX address (+po by default) -> display
94010000 00000B6F -> Save Gecko register 0 on XXXXXXXX address (+po by default) -> score
E0000000 80008000 -> End code[/spoiler]
thx anyway! ;D
My Wii hacking site...
http://bullywiihacks.com/

My youtube account with a lot of hacking videos...
http://www.youtube.com/user/BullyWiiPlaza

~Bully

dcx2

Yeah, other than the DE check (because it's pointer-in-pointer; the original code is missing the DE check and that can be bad but the button activator probably helps)...it's mostly like your original code, using the gecko registers and such.  Oddly, your original code doesn't really do any gr loads, just stores?

You can shorten that code, too.

48000000 8XXXXXXX # po = [8XXXXXXX]
DE000000 80008180 # if po is not a valid pointer, set code execution status to false
92010000 0000182F # gr0 = [po+0x182F]
28585EE2 00000010 # iff (iff = if and only if; no other buttons) -
86000000 00000001 # gr0 += 1
28585EE3 00001000 # endif; iff +
86000000 FFFFFFFF # gr0 -= 1
E2000001 00000000 # endif
94010000 0000182F # [po+0x182F] = gr0
94010000 00000B6F # [po+0xB6F] = gr0
E0000000 80008000 # clear execution status and reset ba/po


Also, your first code used if-timers to make it so you can increment by one step at a time.  You can usually achieve a similar function by using a button activator that's 4 bytes after the one you're using (i.e. 28585EE6)