[stinger] Stinger

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

[stinger] Stinger

Post by jman »

Code: Select all

<cheat desc="no hit">
    <script state="on">
        <action>maincpu.ob@2bc8 = c9</action>
    </script>
    <script state="off">
        <action>maincpu.ob@2bc8 = 32</action>
    </script>
</cheat>

<cheat desc="auto fire">
    <script state="on">
        <action>maincpu.mb@2504 = f4</action>
    </script>
    <script state="off">
        <action>maincpu.mb@2504 = e4</action>
    </script>
</cheat>

<cheat desc="player speed">
    <parameter min="0x01" max="0x08" step="0x01" />
    <script state="on">
        <!-- right -->
        <action>maincpu.mb@237b =       7d</action>
        <action>maincpu.od@2380 = 00fe3ccd</action>
        <action>maincpu.mw@2381 =    9630</action>
        <!-- left -->
        <action>maincpu.mb@23a3 =       a5</action>
        <action>maincpu.od@23a8 = 00fe3dcd</action>
        <action>maincpu.mw@23a9 =     9636</action>
        <!-- down -->
        <action>maincpu.mb@23cb =       cd</action>
        <action>maincpu.od@23d0 = 00fe3ccd</action>
        <action>maincpu.mw@23d1 =     963c</action>
        <!-- up -->
        <action>maincpu.mw@23f3 =     23f5</action>
        <action>maincpu.od@23f8 = 00fe3dcd</action>
        <action>maincpu.mw@23f9 =     9642</action>
        <!-- main routine -->
        <action>maincpu.oq@9630 = 8006c980fe808006</action>
        <action>maincpu.mq@9630 = 000000b000000000</action>
        <action>maincpu.oq@9638 = fe802806c928fe80</action>
        <action>maincpu.mq@9638 = 0000000000150000</action>
        <action>maincpu.oq@9640 = c900fe800006c900</action>
        <action>maincpu.mq@9640 = 00100000000000e8</action>
        <!--
        9630 | 06 xx : ld  b,$xx // right
        9632 | 80    : add a,b
        9633 | fe b0 : cp  $b0
        9635 | c9    : ret
        9636 | 06 xx : ld  b,$xx // left
        9638 | 80    : add a,b
        9639 | fe 15 : cp  $15
        963b | c9    : ret
        963c | 06 xx : ld  b,$xx // down
        963e | 80    : add a,b
        963f | fe e8 : cp  $e8
        9641 | c9    : ret
        9642 | 06 xx : ld  b,$xx // up
        9644 | 80    : add a,b
        9645 | fe 10 : cp  $10
        9647 | c9    : ret
        -->
    </script>
    <script state="change">
        <action>maincpu.mb@9631 =  param</action>
        <action>maincpu.mb@9637 = -param</action>
        <action>maincpu.mb@963d =  param</action>
        <action>maincpu.mb@9643 = -param</action>
    </script>
    <script state="off">
        <action>maincpu.mb@237b =               8c</action>
        <action>maincpu.od@2380 =         b0fe3c3c</action>
        <action>maincpu.mw@2381 =             fe3c</action>
        <action>maincpu.mb@23a3 =               b4</action>
        <action>maincpu.od@23a8 =         15fe3d3d</action>
        <action>maincpu.mw@23a9 =             fe3d</action>
        <action>maincpu.mb@23cb =               dc</action>
        <action>maincpu.od@23d0 =         e8fe3c3c</action>
        <action>maincpu.mw@23d1 =             fe3c</action>
        <action>maincpu.mw@23f3 =             2404</action>
        <action>maincpu.od@23f8 =         10fe3d3d</action>
        <action>maincpu.mw@23f9 =             fe3d</action>
        <action>maincpu.oq@9630 = 8080808080808080</action>
        <action>maincpu.mq@9630 = 0000000000000000</action>
        <action>maincpu.oq@9638 = 2828282828282828</action>
        <action>maincpu.mq@9638 = 0000000000000000</action>
        <action>maincpu.oq@9640 = 0000000000000000</action>
        <action>maincpu.mq@9640 = 0000000000000000</action>
    </script>
</cheat>

<cheat desc="bullet speed - front shot">
    <parameter>
        <item value="0x05">01 (slow)</item>
        <item value="0x0a">02       </item>
        <item value="0x0f">03       </item>
        <item value="0x14">04       </item>
        <item value="0x19">05 (fast)</item>
    </parameter>
    <script state="change">
        <action>maincpu.mb@2577 = param</action> <!-- first bullet -->
        <action>maincpu.mb@2707 = param</action> <!-- second bullet -->
        <action>maincpu.mb@27a1 = param</action> <!-- third bullet -->
    </script>
    <script state="off">
        <action>maincpu.mb@2577 = 0a</action>
        <action>maincpu.mb@2707 = 0a</action>
        <action>maincpu.mb@27a1 = 0a</action>
    </script>
</cheat>

<cheat desc="twin shot on ground">
    <script state="on">
        <action>maincpu.mw@2461 = 2463</action>
        <action>maincpu.ob@2649 =   00</action>
        <action>maincpu.ob@276d =   00</action>
    </script>
    <script state="off">
        <action>maincpu.mw@2461 = 250b</action>
        <action>maincpu.ob@2649 =   c8</action>
        <action>maincpu.ob@276d =   c8</action>
    </script>
</cheat>

<cheat desc="fast bomb">
    <script state="on">
        <action>maincpu.mb@2536 =               30</action>
        <action>maincpu.ob@252b =               cd</action>
        <action>maincpu.mw@252c =             9650</action>
        <action>maincpu.oq@9650 = 0000c9000032003e</action>
        <action>maincpu.mq@9650 = 000000c223001400</action>
        <!--
        9650 | 3E 00    : ld  a,$14
        9652 | 32 00 00 : ld  ($C223),a
        9655 | C9       : ret
        -->
    </script>
    <script state="off">
        <action>maincpu.mb@2536 =               00</action>
        <action>maincpu.ob@252b =               32</action>
        <action>maincpu.mw@252c =             c223</action>
        <action>maincpu.oq@9650 = 0000000000000000</action>
        <action>maincpu.mq@9650 = 0000000000000000</action>
    </script>
</cheat>

