[lastduelj] Last Duel

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: 874
Joined: Tue Dec 01, 2020 1:24 pm
Been thanked: 3 times

[lastduelj] Last Duel

Post by jman »

Code: Select all

<cheat desc="no hit">
    <script state="on">
        <action>maincpu.mb@b0d2 =   60</action> <!-- background -->
        <action>maincpu.mw@b168 = 4e75</action> <!-- fall down -->
        <action>maincpu.mb@b524 =   60</action> <!-- wall -->
        <action>maincpu.mb@ef40 =   60</action> <!-- enemy -->
        <action>maincpu.mb@f7f0 =   60</action> <!-- bullet -->
        <action>maincpu.mb@fc38 =   60</action> <!-- boss -->
    </script>
    <script state="off">
        <action>maincpu.mb@b0d2 =   67</action>
        <action>maincpu.mw@b168 = d040</action>
        <action>maincpu.mb@b524 =   66</action>
        <action>maincpu.mb@ef40 =   66</action>
        <action>maincpu.mb@f7f0 =   66</action>
        <action>maincpu.mb@fc38 =   66</action>
    </script>
</cheat>

<cheat desc="auto fire">
    <script state="on">
        <!-- shot -->
        <action>maincpu.mb@b391 = 01</action> <!-- level 1 -->
        <action>maincpu.mb@b3c5 = 01</action> <!-- level 2 -->
        <action>maincpu.mb@b519 = 01</action> <!-- level 3 -->
        <action>maincpu.mb@b401 = 01</action> <!-- level 4-1 -->
        <action>maincpu.mb@b413 = 01</action> <!-- level 4-2 -->
        <action>maincpu.mb@b41b = 01</action> <!-- level 5-1 -->
        <action>maincpu.mb@b451 = 01</action> <!-- level 5-2 -->
        <!-- missile -->
        <action>maincpu.mb@b2a3 = 01</action> <!-- level 1 -->
        <action>maincpu.mb@b2d9 = 01</action> <!-- level 2 -->
        <action>maincpu.mb@b319 = 01</action> <!-- level 3 -->
        <!-- pods -->
        <action>maincpu.mb@dd9b = 01</action>
    </script>
    <script state="off">
        <action>maincpu.mb@b391 = 40</action>
        <action>maincpu.mb@b3c5 = 40</action>
        <action>maincpu.mb@b519 = 40</action>
        <action>maincpu.mb@b401 = 04</action>
        <action>maincpu.mb@b413 = 20</action>
        <action>maincpu.mb@b41b = 10</action>
        <action>maincpu.mb@b451 = 05</action>
        <action>maincpu.mb@b2a3 = 60</action>
        <action>maincpu.mb@b2d9 = 60</action>
        <action>maincpu.mb@b319 = 60</action>
        <action>maincpu.mb@dd9b = 20</action>
    </script>
</cheat>

<cheat desc="player speed">
    <parameter>
        <item value="0x00008000">01 (slow)</item>
        <item value="0x00038000">02       </item>
        <item value="0x00048000">03       </item>
        <item value="0x00068000">04       </item>
        <item value="0x00088000">05 (fast)</item>
    </parameter>
    <script state="on">
        <action>maincpu.mq@01540 = 4eb90002e9227200</action>
        <action>maincpu.mq@0154e = 4eb90002e92a4e75</action>
        <action>maincpu.mq@2e900 = e081b0fc893c6708</action>
        <action>maincpu.mq@2e908 = b0fc89bc67024e75</action>
        <action>maincpu.mq@2e910 = 243c000000004a81</action>
        <action>maincpu.mq@2e918 = 67066a0244822202</action>
        <action>maincpu.mq@2e920 = 4e7561dcd3a80010</action>
        <action>maincpu.mq@2e928 = 4e7561d4d3a80014</action>
        <action>maincpu.mq@2e930 = 4e75ffffffffffff</action>
        <!--
        2e900 | e081           : asr.l  #8,D1       // common routine
        2e902 | b0fc 893c      : cmpa.w #$893c,A0
        2e906 | 6708           : beq    $2e910
        2e908 | b0fc 89bc      : cmpa.w #$89bc,A0
        2e90c | 6702           : beq    $2e910
        2e90e | 4e75           : rts
        2e910 | 243c xxxx xxxx : move.l #$xxxx,D2
        2e916 | 4a81           : tst.l  D1
        2e918 | 6706           : beq    $2e920
        2e91a | 6a02           : bpl    $2e91e
        2e91c | 4482           : neg.l  D2
        2e91e | 2202           : move.l D2,D1
        2e920 | 4e75           : rts
        2e922 | 61dc           : bsr    $2e900      // x position
        2e924 | d3a8 0010      : add.l  D1,($10,A0)
        2e928 | 4e75           : rts
        2e92a | 61d4           : bsr    $2e900      // y position
        2e92c | d3a8 0014      : add.l  D1,($14,A0)
        2e930 | 4e75           : rts
        -->
    </script>
    <script state="change">
        <action>maincpu.md@2e912 = param</action>
    </script>
    <script state="off">
        <action>maincpu.mq@01540 = e081d3a800107200</action>
        <action>maincpu.mq@0154e = e081d3a800144e75</action>
        <action>maincpu.mq@2e900 = ffffffffffffffff</action>
        <action>maincpu.mq@2e908 = ffffffffffffffff</action>
        <action>maincpu.mq@2e910 = ffffffffffffffff</action>
        <action>maincpu.mq@2e918 = ffffffffffffffff</action>
        <action>maincpu.mq@2e920 = ffffffffffffffff</action>
        <action>maincpu.mq@2e928 = ffffffffffffffff</action>
        <action>maincpu.mq@2e930 = ffffffffffffffff</action>
    </script>
</cheat>

