Cheat XML Syntax VS Linux (Manjaro 19)/ GCC 9?

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
help
Posts: 8
Joined: Tue May 26, 2020 7:47 pm

Cheat XML Syntax VS Linux (Manjaro 19)/ GCC 9?

Post by help »

Hi ...The mmatrix cheat code for invincibility and infinite energy both aren't working on any version of mame including retroarch's versions...The console just spews out the following whenever it's enabled:

Code: Select all

Error executing expression "maincpu.pw@((maincpu.pd@FF49BC)+72)=0002": syntax error
(this is the one for invincibility, but the expression is the same as the infinite energy cheat)
What fixes the issue, it turns out, is to re-write these like so:

Code: Select all

  <cheat desc="P1 Invincibility">
    <script state="run">
      <action>temp0=maincpu.pd@FF49BC</action>
      <action>temp0=temp0+72</action>
      <action>maincpu.pw@temp0=0002</action>
<!--       <action>maincpu.pw@((maincpu.pd@FF49BC)+72)=0002</action> -->
    </script>
  </cheat>
  
I shared this issue with mamedev (https://github.com/mamedev/mame/issues/6742), but they claimed they didn't have an issue with the original expression...That leads me to think that they are on Windows and/or Mac where the syntax is permitted, indicating that Linux and/or anything linux derived (Arch/Manjaro/GCC 9/XML libs/etc) is doing something wrong, and causing more than just Mars Matrix cheats to fail as a result. I don't know what else could be causing this issue...
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: Cheat XML Syntax VS Linux (Manjaro 19)/ GCC 9?

Post by Pugsy »

The expression is perfectly valid. It works in the standard cheat engine and the LUA plugin cheat engine, so I suggest the problem lies with your build.

Have you tried the LUA plugin cheat engine?

I may replace the Invincibility cheat with a ROM cheat at some point to get rid of the standard Invincibility flicker.
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)
help
Posts: 8
Joined: Tue May 26, 2020 7:47 pm

Re: Cheat XML Syntax VS Linux (Manjaro 19)/ GCC 9?

Post by help »

...I don't know how to enable/use the lua plugin, and I don't know how mame should be built so that the mmatrix(et al) cheats (and cotton2/cotton boomerang's invincibility cheats) actually works
Post Reply