Page 1 of 1

Need help with the commands

Posted: Wed Dec 16, 2009 12:57 am
by Seeker2002
temp0 = 9; wp 6228,1,w,wpdata==4,{temp0++; s}

Hi guys, I need some help here please. I'm trying to write value 9 to the my RAM address when the condition is met. It will break and everything but it will not write to my address. What am I doing wrong? :-?

By the way it's just an address that hold the value for extra lives in Donky Kong Jr.

Also is there a format to write to a rom address? Thanks

Re: Need help with the commands

Posted: Wed Dec 16, 2009 1:31 am
by Pugsy
Seeker2002 wrote:temp0 = 9; wp 6228,1,w,wpdata==4,{temp0++; s}

Hi guys, I need some help here please. I'm trying to write value 9 to the my RAM address when the condition is met. It will break and everything but it will not write to my address. What am I doing wrong? :-?
There's no where in that expression were you are writing to 6228, but I'm not sure that it would work even if you did + it's easy enough just to add the stuff to the cheat file and force a reload.
Seeker2002 wrote:By the way it's just an address that hold the value for extra lives in Donky Kong Jr.

Also is there a format to write to a rom address? Thanks
It depends on the system what region you need to poke, but for the vast majority of games 'p' will do RAM and 'm' will do ROM writes,

eg

maincpu.mb@12fc=00

Re: Need help with the commands

Posted: Wed Dec 16, 2009 2:53 am
by Seeker2002
Pugsy wrote:
Seeker2002 wrote:temp0 = 9; wp 6228,1,w,wpdata==4,{temp0++; s}

Hi guys, I need some help here please. I'm trying to write value 9 to the my RAM address when the condition is met. It will break and everything but it will not write to my address. What am I doing wrong? :-?
There's no where in that expression were you are writing to 6228, but I'm not sure that it would work even if you did + it's easy enough just to add the stuff to the cheat file and force a reload.
Seeker2002 wrote:By the way it's just an address that hold the value for extra lives in Donky Kong Jr.

Also is there a format to write to a rom address? Thanks
It depends on the system what region you need to poke, but for the vast majority of games 'p' will do RAM and 'm' will do ROM writes,

eg

maincpu.mb@12fc=00
Hay, thanks for the quick response. What I was asking is there a format written in the debugger program to let you do on the fly real-time editing? like when a condition is met it will change the value of the address for you, without you having to poke it yourself in the memory window. I know how to do this when writing the cheat itself, is there a format to do this inside the debugger to test your theories. Thanks :)

Re: Need help with the commands

Posted: Wed Dec 16, 2009 7:42 am
by Pugsy
In the past I've tried various things like "wp 6228,1,w,wpdata!=ff,maincpu.pb@6228=09" with and without curly brackets and in several different formats and nothing worked so I guess it's not possible.

Re: Need help with the commands

Posted: Wed Dec 16, 2009 6:07 pm
by Seeker2002
Pugsy wrote:In the past I've tried various things like "wp 6228,1,w,wpdata!=ff,maincpu.pb@6228=09" with and without curly brackets and in several different formats and nothing worked so I guess it's not possible.
:(
darn! well, that's what I needed to know. I guess it's back to the drawing board. :lol:
Thanks for your help. :)

Re: Need help with the commands

Posted: Mon Nov 08, 2010 8:06 am
by Seeker2002
Hey Pugsy,

What are some of your methods you use to find invincible cheats?
I'm having trouble just duplicating some of the ones that were done already. :(
How do you find or search for an address of interest as a starting point for invincible cheats?
I know how to find infinite lives and energy and stuff like that, just having problems locating invincible stuff.
Thanks! :D

Re: Need help with the commands

Posted: Mon Nov 08, 2010 11:46 am
by Pugsy
What are some of your methods you use to find invincible cheats?
I'm having trouble just duplicating some of the ones that were done already.
How do you find or search for an address of interest as a starting point for invincible cheats?
I know how to find infinite lives and energy and stuff like that, just having problems locating invincible stuff.
Thanks!
This is the method I used to use.

