Teleporting code

Started by toonlink444, November 21, 2011, 09:54:20 PM

Previous topic - Next topic

toonlink444

Back on the scene for a while so for my next code I was thinking of a teleporting code. I figure you have to find the x y and z values then record them so you go back there. My question is how would you record a value as in save it. And I'm guessing to find the x y and z values you just move around.
In the begining there was nothing. Then it exploded
New blog!! Check it out for hacking Smash Bros Brawl!! http://letshackblank.blogspot.com/

wiiztec

Load them into gecko registers or use asm
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

toonlink444

How would I load into to a gecko register?
In the begining there was nothing. Then it exploded
New blog!! Check it out for hacking Smash Bros Brawl!! http://letshackblank.blogspot.com/

Bully@Wiiplaza

#3
Quote from: toonlink444 on November 21, 2011, 10:08:24 PM
How would I load into to a gecko register?
I think that my codes are good for learning purpoises. ;D
Actually, I made all kinds of teleporters for many different games. 8)

Importance order of these examples:
1.) ASM (always possible, can be un-reasonable/un-convenient since it may affect other players aswell)
2.) Pointer (mostly possible)
3.) Base Address (seldomly possible)

NOTE: These are examples on how to do it.

1.) Base Address Teleporter using Gecko Registers
[spoiler]28XXXXXX YYYYZZZZ # store position
82210000 QQQQQQQ # X Coord Address
82210001 WWWWWWWW # Y Coord Address
82210002 RRRRRRRRR # Z Coord Address
E0000000 00000000
28XXXXXX YYYYZZZZ # load position
84210000 QQQQQQQ # X Coord Address
84210001 WWWWWWWW # Y Coord Address
84210002 RRRRRRRRR # Z Coord Address
E0000000 80008000[/spoiler]

2.) Pointer Teleporter using Gecko Registers
[spoiler]28XXXXXX YYYYZZZZ # store position
48000000 PPPPPPPP # Pointer Address
DE000000 80008180
92210000 0000QQQQ # offset 1 (X coord)
92210001 0000WWWW # offset 2 (Y coord)
92210002 0000RRRRR # offset 3 (Z coord)
E0000000 00000000
28XXXXXX YYYYZZZZ # load position
48000000 PPPPPPPP # Pointer Address
DE000000 80008180
94210000 0000QQQQ # offset 1 (X coord)
94210001 0000WWWW # offset 2 (Y coord)
94210002 0000RRRR # offset 3 (Z coord)
E0000000 80008000[/spoiler]

3.) Assembly Teleporter using free RAM space example[spoiler]Goldeneye Offline

Teleporter -PAL- [Bully@Wiiplaza]
C2044E34 0000000D
9421FFB0 BDC10008
3DC08000 3DE0805F
A1EF7422 2C0F1000
4082001C 820400F8
822400FC 82440100
920E1600 922E1604
924E1608 2C0F0010
4082001C 826E1600
828E1604 82AE1608
926400F8 928400FC
92A40100 B9C10008
38210050 C00400FC
60000000 00000000
*Press minus to save position*
*Press plus to teleport*

Address: 80044E34
stwu r1,-80(r1)
stmw r14,8(r1)
lis r14,-32768
lis r15,-32673
lhz r15,29730(r15)
cmpwi r15,4096
bne- 0x1C
lwz r16,248(r4)
lwz r17,252(r4)
lwz r18,256(r4)
stw r16,5632(r14)
stw r17,5636(r14)
stw r18,5640(r14)
cmpwi r15,16
bne- 0x1C
lwz r19,5632(r14)
lwz r20,5636(r14)
lwz r21,5640(r14)
stw r19,248(r4)
stw r20,252(r4)
stw r21,256(r4)
lmw r14,8(r1)
addi r1,r1,80
lfs f0,252(r4)
nop
[/spoiler]
Understood? ;D
My Wii hacking site...
http://bullywiihacks.com/

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

~Bully

toonlink444

I figured it out last night and it worked pretty well, but the Y axis was saved wrong and put me high in the air. Plus the gravity stopped working.
In the begining there was nothing. Then it exploded
New blog!! Check it out for hacking Smash Bros Brawl!! http://letshackblank.blogspot.com/

toonlink444

The code now only works if you don't travel that far from the saved coordinates is there a way to extend it.
In the begining there was nothing. Then it exploded
New blog!! Check it out for hacking Smash Bros Brawl!! http://letshackblank.blogspot.com/

biolizard89