<cheat desc="sound test mode">
    <comment>reset the game (F3) to enter sound test mode</comment>
    <script state="on">
        <action>maincpu.oq@0c95 =               c3</action>
        <action>maincpu.mw@0c96 =             9660</action>
        <action>maincpu.oq@9660 = ffd5000011000021</action>
        <action>maincpu.mq@9660 = 0000966300000000</action>
        <action>maincpu.oq@9668 = 3a4700003a000022</action>
        <action>maincpu.mq@9668 = 0000f01000c10000</action>
        <action>maincpu.oq@9670 = 00fec86fbdb00000</action>
        <action>maincpu.mq@9670 = 020000000000f018</action>
        <action>maincpu.oq@9678 = 24002000fe250020</action>
        <action>maincpu.mq@9678 = 0001000100000100</action>
        <action>maincpu.oq@9680 = fea0187ca020a0fe</action>
        <action>maincpu.mq@9680 = 0005000003004000</action>
        <action>maincpu.oq@9688 = 888821e5883ec088</action>
        <action>maincpu.mq@9688 = f800000090000004</action>
        <action>maincpu.oq@9690 = a0fea02ea020a0fe</action>
        <action>maincpu.mq@9690 = 0e00080002000d00</action>
        <action>maincpu.oq@9698 = 88c9e177882e8820</action>
        <action>maincpu.mq@9698 = 000000000a000200</action>
        <!--
        9660 | 21 00 00 : ld   hl,$0000  // initialize sound and input value
        9663 | 11 63 96 : ld   de,$9663
        9666 | d5       : push de
        9667 | ff       : rst  $38
        9668 | 22 00 c1 : ld   ($c100),hl
        966b | 3a 10 f0 : ld   a,($f010) // read button input
        966e | 47       : ld   b,a
        966f | 3a 18 f0 : ld   a,($f018) // read stick input
        9672 | b0       : or   b
        9673 | bd       : cp   l
        9674 | 6f       : ld   l,a
        9675 | c8       : ret  z
        9676 | fe 02    : cp   $02
        9678 | 20 01    : jr   nz,$967b
        967a | 25       : dec  h         // decrease code
        967b | fe 01    : cp   $01
        967d | 20 02    : jr   nz,$9680
        967f | 24       : inc  h         // increase code
        9680 | fe 40    : cp   $40
        9682 | 20 03    : jr   nz,$9687
        9684 | 7c       : ld   a,h       // play sound
        9685 | 18 05    : jr   $968c
        9687 | fe 04    : cp   $04
        9689 | c0       : ret  nz
        968a | 3e 90    : ld   a,$90     // stop sound
        968c | e5       : push hl
        968d | 21 00 f8 : ld   hl,$f800
        9690 | fe 0d    : cp   $0d
        9692 | 20 02    : jr   nz,$9696
        9694 | 2e 08    : ld   l,$08     // explosion sound
        9696 | fe 0e    : cp   $0e
        9698 | 20 02    : jr   nz,$969c
        969a | 2e 0a    : ld   l,$0a     // shot sound
        969c | 77       : ld   (hl),a    // send sound code
        969d | e1       : pop  hl
        969e | c9       : ret
        -->
    </script>
    <script state="run">
        <output format="----- stinger sound test mode -----" line="10" align="center" />
        <output format="left : code decrement"               line="11" align="center" />
        <output format="right : code increment"              line="12" align="center" />
        <output format="button 1 : play sound"               line="13" align="center" />
        <output format="button 2 : stop sound"               line="14" align="center" />
        <output format="----------------------------"        line="15" align="center" />
        <output format="&lt;&lt; sound code %2.2X &gt;&gt;"  line="17" align="center">
            <argument>maincpu.pb@c101</argument>
        </output>
    </script>
    <script state="off">
        <action>maincpu.oq@0c95 =               32</action>
        <action>maincpu.mw@0c96 =             f800</action>
        <action>maincpu.oq@9660 = 0000000000000000</action>
        <action>maincpu.mq@9660 = 0000000000000000</action>
        <action>maincpu.oq@9668 = 0000000000000000</action>
        <action>maincpu.mq@9668 = 0000000000000000</action>
        <action>maincpu.oq@9670 = 0000000000000000</action>
        <action>maincpu.mq@9670 = 0000000000000000</action>
        <action>maincpu.oq@9678 = 0000000000000000</action>
        <action>maincpu.mq@9678 = 0000000000000000</action>
        <action>maincpu.oq@9680 = a0a0a0a0a0a0a0a0</action>
        <action>maincpu.mq@9680 = 0000000000000000</action>
        <action>maincpu.oq@9688 = 8888888888888888</action>
        <action>maincpu.mq@9688 = 0000000000000000</action>
        <action>maincpu.oq@9690 = a0a0a0a0a0a0a0a0</action>
        <action>maincpu.mq@9690 = 0000000000000000</action>
        <action>maincpu.oq@9698 = 8888888888888888</action>
        <action>maincpu.mq@9698 = 0000000000000000</action>
    </script>
</cheat>

<cheat desc="skip ram check">
    <script state="on">
        <action>maincpu.ob@0d4a = c9</action>
    </script>
    <script state="off">
        <action>maincpu.ob@0d4a = df</action>
    </script>
</cheat>
"twin shot on ground" is unique. Normally, weapon is changed from twin shot to bomb when you skim the surface of the ground. But this code keeps twin shot even on the ground.
jman
Posts: 826
Joined: Tue Dec 01, 2020 1:24 pm

[finger] Stinger/Finger

Post by jman »

finger is bootleg of stinger and will be added in 0.243.

Code: Select all

<cheat desc="no hit">
    <script state="on">
        <action>maincpu.ob@2bf3 = c9</action>
    </script>
    <script state="off">
        <action>maincpu.ob@2bf3 = 32</action>
    </script>
</cheat>

<cheat desc="auto fire">
    <script state="on">
        <action>maincpu.mb@2534 = 24</action>
    </script>
    <script state="off">
        <action>maincpu.mb@2534 = 14</action>
    </script>
</cheat>

<cheat desc="player speed">
    <parameter min="0x01" max="0x08" step="0x01" />
    <script state="on">
        <!-- right -->
        <action>maincpu.mb@23ab =       ad</action>
        <action>maincpu.od@23b0 = 00fe3ccd</action>
        <action>maincpu.mw@23b1 =     9630</action>
        <!-- left -->
        <action>maincpu.mb@23d3 =       d5</action>
        <action>maincpu.od@23d8 = 00fe3dcd</action>
        <action>maincpu.mw@23d9 =     9636</action>
        <!-- down -->
        <action>maincpu.mw@23fb =     23fd</action>
        <action>maincpu.od@2400 = 00fe3ccd</action>
        <action>maincpu.mw@2401 =     963c</action>
        <!-- up -->
        <action>maincpu.mb@2423 =       25</action>
        <action>maincpu.od@2428 = 00fe3dcd</action>
        <action>maincpu.mw@2429 =     9642</action>
        <!-- main routine -->
        <action>maincpu.oq@9630 = 8006c980fe808006</action>
        <action>maincpu.mq@9630 = 000000b000000000</action>
        <action>maincpu.oq@9638 = fe802806c928fe80</action>
        <action>maincpu.mq@9638 = 0000000000150000</action>
        <action>maincpu.oq@9640 = c900fe800006c900</action>
        <action>maincpu.mq@9640 = 00100000000000e8</action>
        <!--
        9630 | 06 xx : ld  b,$xx // right
        9632 | 80    : add a,b
        9633 | fe b0 : cp  $b0
        9635 | c9    : ret
        9636 | 06 xx : ld  b,$xx // left
        9638 | 80    : add a,b
        9639 | fe 15 : cp  $15
        963b | c9    : ret
        963c | 06 xx : ld  b,$xx // down
        963e | 80    : add a,b
        963f | fe e8 : cp  $e8
        9641 | c9    : ret
        9642 | 06 xx : ld  b,$xx // up
        9644 | 80    : add a,b
        9645 | fe 10 : cp  $10
        9647 | c9    : ret
        -->
    </script>
    <script state="change">
        <action>maincpu.mb@9631 =  param</action>
        <action>maincpu.mb@9637 = -param</action>
        <action>maincpu.mb@963d =  param</action>
        <action>maincpu.mb@9643 = -param</action>
    </script>
    <script state="off">
        <action>maincpu.mb@23ab =               bc</action>
        <action>maincpu.od@23b0 =         b0fe3c3c</action>
        <action>maincpu.mw@23b1 =             fe3c</action>
        <action>maincpu.mb@23d3 =               e4</action>
        <action>maincpu.od@23d8 =         15fe3d3d</action>
        <action>maincpu.mw@23d9 =             fe3d</action>
        <action>maincpu.mw@23fb =             240c</action>
        <action>maincpu.od@2400 =         e8fe3c3c</action>
        <action>maincpu.mw@2401 =             fe3c</action>
        <action>maincpu.mb@2423 =               34</action>
        <action>maincpu.od@2428 =         10fe3d3d</action>
        <action>maincpu.mw@2429 =             fe3d</action>
        <action>maincpu.oq@9630 = 8080808080808080</action>
        <action>maincpu.mq@9630 = 0000000000000000</action>
        <action>maincpu.oq@9638 = 2828282828282828</action>
        <action>maincpu.mq@9638 = 0000000000000000</action>
        <action>maincpu.oq@9640 = 0000000000000000</action>
        <action>maincpu.mq@9640 = 0000000000000000</action>
    </script>
</cheat>

