[commsega] Commando (Sega)

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

[commsega] Commando (Sega)

Post by jman »

Code: Select all

<cheat desc="no hit">
    <script state="on">
        <action>maincpu.mb@15e9 = c9</action>
    </script>
    <script state="off">
        <action>maincpu.mb@15e9 = d8</action>
    </script>
</cheat>

<cheat desc="auto fire">
    <script state="on">
        <action>maincpu.mb@1870 = 00</action> <!-- shot -->
        <action>maincpu.mb@18a3 = 00</action> <!-- bomb -->
    </script>
    <script state="off">
        <action>maincpu.mb@1870 = c8</action>
        <action>maincpu.mb@18a3 = c8</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="change">
        <action>maincpu.mb@18ed = param</action> <!-- right -->
        <action>maincpu.mb@1907 = param</action> <!-- left -->
    </script>
    <script state="off">
        <action>maincpu.mb@18ed = 01</action>
        <action>maincpu.mb@1907 = 01</action>
    </script>
</cheat>

<cheat desc="fast bomb">
    <script state="on">
        <action>maincpu.mb@171f =               c3</action>
        <action>maincpu.mq@18b0 = 1077dd0a77dd10c6</action>
        <action>maincpu.md@18be =         000b77dd</action>
    </script>
    <script state="off">
        <action>maincpu.mb@171f =               ca</action>
        <action>maincpu.mq@18b0 = 1077dd10c60a77dd</action>
        <action>maincpu.md@18be =         da0b36dd</action>
    </script>
</cheat>

<cheat desc="sound test mode">
    <!-- music is code 0x02 and sfx are in 0x80 or later -->
    <comment>reset the game (F3) to enter sound test mode</comment>
    <script state="on">
        <action>maincpu.mb@007f =               55</action> <!-- disable credit display -->
        <action>maincpu.mw@00bf =             4fe0</action>
        <action>maincpu.mq@4fe0 = e62fa0003a9b0021</action>
        <action>maincpu.mq@4fe8 = 01e62fa0803a4f38</action>
        <action>maincpu.mq@4ff0 = 2fa1003a4fb27957</action>
        <action>maincpu.mq@4ff8 = fee42847b8b1c0e6</action>
        <action>maincpu.mq@5000 = 012020fe35012010</action>
        <action>maincpu.mq@5008 = 18f03e042080fe34</action>
        <action>maincpu.mq@5010 = 86103e052001fe06</action>
        <action>maincpu.mq@5018 = 187e032040fe7877</action>
        <action>maincpu.mq@5020 = cd013e052008fe06</action>
        <action>maincpu.mq@5028 = 00000000b7180b1e</action>
        <!--
        4fe0 | 21 00 9b : ld   hl,$9B00  // sound code address
        4fe3 | 3a 00 a0 : ld   a,($A000) // read left/right/button 2 inputs
        4fe6 | 2f       : cpl
        4fe7 | e6 38    : and  $38
        4fe9 | 4f       : ld   c,a
        4fea | 3a 80 a0 : ld   a,($A080) // read up input
        4fed | 2f       : cpl
        4fee | e6 01    : and  $01
        4ff0 | 57       : ld   d,a
        4ff1 | 79       : ld   a,c
        4ff2 | b2       : or   d
        4ff3 | 4f       : ld   c,a
        4ff4 | 3a 00 a1 : ld   a,($A100) // read down/button 1 inputs
        4ff7 | 2f       : cpl
        4ff8 | e6 c0    : and  $C0
        4ffa | b1       : or   c
        4ffb | b8       : cp   b
        4ffc | 47       : ld   b,a
        4ffd | 28 e4    : jr   z,$4FE3
        4fff | fe 10    : cp   $10
        5001 | 20 01    : jr   nz,$5004
        5003 | 35       : dec  (hl)      // decrease code -01
        5004 | fe 20    : cp   $20
        5006 | 20 01    : jr   nz,$5009
        5008 | 34       : inc  (hl)      // increase code +01
        5009 | fe 80    : cp   $80
        500b | 20 04    : jr   nz,$5011
        500d | 3e f0    : ld   a,$F0     // decrease code -10
        500f | 18 06    : jr   $5017
        5011 | fe 01    : cp   $01
        5013 | 20 05    : jr   nz,$501A
        5015 | 3e 10    : ld   a,$10     // increase code +10
        5017 | 86       : add  a,(hl)
        5018 | 77       : ld   (hl),a
        5019 | 78       : ld   a,b
        501a | fe 40    : cp   $40
        501c | 20 03    : jr   nz,$5021
        501e | 7e       : ld   a,(hl)    // play sound
        501f | 18 06    : jr   $5027
        5021 | fe 08    : cp   $08
        5023 | 20 05    : jr   nz,$502A
        5025 | 3e 01    : ld   a,$01     // stop sound
        5027 | cd 1e 0b : call $0B1E     // send sound code
        502a | 18 b7    : jr   $4FE3
        -->
    </script>
    <script state="run">
        <output format="----- commando 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@9b00</argument>
        </output>
    </script>
    <script state="off">
        <action>maincpu.mb@007f =               56</action>
        <action>maincpu.mw@00bf =             0adb</action>
        <action>maincpu.mq@4fe0 = 0000000000000000</action>
        <action>maincpu.mq@4fe8 = 0000000000000000</action>
        <action>maincpu.mq@4ff0 = 0000000000000000</action>
        <action>maincpu.mq@4ff8 = 0000000000000000</action>
        <action>maincpu.mq@5000 = 0000000000000000</action>
        <action>maincpu.mq@5008 = 0000000000000000</action>
        <action>maincpu.mq@5010 = 0000000000000000</action>
        <action>maincpu.mq@5018 = 0000000000000000</action>
        <action>maincpu.mq@5020 = 0000000000000000</action>
        <action>maincpu.mq@5028 = 0000000000000000</action>
    </script>
</cheat>
"sound test mode" : music is code 0x02 and sfx are in 0x80 or later.
Post Reply