Quote from: toonlink444 on November 25, 2011, 10:55:39 PM
The code now only works if you don't travel that far from the saved coordinates is there a way to extend it.
This is just a guess, but most games store "current" XYZ coords and "previous frame" XYZ coords... I wouldn't be surprised if some games don't like it when the current coords are suddenly way different from the previous coords.

But, I may be wrong.

toonlink444

Hmmmm :confused: so what would a good way to find a previous frame coords
In the begining there was nothing. Then it exploded
New blog!! Check it out for hacking Smash Bros Brawl!! http://letshackblank.blogspot.com/

biolizard89

Quote from: toonlink444 on November 26, 2011, 04:44:21 AM
Hmmmm :confused: so what would a good way to find a previous frame coords
They tend to be very close to current coords in memory.  In fact, they may be exactly next to them.  Open memory viewer with the game paused, and go frame-by-frame; note the current X coord while moving, go forward one frame, and look for that value to appear.  Alternatively, breakpoints might be able to find them.

Again, I'm not certain that this is the issue you're having, but I've definitely seen games that misbehave if you poke the current coords to something very far from the previous coords.  (In particular, Super Smash Bros Melee doesn't like it at all.)  I think this is because the previous coords are used to calculate collision detection, but don't quote me on that.

toonlink444

Found the issue the screen moves when you move so I need to find the value of where the screen is to make the screen move to the place the coords were.
Any ideas on how to do this?
In the begining there was nothing. Then it exploded
New blog!! Check it out for hacking Smash Bros Brawl!! http://letshackblank.blogspot.com/

Anarion

#10
Quote from: toonlink444 on November 25, 2011, 10:55:39 PM
The code now only works if you don't travel that far from the saved coordinates is there a way to extend it.
this is common with almost all teleport codes i've used. and what biolizard89 mentioned may be the reason why the teleporting code won't work when the game has loaded a new area. from what i've observed when making teleport codes, there are 3 addresses you can poke and see a change in character position, and there are another 3 that also show the character coordinates but when poked won't cause a change. those addresses aren't far from the actual coordinate addresses. they are usually above them. simply try to save the current coordinates of the latter addresses i mentioned, along with the character coordinates you already found and use in your teleporting code, to see if it solves the problem.
I'm not here much. If you have a problem with any of my codes, let me know through my youtube account and I'll help you.
¦}

toonlink444

I've seen them I'll give it a shot.
In the begining there was nothing. Then it exploded
New blog!! Check it out for hacking Smash Bros Brawl!! http://letshackblank.blogspot.com/

biolizard89

Quote from: Jay on November 28, 2011, 09:14:50 PM
Quote from: toonlink444 on November 25, 2011, 10:55:39 PM
The code now only works if you don't travel that far from the saved coordinates is there a way to extend it.
this is common with almost all teleport codes i've used. and what biolizard89 mentioned may be the reason why the teleporting code won't work when the game has loaded a new area. from what i've observed when making teleport codes, there are 3 addresses you can poke and see a change in character position, and there are another 3 that also show the character coordinates but when poked won't cause a change. those addresses aren't far from the actual coordinate addresses. they are usually above them. simply try to save the current coordinates of the latter addresses i mentioned, along with the character coordinates you already found and use in your teleporting code, to see if it solves the problem.
Yep, that's what I've seen as well.  If you're not moving, the previous and current XYZ coords will be the same, so they'll show up on a search.

toonlink444

Hmm I made a teleport code for new super mario bros wii and it worked but for super mario galaxy I found the xyz corrds but when I poked them nothing changed.
In the begining there was nothing. Then it exploded
New blog!! Check it out for hacking Smash Bros Brawl!! http://letshackblank.blogspot.com/

dcx2

It depends on "when" you poke them.

The game runs in frames.  At some point in the frame, the code handler runs.  (this is not always technically true, but it's close enough to true for this discussion)

At some point in time, the game writes Mario's coordinates to memory.  Some time later, it reads them back and does stuff with them.  If the selected hook causes the code handler to run after the coordinates are written, and before they are read, then everything will work.

However, if the selected hook causes the code handler to run after the coordinates are *read* and before they are *written*, then whatever the code handler writes will be over-written by the game.

I ran into this with my Televitation code.  I had to write a C2 code that hooked the game just after the coordinates were written to memory, so that my C2 could over-write those coordinates when I used the activator.

EDIT:

It's also possible you found the "last frame coordinates", so that when you poked them, you didn't actually change your coordinates.