If you compile your own MAME on a regular basis you might have noticed there's now an alternative way of enabling and finding cheats thanks to crazyc...using a lua replacement for the cheat menus and a new cheat finder tool which is similar to the old cheat finder tool. Thankfully the cheat xml format is unaffected

To try it out, compile the latest MAME from git and make sure you set plugin.ini file:-

cheat 1cheatfind 1

Then just skip the existing CHEAT option and go to the PLUGINS option on the menu to see the new menus, you should notice few differences when compared to the old menus for enabling cheats but for finding cheats you can now do it without having to use the debugger. This is still a WIP so if you spot any issues/suggestions please post them in this thread....

NOTE: plugin.ini should normally exist in the ini folder if you haven't changed the default address with the mame.ini 'inipath' variable.

i can't seem to get this working. i'm using mame v0.173. i admit i'm a bit of a newbie here - i don't even know what a "cheat finder helper library" is... google brought me here when i looked for documentation.

does the cheat option in mame.ini still need to be set? does the cheat.7z still need to be present? i've tried with & without these and it doesn't work.

setting "cheat plugin" and "cheat finder helper library" to "on" in the plugins menu in the mame ui works, but after exiting mame and reloading, they are reset back to "off" (looking at plugin.ini, i see all 0 zeroes).

in a game (mspacman), there is a "plugin options", but selecting it gives an empty list, with only the "return to previous menu" option. the cheat menu (if cheat in mame.ini is on) still works as expected.

