[tmkombat] Mortal Kombat (handheld)

This forum is for posting cheats for any non-arcade game in M.A.M.E. ( aka the M.E.S.S. games ) including any softwarelist game. Requests will be fulfilled here....but please keep the requests to the requests forum.
Post Reply
User avatar
Leonis
Posts: 2
Joined: Sun May 03, 2020 10:19 pm
Location: C.H.S.
Contact:

[tmkombat] Mortal Kombat (handheld)

Post by Leonis » Sun May 03, 2020 10:47 pm

Hi, this is my first contribution to the code database, so any comments or recommendations are welcome.

File: tmkombat.xml

Code: Select all

<mamecheat version="1">

  <cheat desc="Infinite Time">
    <script state="on">
      <action>temp0 =maincpu.dw@0000103B</action>
    </script>
    <script state="run">
      <action>maincpu.dw@0000103B=0909</action>
    </script>
    <script state="off">
      <action>maincpu.dw@0000103B=temp0 </action>
    </script>
  </cheat>

  <cheat desc="Left Player Infinite Health"> <comment>Sub-Zero, Kano, Rayden, Scorpion.</comment>
    <script state="on">
      <action>temp0 =maincpu.dw@00001001</action>
    </script>
    <script state="run">
      <action>maincpu.dw@00001001=0505</action>
    </script>
    <script state="off">
      <action>maincpu.dw@00001001=temp0 </action>
    </script>
  </cheat>

  <cheat desc="Right Player Infinite Health"> <comment>Liu Kang, Sonya, Johnny Cage, Goro, Shang Tsung.</comment>
    <script state="on">
      <action>temp0 =maincpu.dw@00001011</action>
    </script>
    <script state="run">
      <action>maincpu.dw@00001011=0505</action>
    </script>
    <script state="off">
      <action>maincpu.dw@00001011=temp0 </action>
    </script>
  </cheat>

  <cheat desc="Left Player Drain All Energy Now!"> <comment>Sub-Zero, Kano, Rayden, Scorpion.</comment>
    <script state="on">
      <action>maincpu.dw@00001001=0000</action>
    </script>
  </cheat>

  <cheat desc="Right Player Drain All Energy Now!"> <comment>Liu Kang, Sonya, Johnny Cage, Goro.</comment>
    <script state="on">
      <action>maincpu.dw@00001011=0000</action>
    </script>
  </cheat>

  <cheat desc="P1 Select Character"> <comment>This code makes sense to activate before the game.</comment>
    <parameter>
      <item value="0x00">Sub-Zero</item>
      <item value="0x01">Kano</item>
      <item value="0x02">Rayden</item>
      <item value="0x03">Scorpion</item>
      <item value="0x04">Liu Kang</item>
      <item value="0x05">Sonya Blade</item>
      <item value="0x06">Johnny Cage</item>
      <item value="0x07">#Goro</item>
    </parameter>
    <script state="on">
      <action>temp0 =maincpu.db@00001022</action>
    </script>
    <script state="run">
      <action>maincpu.db@00001022=param</action>
    </script>
    <script state="off">
      <action>maincpu.db@00001022=temp0 </action>
    </script>
  </cheat>

  <cheat desc="Select Opponent Character"> <comment>This code makes sense to activate before the game. Choose from opposite team.</comment>
    <parameter>
      <item value="0x00">Sub-Zero</item>
      <item value="0x01">Kano</item>
      <item value="0x02">Rayden</item>
      <item value="0x03">Scorpion</item>
      <item value="0x04">Liu Kang</item>
      <item value="0x05">Sonya Blade</item>
      <item value="0x06">Johnny Cage</item>
      <item value="0x07">#Goro</item>
    </parameter>
    <script state="on">
      <action>temp0 =maincpu.db@00001023</action>
    </script>
    <script state="run">
      <action>maincpu.db@00001023=param</action>
    </script>
    <script state="off">
      <action>maincpu.db@00001023=temp0 </action>
    </script>
  </cheat>

  <cheat desc="Status Display">
    <parameter>
      <item value="0x00">Time/Score</item>
      <item value="0x02">Score only</item>
      <item value="0x08">Time only</item>
    </parameter>
    <script state="run">
      <action>maincpu.db@00001000=param</action>
    </script>
    <script state="off">
      <action>maincpu.db@00001000=0 </action>
    </script>
  </cheat>

  <cheat desc="Set Maximal Score">
    <script state="on">
      <action>maincpu.db@00001028=09</action>
      <action>maincpu.dw@00001029=0909</action>
    </script>
  </cheat>

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

User avatar
Pugsy
Posts: 3350
Joined: Fri Aug 17, 2001 12:59 am
Location: North Wales, UK.
Contact:

Re: [tmkombat] Mortal Kombat (handheld)

Post by Pugsy » Mon May 04, 2020 12:11 am

Thanks, I appreciate it. Added.

Moved cheats to the "Software List" forum (which is used for any MAME non-arcade game cheats) as it's not an arcade game.

Good job, the cheats work though I have a couple of observations though as you asked (thanks for that as people don't normally bother).

The data region is only 128 bytes big so all addresses should be under 0x80 (eg. so 00001028 should be 28, no need to go mad on the preceding zeros either).
Generally temp variables in ON and OFF scripts are only used for ROM or program code cheats
You also used "health" in two cheat names when it should be energy.

Does the "Set Maximal Score" do anything special? Generally we don't bother with score related cheats if they are cosmetic only.
Pugsy

Servicing your cheating needs since 1985 ;-)

Grab the latest cheat collection:
MAME 0.206 XML cheat collection 08 FEBRUARY 2018) from http://www.mamecheat.co.uk or direct from:-
http://www.mediafire.com/file/ybw7c4xyd ... at0206.zip (ZIP Archive 1931 KB)

User avatar
Leonis
Posts: 2
Joined: Sun May 03, 2020 10:19 pm
Location: C.H.S.
Contact:

Re: [tmkombat] Mortal Kombat (handheld)

Post by Leonis » Mon May 04, 2020 7:52 am

Pugsy wrote:
Mon May 04, 2020 12:11 am
eg. so 00001028 should be 28
You probably meant 1028?
Pugsy wrote:
Mon May 04, 2020 12:11 am
Does the "Set Maximal Score" do anything special?
No, preservation of records in the game is not provided. I rather did this for myself, in order to remember why this piece of memory is needed.

Do I need to simplify the codes, or have they already been fixed in DB?

User avatar
Pugsy
Posts: 3350
Joined: Fri Aug 17, 2001 12:59 am
Location: North Wales, UK.
Contact:

Re: [tmkombat] Mortal Kombat (handheld)

Post by Pugsy » Mon May 04, 2020 9:25 am


You probably meant 1028?
No, the data region that is being poked by all those cheats is only 128 bytes big. So 1028 doesnt exist. The write is working because it'll be ignoring the 1000 part.

No, preservation of records in the game is not provided. I rather did this for myself, in order to remember why this piece of memory is needed.

Do I need to simplify the codes, or have they already been fixed in DB?
Fair enough but the address is something that belongs to hiscore.dat.

I've fixed them in the db so no need to do anything.
Pugsy

Servicing your cheating needs since 1985 ;-)

Grab the latest cheat collection:
MAME 0.206 XML cheat collection 08 FEBRUARY 2018) from http://www.mamecheat.co.uk or direct from:-
http://www.mediafire.com/file/ybw7c4xyd ... at0206.zip (ZIP Archive 1931 KB)

Post Reply