<cheat desc="bullet speed - front shot">
    <parameter>
        <item value="0x05">01 (slow)</item>
        <item value="0x0a">02       </item>
        <item value="0x0f">03       </item>
        <item value="0x14">04       </item>
        <item value="0x19">05 (fast)</item>
    </parameter>
    <script state="change">
        <action>maincpu.mb@25a7 = param</action> <!-- first bullet -->
        <action>maincpu.mb@2737 = param</action> <!-- second bullet -->
        <action>maincpu.mb@27d1 = param</action> <!-- third bullet -->
    </script>
    <script state="off">
        <action>maincpu.mb@25a7 = 0a</action>
        <action>maincpu.mb@2737 = 0a</action>
        <action>maincpu.mb@27d1 = 0a</action>
    </script>
</cheat>

<cheat desc="twin shot on ground">
    <script state="on">
        <action>maincpu.mw@2491 = 2493</action>
        <action>maincpu.ob@2679 =   00</action>
        <action>maincpu.ob@279d =   00</action>
    </script>
    <script state="off">
        <action>maincpu.mw@2491 = 253b</action>
        <action>maincpu.ob@2679 =   c8</action>
        <action>maincpu.ob@279d =   c8</action>
    </script>
</cheat>

<cheat desc="fast bomb">
    <script state="on">
        <action>maincpu.mb@2566 =               30</action>
        <action>maincpu.ob@255b =               cd</action>
        <action>maincpu.mw@255c =             9650</action>
        <action>maincpu.oq@9650 = 0000c9000032003e</action>
        <action>maincpu.mq@9650 = 000000c223001400</action>
        <!--
        9650 | 3E 00    : ld  a,$14
        9652 | 32 00 00 : ld  ($C223),a
        9655 | C9       : ret
        -->
    </script>
    <script state="off">
        <action>maincpu.mb@2566 =               00</action>
        <action>maincpu.ob@255b =               32</action>
        <action>maincpu.mw@255c =             c223</action>
        <action>maincpu.oq@9650 = 0000000000000000</action>
        <action>maincpu.mq@9650 = 0000000000000000</action>
    </script>
</cheat>

<cheat desc="sound test mode">
    <comment>reset the game (F3) to enter sound test mode</comment>
    <script state="on">
        <action>maincpu.oq@0c95 =               c3</action>
        <action>maincpu.mw@0c96 =             9660</action>
        <action>maincpu.oq@9660 = ffd5000011000021</action>
        <action>maincpu.mq@9660 = 0000966300000000</action>
        <action>maincpu.oq@9668 = 3a4700003a000022</action>
        <action>maincpu.mq@9668 = 0000f01000c10000</action>
        <action>maincpu.oq@9670 = 00fec86fbdb00000</action>
        <action>maincpu.mq@9670 = 020000000000f018</action>
        <action>maincpu.oq@9678 = 24002000fe250020</action>
        <action>maincpu.mq@9678 = 0001000100000100</action>
        <action>maincpu.oq@9680 = fea0187ca020a0fe</action>
        <action>maincpu.mq@9680 = 0005000003004000</action>
        <action>maincpu.oq@9688 = 888821e5883ec088</action>
        <action>maincpu.mq@9688 = f800000090000004</action>
        <action>maincpu.oq@9690 = a0fea02ea020a0fe</action>
        <action>maincpu.mq@9690 = 0e00080002000d00</action>
        <action>maincpu.oq@9698 = 88c9e177882e8820</action>
        <action>maincpu.mq@9698 = 000000000a000200</action>
        <!--
        9660 | 21 00 00 : ld   hl,$0000  // initialize sound and input value
        9663 | 11 63 96 : ld   de,$9663
        9666 | d5       : push de
        9667 | ff       : rst  $38
        9668 | 22 00 c1 : ld   ($c100),hl
        966b | 3a 10 f0 : ld   a,($f010) // read button input
        966e | 47       : ld   b,a
        966f | 3a 18 f0 : ld   a,($f018) // read stick input
        9672 | b0       : or   b
        9673 | bd       : cp   l
        9674 | 6f       : ld   l,a
        9675 | c8       : ret  z
        9676 | fe 02    : cp   $02
        9678 | 20 01    : jr   nz,$967b
        967a | 25       : dec  h         // decrease code
        967b | fe 01    : cp   $01
        967d | 20 02    : jr   nz,$9680
        967f | 24       : inc  h         // increase code
        9680 | fe 40    : cp   $40
        9682 | 20 03    : jr   nz,$9687
        9684 | 7c       : ld   a,h       // play sound
        9685 | 18 05    : jr   $968c
        9687 | fe 04    : cp   $04
        9689 | c0       : ret  nz
        968a | 3e 90    : ld   a,$90     // stop sound
        968c | e5       : push hl
        968d | 21 00 f8 : ld   hl,$f800
        9690 | fe 0d    : cp   $0d
        9692 | 20 02    : jr   nz,$9696
        9694 | 2e 08    : ld   l,$08     // explosion sound
        9696 | fe 0e    : cp   $0e
        9698 | 20 02    : jr   nz,$969c
        969a | 2e 0a    : ld   l,$0a     // shot sound
        969c | 77       : ld   (hl),a    // send sound code
        969d | e1       : pop  hl
        969e | c9       : ret
        -->
    </script>
    <script state="run">
        <output format="----- finger sound test mode -----" line="10" align="center" />
        <output format="left : decrease code"               line="11" align="center" />
        <output format="right : increase code"              line="12" align="center" />
        <output format="button 1 : play sound"              line="13" align="center" />
        <output format="button 2 : stop sound"              line="14" align="center" />
        <output format="----------------------------"       line="15" align="center" />
        <output format="&lt;&lt; sound code %2.2X &gt;&gt;" line="17" align="center">
            <argument>maincpu.pb@c101</argument>
        </output>
    </script>
    <script state="off">
        <action>maincpu.oq@0c95 =               32</action>
        <action>maincpu.mw@0c96 =             f800</action>
        <action>maincpu.oq@9660 = 0000000000000000</action>
        <action>maincpu.mq@9660 = 0000000000000000</action>
        <action>maincpu.oq@9668 = 0000000000000000</action>
        <action>maincpu.mq@9668 = 0000000000000000</action>
        <action>maincpu.oq@9670 = 0000000000000000</action>
        <action>maincpu.mq@9670 = 0000000000000000</action>
        <action>maincpu.oq@9678 = 0000000000000000</action>
        <action>maincpu.mq@9678 = 0000000000000000</action>
        <action>maincpu.oq@9680 = a0a0a0a0a0a0a0a0</action>
        <action>maincpu.mq@9680 = 0000000000000000</action>
        <action>maincpu.oq@9688 = 8888888888888888</action>
        <action>maincpu.mq@9688 = 0000000000000000</action>
        <action>maincpu.oq@9690 = a0a0a0a0a0a0a0a0</action>
        <action>maincpu.mq@9690 = 0000000000000000</action>
        <action>maincpu.oq@9698 = 8888888888888888</action>
        <action>maincpu.mq@9698 = 0000000000000000</action>
    </script>
</cheat>
<cheat desc="skip ram check">
    <script state="on">
        <action>maincpu.ob@0d4a = c9</action>
    </script>
    <script state="off">
        <action>maincpu.ob@0d4a = 00</action>
    </script>
</cheat>
finger has different addresses and codes from stinger.
jman
Posts: 826
Joined: Tue Dec 01, 2020 1:24 pm

[stinger] Stinger (update)

Post by jman »

Code: Select all

