[kof94] The King of Fighters '94

This forum is for posting M.A.M.E. Work In Progress "Arcade"cheats that are not quite ready for the prime time. If the cheats are buggy or the cheat descriptions are non-standard then please post them here. Help maybe given but there are no guarantees and they will only be added to the cheat file when the cheat file maintainer is happy with them.
Post Reply
jman
Posts: 843
Joined: Tue Dec 01, 2020 1:24 pm

[kof94] The King of Fighters '94

Post by jman »

Code: Select all

<cheat desc="no hit">
    <parameter>
        <item value="0x01">P1          </item>
        <item value="0x02">P2          </item>
        <item value="0x03">both players</item>
    </parameter>
    <script state="on">
        <action>maincpu.rq@02acc = 4eb9000ff0624e71</action> <!-- direct attack / firearms -->
        <action>maincpu.rq@0a3be = 4eb9000ff07a6700</action> <!-- catch / throw -->
        <action>maincpu.rq@0dd72 = 4eb9000ff0864e71</action> <!-- storm bringer (heidern) -->
        <action>maincpu.rq@0f548 = 4eb9000ff0864e71</action> <!-- super argentine back breaker (ralf) -->
        <action>maincpu.rq@10736 = 4eb9000ff0864e71</action> <!-- super argentine back breaker (clark) -->
        <action>maincpu.rq@10f94 = 4eb9000ff0864e71</action> <!-- ultra argentine back breaker (clark) -->
        <action>maincpu.rq@18754 = 4eb9000ff0984e71</action> <!-- jiraishin (daimon) -->
        <action>maincpu.rq@188d2 = 4eb9000ff0864e71</action> <!-- chou-oosotogari (daimon) -->
        <action>maincpu.rq@19590 = 4eb9000ff0864e71</action> <!-- tenchi gaeshi (daimon) -->
        <action>maincpu.rq@19f00 = 4eb9000ff0864e71</action> <!-- jigoku gokuraku otoshi (daimon) -->
        <action>maincpu.rq@29174 = 4eb9000ff0864e71</action> <!-- syouran kyaku (takuma) -->
        <action>maincpu.rq@2ad22 = 4eb9000ff0864e71</action> <!-- hyakuretsu binta (yuri) -->
        <action>maincpu.rq@ff040 = 48e780007001b7fc</action>
        <action>maincpu.rq@ff048 = 0010810060027000</action>
        <action>maincpu.rq@ff050 = b7fc001083006002</action>
        <action>maincpu.rq@ff058 = 70004a804cdf0001</action>
        <action>maincpu.rq@ff060 = 4e752c6d079648e7</action>
        <action>maincpu.rq@ff068 = 0010264e61d24cdf</action>
        <action>maincpu.rq@ff070 = 08006704052e007a</action>
        <action>maincpu.rq@ff078 = 4e754841121061c0</action>
        <action>maincpu.rq@ff080 = 6702c2074e75302c</action>
        <action>maincpu.rq@ff088 = 0018906b001861b0</action>
        <action>maincpu.rq@ff090 = 6602707f4a404e75</action>
        <action>maincpu.rq@ff098 = 61a6670802400008</action>
        <action>maincpu.rq@ff0a0 = 0c4000084e750000</action>
        <!--
        ff040 | 48e7 8000      : movem.l D0,-(A7)     // player check routine
        ff044 | 7001           : moveq   #$1,D0
        ff046 | b7fc 0010 8100 : cmpa.l  #$108100,A3
        ff04c | 6602           : bne     $ff050
        ff04e | 7000           : moveq   #$0, D0
        ff050 | b7fc 0010 8300 : cmpa.l  #$108300,A3
        ff056 | 6602           : bne     $ff05a
        ff058 | 7000           : moveq   #$0,D0
        ff05a | 4a80           : tst.l   D0
        ff05c | 4cdf 0001      : movem.l (A7)+,D0
        ff060 | 4e75           : rts
        ff062 | 2c6d 0796      : movea.l ($796,A5),A6 // direct attack / firearms
        ff066 | 48e7 0010      : movem.l A3,-(A7)
        ff06a | 264e           : movea.l A6,A3
        ff06c | 61d2           : bsr     $ff040
        ff06e | 4cdf 0800      : movem.l (A7)+,A3
        ff072 | 6704           : beq     $ff078
        ff074 | 052e 007a      : btst    D2,($7a,A6)
        ff078 | 4e75           : rts
        ff07a | 4841           : swap    D1           // catch / throw
        ff07c | 1210           : move.b  (A0),D1
        ff07e | 61c0           : bsr     $ff040
        ff080 | 6702           : beq     $ff084
        ff082 | c207           : and.b   D7, D1
        ff084 | 4e75           : rts
        ff086 | 302c 0018      : move.w  ($18,A4),D0  // moves
        ff08a | 906b 0018      : sub.w   ($18,A3),D0
        ff08e | 61b0           : bsr     $ff040
        ff090 | 6602           : bne     $ff094
        ff092 | 707f           : moveq   #$7f,D0
        ff094 | 4a40           : tst.w   D0
        ff096 | 4e75           : rts
        ff098 | 61a6           : bsr     $ff040       // jiraishin (daimon)
        ff09a | 6708           : beq     $ff0a4
        ff09c | 0240 0008      : andi.w  #$8,D0
        ff0a0 | 0c40 0008      : cmpi.w  #$8,D0
        ff0a4 | 4e75           : rts
        -->
    </script>
    <script state="change">
        <action                                  >maincpu.rb@ff04c = 60</action>
        <action                                  >maincpu.rb@ff056 = 60</action>
        <action condition="(param band 01) != 00">maincpu.rb@ff04c = 66</action>
        <action condition="(param band 02) != 00">maincpu.rb@ff056 = 66</action>
    </script>
    <script state="off">
        <action>maincpu.rq@02acc = 2c6d0796052e007a</action>
        <action>maincpu.rq@0a3be = 48411210c2076700</action>
        <action>maincpu.rq@0dd72 = 302c0018906b0018</action>
        <action>maincpu.rq@0f548 = 302c0018906b0018</action>
        <action>maincpu.rq@10736 = 302c0018906b0018</action>
        <action>maincpu.rq@10f94 = 302c0018906b0018</action>
        <action>maincpu.rq@18754 = 024000080c400008</action>
        <action>maincpu.rq@188d2 = 302c0018906b0018</action>
        <action>maincpu.rq@19590 = 302c0018906b0018</action>
        <action>maincpu.rq@19f00 = 302c0018906b0018</action>
        <action>maincpu.rq@29174 = 302c0018906b0018</action>
        <action>maincpu.rq@2ad22 = 302c0018906b0018</action>
        <action>maincpu.rq@ff040 = 0000000000000000</action>
        <action>maincpu.rq@ff048 = 0000000000000000</action>
        <action>maincpu.rq@ff050 = 0000000000000000</action>
        <action>maincpu.rq@ff058 = 0000000000000000</action>
        <action>maincpu.rq@ff060 = 0000000000000000</action>
        <action>maincpu.rq@ff068 = 0000000000000000</action>
        <action>maincpu.rq@ff070 = 0000000000000000</action>
        <action>maincpu.rq@ff078 = 0000000000000000</action>
        <action>maincpu.rq@ff080 = 0000000000000000</action>
        <action>maincpu.rq@ff088 = 0000000000000000</action>
        <action>maincpu.rq@ff090 = 0000000000000000</action>
        <action>maincpu.rq@ff098 = 0000000000000000</action>
        <action>maincpu.rq@ff0a0 = 0000000000000000</action>
    </script>
