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 


Code injection in SNES,need help

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

Joined: 10 Dec 2007
Posts: 7
Location: Malaysia(luv it)

PostPosted: Mon Dec 17, 2007 7:47 pm    Post subject: Code injection in SNES,need help Reply with quote

Hello,I need your help in injecting some code to the SNES games.I'm new in this stuff so that's all i asking you'all.

Firstly,I played Genghis Khan 2 and found the code that decrease my gold.
Code:

mov [edx],ecx
ret //why?ret is here but no call
jmp dword ptr.//what's this?

above are my first questions

And then I played Gemfire and its code for decreasing gold is exactly the same as above.I decided to just inject some code.



Code:


[ENABLE]
alloc(newmem)
label(newmem)


oo4a070:
jmp newmem
nop
returnhere:

newmem:
mov [edx],0 //make the money do not decrease

[DISABLE]
dealloc(newmem)
oo4a070:
mov [edx],ecx
ret
jmp dword ptr


plzz help.I'm a newbie in this injection stuff[/code]
Back to top
View user's profile Send private message Send e-mail
Labyrnth
Moderator
Reputation: 10

Joined: 28 Nov 2006
Posts: 6301

PostPosted: Mon Dec 17, 2007 8:06 pm    Post subject: Reply with quote

ret = works the same as returnhere in your script.
jmp = jump
dword = double word
ptr = pointer
mov = move
Back to top
View user's profile Send private message
Spark2893
How do I cheat?
Reputation: 0

Joined: 10 Dec 2007
Posts: 7
Location: Malaysia(luv it)

PostPosted: Mon Dec 17, 2007 8:11 pm    Post subject: Reply with quote

please explain to me about the ret and dword pointer.What's a double word pointer?

And why the emulator crash when I try to inject the above code? Mad
Back to top
View user's profile Send private message Send e-mail
Labyrnth
Moderator
Reputation: 10

Joined: 28 Nov 2006
Posts: 6301

PostPosted: Tue Dec 18, 2007 7:26 pm    Post subject: Reply with quote

The assembly you can learn by searching around and reading, the crash is unknown because i dont know if you have the right code.
Also if you can even inject an emulator.
Back to top
View user's profile Send private message
Qvazzler
Advanced Cheater
Reputation: 0

Joined: 02 Jan 2007
Posts: 68

PostPosted: Wed Dec 19, 2007 10:08 am    Post subject: Reply with quote

Why don't you just freeze the gold value? Are you too good for it?
Back to top
View user's profile Send private message
Labyrnth
Moderator
Reputation: 10

Joined: 28 Nov 2006
Posts: 6301

PostPosted: Wed Dec 19, 2007 6:42 pm    Post subject: Reply with quote

Qvazzler wrote:
Why don't you just freeze the gold value? Are you too good for it?

Because he wants to learn to do code injection and not use a noobie freeze.
Back to top
View user's profile Send private message
Qvazzler
Advanced Cheater
Reputation: 0

Joined: 02 Jan 2007
Posts: 68

PostPosted: Thu Dec 20, 2007 12:46 am    Post subject: Reply with quote

Has the same purpose, but I suppose anyone can choose to do things differently.
Back to top
View user's profile Send private message
Labyrnth
Moderator
Reputation: 10

Joined: 28 Nov 2006
Posts: 6301

PostPosted: Thu Dec 20, 2007 6:32 pm    Post subject: Reply with quote

Qvazzler wrote:
Has the same purpose


code injection has the same purpose?

Now i know why you said just freeze it....
Back to top
View user's profile Send private message
-DEViL-
Expert Cheater
Reputation: 3

Joined: 21 Apr 2007
Posts: 185

PostPosted: Fri Dec 21, 2007 8:07 am    Post subject: Reply with quote

you doing injection wrong that because game crash.

Code:
[ENABLE]
alloc(newmem)
label(newmem)


oo4a070:
jmp newmem
nop
returnhere:

newmem:
mov [edx],0 //make the money do not decrease

[DISABLE]
dealloc(newmem)
oo4a070:
mov [edx],ecx
ret
jmp dword ptr


look at this:

newmem:
mov [edx],0

in here after write your code you must come back to where you break code and create jump to cave.
it should be like this:

newmem:
mov [edx],0
jmp returnhere//come back to where you break code and do your injection.


about this:

jmp dword ptr

in here this part is missing.
it should be like this:

jmp dword ptr [address]

look down of your code you must see original code of this instruction.

and in here you must restore originalcode after your code:

Code:
newmem:
mov [edx],0


it should be this:

Code:
mov [edx],0
mov [edx],ecx
ret
jmp dword ptr [address]


and in here you must write size of your cave:

Code:
alloc(newmem,512)//e.g:512 byte.//you can write how much you want.


and here is true scripts://i don't know this scripts work or not because i don't have the game but this is the true scripts.

Code:
[ENABLE]
alloc(newmem,512)
label(returnhere)

oo4a070:
jmp newmem
nop
returnhere:

newmem:
mov [edx],0 //make the money do not decrease
mov [edx],ecx
ret
jmp dword ptr [address]
jmp returnhere

[DISABLE]
dealloc(newmem)
oo4a070:
mov [edx],ecx
ret
jmp dword ptr [address]


i hope this help you.
(sorry for my bad english)
Back to top
View user's profile Send private message
Labyrnth
Moderator
Reputation: 10

Joined: 28 Nov 2006
Posts: 6301

PostPosted: Fri Dec 21, 2007 10:13 am    Post subject: Reply with quote

The script is messed up like your saying but, still not sure you can inject on snes Confused.
Guess i could try and see. lol
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking 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