| View previous topic :: View next topic |
| Author |
Message |
blackzero How do I cheat?
Reputation: 0
Joined: 28 Jul 2006 Posts: 3
|
Posted: Fri Jul 28, 2006 5:14 pm Post subject: Zero Flag |
|
|
| I've been trying to make some trainers lately but i ran into a problem, normally with ce i just tick the zf flag for some of my cheats but i cant figure out how to program this, i've searched all over the internet on assembly programming, asked my programmer friends, and even looked through this post http://forum.cheatengine.org/viewtopic.php?p=133987&highlight=zero+flag#133987 and found nothing that is helpful, if anyone knows how i can set the zf flag in my programming pls help, thanks.
|
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 474
Joined: 09 May 2003 Posts: 25958 Location: The netherlands
|
Posted: Fri Jul 28, 2006 6:11 pm Post subject: |
|
|
search google for "interrupt hooking" and "debug registers"
And information on how to write a device driver for windows is also usefull
That should be enough to make a change reg on bp trainer.
_________________
Tools give you results. Knowledge gives you control.
Like my help? Join me on Patreon so i can keep helping |
|
| Back to top |
|
 |
bahblah Grandmaster Cheater
Reputation: 0
Joined: 27 Sep 2005 Posts: 633
|
Posted: Fri Jul 28, 2006 9:20 pm Post subject: |
|
|
Since I have alot more time than Dark Byte on my hands let me explain.
Debug registers are used to set up hardware breakpoints. These breakpoints raise interrupt 1.
For the int 1 handler hooking you will need to be in kernelmode. The idea is to change the flags in your replacement handler then jmp back to the original handler.
Interrupt Handlers are stored in a IDT (interrupt descriptor table).
To retrieve the IDT you simply use the LIDT instruction (Load IDT)
You change the interrupt 1 handler to your own function while storing the original interrupt 1 handler.
To set the new IDT you simply use the SIDT instruction (Store IDT)
You need to use other instructions too so you don't create a disaster: STI, CLI (SeT Interrupt flag? CLear Interrupt flag) Anyway you'll find out in your research.
To do the actual setting of the hardware breakpoints, you have to work with debug registers 0 - 3 and 7 (6 too maybe?) All I can say is it's a good idea to use Intel Pentium's Programmers Manual or w/e
But hell. Since Cheat Engine's source is open-source, you can find alot of stuff out just by reading that nice piece of code.
|
|
| Back to top |
|
 |
|