</cheat>

<cheat desc="auto fire">
    <parameter>
        <item value="0x01">P1          </item>
        <item value="0x02">P2          </item>
        <item value="0x03">both players</item>
    </parameter>
    <script state="on">
        <action>maincpu.rq@0a35c = 4eb9000ff0ca4e71</action>
        <action>maincpu.rq@ff0b0 = 7001b9fc00108100</action>
        <action>maincpu.rq@ff0b8 = 66027000b9fc0010</action>
        <action>maincpu.rq@ff0c0 = 8300660270004a80</action>
        <action>maincpu.rq@ff0c8 = 4e751e2e000161e0</action>
        <action>maincpu.rq@ff0d0 = 66021e16024700f0</action>
        <action>maincpu.rq@ff0d8 = 4e75000000000000</action>
        <!--
        ff0b0 | 7001           : moveq  #$1,D0      // player check routine
        ff0b2 | b9fc 0010 8100 : cmpa.l #$108100,A4
        ff0b8 | 6602           : bne    $ff0bc
        ff0ba | 7000           : moveq  #$0,D0
        ff0bc | b9fc 0010 8300 : cmpa.l #$108300,A4
        ff0c2 | 6602           : bne    $ff0c6
        ff0c4 | 7000           : moveq  #$0,D0
        ff0c6 | 4a80           : tst.l  D0
        ff0c8 | 4e75           : rts
        ff0ca | 1e2e 0001      : move.b ($1,A6),D7  // main routine
        ff0ce | 61e0           : bsr    $ff0b0
        ff0d0 | 6602           : bne    $ff0d4
        ff0d2 | 1e16           : move.b (A6),D7
        ff0d4 | 0247 00f0      : andi.w #$f0,D7
        ff0d8 | 4e75           : rts
        -->
    </script>
    <script state="change">
        <action                                  >maincpu.rb@ff0b8 = 60</action>
        <action                                  >maincpu.rb@ff0c2 = 60</action>
        <action condition="(param band 01) != 00">maincpu.rb@ff0b8 = 66</action>
        <action condition="(param band 02) != 00">maincpu.rb@ff0c2 = 66</action>
    </script>
    <script state="off">
        <action>maincpu.rq@0a35c = 1e2e0001024700f0</action>
        <action>maincpu.rq@ff0b0 = 0000000000000000</action>
        <action>maincpu.rq@ff0b8 = 0000000000000000</action>
        <action>maincpu.rq@ff0c0 = 0000000000000000</action>
        <action>maincpu.rq@ff0c8 = 0000000000000000</action>
        <action>maincpu.rq@ff0d0 = 0000000000000000</action>
        <action>maincpu.rq@ff0d8 = 0000000000000000</action>
    </script>