<cheat desc="sound test mode">
    <!-- you can't stop two sfxs (code 0x0d and 0x0e) by sound stop button -->
    <comment>reset the game (F3) to enter sound test mode</comment>
    <script state="on">
        <action>maincpu.oq@0c95 =               c3</action>
        <action>maincpu.mw@0c96 =             9660</action>
        <action>maincpu.oq@9660 = e6ffff3affffff21</action>
        <action>maincpu.mq@9660 = fff010ffffc100ff</action>
        <action>maincpu.oq@9668 = b1ffe600003a4fff</action>
        <action>maincpu.mq@9668 = ff33fff018ffff44</action>
        <action>maincpu.oq@9670 = 0020fffeff2847b8</action>
        <action>maincpu.mq@9670 = 01ff02ffefffffff</action>
        <action>maincpu.oq@9678 = fffe34ff20fffe35</action>
        <action>maincpu.mq@9678 = 20ffff01ff01ffff</action>
        <action>maincpu.oq@9680 = fffeff18ff3eff20</action>
        <action>maincpu.mq@9680 = 10ff06fff0ff04ff</action>
        <action>maincpu.oq@9688 = fe787786ff3eff20</action>
        <action>maincpu.mq@9688 = ffffffff10ff05ff</action>
        <action>maincpu.oq@9690 = fffeff187eff20ff</action>
        <action>maincpu.mq@9690 = 04ff06ffff03ff40</action>
        <action>maincpu.oq@9698 = feffff21ff3eff20</action>
        <action>maincpu.mq@9698 = fff800ff90ff12ff</action>
        <action>maincpu.oq@96a0 = 20fffeff2eff20ff</action>
        <action>maincpu.mq@96a0 = ff0eff08ff02ff0d</action>
        <action>maincpu.oq@96a8 = ffffff1877ff2eff</action>
        <action>maincpu.mq@96a8 = ffffb2ffff0aff02</action>
        <!--
        9660 | 21 ff ff : ld  hl,$C100  // sound code address
        9663 | ff       : rst $38       // watchdog
        9664 | 3a ff ff : ld  a,($F010) // read button
        9667 | e6 ff    : and $44
        9669 | 4f       : ld  c,a
        966a | 3a 00 00 : ld  a,($F018) // read joystick
        966d | e6 ff    : and $33
        966f | b1       : or  c
        9670 | b8       : cp  b
        9671 | 47       : ld  b,a
        9672 | 28 ff    : jr  z,$9663
        9674 | fe ff    : cp  $02
        9676 | 20 00    : jr  nz,$9679
        9678 | 35       : dec (hl)      // decrease code -01
        9679 | fe ff    : cp  $01
        967b | 20 ff    : jr  nz,$967E
        967d | 34       : inc (hl)      // increase code +01
        967e | fe ff    : cp  $20
        9680 | 20 ff    : jr  nz,$9686
        9682 | 3e ff    : ld  a,$F0     // decrease code -10
        9684 | 18 ff    : jr  $968C
        9686 | fe ff    : cp  $10
        9688 | 20 ff    : jr  nz,$968F
        968a | 3e ff    : ld  a,$10     // increase code +10
        968c | 86       : add a,(hl)
        968d | 77       : ld  (hl),a
        968e | 78       : ld  a,b
        968f | fe ff    : cp  $40
        9691 | 20 ff    : jr  nz,$9696
        9693 | 7e       : ld  a,(hl)    // play sound
        9694 | 18 ff    : jr  $969C
        9696 | fe ff    : cp  $04
        9698 | 20 ff    : jr  nz,$96AC
        969a | 3e ff    : ld  a,$90     // stop sound
        969c | 21 ff ff : ld  hl,$F800
        969f | fe ff    : cp  $0D
        96a1 | 20 ff    : jr  nz,$96A5
        96a3 | 2e ff    : ld  l,$08     // explosion sound
        96a5 | fe ff    : cp  $0E
        96a7 | 20 ff    : jr  nz,$96AB
        96a9 | 2e ff    : ld  l,$0A     // shot sound
        96ab | 77       : ld  (hl),a    // send sound code
        96ac | 18 ff    : jr  $9660
        -->
    </script>
    <script state="run">
        <output format="----- stinger 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="start : 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@c100</argument>
        </output>
    </script>
    <script state="off">
        <action>maincpu.oq@0c95 =               32</action>
        <action>maincpu.mw@0c96 =             f800</action>
        <action>maincpu.oq@9660 = 0000000000000000</action>
        <action>maincpu.mq@9660 = 0000000000000000</action>
        <action>maincpu.oq@9668 = 0000000000000000</action>
        <action>maincpu.mq@9668 = 0000000000000000</action>
        <action>maincpu.oq@9670 = 0000000000000000</action>
        <action>maincpu.mq@9670 = 0000000000000000</action>
        <action>maincpu.oq@9678 = 0000000000000000</action>
        <action>maincpu.mq@9678 = 0000000000000000</action>
        <action>maincpu.oq@9680 = a0a0a0a0a0a0a0a0</action>
        <action>maincpu.mq@9680 = 0000000000000000</action>
        <action>maincpu.oq@9688 = 8888888888888888</action>
        <action>maincpu.mq@9688 = 0000000000000000</action>
        <action>maincpu.oq@9690 = a0a0a0a0a0a0a0a0</action>
        <action>maincpu.mq@9690 = 0000000000000000</action>
        <action>maincpu.oq@9698 = 8888888888888888</action>
        <action>maincpu.mq@9698 = 0000000000000000</action>
        <action>maincpu.oq@96a0 = 8080808080808080</action>
        <action>maincpu.mq@96a0 = 0000000000000000</action>
        <action>maincpu.oq@96a8 = 2828282828282828</action>
        <action>maincpu.mq@96a8 = 0000000000000000</action>
    </script>
</cheat>
"sound test mode" : rewrite routine. add up/down key (code ±10).
jman
Posts: 826
Joined: Tue Dec 01, 2020 1:24 pm

[stinger]+ Stinger

Post by jman »

stinger.xml

Code: Select all

