D2 pointer codetype

Started by Deathwolf, August 01, 2010, 10:35:02 PM

Previous topic - Next topic

Deathwolf

how to use a ASM D2 pointer?
atm I have no pointers but I will write one with 04 codetype.
example on this code:

04123456 80012A14

my asm instruction:
lis r14,0x0000
ori r14,r14,0x0000
stw r14,40(r4)
lwz r5,40(r4)


assembly:
C2012A14 00000003
3DC00000 61CE0000
91C40028 80A40028
60000000 00000000

so I should write:
04123456 80012A14
D2123456 00000003
3DC00000 61CE0000
91C40028 80A40028
60000000 00000000

is it right?
thanks...




lolz

wiiztec

You need an address range check
If there's any code at all that you want to be button activated, or even able to toggle on & off, and I have the game, just PM me and I'll make it happen

Deathwolf

#2
DE000000 80008180?
please explain
lolz

wiiztec

Yes if your pointer is expected to fall into that range, you would need that between the 48 and D2
If there's any code at all that you want to be button activated, or even able to toggle on & off, and I have the game, just PM me and I'll make it happen

Deathwolf

so I can't write only D2?

how should I write it now?

04123456 80012A14

D2XXXXXX 00000003
3DC00000 61CE0000
91C40028 80A40028
60000000 00000000
lolz

wiiztec

You can but it will be the same as C2 since both the ba & po default to 80000000
If there's any code at all that you want to be button activated, or even able to toggle on & off, and I have the game, just PM me and I'll make it happen

Deathwolf

#6
oh okay but is my code right?

04123456 80012A14
D2123456 00000003
3DC00000 61CE0000
91C40028 80A40028
60000000 00000000
lolz

wiiztec

No if you intend to use a pointer then you need an address range check if you don't then it's the same as a normal C2 code & I have no idea what your 04 line is for
If there's any code at all that you want to be button activated, or even able to toggle on & off, and I have the game, just PM me and I'll make it happen

Deathwolf

I said that I have atm no pointer but I want to use D2.
so I write one.

04123456 80012A14 <-- my new pointer

it points to my hook address.

04123456 80012A14
D2123456 00000003
3DC00000 61CE0000
91C40028 80A40028
60000000 00000000

but how to include now a range check?
I know it's the same like C2.
lolz

wiiztec

#9
If the po is known and invarible then an address range check is not needed

and that code would write your ASM to 80123456 which isn't valid btw since it starts in the middle of a word
If there's any code at all that you want to be button activated, or even able to toggle on & off, and I have the game, just PM me and I'll make it happen

Deathwolf

the code should take me to 80012A14.
that's my problem. I don't know how to write.
isn't D2 codetype reading the pointer value at the address?

04123456 80012A14 <-- write pointer (80012A14) to a free address (80123456)

D2123456 00000003 <-- D2 read the pointer value (80012A14) at the address (80123456)
3DC00000 61CE0000
91C40028 80A40028
60000000 00000000
lolz

wiiztec

No D2 applies an offset to the pointer, the only thing that loads a value at an address into the pointer is 48
If there's any code at all that you want to be button activated, or even able to toggle on & off, and I have the game, just PM me and I'll make it happen

Deathwolf

so that is it?

D2012A14 00000003
3DC00000 61CE0000
91C40028 80A40028
60000000 00000000
lolz

hetoan2

my asm instruction:
lis r14,0x0000
ori r14,r14,0x0000 <- not needed
stw r14,40(r4)
lwz r5,40(r4)

your code should be:

D2012A14 00000003
3DC00000 91C40028
80A40028 60000000


Check out my site with codes obviously...
http://hetoan2.com/

and youtube...
http://youtube.com/hetoan2

Deathwolf

oh okay, thank you guys :)
lolz