</cheat>

<cheat desc="action speed up">
    <parameter>
        <item value="0x01">P1          </item>
        <item value="0x02">P2          </item>
        <item value="0x03">both players</item>
    </parameter>
    <script state="on">
        <action>maincpu.rq@049b0 = 4eb9000ff12a6b00</action>
        <action>maincpu.rq@ff110 = 7001b9fc00108100</action>
        <action>maincpu.rq@ff118 = 66027000b9fc0010</action>
        <action>maincpu.rq@ff120 = 8300660270004a80</action>
        <action>maincpu.rq@ff128 = 4e75d0c019500076</action>
        <action>maincpu.rq@ff130 = 6b0861dc67061950</action>
        <action>maincpu.rq@ff138 = 00764e75197c0001</action>
        <action>maincpu.rq@ff140 = 00764e7500000000</action>
        <!--
        ff110 | 7001           : moveq  #$1,D0        // player check routine
        ff112 | b9fc 0010 8100 : cmpa.l #$108100,A4
        ff118 | 6602           : bne    $ff11c
        ff11a | 7000           : moveq  #$0,D0
        ff11c | b9fc 0010 8300 : cmpa.l #$108300,A4
        ff122 | 6002           : bra    $ff126
        ff124 | 7000           : moveq  #$0,D0
        ff126 | 4a80           : tst.l  D0
        ff128 | 4e75           : rts
        ff12a | d0c0           : adda.w D0,A0         // main routine
        ff12c | 1950 0076      : move.b (A0),($76,A4)
        ff130 | 6b08           : bmi    $ff13a
        ff132 | 61dc           : bsr    $ff110
        ff134 | 6706           : beq    $ff13c
        ff136 | 1950 0076      : move.b (A0),($76,A4)
        ff13a | 4e75           : rts
        ff13c | 197c 0001 0076 : move.b #$1,($76,A4)
        ff142 | 4e75           : rts
        -->
    </script>
    <script state="change">
        <action                                  >maincpu.rb@ff118 = 60</action>
        <action                                  >maincpu.rb@ff122 = 60</action>
        <action condition="(param band 01) != 00">maincpu.rb@ff118 = 66</action>
        <action condition="(param band 02) != 00">maincpu.rb@ff122 = 66</action>
    </script>
    <script state="off">
        <action>maincpu.rq@049b0 = d0c0195000766b00</action>
        <action>maincpu.rq@ff110 = 0000000000000000</action>
        <action>maincpu.rq@ff118 = 0000000000000000</action>
        <action>maincpu.rq@ff120 = 0000000000000000</action>
        <action>maincpu.rq@ff128 = 0000000000000000</action>
        <action>maincpu.rq@ff130 = 0000000000000000</action>
        <action>maincpu.rq@ff138 = 0000000000000000</action>
        <action>maincpu.rq@ff140 = 0000000000000000</action>
    </script>
</cheat>