<!-- Stinger -->
<mamecheat version="1">

    <cheat desc="no hit">
        <script state="on">
            <action>maincpu.ob@2BC8 = C9</action>
        </script>
        <script state="off">
            <action>maincpu.ob@2BC8 = 32</action>
        </script>
    </cheat>

    <cheat desc="auto fire">
        <script state="on">
            <action>maincpu.mb@2504 = F4</action>
        </script>
        <script state="off">
            <action>maincpu.mb@2504 = E4</action>
        </script>
    </cheat>

    <cheat desc="player speed">
        <parameter>
            <item value="0x01">01 (slow)</item>
            <item value="0x02">02       </item>
            <item value="0x04">03       </item>
            <item value="0x06">04       </item>
            <item value="0x08">05 (fast)</item>
        </parameter>
        <script state="on">
            <!-- right -->
            <action>maincpu.oq@237A = FFC6FFFF3AFFFFCA</action> <!-- jp z,$237D / ld a,($C140) / add a,$xx -->
            <action>maincpu.mq@237A = 00FFC140FF237DFF</action>
            <!-- left -->
            <action>maincpu.oq@23A2 = FFD6FFFF3AFFFFCA</action> <!-- jp z,$23A5 / ld a,($C140) / sub $xx -->
            <action>maincpu.mq@23A2 = 00FFC140FF23A5FF</action>
            <!-- down -->
            <action>maincpu.oq@23CA = FFC6FFFF3AFFFFCA</action> <!-- jp z,$23CD / ld a,($C143) / add a,$xx -->
            <action>maincpu.mq@23CA = 00FFC143FF23CDFF</action>
            <!-- up -->
            <action>maincpu.oq@23F2 = FFD6FFFF3AFFFFCA</action> <!-- jp z,$23F5 / ld a,($C143) / sub $xx -->
            <action>maincpu.mq@23F2 = 00FFC143FF23F5FF</action>
        </script>
        <script state="change">
            <action>maincpu.mb@2381 = param</action>
            <action>maincpu.mb@23A9 = param</action>
            <action>maincpu.mb@23D1 = param</action>
            <action>maincpu.mb@23F9 = param</action>
        </script>
        <script state="off">
            <action>maincpu.oq@237A = 3C3CC1403A238CCA</action>
            <action>maincpu.mq@237A = 3C3CC1403A238CCA</action>
            <action>maincpu.oq@23A2 = 3D3DC1403A23B4CA</action>
            <action>maincpu.mq@23A2 = 3D3DC1403A23B4CA</action>
            <action>maincpu.oq@23CA = 3C3CC1433A23DCCA</action>
            <action>maincpu.mq@23CA = 3C3CC1433A23DCCA</action>
            <action>maincpu.oq@23F2 = 3D3DC1433A2404CA</action>
            <action>maincpu.mq@23F2 = 3D3DC1433A2404CA</action>
        </script>
    </cheat>

    <cheat desc="bullet speed - front shot">
        <parameter>
            <item value="0x05">01 (slow)</item>
            <item value="0x0a">02       </item>
            <item value="0x0f">03       </item>
            <item value="0x14">04       </item>
            <item value="0x19">05 (fast)</item>
        </parameter>
        <script state="change">
            <action>maincpu.mb@2577 = param</action> <!-- first bullet -->
            <action>maincpu.mb@2707 = param</action> <!-- second bullet -->
            <action>maincpu.mb@27A1 = param</action> <!-- third bullet -->
        </script>
        <script state="off">
            <action>maincpu.mb@2577 = 0A</action>
            <action>maincpu.mb@2707 = 0A</action>
            <action>maincpu.mb@27A1 = 0A</action>
        </script>
    </cheat>

    <cheat desc="twin shot on ground">
        <script state="on">
            <action>maincpu.mw@2461 = 2463</action>
            <action>maincpu.ob@2649 = 00  </action>
            <action>maincpu.ob@276D = 00  </action>
        </script>
        <script state="off">
            <action>maincpu.mw@2461 = 250B</action>
            <action>maincpu.ob@2649 = C8  </action>
            <action>maincpu.ob@276D = C8  </action>
        </script>
    </cheat>

    <cheat desc="fast bomb">
        <script state="on">
            <action>maincpu.ob@252B = CD              </action>
            <action>maincpu.mw@252C = 9630            </action>
            <action>maincpu.oq@9630 = FFFFC9FFFF32FF3E</action> <!-- ld a,$14 / ld ($C223),a / ret -->
            <action>maincpu.mq@9630 = FFFFFFC223FF1400</action>
            <action>maincpu.mb@2536 = 30              </action>
        </script>
        <script state="off">
            <action>maincpu.ob@252B = 32              </action>
            <action>maincpu.mw@252C = C223            </action>
            <action>maincpu.oq@9630 = 8080808080808080</action>
            <action>maincpu.mq@9630 = 0000000000000000</action>
            <action>maincpu.mb@2536 = 00              </action>
        </script>
    </cheat>

    <cheat desc="sound test mode">
        <!-- you can't stop two sfxs (code 0x0d and 0x0e) by sound stop button -->
        <comment>reset the game (F3) to enter sound test mode</comment>
        <script state="on">
            <action>maincpu.oq@0C95 = C3              </action>
            <action>maincpu.mw@0C96 = 9640            </action>
            <action>maincpu.oq@9640 = E6FFFF3AFFFFFF21</action>
            <action>maincpu.mq@9640 = FFF010FFFFC000FF</action>
            <action>maincpu.oq@9648 = B1FFE600003A4FFF</action>
            <action>maincpu.mq@9648 = FF33FFF018FFFF44</action>
            <action>maincpu.oq@9650 = 0020FFFEFF2847B8</action>
            <action>maincpu.mq@9650 = 01FF02FFEFFFFFFF</action>
            <action>maincpu.oq@9658 = FFFE34FF20FFFE35</action>
            <action>maincpu.mq@9658 = 20FFFF01FF01FFFF</action>
            <action>maincpu.oq@9660 = FFFEFF18FF3EFF20</action>
            <action>maincpu.mq@9660 = 10FF06FFF0FF04FF</action>
            <action>maincpu.oq@9668 = FE787786FF3EFF20</action>
            <action>maincpu.mq@9668 = FFFFFFFF10FF05FF</action>
            <action>maincpu.oq@9670 = FFFEFF187EFF20FF</action>
            <action>maincpu.mq@9670 = 04FF06FFFF03FF40</action>
            <action>maincpu.oq@9678 = FEFFFF21FF3EFF20</action>
            <action>maincpu.mq@9678 = FFF800FF90FF12FF</action>
            <action>maincpu.oq@9680 = 20FFFEFF2EFF20FF</action>
            <action>maincpu.mq@9680 = FF0EFF08FF02FF0D</action>
            <action>maincpu.oq@9688 = FFFFFF1877FF2EFF</action>
            <action>maincpu.mq@9688 = FFFFB2FFFF0AFF02</action>
            <!--
            9640 | 21 00 C0 : ld   hl,$C000  // sound code address
            9643 | FF       : rst  $38       // watchdog
            9644 | 3A 10 F0 : ld   a,($F010) // read buttons
            9647 | E6 44    : and  $44
            9649 | 4F       : ld   c,a
            964A | 3A 18 F0 : ld   a,($F018) // read other inputs
            964D | E6 33    : and  $33
            964F | B1       : or   c
            9650 | B8       : cp   b
            9651 | 47       : ld   b,a
            9652 | 28 EF    : jr   z,$9643
            9654 | FE 02    : cp   $02
            9656 | 20 01    : jr   nz,$9659
            9658 | 35       : dec  (hl)      // decrease code -01
            9659 | FE 01    : cp   $01
            965B | 20 01    : jr   nz,$965E
            965D | 34       : inc  (hl)      // increase code +10
            965E | FE 20    : cp   $20
            9660 | 20 04    : jr   nz,$9666
            9662 | 3E F0    : ld   a,$F0     // decrease code -10
            9664 | 18 06    : jr   $966C
            9666 | FE 10    : cp   $10
            9668 | 20 05    : jr   nz,$966F
            966A | 3E 10    : ld   a,$10     // increase code +10
            966C | 86       : add  a,(hl)
            966D | 77       : ld   (hl),a
            966E | 78       : ld   a,b
            966F | FE 40    : cp   $40
            9671 | 20 03    : jr   nz,$9676
            9673 | 7E       : ld   a,(hl)    // play sound
            9674 | 18 06    : jr   $967C
            9676 | FE 04    : cp   $04
            9678 | 20 12    : jr   nz,$968C
            967A | 3E 90    : ld   a,$90     // stop sound
            967C | 21 00 F8 : ld   hl,$F800  // sound latch address
            967F | FE 0D    : cp   $0D
            9681 | 20 02    : jr   nz,$9685
            9683 | 2E 08    : ld   l,$08     // explosion sound ($f808)
            9685 | FE 0E    : cp   $0E
            9687 | 20 02    : jr   nz,$968B
            9689 | 2E 0A    : ld   l,$0A     // shot sound ($f80a)
            968B | 77       : ld   (hl),a    // send sound code
            968C | 18 B2    : jr   $9640
            -->
        </script>
        <script state="run">
            <output format="----- stinger 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 %02X &gt;&gt;"   line="19" align="center"  >
                <argument>maincpu.pb@C000</argument>
            </output>
        </script>
        <script state="off">
            <action>maincpu.oq@0C95 = 32              </action>
            <action>maincpu.mw@0C96 = F800            </action>
            <action>maincpu.oq@9640 = 0000000000000000</action>
            <action>maincpu.mq@9640 = 0000000000000000</action>
            <action>maincpu.oq@9648 = 0000000000000000</action>
            <action>maincpu.mq@9648 = 0000000000000000</action>
            <action>maincpu.oq@9650 = 0000000000000000</action>
            <action>maincpu.mq@9650 = 0000000000000000</action>
            <action>maincpu.oq@9658 = 0000000000000000</action>
            <action>maincpu.mq@9658 = 0000000000000000</action>
            <action>maincpu.oq@9660 = 0000000000000000</action>
            <action>maincpu.mq@9660 = 0000000000000000</action>
            <action>maincpu.oq@9668 = 0000000000000000</action>
            <action>maincpu.mq@9668 = 0000000000000000</action>
            <action>maincpu.oq@9670 = 0000000000000000</action>
            <action>maincpu.mq@9670 = 0000000000000000</action>
            <action>maincpu.oq@9678 = 0000000000000000</action>
            <action>maincpu.mq@9678 = 0000000000000000</action>
            <action>maincpu.oq@9680 = A0A0A0A0A0A0A0A0</action>
            <action>maincpu.mq@9680 = 0000000000000000</action>
            <action>maincpu.oq@9688 = 8888888888888888</action>
            <action>maincpu.mq@9688 = 0000000000000000</action>
        </script>
    </cheat>

    <cheat desc="skip ram check">
        <script state="on">
            <action>maincpu.ob@0D4A = C9</action>
        </script>
        <script state="off">
            <action>maincpu.ob@0D4A = DF</action>
        </script>
    </cheat>

