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 


How to decrease/increase value of XMM0?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
Meiyoh
Master Cheater
Reputation: 1

Joined: 14 Mar 2015
Posts: 400

PostPosted: Sun Apr 11, 2021 12:35 pm    Post subject: How to decrease/increase value of XMM0? Reply with quote

code:
adds xmm0,(float)300
movdqa [rcx+10],xmm0
jmp return


doesnt work

i want XMM0 to be decreased by float 300 but it does not work

so for example when game works it always decreases the value by 300 float before adding it to the rcx register?

_________________
I am the forgotten one the dead one.
Back to top
View user's profile Send private message
Oxijen
Expert Cheater
Reputation: 0

Joined: 07 May 2020
Posts: 163
Location: On The Moon

PostPosted: Sun Apr 11, 2021 12:44 pm    Post subject: Reply with quote

Code:
mov     rax,1.0
movq    xmm1,rax
addsd   xmm0,xmm1 

this would probably work on x64

_________________
I can see you Hitler
Especially When I am On the Moon!!
You are Right now in cheat engine forum Wink
Back to top
View user's profile Send private message
Meiyoh
Master Cheater
Reputation: 1

Joined: 14 Mar 2015
Posts: 400

PostPosted: Sun Apr 11, 2021 1:25 pm    Post subject: Reply with quote

Oxijen wrote:
Code:
mov     rax,1.0
movq    xmm1,rax
addsd   xmm0,xmm1 

this would probably work on x64


this adds correct?
1.0 to the xmm0


and thanks btw

_________________
I am the forgotten one the dead one.
Back to top
View user's profile Send private message
MMM-304
Expert Cheater
Reputation: 0

Joined: 17 Aug 2020
Posts: 166
Location: Milkey Way

PostPosted: Wed Apr 14, 2021 8:20 am    Post subject: Reply with quote

This way it will add to only lowest 4 bytes (a float) value
Code:

push (float)300
addss xmm0,[rsp]
add rsp,8



This way it will add to all 4 bytes (all 4-floats) value, same amount (cuz you are using packed data in movdqa [rcx+10],xmm0)
Code:

sub rsp,#16
movups [rsp],xmm1 //;backing up xmm1

push (float)300
movss xmm1,[rsp]
shufps xmm1,xmm1,0
addss xmm0,xmm1
add rsp,8

movups xmm1,[rsp] //;restoring xmm1
add rsp,#16


Last edited by MMM-304 on Wed Apr 14, 2021 10:52 am; edited 1 time in total
Back to top
View user's profile Send private message
Meiyoh
Master Cheater
Reputation: 1

Joined: 14 Mar 2015
Posts: 400

PostPosted: Wed Apr 14, 2021 10:03 am    Post subject: Reply with quote

MMM-304 wrote:
This way it will add to only lowest 4 bytes (a float) value
Code:

push (float)300
addss xmm0,[rsp]
add rsp,8



This way it will add to all 4 bytes (all 4-floats) value, same amount (cuz you are using packed data in movdqa [rcx+10],xmm0)
Code:

sub rsp,#16
movups [rsp],xmm1 //;backing up xmm1

push (float)300
movss xmm1,[rsp]
shups xmm1,xmm1,0
addss xmm0,xmm1
add rsp,8

movups xmm1,[rsp] //;restoring xmm1
add rsp,#16


Hello thank you very much
However it gives me error with this line :
shups xmm1,xmm1,0

_________________
I am the forgotten one the dead one.
Back to top
View user's profile Send private message
MMM-304
Expert Cheater
Reputation: 0

Joined: 17 Aug 2020
Posts: 166
Location: Milkey Way

PostPosted: Wed Apr 14, 2021 10:53 am    Post subject: Reply with quote

oh it was a typo, fixed it (its actually shufps)
Back to top
View user's profile Send private message
Meiyoh
Master Cheater
Reputation: 1

Joined: 14 Mar 2015
Posts: 400

PostPosted: Wed Apr 14, 2021 12:14 pm    Post subject: Reply with quote

THANKS A LOT Smile
_________________
I am the forgotten one the dead one.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine 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