Patch Finder and floating point values.
#1
Hi, I've been fiddling around with the patch finder and I'm looking to update a value of a time which happens to be a float in the game. I noticed the patch finder only show integer values. Now, while I fully recognize that the actual value may be stored as an integer in milliseconds or some set tick amount... I'm curious to know how to find the value if it was in fact being stored as a float. Would it be as simple as converting the integer value into its IEEE standard float equivalent and just searching for that integer value or is there more to it?
Reply

Sponsored links

#2
What's that game,I've never encounter PS2 game that use floating point values?
Maybe it's reverse integer or the value is coded or uses hex for values but you see dex values in the game.

For example when you see 10 in the game,the value you have to search for if you're going to search integer is not 10 but 16(10 in hex)
Reply
#3
In Final Fantasy X, I'm looking at the timer in the Butterfly Catching mini game. It's a timer that counts down from 30.0 to 0. It displays with the point, but I'm fairly certain it's not being stored as a float. I was just curious to know how it the patch editor would work with floats. If you don't believe anything is every stored as floats, then I guess that's a good enough answer. As for this value, I'm going to have to figure something out in order to find it. The issue is that I'm not certain of what size the value is stored. Clearly it's greater than an 8-bit value, but should I just assume the value is stored in the smallest size it fits into?

I don't quite see why they would store it in some quasi-hexadecimal format. It would only increase the space the value requires and would add a whole lot of extra unnecessary computational cycles for the processor. I'll take your word for it if they do it, however.
Reply
#4
Well it is possible to be 300 or to run in reverse way.Try this:
1.EE RAM,16bit,Equal,Old Value(since this is your first try searching,Old Value means all possible 16bit values)
2.Go to the game for some seconds and return to the Patch Finder
3.Smaller,Old Value(this means that the value decrease)
4.And continue to return to the game and back to the patch finder and use Smaller,Old Value till you find the cheat.

(07-24-2009, 10:12 AM)IAmBill Wrote: I don't quite see why they would store it in some quasi-hexadecimal format. It would only increase the space the value requires and would add a whole lot of extra unnecessary computational cycles for the processor. I'll take your word for it if they do it, however.

That's something like anti cheaters...Valkyrie Profile is really hard game to find cheats.Gran Turismo 4 it's not easy too,Star Ocean 3 too
Reply
#5
In my (limited) experience messing around with PS2 games, I haven't seen a single interesting variable stored as a float. I assume the game devs avoid using them for performance and accuracy reasons.

For something like the timed minigame, I'd have an integer store the full expansion (ie store '300') and decrement it every tenth of a second. This would require at least a 9-bit value (8-bit integers only count up to 255 at most), so I'd start searching with 16-bit and see what happens. Should go quick if this is how it's stored.
Another possibility is that the time really is stored as a much more complicated expression, and some routine converts that into the 30.0 you see on screen.

The built-in patch finder is nice, but I'd suggest getting ArtMoney if you're really looking for something obscure or difficult.
"This thread should be closed immediately, it causes parallel imagination and multiprocess hallucination" --ardhi
Reply
#6
Cool. Some very interesting stuff.

I did about 12 searches in the thirty seconds and I continue to come up with nice consistently shrinking values.

Three of which definitely seem to pertain to the counter. Two of them directly coorespond to the whole value of the clock. That is to say, if the timer is at 4.3 seconds these two values show 4. There is also another value which seems to correspond to this clock as well... it appears to show three times the value of the clock in tenth seconds (rounded up). That is to say if the clock shows 1.1 seconds, then this value is anywhere from 33 to 31 inclusive.

This is sensible to me... the third value represents the counter. I would assume the other two represent the value the game has calculated to be displayed... however, why there are two, I don't know.

That said, I assume that if I just update the counter value to what I wish, the game will do the calculations on the display value itself on the next tick. I'll give this a shot and update on how it went. Thanks for your help!
Reply
#7
Eh... no luck. I'm getting an error trying to load the pnach I created. Perhap I'm doing it wrong...

Here is a copy of the pnach.

658597E2.pnch Wrote:gametitle= Final Fantasy X International [SLPM 65478] (J)
comment=
//ZeroS Patcch - GAME_FFXHACK
zerogs=000000080
patch=1,EE,00bbfe68,short,900

Here is the error in shown in emuLog.txt.
emuLog.txt Wrote:XML Loader returned an error. Trying to load a pnach...
gametitle: Final Fantasy X International [SLPM 65478] (J)
comment:
patchnumber: 1
HDD Enable:1

vtlb miss : addr 0x63A06BB, mode 1

Does anything stick out as a problem? I must admit, I don't fully know what's going on in the patch line. I read a quick article on it that basically told you what to do and not why you're doing it. I got the general idea, I just don't know what the first value is or why exactly I made it 1. Following it, of course, is the address, then I assume the dat value. hen the value. Any more info on this would be great.

EDIT: I should note that changing the initial 1 to a 0 in the patch line fixes the crash, but I still get the same error minus the "vtlb"me, e and in game, of course, the patch doesn't work.

EDIT 2: Ok, so h looks like I have a few things wrong. I've figured out that the first value represents and enable/disable bit... so that's cool and it makes sense why it doesn't crash when it's set to zero. Next, I not see that the value is written in hex, not in decimal. Lastly, I assume I shouldn't be using "short" as the datatypmething ther something like "word" or another ASM style type along those lines. Still can't get it to work, though. I'll start googling some info on this.
Reply
#8
ep something sticks out like a sore thumb

zerog=000000080

should be

zerogs=000000080 (or you can delete this line if you arent using zerogs)

also your value is 1 digit short in your patch
[Image: ref-sig-anim.gif]

Reply
#9
(07-24-2009, 12:00 PM)refraction Wrote: ep something sticks out like a sore thumb

zerog=000000080

should be

zerogs=000000080 (or you can delete this line if you arent using zerogs)

also your value is 1 digit short in your patch
The file actually says zerogs... however, if you notice there seems to be a ton of typos in my quotes now that I swear were not there when I posted them. They weren't even there when I reviewed them in the thread afterword. I noticed this earlier and then fixed them in an edit... and now they're back and, in fact, different. I don't know what is changing my posts but something is making it all screwy.

At this point, I removed the zerogs line. I realized it was something I didn't need and took it out. I don't know about the value being one digit short... you're saying it has to show all leading zeros (to 16-bit in this case)? I tried to fix it up and came up with something like this... how does it look?
Quote:gametitle= Final Fantasy X International [SLPM 65478] (J)
comment=
// Butterfly time limit
patch=1,EE,00bbfe68,short,0356

This still causes my game to crash and the file is still flagged as an error.
Reply
#10
Ok, the current state of affairs is as follows:

I converted the patches into RAW codes just to see if I could get them to work that way... and I did.

patch=1,EE,00bbfe68,short,0356

became

10bbfe68 00000356

and it works just fine. However, one catch... if I had the code enabled before I entered the game, it froze my character... not the game, that continued fine, just my character and the timer never starts. If however, I apply it after the game begins, the timer counts down and keeps resetting to a specific number when it hits 0. I can then continue the game for as long as I wish and the results are fine. This, I imagine is just a few other codes that I'm missing and could be fixed... however, I still can't figure out why the XML Loader doesn't like my pnach file. It looks fine to me and exactly like others that I have seen.
Reply




Users browsing this thread: 1 Guest(s)