</mamecheat>
stinger2.xml

Code: Select all

<!-- Stinger (prototype?) -->
<mamecheat version="1">

    <cheat desc="no hit">
        <script state="on">
            <action>maincpu.ob@2BF3 = C9</action>
        </script>
        <script state="off">
            <action>maincpu.ob@2BF3 = 32</action>
        </script>
    </cheat>

    <cheat desc="auto fire">
        <script state="on">
            <action>maincpu.mb@2534 = 24</action>
        </script>
        <script state="off">
            <action>maincpu.mb@2534 = 14</action>
        </script>
    </cheat>

    <cheat desc="player speed">
        <parameter>
            <item value="0x01">01 (slow)</item>
            <item value="0x02">02       </item>
            <item value="0x04">03       </item>
            <item value="0x06">04       </item>
            <item value="0x08">05 (fast)</item>
        </parameter>
        <script state="on">
            <!-- right -->
            <action>maincpu.oq@23AA = FFC6FFFF3AFFFFCA</action> <!-- jp z,$23AD / ld a,($C140) / add a,$xx -->
            <action>maincpu.mq@23AA = 00FFC140FF23ADFF</action>
            <!-- left -->
            <action>maincpu.oq@23D2 = FFD6FFFF3AFFFFCA</action> <!-- jp z,$23D5 / ld a,($C140) / sub $xx -->
            <action>maincpu.mq@23D2 = 00FFC140FF23D5FF</action>
            <!-- down -->
            <action>maincpu.oq@23FA = FFC6FFFF3AFFFFCA</action> <!-- jp z,$23FD / ld a,($C143) / add a,$xx -->
            <action>maincpu.mq@23FA = 00FFC143FF23FDFF</action>
            <!-- up -->
            <action>maincpu.oq@2422 = FFD6FFFF3AFFFFCA</action> <!-- jp z,$2425 / ld a,($C143) / sub $xx -->
            <action>maincpu.mq@2422 = 00FFC143FF2425FF</action>
        </script>
        <script state="change">
            <action>maincpu.mb@23B1 = param</action>
            <action>maincpu.mb@23D9 = param</action>
            <action>maincpu.mb@2401 = param</action>
            <action>maincpu.mb@2429 = param</action>
        </script>
        <script state="off">
            <action>maincpu.oq@23AA = 3C3CC1403A23BCCA</action>
            <action>maincpu.mq@23AA = 3C3CC1403A23BCCA</action>
            <action>maincpu.oq@23D2 = 3D3DC1403A23E4CA</action>
            <action>maincpu.mq@23D2 = 3D3DC1403A23E4CA</action>
            <action>maincpu.oq@23FA = 3C3CC1433A240CCA</action>
            <action>maincpu.mq@23FA = 3C3CC1433A240CCA</action>
            <action>maincpu.oq@2422 = 3D3DC1433A2434CA</action>
            <action>maincpu.mq@2422 = 3D3DC1433A2434CA</action>
        </script>
    </cheat>

    <cheat desc="bullet speed - front shot">
        <parameter>
            <item value="0x05">01 (slow)</item>
            <item value="0x0a">02       </item>
            <item value="0x0f">03       </item>
            <item value="0x14">04       </item>
            <item value="0x19">05 (fast)</item>
        </parameter>
        <script state="change">
            <action>maincpu.mb@25A7 = param</action> <!-- first bullet -->
            <action>maincpu.mb@2737 = param</action> <!-- second bullet -->
            <action>maincpu.mb@27D1 = param</action> <!-- third bullet -->
        </script>
        <script state="off">
            <action>maincpu.mb@25A7 = 0A</action>
            <action>maincpu.mb@2737 = 0A</action>
            <action>maincpu.mb@27D1 = 0A</action>
        </script>
    </cheat>

    <cheat desc="twin shot on ground">
        <script state="on">
            <action>maincpu.mw@2491 = 2493</action>
            <action>maincpu.ob@2679 = 00  </action>
            <action>maincpu.ob@279D = 00  </action>
        </script>
        <script state="off">
            <action>maincpu.mw@2491 = 253B</action>
            <action>maincpu.ob@2679 = C8  </action>
            <action>maincpu.ob@279D = C8  </action>
        </script>
    </cheat>

    <cheat desc="fast bomb">
        <script state="on">
            <action>maincpu.ob@255B = CD              </action>
            <action>maincpu.mw@255C = 9630            </action>
            <action>maincpu.oq@9630 = FFFFC9FFFF32FF3E</action> <!-- ld a,$14 / ld ($C223),a / ret -->
            <action>maincpu.mq@9630 = FFFFFFC223FF1400</action>
            <action>maincpu.mb@2566 = 30              </action>
        </script>
        <script state="off">
            <action>maincpu.ob@255B = 32              </action>
            <action>maincpu.mw@255C = C223            </action>
            <action>maincpu.oq@9630 = 8080808080808080</action>
            <action>maincpu.mq@9630 = 0000000000000000</action>
            <action>maincpu.mb@2566 = 00              </action>
        </script>
    </cheat>

    <cheat desc="sound test mode">
        <!-- you can't stop two sfxs (code 0x0d and 0x0e) by sound stop button -->
        <comment>reset the game (F3) to enter sound test mode</comment>
        <script state="on">
            <action>maincpu.oq@0C95 = C3              </action>
            <action>maincpu.mw@0C96 = 9640            </action>
            <action>maincpu.oq@9640 = E6FFFF3AFFFFFF21</action>
            <action>maincpu.mq@9640 = FFF010FFFFC000FF</action>
            <action>maincpu.oq@9648 = B1FFE600003A4FFF</action>
            <action>maincpu.mq@9648 = FF33FFF018FFFF44</action>
            <action>maincpu.oq@9650 = 0020FFFEFF2847B8</action>
            <action>maincpu.mq@9650 = 01FF02FFEFFFFFFF</action>
            <action>maincpu.oq@9658 = FFFE34FF20FFFE35</action>
            <action>maincpu.mq@9658 = 20FFFF01FF01FFFF</action>
            <action>maincpu.oq@9660 = FFFEFF18FF3EFF20</action>
            <action>maincpu.mq@9660 = 10FF06FFF0FF04FF</action>
            <action>maincpu.oq@9668 = FE787786FF3EFF20</action>
            <action>maincpu.mq@9668 = FFFFFFFF10FF05FF</action>
            <action>maincpu.oq@9670 = FFFEFF187EFF20FF</action>
            <action>maincpu.mq@9670 = 04FF06FFFF03FF40</action>
            <action>maincpu.oq@9678 = FEFFFF21FF3EFF20</action>
            <action>maincpu.mq@9678 = FFF800FF90FF12FF</action>
            <action>maincpu.oq@9680 = 20FFFEFF2EFF20FF</action>
            <action>maincpu.mq@9680 = FF0EFF08FF02FF0D</action>
            <action>maincpu.oq@9688 = FFFFFF1877FF2EFF</action>
            <action>maincpu.mq@9688 = FFFFB2FFFF0AFF02</action>
            <!--
            9640 | 21 00 C0 : ld   hl,$C000  // sound code address
            9643 | FF       : rst  $38       // watchdog
            9644 | 3A 10 F0 : ld   a,($F010) // read buttons
            9647 | E6 44    : and  $44
            9649 | 4F       : ld   c,a
            964A | 3A 18 F0 : ld   a,($F018) // read other inputs
            964D | E6 33    : and  $33
            964F | B1       : or   c
            9650 | B8       : cp   b
            9651 | 47       : ld   b,a
            9652 | 28 EF    : jr   z,$9643
            9654 | FE 02    : cp   $02
            9656 | 20 01    : jr   nz,$9659
            9658 | 35       : dec  (hl)      // decrease code -01
            9659 | FE 01    : cp   $01
            965B | 20 01    : jr   nz,$965E
            965D | 34       : inc  (hl)      // increase code +10
            965E | FE 20    : cp   $20
            9660 | 20 04    : jr   nz,$9666
            9662 | 3E F0    : ld   a,$F0     // decrease code -10
            9664 | 18 06    : jr   $966C
            9666 | FE 10    : cp   $10
            9668 | 20 05    : jr   nz,$966F
            966A | 3E 10    : ld   a,$10     // increase code +10
            966C | 86       : add  a,(hl)
            966D | 77       : ld   (hl),a
            966E | 78       : ld   a,b
            966F | FE 40    : cp   $40
            9671 | 20 03    : jr   nz,$9676
            9673 | 7E       : ld   a,(hl)    // play sound
            9674 | 18 06    : jr   $967C
            9676 | FE 04    : cp   $04
            9678 | 20 12    : jr   nz,$968C
            967A | 3E 90    : ld   a,$90     // stop sound
            967C | 21 00 F8 : ld   hl,$F800  // sound latch address
            967F | FE 0D    : cp   $0D
            9681 | 20 02    : jr   nz,$9685
            9683 | 2E 08    : ld   l,$08     // explosion sound ($f808)
            9685 | FE 0E    : cp   $0E
            9687 | 20 02    : jr   nz,$968B
            9689 | 2E 0A    : ld   l,$0A     // shot sound ($f80a)
            968B | 77       : ld   (hl),a    // send sound code
            968C | 18 B2    : jr   $9640
            -->
        </script>
        <script state="run">
            <output format="----- stinger 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 %02X &gt;&gt;"   line="19" align="center"  >
                <argument>maincpu.pb@C000</argument>
            </output>
        </script>
        <script state="off">
            <action>maincpu.oq@0C95 = 32              </action>
            <action>maincpu.mw@0C96 = F800            </action>
            <action>maincpu.oq@9640 = 0000000000000000</action>
            <action>maincpu.mq@9640 = 0000000000000000</action>
            <action>maincpu.oq@9648 = 0000000000000000</action>
            <action>maincpu.mq@9648 = 0000000000000000</action>
            <action>maincpu.oq@9650 = 0000000000000000</action>
            <action>maincpu.mq@9650 = 0000000000000000</action>
            <action>maincpu.oq@9658 = 0000000000000000</action>
            <action>maincpu.mq@9658 = 0000000000000000</action>
            <action>maincpu.oq@9660 = 0000000000000000</action>
            <action>maincpu.mq@9660 = 0000000000000000</action>
            <action>maincpu.oq@9668 = 0000000000000000</action>
            <action>maincpu.mq@9668 = 0000000000000000</action>
            <action>maincpu.oq@9670 = 0000000000000000</action>
            <action>maincpu.mq@9670 = 0000000000000000</action>
            <action>maincpu.oq@9678 = 0000000000000000</action>
            <action>maincpu.mq@9678 = 0000000000000000</action>
            <action>maincpu.oq@9680 = A0A0A0A0A0A0A0A0</action>
            <action>maincpu.mq@9680 = 0000000000000000</action>
            <action>maincpu.oq@9688 = 8888888888888888</action>
            <action>maincpu.mq@9688 = 0000000000000000</action>
        </script>
    </cheat>

    <cheat desc="skip ram check">
        <script state="on">
            <action>maincpu.ob@0D4A = C9</action>
        </script>
        <script state="off">
            <action>maincpu.ob@0D4A = DF</action>
        </script>
    </cheat>

