<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@1774</action>
      <action>temp1 =maincpu.md@3CDF</action>
      <action>temp2 =maincpu.md@3CE3</action>
      <action>temp3 =maincpu.md@3CE7</action>
    </script>
    <script state="run">
      <action>maincpu.md@1774=323CE0C3</action>
      <action>maincpu.md@3CDF=0420A700</action> <!-- 1st = jp $3CE0, 2nd = and a/jp nz, $3CE7 -->
      <action>maincpu.md@3CE3=1764C3AF</action> <!-- xor a/jp $1764 (Normal Ghost) -->
      <action>maincpu.md@3CE7=1777C3AF</action> <!-- xor a/jp $1777 (Blue Ghost) -->
    </script>
    <script state="off">
      <action>maincpu.md@1774=temp0 </action>
      <action>maincpu.md@3CDF=temp1 </action>
      <action>maincpu.md@3CE3=temp2 </action>
      <action>maincpu.md@3CE7=temp3 </action>
    </script>
  </cheat>

  <cheat desc="Move Manually">
    <script state="on">
      <action>temp0 =maincpu.md@18C5</action>
      <action>temp1 =maincpu.md@3E60</action>
      <action>temp2 =maincpu.md@3E64</action>
      <action>temp3 =maincpu.md@3E68</action>
      <action>temp4 =maincpu.md@3E6C</action>
    </script>
    <script state="run">
      <action>maincpu.md@18C5=CB3E60C3</action> <!-- This ROM cheat was made by nolberto82 -->
      <action>maincpu.md@3E60=2F50003A</action>
      <action>maincpu.md@3E64=04280FE6</action>
      <action>maincpu.md@3E68=18C8C32F</action>
      <action>maincpu.md@3E6C=001A13C3</action>
    </script>
    <script state="off">
      <action>maincpu.md@18C5=temp0 </action>
      <action>maincpu.md@3E60=temp1 </action>
      <action>maincpu.md@3E64=temp2 </action>
      <action>maincpu.md@3E68=temp3 </action>
      <action>maincpu.md@3E6C=temp4 </action>
    </script>
  </cheat>

  <cheat desc="Enable Speed Hack"> <comment>This will greatly speed up your character.</comment>
    <script state="on">
      <action>temp0 =maincpu.mw@180B</action>
    </script>
    <script state="run">
      <action>maincpu.mw@180B=3218</action>
    </script>
    <script state="off">
      <action>maincpu.mw@180B=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">Strawberry</item>
      <item value="0x02">1st Orange</item>
      <item value="0x03">2nd Orange</item>
      <item value="0x04">1st Apple</item>
      <item value="0x05">2nd Apple</item>
      <item value="0x06">1st Pineapple</item>
      <item value="0x07">2nd Pineapple</item>
      <item value="0x08">1st Galaxian</item>
      <item value="0x09">2nd Galaxian</item>
      <item value="0x0A">1st Bell</item>
      <item value="0x0B">2nd Bell</item>
      <item value="0x0C">1st Key</item>
      <item value="0x0D">2nd Key</item>
    </parameter>
    <script state="run">
      <action condition="maincpu.pb@4E13==00">maincpu.pb@4E13=param</action>
      <action condition="(param LT 0x0C) AND (maincpu.pb@4E0A==68)">maincpu.pb@4E0A=param + 0x7D</action>
      <action condition="(param GE 0x0C) AND (maincpu.pb@4E0A==68)">maincpu.pb@4E0A=param + 0x7B</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">Cherry</item>
      <item value="0x01">Strawberry</item>
      <item value="0x02">1st Orange</item>
      <item value="0x03">2nd Orange</item>
      <item value="0x04">1st Apple</item>
      <item value="0x05">2nd Apple</item>
      <item value="0x06">1st Pineapple</item>
      <item value="0x07">2nd Pineapple</item>
      <item value="0x08">1st Galaxian</item>
      <item value="0x09">2nd Galaxian</item>
      <item value="0x0A">1st Bell</item>
      <item value="0x0B">2nd Bell</item>
      <item value="0x0C">1st Key</item>
      <item value="0x0D">2nd Key</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="Ghosts Enter All Passages"> <comment>This can lead to a much harder game, Ghosts can travel up restricted passages in chase/scatter modes</comment>
    <script state="on">
      <action>temp0 =maincpu.mb@1C15</action>
      <action>temp1 =maincpu.mb@1CEC</action>
      <action>temp2 =maincpu.mb@1DC3</action>
      <action>temp3 =maincpu.mb@1E9A</action>
    </script>
    <script state="run">
      <action>maincpu.mb@1C15=00</action>
      <action>maincpu.mb@1CEC=00</action>
      <action>maincpu.mb@1DC3=00</action>
      <action>maincpu.mb@1E9A=00</action>
    </script>
    <script state="off">
      <action>maincpu.mb@1C15=temp0 </action>
      <action>maincpu.mb@1CEC=temp1 </action>
      <action>maincpu.mb@1DC3=temp2 </action>
      <action>maincpu.mb@1E9A=temp3 </action>
    </script>
  </cheat>

  <cheat desc="Ghosts Ignore Tunnel Slowdown"> <comment>Ghosts no longer slow down when travelling through side tunnels</comment>
    <script state="on">
      <action>temp0 =maincpu.mb@2063</action>
    </script>
    <script state="run">
      <action>maincpu.mb@2063=00</action>
    </script>
    <script state="off">
      <action>maincpu.mb@2063=temp0 </action>
    </script>
  </cheat>

  <cheat desc="Ms. Pac-Man Ghost Behavior"> <comment>Ms. Pac-Man-style reversals + randomized scatter movement for red/pink ghosts - effectively play with Ms Pac Man Ghost Rules.</comment>
    <script state="on">
      <action>temp0 =maincpu.mw@0E5C</action>
      <action>temp1 =maincpu.md@274A</action>
      <action>temp2 =maincpu.md@2780</action>
      <action>temp3 =maincpu.md@2FC0</action>
      <action>temp4 =maincpu.md@2FC4</action>
      <action>temp5 =maincpu.md@2FC8</action>
      <action>temp6 =maincpu.md@2FCC</action>
      <action>temp7 =maincpu.md@2FD0</action>
      <action>temp8 =maincpu.md@2FD4</action>
    </script>
    <script state="run">
      <action>maincpu.mw@0E5C=00AF</action>
      <action>maincpu.md@274A=2FC0CD4D</action>
      <action>maincpu.md@2780=2FC0CD4D</action>
      <action>maincpu.md@2FC0=D021E5F5</action>
      <action>maincpu.md@2FC4=E65FED2F</action>
      <action>maincpu.md@2FC8=235FD706</action>
      <action>maincpu.md@2FCC=C9F1E156</action>
      <action>maincpu.md@2FD0=391D221D</action>
      <action>maincpu.md@2FD4=3B402040</action>
    </script>
    <script state="off">
      <action>maincpu.mw@0E5C=temp0 </action>
      <action>maincpu.md@274A=temp1 </action>
      <action>maincpu.md@2780=temp2 </action>
      <action>maincpu.md@2FC0=temp3 </action>
      <action>maincpu.md@2FC4=temp4 </action>
      <action>maincpu.md@2FC8=temp5 </action>
      <action>maincpu.md@2FCC=temp6 </action>
      <action>maincpu.md@2FD0=temp7 </action>
      <action>maincpu.md@2FD4=temp8 </action>
    </script>
  </cheat>

  <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@2BF3</action>
      <action>temp1 =maincpu.mw@2BF7</action>
      <action>temp2 =maincpu.mb@2C2F</action>
      <action>temp3 =maincpu.md@2C32</action>
      <action>temp4 =maincpu.mw@2FFC</action>
    </script>
    <script state="run">
      <action>maincpu.md@2BF3=2ED207FE</action>
      <action>maincpu.mw@2BF7=3C2C</action>
      <action>maincpu.mb@2C2F=12</action>
      <action>maincpu.md@2C32=06D6123E</action>
      <action>maincpu.mw@2FFC=798B</action>
    </script>
    <script state="off">
      <action>maincpu.md@2BF3=temp0 </action>
      <action>maincpu.mw@2BF7=temp1 </action>
      <action>maincpu.mb@2C2F=temp2 </action>
      <action>maincpu.md@2C32=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. -->
