View previous topic :: View next topic |
Author |
Message |
danrevella Master Cheater
Reputation: 2
Joined: 11 Jun 2008 Posts: 292
|
Posted: Sat Mar 08, 2014 5:12 pm Post subject: target process is 32 or 64 ? |
|
|
Hi!!
I have a very simple lua script that tell me if the target game is a 32 or 64 bit process:
Code: |
if targetIs64Bit() then
print "target is 64 bit"
else
print "target is 32 bit"
end |
On the same game, I have try to compile a different (32 and 64) gigantic trainer, but now I'm amazed that it does works in ALL cases.....
-) Why?
-) I would like that the above code was always available in the general menu of CE, maybe anyone wanna help to perform this Lua task?
Thanks!
|
|
Back to top |
|
 |
mgr.inz.Player I post too much
Reputation: 222
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Sun Mar 09, 2014 7:12 am Post subject: |
|
|
- auto-generated 32bit trainer can only attach to 32bit processes. And it works on 32bit OS and 64bit OS (Win32, Win64).
- auto-generated 64bit trainer can attach to 32bit processes and 64bit processes. But it works only on 64bit OS.
- Why? Because 32bit CheatEngine can only attach to 32bit processes (and works on both Win32 and Win64) AND 64bit CheatEngine can attach to 32bit processes and 64bit processes (and works only on Win64)
- most people makes 32bit trainer for 32bit processes ("target process is 32bit") and 64bit trainer for 64bit processes ("target process is 64bit").
Conclusion:
- you can use [32-bit], [/32-bit], [64-bit] and [/64-bit] tags in your AA scripts and then create 64bit trainer, it will be two-in-one (for 32bit game version and 64bit game version), but it will only work under Win64.
- or you can merge both CT files you created (one for 32bit game version and one for 64bit game version). In "Lua Script" you can use targetIs64Bit() function and decide which script you want to enable. (AA script can be pasted entirely in "Lua Script" window, you just use autoAssemble() function). Then save it as 64bit trainer. It will be 2-in-1.
- you can also make 2-in-1 trainer, working on both Win32 and Win64. But it will increase trainer size greatly.
- in few weeks, there will be no more security updates or technical support for the Windows XP OS. Year or few after, expect more 2-in-1 trainers. Because, for some games, 32bit architecture is enough.
EDIT:
Actually [32-bit], [/32-bit], [64-bit] and [/64-bit] do not work for games. I thought it is a global feature...
But, you can write a Lua function which will strip cpu specific code from AA script.
_________________
Last edited by mgr.inz.Player on Tue Nov 29, 2016 8:26 am; edited 1 time in total |
|
Back to top |
|
 |
danrevella Master Cheater
Reputation: 2
Joined: 11 Jun 2008 Posts: 292
|
Posted: Sun Mar 09, 2014 7:29 am Post subject: |
|
|
Ahhhh.... OK!!
A bit complicate, but now is clear..
In my good old days I used gamewizard+Softice for dos, but it was more easy....
BTW, there is still a little pending question:
Quote: | -) I would like that the above code was always available in the general menu of CE, maybe anyone wanna help to perform this Lua task?
Thanks! |
May you help me please?
|
|
Back to top |
|
 |
Dark Byte Site Admin
Reputation: 470
Joined: 09 May 2003 Posts: 25804 Location: The netherlands
|
Posted: Sun Mar 09, 2014 8:07 am Post subject: |
|
|
You could just look at the assembler code.
if it uses R** registers as address specifier, it's 64-bit
anyhow, copy this lua file to the autorun folder inside cheat engine and when you open a process it'll show if it's 64-bit or 32-bit
Description: |
|
 Download |
Filename: |
updateplabelwitharchitecture.lua |
Filesize: |
787 Bytes |
Downloaded: |
939 Time(s) |
_________________
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 |
|
 |
danrevella Master Cheater
Reputation: 2
Joined: 11 Jun 2008 Posts: 292
|
Posted: Sun Mar 09, 2014 8:12 am Post subject: |
|
|
Dark Byte wrote: | You could just look at the assembler code.
if it uses R** registers as address specifier, it's 64-bit
anyhow, copy this lua file to the autorun folder inside cheat engine and when you open a process it'll show if it's 64-bit or 32-bit |
Excellent, and very useful!!
BTW, may you give me more information about the option "Memory view">"Graphical memory view"?
Thanks
|
|
Back to top |
|
 |
mgr.inz.Player I post too much
Reputation: 222
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Sun Mar 09, 2014 8:13 am Post subject: |
|
|
danrevella wrote: | I would like that the above code was always available in the general menu of CE, maybe anyone wanna help to perform this Lua task?
Thanks! |
You can use Lua script from Jul 28, 2013:
http://forum.cheatengine.org/viewtopic.php?t=566441
And add this:
Code: | addMenuItem(menuItem_help,'Target is ?').setOnClick(
function ()
if getMainForm().ProcessLabel.Caption=='No Process Selected' then return end
if targetIs64Bit() then
messageDialog("target is 64 bit",mtInformation,mbOK)
else
messageDialog("target is 32 bit",mtInformation,mbOK)
end
end) |
I attached lua file too (move it to autorun folder)
It adds "Open main.lua", "Open defines.lua", "Switch to ...", "Target is ?" menu entries ("Help" menu). And also changes CE main window caption, so you will know which CE you launched.
Description: |
|
 Download |
Filename: |
menu extra.lua |
Filesize: |
1.87 KB |
Downloaded: |
765 Time(s) |
_________________
|
|
Back to top |
|
 |
danrevella Master Cheater
Reputation: 2
Joined: 11 Jun 2008 Posts: 292
|
Posted: Sun Mar 09, 2014 8:24 am Post subject: |
|
|
Very good!!!
two solution for my problems.....
I had to better understand Lua in general: it is really strong!!!
|
|
Back to top |
|
 |
|