<cheat desc="enable special move">
    <parameter>
        <item value="0x01">P1          </item>
        <item value="0x02">P2          </item>
        <item value="0x03">both players</item>
    </parameter>
    <script state="on">
        <action>maincpu.rq@04c1e = 4eb9000ff0fa6304</action>
        <action>maincpu.rq@0b1b8 = 4eb9000ff0fa6304</action>
        <action>maincpu.rq@0b1e4 = 4eb9000ff0fa6304</action>
        <action>maincpu.rq@0b228 = 4eb9000ff0fa6304</action>
        <action>maincpu.rq@ff0e0 = 7001b9fc00108100</action>
        <action>maincpu.rq@ff0e8 = 66027000b9fc0010</action>
        <action>maincpu.rq@ff0f0 = 8300660270004a80</action>
        <action>maincpu.rq@ff0f8 = 4e7561e467080c6c</action>
        <action>maincpu.rq@ff100 = 003f01204e750c6c</action>
        <action>maincpu.rq@ff108 = 00ff01204e750000</action>
        <!--
        ff0e0 | 7001           : moveq  #$1,D0         // player check routine
        ff0e2 | b9fc 0010 8100 : cmpa.l #$108100,A4
        ff0e8 | 6602           : bne    $ff0ec
        ff0ea | 7000           : moveq  #$0,D0
        ff0ec | b9fc 0010 8300 : cmpa.l #$108300,A4
        ff0f2 | 6602           : bne    $ff0f6
        ff0f4 | 7000           : moveq  #$0,D0
        ff0f6 | 4a80           : tst.l  D0
        ff0f8 | 4e75           : rts
        ff0fa | 61e4           : bsr    $ff0e0         // main routine
        ff0fc | 6708           : beq    $ff106
        ff0fe | 0c6c 003f 0120 : cmpi.w #$3f,($120,A4)
        ff104 | 4e75           : rts
        ff106 | 0c6c 00ff 0120 : cmpi.w #$ff,($120,A4)
        ff10c | 4e75           : rts
        -->
    </script>
    <script state="change">
        <action                                  >maincpu.rb@ff0e8 = 60</action>
        <action                                  >maincpu.rb@ff0f2 = 60</action>
        <action condition="(param band 01) != 00">maincpu.rb@ff0e8 = 66</action>
        <action condition="(param band 02) != 00">maincpu.rb@ff0f2 = 66</action>
    </script>
    <script state="off">
        <action>maincpu.rq@04c1e = 0c6c003f01206304</action>
        <action>maincpu.rq@0b1b8 = 0c6c003f01206304</action>
        <action>maincpu.rq@0b1e4 = 0c6c003f01206304</action>
        <action>maincpu.rq@0b228 = 0c6c003f01206304</action>
        <action>maincpu.rq@ff0e0 = 0000000000000000</action>
        <action>maincpu.rq@ff0e8 = 0000000000000000</action>
        <action>maincpu.rq@ff0f0 = 0000000000000000</action>
        <action>maincpu.rq@ff0f8 = 0000000000000000</action>
        <action>maincpu.rq@ff100 = 0000000000000000</action>
        <action>maincpu.rq@ff108 = 0000000000000000</action>
    </script>
</cheat>

<cheat desc="timer speed">
    <parameter>
        <item value="0x00ff">01 (slow)</item>
        <item value="0x0064">02       </item>
        <item value="0x0032">03       </item>
        <item value="0x0016">04       </item>
        <item value="0x0001">05 (fast)</item>
    </parameter>
    <script state="on">
        <action>maincpu.rd@3412e = 1b7c0000</action>
    </script>
    <script state="change">
        <action>maincpu.rw@34130 = param</action>
    </script>
    <script state="off">
        <action>maincpu.rd@3412e = 1b6d0830</action>
    </script>
</cheat>
I'm struggling against "invincibility" code based on 0.245. It is difficult to read code and comment due to unarranged.
"no hit" merges master code and player code into one and rearranges with qword. As a result, "action" status reduces from 47 to 25.

I omit "skip ram/rom check" because it has already posted here.
jman
Posts: 843
Joined: Tue Dec 01, 2020 1:24 pm

[kof94] The King of Fighters '94 (update)

Post by jman »

Code: Select all

