[samsho] Update/add. cheats

This forum is for posting M.A.M.E. arcade cheats. Requests will be fulfilled here....but please keep the requests to the requests forum.
Post Reply
mezdap
Posts: 131
Joined: Sun Feb 04, 2018 5:16 am
Has thanked: 2 times
Been thanked: 2 times

[samsho] Update/add. cheats

Post by mezdap »

samsho.xml, samshoh.xml

Code: Select all

  <cheat desc="Infinite Character Select Time">
    <script state="on">
      <action>temp0=maincpu.rw@023150</action>
    </script>
    <script state="run">
      <action>maincpu.rw@023150=4A6D</action> <!-- This ROM cheat was made by mezdap -->
    </script>
    <script state="off">
      <action>maincpu.rw@023150=temp0</action>
    </script>
  </cheat>

Code: Select all

  <cheat desc="Select Background">
    <parameter>
      <item value="0x00">Haohmaru</item>
      <item value="0x01">Nakoruru</item>
      <item value="0x02">Hanzo</item>
      <item value="0x03">Galford</item>
      <item value="0x04">Wang-Fu</item>
      <item value="0x05">Ukyo</item>
      <item value="0x06">Kyoshiro</item>
      <item value="0x07">Gen-An</item>
      <item value="0x08">Earthquake</item>
      <item value="0x09">Jubei</item>
      <item value="0x0A">Tamtam</item>
      <item value="0x0B">Charlotte</item>
      <item value="0x0C">Amakusa</item>
    </parameter>
    <script state="run">
      <action>maincpu.pb@100A8A=param</action>
    </script>
  </cheat>
mezdap
Posts: 131
Joined: Sun Feb 04, 2018 5:16 am
Has thanked: 2 times
Been thanked: 2 times

Re: [samsho] reselect character

Post by mezdap »

samsho.xml, samshoh.xml

Code: Select all

  <cheat desc="Reselect Character"> <comment>Lets you reselect character on the select screen for P1 and P2.</comment>
    <script state="on">
      <action>temp0=maincpu.rw@02318C</action>
    </script>
    <script state="run">
      <action>maincpu.rw@02318C=0012</action> <!-- This ROM cheat was made by mezdap -->
    </script>
    <script state="off">
      <action>maincpu.rw@02318C=temp0</action>
    </script>
  </cheat>
Last edited by mezdap on Fri May 03, 2024 12:09 pm, edited 1 time in total.
jman
Posts: 863
Joined: Tue Dec 01, 2020 1:24 pm

Re: [samsho] Update/add. cheats

Post by jman »

mezdap wrote:

Code: Select all

  <cheat desc="Reselect Character"> <comment>Lets you reselect character on the select screen for P1 and P2.</comment>
    <script state="on">
      <action>temp0=maincpu.rw@02318A</action>
    </script>
    <script state="run">
      <action>maincpu.rw@02318A=6712</action> <!-- This ROM cheat was made by mezdap -->
    </script>
    <script state="off">
      <action>maincpu.rw@02318A=temp0</action>
    </script>
  </cheat>
Again, it's dangerous code.

Code: Select all

023186  tst.b   ($d,A3)                                     4A2B 000D
02318A  beq     $2319e                                      6712
02318C  dc.w    $000c; ILLEGAL                              000C
02318E  move.b  #$1, (-$73c8,A5)                            1B7C 0001 8C38
023194  jmp     ($5e,PC) ; ($231f4)                         4EFA 005E
023198  move.b  #$1, ($d,A3)                                177C 0001 000D
02319E  tst.b   (-$73c8,A5)                                 4A2D 8C38
If "beq $2319e" is false, the game throws illegal instruction and freezes.

Fixed code is the following.

Code: Select all

    <cheat desc="Reselect Character">
        <comment>Lets you reselect character on the select screen for P1 and P2.</comment>
        <script state="on">
            <action>temp0 = maincpu.rb@2319B</action>
        </script>
        <script state="run">
            <action>maincpu.rb@2319B = 00</action>
        </script>
        <script state="off">
            <action>maincpu.rb@2319B = temp0</action>
        </script>
    </cheat>
mezdap
Posts: 131
Joined: Sun Feb 04, 2018 5:16 am
Has thanked: 2 times
Been thanked: 2 times

Re: [samsho] Update/add. cheats

Post by mezdap »

You're right it says 'ILLEGAL' I should've check it! but game is working normal...
I was trying add hidden character (Amakusa) to select screen and I gave up post this!
This is the address that I found first:maincpu.rw02318C=0012
jman
Posts: 863
Joined: Tue Dec 01, 2020 1:24 pm

Re: [samsho] Update/add. cheats

Post by jman »

mezdap wrote:

Code: Select all

  <cheat desc="Infinite Character Select Time">
    <script state="on">
      <action>temp0=maincpu.rw@023150</action>
    </script>
    <script state="run">
      <action>maincpu.rw@023150=4A6D</action> <!-- This ROM cheat was made by mezdap -->
    </script>
    <script state="off">
      <action>maincpu.rw@023150=temp0</action>
    </script>
  </cheat>
This seems to work but...

Original code.

Code: Select all

 02314C  tst.w   (-$73cc,A5)                                 4A6D 8C34
 023150  beq     $23168                                      6700 0016
 023154  btst    #$7, ($8,A2)                                082A 0007 0008
 02315A  bne     $23168                                      6600 000C
 02315E  btst    #$4, ($8,A2)                                082A 0004 0008
 023164  beq     $23206                                      6700 00A0
 023168  move.w  #$1f4, D0                                   303C 01F4
mezdap replaces 0x6700 at $23150 with 0x4A6D. It's "tst.w" so that "beq $23168" is changed to "tst.w ($16,A5)".
This opcode is invalid because next instruction is "btst" so that the result (zero flag) at $23150 is thrown away.
But mezdap only have to change "beq $23168" to "beq $23154" (jump next instruction even if timer is zero).

Code: Select all

    <script state="run">
      <action>maincpu.rw@023153 = 02</action>
    </script>
And I think it is not "INFINITE TIME". Many "infinite xxxx" codes in the database keep certain value and don't decrease/increase.
But mezdap's code doesn't keep value and decreases. So the value reaches to zero.
(Unfortunately, program code checks "timer is zero or not" at $22CD2 where mezdap doesn't patch)
So I suggest this code is renamed to "Disable Character Select Timer Check".

If you need to "inifinite time", the following code is one of example.

Code: Select all

    <cheat desc="Infinite Character Select Time">
        <script state="on">
            <action>temp0 = maincpu.rw@22CCE</action>
        </script>
        <script state="run">
            <action>maincpu.rw@22CCE = 302D</action>
        </script>
        <script state="off">
            <action>maincpu.rw@22CCE = temp0</action>
        </script>
    </cheat>
It changes "subq.w #1,(-$73cc,A5)" to "move.w (-$73cc,A5),D0" (I confirm it's no problem that D0 register is broken).
Post Reply