i've also noticed changing the pluginspath in mame.ini breaks things (ie, [LUA ERROR] ...boot.lua:7: module 'json' not found:, even though the files are in the directory i'm pointing to). (another frustrating aspect of mame is trying to set it up to run properly from any directory in linux, but that's another topic.)

Fixed this, you don't need to recompile you only have to get the plugin/cheat/init.lua file.

rsarson wrote:google brought me here when i looked for documentation.

This is pretty new so the documentation is a W(not quite yet)IP.

rsarson wrote:does the cheat option in mame.ini still need to be set? does the cheat.7z still need to be present?

No except you need the plugin enabled in the ini or the ui and yes you need the cheat.7z.

rsarson wrote:in a game (mspacman), there is a "plugin options", but selecting it gives an empty list, with only the "return to previous menu" option. the cheat menu (if cheat in mame.ini is on) still works as expected.

There'll be nothing in plugin options if there is no plugin that has a menu enabled. You can also use "-plugin cheat" on the command line to enable it.

but I need a manual... I can't understand it at all. What's bcd? How to compare?

It's not actually that difficult to use, I've knocked up a quick simple example...but remember that the cheat plugin is still in development so this is just an example using the current cheat finder script and may well change:-

Use the game "targ"

Start the game and pause it

Go to the the Cheat Finder plugin:

Select "Start new search"

unpause the game and lose a life, then pause the game again

Select "Save current #2"

Select "Left operand 2"Select "Operator lt"Select "Right operand 1"Select "Value 1"Hit Return on "Compare" - Basically you are saying search for memory addresses where the current memory snapshot (2) is less than the first memory snapshot (1) by 1 (value 1)

on the Bottom of the screen you will notice "Match Block 1", if you press left and right on that you will notice that it cycles through some possibilities under each "Block"

By default it will have "Test" next to each one, just press Return on each and it will add that cheat to the plugins cheat selection menu

You can then just enable that cheat to see if you have found the lives location by enabling the cheats one by one and losing a life and seeing if the number of lives decreases.

BCD is Binary Coded Decimal, simple example from a cheating perspective:- if you have a TIMER that starts at "99" this can be represented by 0x63 (99 decimal, 63 hex) or it can be represented in BCD as 0x99 (99 hex, 153 decimal). BCD is actually really common for things like time and scores.

Pugsy wrote:Thanks, for those and the earlier quick fixes. Sorry I'd not responded to the last email (all sounds ok to me)...RL stuff so only just done a 0.173 build.

Cool, should only take a few minutes to do those changes.

Pugsy wrote:I know this was working before, but wayder is correct its broken now.

with

cheatpath cheat;cheat_wayder

if you run mame 19xx the plugin will display no cheats.

It works for me now. Did you get the latest version? BTW, I've got a cheat for a board (Dungeons and Dragons Computer Labyrinth Game) game that doesn't fit in any of your forums and only works with the development tree. Should I post it here and if so should I wait until next release?

crazyc wrote:Cool, should only take a few minutes to do those changes.

Thanks, looking good. Being able to search by value will save a few iterations of cheat searching.

Couple of suggestions1. If possible can you make it so that when you do a SAVE CURRENT it will update the Left Operand so if Left Operand was previously = Current it will stay as "Current"2. In a similar manner if the Right Operand was previously "Current - 1" when you hit SAVE CURRENT can you make it so that it autopopulates with "Current - 1"3. Can COMPARE and SAVE CURRENT be moved in the same text block as the comparison operations (will save some arrow presses)4. Is it possible to do a pop-up when COMPARE is executed that will have text similar to "1789 Possibilities" so that you instantly know if you are ready to test some cheat possibilities.5. Is it possible to change "Blocks match" selection at the bottom to just automatically show all possibilities or a larger number of possibilities?

crazyc wrote:It works for me now. Did you get the latest version?

Yes and thanks, it works now.

crazyc wrote:BTW, I've got a cheat for a board (Dungeons and Dragons Computer Labyrinth Game) game that doesn't fit in any of your forums and only works with the development tree. Should I post it here and if so should I wait until next release?

Ah, I see the problem it's neither an arcade game or a softwarelist game......I've changed the description for the softwarelist forum to cover any non-arcade game. It doesn't matter if the game is in MAME yet or will be added later...the earlier the better:)

Pugsy wrote:1. If possible can you make it so that when you do a SAVE CURRENT it will update the Left Operand so if Left Operand was previously = Current it will stay as "Current"2. In a similar manner if the Right Operand was previously "Current - 1" when you hit SAVE CURRENT can you make it so that it autopopulates with "Current - 1"3. Can COMPARE and SAVE CURRENT be moved in the same text block as the comparison operations (will save some arrow presses)

They are, aren't they? If not I must be missing what you mean.

Pugsy wrote:4. Is it possible to do a pop-up when COMPARE is executed that will have text similar to "1789 Possibilities" so that you instantly know if you are ready to test some cheat possibilities.5. Is it possible to change "Blocks match" selection at the bottom to just automatically show all possibilities or a larger number of possibilities?

It shows 50 currently. I'm not sure what the reasonable limit is and I can't currently do submenus so maybe a "Show next" option at the bottom?

pmc wrote:when I run mame in command line, after leaving the game it tells me this message:

Pugsy wrote:1. If possible can you make it so that when you do a SAVE CURRENT it will update the Left Operand so if Left Operand was previously = Current it will stay as "Current"2. In a similar manner if the Right Operand was previously "Current - 1" when you hit SAVE CURRENT can you make it so that it autopopulates with "Current - 1"3. Can COMPARE and SAVE CURRENT be moved in the same text block as the comparison operations (will save some arrow presses)

They are, aren't they? If not I must be missing what you mean.

This is what I mean (and currently see):-

crazyc wrote:

Pugsy wrote:4. Is it possible to do a pop-up when COMPARE is executed that will have text similar to "1789 Possibilities" so that you instantly know if you are ready to test some cheat possibilities.5. Is it possible to change "Blocks match" selection at the bottom to just automatically show all possibilities or a larger number of possibilities?

It shows 50 currently. I'm not sure what the reasonable limit is and I can't currently do submenus so maybe a "Show next" option at the bottom?

I think a Show next option would be better than having "Blocks match" as I've done some searches and there was nothing showing under Blocks match 1 but there where under Block match 2, which may confuse people enough just to give up. I think showing 100 results per page would more than suffice. 50 would probably be fine at a pinch.

Pugsy wrote:I think a Show next option would be better than having "Blocks match" as I've done some searches and there was nothing showing under Blocks match 1 but there where under Block match 2, which may confuse people enough just to give up. I think showing 100 results per page would more than suffice. 50 would probably be fine at a pinch.

Oh, you want to show the matches from all the regions right? Now it defaults to "All" which does that. A specific region can still be chosen too.

Thanks, looking good and yes show matches from all regions is ideal. A "show next" way of paging through all the results could be handy.

EDIT: Just noticed something has gone slightly skew whiff with LT/GT. If you do a search for the time address in mslug (106E93) bydoing Current LT Previous by 1 every time it reduces it won't find the address

It will find the address as the time decreases by one if you do a Current GT Previous by 1 which is the wrong way.

Very thanks and report a bug, I use mame 0.174 with cheat lua plugins, try to search some cheats with game kov2, but when I press the test botton, the address don't show in the cheat column. I think it's a bug?

And a little request, may the cheat lua plugins add an option to search the d00000-d0ffff address range of game kov2? This game use the address range to store some useful infomations, e.g. hp and invincibility of players and enemies, etc.

It won't show in the builtin cheat engine only in the cheat plugin (and it does work, just tested it).

I added the ability to search shared ram regions of which that range is one (https://github.com/mamedev/mame/blob/59 ... 2.cpp#L110). It'll be called ":arm7_shareram". Note you can't currently use it directly with the cheat engine as the addresses are different, you'd have to add 0xd0000 if applied on the 68000 or 0x48000000 with the arm.