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 


'Fast Scan' & 'Slow Scan'
Goto page Previous  1, 2, 3
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Slugsnack
Grandmaster Cheater Supreme
Reputation: 71

Joined: 24 Jan 2007
Posts: 1858

PostPosted: Thu Apr 08, 2010 11:43 am    Post subject: Reply with quote

CristoferMartins wrote:
Hey people,i have a question.
I make a prototype of a scan,and i dont know if this is efficient.
For search integer i copy the all memory of a region to a array of integers and then loop in this array...
Anyway,anyone know a amazing way to read the memory fast and work correct?I dont understand the cheat engine code...

if you only want to scan aligned addresses. if not you could use a for loop and address each one as a pointer to whatever type you are scanning
Burningmace wrote:
Just a quick thought. Which of these is quicker?

1) Find page address and size, read whole page with single ReadProcessMemory call and iterate through that block of memory as a set of bytes, casting appropriately.
2) Find page address and size, read each value with its own ReadProcessMemory call.

you have a load of overhead on each call to rpm. also by doing all the scanning in one go, you can take advantage of your cpu's caching which will give a significant speed up.

i also think you are making a conceptual mistake refering to a 'page address and size'. page sizes are fixed. virtualquery/ex returns information about a range of contiguous virtual pages sharing the same memory properties

_________________
Back to top
View user's profile Send private message
Burningmace
Grandmaster Cheater
Reputation: 5

Joined: 17 Feb 2008
Posts: 512
Location: The Delta Quadrant

PostPosted: Thu Apr 08, 2010 1:58 pm    Post subject: Reply with quote

Apologies. I do indeed know the difference, my terminology was just off. My current code actually does a ReadProcessMemory call on each address, so I'll modify it to do it as a single copy.
_________________
Back to top
View user's profile Send private message
Slugsnack
Grandmaster Cheater Supreme
Reputation: 71

Joined: 24 Jan 2007
Posts: 1858

PostPosted: Fri Apr 09, 2010 9:10 am    Post subject: Reply with quote

oh yes, just remembered. as i've told you multiple times, iPromise, virtualprotect/ex is not supposed to be used at all in the reading part of a memory scanner. forcing memory to be readable that was not before is retarded since if you are unable to read it, it means the game also does not make use of that memory.
_________________
Back to top
View user's profile Send private message
stieve23
How do I cheat?
Reputation: 0

Joined: 10 Jul 2017
Posts: 1

PostPosted: Mon Jul 10, 2017 1:54 am    Post subject: Reply with quote

Dark Byte wrote:
there's the boundary thing yes (reading the 4 byte value at 30ffd will also read 31000) but that it's an unhandled exception is even worse.

What if during your scan the game or a windows subsystem (or even your own dll, e.g: InsertItem doing some memory maintenance) freed the block at 30000 ?

You DO need to use try/except (I recommend in the first for loop, and on except increase the address to the next 4096 base so virtualqueryex can use that to continue from)

Tip: Split the scanning up into several different routines, that will make it easier and will hardly affect the speed at all


Hello,
I want to learn some coding part for scanning purpose,
So can you please give me some idea about how to improve the speed for scanning machine??
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Goto page Previous  1, 2, 3
Page 3 of 3

 
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