View previous topic :: View next topic |
Author |
Message |
mis_sutiawan How do I cheat?
Reputation: 0
Joined: 05 Jan 2016 Posts: 2 Location: indonesia
|
Posted: Tue Jan 05, 2016 2:10 am Post subject: HOW TO MAKE CODE INJECTION ON M.A.M.E |
|
|
hi all,
actually i try to make code injection on MAME to cheat some games that i have, but i still confuse when i do this, i just add some ammo utomatically when i use it, actually the original ammo will decrease 1 when i use it.
alloc(newmem,2048,"Mameui64.exe"+2A39949)
label(returnhere)
label(originalcode)
label(exit)
newmem:
//please help me what must i do to write here
//i just want to add the ammo automatically
originalcode:
mov [rdx],ax
add rsp,38
exit:
jmp returnhere
"Mameui64.exe"+2A39949:
jmp newmem
nop
nop
returnhere:
thanks for your help[/img]
_________________
hi.. i am the new in my new cheat engine hobby |
|
Back to top |
|
 |
ParkourPenguin I post too much
Reputation: 152
Joined: 06 Jul 2014 Posts: 4697
|
Posted: Tue Jan 05, 2016 9:46 am Post subject: |
|
|
Assuming that code only accesses your ammo and it's decreased by only 1 every time it's run, this should add 1 to your ammo every time you fire:
Code: | ...
newmem:
add ax,2
originalcode:
... |
Alternatively, if you want to set your ammo to 99 (or whatever) every time you fire, then this can work:
Code: | ...
newmem:
mov ax,99
originalcode:
... |
_________________
I don't know where I'm going, but I'll figure it out when I get there. |
|
Back to top |
|
 |
mis_sutiawan How do I cheat?
Reputation: 0
Joined: 05 Jan 2016 Posts: 2 Location: indonesia
|
Posted: Fri Jan 15, 2016 3:56 am Post subject: thanks ParkourPenguin |
|
|
thanks ParkourPenguin, but its still not work, i dont know how to do it, but if i have to capture the image i am sure that you will know what the problem is.
ok maybe i try to figure it with thes way.
1. i find out the address.. then when i found it but its more than 1 address,
example i found 2 address that show the number of ammo
1936E28F and 19379721
so i dont know which address that i have to pick to "find out what what writes to this address" between that two address.
then i try to select one of them.. and when i fill the assembly code.. i got the error messege.
so what must i do.[/img]
_________________
hi.. i am the new in my new cheat engine hobby |
|
Back to top |
|
 |
ParkourPenguin I post too much
Reputation: 152
Joined: 06 Jul 2014 Posts: 4697
|
Posted: Fri Jan 15, 2016 10:10 am Post subject: |
|
|
You can start by saying what the error message is. Also, copying and pasting your code into some code tags would help.
Also, you can determine which of those addresses is your ammo by changing them yourself. If it takes effect in the game, then it's the real value. If it has no effect on the game, then it's probably useless to you.
_________________
I don't know where I'm going, but I'll figure it out when I get there. |
|
Back to top |
|
 |
|