FFXIV Log Memory Information

04/20/2012 22:10 lephino#1
I've currently found the offset for the ffxiv log pointer:


"ffxivgame.exe"+00F1C2F0 offset=30
offset=10c
offset=40

Now the issue i'm having is making sense of the log structure and how the game knows where to write the next line. With that current log structure listed above, directly after the 4 bytes listed for the log memory start region is a 2-4byte number that increases when you add a new chat line, yet I can't figure out if this is a "last byte" written offset or where it's pointing....

Also about 20 bytes before the memory location appears to be a counter of some sort and another set of bytes that increment when you type a new chat line.

Can anyone shed some light on the memory structure? Ideas of how to find the current line / last line written?

Thanks.


*edit* I've found that the next four bytes are actually a pointer to where in the log FFXIV should write next. The number that appears about 20bytes before the log structure loc appears to be a raw "counter" of lines that occurred. Each return key increases the value by 1, maxing at 256 (maybe just a line counter?!?).
04/21/2012 00:10 Cooleko#2
change last offset to 30 and check where it points from 0-4096 (by 4) will surprise you.
04/21/2012 05:13 lephino#3
so if I'm reading this right, it points to the byte offset from the base memory address. How were you able to determined that it recycled at 4096?

I keep seeing the address reset after 60 lines, while I can get the byte counter to point up passed 10,000 bytes.

intersting -10 from my offset gives the base address where the last byte array is stored, and -6 gives you the last location it wrote in that array. Very handy.
04/24/2012 03:38 Singular Conflux#4
Quote:
Originally Posted by lephino View Post
so if I'm reading this right, it points to the byte offset from the base memory address. How were you able to determined that it recycled at 4096?

I keep seeing the address reset after 60 lines, while I can get the byte counter to point up passed 10,000 bytes.

intersting -10 from my offset gives the base address where the last byte array is stored, and -6 gives you the last location it wrote in that array. Very handy.
I have not seen the text buffer go 10k. You will need to take care as the offsets array moves in memory until it hits max size, although the text buffer does not.

One is a pointer to an offsets array, another are pointers into the text buffer. If you like C# I can send you my game log processor code and you can walk through the part where pointers are setup, as well as managing the buffer wrapping.

Cooleko does his a little differently than I do but I suspect he has a shorter delay between polling the log, but that's only a guess on my part. So there is more than one way to manage the log.
10/31/2012 09:58 kidz14#5
sorry for bringing such an old topic back to the chopping board, but i've hammered away for some time now at the log on my own and got it all the way to where my 60 lines load up just fine, my problem now is i'm wondering is there a way to tell in memory somewhere where in the 0-4096 which block is being filled, like i've watched the memory and i see how it's filling the chat and then refilling it, my problem is on refill i'm not sure how to track where to load up to.
11/01/2012 05:00 lucid#6
Modulus division.

If there have been 72 lines written:
72 mod 60 = 12

...as such, the current pointer index is 12th from the start.
11/01/2012 05:24 kidz14#7
funny you mention something like that i was just going to try something similar :), also by the way that above method didn't work out for me instead, looking at the array of offsets for each line i compared it to a recently changed list and only added the updated values, and there we go i had what i needed, all chat lines coming in as they show up :)