The Elite Forum

The Big Three Plus One => GoldenEye 007 => Topic started by: Wodahs-Reklaw on March 07, 2015, 09:33:29 pm

Title: Help Getting Relevent TAS Tools and other things
Post by: Wodahs-Reklaw on March 07, 2015, 09:33:29 pm
Hey I was thinking about getting into TASing some stuff in GE just to learn some stuff I guess and to test things. I was wondering what emulator/tas tools and other tools (memory location readers and a list of relevant addresses) were available and recommended.  Any help would be appreciated :)
Title: Re: Help Getting Relevent TAS Tools and other things
Post by: Wyst3r on March 08, 2015, 07:48:34 am
I guess the recommended emulator these days is BizHawk (whatever the latest version is). I haven't actually TAS'ed with this myself and I found it to be a little harder to set the analog stick positions with, but maybe it's just a matter of getting used to it. The built-in memory watching is a very nice and the emulator is the best overall. It's also alot better when it comes to capturing .avi files (mupen requires a workaround using .kkapture, which works pretty well but still is a bit of work to set up).

The alternative is Mupen64 (anti-ds version preferably). I've used this for all my TAS'es, and continue to do so with my in-progress (dead?) 00 Agent TAS. To use memory watching with this emulator, you need a third-party software called MHS. The main disadvantage of this compared to built-in memory watcher, is that you have to watch the emulators address space, and not the N64's. This makes it alot harder to compare addresses with GS codes, find relevant addresses etc etc... For Mupen64, you want the TAS input plugin. BizHawk has a nearly identical version built-in i believe.

So just go ahead and use BizHawk. Considering it's still in very active development, we can expect a steady improvement and new features.

In terms of addresses to watch, i could probably write a book about it. The universal ones would be:

079A20 (unsigned int) - Mission timer
024464 (hex) - RNG

Most other addresses will change when you start up a new level. However, the offsets between addresses remain the same, and as long as there is 1 address that you can easily find, you'll also find the rest. The most important data block to keep track of is the guard data block:

http://goldeneye.wikia.com/wiki/Guard_Data

Note that this list isn't entirely accurate and the descriptions aren't always good. I have my own list which include some of the most important values:

0x20 - Collision Radius      (float) - The guards collision radius.
0x24 - Collision Radius      (float) - Can't remember why i have 2 of these.
0x28 - Bond X            (float) - Last known position of Bond. See my fact's topic post about tracking.
0x2C - Bond Y            (float)
0x30 - Bond Z            (float)
0x6C - Distance Travelled (path)    (float) - Unloaded travel when guard is walking along a path. Similar to the values below.
0x70 - Segment Length (path)   (float)
0x90 - Distance Travelled       (float) - See Facts video #1.
0x94 - Segment Length       (float)
0xB8 - Position X         (float) - Position when guard is loaded.
0xBC - Position Y         (float)
0xC0 - Position Z         (float)
0xD0 - Time            (unsigned long) - Last time Bond was seen i think. The value doesn't come from the mission                timer, but rather a separate timer which includes the cinemas.
0xF8 - Damage Dealt         (float) - Starts out negative if guard has BA.
0xFC - Health            (float) - Total health of the guard. When damage dealt reaches this value, the guard dies.
0x100 - Action Block Pointer   (hex) - Beginning of current action block.
0x104 - Action Block Return        (short)
0x106 - Action Block Offset      (short) - Current byte offset within the action block. This will always point towards a "Leave the routine but..." statement. Since we always break execution at the beginning of a new frame.
0x10C - Timer            (unsigned long) - Individual timer for each guard/NPC. This is what's used by Natalya on Control for example.

I think these offsets might be relative to the word containing the "Current Action Type" byte. Reason being that it's the easiest value to find. If guard is standing still, value is 1. If he's been shot, its 6. If he's dying it's 4. If he's fading out or dead, it's 5 etc... So just do a RAM search for such a byte and it'll lead you to the guard data block.

If you've found one guard's data, you can add or subtract 0x1DC to find the next/prev guard's data block. Respawning guards will spawn in the first available slot (a slot becomes available when a guard dies).

Apart from guard data, there's also Bond's data. This includes stuff like position/speed etc... It seems to depend on which level you're playing:

Dam/Control(?) - 0x800D30A8
Facility - 0x800B64A8
Train/Jungle - 0x800c04A8
Egypt - 0x800CCCA8

The offsets that i've found so far (All floats):

0x00 - Angle (Horizontal)
0x10 - Angle (Vertical)
0x344 - Position X
0x348 - Position Y
0x34C - Position Z
0x368 - Collision Radius (This is always 30, making it extremely easy to find).
0x3D8 - Speed X
0x3DC - Speed Y
0x3E0 - Speed Z
0x938 - Noise value (See my weapons/noise facts post)

And lastly, there's another set of speed values which are the ones that have been used in every TAS thus far. They are some kind of scaling value, and not the absolute speed. There's a foward speed, and a strafe speed. Forward is 1.08 when you start holding foward, and then increases to 1.35 after about 3 seconds. Strafe speed is always -1.0/+1.0.
Title: Re: Help Getting Relevent TAS Tools and other things
Post by: Wodahs-Reklaw on March 08, 2015, 11:38:39 am
Thanks a lot man, ill get all of this setup and it should be straight forward I think. I am happy to see another emulator than mupen nowadays as I think it might better capture n64 performance, but then again I have no idea if that is the goal of the emulator.
Title: Re: Help Getting Relevent TAS Tools and other things
Post by: Wyst3r on March 08, 2015, 03:09:12 pm
BizHawk is Mupen64 (Plus). They literally took the source code from several existing emulators and integrated them into a single (better) application.

Then again, they've probably made some changes/improvements along the way.
Title: Re: Help Getting Relevent TAS Tools and other things
Post by: Wodahs-Reklaw on March 08, 2015, 04:00:37 pm
yea I realized that after launching bizhawk lol