Page 1 of 1

Mixed regions changes error (only with LUA plugin)

Posted: Fri Sep 13, 2024 12:25 am
by fedekrum
Hi !!

This is for "frogger.zip" using mame0229-64bit

Why cheats "rom test", "audio test" and "pixels test " below work using the LUA plugin but the mix of all of them in "mixed test" do not?
Can a cheat have mixed region changes on the same cheat under LUA plugin?

Code: Select all

<mamecheat version="1">
<!--  Frogger ROM frogger.zip  -->
 
  <cheat desc="rom test">
    <script state="run">
      <!--  Frogger ROM Patch - frsm3.7  -->
      <action>maincpu.mb@2FFF=00</action>
    </script>
  </cheat>

  <cheat desc="audio test">
    <script state="run">
      <!--  Frogger ROM Patch - frogger.609  -->
      <action>audiocpu.mb@88C=00</action>
    </script>
  </cheat>

  <cheat desc="pixels test">
    <script state="run">
      <!--  Frogger ROM Patch - frogger.606  -->
      <action>gfx1.mb@A63=0</action>
    </script>
  </cheat>
  
  <cheat desc="mixed test">
    <script state="run">
      <action>maincpu.mb@2FFD=C9</action>
      <action>audiocpu.mb@88C=00</action>
      <action>gfx1.mb@A63=0</action>
    </script>
  </cheat>

</mamecheat>
The same cheat works if activated using

Code: Select all

./mame -cheat 
Image

It has also been reported at https://github.com/mamedev/mame/issues/12757

Re: Mixed regions changes error (only with LUA plugin)

Posted: Fri Sep 13, 2024 9:30 am
by jman
No error in 0.269 (the latest MAME version for now).
Image

Indeed, error happens in 0.229 with the following message when you try to activate "mixed test" code.
error cheat script error: "mixed test" [string "mixed testrun"]:1: attempt to index a nil value (global 'audiocpum')
But this error seems to be fixed in the newest version.

So try to update both MAME and plugin.