Cheat Engine returning strange values for Final Fantasy 12 16:9 WS patch
#1
Before I begin, please, no debates on the merits of one aspect ratio over another. I have a 16:10 monitor, and so I am trying to make a 16:10 patch from a 16:9 patch. If you don't like the idea that someone in this day and age has a 16:10 monitor, please keep it to yourself.

The problem is that when I use Cheat Engine to examine the values at the memory adresses in the 16:9 patch, which was made by nemesis2000, I get some nonsensical values.

When I examine the game with the game set to 16:9 in the opening menu, I get

[attachment=44519]

That said, I am using the following patch as a base:

Code:
patch=1,EE,00180388,word,3C013f80
patch=1,EE,0018038c,word,34210000
patch=1,EE,0033d55c,word,3c020000

With this patch enabled I get
[attachment=44521]

There are two problems here. The first, and most obvious is that one of these values is returning NaN, or "not a number". The second is that the numbers are very small. that E-xx is 10 to the negative xx power. Thats quite tiny.

Both sets of values were taken from the same save state, so little should have changed between attempts besides that of time and the values changed by the pnach file.

When I instead set the game to 4:3 at the new game menu, I instead get "??" for all three values.

Another issue is the screen shots I'm posting contain different numbers than what CE was returning the first time I tried this. I'm not even getting the same numbers each time.

Whats going on?
i7 4930k @4.3, 4x4 GB RAM @2133 (15-15-15-27, quad channel), EVGA 570 @stock, Arch 64b.
Reply

Sponsored links

#2
There are no problems there the patch includes whole assembly, while you thought of it as values and randomly added its adresses. The person who made the patch didn't really thought about making it easy for whatever you want to do it with it and just converted the adresses of the lines he changed instead of pointing directly to values, his right to do that.

Either use ps2 disassembler and search for those in game executable which then should have sense or try to guess, which shouldn't really be that hard once you know those adresses point to line of code not just values.

Oh and stop scaring people with "I'm gonna tell on you" strategy, we have mods to judge who deserves what, it's turning off loads of potential help and probably now nobody's gonna do the job for you;p. Have fun figuring it out.
Reply
#3
So what you're saying is that my assumption that these are floating point values is erroneous? I'm new to this, and am trying to learn. What do you mean by "whole assembly"? The guides I've read say that what pnach files do is override the values at certain memory addresses with new values specified. Another said that in widescreen patches these are floating point values. I was following this guide by Synce and it seemed to work pretty well so far. Is there another guide that I should have read?
i7 4930k @4.3, 4x4 GB RAM @2133 (15-15-15-27, quad channel), EVGA 570 @stock, Arch 64b.
Reply
#4
Starts from you are seeking at the wrong place. all game's data start at address offset 2 (do not rely on the first digit on the code's address it is used to tell the code type). The cheat itself is out of standard, it should start with 2 at the address (because it's word) and more yet, should be used "extended" instead to prevent future mistakes.

That said, an original code starting with 0, 1 or 2 are respectively byte, short or word and despite it the actual address offset starts from 2xxxxxxxx. Same for all other codes types. Pnach mirrors addresses starting by 0 to point it to correct address automatically.

About the values you are getting at the current offsets, they are probably what to expect but notice that in the first case the third number it is stupidly small and in the second screenshot it is yet more superdupstupidly small that became denormal, a Nan=not a number.
Imagination is where we are truly real
Reply
#5
Okay, I saw that in How pnach files work that the first digits does little more than indicate what sort of operation we will be using and that it doesn't matter if its a 0, 1, or a 2. Also, the pnach files I've seen before do use extended, however it seems to work fine in game. Its just CE that doesn't seem happy with it. I take it if I was to search for 20180388 instead of 00180388, than the number would make more sense?

I can see that the numbers are ridiculously small, that's why I made this thread, but you are saying the first two numbers in the second set are normal? Also, are you saying I'm getting a NaN error because I'm getting something smaller than machine epsilon (I'm not familiar with denormal)? I wasn't aware that was possible, but then again my only experience with programming is the high level language in MatLab.

So then, should the pnach look like
Code:
patch=1,EE,20180388,extended,3C013f80
patch=1,EE,2018038c,extended,34210000
patch=1,EE,2033d55c,extended,3c020000
instead?

Putting this into CE, with the modified pnach (above) enabled I get
[attachment=44522]
and without the pnach I get
[attachment=44523]
which are identical. In this case the pnach doesn't seem to be working.

miseru99 had mentioned something about the pnach containing whole assemply. I have no idea what that's suppose to mean.
i7 4930k @4.3, 4x4 GB RAM @2133 (15-15-15-27, quad channel), EVGA 570 @stock, Arch 64b.
Reply
#6
Well, I'm not sure about the patches but almost certainly you should be treating the values as "word" (4 bytes) instead float. PS: No wonder that cheat engine is giving strange values when converting to FP number. Beware that although the actual value in binary is still the same, the result of tampering using different data format will be wrong.

About the assembly, I think is meant the conditional codes but those are special codes starting above 4 at first digit and is not the case here. Anyway pnach does not implement all codes, for instance the master code is totally useless and will just cause problems to pnach and should be removed (not the case here also but may be useful information to someone reading the thread).

Notice I'm talking about normal pnach usage, I'm not sure about how the widescreen patch works, does not matter for the case in question due to pnach is poking those values at those addresses at each frame. This would force the emulator to use the values even if the game is trying to change them. So if that's the case the actual values seen on cheat engine may be different if the emulator was paused after the game changing them.

Edit: The above has another consequence, changing the value with cheat engine will not do the trick because pnach would return the values at the file as soon as you resume the emulation... to be meaningful you need to change the values at the pnach and force the file lecture once again or stop cheats (stop pnach) before tampering with the values with cheat engine.

Better yet, stop pnach at once (disable cheats at the GUI) and since you already know the addresses, enter the values directly and from there you can proceed. Just remember, those are not Float Point numbers (or so I believe).
Imagination is where we are truly real
Reply




Users browsing this thread: 1 Guest(s)