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 


Some kind of error, but I'm not sure what kind

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
bknight2602
Grandmaster Cheater
Reputation: 0

Joined: 08 Oct 2012
Posts: 586

PostPosted: Mon Oct 08, 2012 5:50 pm    Post subject: Some kind of error, but I'm not sure what kind Reply with quote

I'm searching for some bytes (2) in HOMM2, using 6.1.
I know from previous work that a heroes max movement is h27 from name and cur movement h2B. So I searched for a name and found the location for the name and copied those two addresses.
I'm trying to find where the program has the movement values so I did a search of the game for the max and cur (equals max since there has not been movement) values listed in the table. To my surprise the values in the table do not show in the search results. I thought there may have been a conflict, so I closed CET and the game. Started up each, found the name and the movements, searched for that value again and the same behavior was observed the addresses in the table were not listed in the search.
Stupid question but what am I doing wrong?
Back to top
View user's profile Send private message Yahoo Messenger
Gniarf
Grandmaster Cheater Supreme
Reputation: 43

Joined: 12 Mar 2012
Posts: 1285

PostPosted: Tue Oct 09, 2012 4:25 am    Post subject: Re: Some kind of error, but I'm not sure what kind Reply with quote

bknight2602 wrote:
heroes max movement is h27 from name and cur movement h2B.
If I understand that correctly, you mean that the address for current movement always ends with 0x2B. In this case your problem is memory alignment. See the "fast scan 4 alignment" part in cheat engine? It means that cheat engine will only scan addresses that are a multiple of 4, and guess what, an address that ends by 0xb=11 isn't a multiple of 4.

Technically only looking up addresses that are a multiple of 4 is justified in 32bit applications since allocated memory will always be 4 byte aligned unless a specific option is set making the program.

tldr: disable the "fast scan" option.
Back to top
View user's profile Send private message
bknight2602
Grandmaster Cheater
Reputation: 0

Joined: 08 Oct 2012
Posts: 586

PostPosted: Tue Oct 09, 2012 10:07 am    Post subject: Re: Some kind of error, but I'm not sure what kind Reply with quote

Gniarf wrote:
bknight2602 wrote:
heroes max movement is h27 from name and cur movement h2B.
If I understand that correctly, you mean that the address for current movement always ends with 0x2B. In this case your problem is memory alignment. See the "fast scan 4 alignment" part in cheat engine? It means that cheat engine will only scan addresses that are a multiple of 4, and guess what, an address that ends by 0xb=11 isn't a multiple of 4.

Technically only looking up addresses that are a multiple of 4 is justified in 32bit applications since allocated memory will always be 4 byte aligned unless a specific option is set making the program.

tldr: disable the "fast scan" option.


I guess I didn't give a clear description of the issue. Refer to document attached:
You will see Hero "Alamar" with 2 2 byte locations beneath one at h27 and the other h2B from his name.
Now look at the search results the addresses h02B67F15 and h02B67F19 are NOT in the scan search, and that is what I was trying to explain.



CET_HOMM2.png
 Description:
 Filesize:  438.18 KB
 Viewed:  4904 Time(s)

CET_HOMM2.png


Back to top
View user's profile Send private message Yahoo Messenger
Dark Byte
Site Admin
Reputation: 470

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

PostPosted: Tue Oct 09, 2012 10:27 am    Post subject: Re: Some kind of error, but I'm not sure what kind Reply with quote

Gniarf wrote:


tldr: disable the "fast scan" option.

_________________
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
bknight2602
Grandmaster Cheater
Reputation: 0

Joined: 08 Oct 2012
Posts: 586

PostPosted: Tue Oct 09, 2012 11:04 am    Post subject: Re: Some kind of error, but I'm not sure what kind Reply with quote

Dark Byte wrote:
Gniarf wrote:


tldr: disable the "fast scan" option.


Thanks for the clarification, the scan works properly, bt I'm not sure why disabiling the fast scan makes a difference.
Back to top
View user's profile Send private message Yahoo Messenger
Dark Byte
Site Admin
Reputation: 470

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

PostPosted: Tue Oct 09, 2012 11:17 am    Post subject: Reply with quote

Fastscan skips unaligned memory because properly designed games would never store values unaligned since it's slower to access by the cpu.
This game does store the values unaligned which is why you need to disable fastscan so ce also scans that

_________________
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
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