<cheat desc="no hit">
    <parameter>
        <item value="0x01">P1          </item>
        <item value="0x02">P2          </item>
        <item value="0x03">both players</item>
    </parameter>
    <script state="on">
        <action>maincpu.rq@02acc = 4eb9000ff0504e71</action> <!-- direct attack / firearms -->
        <action>maincpu.rq@0a3be = 4eb9000ff0646700</action> <!-- catch / throw -->
        <action>maincpu.rq@0dd72 = 4eb9000ff0704e71</action> <!-- storm bringer (heidern) -->
        <action>maincpu.rq@0f548 = 4eb9000ff0704e71</action> <!-- super argentine back breaker (ralf) -->
        <action>maincpu.rq@10736 = 4eb9000ff0704e71</action> <!-- super argentine back breaker (clark) -->
        <action>maincpu.rq@10f94 = 4eb9000ff0704e71</action> <!-- ultra argentine back breaker (clark) -->
        <action>maincpu.rq@18754 = 4eb9000ff0824e71</action> <!-- jiraishin (daimon) -->
        <action>maincpu.rq@188d2 = 4eb9000ff0704e71</action> <!-- chou-oosotogari (daimon) -->
        <action>maincpu.rq@19590 = 4eb9000ff0704e71</action> <!-- tenchi gaeshi (daimon) -->
        <action>maincpu.rq@19f00 = 4eb9000ff0704e71</action> <!-- jigoku gokuraku otoshi (daimon) -->
        <action>maincpu.rq@29174 = 4eb9000ff0704e71</action> <!-- syouran kyaku (takuma) -->
        <action>maincpu.rq@2ad22 = 4eb9000ff0704e71</action> <!-- hyakuretsu binta (yuri) -->
        <action>maincpu.rq@ff040 = b7fc001081006706</action>
        <action>maincpu.rq@ff048 = b7fc001083004e75</action>
        <action>maincpu.rq@ff050 = 2c6d07962f0b264e</action>
        <action>maincpu.rq@ff058 = 61e6265f6704052e</action>
        <action>maincpu.rq@ff060 = 007a4e7548411210</action>
        <action>maincpu.rq@ff068 = 61d66702c2074e75</action>
        <action>maincpu.rq@ff070 = 302c0018906b0018</action>
        <action>maincpu.rq@ff078 = 61c66602707f4a40</action>
        <action>maincpu.rq@ff080 = 4e7561bc67080240</action>
        <action>maincpu.rq@ff088 = 00080c4000084e75</action>
        <!--
        ff040 | b7fc 0010 8100 : cmpa.l  #$108100,A3  // player check routine
        ff046 | 6706           : beq     $ff04e
        ff048 | b7fc 0010 8300 : cmpa.l  #$108300,A3
        ff04e | 4e75           : rts
        ff050 | 2c6d 0796      : movea.l ($796,A5),A6 // direct attack / firearms
        ff054 | 2f0b           : move.l  A3,-(A7)
        ff056 | 264e           : movea.l A6,A3
        ff058 | 61e6           : bsr     $ff040
        ff05a | 265f           : movea.l (A7)+,A3
        ff05c | 6704           : beq     $ff062
        ff05e | 052e 007a      : btst    D2,($7a,A6)
        ff062 | 4e75           : rts
        ff064 | 4841           : swap    D1            // catch / throw
        ff066 | 1210           : move.b  (A0),D1
        ff068 | 61d6           : bsr     $ff040
        ff06a | 6702           : beq     $ff06e
        ff06c | c207           : and.b   D7,D1
        ff06e | 4e75           : rts
        ff070 | 302c 0018      : move.w  ($18,A4),D0  // special moves
        ff074 | 906b 0018      : sub.w   ($18,A3),D0
        ff078 | 61c6           : bsr     $ff040
        ff07a | 6602           : bne     $ff07e
        ff07c | 707f           : moveq   #$7f,D0
        ff07e | 4a40           : tst.w   D0
        ff080 | 4e75           : rts
        ff082 | 61bc           : bsr     $ff040       // jiraishin (daimon)
        ff084 | 6708           : beq     $ff08e
        ff086 | 0240 0008      : andi.w  #$8,D0
        ff08a | 0c40 0008      : cmpi.w  #$8,D0
        ff08e | 4e75           : rts
        -->
    </script>
    <script state="change">
        <action                                  >maincpu.rd@ff042 = 00000000</action>
        <action                                  >maincpu.rd@ff04a = 00000000</action>
        <action condition="(param band 01) != 00">maincpu.rd@ff042 = 00108100</action>
        <action condition="(param band 02) != 00">maincpu.rd@ff04a = 00108300</action>
    </script>
    <script state="off">
        <action>maincpu.rq@02acc = 2c6d0796052e007a</action>
        <action>maincpu.rq@0a3be = 48411210c2076700</action>
        <action>maincpu.rq@0dd72 = 302c0018906b0018</action>
        <action>maincpu.rq@0f548 = 302c0018906b0018</action>
        <action>maincpu.rq@10736 = 302c0018906b0018</action>
        <action>maincpu.rq@10f94 = 302c0018906b0018</action>
        <action>maincpu.rq@18754 = 024000080c400008</action>
        <action>maincpu.rq@188d2 = 302c0018906b0018</action>
        <action>maincpu.rq@19590 = 302c0018906b0018</action>
        <action>maincpu.rq@19f00 = 302c0018906b0018</action>
        <action>maincpu.rq@29174 = 302c0018906b0018</action>
        <action>maincpu.rq@2ad22 = 302c0018906b0018</action>
        <action>maincpu.rq@ff040 = 0000000000000000</action>
        <action>maincpu.rq@ff048 = 0000000000000000</action>
        <action>maincpu.rq@ff050 = 0000000000000000</action>
        <action>maincpu.rq@ff058 = 0000000000000000</action>
        <action>maincpu.rq@ff060 = 0000000000000000</action>
        <action>maincpu.rq@ff068 = 0000000000000000</action>
        <action>maincpu.rq@ff070 = 0000000000000000</action>
        <action>maincpu.rq@ff078 = 0000000000000000</action>
        <action>maincpu.rq@ff080 = 0000000000000000</action>
        <action>maincpu.rq@ff088 = 0000000000000000</action>
    </script>
</cheat>
"no hit" : rewrite routine.

Code: Select all

<cheat desc="auto fire">
    <parameter>
        <item value="0x01">P1          </item>
        <item value="0x02">P2          </item>
        <item value="0x03">both players</item>
    </parameter>
    <script state="on">
        <action>maincpu.rq@0a35c = 4eb9000ff0904e71</action>
        <action>maincpu.rq@ff090 = 1e2e0001b9fc0010</action>
        <action>maincpu.rq@ff098 = 81006708b9fc0010</action>
        <action>maincpu.rq@ff0a0 = 830066021e160247</action>
        <action>maincpu.rq@ff0a8 = 00f04e7500000000</action>
        <!--
        ff090 | 1e2e 0001      : move.b ($1,A6),D7
        ff094 | b9fc 0010 8100 : cmpa.l #$108100,A4
        ff09a | 6708           : beq    $ff0a4
        ff09c | b9fc 0010 8300 : cmpa.l #$108300,A4
        ff0a2 | 6602           : bne    $ff0a6
        ff0a4 | 1e16           : move.b (A6),D7
        ff0a6 | 0247 00f0      : andi.w #$f0,D7
        ff0aa | 4e75           : rts
        -->
    </script>
    <script state="change">
        <action                                  >maincpu.rd@ff096 = 00000000</action>
        <action                                  >maincpu.rd@ff09e = 00000000</action>
        <action condition="(param band 01) != 00">maincpu.rd@ff096 = 00108100</action>
        <action condition="(param band 02) != 00">maincpu.rd@ff09e = 00108300</action>
    </script>
    <script state="off">
        <action>maincpu.rq@0a35c = 1e2e0001024700f0</action>
        <action>maincpu.rq@ff090 = 0000000000000000</action>
        <action>maincpu.rq@ff098 = 0000000000000000</action>
        <action>maincpu.rq@ff0a0 = 0000000000000000</action>
        <action>maincpu.rq@ff0a8 = 0000000000000000</action>
    </script>
</cheat>
"auto fire" : rewrite routine.

Code: Select all

<cheat desc="action speed up">
    <parameter>
        <item value="0x01">P1          </item>
        <item value="0x02">P2          </item>
        <item value="0x03">both players</item>
    </parameter>
    <script state="on">
        <action>maincpu.rq@049b0 = 4eb9000ff0b06b00</action>
        <action>maincpu.rq@ff0b0 = d0c010106b12b9fc</action>
        <action>maincpu.rq@ff0b8 = 001081006708b9fc</action>
        <action>maincpu.rq@ff0c0 = 0010830066027001</action>
        <action>maincpu.rq@ff0c8 = 194000764e750000</action>
        <!--
        ff0b0 | d0c0           : adda.w D0,A0
        ff0b2 | 1010           : move.b (A0),D0
        ff0b4 | 6b12           : bmi    $ff0c8
        ff0b6 | b9fc 0010 8100 : cmpa.l #$108100,A4
        ff0bc | 6708           : beq    $ff0c6
        ff0be | b9fc 0010 8300 : cmpa.l #$108300,A4
        ff0c4 | 6602           : bne    $ff0c8
        ff0c6 | 7001           : moveq  #$1,D0
        ff0c8 | 1940 0076      : move.b D0,($76,A4)
        ff0cc | 4e75           : rts
        -->
    </script>
    <script state="change">
        <action                                  >maincpu.rd@ff0b8 = 00000000</action>
        <action                                  >maincpu.rd@ff0c0 = 00000000</action>
        <action condition="(param band 01) != 00">maincpu.rd@ff0b8 = 00108100</action>
        <action condition="(param band 02) != 00">maincpu.rd@ff0c0 = 00108300</action>
    </script>
    <script state="off">
        <action>maincpu.rq@049b0 = d0c0195000766b00</action>
        <action>maincpu.rq@ff0b0 = 0000000000000000</action>
        <action>maincpu.rq@ff0b8 = 0000000000000000</action>
        <action>maincpu.rq@ff0c0 = 0000000000000000</action>
        <action>maincpu.rq@ff0c8 = 0000000000000000</action>
    </script>
</cheat>
"action speed up" : rewrite routine.

Code: Select all

<cheat desc="enable special move">
    <parameter>
        <item value="0x01">P1          </item>
        <item value="0x02">P2          </item>
        <item value="0x03">both players</item>
    </parameter>
    <script state="on">
        <action>maincpu.rq@04c1e = 4eb9000ff0d06304</action>
        <action>maincpu.rq@0b1b8 = 4eb9000ff0d06304</action>
        <action>maincpu.rq@0b1e4 = 4eb9000ff0d06304</action>
        <action>maincpu.rq@0b228 = 4eb9000ff0d06304</action>
        <action>maincpu.rq@ff0d0 = b9fc001081006708</action>
        <action>maincpu.rq@ff0d8 = b9fc001083006608</action>
        <action>maincpu.rq@ff0e0 = 0c6c00ff01204e75</action>
        <action>maincpu.rq@ff0e8 = 0c6c003f01204e75</action>
        <!--
        ff0d0 | b9fc 0010 8100 : cmpa.l #$108100,A4
        ff0d6 | 6708           : beq    $ff0e0
        ff0d8 | b9fc 0010 8300 : cmpa.l #$108300,A4
        ff0de | 6608           : bne    $ff0e8
        ff0e0 | 0c6c 00ff 0120 : cmpi.w #$ff,($120,A4)
        ff0e6 | 4e75           : rts
        ff0e8 | 0c6c 003f 0120 : cmpi.w #$3f,($120,A4)
        ff0ee | 4e75           : rts
        -->
    </script>
    <script state="change">
        <action                                  >maincpu.rd@ff0d2 = 00000000</action>
        <action                                  >maincpu.rd@ff0da = 00000000</action>
        <action condition="(param band 01) != 00">maincpu.rd@ff0d2 = 00108100</action>
        <action condition="(param band 02) != 00">maincpu.rd@ff0da = 00108300</action>
    </script>
    <script state="off">
        <action>maincpu.rq@04c1e = 0c6c003f01206304</action>
        <action>maincpu.rq@0b1b8 = 0c6c003f01206304</action>
        <action>maincpu.rq@0b1e4 = 0c6c003f01206304</action>
        <action>maincpu.rq@0b228 = 0c6c003f01206304</action>
        <action>maincpu.rq@ff0d0 = 0000000000000000</action>
        <action>maincpu.rq@ff0d8 = 0000000000000000</action>
        <action>maincpu.rq@ff0e0 = 0000000000000000</action>
        <action>maincpu.rq@ff0e8 = 0000000000000000</action>
    </script>
</cheat>
"enable special move" : rewrite routine.

Code: Select all

<cheat desc="sound test mode">
    <comment>reset the game (F3) to enter sound test mode</comment>
    <script state="on">
        <action>maincpu.rd@32bf0 =         00006536</action> <!-- enable sound code check in interrupt -->
        <action>maincpu.rd@3258a =         000ff0f0</action>
        <action>maincpu.rq@ff0f0 = 204d43e800011401</action>
        <action>maincpu.rq@ff0f8 = 123900300000b401</action>
        <action>maincpu.rq@ff100 = 67f40c0100fb6602</action>
        <action>maincpu.rq@ff108 = 53100c0100f76602</action>
        <action>maincpu.rq@ff110 = 52100c0100fd6604</action>
        <action>maincpu.rq@ff118 = 041000100c0100fe</action>
        <action>maincpu.rq@ff120 = 6604061000100c01</action>
        <action>maincpu.rq@ff128 = 00bb660253110c01</action>
        <action>maincpu.rq@ff130 = 00b7660252110211</action>
        <action>maincpu.rq@ff138 = 000f0c0100ef6610</action>
        <action>maincpu.rq@ff140 = 4240101167060600</action>
        <action>maincpu.rq@ff148 = 0010e1488010611a</action>
        <action>maincpu.rq@ff150 = 0c0100df6612303c</action>
        <action>maincpu.rq@ff158 = 0001610e303c0003</action>
        <action>maincpu.rq@ff160 = 6108303c00076102</action>
        <action>maincpu.rq@ff168 = 608c47ed38c44243</action>
        <action>maincpu.rq@ff170 = 162d38bc37803000</action>
        <action>maincpu.rq@ff178 = 542d38bc4e750000</action>
        <!--
        ff0f0 | 204d           : movea.l A5,A0         // $108000.l : sound code address
        ff0f2 | 43e8 0001      : lea     ($1,A0),A1    // $108001.l : bank number address
        ff0f6 | 1401           : move.b  D1,D2
        ff0f8 | 1239 0030 0000 : move.b  $300000.l,D1  // read input
        ff0fe | b401           : cmp.b   D1,D2
        ff100 | 67f4           : beq     $ff0f6
        ff102 | 0c01 00fb      : cmpi.b  #-$5,D1
        ff106 | 6602           : bne     $ff10a
        ff108 | 5310           : subq.b  #1,(A0)       // decrease code -01
        ff10a | 0c01 00f7      : cmpi.b  #-$9,D1
        ff10e | 6602           : bne     $ff112
        ff110 | 5210           : addq.b  #1,(A0)       // increase code +01
        ff112 | 0c01 00fd      : cmpi.b  #-$3,D1
        ff116 | 6604           : bne     $ff11c
        ff118 | 0410 0010      : subi.b  #$10,(A0)     // decrease code -10
        ff11c | 0c01 00fe      : cmpi.b  #-$2,D1
        ff120 | 6604           : bne     $ff126
        ff122 | 0610 0010      : addi.b  #$10,(A0)     // increase code +10
        ff126 | 0c01 00bb      : cmpi.b  #-$45,D1
        ff12a | 6602           : bne     $ff12e
        ff12c | 5311           : subq.b  #1,(A1)       // decrease bank -01
        ff12e | 0c01 00b7      : cmpi.b  #-$49,D1
        ff132 | 6602           : bne     $ff136
        ff134 | 5211           : addq.b  #1,(A1)       // increase bank +01
        ff136 | 0211 000f      : andi.b  #$f,(A1)
        ff13a | 0c01 00ef      : cmpi.b  #-$11,D1
        ff13e | 6610           : bne     $ff150
        ff140 | 4240           : clr.w   D0
        ff142 | 1011           : move.b  (A1),D0       // play sound
        ff144 | 6706           : beq     $ff14c
        ff146 | 0600 0010      : addi.b  #$10,D0
        ff14a | e148           : lsl.w   #8,D0
        ff14c | 8010           : or.b    (A0),D0
        ff14e | 611a           : bsr     $ff16a
        ff150 | 0c01 00df      : cmpi.b  #-$21,D1
        ff154 | 6612           : bne     $ff168
        ff156 | 303c 0001      : move.w  #$1,D0        // stop sound
        ff15a | 610e           : bsr     $ff16a
        ff15c | 303c 0003      : move.w  #$3,D0
        ff160 | 6108           : bsr     $ff16a
        ff162 | 303c 0007      : move.w  #$7,D0
        ff166 | 6102           : bsr     $ff16a
        ff168 | 608c           : bra     $ff0f6
        ff16a | 47ed 38c4      : lea     ($38c4,A5),A3 // sending sound code routine
        ff16e | 4243           : clr.w   D3
        ff170 | 162d 38bc      : move.b  ($38bc,A5),D3
        ff174 | 3780 3000      : move.w  D0,(A3,D3.w)
        ff178 | 542d 38bc      : addq.b  #2,($38bc,A5)
        ff17c | 4e75           : rts
        -->
    </script>
    <script state="run">
        <output format="----- the king of fighters '94 sound test mode -----" line="10" align="center" />
        <output format="left : decrease code -01"                             line="11" align="center" />
        <output format="right : increase code +01"                            line="12" align="center" />
        <output format="down : decrease code -10"                             line="13" align="center" />
        <output format="up : increase code +10"                               line="14" align="center" />
        <output format="button 3 + left : decrease bank -01"                  line="15" align="center" />
        <output format="button 3 + right : increase bank +01"                 line="16" align="center" />
        <output format="button 1 : play sound"                                line="17" align="center" />
        <output format="button 2 : stop sound"                                line="18" align="center" />
        <output format="----------------------------"                         line="19" align="center" />
        <output format="&lt;&lt; bank %2.2X &gt;&gt;"                         line="21" align="center"  >
            <argument>maincpu.pb@108001</argument>
        </output>
        <output format="&lt;&lt; sound code %2.2X &gt;&gt;"                   line="23" align="center"  >
            <argument>maincpu.pb@108000</argument>
        </output>
    </script>
    <script state="off">
        <action>maincpu.rd@32bf0 =         00c0044a</action>
        <action>maincpu.rd@3258a =         00003574</action>
        <action>maincpu.rq@ff0f0 = 0000000000000000</action>
        <action>maincpu.rq@ff0f8 = 0000000000000000</action>
        <action>maincpu.rq@ff100 = 0000000000000000</action>
        <action>maincpu.rq@ff108 = 0000000000000000</action>
        <action>maincpu.rq@ff110 = 0000000000000000</action>
        <action>maincpu.rq@ff118 = 0000000000000000</action>
        <action>maincpu.rq@ff120 = 0000000000000000</action>
        <action>maincpu.rq@ff128 = 0000000000000000</action>
        <action>maincpu.rq@ff130 = 0000000000000000</action>
        <action>maincpu.rq@ff138 = 0000000000000000</action>
        <action>maincpu.rq@ff140 = 0000000000000000</action>
        <action>maincpu.rq@ff148 = 0000000000000000</action>
        <action>maincpu.rq@ff150 = 0000000000000000</action>
        <action>maincpu.rq@ff158 = 0000000000000000</action>
        <action>maincpu.rq@ff160 = 0000000000000000</action>
        <action>maincpu.rq@ff168 = 0000000000000000</action>
        <action>maincpu.rq@ff170 = 0000000000000000</action>
        <action>maincpu.rq@ff178 = 0000000000000000</action>
    </script>
</cheat>
I have tried creating "sound test mode" for neogeo games.
Neogeo requires "bank selector" to access all sound codes.
In kof94, valid bank number seems to be 0x00 (music and sfx), 0x08, 0x0a and 0x0c (sfx and voice).
For example, Terry's "OK" (voice) is bank 0x08 + code 0x77.
  • bank : 0x00, code : 0x21-0x7f
  • bank : 0x08, code : 0x5a-0xfe
  • bank : 0x0a, code : 0x20-0xff
  • bank : 0x0c, code : 0x20-0xef
But don't play code 0x01, 0x03 and 0x10 (perhaps reserved codes by system) because sound is silenced.
In this case, try to press "sound stop button" once or reset the game again.
Also 0x02 is reserved as neogeo opening theme.
Post Reply