WiiRd forum

Wii & Gamecube Hacking => Wii Game hacking help => Topic started by: live2play on July 06, 2013, 06:52:22 PM

Title: How to find camera coordinates?
Post by: live2play on July 06, 2013, 06:52:22 PM
Anyone have a good method for finding the camera coordinates?
Title: Re: How to find camera coordinates?
Post by: γRB on July 07, 2013, 05:42:48 PM
I've never tried 'editing' that, but does the game you want to hack let you change / move camera in any way easily and normally?
Title: Re: How to find camera coordinates?
Post by: live2play on July 08, 2013, 03:57:00 PM
The game doesn't let you move the camera but I wanted to try to make 3rd person game a first person game.  I think that a good method may be to find my player coordinates and set a read breakpoint.  Hopefully I can then follow the ASM to a section that involves the camera coordinates as they follow the player's moves.  Any other ideas?
Title: Re: How to find camera coordinates?
Post by: γRB on July 08, 2013, 04:24:25 PM
Exactly what I was thinking of. Expect a huge list.
Title: Re: How to find camera coordinates?
Post by: Deathwolf on July 08, 2013, 07:11:25 PM
It could be a consistent float as well. You could try to do a huge multipoke.
Title: Re: How to find camera coordinates?
Post by: γRB on July 08, 2013, 08:01:43 PM
I've just found one regarding Y coordinate. You're good to go.
Title: Re: How to find camera coordinates?
Post by: live2play on July 08, 2013, 10:26:37 PM
Quote from: γRB on July 08, 2013, 08:01:43 PM
I've just found one regarding Y coordinate. You're good to go.
What do you mean by finding one?  There should only be one camera.
Title: Re: How to find camera coordinates?
Post by: live2play on July 08, 2013, 10:28:33 PM
Quote from: Deathwolf on July 08, 2013, 07:11:25 PM
It could be a consistent float as well. You could try to do a huge multipoke.
I could see a constant float being the camera zoom level, but not the location/coordinates of the camera.
Title: Re: How to find camera coordinates?
Post by: Deathwolf on July 08, 2013, 10:53:32 PM
Quote from: live2play on July 08, 2013, 10:28:33 PM
Quote from: Deathwolf on July 08, 2013, 07:11:25 PM
It could be a consistent float as well. You could try to do a huge multipoke.
I could see a constant float being the camera zoom level, but not the location/coordinates of the camera.

Have you tried to set a breakpoint "read" on it? Perhaps you could get some information via registers. Eventually it *could* work.
Title: Re: How to find camera coordinates?
Post by: γRB on July 09, 2013, 11:32:03 AM
Well you talked about camera coordinates, so I tried it on a game. Found the Y coordinate, set a read breakpoint (huge list), and found an lfs (or lfd) instruction, tested it, and that's it, it was the camera.
Title: Re: How to find camera coordinates?
Post by: live2play on July 09, 2013, 04:25:51 PM
Quote from: γRB on July 09, 2013, 11:32:03 AM
Well you talked about camera coordinates, so I tried it on a game. Found the Y coordinate, set a read breakpoint (huge list), and found an lfs (or lfd) instruction, tested it, and that's it, it was the camera.

So, when you set the read BP on your player's Y coordinate, and you say that you had a huge list, do you mean that the BP was triggering constantly or that it was triggering in multiple areas in the ASM or both?  Did the camera have three coordinates or just one constant float value?  When you made a change did the camera just zoom in/out or actually change it's location?
Title: Re: How to find camera coordinates?
Post by: live2play on July 09, 2013, 04:31:34 PM
Quote from: Deathwolf on July 08, 2013, 10:53:32 PM
Quote from: live2play on July 08, 2013, 10:28:33 PM
Quote from: Deathwolf on July 08, 2013, 07:11:25 PM
It could be a consistent float as well. You could try to do a huge multipoke.
I could see a constant float being the camera zoom level, but not the location/coordinates of the camera.

Have you tried to set a breakpoint "read" on it? Perhaps you could get some information via registers. Eventually it *could* work.
Sorry for the confusion.   :) I didn't find the float.  I was indicating that I could see that one would exist but probably be for zoom rather than location.
Title: Re: How to find camera coordinates?
Post by: biolizard89 on October 23, 2013, 07:15:40 AM
Sorry for bumping a post, but I guess this forum is sufficiently low-activity that no one will object.

@yRB that's awesome that you were able to find the camera coords with a RBP on the player coords.  I need to try that once I get the head tracking stuff working, maybe I can support more games that way.

For what it's worth, in games where you can move the camera, it's not particularly hard (usually) to find the coords with an Unknown Value search.  I did this in Starfox Assault, F-Zero GX, and Super Monkey Ball 2 with minimal difficulty.  The only exception that I've seen is Sonic Adventure 2: Battle... for the life of me I cannot find the camera coords even though it's possible to move the camera... no idea what I'm doing wrong there.
Title: Re: How to find camera coordinates?
Post by: dcx2 on November 20, 2013, 03:37:53 PM
One trick is to exploit spatial locality.  That is, related data will likely be found close together.  For instance, you can find Mario's health, and there's a chance his coordinates will be located nearby.
Title: Re: How to find camera coordinates?
Post by: γRB on November 22, 2013, 08:51:16 PM
@biolizard89 , That's not exactly what I meant :P
In games in which when you move the camera moves aswell, it's pretty easy to find the camera, if you get what I mean, it's just like finding a normal coordinate.