[stg] Strike Gunner - S.T.G

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

[stg] Strike Gunner - S.T.G

Post by jman »

Code: Select all

<cheat desc="no hit">
    <script state="on">
        <action>maincpu.mb@077b9 =       50</action> <!-- object -->
        <action>maincpu.md@07bf2 = 60000082</action> <!-- wall -->
    </script>
    <script state="off">
        <action>maincpu.mb@077b9 =       52</action>
        <action>maincpu.md@07bf2 = 6a0009dc</action>
    </script>
</cheat>

<cheat desc="auto fire">
    <script state="on">
        <action>maincpu.mq@07d80 = 4eb9000210704e71</action>
        <action>maincpu.mq@21070 = 303c000401ae0014</action>
        <action>maincpu.mq@21078 = 4eb9000085c04e75</action>
        <!--
        21070 | 303c 0004      : move.w #$4,D0
        21074 | 01ae 0014      : bclr   D0,($14,a6)
        21078 | 4eb9 0000 85c0 : jsr    $85c0.l
        2107e | 4e75           : rts
        -->
    </script>
    <script state="off">
        <action>maincpu.mq@07d80 = 303c00046100083a</action>
        <action>maincpu.mq@21070 = ffffffffffffffff</action>
        <action>maincpu.mq@21078 = ffffffffffffffff</action>
    </script>
</cheat>

<cheat desc="player speed">
    <parameter>
        <item value="0x02">01 (slow)</item>
        <item value="0x04">02       </item>
        <item value="0x06">03       </item>
        <item value="0x08">04       </item>
        <item value="0x0a">05 (fast)</item>
    </parameter>
    <script state="on">
        <action>maincpu.mq@09158 = 4eb900021080916e</action> <!-- right -->
        <action>maincpu.mq@09190 = 4eb900021080d16e</action> <!-- up -->
        <action>maincpu.mq@091a4 = 4eb900021080d16e</action> <!-- left -->
        <action>maincpu.mq@091c8 = 4eb900021080916e</action> <!-- down -->
        <action>maincpu.mq@21080 = bdfc00ffe5226708</action>
        <action>maincpu.mq@21088 = bdfc00ffe582660a</action>
        <action>maincpu.mq@21090 = 4a406704303c0000</action>
        <action>maincpu.mq@21098 = 4e7512301000d041</action>
        <action>maincpu.mq@210a0 = 4e75ffffffffffff</action>
        <!--
        21080 | bdfc 00ff e522 : cmpa.l #$ffe522,A6
        21086 | 6708           : beq    $21090
        21088 | bdfc 00ff e582 : cmpa.l #$ffe582,A6
        2108e | 660a           : bne    $2109a
        21090 | 4a40           : tst.w  D0
        21092 | 6704           : beq    $21098
        21094 | 303c 00xx      : move.w #$xx,D0
        21098 | 4e75           : rts
        2109a | 1230 1000      : move.b (A0,D1.w),D1
        2109e | d041           : add.w  D1,D0
        210a0 | 4e75           : rts
        -->
    </script>
    <script state="change">
        <action>maincpu.mb@21097 = param</action>
    </script>
    <script state="off">
        <action>maincpu.mq@09158 = 12301000d041916e</action>
        <action>maincpu.mq@09190 = 12301000d041d16e</action>
        <action>maincpu.mq@091a4 = 12301000d041d16e</action>
        <action>maincpu.mq@091c8 = 12301000d041916e</action>
        <action>maincpu.mq@21080 = ffffffffffffffff</action>
        <action>maincpu.mq@21088 = ffffffffffffffff</action>
        <action>maincpu.mq@21090 = ffffffffffffffff</action>
        <action>maincpu.mq@21098 = ffffffffffffffff</action>
        <action>maincpu.mq@210a0 = ffffffffffffffff</action>
    </script>
</cheat>

<cheat desc="bullet speed - main shot">
    <parameter>
        <item value="0x06">01 (slow)</item>
        <item value="0x0c">02       </item>
        <item value="0x12">03       </item>
        <item value="0x18">04       </item>
        <item value="0x1e">05 (fast)</item>
    </parameter>
    <script state="on">
        <action>maincpu.md@09d4c = 303c0000</action>
    </script>
    <script state="change">
        <action>maincpu.mb@09d4f = param</action>
    </script>
    <script state="off">
        <action>maincpu.md@09d4c = 303b0034</action>
    </script>
</cheat>

