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 


Addresses List

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

Joined: 24 Jan 2007
Posts: 1857

PostPosted: Mon Nov 09, 2009 6:13 pm    Post subject: Addresses List Reply with quote

How does CE implement this or rather, how does it store that list ? On disk, linked list, huge array, etc. ? Just curious a bit.

Also how do you split up the job in terms of multithreading ? It seems inefficient to me to create a new thread for each block of scanning although that would take advantage of multiple cores/processors. I assume CE does it more intelligently ?
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

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

PostPosted: Tue Nov 10, 2009 4:53 am    Post subject: Reply with quote

The addresslist is stored asa huge array on disk.

First it queries all the memory that is in the process using virtualqueryex

Then it splits that amount by the number of cores your system has and assigns each cpu core the memory blocks that fall in the appropriate regions

Each thread has it's own list of results (addresslist) and at the end all the results are concatenated into the final addresslist.

On a next scan that addresslist is split into the number of cores, and scanned like that. Of course, it's not read into memory all at once, but in small chunks

_________________
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
Slugsnack
Grandmaster Cheater Supreme
Reputation: 71

Joined: 24 Jan 2007
Posts: 1857

PostPosted: Tue Nov 10, 2009 11:35 am    Post subject: Reply with quote

I thought of a solution which was to split it in the way you describe but instead of storing as an array to store it in the listview on the left holding addresses/values. And then next scan could just read off there too.

Am I correct in guessing the reason you don't do that is for the cases when that listview will not be able to hold enough elements ?
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

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

PostPosted: Tue Nov 10, 2009 11:54 am    Post subject: Reply with quote

more because it's too slow (adding a item will create a new listview item, which is then assigned to the list, this is way slower than just using raw data)

also, the listview of ce doesn't contain the addresslist itself, it just holds a pointer to the start of the file based on the current scroll position and only updates the list from disk when you scroll

_________________
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
Slugsnack
Grandmaster Cheater Supreme
Reputation: 71

Joined: 24 Jan 2007
Posts: 1857

PostPosted: Tue Nov 10, 2009 12:11 pm    Post subject: Reply with quote

If it's a speed thing, why not do it all in memory in a vector or something ? Too small ?

Oh and umm just something small. I wondered how you make it on your listview so it selects the whole row. In the past I've worked with listviews and they only select one subitem, eg:



The way you're only loading stuff into the listview on demand is very nice though :]
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

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

PostPosted: Tue Nov 10, 2009 12:19 pm    Post subject: Reply with quote

memory reasons

imagine a binary scan for the value 0 in a process that has a 1 GB array all initialized to 0
That'd mean it has 8*1GB entries * 5 bytes for a binary entry (address+bit specifier)

and since ce has been designed for 32-bit, there's just not enough memory in a process to store that (so it just fetches the previous 1000, and next 1000, so simply moving up/down won't hog the harddisk)

and for selecting the whole line: If you're using delphi, you'd have to set the property "rowselect" to true"

_________________
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
Slugsnack
Grandmaster Cheater Supreme
Reputation: 71

Joined: 24 Jan 2007
Posts: 1857

PostPosted: Tue Nov 10, 2009 4:48 pm    Post subject: Reply with quote

ahhh very nice. figured out the line thing too :
Code:
DWORD dwStyle = SendMessage( GetDlgItem( hwndDlg, IDC_PROCESSLIST ), LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0 );
SendMessage( GetDlgItem( hwndDlg, IDC_PROCESSLIST ), LVM_SETEXTENDEDLISTVIEWSTYLE, 0, dwStyle | LVS_EX_FULLROWSELECT );
Back to top
View user's profile Send private message
Slugsnack
Grandmaster Cheater Supreme
Reputation: 71

Joined: 24 Jan 2007
Posts: 1857

PostPosted: Wed Nov 11, 2009 7:46 am    Post subject: Reply with quote

next question hahaha. what regions does CE scan ? i thought it was PAGE_READWRITE but i'm not so sure anymore

btw thanks a lot for your time answering

also when doing dword/word scans does CE only check on dword/word aligned addresses ?
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

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

PostPosted: Wed Nov 11, 2009 8:45 am    Post subject: Reply with quote

that depends on multiple settings.
e.g if you want readonly memory to scan as well or not

also, don't only check for page_readwrite, also check for page_execute_readwrite (they are 2 different bits)

it also scans mem_private and mem_image , but by default skips mem_mapped memory (that's memory of either a file mapping, or mapped hardware memory like that of the graphics card. Useless for almost anything)

_________________
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