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 


Help on Tutorial 6

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
Pantsu
Newbie cheater
Reputation: 0

Joined: 17 Mar 2015
Posts: 23

PostPosted: Sun Jul 19, 2015 1:46 am    Post subject: Help on Tutorial 6 Reply with quote

Original Tutorial Thread:
http://forum.cheatengine.org/viewtopic.php?t=542093
See chapter 8: Tutorial 6


Tutorial 6 seems to be an easy thing to do for a non-programmer like me but how do I modify if I get something like this:
Code:
movq [ebx+00000440],xmm0

seems different compared with the example because of the "xmm0"
I don't know what that means. simply changing movq to add and adding ",2" (for example) wouldn't work.
Back to top
View user's profile Send private message
Daijobu
Master Cheater
Reputation: 13

Joined: 05 Feb 2013
Posts: 301
Location: the Netherlands

PostPosted: Sun Jul 19, 2015 3:03 am    Post subject: Reply with quote

movq - move quadword (64 bits / 8 (bits per byte) = 8 bytes)
http://x86.renejeschke.de/html/file_module_x86_id_201.html

xmm0 - a SSE register which can hold 128 bits / 8 = 16 bytes.
https://en.wikibooks.org/wiki/X86_Assembly/SSE#Registers

And SSE(2) instructions:
http://softpixel.com/~cwright/programming/simd/sse2.php


As to your tutorial. I can't know what xmm0 holds. But let's assume it holds a double-precision float value (64 bits).
(Another good read: http://stackoverflow.com/questions/801117/whats-the-difference-between-a-single-precision-and-double-precision-floating-p)
We don't need to use movq since it's a SSE instruction and we're not going to use these registers right now.

We know that [ebx+440] is our target. Whatever is xmm0, is not relevant to me since I don't know what it is. We know xmm0 holds a float value, therefore we write a float value.

Take this:
Code:
mov [ebx+440],(float)1.0


(float)decimal.value is a CheatEngine AutoAssembler instruction. This will automatically convert the value following it to a floating point value as hexidecimal.
The regular mov instruction simply copies a value or register or register's contents to its target. In this case (base)ebx + (offset)440 = address and into this [address].

Now we've moved a float value of 1.0 into our target address. Originally the instruction moved a quadword (movq) from register xmm0 into our target and cleared the top 64 bits (quadword) from register xmm0.
We've ignored this and simply changed the instructions to fit our needs; moving a value into our target register in stead.

_________________
Scripts/tables from scratch. Relation to other scripts is coincidental. Use of posted code is credited properly.
Euro Truck Simulator 2 Backwards Compatible Cheat
American Truck Simulator Backwards Compatible Cheat
Back to top
View user's profile Send private message
Pantsu
Newbie cheater
Reputation: 0

Joined: 17 Mar 2015
Posts: 23

PostPosted: Sun Jul 19, 2015 4:43 am    Post subject: Reply with quote

So I tried typing the code:
Code:
mov [ebx+440],(float)1.0

Except I changed the 1.0 into 500

I thought I'd gain 500 every time the value updates.
The only thing happened was extend the value with a lot of zeros since it is a float.

I was aiming for the experience.
example:
100/2000 - I needed 1900 more to lvl up.
when I injected mov [ebx+440],(float)500
it only became like this:
10000000/200000000 (I'm not sure about the zeros, I didn't really counted)

I really don't know anything Razz
I thought it's that simple to change just like in the tutorial.
Back to top
View user's profile Send private message
Daijobu
Master Cheater
Reputation: 13

Joined: 05 Feb 2013
Posts: 301
Location: the Netherlands

PostPosted: Sun Jul 19, 2015 5:32 pm    Post subject: Reply with quote

If that's the case you likely do not have the correct instruction. Or you do, but you need to filter it (if it's a shared instruction).
_________________
Scripts/tables from scratch. Relation to other scripts is coincidental. Use of posted code is credited properly.
Euro Truck Simulator 2 Backwards Compatible Cheat
American Truck Simulator Backwards Compatible Cheat
Back to top
View user's profile Send private message
Pantsu
Newbie cheater
Reputation: 0

Joined: 17 Mar 2015
Posts: 23

PostPosted: Wed Jul 22, 2015 7:34 pm    Post subject: Reply with quote

Could you "guess" a code to inject that I could just copy and paste?
Something that adds an X value to it when it increase or decreases.
Back to top
View user's profile Send private message
Daijobu
Master Cheater
Reputation: 13

Joined: 05 Feb 2013
Posts: 301
Location: the Netherlands

PostPosted: Thu Jul 23, 2015 6:28 am    Post subject: Reply with quote

Use a "find out what writes to this address" on the original address. Then find the instruction that adds to the value and modify that.

Should be the easiest route to take.

_________________
Scripts/tables from scratch. Relation to other scripts is coincidental. Use of posted code is credited properly.
Euro Truck Simulator 2 Backwards Compatible Cheat
American Truck Simulator Backwards Compatible Cheat
Back to top
View user's profile Send private message
Pantsu
Newbie cheater
Reputation: 0

Joined: 17 Mar 2015
Posts: 23

PostPosted: Fri Jul 24, 2015 12:16 am    Post subject: Reply with quote

I'm not a programmer so I have no idea how to find, understand, and modify this instruction that adds to the value.
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