<cheat desc="max bullets up">
    <script state="on">
        <action>maincpu.md@07db0 =         000210b0</action>
        <action>maincpu.mq@210b0 = 7404610086b04e75</action>
        <!--
        210b0 | 7404      : moveq #$4,D2
        210b2 | 6100 86b0 : bsr   $19764
        210b6 | 4e75      : rts
        -->
    </script>
    <script state="off">
        <action>maincpu.md@07db0 =         00019764</action>
        <action>maincpu.mq@210b0 = ffffffffffffffff</action>
    </script>
</cheat>

<cheat desc="sound test mode">
    <comment>reset the game (F3) to enter sound test mode</comment>
    <script state="on">
        <action>maincpu.md@0045e =         000210c0</action>
        <action>maincpu.mq@210c0 = 4eb809fe41ed0100</action>
        <action>maincpu.mq@210c8 = 43ed011012111439</action>
        <action>maincpu.mq@210d0 = 00b000011282b401</action>
        <action>maincpu.mq@210d8 = 67e60c0200fe6602</action>
        <action>maincpu.mq@210e0 = 53100c0200fd6602</action>
        <action>maincpu.mq@210e8 = 52100c0200f76604</action>
        <action>maincpu.mq@210f0 = 041000100c0200fb</action>
        <action>maincpu.mq@210f8 = 6604061000100c02</action>
        <action>maincpu.mq@21100 = 00ef660810104eb8</action>
        <action>maincpu.mq@21108 = 0918600a0c0200df</action>
        <action>maincpu.mq@21110 = 66044eb808ba60a8</action>
        <!--
        210c0 | 4eb8 09fe      : jsr    $9fe.w
        210c4 | 41ed 0100      : lea    ($100,A5),A0 // sound code address
        210c8 | 43ed 0110      : lea    ($110,A5),A1 // input compare address
        210cc | 1211           : move.b (A1),D1
        210ce | 1439 00b0 0001 : move.b $b00001.l,D2 // read input
        210d4 | 1282           : move.b D2,(A1)
        210d6 | b401           : cmp.b  D1,D2
        210d8 | 67e6           : beq    $210c0
        210da | 0c02 00fe      : cmpi.b #-$2,D2
        210de | 6602           : bne    $210e2
        210e0 | 5310           : subq.b #1,(A0)      // decrease code -01
        210e2 | 0c02 00fd      : cmpi.b #-$3,D2
        210e6 | 6602           : bne    $210ea
        210e8 | 5210           : addq.b #1,(A0)      // increase code +01
        210ea | 0c02 00f7      : cmpi.b #-$9,D2
        210ee | 6604           : bne    $210f4
        210f0 | 0410 0010      : subi.b #$10,(A0)    // decrease code -10
        210f4 | 0c02 00fb      : cmpi.b #-$5,D2
        210f8 | 6604           : bne    $210fe
        210fa | 0610 0010      : addi.b #$10,(A0)    // increase code +10
        210fe | 0c02 00ef      : cmpi.b #-$11,D2
        21102 | 6608           : bne    $2110c
        21104 | 1010           : move.b (A0),D0      // play sound
        21106 | 4eb8 0918      : jsr    $918.w
        2110a | 600a           : bra    $21116
        2110c | 0c02 00df      : cmpi.b #-$21,D2
        21110 | 6604           : bne    $21116
        21112 | 4eb8 08ba      : jsr    $8ba.w       // stop sound
        21116 | 60a8           : bra    $210c0
        -->
    </script>
    <script state="run">
        <output format="----- strike gunner 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@ffc100</argument>
        </output>
    </script>
    <script state="off">
        <action>maincpu.md@0045e =         00000ab6</action>
        <action>maincpu.mq@210c0 = ffffffffffffffff</action>
        <action>maincpu.mq@210c8 = ffffffffffffffff</action>
        <action>maincpu.mq@210d0 = ffffffffffffffff</action>
        <action>maincpu.mq@210d8 = ffffffffffffffff</action>
        <action>maincpu.mq@210e0 = ffffffffffffffff</action>
        <action>maincpu.mq@210e8 = ffffffffffffffff</action>
        <action>maincpu.mq@210f0 = ffffffffffffffff</action>
        <action>maincpu.mq@210f8 = ffffffffffffffff</action>
        <action>maincpu.mq@21100 = ffffffffffffffff</action>
        <action>maincpu.mq@21108 = ffffffffffffffff</action>
        <action>maincpu.mq@21110 = ffffffffffffffff</action>
    </script>
