Hello. How do I go on about accomplishing this? I am trying to load the value of an address into gecko registers and store the register value at address specified (for a basic 'teleporting' code). I am confused [enough] because the addresses are mem90 addresses. I do not know how to use mem90 addresses with gecko registers in the same way you would do with addresses from mem80.
Thank you for your time. ¦}
Quote from: Jay on November 12, 2011, 02:25:20 AM
Hello. How do I go on about accomplishing this? I am trying to load the value of an address into gecko registers and store the register value at address specified (for a basic 'teleporting' code). I am confused [enough] because the addresses are mem90 addresses. I do not know how to use mem90 addresses with gecko registers in the same way you would do with addresses from mem80.
Thank you for your time. ¦}
The following code is a teleporter I made for Mem90 (using a pointer).
[spoiler] 28XXXXXX YYYYZZZZ
48000000 9WWWWW
DE000000 90009340
92210000 000000GG
92210001 000000HH
92210002 000000II
E0000000 00000000
28XXXXXX YYYYZZZZ
48000000 9WWWWW
DE000000 90009340
94210000 000000GG
94210001 000000HH
94210002 000000II
E0000000 80008000[/spoiler]
So you basically need to do this:
28XXXXXX YYYYZZZZ # button activator for store to gecko register
92210000 GGGGGGGG # store x coord
92210001 HHHHHHHH # store y coord
92210002 IIIIIIII # store z coord
E0000000 00000000
28XXXXXX YYYYZZZZ # button activator for load from gecko register
94210000 GGGGGGGG # load x coord
94210001 HHHHHHHH # load y coord
94210002 IIIIIIII # load z coord
E0000000 80008000
while GG, HH & II are the coorsponding addresses without prefixes.
(e.g. 90123456). Quite easy. Btw. you could also use ASM, but that´s probably more complex than using gecko registers. ;D
thanks for replying, bully. i've tried finding pointers and using asm but it just doesn't work. its a fighting game i'm trying to create the hack for. every single thing to hack in this game is a static mem90 address. so i usually make codes for it like this.
42000000 9X000000
04123456 00010000
E0000000 80008000
for the character i am trying to create the code for, its XYZ coordinates are always at 92B3CACC, 92B3CADC, 92B3CAEC.
there are no pointers to use. and using asm crashes the game when hooking to an address that has a "load" instruction. so the only way i think i can make a teleporting code for it would be to use gecko registers. but how do you do that with a static address in mem90? that's what i'm wondering.
Quote from: Jay on November 12, 2011, 11:56:23 PM
thanks for replying, bully. i've tried finding pointers and using asm but it just doesn't work. its a fighting game i'm trying to create the hack for. every single thing to hack in this game is a static mem90 address. so i usually make codes for it like this.
42000000 9X000000
04123456 00010000
E0000000 80008000
for the character i am trying to create the code for, its XYZ coordinates are always at 92B3CACC, 92B3CADC, 92B3CAEC.
there are no pointers to use. and using asm crashes the game when hooking to an address that has a "load" instruction. so the only way i think i can make a teleporting code for it would be to use gecko registers. but how do you do that with a static address in mem90? that's what i'm wondering.
28XXXXXX YYYYZZZZ # button activator for store to gecko register
92210000 92B3CACC
92210001 92B3CADC
92210002 92B3CAEC
E0000000 00000000
28XXXXXX YYYYZZZZ # button activator for load from gecko register
94210000 92B3CACC
94210001 92B3CADC
94210002 92B3CAEC
E0000000 80008000
Try it :D
tried that. didn't work. froze instantly :(
here is everything i've tried so far. all froze/didn't work. out of further ideas and asm is a no-go.
[spoiler]showing only 1 coordinate being used
[button activator]
42000000 92000000
92210000 003BCACC
E0000000 80008000
[button activator]
42000000 92000000
94210000 003BCACC
[terminator]
[button activator]
42000000 90000000
92210000 023BCACC
[terminator]
[button activator]
42000000 90000000
94210000 023BCACC
[terminator]
[button activator]
42000000 92B3CACC
92210000 00000000
[terminator]
[button activator]
42000000 92B3CACC
94210000 00000000
[terminator]
[button activator]
48000000 923BCACC
DE000000 90009310 (* tried with&without this line)
92210000 00000000
[terminator]
[button activator]
48000000 923BCACC
DE000000 90009310
94210000 00000000
[terminator]
[button activator]
48000000 923BCA20 (pointer shown in (r?) )
DE000000 90009310 *
92210000 000000AC
[terminator]
[button activator]
48000000 92B3CA20
DE000000 90009310
94210000 000000AC
[terminator][/spoiler]
I don´t understand why your spoiler shows such a mess.
You said that those 3 coords don´t ever move in memory?
Then you don´t need offsets/pointers. I´m curious why my "template" didn´t work.
I took it off right from a working example code (by me).
The freeze could also be a gecko.net bug, try to send codes with WiiRd.
Still not working?
Can you then plz tell me the game id, game name and if your coord addresses are correct?
I try to attempt it on myself anytime soon...
1) 42 codes use the ba. Only the upper 7 bits of the ba are used, the lower 25 are ignored. That's why your first two codes wouldn't work.
2) 48 codes dereference pointers (e.g. load po with the value at an address) (i.e. po = [XXXXXXXX]). 4A codes explicitly load the po with a pointer (i.e. po = XXXXXXXX). You wanted a 4A code, not a 48 code.
3) DE codes are only required if you're dereferencing a pointer; if you try to load the po with the value at an address and that value is not an address itself, then when you try to use it you will get null pointer exceptions, crashing, and so forth. If you're explicitly loading the po with a pointer, then you know that it will be a valid address.
---
4) Bully was very close, but he was still using his 48-code template when he did the gr loads and stores with the explicit mem2 addresses.
You want to use an 8220 code to load the addresses explicitly, and an 8420 code to store them. This avoids the use of the ba and po entirely. You should note which gr your code uses for long-term storage, and that it may conflict with other codes that use those gr. I would also choose gr somewhere in the middle, as most folks tend to use the first few gr for stuff so this would minimize the chance of conflict.
[button activator for load]
8220000A 92B3CACC
8220000B 92B3CADC
8220000C 92B3CAEC
E0000000 80008000
[button activator for store]
8420000A 92B3CACC
8420000B 92B3CADC
8420000C 92B3CAEC
E0000000 80008000
Quote from: Bully@Wiiplaza on November 14, 2011, 01:57:22 PM
[spoiler]I don´t understand why your spoiler shows such a mess.
You said that those 3 coords don´t ever move in memory?
Then you don´t need offsets/pointers. I´m curious why my "template" didn´t work.
I took it off right from a working example code (by me).[/spoiler]
My spoiler showed a mess because i was just lazy to type the button activators, terminator lines, etc. since I don't know the button activator address off the top of my head. =P
and the template didn't work because it was something i had already tried before i made this thread. so i knew it wouldn't work, along with every other method i tried to see if it'd work.
but thanks for trying to help me out man! ;D
Quote from: dcx2 on November 14, 2011, 05:01:45 PM
[spoiler]1) 42 codes use the ba. Only the upper 7 bits of the ba are used, the lower 25 are ignored. That's why your first two codes wouldn't work.
2) 48 codes dereference pointers (e.g. load po with the value at an address) (i.e. po = [XXXXXXXX]). 4A codes explicitly load the po with a pointer (i.e. po = XXXXXXXX). You wanted a 4A code, not a 48 code.
3) DE codes are only required if you're dereferencing a pointer; if you try to load the po with the value at an address and that value is not an address itself, then when you try to use it you will get null pointer exceptions, crashing, and so forth. If you're explicitly loading the po with a pointer, then you know that it will be a valid address.
---
4) Bully was very close, but he was still using his 48-code template when he did the gr loads and stores with the explicit mem2 addresses.
You want to use an 8220 code to load the addresses explicitly, and an 8420 code to store them. This avoids the use of the ba and po entirely. You should note which gr your code uses for long-term storage, and that it may conflict with other codes that use those gr. I would also choose gr somewhere in the middle, as most folks tend to use the first few gr for stuff so this would minimize the chance of conflict.[/spoiler]
thank you, dcx2, for managing to help me after all. that was just the explanation i needed :)
learned something new!
aw... damnit.
I see. I forgot to change 922 to 822 since we are not using a pointer.
It was confusing with mem90 addresses... :o
if you were confused, just imagine how confused i was. so confused i had already given up.....then dcx2 came to my rescue xD