<mamecheat version="1">

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

  <cheat desc="Infinite Lives PL1"> <comment>This cheat will work on all 3 parts</comment>
    <script state="run">
      <action>maincpu.pb@FF0DE7=03</action>
    </script>
  </cheat>

  <cheat desc="Infinite Lives PL2"> <comment>This cheat will work on all 3 parts</comment>
    <script state="run">
      <action>maincpu.pb@FF0DE8=03</action>
    </script>
  </cheat>

  <cheat desc=" "/>
  <cheat desc="MIDNIGHT WANDERERS (Action)"/>

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

  <cheat desc="Invincibility">
    <script state="on">
      <action>temp0 =maincpu.mb@00DF34</action>
    </script>
    <script state="run">
      <action>maincpu.mb@00DF34=67</action>
    </script>
    <script state="off">
      <action>maincpu.mb@00DF34=temp0 </action>
    </script>
  </cheat>

  <cheat desc="Drain All Boss Energy Now!">
    <script state="on">
      <action>maincpu.pb@FF101F=00</action>
      <action>maincpu.pb@FF1026=00</action> <!-- 2nd for 'double' bosses -->
    </script>
  </cheat>

  <cheat desc="Infinite Ammo (Super Bomb) PL1">
    <script state="run">
      <action>maincpu.pb@FF0E36=FF</action>
    </script>
  </cheat>

  <cheat desc="Select Weapon PL1">
    <parameter>
      <item value="0x01">Normal</item>
      <item value="0x02">Hyper Shot</item>
      <item value="0x03">Tail Shot</item>
      <item value="0x04">Bound Shot</item>
      <item value="0x00">Super Bomb</item>
    </parameter>
    <script state="run">
      <action>maincpu.pb@FF0E14=param</action>
    </script>
  </cheat>

  <cheat desc="Select Option PL1"> <comment>Get an option first</comment>
    <parameter>
      <item value="0x01">Flames</item>
      <item value="0x02">Circular</item>
    </parameter>
    <script state="run">
      <action>maincpu.pb@FF0DE3=param</action>
    </script>
  </cheat>

  <cheat desc="One heart always = life PL1">
    <script state="run">
      <action>maincpu.pb@FF0E17=63</action>
      <action>maincpu.pb@FF0E19=64</action>
    </script>
  </cheat>

  <cheat desc="One heart=life Now! PL1">
    <script state="on">
      <action>maincpu.pb@FF0E17=63</action>
      <action>maincpu.pb@FF0E19=64</action>
    </script>
  </cheat>

  <cheat desc="Select Option Power PL1">
    <parameter>
      <item value="0x00">Normal</item>
      <item value="0x01">Double</item>
    </parameter>
    <script state="run">
      <action>maincpu.pb@FF0DE4=param</action>
    </script>
  </cheat>

  <cheat desc="Infinite Ammo (Super Bomb) PL2">
    <script state="run">
      <action>maincpu.pb@FF0E38=FF</action>
    </script>
  </cheat>

  <cheat desc="Select Weapon PL2">
    <parameter>
      <item value="0x01">Normal</item>
      <item value="0x02">Hyper Shot</item>
      <item value="0x03">Tail Shot</item>
      <item value="0x04">Bound Shot</item>
      <item value="0x00">Super Bomb</item>
    </parameter>
    <script state="run">
      <action>maincpu.pb@FF0E15=param</action>
    </script>
  </cheat>

  <cheat desc="Select Option PL2"> <comment>Get an option first</comment>
    <parameter>
      <item value="0x01">Flames</item>
      <item value="0x02">Circular</item>
    </parameter>
    <script state="run">
      <action>maincpu.pb@FF0DE5=param</action>
    </script>
  </cheat>

  <cheat desc="One heart always = life PL2">
    <script state="run">
      <action>maincpu.pb@FF0E1B=63</action>
      <action>maincpu.pb@FF0E1D=64</action>
    </script>
  </cheat>

  <cheat desc="One heart=life Now! PL2">
    <script state="on">
      <action>maincpu.pb@FF0E1B=63</action>
      <action>maincpu.pb@FF0E1D=64</action>
    </script>
  </cheat>

  <cheat desc="Select Option Power PL2">
    <parameter>
      <item value="0x00">Normal</item>
      <item value="0x01">Double</item>
    </parameter>
    <script state="run">
      <action>maincpu.pb@FF0DE6=param</action>
    </script>
  </cheat>

  <cheat desc=" "/>
  <cheat desc="CHARIOT (Shooting)"/>
  <cheat desc="The 'Lives' and 'Hearts' cheats must be"/>
  <cheat desc="deactivated after killing the last boss."/>

  <cheat desc="Invincibility">
    <script state="on">
      <action>temp0 =maincpu.mb@02C34C</action>
    </script>
    <script state="run">
      <action>maincpu.mb@02C34C=67</action>
    </script>
    <script state="off">
      <action>maincpu.mb@02C34C=temp0 </action>
    </script>
  </cheat>

  <cheat desc="Infinite Boss Time">
    <script state="run">
      <action>maincpu.pw@FF1002=270F</action>
    </script>
  </cheat>

  <cheat desc="One heart always = life PL1">
    <script state="run">
      <action>maincpu.pb@FF184D=59</action>
      <action>maincpu.pb@FF184C=5A</action>
    </script>
  </cheat>

  <cheat desc="One heart=life Now! PL1">
    <script state="on">
      <action>maincpu.pb@FF184D=59</action>
      <action>maincpu.pb@FF184C=5A</action>
    </script>
  </cheat>

  <cheat desc="Maximum Options PL1">
    <script state="run">
      <action>maincpu.pb@FF183B=06</action>
      <action>maincpu.pb@FF183D=07</action>
    </script>
  </cheat>

  <cheat desc="Maximum Bomb Power PL1">
    <script state="run">
      <action>maincpu.pb@FF1842=02</action>
    </script>
  </cheat>

  <cheat desc="Select Shot Type PL1">
    <parameter>
      <item value="0x00">Rapid</item>
      <item value="0x01">Wide</item>
    </parameter>
    <script state="run">
      <action>maincpu.pb@FF183F=param</action>
    </script>
  </cheat>

  <cheat desc="Maximum Fire Power (Wide) PL1">
    <script state="run">
      <action>maincpu.pb@FF1845=04</action>
    </script>
  </cheat>

  <cheat desc="Maximum Fire Power (Rapid) PL1">
    <script state="run">
      <action>maincpu.pb@FF1847=04</action>
    </script>
  </cheat>

  <cheat desc="Select Protection PL1">
    <parameter>
      <item value="0x01">Always</item>
      <item value="0x00">Never</item>
    </parameter>
    <script state="run">
      <action>maincpu.pb@FF183E=param</action>
    </script>
  </cheat>

  <cheat desc="One heart always = life PL2">
    <script state="run">
      <action>maincpu.pb@FF18ED=59</action>
      <action>maincpu.pb@FF18EC=5A</action>
    </script>
  </cheat>

  <cheat desc="One heart=life Now! PL2">
    <script state="on">
      <action>maincpu.pb@FF18ED=59</action>
      <action>maincpu.pb@FF18EC=5A</action>
    </script>
  </cheat>

  <cheat desc="Maximum Options PL2">
    <script state="run">
      <action>maincpu.pb@FF18DB=06</action>
      <action>maincpu.pb@FF18DD=07</action>
    </script>
  </cheat>

  <cheat desc="Maximum Bomb Power PL2">
    <script state="run">
      <action>maincpu.pb@FF18E2=02</action>
    </script>
  </cheat>

  <cheat desc="Select Shot Type PL2">
    <parameter>
      <item value="0x00">Rapid</item>
      <item value="0x01">Wide</item>
    </parameter>
    <script state="run">
      <action>maincpu.pb@FF18DF=param</action>
    </script>
  </cheat>

  <cheat desc="Maximum Fire Power (Wide) PL2">
    <script state="run">
      <action>maincpu.pb@FF18E5=04</action>
    </script>
  </cheat>

  <cheat desc="Maximum Fire Power (Rapid) PL2">
    <script state="run">
      <action>maincpu.pb@FF18E7=04</action>
    </script>
  </cheat>

  <cheat desc="Select Protection PL2">
    <parameter>
      <item value="0x01">Always</item>
      <item value="0x00">Never</item>
    </parameter>
    <script state="run">
      <action>maincpu.pb@FF18DE=param</action>
    </script>
  </cheat>

  <cheat desc=" "/>
  <cheat desc="DON'T PULL (Puzzle)"/>

  <cheat desc="Finish this Level Now!">
    <script state="on">
      <action>maincpu.pd@FF104A=00000000</action>
    </script>
  </cheat>

  <cheat desc="Next fruit always = 100000">
    <script state="run">
      <action>maincpu.pb@FF0EC3=16</action>
    </script>
  </cheat>

  <cheat desc="Next fruit = 100000 Now!">
    <script state="on">
      <action>maincpu.pb@FF0EC3=16</action>
    </script>
  </cheat>

  <cheat desc="Select Level Set"> <comment>Note, except for RARE common levels these sets are quite different!!!</comment>
    <parameter>
      <item value="0x01">Regular</item>
      <item value="0x02">Alternate 1</item>
      <item value="0x03">Alternate 2</item>
      <item value="0x04">Alternate 3</item>
      <item value="0x05">Alternate 4</item>
      <item value="0x06">Alternate 5</item>
    </parameter>
    <script state="on">
      <action>temp0 =maincpu.mw@045212</action>
      <action>temp1 =maincpu.md@045212</action>
      <action>temp2 =maincpu.mw@04521E</action>
    </script>
    <script state="run">
      <action condition="(param==01)">maincpu.mw@045212=6004</action> <!-- The levelset that you know and you've played usually -->
      <action condition="(param==02)">maincpu.md@045212=52406002</action> <!-- These sets are seen AFTER you finished a play and the GAME OVER in some situations. -->
      <action condition="(param==02)">maincpu.mw@04521E=4E71</action> <!-- Professional Course has NO variations in every case! -->
      <action condition="(param==03)">maincpu.md@045212=54406002</action> <!-- All sets code- addq.w $x, D0 AND THROW lsr.w ... or else the sets will be incorrectly shown -->
      <action condition="(param==03)">maincpu.mw@04521E=4E71</action> <!-- The code directly overwrite FFD5A2-A3 (the level counters). -->
      <action condition="(param==04)">maincpu.md@045212=56406002</action>
      <action condition="(param==04)">maincpu.mw@04521E=4E71</action>
      <action condition="(param==05)">maincpu.md@045212=58406002</action>
      <action condition="(param==05)">maincpu.mw@04521E=4E71</action>
      <action condition="(param==06)">maincpu.md@045212=5A406002</action>
      <action condition="(param==06)">maincpu.mw@04521E=4E71</action>
    </script>
    <script state="off">
      <action>maincpu.mw@045212=temp0 </action>
      <action>maincpu.md@045212=temp1 </action>
      <action>maincpu.mw@04521E=temp2 </action>
    </script>
  </cheat>

  <cheat desc="Professional Course">
    <parameter>
      <item value="0x01">Enable</item>
      <item value="0x00">Disable</item>
    </parameter>
    <script state="run">
      <action>maincpu.pb@FF0E6C=param</action>
    </script>
  </cheat>

  <cheat desc="Go To 'Let's Dance' Now!"> <comment>Try not to use this cheat when enemies are still hidden</comment>
    <script state="on">
      <action>maincpu.pb@FF0E59=01|(maincpu.pb@FF0E59 BAND ~81)</action>
      <action>maincpu.pb@FF0E42=01|(maincpu.pb@FF0E42 BAND ~81)</action>
    </script>
  </cheat>

  <cheat desc="Drop A Bomb Now!">
    <script state="on">
      <action>maincpu.pb@FF0EC0=20|(maincpu.pb@FF0EC0 BAND ~20)</action>
    </script>
  </cheat>

  <cheat desc="'Escape' Mode">
    <script state="run">
      <action>maincpu.pb@FF1041=01|(maincpu.pb@FF1041 BAND ~01)</action>
    </script>
  </cheat>

  <cheat desc="Select Enemy Speed">
    <parameter>
      <item value="0x00">Slow</item>
      <item value="0x3F">Fast</item>
    </parameter>
    <script state="run">
      <action>maincpu.pb@FF100A=param</action>
    </script>
  </cheat>

  <cheat desc="Boxes Are Solid"> <comment>Boxes will not collapse after a simple impact.</comment>
    <script state="on">
      <action>temp0 =maincpu.mw@04710A</action>
    </script>
    <script state="run">
      <action>maincpu.mw@04710A=600A</action>
    </script>
    <script state="off">
      <action>maincpu.mw@04710A=temp0 </action>
    </script>
  </cheat>

  <cheat desc="Boxes Are Fragile"> <comment>Boxes will collapse after a simple impact (excluding 'Hearts')</comment>
    <script state="on">
      <action>temp0 =maincpu.md@0473D0</action>
    </script>
    <script state="run">
      <action>maincpu.md@0473D0=6000FD34</action>
    </script>
    <script state="off">
      <action>maincpu.md@0473D0=temp0 </action>
    </script>
  </cheat>

  <cheat desc="Invincibility PL1">
    <script state="run">
      <action>maincpu.pw@FF17D2=0002</action>
    </script>
  </cheat>

  <cheat desc="One fruit always = life PL1">
    <script state="run">
      <action>maincpu.pb@FF0EBC=62</action>
      <action>maincpu.pb@FF0EBE=63</action>
    </script>
  </cheat>

  <cheat desc="One fruit = life Now! PL1">
    <script state="on">
      <action>maincpu.pb@FF0EBC=62</action>
      <action>maincpu.pb@FF0EBE=63</action>
    </script>
  </cheat>

  <cheat desc="Invincibility PL2">
    <script state="run">
      <action>maincpu.pw@FF1872=0002</action>
    </script>
  </cheat>

  <cheat desc="One fruit always = life PL2">
    <script state="run">
      <action>maincpu.pb@FF0EBD=62</action>
      <action>maincpu.pb@FF0EBF=63</action>
    </script>
  </cheat>

  <cheat desc="One fruit = life Now! PL2">
    <script state="on">
      <action>maincpu.pb@FF0EBD=62</action>
      <action>maincpu.pb@FF0EBF=63</action>
    </script>
  </cheat>

  <cheat desc=" "/>

  <cheat desc="Skip RAM Check"> <comment>Use with pre-enable</comment>
    <script state="on">
      <action>temp0 =maincpu.mw@05DAB6</action>
    </script>
    <script state="run">
      <action>maincpu.mw@05DAB6=0186</action>
    </script>
    <script state="off">
      <action>maincpu.mw@05DAB6=temp0 </action>
    </script>
  </cheat>

  <cheat desc="Sound Test">
    <parameter min="1" max="255" step="1"/>
    <script state="change">
      <action>maincpu.pb@800181=param</action>
    </script>
  </cheat>

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