<cheat desc="bullet speed - main shot">
    <parameter>
        <item value="0x00010000">01 (slow)</item>
        <item value="0x00100000">02       </item>
        <item value="0x00180000">03       </item>
        <item value="0x00200000">04       </item>
        <item value="0x00280000">05 (fast)</item>
    </parameter>
    <script state="on">
        <action>maincpu.mq@0d302 = 06a8000000000014</action>
    </script>
    <script state="change">
        <action>maincpu.md@0d304 = param</action> <!-- shots -->
        <action>maincpu.md@26a70 = param</action> <!-- laser -->
    </script>
    <script state="off">
        <action>maincpu.mq@0d302 = 2028001cd1a80014</action>
        <action>maincpu.md@26a70 =         00180000</action>
    </script>
</cheat>

<cheat desc="short hit mark (test)">
    <script state="on">
        <action>maincpu.mb@d208 = 06</action>
        <action>maincpu.mb@eec0 = 06</action>
        <action>maincpu.mb@eed6 = 06</action>
    </script>
    <script state="off">
        <action>maincpu.mb@d208 = 04</action>
        <action>maincpu.mb@eec0 = 04</action>
        <action>maincpu.mb@eed6 = 04</action>
    </script>
</cheat>

<cheat desc="timer speed">
    <parameter>
        <item value="0xff">01 (slow)</item>
        <item value="0x7f">02       </item>
        <item value="0x1f">03       </item>
        <item value="0x0f">04       </item>
        <item value="0x01">05 (fast)</item>
    </parameter>
    <script state="change">
        <action>maincpu.mb@c139 = param</action>
    </script>
    <script state="off">
        <action>maincpu.mb@c139 = 1f</action>
    </script>
</cheat>

<cheat desc="sound test mode">
    <comment>reset the game (F3) to enter sound test mode</comment>
    <script state="on">
        <action>maincpu.mq@007b4 = 4ef90002e9401b7c</action>
        <action>maincpu.mq@2e940 = 41ed100043f900fc</action>
        <action>maincpu.mq@2e948 = 400312001029fffe</action>
        <action>maincpu.mq@2e950 = b20067f60c0000fd</action>
        <action>maincpu.mq@2e958 = 660253100c0000fe</action>
        <action>maincpu.mq@2e960 = 660252100c0000fb</action>
        <action>maincpu.mq@2e968 = 6604041000100c00</action>
        <action>maincpu.mq@2e970 = 00f7660406100010</action>
        <action>maincpu.mq@2e978 = 0c0000ef66021290</action>
        <action>maincpu.mq@2e980 = 0c0000df66024211</action>
        <action>maincpu.mq@2e988 = 60c0ffffffffffff</action>
        <!--
        2e940 | 41ed 1000      : lea    ($1000,A5),A0 // $ff9000 : sound code address
        2e944 | 43f9 00fc 4003 : lea    $fc4003.l,A1  // $fc4003 : sound latch address
        2e94a | 1200           : move.b D0,D1
        2e94c | 1029 fffe      : move.b (-$2,A1),D0   // $fc4001 : input
        2e950 | b200           : cmp.b  D0,D1
        2e952 | 67f6           : beq    $2e94a
        2e954 | 0c00 00fd      : cmpi.b #-$3,D0
        2e958 | 6602           : bne    $2e95c
        2e95a | 5310           : subq.b #1,(A0)       // decrease code -01
        2e95c | 0c00 00fe      : cmpi.b #-$2,D0
        2e960 | 6602           : bne    $2e964
        2e962 | 5210           : addq.b #1,(A0)       // increase code +01
        2e964 | 0c00 00fb      : cmpi.b #-$5,D0
        2e968 | 6604           : bne    $2e96e
        2e96a | 0410 0010      : subi.b #$10,(A0)     // decrease code -10
        2e96e | 0c00 00f7      : cmpi.b #-$9,D0
        2e972 | 6604           : bne    $2e978
        2e974 | 0610 0010      : addi.b #$10,(A0)     // increase code +10
        2e978 | 0c00 00ef      : cmpi.b #-$11,D0
        2e97c | 6602           : bne    $2e980
        2e97e | 1290           : move.b (A0),(A1)     // play sound
        2e980 | 0c00 00df      : cmpi.b #-$21,D0
        2e984 | 6602           : bne    $2e988
        2e986 | 4211           : clr.b  (A1)          // stop sound
        2e988 | 60c0           : bra    $2e94a
        -->
    </script>
    <script state="run">
        <output format="----- last duel 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 music"                 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@ff9000</argument>
        </output>
    </script>
    <script state="off">
        <action>maincpu.mq@007b4 = 1b7c00031b7c1b7c</action>
        <action>maincpu.mq@2e940 = ffffffffffffffff</action>
        <action>maincpu.mq@2e948 = ffffffffffffffff</action>
        <action>maincpu.mq@2e950 = ffffffffffffffff</action>
        <action>maincpu.mq@2e958 = ffffffffffffffff</action>
        <action>maincpu.mq@2e960 = ffffffffffffffff</action>
        <action>maincpu.mq@2e968 = ffffffffffffffff</action>
        <action>maincpu.mq@2e970 = ffffffffffffffff</action>
        <action>maincpu.mq@2e978 = ffffffffffffffff</action>
        <action>maincpu.mq@2e980 = ffffffffffffffff</action>
        <action>maincpu.mq@2e988 = ffffffffffffffff</action>
    </script>
</cheat>

<cheat desc="skip ram check">
    <script state="on">
        <action>maincpu.md@0a7a = 4ef80404</action>
    </script>
    <script state="off">
        <action>maincpu.md@0a7a = 60000134</action>
    </script>
</cheat>
"short hit mark" is test code due to unverified.
Post Reply