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.
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:
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.