</mamecheat>
finger.xml

Code: Select all

<!-- Finger (bootleg of Stinger) -->
<mamecheat version="1">

    <cheat desc="no hit">
        <script state="on">
            <action>maincpu.ob@2BF3 = C9</action>
        </script>
        <script state="off">
            <action>maincpu.ob@2BF3 = 32</action>
        </script>
    </cheat>

    <cheat desc="auto fire">
        <script state="on">
            <action>maincpu.mb@2534 = 24</action>
        </script>
        <script state="off">
            <action>maincpu.mb@2534 = 14</action>
        </script>
    </cheat>

    <cheat desc="player speed">
        <parameter>
            <item value="0x01">01 (slow)</item>
            <item value="0x02">02       </item>
            <item value="0x04">03       </item>
            <item value="0x06">04       </item>
            <item value="0x08">05 (fast)</item>
        </parameter>
        <script state="on">
            <!-- right -->
            <action>maincpu.oq@23AA = FFC6FFFF3AFFFFCA</action> <!-- jp z,$23AD / ld a,($C140) / add a,$xx -->
            <action>maincpu.mq@23AA = 00FFC140FF23ADFF</action>
            <!-- left -->
            <action>maincpu.oq@23D2 = FFD6FFFF3AFFFFCA</action> <!-- jp z,$23D5 / ld a,($C140) / sub $xx -->
            <action>maincpu.mq@23D2 = 00FFC140FF23D5FF</action>
            <!-- down -->
            <action>maincpu.oq@23FA = FFC6FFFF3AFFFFCA</action> <!-- jp z,$23FD / ld a,($C143) / add a,$xx -->
            <action>maincpu.mq@23FA = 00FFC143FF23FDFF</action>
            <!-- up -->
            <action>maincpu.oq@2422 = FFD6FFFF3AFFFFCA</action> <!-- jp z,$2425 / ld a,($C143) / sub $xx -->
            <action>maincpu.mq@2422 = 00FFC143FF2425FF</action>
        </script>
        <script state="change">
            <action>maincpu.mb@23B1 = param</action>
            <action>maincpu.mb@23D9 = param</action>
            <action>maincpu.mb@2401 = param</action>
            <action>maincpu.mb@2429 = param</action>
        </script>
        <script state="off">
            <action>maincpu.oq@23AA = 3C3CC1403A23BCCA</action>
            <action>maincpu.mq@23AA = 3C3CC1403A23BCCA</action>
            <action>maincpu.oq@23D2 = 3D3DC1403A23E4CA</action>
            <action>maincpu.mq@23D2 = 3D3DC1403A23E4CA</action>
            <action>maincpu.oq@23FA = 3C3CC1433A240CCA</action>
            <action>maincpu.mq@23FA = 3C3CC1433A240CCA</action>
            <action>maincpu.oq@2422 = 3D3DC1433A2434CA</action>
            <action>maincpu.mq@2422 = 3D3DC1433A2434CA</action>
        </script>
    </cheat>

    <cheat desc="bullet speed - front shot">
        <parameter>
            <item value="0x05">01 (slow)</item>
            <item value="0x0a">02       </item>
            <item value="0x0f">03       </item>
            <item value="0x14">04       </item>
            <item value="0x19">05 (fast)</item>
        </parameter>
        <script state="change">
            <action>maincpu.mb@25A7 = param</action> <!-- first bullet -->
            <action>maincpu.mb@2737 = param</action> <!-- second bullet -->
            <action>maincpu.mb@27D1 = param</action> <!-- third bullet -->
        </script>
        <script state="off">
            <action>maincpu.mb@25A7 = 0A</action>
            <action>maincpu.mb@2737 = 0A</action>
            <action>maincpu.mb@27D1 = 0A</action>
        </script>
    </cheat>

    <cheat desc="twin shot on ground">
        <script state="on">
            <action>maincpu.mw@2491 = 2493</action>
            <action>maincpu.ob@2679 = 00  </action>
            <action>maincpu.ob@279D = 00  </action>
        </script>
        <script state="off">
            <action>maincpu.mw@2491 = 253B</action>
            <action>maincpu.ob@2679 = C8  </action>
            <action>maincpu.ob@279D = C8  </action>
        </script>
    </cheat>

    <cheat desc="fast bomb">
        <script state="on">
            <action>maincpu.ob@255B = CD              </action>
            <action>maincpu.mw@255C = 9630            </action>
            <action>maincpu.oq@9630 = FFFFC9FFFF32FF3E</action> <!-- ld a,$14 / ld ($C223),a / ret -->
            <action>maincpu.mq@9630 = FFFFFFC223FF1400</action>
            <action>maincpu.mb@2566 = 30              </action>
        </script>
        <script state="off">
            <action>maincpu.ob@255B = 32              </action>
            <action>maincpu.mw@255C = C223            </action>
            <action>maincpu.oq@9630 = 8080808080808080</action>
            <action>maincpu.mq@9630 = 0000000000000000</action>
            <action>maincpu.mb@2566 = 00              </action>
        </script>
    </cheat>

    <cheat desc="sound test mode">
        <!-- you can't stop two sfxs (code 0x0d and 0x0e) by sound stop button -->
        <comment>reset the game (F3) to enter sound test mode</comment>
        <script state="on">
            <action>maincpu.oq@0C95 = C3              </action>
            <action>maincpu.mw@0C96 = 9640            </action>
            <action>maincpu.oq@9640 = E6FFFF3AFFFFFF21</action>
            <action>maincpu.mq@9640 = FFF010FFFFC000FF</action>
            <action>maincpu.oq@9648 = B1FFE600003A4FFF</action>
            <action>maincpu.mq@9648 = FF33FFF018FFFF44</action>
            <action>maincpu.oq@9650 = 0020FFFEFF2847B8</action>
            <action>maincpu.mq@9650 = 01FF02FFEFFFFFFF</action>
            <action>maincpu.oq@9658 = FFFE34FF20FFFE35</action>
            <action>maincpu.mq@9658 = 20FFFF01FF01FFFF</action>
            <action>maincpu.oq@9660 = FFFEFF18FF3EFF20</action>
            <action>maincpu.mq@9660 = 10FF06FFF0FF04FF</action>
            <action>maincpu.oq@9668 = FE787786FF3EFF20</action>
            <action>maincpu.mq@9668 = FFFFFFFF10FF05FF</action>
            <action>maincpu.oq@9670 = FFFEFF187EFF20FF</action>
            <action>maincpu.mq@9670 = 04FF06FFFF03FF40</action>
            <action>maincpu.oq@9678 = FEFFFF21FF3EFF20</action>
            <action>maincpu.mq@9678 = FFF800FF90FF12FF</action>
            <action>maincpu.oq@9680 = 20FFFEFF2EFF20FF</action>
            <action>maincpu.mq@9680 = FF0EFF08FF02FF0D</action>
            <action>maincpu.oq@9688 = FFFFFF1877FF2EFF</action>
            <action>maincpu.mq@9688 = FFFFB2FFFF0AFF02</action>
            <!--
            9640 | 21 00 C0 : ld   hl,$C000  // sound code address
            9643 | FF       : rst  $38       // watchdog
            9644 | 3A 10 F0 : ld   a,($F010) // read buttons
            9647 | E6 44    : and  $44
            9649 | 4F       : ld   c,a
            964A | 3A 18 F0 : ld   a,($F018) // read other inputs
            964D | E6 33    : and  $33
            964F | B1       : or   c
            9650 | B8       : cp   b
            9651 | 47       : ld   b,a
            9652 | 28 EF    : jr   z,$9643
            9654 | FE 02    : cp   $02
            9656 | 20 01    : jr   nz,$9659
            9658 | 35       : dec  (hl)      // decrease code -01
            9659 | FE 01    : cp   $01
            965B | 20 01    : jr   nz,$965E
            965D | 34       : inc  (hl)      // increase code +10
            965E | FE 20    : cp   $20
            9660 | 20 04    : jr   nz,$9666
            9662 | 3E F0    : ld   a,$F0     // decrease code -10
            9664 | 18 06    : jr   $966C
            9666 | FE 10    : cp   $10
            9668 | 20 05    : jr   nz,$966F
            966A | 3E 10    : ld   a,$10     // increase code +10
            966C | 86       : add  a,(hl)
            966D | 77       : ld   (hl),a
            966E | 78       : ld   a,b
            966F | FE 40    : cp   $40
            9671 | 20 03    : jr   nz,$9676
            9673 | 7E       : ld   a,(hl)    // play sound
            9674 | 18 06    : jr   $967C
            9676 | FE 04    : cp   $04
            9678 | 20 12    : jr   nz,$968C
            967A | 3E 90    : ld   a,$90     // stop sound
            967C | 21 00 F8 : ld   hl,$F800  // sound latch address
            967F | FE 0D    : cp   $0D
            9681 | 20 02    : jr   nz,$9685
            9683 | 2E 08    : ld   l,$08     // explosion sound ($f808)
            9685 | FE 0E    : cp   $0E
            9687 | 20 02    : jr   nz,$968B
            9689 | 2E 0A    : ld   l,$0A     // shot sound ($f80a)
            968B | 77       : ld   (hl),a    // send sound code
            968C | 18 B2    : jr   $9640
            -->
        </script>
        <script state="run">
            <output format="----- finger 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 %02X &gt;&gt;"  line="19" align="center"  >
                <argument>maincpu.pb@C000</argument>
            </output>
        </script>
        <script state="off">
            <action>maincpu.oq@0C95 = 32              </action>
            <action>maincpu.mw@0C96 = F800            </action>
            <action>maincpu.oq@9640 = 0000000000000000</action>
            <action>maincpu.mq@9640 = 0000000000000000</action>
            <action>maincpu.oq@9648 = 0000000000000000</action>
            <action>maincpu.mq@9648 = 0000000000000000</action>
            <action>maincpu.oq@9650 = 0000000000000000</action>
            <action>maincpu.mq@9650 = 0000000000000000</action>
            <action>maincpu.oq@9658 = 0000000000000000</action>
            <action>maincpu.mq@9658 = 0000000000000000</action>
            <action>maincpu.oq@9660 = 0000000000000000</action>
            <action>maincpu.mq@9660 = 0000000000000000</action>
            <action>maincpu.oq@9668 = 0000000000000000</action>
            <action>maincpu.mq@9668 = 0000000000000000</action>
            <action>maincpu.oq@9670 = 0000000000000000</action>
            <action>maincpu.mq@9670 = 0000000000000000</action>
            <action>maincpu.oq@9678 = 0000000000000000</action>
            <action>maincpu.mq@9678 = 0000000000000000</action>
            <action>maincpu.oq@9680 = A0A0A0A0A0A0A0A0</action>
            <action>maincpu.mq@9680 = 0000000000000000</action>
            <action>maincpu.oq@9688 = 8888888888888888</action>
            <action>maincpu.mq@9688 = 0000000000000000</action>
        </script>
    </cheat>

    <cheat desc="skip ram check">
        <script state="on">
            <action>maincpu.ob@0D4A = C9</action>
        </script>
        <script state="off">
            <action>maincpu.ob@0D4A = DF</action>
        </script>
    </cheat>

</mamecheat>
Post Reply