Posted: Sat Jun 12, 2010 9:45 am Post subject: How Cheat Engine Ensure Thread Safety?
Excuse me if I borrow the term thread safety from Java where multitasking means multi-threading. But it is just the same issue. When the Cheat Engine process is running concurrently with the game process, how does Cheat Engine know the target address is not being updated by the game when it is read?
For example, I let my blood level drop to a low value and then recover slowly by itself. Now if I scan for increased value, assuming it is a 32bit value, can I assume that 32bit value is read atomically by Cheat Engine? Would it be possible that only the first 2 bytes are updated while Cheat Engine reads the whole 32bit value?
Joined: 09 May 2003 Posts: 25821 Location: The netherlands
Posted: Sat Jun 12, 2010 6:04 pm Post subject:
1:
32-bit writes to addresses are atomic by the cpu, (unless it's running an emulator and then there's nothing you can do about that)
2: even if the game where so stupid to issue two write commands to write a 32-bit value that would only cause a problem in 1 out of 255 cases (when the first byte goes from 255 to 0 and hasn't updated the others causing the value to look decreased _________________
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
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