[terrafj] Terra Force

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
CheatFinder Staff Sergeant
CheatFinder Staff Sergeant
Posts: 230
Joined: Tue Dec 01, 2020 1:24 pm

[terrafj] Terra Force

Post by jman »

Code: Select all

<cheat desc="no hit">
    <script state="on">
        <action>maincpu.mq@86f8 = 4eb90000f9e06602</action>
        <action>maincpu.mq@f9e0 = b1fc000610ac6706</action>
        <action>maincpu.mq@f9e8 = 1a113a3250004e75</action>
        <!--
        f9e0 | b1fc 0006 10ac : cmpa.l #$610ac,A0
        f9e6 | 6706           : beq    $f9ee
        f9e8 | 1a11           : move.b (A1),D5
        f9ea | 3a32 5000      : move.w (A2,D5.w),D5
        f9ee | 4e75           : rts
        -->
        <action>maincpu.mb@8bc4 = 60</action> <!-- volcano -->
    </script>
    <script state="off">
        <action>maincpu.mq@86f8 = 1a113a3250006602</action>
        <action>maincpu.mq@f9e0 = ffffffffffffffff</action>
        <action>maincpu.mq@f9e8 = ffffffffffffffff</action>
        <action>maincpu.mb@8bc4 =               60</action>
    </script>
</cheat>

<cheat desc="auto fire - shot">
    <script state="on">
        <action>maincpu.mb@5fce = 60</action> <!-- timer -->
        <action>maincpu.mb@5fdd = e8</action> <!-- button -->
        <action>maincpu.mb@6c79 = e8</action> <!-- sub unit -->
    </script>
    <script state="off">
        <action>maincpu.mb@5fce = 67</action>
        <action>maincpu.mb@5fdd = e9</action>
        <action>maincpu.mb@6c79 = e9</action>
    </script>
</cheat>

<cheat desc="auto fire - bomb">
    <script state="on">
        <action>maincpu.mb@6157 = e8</action> <!-- player -->
        <action>maincpu.mb@6d4b = e8</action> <!-- sub unit -->
    </script>
    <script state="off">
        <action>maincpu.mb@6157 = e9</action>
        <action>maincpu.mb@6d4b = e9</action>
    </script>
</cheat>

<cheat desc="player speed">
    <parameter>
        <item value="0x00008000">01 (slow)</item>
        <item value="0x00018000">02       </item>
        <item value="0x00030000">03       </item>
        <item value="0x00048000">04       </item>
        <item value="0x00060000">05 (fast)</item>
    </parameter>
    <script state="on">
        <action>maincpu.mq@8004 = 4eb90000f9f04e71</action> <!-- x position -->
        <action>maincpu.mq@800c = 4eb90000f9fc4e71</action> <!-- y position -->
        <action>maincpu.mq@f9f0 = 2a3100006112dba8</action>
        <action>maincpu.mq@f9f8 = 00024e752a310004</action>
        <action>maincpu.mq@fa00 = 6106dba800064e75</action>
        <action>maincpu.mq@fa08 = b1fc000610ac6618</action>
        <action>maincpu.mq@fa10 = 0c28000e00016710</action>
        <action>maincpu.mq@fa18 = 223c000000004a85</action>
        <action>maincpu.mq@fa20 = 67066a0244812a01</action>
        <action>maincpu.mq@fa28 = 4e75ffffffffffff</action>
        <!--
        f9f0 | 2a31 0000      : move.l (A1,D0.w),D5    // x position
        f9f4 | 6112           : bsr    $fa08
        f9f6 | dba8 0002      : add.l  D5,($2,A0)
        f9fa | 4e75           : rts
        f9fc | 2a31 0004      : move.l ($4,A1,D0.w),D5 // y position
        fa00 | 6106           : bsr    $fa08
        fa02 | dba8 0006      : add.l  D5,($6,A0)
        fa06 | 4e75           : rts
        fa08 | b1fc 0006 10ac : cmpa.l $610ac,A0
        fa0e | 6618           : bne    $fa28
        fa10 | 0c28 000e 0001 : cmpi.b #$e,($1,A0)
        fa16 | 6710           : beq    $fa28
        fa18 | 223c xxxx xxxx : move.l #$xxxx,D1
        fa1e | 4a85           : tst.l  D5
        fa20 | 6706           : beq    $fa28
        fa22 | 6a02           : bpl    $fa26
        fa24 | 4481           : neg.l  D1
        fa26 | 2a01           : move.l D1,D5
        fa28 | 4e75           : rts
        -->
    </script>
    <script state="change">
        <action>maincpu.md@fa1a = param</action>
    </script>
    <script state="off">
        <action>maincpu.mq@8004 = 2a310000dba80002</action>
        <action>maincpu.mq@800c = 2a310004dba80006</action>
        <action>maincpu.mq@f9f0 = ffffffffffffffff</action>
        <action>maincpu.mq@f9f8 = ffffffffffffffff</action>
        <action>maincpu.mq@fa00 = ffffffffffffffff</action>
        <action>maincpu.mq@fa08 = ffffffffffffffff</action>
        <action>maincpu.mq@fa10 = ffffffffffffffff</action>
        <action>maincpu.mq@fa18 = ffffffffffffffff</action>
        <action>maincpu.mq@fa20 = ffffffffffffffff</action>
        <action>maincpu.mq@fa28 = ffffffffffffffff</action>
    </script>
