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 


HOW TO MAKE CODE INJECTION ON M.A.M.E

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
mis_sutiawan
How do I cheat?
Reputation: 0

Joined: 05 Jan 2016
Posts: 2
Location: indonesia

PostPosted: Tue Jan 05, 2016 2:10 am    Post subject: HOW TO MAKE CODE INJECTION ON M.A.M.E Reply with quote

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
View user's profile Send private message Yahoo Messenger
ParkourPenguin
I post too much
Reputation: 152

Joined: 06 Jul 2014
Posts: 4697

PostPosted: Tue Jan 05, 2016 9:46 am    Post subject: Reply with quote

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
View user's profile Send private message
mis_sutiawan
How do I cheat?
Reputation: 0

Joined: 05 Jan 2016
Posts: 2
Location: indonesia

PostPosted: Fri Jan 15, 2016 3:56 am    Post subject: thanks ParkourPenguin Reply with quote

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
View user's profile Send private message Yahoo Messenger
ParkourPenguin
I post too much
Reputation: 152

Joined: 06 Jul 2014
Posts: 4697

PostPosted: Fri Jan 15, 2016 10:10 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine All times are GMT - 6 Hours
Page 1 of 1

 
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