Accessing register values during cheat?

If you are having problems finding or using cheats for an Emulator (particularly MAME/MESS) or have found a trick that you wish to share this is the place to do it. But please read the Cheat FAQ first.
Post Reply
BlackGreen
Posts: 2
Joined: Tue Oct 01, 2013 3:42 am

Accessing register values during cheat?

Post by BlackGreen »

Is it possible to access or use registers inside a cheat? I have no problem doing register evaluations in the debug engine with breakpoints and waypoints. I would like to perform a ROM hack only if a register is a certain value.

Example below trying to do a condition based on register val:

Code: Select all

<action condition="A0==0x1234">maincpu.mw@1234=0x9876</action>
Currently, the system will try to evaluate the condition above as "0xA0==0x1234" instead of the register value.

Is this possible?

Thanks.
User avatar
Pugsy
Posts: 3638
Joined: Fri Aug 17, 2001 12:59 am
Location: North Wales, UK.
Has thanked: 1 time
Been thanked: 12 times
Contact:

Re: Accessing register values during cheat?

Post by Pugsy »

I would also like to see debugger features in the cheat expressions but the answer is no, sorry it's not possible.

Even if it was possible it would be of limited use, the cheat poking is frame based so if a game runs at 60Hz it would only run that condition 60 times a second and the likelihood of the A0 register being at the correct value is minimal. Such a feature would only really be of use if the cheat engine was poking at every instruction and that would have a massive impact on performance.

The only way to implement that in a cheat is to write a small routine is assembler in free space in the game and call it when it's needed - its a pain but it would work.
Pugsy

Servicing your cheating needs since 1985 8)

Grab the latest cheat collection:
MAME 0.259 XML cheat collection (6 OCTOBER 2023) from http://www.mamecheat.co.uk or direct from:-
https://mega.nz/file/q4dHGZ6K#i-EUiqIjH ... KMz7hnbTfw (ZIP Archive 3.76MB)
BlackGreen
Posts: 2
Joined: Tue Oct 01, 2013 3:42 am

Re: Accessing register values during cheat?

Post by BlackGreen »

Thanks Pugsy. I agree it would be a big impact on performance.

At least now I know I'm not crazy :).
Post Reply