</cheat>

<cheat desc="bullet speed - main shot">
    <parameter>
        <item value="0x00010000">01 (slow)</item>
        <item value="0x00058000">02       </item>
        <item value="0x000b0000">03       </item>
        <item value="0x00108000">04       </item>
        <item value="0x00160000">05 (fast)</item>
    </parameter>
    <script state="change">
        <action>maincpu.md@66f2 = param</action> <!-- normal shot -->
        <action>maincpu.md@67ae = param</action> <!-- laser -->
    </script>
    <script state="off">
        <action>maincpu.md@66f2 = 00058000</action>
        <action>maincpu.md@67ae = 00058000</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@4bf6 =             fa30</action>
        <action>maincpu.mq@fa30 = 41f9000611004280</action>
        <action>maincpu.mq@fa38 = 1401123900078001</action>
        <action>maincpu.mq@fa40 = b40167f40c0100fb</action>
        <action>maincpu.mq@fa48 = 660253100c0100f7</action>
        <action>maincpu.mq@fa50 = 660252100c0100fd</action>
        <action>maincpu.mq@fa58 = 6604041000100c01</action>
        <action>maincpu.mq@fa60 = 00fe660406100010</action>
        <action>maincpu.mq@fa68 = 0c0100ef66041010</action>
        <action>maincpu.mq@fa70 = 600a0c0100df660a</action>
        <action>maincpu.mq@fa78 = 103c003f13c00007</action>
        <action>maincpu.mq@fa80 = c00b60b4ffffffff</action>
        <!--
        fa30 | 41f9 0006 1100 : lea    $61100.l,A0 // sound code address
        fa36 | 4280           : clr.l  D0
        fa38 | 1401           : move.b D1,D2
        fa3a | 1239 0007 8001 : move.b $78001.l,D1 // read input
        fa40 | b401           : cmp.b  D1,D2
        fa42 | 67f4           : beq    $fa38
        fa44 | 0c01 00fb      : cmpi.b #-$5,D1
        fa48 | 6602           : bne    $fa4c
        fa4a | 5310           : subq.b #1,(A0)     // decrease code -01
        fa4c | 0c01 00f7      : cmpi.b #-$9,D1
        fa50 | 6602           : bne    $fa54
        fa52 | 5210           : addq.b #1,(A0)     // increase code +01
        fa54 | 0c01 00fd      : cmpi.b #-$3,D1
        fa58 | 6604           : bne    $fa5e
        fa5a | 0410 0010      : subi.b #$10,(A0)   // decrease code -10
        fa5e | 0c01 00fe      : cmpi.b #-$2,D1
        fa62 | 6604           : bne    $fa68
        fa64 | 0610 0010      : addi.b #$10,(A0)   // increase code +10
        fa68 | 0c01 00ef      : cmpi.b #-$11,D1
        fa6c | 6604           : bne    $fa72
        fa6e | 1010           : move.b (A0),D0     // play sound
        fa70 | 600a           : bra    $fa7c
        fa72 | 0c01 00df      : cmpi.b #-$21,D1
        fa76 | 660a           : bne    $fa82
        fa78 | 103c 003f      : move.b #$3f,D0     // stop sound
        fa7c | 13c0 0007 c00b : move.b D0,$7c00b.l // send sound code
        fa82 | 60b4           : bra    $fa38
        -->
    </script>
    <script state="run">
        <output format="----- terra force 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="up : increase code +10"                  line="13" align="center" />
        <output format="down : decrease 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@61100</argument>
        </output>
    </script>
    <script state="off">
        <action>maincpu.mw@4bf6 =             77ea</action>
        <action>maincpu.mq@fa30 = ffffffffffffffff</action>
        <action>maincpu.mq@fa38 = ffffffffffffffff</action>
        <action>maincpu.mq@fa40 = ffffffffffffffff</action>
        <action>maincpu.mq@fa48 = ffffffffffffffff</action>
        <action>maincpu.mq@fa50 = ffffffffffffffff</action>
        <action>maincpu.mq@fa58 = ffffffffffffffff</action>
        <action>maincpu.mq@fa60 = ffffffffffffffff</action>
        <action>maincpu.mq@fa68 = ffffffffffffffff</action>
        <action>maincpu.mq@fa70 = ffffffffffffffff</action>
        <action>maincpu.mq@fa78 = ffffffffffffffff</action>
        <action>maincpu.mq@fa80 = ffffffffffffffff</action>
    </script>
</cheat>
Post Reply