<mamecheat version="1">

  <cheat desc="Infinite Credits">
    <script state="run">
      <action>maincpu.pb@4E6E=99</action>
    </script>
  </cheat>

  <cheat desc="Infinite Lives">
    <script state="run">
      <action>maincpu.pw@4E14=0506</action>
    </script>
  </cheat>

  <cheat desc="Invincibility">
    <script state="on">
      <action>temp0 =maincpu.md@1793</action>
      <action>temp1 =maincpu.md@3CE0</action>
      <action>temp2 =maincpu.md@3CE3</action>
      <action>temp3 =maincpu.md@3CE7</action>
    </script>
    <script state="run">
      <action>maincpu.md@1793=003CE0C3|(maincpu.md@1793 BAND ~00FFFFFF)</action>
      <action>maincpu.md@3CE0=000420A7|(maincpu.md@3CE0 BAND ~00FFFFFF)</action> <!-- 1st = jp $3CE0, 2nd = and a/jp nz, $3CE7 -->
      <action>maincpu.md@3CE3=1783C3AF</action> <!-- xor a/jp $1783 (Normal Ghost) -->
      <action>maincpu.md@3CE7=1796C3AF</action> <!-- xor a/jp $1796 (Blue Ghost) -->
    </script>
    <script state="off">
      <action>maincpu.md@1793=temp0 </action>
      <action>maincpu.md@3CE0=temp1 </action>
      <action>maincpu.md@3CE3=temp2 </action>
      <action>maincpu.md@3CE7=temp3 </action>
    </script>
  </cheat>

  <cheat desc="Enable Speed Hack"> <comment>This will greatly speed up your character.</comment>
    <script state="on">
      <action>temp0 =maincpu.mb@182D</action>
    </script>
    <script state="run">
      <action>maincpu.mb@182D=01</action>
    </script>
    <script state="off">
      <action>maincpu.mb@182D=temp0 </action>
    </script>
  </cheat>

  <cheat desc="Finish this Level Now!">
    <script state="on">
      <action>maincpu.pb@4E0E=F4</action>
    </script>
  </cheat>

  <cheat desc="Select Starting Level"> <comment>For the best effect deactivate this cheat after you've started the Level</comment>
    <parameter>
      <item value="0x01">Vimto</item>
      <item value="0x02">1st Peas</item>
      <item value="0x03">2nd Peas</item>
      <item value="0x04">1st Apple</item>
      <item value="0x05">2nd Apple</item>
      <item value="0x06">1st Grapes</item>
      <item value="0x07">2nd Grapes</item>
      <item value="0x08">1st Galaxian</item>
      <item value="0x09">2nd Galaxian</item>
      <item value="0x10">1st Bread</item>
      <item value="0x11">2nd Bread</item>
      <item value="0x12">1st Pancakes</item>
      <item value="0x13">2nd Pancakes</item>
    </parameter>
    <script state="run">
      <action condition="(param==01) AND (maincpu.pb@4E0A==68)">maincpu.pb@4E0A=7E</action>
      <action condition="(param==01) AND (maincpu.pb@4E13==00)">maincpu.pb@4E13=01</action>
      <action condition="(param==02) AND (maincpu.pb@4E0A==68)">maincpu.pb@4E0A=7F</action>
      <action condition="(param==02) AND (maincpu.pb@4E13==00)">maincpu.pb@4E13=02</action>
      <action condition="(param==03) AND (maincpu.pb@4E0A==68)">maincpu.pb@4E0A=80</action>
      <action condition="(param==03) AND (maincpu.pb@4E13==00)">maincpu.pb@4E13=03</action>
      <action condition="(param==04) AND (maincpu.pb@4E0A==68)">maincpu.pb@4E0A=81</action>
      <action condition="(param==04) AND (maincpu.pb@4E13==00)">maincpu.pb@4E13=04</action>
      <action condition="(param==05) AND (maincpu.pb@4E0A==68)">maincpu.pb@4E0A=82</action>
      <action condition="(param==05) AND (maincpu.pb@4E13==00)">maincpu.pb@4E13=05</action>
      <action condition="(param==06) AND (maincpu.pb@4E0A==68)">maincpu.pb@4E0A=83</action>
      <action condition="(param==06) AND (maincpu.pb@4E13==00)">maincpu.pb@4E13=06</action>
      <action condition="(param==07) AND (maincpu.pb@4E0A==68)">maincpu.pb@4E0A=84</action>
      <action condition="(param==07) AND (maincpu.pb@4E13==00)">maincpu.pb@4E13=07</action>
      <action condition="(param==08) AND (maincpu.pb@4E0A==68)">maincpu.pb@4E0A=85</action>
      <action condition="(param==08) AND (maincpu.pb@4E13==00)">maincpu.pb@4E13=08</action>
      <action condition="(param==09) AND (maincpu.pb@4E0A==68)">maincpu.pb@4E0A=86</action>
      <action condition="(param==09) AND (maincpu.pb@4E13==00)">maincpu.pb@4E13=09</action>
      <action condition="(param==10) AND (maincpu.pb@4E0A==68)">maincpu.pb@4E0A=87</action>
      <action condition="(param==10) AND (maincpu.pb@4E13==00)">maincpu.pb@4E13=0A</action>
      <action condition="(param==11) AND (maincpu.pb@4E0A==68)">maincpu.pb@4E0A=88</action>
      <action condition="(param==11) AND (maincpu.pb@4E13==00)">maincpu.pb@4E13=0B</action>
      <action condition="(param==12) AND (maincpu.pb@4E0A==68)">maincpu.pb@4E0A=89</action>
      <action condition="(param==12) AND (maincpu.pb@4E13==00)">maincpu.pb@4E13=0C</action>
      <action condition="(param==13) AND (maincpu.pb@4E0A==68)">maincpu.pb@4E0A=8A</action>
      <action condition="(param==13) AND (maincpu.pb@4E13==00)">maincpu.pb@4E13=0D</action>
    </script>
  </cheat>

  <cheat desc="Select Level (for Practice)"> <comment>Do NOT use in conjunction with the standard Select Starting Level cheat</comment>
    <parameter>
      <item value="0x00">Coke</item>
      <item value="0x01">Vimto</item>
      <item value="0x02">1st Peas</item>
      <item value="0x03">2nd Peas</item>
      <item value="0x04">1st Apple</item>
      <item value="0x05">2nd Apple</item>
      <item value="0x06">1st Grapes</item>
      <item value="0x07">2nd Grapes</item>
      <item value="0x08">1st Galaxian</item>
      <item value="0x09">2nd Galaxian</item>
      <item value="0x0A">1st Bread</item>
      <item value="0x0B">2nd Bread</item>
      <item value="0x0C">1st Pancakes</item>
      <item value="0x0D">2nd Pancakes</item>
      <item value="0xFF">Split-Screen (Unplayable)</item>
      <item value="0xFE">No maze or dots(Unfinishable)</item>
    </parameter>
    <script state="run">
      <action>maincpu.pb@4E13=param</action>
    </script>
  </cheat>

  <cheat desc="Select Ghost Changeback Speed">
    <parameter>
      <item value="0x0000">Stay blue until eaten</item>
      <item value="0x0258">Slow</item>
      <item value="0x0168">Moderate</item>
      <item value="0x00F0">Quick</item>
      <item value="0x0078">Lightning</item>
      <item value="0x0001">No change to blue</item>
    </parameter>
    <script state="run">
      <action>maincpu.pw@4DBD=param</action>
    </script>
  </cheat>

  <cheat desc="---------------------"/>
  <cheat desc="Ghost Status Cheats"/>
  <cheat desc="---------------------"/>

  <cheat desc="Red always blue">
    <script state="run">
      <action>maincpu.pb@4DA7=01</action>
    </script>
  </cheat>

  <cheat desc="Pink always blue">
    <script state="run">
      <action>maincpu.pb@4DA8=01</action>
    </script>
  </cheat>

  <cheat desc="Green always blue">
    <script state="run">
      <action>maincpu.pb@4DA9=01</action>
    </script>
  </cheat>

  <cheat desc="Orange always blue">
    <script state="run">
      <action>maincpu.pb@4DAA=01</action>
    </script>
  </cheat>

  <cheat desc="Ghosts Always Edible (No Pts)">
    <script state="run">
      <action>maincpu.pb@4DA5=00</action>
    </script>
  </cheat>

  <cheat desc=" "/>

  <cheat desc="Fix Split Screen Bug"> <comment>Fixes the bug with levels GT 255 see here - www.donhodges.com/how_high_can_you_get2.htm</comment>
    <script state="on">
      <action>temp0 =maincpu.md@2BFC</action>
      <action>temp1 =maincpu.mw@2C00</action>
      <action>temp2 =maincpu.mb@2C38</action>
      <action>temp3 =maincpu.md@2C3C</action>
      <action>temp4 =maincpu.mw@2FFC</action>
    </script>
    <script state="run">
      <action>maincpu.md@2BFC=37D207FE</action>
      <action>maincpu.mw@2C00=3C2C</action>
      <action>maincpu.mb@2C38=12</action>
      <action>maincpu.md@2C3C=0006D612|(maincpu.md@2C3C BAND ~00FFFFFF)</action>
      <action>maincpu.mw@2FFC=8181</action>
    </script>
    <script state="off">
      <action>maincpu.md@2BFC=temp0 </action>
      <action>maincpu.mw@2C00=temp1 </action>
      <action>maincpu.mb@2C38=temp2 </action>
      <action>maincpu.md@2C3C=temp3 </action>
      <action>maincpu.mw@2FFC=temp4 </action>
    </script>
  </cheat>

  <cheat desc="Sound Test">
    <parameter min="1" max="17" step="1"/>
    <script state="change">
      <action condition="maincpu.pb@4E6E==00">maincpu.pb@4E6E=01</action>
      <action>maincpu.pb@4ECC=0</action>
      <action>maincpu.pb@4EDC=0</action>
      <action>maincpu.pb@4E9C=0</action>
      <action>maincpu.pb@4EAC=0</action>
      <action>maincpu.pb@4EBC=0</action>
      <action condition="(param LE 2)">maincpu.pb@4ECC=80>>(8-param)</action>
      <action condition="(param LE 2)">maincpu.pb@4EDC=80>>(8-param)</action>
      <action condition="(param GE 3) and (param LE 4)">maincpu.pb@4E9C=80>>(A-param)</action>
      <action condition="(param GE 5) and (param LE A)">maincpu.pb@4EAC=80>>(C-param)</action>
      <action condition="(param GE B)">maincpu.pb@4EBC=80>>(13-param)</action>
    </script>
  </cheat>

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