<mamecheat version="1">

  <cheat desc="Infinite Credits">
    <script state="run">
      <action>maincpu.pb@400207=09</action>
    </script>
  </cheat>

  <cheat desc="Infinite Time">
    <script state="run">
      <action>maincpu.pb@407F36=77</action>
    </script>
  </cheat>

  <cheat desc=" "/>

  <cheat desc="P1 Infinite Lives">
    <script state="run">
      <action>maincpu.pb@40C244=09</action>
    </script>
  </cheat>

  <cheat desc="P1 Infinite Energy">
    <script state="run">
      <action>maincpu.pb@404FD0=14</action>
    </script>
  </cheat>

  <cheat desc="P1 Infinite Specials">
    <script state="run">
      <action>maincpu.pb@40C245=09</action>
    </script>
  </cheat>

  <cheat desc="P1 Invincibility">
    <script state="run">
      <action>maincpu.pb@40C243=02</action>
    </script>
  </cheat>

  <cheat desc=" "/>

  <cheat desc="P2 Infinite Lives">
    <script state="run">
      <action>maincpu.pb@40C344=09</action>
    </script>
  </cheat>

  <cheat desc="P2 Infinite Energy">
    <script state="run">
      <action>maincpu.pb@405050=08</action>
    </script>
  </cheat>

  <cheat desc="P2 Infinite Specials">
    <script state="run">
      <action>maincpu.pb@40C345=09</action>
    </script>
  </cheat>

  <cheat desc="P2 Invincibility">
    <script state="run">
      <action>maincpu.pb@40C343=02</action>
    </script>
  </cheat>

  <cheat desc=" "/>

  <cheat desc="P3 Infinite Lives">
    <script state="run">
      <action>maincpu.pb@40C444=09</action>
    </script>
  </cheat>

  <cheat desc="P3 Infinite Energy">
    <script state="run">
      <action>maincpu.pb@4050D0=08</action>
    </script>
  </cheat>

  <cheat desc="P3 Infinite Specials">
    <script state="run">
      <action>maincpu.pb@40C445=09</action>
    </script>
  </cheat>

  <cheat desc="P3 Invincibility">
    <script state="run">
      <action>maincpu.pb@40C443=02</action>
    </script>
  </cheat>

  <cheat desc=" "/>

  <cheat desc="P4 Infinite Lives">
    <script state="run">
      <action>maincpu.pb@40C544=09</action>
    </script>
  </cheat>

  <cheat desc="P4 Infinite Energy">
    <script state="run">
      <action>maincpu.pb@405150=08</action>
    </script>
  </cheat>

  <cheat desc="P4 Infinite Specials">
    <script state="run">
      <action>maincpu.pb@40C545=09</action>
    </script>
  </cheat>

  <cheat desc="P4 Invincibility">
    <script state="run">
      <action>maincpu.pb@40C543=02</action>
    </script>
  </cheat>

  <cheat desc=" "/>

  <cheat desc="Select Region"> <comment>After you enable this cheat to see any effect you will have to reset the game (F3). Then you may have to turn the Test Mode ON (F2), reset again (F3), wait for Test Mode to appear then turn the Test Mode OFF (F2) and reset (F3).</comment>
    <parameter>
      <item value="0x01">Japan (dungenmuinger)</item>
      <item value="0x02">US (Dungeon Magic)</item>
      <item value="0x03">World (Dungeon Magic)</item>
    </parameter>
    <script state="on">
      <action>temp0 =maincpu.mb@0FFFFF</action>
    </script>
    <script state="run">
      <action>maincpu.mb@0FFFFF=param</action>
    </script>
    <script state="off">
      <action>maincpu.mb@0FFFFF=temp0 </action>
    </script>
  </cheat>

</mamecheat>
<!-- Cheat file downloaded from http://www.mamecheat.co.uk, see cheat.txt for list of contributors. -->
