Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


adding a value?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
Freiza
Grandmaster Cheater
Reputation: 22

Joined: 28 Jun 2010
Posts: 662

PostPosted: Mon Mar 14, 2011 3:01 am    Post subject: adding a value? Reply with quote

Code:
movss [edi+34],xmm0


1) I want to add 5000 to [edi+34]
2) add 5000 to xmm0
how to do that?
tried
Code:
add dword ptr [edi+34],(float)5000 // but gives unexpected results..


and

comiss [var],xmm0 is not compiling in ce 6.0..

If possible please give me the link to movss,addss,comiss instructions etc..
Back to top
View user's profile Send private message Send e-mail
justa_dude
Grandmaster Cheater
Reputation: 23

Joined: 29 Jun 2010
Posts: 893

PostPosted: Mon Mar 14, 2011 8:28 am    Post subject: Reply with quote

http://en.wikipedia.org/wiki/X86_instruction_listings

Try fld, fadd and fstp.


fld dword ptr [edi+34] //load value into fpu
fadd 5000.0 //add value to accumulator
fstp dword ptr [edi+34] //store value, pop fpu stack, rotate barrel

It's been a few months since I've used CE. Not 100% sure on the syntax atm, but that's the general idea.

For the missing instruction, you can always use a bytecode instead of relying on the assembler.

Cheers,
adude
Back to top
View user's profile Send private message
Geri
Moderator
Reputation: 111

Joined: 05 Feb 2010
Posts: 5627

PostPosted: Mon Mar 14, 2011 10:00 am    Post subject: Reply with quote

I am not sure it is possible to use

fadd 5000

I always allocate some space to store the value I need to add like this:

Code:
alloc(plusamount,4)

plusamount:
dd (float)5000

fld dword ptr [edi+34] //load value into fpu
fadd dword ptr [plusamount] //add value to accumulator
fstp dword ptr [edi+34] //store value, pop fpu stack, rotate barrel

_________________
My trainers can be found here: http://www.szemelyesintegracio.hu/cheats

If you are interested in any of my crappy articles/tutorials about CE and game hacking, you can find them here:
http://www.szemelyesintegracio.hu/cheats/41-game-hacking-articles

Don't request cheats or updates.
Back to top
View user's profile Send private message
Freiza
Grandmaster Cheater
Reputation: 22

Joined: 28 Jun 2010
Posts: 662

PostPosted: Mon Mar 14, 2011 11:38 am    Post subject: Reply with quote

and how to add 5000.0 to xmm0?
Back to top
View user's profile Send private message Send e-mail
Dark Byte
Site Admin
Reputation: 471

Joined: 09 May 2003
Posts: 25831
Location: The netherlands

PostPosted: Tue Mar 15, 2011 1:34 am    Post subject: Reply with quote

never used it, but I think addss xmm0, [addresswiththefloatvalue5000]

so:
Code:

alloc(plusamount,4)

plusamount:
dd (float)5000

...

addss xmm1,[plusamount]

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
Freiza
Grandmaster Cheater
Reputation: 22

Joined: 28 Jun 2010
Posts: 662

PostPosted: Tue Mar 15, 2011 11:10 am    Post subject: Reply with quote

this one will put 5000 to the lower 32bit..
i want to put it like this

Code:
alloc(plusamount,32) // allocate 128 bits

plusamount:
dd (float)5000  // what should i write in this line

...

addps xmm1,[plusamount]  // addps is a 128 bit addition
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites