[ffightj] Final Fight

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: 850
Joined: Tue Dec 01, 2020 1:24 pm

[ffightj] Final Fight

Post by jman »

Code: Select all

<cheat desc="no hit">
    <script state="on">
        <action>maincpu.mb@03585 = 60</action> <!-- attack -->
        <action>maincpu.mb@07535 = 02</action> <!-- attack -->
        <action>maincpu.mb@0770f = e4</action> <!-- catch -->
        <action>maincpu.mb@2de5e = 60</action> <!-- hip attack -->
        <!-- knife -->
        <action>maincpu.md@695a =         4eb800c0</action>
        <action>maincpu.mq@00c0 = b6fc8568670ab6fc</action>
        <action>maincpu.mq@00c8 = 862867044a2b0001</action>
        <action>maincpu.mq@00d0 = 4e75ffffffffffff</action>
        <!--
        00c0 | b6fc 8568 : cmpa.w #$8568,A3 // check P1
        00c4 | 670a      : beq    $d0
        00c6 | b6fc 8628 : cmpa.w #$8628,A3 // check P2
        00ca | 6704      : beq    $d0
        00cc | 4a2b 0001 : tst.b  ($1,A3)
        00d0 | 4e75      : rts
        -->
    </script>
    <script state="off">
        <action>maincpu.mb@03585 =               62</action>
        <action>maincpu.mb@07535 =               04</action>
        <action>maincpu.mb@0770f =               02</action>
        <action>maincpu.mb@2de5e =               62</action>
        <action>maincpu.md@0695a =         4a2b0001</action>
        <action>maincpu.mq@000c0 = ffffffffffffffff</action>
        <action>maincpu.mq@000c8 = ffffffffffffffff</action>
        <action>maincpu.mq@000d0 = ffffffffffffffff</action>
    </script>
</cheat>

<cheat desc="auto fire">
    <script state="on">
        <action>maincpu.mb@bc00 = 10</action> <!-- normal attack -->
        <action>maincpu.mb@d880 = 10</action> <!-- knee strike (guy, cody) -->
        <action>maincpu.mb@da38 = 10</action> <!-- head butt (haggar) -->
    </script>
    <script state="off">
        <action>maincpu.mb@bc00 = c0</action>
        <action>maincpu.mb@d880 = c0</action>
        <action>maincpu.mb@da38 = c0</action>
    </script>
</cheat>

<cheat desc="player speed">
    <parameter>
        <item value="0x00010000">01 (slow)</item>
        <item value="0x00020000">02       </item>
        <item value="0x00030000">03       </item>
        <item value="0x00040000">04       </item>
        <item value="0x00050000">05 (fast)</item>
    </parameter>
    <script state="on">
        <action>maincpu.md@c0a2 =         4eb80100</action> <!-- x position -->
        <action>maincpu.md@c0b2 =         4eb80116</action> <!-- y position -->
        <action>maincpu.mq@0100 = 243c000800004a80</action>
        <action>maincpu.mq@0108 = 67066a0244822002</action>
        <action>maincpu.mq@0110 = d1ae00064e75243c</action>
        <action>maincpu.mq@0118 = 000800004a816706</action>
        <action>maincpu.mq@0120 = 6a0244822202d3ae</action>
        <action>maincpu.mq@0128 = 000a4e75ffffffff</action>
        <!--
        0100 | 243c xxxx xxxx : move.l #$xxxx,D2  // x position
        0106 | 4a80           : tst.l  D0
        0108 | 6706           : beq    $110
        010a | 6a02           : bpl    $10e
        010c | 4482           : neg.l  D2
        010e | 2002           : move.l D2,D0
        0110 | d1ae 0006      : add.l  D0,($6,A6)
        0114 | 4e75           : rts
        0116 | 243c xxxx xxxx : move.l #$xxxx,D2  // y position
        011c | 4a81           : tst.l  D1
        011e | 6706           : beq    $126
        0120 | 6a02           : bpl    $124
        0122 | 4482           : neg.l  D2
        0124 | 2202           : move.l D2,D1
        0126 | d3ae 000a      : add.l  D1,($a,A6)
        012a | 4e75           : rts
        -->
    </script>
    <script state="change">
        <action>maincpu.md@0102 = param</action>
        <action>maincpu.md@0118 = param</action>
    </script>
    <script state="off">
        <action>maincpu.md@c0a2 =         d1ae0006</action>
        <action>maincpu.md@c0b2 =         d3ae000a</action>
        <action>maincpu.mq@0100 = ffffffffffffffff</action>
        <action>maincpu.mq@0108 = ffffffffffffffff</action>
        <action>maincpu.mq@0110 = ffffffffffffffff</action>
        <action>maincpu.mq@0118 = ffffffffffffffff</action>
        <action>maincpu.mq@0120 = ffffffffffffffff</action>
        <action>maincpu.mq@0128 = ffffffffffffffff</action>
    </script>
</cheat>

<cheat desc="action speed up">
    <script state="on">
        <action>maincpu.md@3b02 =         4eb800e0</action>
        <action>maincpu.mq@00e0 = bcfc85686706bcfc</action>
        <action>maincpu.mq@00e8 = 8628660c0c2e0004</action>
        <action>maincpu.mq@00f0 = 0004670470004e75</action>
        <action>maincpu.mq@00f8 = 532e00284e75ffff</action>
        <!--
        00e0 | bcfc 8568      : cmpa.w #$8568,A6   // check P1
        00e4 | 6706           : beq    $ec
        00e6 | bcfc 8628      : cmpa.w #$8628,A6   // check P2
        00ea | 660c           : bne    $f8
        00ec | 0c2e 0004 0004 : cmpi.b #$4,($4,A6) // check jump attack
        00f2 | 6704           : beq    $f8
        00f4 | 7000           : moveq  #$0,D0
        00f6 | 4e75           : rts
        00f8 | 532e 0028      : subq.b #1,($28,A6)
        00fc | 4e75           : rts
        -->
    </script>
    <script state="off">
        <action>maincpu.md@3b02 =         532e0028</action>
        <action>maincpu.mq@00e0 = ffffffffffffffff</action>
        <action>maincpu.mq@00e8 = ffffffffffffffff</action>
        <action>maincpu.mq@00f0 = ffffffffffffffff</action>
        <action>maincpu.mq@00f8 = ffffffffffffffff</action>
    </script>
</cheat>

<cheat desc="timer speed">
    <parameter>
        <item value="0x0800">01 (slow)</item>
        <item value="0x0400">02       </item>
        <item value="0x01e0">03       </item>
        <item value="0x0080">04       </item>
        <item value="0x0001">05 (fast)</item>
    </parameter>
    <script state="change">
        <action>maincpu.mw@520e = param</action> <!-- normal scene -->
        <action>maincpu.mw@5290 = param</action> <!-- bonus scene -->
    </script>
    <script state="off">
        <action>maincpu.mw@520e = 01e0</action>
        <action>maincpu.mw@5290 = 003c</action>
    </script>
</cheat>

<cheat desc="sound test mode">
    <comment>reset the game (F3) to enter sound test mode</comment>
    <script state="on">
        <action>maincpu.mw@17118 =             0130</action>
        <action>maincpu.mq@00130 = 41f8890043f90080</action>
        <action>maincpu.mq@00138 = 0181120010390080</action>
        <action>maincpu.mq@00140 = 0001b20067f40c00</action>
        <action>maincpu.mq@00148 = 00fd660253100c00</action>
        <action>maincpu.mq@00150 = 00fe660252100c00</action>
        <action>maincpu.mq@00158 = 00fb660404100010</action>
        <action>maincpu.mq@00160 = 0c0000f766040610</action>
        <action>maincpu.mq@00168 = 00100c0000ef6602</action>
        <action>maincpu.mq@00170 = 12900c0000df6604</action>
        <action>maincpu.mq@00178 = 12bc00f060bcffff</action>
        <!--
        0130 | 41f8 8900      : lea    $8900.w,A0   // $ff8900 : sound code address
        0134 | 43f9 0080 0181 : lea    $800181.l,A1 // $800181 : sound latch address
        013a | 1200           : move.b D0,D1
        013c | 1039 0080 0001 : move.b $800001.l,D0 // read input
        0142 | b200           : cmp.b  D0,D1
        0144 | 67f4           : beq    $13a
        0146 | 0c00 00fd      : cmpi.b #-$3,D0
        014a | 6602           : bne    $14e
        014c | 5310           : subq.b #1,(A0)      // decrease code -01
        014e | 0c00 00fe      : cmpi.b #-$2,D0
        0152 | 6602           : bne    $156
        0154 | 5210           : addq.b #1,(A0)      // increase code +01
        0156 | 0c00 00fb      : cmpi.b #-$5,D0
        015a | 6604           : bne    $160
        015c | 0410 0010      : subi.b #$10,(A0)    // decrease code -10
        0160 | 0c00 00f7      : cmpi.b #-$9,D0
        0164 | 6604           : bne    $16a
        0166 | 0610 0010      : addi.b #$10,(A0)    // increase code +10
        016a | 0c00 00ef      : cmpi.b #-$11,D0
        016e | 6602           : bne    $172
        0170 | 1290           : move.b (A0),(A1)    // play sound
        0172 | 0c00 00df      : cmpi.b #-$21,D0
        0176 | 6604           : bne    $17c
        0178 | 12bc 00f0      : move.b #$f0,(A1)    // stop sound
        017c | 60bc           : bra    $13a
        -->
    </script>
    <script state="run">
        <output format="----- final fight 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 1 : play sound"                   line="15" align="center" />
        <output format="button 2 : stop sound"                   line="16" align="center" />
        <output format="----------------------------"            line="17" align="center" />
        <output format="&lt;&lt; sound code %2.2X &gt;&gt;"      line="19" align="center"  >
            <argument>maincpu.pb@ff8900</argument>
        </output>
    </script>
    <script state="off">
        <action>maincpu.mw@17118 =             283a</action>
        <action>maincpu.mq@00130 = ffffffffffffffff</action>
        <action>maincpu.mq@00138 = ffffffffffffffff</action>
        <action>maincpu.mq@00140 = ffffffffffffffff</action>
        <action>maincpu.mq@00148 = ffffffffffffffff</action>
        <action>maincpu.mq@00150 = ffffffffffffffff</action>
        <action>maincpu.mq@00158 = ffffffffffffffff</action>
        <action>maincpu.mq@00160 = ffffffffffffffff</action>
        <action>maincpu.mq@00168 = ffffffffffffffff</action>
        <action>maincpu.mq@00170 = ffffffffffffffff</action>
        <action>maincpu.mq@00178 = ffffffffffffffff</action>
    </script>
</cheat>

<cheat desc="skip ram check">
    <script state="on">
        <action>maincpu.mw@00c6a = 01f8</action> <!-- warning screen -->
        <action>maincpu.mw@5e85c = 0122</action> <!-- ram check -->
    </script>
    <script state="off">
        <action>maincpu.mw@00c6a = 01fa</action>
        <action>maincpu.mw@5e85c = 0240</action>
    </script>
</cheat>
Post Reply