</cheat>
jman
Posts: 843
Joined: Tue Dec 01, 2020 1:24 pm

[stg] Strike Gunner - S.T.G

Post by jman »

Code: Select all

<!-- Strike Gunner S.T.G -->
<mamecheat version="1">

    <cheat desc="no hit">
        <script state="on">
            <action>maincpu.md@77B6 = 61000050</action> <!-- objects -->
            <action>maincpu.md@7BF2 = 60000082</action> <!-- wall -->
        </script>
        <script state="off">
            <action>maincpu.md@77B6 = 61000052</action>
            <action>maincpu.md@7BF2 = 6A0009DC</action>
        </script>
    </cheat>

    <cheat desc="auto fire">
        <script state="on">
            <action>maincpu.md@7D84 = 01074E71</action> <!-- btst D0,D7 / nop -->
        </script>
        <script state="off">
            <action>maincpu.md@7D84 = 6100083A</action>
        </script>
    </cheat>

    <cheat desc="player speed">
        <parameter>
            <item value="0x01">01 (slow)</item>
            <item value="0x04">02       </item>
            <item value="0x06">03       </item>
            <item value="0x08">04       </item>
            <item value="0x0a">05 (fast)</item>
        </parameter>
        <script state="on">
            <action>maincpu.mq@07CDC = 4EB9000210704E71</action>
            <action>maincpu.mq@21070 = 123B00184881D36E</action>
            <action>maincpu.mq@21078 = 0002123B001E4881</action>
            <action>maincpu.mq@21080 = D36E0004202E0002</action>
            <action>maincpu.mq@21088 = 4E75000000000000</action>
            <action>maincpu.mq@21090 = 0000000000000000</action>
            <action>maincpu.mq@21098 = 0000000000000000</action>
            <action>maincpu.mq@210A0 = 0000000000000000</action>
            <action>maincpu.mq@210A8 = 0000FFFFFFFFFFFF</action>
            <!--
            21070 | 123B 0018 : move.b  ($18,PC,D0.w), D1 // x position
            21074 | 4881      : ext.w   D1
            21076 | D36E 0002 : add.w   D1, ($2,A6)
            2107A | 123B 001E : move.b  ($1e,PC,D0.w), D1 // y position
            2107E | 4881      : ext.w   D1
            21080 | D36E 0004 : add.w   D1, ($4,A6)
            21084 | 202E 0002 : move.l  ($2,A6), D0
            21088 | 4E75      : rts
            21089 - 210A9     : input/speed conversion table
            -->
        </script>
        <script state="change">
            <action>maincpu.mb@2108F = -param</action> <!-- lower-right : right -->
            <action>maincpu.mb@2109F = -param</action> <!-- lower-right : down -->
            <action>maincpu.mb@21090 =  param</action> <!-- lower-left : left -->
            <action>maincpu.mb@210A0 = -param</action> <!-- lower-left : down -->
            <action>maincpu.mb@210A1 = -param</action> <!-- down -->
            <action>maincpu.mb@21093 = -param</action> <!-- upper-right : right -->
            <action>maincpu.mb@210A3 =  param</action> <!-- upper-right : up -->
            <action>maincpu.mb@21094 =  param</action> <!-- upper-left : left -->
            <action>maincpu.mb@210A4 =  param</action> <!-- upper-left : up -->
            <action>maincpu.mb@210A5 =  param</action> <!-- up -->
            <action>maincpu.mb@21097 = -param</action> <!-- right -->
            <action>maincpu.mb@21098 =  param</action> <!-- left -->
        </script>
        <script state="off">
            <action>maincpu.mq@07CDC = 6100144E202E0002</action>
            <action>maincpu.mq@21070 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@21078 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@21080 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@21088 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@21090 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@21098 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@210A0 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@210A8 = FFFFFFFFFFFFFFFF</action>
        </script>
    </cheat>

    <cheat desc="bullet speed - main shot">
        <parameter>
            <item value="0x0006">01 (slow)</item>
            <item value="0x000c">02       </item>
            <item value="0x0012">03       </item>
            <item value="0x0018">04       </item>
            <item value="0x001e">05 (fast)</item>
        </parameter>
        <script state="on">
            <action>maincpu.mw@9D4C = 303C</action>
        </script>
        <script state="change">
            <action>maincpu.mw@9D4E = param</action>
        </script>
        <script state="off">
            <action>maincpu.md@9D4C = 303B0034</action>
        </script>
    </cheat>

    <cheat desc="max bullets up (test)">
        <script state="on">
            <action>maincpu.md@07DB0 = 000210B0        </action>
            <action>maincpu.mq@210B0 = 7404610086B04E75</action>
            <!--
            210B0 | 7404      : moveq   #$4, D2
            210B2 | 6100 86B0 : bsr     $19764
            210B6 | 4E75      : rts
            -->
        </script>
        <script state="off">
            <action>maincpu.md@07DB0 = 00019764        </action>
            <action>maincpu.mq@210B0 = FFFFFFFFFFFFFFFF</action>
        </script>
    </cheat>

    <cheat desc="short hit mark - main shot">
        <script state="on">
            <action>maincpu.mw@94A2 = 0000</action>
        </script>
        <script state="off">
            <action>maincpu.mw@94A2 = 0401</action>
        </script>
    </cheat>

    <cheat desc="sound test mode">
        <comment>reset the game (F3) to enter sound test mode</comment>
        <script state="on">
            <action>maincpu.md@0045E = 000210C0        </action>
            <action>maincpu.mq@210C0 = 4EB809FE41ED0100</action>
            <action>maincpu.mq@210C8 = 43ED010112111439</action>
            <action>maincpu.mq@210D0 = 00B000011282B401</action>
            <action>maincpu.mq@210D8 = 67E60C0200FE6602</action>
            <action>maincpu.mq@210E0 = 53100C0200FD6602</action>
            <action>maincpu.mq@210E8 = 52100C0200F76604</action>
            <action>maincpu.mq@210F0 = 041000100C0200FB</action>
            <action>maincpu.mq@210F8 = 6604061000100C02</action>
            <action>maincpu.mq@21100 = 00EF660810104EB8</action>
            <action>maincpu.mq@21108 = 0918600A0C0200DF</action>
            <action>maincpu.mq@21110 = 66044EB808BA60A8</action>
            <!--
            210C0 | 4EB8 09FE      : jsr     $9fe.w
            210C4 | 41ED 0100      : lea     ($100,A5), A0 // sound code address ($ffc100)
            210C8 | 43ED 0101      : lea     ($101,A5), A1 // input comparision address ($ffc101)
            210CC | 1211           : move.b  (A1), D1
            210CE | 1439 00B0 0001 : move.b  $b00001.l, D2 // read input
            210D4 | 1282           : move.b  D2, (A1)
            210D6 | B401           : cmp.b   D1, D2
            210D8 | 67E6           : beq     $210c0
            210DA | 0C02 00FE      : cmpi.b  #-$2, D2
            210DE | 6602           : bne     $210e2
            210E0 | 5310           : subq.b  #1, (A0)      // decrease code -01
            210E2 | 0C02 00FD      : cmpi.b  #-$3, D2
            210E6 | 6602           : bne     $210ea
            210E8 | 5210           : addq.b  #1, (A0)      // increase code +01
            210EA | 0C02 00F7      : cmpi.b  #-$9, D2
            210EE | 6604           : bne     $210f4
            210F0 | 0410 0010      : subi.b  #$10, (A0)    // decrease code -10
            210F4 | 0C02 00FB      : cmpi.b  #-$5, D2
            210F8 | 6604           : bne     $210fe
            210FA | 0610 0010      : addi.b  #$10, (A0)    // increase code +10
            210FE | 0C02 00EF      : cmpi.b  #-$11, D2
            21102 | 6608           : bne     $2110c
            21104 | 1010           : move.b  (A0), D0      // play sound
            21106 | 4EB8 0918      : jsr     $918.w
            2110A | 600A           : bra     $21116
            2110C | 0C02 00DF      : cmpi.b  #-$21, D2
            21110 | 6604           : bne     $21116
            21112 | 4EB8 08BA      : jsr     $8ba.w        // stop sound
            21116 | 60A8           : bra     $210c0
            -->
        </script>
        <script state="run">
            <output format="----- strike gunner 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@FFC100</argument>
            </output>
        </script>
        <script state="off">
            <action>maincpu.md@0045E = 00000AB6        </action>
            <action>maincpu.mq@210C0 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@210C8 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@210D0 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@210D8 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@210E0 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@210E8 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@210F0 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@210F8 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@21100 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@21108 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@21110 = FFFFFFFFFFFFFFFF</action>
        </script>
    </cheat>

</mamecheat>
  • "auto fire", "player speed" : Rewritten routine.
  • "max bullets up" : Downgraded to test code. Ineffectual when you have max power-up.
  • "short hit mark" : Added new.
Post Reply