|
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
hhhuut Grandmaster Cheater Reputation: 6
Joined: 08 Feb 2015 Posts: 607
|
Posted: Fri Aug 28, 2015 9:00 am Post subject: FPU compare for zero |
|
|
Hey guys,
I got a problem with the FPU stack, trying to compare the seventh element with zero and reacting accordingly ...
If I debug an address and open the xmm-register view, I can use the first combo box to choose between XMM and FPU.
To differ between AI and human players, I need to compare the seventh stack element with zero.
If it is zero, then it's a human player, if not, then it's an AI ...
Also important is, that only the second part of the seventh FPU element holds my required information. I think this could be solved by comparing the element as a qword, but I'm not really sure ...
Hope you guys understand my problem (if not then ask what you need to know, pls) and can come up with a solution
Greetz
hhhuut
|
|
Back to top |
|
|
Zanzer I post too much Reputation: 126
Joined: 09 Jun 2013 Posts: 3278
|
Posted: Fri Aug 28, 2015 1:32 pm Post subject: |
|
|
Wonder how much more complicated this is than it needs to be...
Code: | alloc(backup,4)
alloc(compare,4)
fstp dword ptr [backup]
fldz
fadd st(0),st(7)
fstp dword ptr [compare]
fld dword ptr [backup]
cmp dword ptr [compare],0
je return |
edit: Guess I could've just done
Code: | alloc(backup,4)
fstp dword ptr [backup]
fldz
fcomip st(0),st(7)
fld dword ptr [backup]
je return |
Or should these be "JZ" instead of "JE"?
|
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
|