Start a search with 'ci' or equivalent

Whilst you are still alive do a load of 'cn eq' searches whilst moving around.

Then just before you about to get hit...start using the debugger 'gv' command to advance through a frame at a time. As soon as it's obvious that your character has been hit (eg explosion started) perform a 'cn ne' search. Repeat this till you have only a few addresses, if you have too many addresses make a note of just the ones with a single bit change.

Now put a WP W on all the addresses of interest

Now type 'TRACE filename' and play the game until you are hit and the first watchpoint is hit (if you hit watchpoints before you get hit - just press F12 repeatly, if there are too many WPs being hit just refine those watchpoints with commands like WP 3456,1,w,wpdata!=00)

Once you've hit the first watchpoint after death (ideally this should happen just before the sprite changes into death mode), type TRACE OFF and the open the TRACE file that has been dumped in the MAME dir with a suitable text editor.

Now just trace you way from the bottom of the TRACE file and BP on interesting addresses and see what happens. This can take 5 minutes or 20 hours depending on your assembler skills and the game code.

Re: Need help with the commands

Posted: Mon Nov 08, 2010 7:58 pm
by Seeker2002
Pugsy wrote:
Start a search with 'ci' or equivalent

Whilst you are still alive do a load of 'cn eq' searches whilst moving around.quote]
Hey Pugsy,

thanks for the quick reply.

Sorry if I sound stupid, :-? but I'm not understanding some of your abbreviations, please explain.

What does 'ci' and 'cn' stand for? I know that 'eq' is equal to and 'gv' resumes execution,

and what's 'Whilst'.

Thanks again! :D

Re: Need help with the commands

Posted: Mon Nov 08, 2010 8:18 pm
by Pugsy
ci = cheatinit
cn = cheatnext


So basically if you start a RAM search you will need to initialise the search first with ci, and then continue the search with cn. Using the abbreviated commands saves time when in the debugger.


Type 'help cheats' or 'help cheatinit', 'help cheatnext' etc in the debugger for more info.


And as for "whilst" it's standard english word, it's effectively the same as "while" - almost completely interchangeable....I use either as the mood takes me ;)

Re: Need help with the commands

Posted: Mon Nov 08, 2010 8:33 pm
by Seeker2002
Ok, I got it! :D

One more thing, is there a command to tell the cheat engine to search for a particular valve if you know what it is?

Thanks again! :wink:

Re: Need help with the commands

Posted: Mon Nov 08, 2010 8:40 pm
by Pugsy
Yes

Examples:-
cn eq,5
cn eq,f


or if you think the value is less than 0x10

cn lt,10


or if you think the value is greater than 0x10

cn gt,10

Re: Need help with the commands

Posted: Mon Nov 08, 2010 8:44 pm
by Seeker2002
Pugsy wrote:Yes

Examples:-
cn eq,5
cn eq,f


or if you think the value is less than 0x10

cn lt,10


or if you think the value is greater than 0x10

cn gt,10
Got it, Thanks.. :D

Re: Need help with the commands

Posted: Tue Nov 09, 2010 12:23 am
by Seeker2002
Hey Pugsy,

One more thing,

How do you write to an instruction in the debug window to change the opcode?

And is C0 the nop code for the Z80?

Thanks!

Re: Need help with the commands

Posted: Tue Nov 09, 2010 12:42 am
by Pugsy
NOP for z80 is 00, NOPs are often not ideal - C9 and 18 are far more useful for Invincibility cheats on the Z80.


One of these should do it, depends on the game if it's m,o or r:

maincpu.mb@1234=00
maincpu.ob@1234=00
maincpu.rb@1234=00

Re: Need help with the commands

Posted: Tue Nov 09, 2010 2:23 am
by Seeker2002
Cool, Thanks again! :wink: