[masterwj] Master of Weapon

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

[masterwj] Master of Weapon

Post by jman »

Code: Select all

<cheat desc="no hit">
    <script state="on">
        <!-- enemy -->
        <action>maincpu.mq@158ea = 4eb90001fa206500</action>
        <action>maincpu.mq@1fa20 = b1fc002010806608</action>
        <action>maincpu.mq@1fa28 = 0c2e00f300106506</action>
        <action>maincpu.mq@1fa30 = dc6b0006bc434e75</action>
        <!--
        158ea | 4eb9 0001 fa20 : jsr    $1fa20.l
        1fa20 | b1fc 0020 1080 : cmpa.l #$201080,A0
        1fa26 | 660e           : bne    $1fa30
        1fa28 | 0c2e 00f3 0010 : cmpi.b #$f3,($10,A6)
        1fa2e | 6506           : bcs    $1fa36
        1fa30 | dc6b 0006      : add.w  ($6,A3),D6
        1fa34 | bc43           : cmp.w  D3,D6
        1fa36 | 4e75           : rts
        -->
        <action>maincpu.mb@15a0c = 60</action> <!-- bullet -->
    </script>
    <script state="off">
        <action>maincpu.mq@158ea = dc6b0006bc436500</action>
        <action>maincpu.mq@1fa20 = ffffffffffffffff</action>
        <action>maincpu.mq@1fa28 = ffffffffffffffff</action>
        <action>maincpu.mq@1fa30 = ffffffffffffffff</action>
        <action>maincpu.mb@15a0c =               65</action>
    </script>
</cheat>

<cheat desc="auto fire">
    <script state="on">
        <action>maincpu.mb@b8df = 01</action> <!-- air -->
        <action>maincpu.mb@b8eb = 01</action> <!-- air -->
        <action>maincpu.mb@ba4b = 01</action> <!-- ground -->
        <action>maincpu.mb@ba57 = 01</action> <!-- ground -->
    </script>
    <script state="off">
        <action>maincpu.mb@b8df = 18</action>
        <action>maincpu.mb@b8eb = 08</action>
        <action>maincpu.mb@ba4b = 01</action>
        <action>maincpu.mb@ba57 = 01</action>
    </script>
</cheat>

<cheat desc="player speed">
    <parameter min="0x01" max="0x08" step="0x01" />
    <script state="on">
        <action>maincpu.mq@0c518 = 4eb90001fa504e71</action> <!-- y position -->
        <action>maincpu.mq@0c562 = 4eb90001fa6e4e71</action> <!-- x position -->
        <action>maincpu.mq@1fa50 = b3fc00201080660c</action>
        <action>maincpu.mq@1fa58 = 76004a4267066a02</action>
        <action>maincpu.mq@1fa60 = 44433403d4690006</action>
        <action>maincpu.mq@1fa68 = 334200064e75b3fc</action>
        <action>maincpu.mq@1fa70 = 00201080660c7600</action>
        <action>maincpu.mq@1fa78 = 4a4467066a024443</action>
        <action>maincpu.mq@1fa80 = 3803d86900083344</action>
        <action>maincpu.mq@1fa88 = 00084e75ffffffff</action>
        <!--
        1fa50 | b3fc 0020 1080 : cmpa.l #$201080,A1 // y position
        1fa56 | 660c           : bne    $1fa64
        1fa58 | 76xx           : moveq  #$xx,D3
        1fa5a | 4a42           : tst.w  D2
        1fa5c | 6706           : beq    $1fa64
        1fa5e | 6a02           : bpl    $1fa62
        1fa60 | 4443           : neg.w  D3
        1fa62 | 3403           : move.w D3,D2
        1fa64 | d469 0006      : add.w  ($6,A1),D2
        1fa68 | 3342 0006      : move.w D2,($6,A1)
        1fa6c | 4e75           : rts
        1fa6e | b3fc 0020 1080 : cmpa.l #$201080,A1 // x position
        1fa74 | 660c           : bne    $1fa82
        1fa76 | 76xx           : moveq  #$xx,D3
        1fa78 | 4a44           : tst.w  D4
        1fa7a | 6706           : beq    $1fa82
        1fa7c | 6a02           : bpl    $1fa80
        1fa7e | 4443           : neg.w  D3
        1fa80 | 3803           : move.w D3,D4
        1fa82 | d869 0008      : add.w  ($8,A1),D4
        1fa86 | 3344 0008      : move.w D4,($8,A1)
        1fa8a | 4e75           : rts
        -->
    </script>
    <script state="change">
        <action>maincpu.mb@1fa59 = param</action>
        <action>maincpu.mb@1fa77 = param</action>
    </script>
    <script state="off">
        <action>maincpu.mq@0c518 = d469000633420006</action>
        <action>maincpu.mq@0c562 = d869000833440008</action>
        <action>maincpu.mq@1fa50 = ffffffffffffffff</action>
        <action>maincpu.mq@1fa58 = ffffffffffffffff</action>
        <action>maincpu.mq@1fa60 = ffffffffffffffff</action>
        <action>maincpu.mq@1fa68 = ffffffffffffffff</action>
        <action>maincpu.mq@1fa70 = ffffffffffffffff</action>
        <action>maincpu.mq@1fa78 = ffffffffffffffff</action>
        <action>maincpu.mq@1fa80 = ffffffffffffffff</action>
        <action>maincpu.mq@1fa88 = ffffffffffffffff</action>
    </script>
</cheat>

<cheat desc="fast bomb">
    <script state="on">
        <action>maincpu.mb@0bab5 =               02</action>
        <action>maincpu.mq@0bac8 = 4eb90001fa403568</action>
        <action>maincpu.mq@1fa40 = 363c0050d6680006</action>
        <action>maincpu.mq@1fa48 = 354300064e75ffff</action>
        <!--
        1fa40 | 363c 0050 : move.w #$50,D3
        1fa44 | d668 0006 : add.w  ($6,A0),D3
        1fa48 | 3543 0006 : move.w D3,($6,A2)
        1fa4c | 4e75      : rts
        -->
    </script>
    <script state="off">
        <action>maincpu.mb@0bab5 =             0x0b</action>
        <action>maincpu.mq@0bac8 = 3568000600063568</action>
        <action>maincpu.mq@1fa40 = ffffffffffffffff</action>
        <action>maincpu.mq@1fa48 = ffffffffffffffff</action>
    </script>
</cheat>

<cheat desc="fast power charge">
    <script state="on">
        <action>maincpu.mb@b1c7 = 01</action>
        <action>maincpu.mb@bbf1 = 01</action>
    </script>
    <script state="off">
        <action>maincpu.mb@b1c7 = 78</action>
        <action>maincpu.mb@bbf1 = 78</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@0089e =         0001fa90</action>
        <action>maincpu.mq@1fa90 = 41ed01003401122d</action>
        <action>maincpu.mq@1fa98 = 0710b40167f60c01</action>
        <action>maincpu.mq@1faa0 = 00fb660253100c01</action>
        <action>maincpu.mq@1faa8 = 00f7660252100c01</action>
        <action>maincpu.mq@1fab0 = 00fd660404100010</action>
        <action>maincpu.mq@1fab8 = 0c0100fe66040610</action>
        <action>maincpu.mq@1fac0 = 00100c0100ef6604</action>
        <action>maincpu.mq@1fac8 = 101060080c0100df</action>
        <action>maincpu.mq@1fad0 = 660842001b403088</action>
        <action>maincpu.mq@1fad8 = 60baffffffffffff</action>
        <!--
        1fa90 | 41ed 0100 : lea    ($100,A5),A0  // sound code address
        1fa94 | 3401      : move.w D1,D2
        1fa96 | 122d 0710 : move.b ($710,A5),D1  // read input
        1fa9a | b401      : cmp.b  D1,D2
        1fa9c | 67f6      : beq    $1fa94
        1fa9e | 0c01 00fb : cmpi.b #-$5,D1
        1faa2 | 6602      : bne    $1faa6
        1faa4 | 5310      : subq.b #1,(A0)       // decrease code -01
        1faa6 | 0c01 00f7 : cmpi.b #-$9,D1
        1faaa | 6602      : bne    $1faae
        1faac | 5210      : addq.b #1,(A0)       // increase code +01
        1faae | 0c01 00fd : cmpi.b #-$3,D1
        1fab2 | 6604      : bne    $1fab8
        1fab4 | 0410 0010 : subi.b #$10,(A0)     // decrease code -10
        1fab8 | 0c01 00fe : cmpi.b #-$2,D1
        1fabc | 6604      : bne    $1fac2
        1fabe | 0610 0010 : addi.b #$10,(A0)     // increase code +10
        1fac2 | 0c01 00ef : cmpi.b #-$11,D1
        1fac6 | 6604      : bne    $1facc
        1fac8 | 1010      : move.b (A0),D0       // play sound
        1faca | 6008      : bra    $1fad4
        1facc | 0c01 00df : cmpi.b #-$21,D1
        1fad0 | 6608      : bne    $1fada
        1fad2 | 4200      : clr.b  D0            // stop sound
        1fad4 | 1b40 3088 : move.b D0,($3088,A5) // send sound code
        1fad8 | 60ba      : bra    $1fa94
        -->
    </script>
    <script state="run">
        <output format="----- master of weapon 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@200100</argument>
        </output>
    </script>
    <script state="off">
        <action>maincpu.md@0089e =         000069f2</action>
        <action>maincpu.mq@1fa90 = ffffffffffffffff</action>
        <action>maincpu.mq@1fa98 = ffffffffffffffff</action>
        <action>maincpu.mq@1faa0 = ffffffffffffffff</action>
        <action>maincpu.mq@1faa8 = ffffffffffffffff</action>
        <action>maincpu.mq@1fab0 = ffffffffffffffff</action>
        <action>maincpu.mq@1fab8 = ffffffffffffffff</action>
        <action>maincpu.mq@1fac0 = ffffffffffffffff</action>
        <action>maincpu.mq@1fac8 = ffffffffffffffff</action>
        <action>maincpu.mq@1fad0 = ffffffffffffffff</action>
        <action>maincpu.mq@1fad8 = ffffffffffffffff</action>
    </script>
</cheat>
jman
Posts: 843
Joined: Tue Dec 01, 2020 1:24 pm

[yukiwo] Master of Weapon/Yukiwo

Post by jman »

yukiwo is clone of masterw but the newest database based on 0.245 doesn't have any cheat.
Image
Basic RAM cheats will be the same as masterw except the following.
  • yukiwo doesn't have "shot power-up".
  • yukiwo has Buster and Tomahawk weapons.
  • default and maximum speed is different.

Code: Select all

<cheat desc="no hit">
    <script state="on">
        <action>maincpu.mq@07460 = 4eb900018c206500</action>
        <action>maincpu.mq@18c20 = b1fc002010806608</action>
        <action>maincpu.mq@18c28 = 0c2c00f100106506</action>
        <action>maincpu.mq@18c30 = dc6b0006bc434e75</action>
        <!--
        18c20 | b1fc 0020 1080 : cmpa.l #$201080,A0   // check player or player bullet
        18c26 | 6608           : bne    $18c30
        18c28 | 0c2e 00f3 0010 : cmpi.b #-$d,($10,A4) // check item or enemy
        18c2e | 6506           : bcs    $18c36
        18c30 | dc6b 0006      : add.w  ($6,A3),D6
        18c34 | bc43           : cmp.w  D3,D6
        18c36 | 4e75           : rts
        -->
    </script>
    <script state="off">
        <action>maincpu.mq@07460 = dc6b0006bc436500</action>
        <action>maincpu.mq@18c20 = ffffffffffffffff</action>
        <action>maincpu.mq@18c28 = ffffffffffffffff</action>
        <action>maincpu.mq@18c30 = ffffffffffffffff</action>
    </script>
</cheat>

<cheat desc="auto fire">
    <script state="on">
        <action>maincpu.mb@170d = 01</action> <!-- shot -->
        <action>maincpu.mb@17c5 = 01</action> <!-- bomb -->
    </script>
    <script state="off">
        <action>maincpu.mb@170d = 0a</action>
        <action>maincpu.mb@17c5 = 06</action>
    </script>
</cheat>

<cheat desc="player speed">
    <parameter>
        <item value="0x0001">01 (slow)</item>
        <item value="0x0002">02       </item>
        <item value="0x0004">03       </item>
        <item value="0x0006">04       </item>
        <item value="0x0008">05 (fast)</item>
    </parameter>
    <script state="on">
        <action>maincpu.mq@0213c = 4eb900018c404e71</action> <!-- y position -->
        <action>maincpu.mq@02182 = 4eb900018c664e71</action> <!-- x position -->
        <action>maincpu.mq@18c40 = b3fc002010806614</action>
        <action>maincpu.mq@18c48 = 08110004660e3a3c</action>
        <action>maincpu.mq@18c50 = 00004a4267066a02</action>
        <action>maincpu.mq@18c58 = 44453405d4690006</action>
        <action>maincpu.mq@18c60 = 334200064e75b3fc</action>
        <action>maincpu.mq@18c68 = 0020108066140811</action>
        <action>maincpu.mq@18c70 = 0004660e3a3c0000</action>
        <action>maincpu.mq@18c78 = 4a4467066a024445</action>
        <action>maincpu.mq@18c80 = 3805d86900083344</action>
        <action>maincpu.mq@18c88 = 00084e75ffffffff</action>
        <!--
        18c40 | b3fc 0020 1080 : cmpa.l #$201080,A1 // check player or others
        18c46 | 6614           : bne    $18c5c
        18c48 | 0811 0004      : btst   #$4,(A1)    // check auto-moving flag
        18c4c | 660e           : bne    $18c5c
        18c4e | 3a3c xxxx      : move.w #$xxxx,D5
        18c52 | 4a42           : tst.w  D2
        18c54 | 6706           : beq    $18c5c
        18c56 | 6a02           : bpl    $18c5a
        18c58 | 4445           : neg.w  D5
        18c5a | 3405           : move.w D5,D2
        18c5c | d469 0006      : add.w  ($6,A1),D2
        18c60 | 3342 0006      : move.w D2,($6,A1)
        18c64 | 4e75           : rts
        18c66 | b3fc 0020 1080 : cmpa.l #$201080,A1 // check player or others
        18c6c | 6614           : bne    $18c82
        18c6e | 0811 0004      : btst   #$4,(A1)    // check auto-moving flag
        18c72 | 660e           : bne    $18c82
        18c74 | 3a3c xxxx      : move.w #$xxxx,D5
        18c78 | 4a44           : tst.w  D4
        18c7a | 6706           : beq    $18c82
        18c7c | 6a02           : bpl    $18c80
        18c7e | 4445           : neg.w  D5
        18c80 | 3805           : move.w D5,D4
        18c82 | d869 0008      : add.w  ($8,A1),D4
        18c86 | 3344 0008      : move.w D4,($8,A1)
        18c8a | 4e75           : rts
        -->
    </script>
    <script state="change">
        <action>maincpu.mw@18c50 = param</action>
        <action>maincpu.mw@18c76 = param</action>
    </script>
    <script state="off">
        <action>maincpu.mq@0213c = d469000633420006</action>
        <action>maincpu.mq@02182 = d869000833440008</action>
        <action>maincpu.mq@18c40 = ffffffffffffffff</action>
        <action>maincpu.mq@18c48 = ffffffffffffffff</action>
        <action>maincpu.mq@18c50 = ffffffffffffffff</action>
        <action>maincpu.mq@18c58 = ffffffffffffffff</action>
        <action>maincpu.mq@18c60 = ffffffffffffffff</action>
        <action>maincpu.mq@18c68 = ffffffffffffffff</action>
        <action>maincpu.mq@18c70 = ffffffffffffffff</action>
        <action>maincpu.mq@18c78 = ffffffffffffffff</action>
        <action>maincpu.mq@18c80 = ffffffffffffffff</action>
        <action>maincpu.mq@18c88 = ffffffffffffffff</action>
    </script>
</cheat>

<cheat desc="fast bomb">
    <script state="on">
        <action>maincpu.mb@0181f =               02</action>
        <action>maincpu.mq@01832 = 4eb900018c903568</action>
        <action>maincpu.mq@18c90 = 356800060006066a</action>
        <action>maincpu.mq@18c98 = 004800064e75ffff</action>
        <!--
        18c90 | 3568 0006 0006 : move.w ($6,A0),($6,A2)
        18c96 | 066a 0048 0006 : addi.w #$48,($6,A2)
        18c9c | 4e75           : rts
        -->
    </script>
    <script state="off">
        <action>maincpu.mb@0181f =             0x0b</action>
        <action>maincpu.mq@01832 = 3568000600063568</action>
        <action>maincpu.mq@18c90 = ffffffffffffffff</action>
        <action>maincpu.mq@18c98 = ffffffffffffffff</action>
    </script>
</cheat>

<cheat desc="fast power charge">
    <script state="on">
        <action>maincpu.mb@0bfd = 01</action>
        <action>maincpu.mb@12f3 = 01</action>
        <action>maincpu.mb@1335 = 01</action>
        <action>maincpu.mb@1945 = 01</action>
        <action>maincpu.mb@7fa5 = 01</action>
    </script>
    <script state="off">
        <action>maincpu.mb@0bfd = 78</action>
        <action>maincpu.mb@12f3 = 78</action>
        <action>maincpu.mb@1335 = 78</action>
        <action>maincpu.mb@1945 = 78</action>
        <action>maincpu.mb@7fa5 = 78</action>
    </script>
</cheat>

<cheat desc="short hit mark">
    <script state="on">
        <action>maincpu.mb@8dee = ff</action> <!-- shot -->
        <action>maincpu.mb@8e92 = ff</action> <!-- bomb -->
    </script>
    <script state="off">
        <action>maincpu.mb@8dee = 02</action>
        <action>maincpu.mb@8e92 = 02</action>
    </script>
</cheat>

<cheat desc="shot breaks ground enemy">
    <script state="on">
        <action>maincpu.mb@7213 = 02</action>
    </script>
    <script state="off">
        <action>maincpu.mb@7213 = 32</action>
    </script>
</cheat>

<cheat desc="round select mode">
    <comment>reset the game (F3) to enter round select mode</comment>
    <script state="on">
        <action>maincpu.mw@9958 = 4e71</action>
    </script>
    <script state="off">
        <action>maincpu.mw@9958 = 6710</action>
    </script>
</cheat>

<cheat desc="region">
    <parameter>
        <item value="0x01">japan</item>
        <item value="0x02">usa  </item>
        <item value="0x03">world</item>
        <item value="0x04">other</item>
    </parameter>
    <script state="change">
        <action>maincpu.mb@3ffff = param</action>
    </script>
    <script state="off">
        <action>maincpu.mb@3ffff = 03</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@09cc0 =         00018ca0</action>
        <action>maincpu.mq@18ca0 = 41ed010043ed3088</action>
        <action>maincpu.mq@18ca8 = 3200102d0710b200</action>
        <action>maincpu.mq@18cb0 = 67f60c0000fb6602</action>
        <action>maincpu.mq@18cb8 = 53100c0000f76602</action>
        <action>maincpu.mq@18cc0 = 52100c0000fd6604</action>
        <action>maincpu.mq@18cc8 = 041000100c0000fe</action>
        <action>maincpu.mq@18cd0 = 6604061000100c00</action>
        <action>maincpu.mq@18cd8 = 00ef660212900c00</action>
        <action>maincpu.mq@18ce0 = 00df6602421160c0</action>
        <!--
        18ca0 | 41ed 0100 : lea    ($100,A5),A0  // $200100 : sound code address
        18ca4 | 43ed 3088 : lea    ($3088,A5),A1 // $203088 : sound latch address
        18ca8 | 3200      : move.w D0,D1
        18caa | 102d 0710 : move.b ($710,A5),D0  // $200710 : read input
        18cae | b200      : cmp.b  D0,D1
        18cb0 | 67f6      : beq    $18ca8
        18cb2 | 0c00 00fb : cmpi.b #-$5,D0
        18cb6 | 6602      : bne    $18cba
        18cb8 | 5310      : subq.b #1,(A0)       // decrease code -01
        18cba | 0c00 00f7 : cmpi.b #-$9,D0
        18cbe | 6602      : bne    $18cc2
        18cc0 | 5210      : addq.b #1,(A0)       // increase code +01
        18cc2 | 0c00 00fd : cmpi.b #-$3,D0
        18cc6 | 6604      : bne    $18ccc
        18cc8 | 0410 0010 : subi.b #$10,(A0)     // decrease code -10
        18ccc | 0c00 00fe : cmpi.b #-$2,D0
        18cd0 | 6604      : bne    $18cd6
        18cd2 | 0610 0010 : addi.b #$10,(A0)     // increase code +10
        18cd6 | 0c00 00ef : cmpi.b #-$11,D0
        18cda | 6602      : bne    $18cde
        18cdc | 1290      : move.b (A0),(A1)     // play sound
        18cde | 0c00 00df : cmpi.b #-$21,D0
        18ce2 | 6602      : bne    $18ce6
        18ce4 | 4211      : clr.b  (A1)          // stop sound
        18ce6 | 60c0      : bra    $18ca8
        -->
    </script>
    <script state="run">
        <output format="----- yukiwo 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@200100</argument>
        </output>
    </script>
    <script state="off">
        <action>maincpu.md@09cc0 =         0000e230</action>
        <action>maincpu.mq@18ca0 = ffffffffffffffff</action>
        <action>maincpu.mq@18ca8 = ffffffffffffffff</action>
        <action>maincpu.mq@18cb0 = ffffffffffffffff</action>
        <action>maincpu.mq@18cb8 = ffffffffffffffff</action>
        <action>maincpu.mq@18cc0 = ffffffffffffffff</action>
        <action>maincpu.mq@18cc8 = ffffffffffffffff</action>
        <action>maincpu.mq@18cd0 = ffffffffffffffff</action>
        <action>maincpu.mq@18cd8 = ffffffffffffffff</action>
        <action>maincpu.mq@18ce0 = ffffffffffffffff</action>
    </script>
</cheat>
"shot breaks ground enemy" is unique. You can destroy an enemy on ground by shot instead of bomb.
jman
Posts: 843
Joined: Tue Dec 01, 2020 1:24 pm

Re: [yukiwo] Master of Weapon/Yukiwo

Post by jman »

Converted basic RAM cheats are the following.

Code: Select all

<cheat desc="Infinite Credits">
  <script state="run">
    <action>maincpu.pb@200708=09</action>
  </script>
</cheat>

<cheat desc="Invincibility">
  <script state="run">
    <action>maincpu.pb@20109D=00</action>
    <action>maincpu.pb@20348D=02</action>
  </script>
</cheat>

<cheat desc="Always Maximum Weapon Energy">
  <script state="run">
    <action>maincpu.pb@201095=04</action>
  </script>
</cheat>

<cheat desc="Rapid Fire - Antiair">
  <script state="run">
    <action>maincpu.pb@203453=01</action>
  </script>
</cheat>

<cheat desc="Rapid Fire - Antisurface">
  <script state="run">
    <action>maincpu.pb@203455=01</action>
  </script>
</cheat>

<cheat desc="Select Weapon">
  <parameter>
    <item value="0x01">Buster</item>
    <item value="0x02">Tomahawk</item>
    <item value="0x03">Piercing</item>
    <item value="0x04">Wide</item>
    <item value="0x05">Guide</item>
    <item value="0x06">Laser</item>
    <item value="0x07">H. Bomb</item>
  </parameter>
  <script state="run">
    <action>maincpu.pb@201094=param</action>
  </script>
</cheat>

<cheat desc="Select Speed">
  <parameter min="0x04" max="0x3C" step="0x04" />
  <script state="run">
    <action>maincpu.pb@201090=param</action>
  </script>
</cheat>

<cheat desc=" "/>

<cheat desc="P1 Infinite Lives">
  <script state="run">
    <action>maincpu.pb@200753=03</action>
  </script>
</cheat>

<cheat desc="P2 Infinite Lives">
  <script state="run">
    <action>maincpu.pb@200755=03</action>
  </script>
</cheat>
  • "invincibility" always has flicker and it is not "no hit".
  • yukiwo doesn't have "shot power-up".
  • Default speed is 0x0c (vs 0x14 in masterw) and maximum is 0x18 (vs 0x20 in masterw).
jman
Posts: 843
Joined: Tue Dec 01, 2020 1:24 pm

[masterw]+ Master of Weapon

Post by jman »

masterw.xml

Code: Select all

<!-- Master of Weapon (World) -->
<mamecheat version="1">

    <cheat desc="no hit">
        <script state="on">
            <!-- enemy -->
            <action>maincpu.mq@158EA = 4EB90001FA206500</action>
            <action>maincpu.mq@1FA20 = B1FC002010806608</action>
            <action>maincpu.mq@1FA28 = 0C2E00F300106506</action>
            <action>maincpu.mq@1FA30 = DC6B0006BC434E75</action>
            <!--
            1FA20 | B1FC 0020 1080 : cmpa.l  #$201080, A0   // check player or others
            1FA26 | 6608           : bne     $1fa30
            1FA28 | 0C2E 00F3 0010 : cmpi.b  #-$d, ($10,A6) // check item or others
            1FA2E | 6506           : bcs     $1fa36
            1FA30 | DC6B 0006      : add.w   ($6,A3), D6
            1FA34 | BC43           : cmp.w   D3, D6
            1FA36 | 4E75           : rts
            -->
            <action>maincpu.mb@15A0C = 60</action> <!-- bullet -->
        </script>
        <script state="off">
            <action>maincpu.mq@158EA = DC6B0006BC436500</action>
            <action>maincpu.mq@1FA20 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@1FA28 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@1FA30 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mb@15A0C = 65              </action>
        </script>
    </cheat>

    <cheat desc="auto fire">
        <script state="on">
            <action>maincpu.mb@B8DF = 01</action> <!-- shot -->
            <action>maincpu.mb@B8EB = 01</action> <!-- shot -->
            <action>maincpu.mb@BA4B = 01</action> <!-- bomb -->
            <action>maincpu.mb@BA57 = 01</action> <!-- bomb -->
        </script>
        <script state="off">
            <action>maincpu.mb@B8DF = 18</action>
            <action>maincpu.mb@B8EB = 08</action>
            <action>maincpu.mb@BA4B = 08</action>
            <action>maincpu.mb@BA57 = 0C</action>
        </script>
    </cheat>

    <cheat desc="player speed">
        <parameter>
            <item value="0x0001">01 (slow)</item>
            <item value="0x0002">02       </item>
            <item value="0x0004">03       </item>
            <item value="0x0006">04       </item>
            <item value="0x0008">05 (fast)</item>
        </parameter>
        <script state="on">
            <action>maincpu.mq@0C518 = 4EB90001FA404E71</action> <!-- y position -->
            <action>maincpu.mq@0C562 = 4EB90001FA664E71</action> <!-- x position -->
            <action>maincpu.mq@1FA40 = B3FC002010806614</action>
            <action>maincpu.mq@1FA48 = 08110004660E3A3C</action>
            <action>maincpu.mq@1FA50 = 00004A4267066A02</action>
            <action>maincpu.mq@1FA58 = 44453405D4690006</action>
            <action>maincpu.mq@1FA60 = 334200064E75B3FC</action>
            <action>maincpu.mq@1FA68 = 0020108066140811</action>
            <action>maincpu.mq@1FA70 = 0004660E3A3C0000</action>
            <action>maincpu.mq@1FA78 = 4A4467066A024445</action>
            <action>maincpu.mq@1FA80 = 3805D86900083344</action>
            <action>maincpu.mq@1FA88 = 00084E75FFFFFFFF</action>
            <!--
            1FA40 | B3FC 0020 1080 : cmpa.l  #$201080, A1 // check player or others
            1FA46 | 6614           : bne     $1fa5c
            1FA48 | 0811 0004      : btst    #$4, (A1)    // check auto move flag
            1FA4C | 660E           : bne     $1fa5c
            1FA4E | 3A3C xxxx      : move.w  #$xx, D5
            1FA52 | 4A42           : tst.w   D2
            1FA54 | 6706           : beq     $1fa5c
            1FA56 | 6A02           : bpl     $1fa5a
            1FA58 | 4445           : neg.w   D5
            1FA5A | 3405           : move.w  D5, D2
            1FA5C | D469 0006      : add.w   ($6,A1), D2
            1FA60 | 3342 0006      : move.w  D2, ($6,A1)
            1FA64 | 4E75           : rts
            1FA66 | B3FC 0020 1080 : cmpa.l  #$201080, A1 // check player or others
            1FA6C | 6614           : bne     $1fa82
            1FA6E | 0811 0004      : btst    #$4, (A1)    // check auto move flag
            1FA72 | 660E           : bne     $1fa82
            1FA74 | 3A3C xxxx      : move.w  #$xx, D5
            1FA78 | 4A44           : tst.w   D4
            1FA7A | 6706           : beq     $1fa82
            1FA7C | 6A02           : bpl     $1fa80
            1FA7E | 4445           : neg.w   D5
            1FA80 | 3805           : move.w  D5, D4
            1FA82 | D869 0008      : add.w   ($8,A1), D4
            1FA86 | 3344 0008      : move.w  D4, ($8,A1)
            1FA8A | 4E75           : rts
            -->
        </script>
        <script state="change">
            <action>maincpu.mw@1FA50 = param</action>
            <action>maincpu.mw@1FA76 = param</action>
        </script>
        <script state="off">
            <action>maincpu.mq@0C518 = D469000633420006</action>
            <action>maincpu.mq@0C562 = D869000833440008</action>
            <action>maincpu.mq@1FA40 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@1FA48 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@1FA50 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@1FA58 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@1FA60 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@1FA68 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@1FA70 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@1FA78 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@1FA80 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@1FA88 = FFFFFFFFFFFFFFFF</action>
        </script>
    </cheat>

    <cheat desc="fast bomb">
        <script state="on">
            <action>maincpu.mb@0BAB5 = 02              </action>
            <action>maincpu.mq@0BAC8 = 4EB90001FA903568</action>
            <action>maincpu.mq@1FA90 = 356800060006066A</action>
            <action>maincpu.mq@1FA98 = 004800064E75FFFF</action>
            <!--
            1FA90 | 3568 0006 0006 : move.w  ($6,A0), ($6,A2)
            1FA96 | 066A 0048 0006 : addi.w  #$48, ($6,A2)
            1FA9C | 4E75           : rts
            -->
        </script>
        <script state="off">
            <action>maincpu.mb@0BAB5 =  B              </action>
            <action>maincpu.mq@0BAC8 = 3568000600063568</action>
            <action>maincpu.mq@1FA90 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@1FA98 = FFFFFFFFFFFFFFFF</action>
        </script>
    </cheat>

    <cheat desc="fast power charge">
        <script state="on">
            <action>maincpu.mb@0A8F3 = 01</action>
            <action>maincpu.mb@0B1C7 = 01</action>
            <action>maincpu.mb@0B2D7 = 01</action>
            <action>maincpu.mb@0BBF1 = 01</action>
            <action>maincpu.mb@13B73 = 01</action>
        </script>
        <script state="off">
            <action>maincpu.mb@0A8F3 = 78</action>
            <action>maincpu.mb@0B1C7 = 78</action>
            <action>maincpu.mb@0B2D7 = 78</action>
            <action>maincpu.mb@0BBF1 = 78</action>
            <action>maincpu.mb@13B73 = 78</action>
        </script>
    </cheat>

    <cheat desc="short hit mark">
        <script state="on">
            <action>maincpu.mb@14A28 = FF</action> <!-- shot -->
            <action>maincpu.mb@14AD4 = FF</action> <!-- bomb -->
        </script>
        <script state="off">
            <action>maincpu.mb@14A28 = 02</action>
            <action>maincpu.mb@14AD4 = 02</action>
        </script>
    </cheat>

    <cheat desc="shot breaks ground enemy">
        <script state="on">
            <action>maincpu.mb@156C9 = 12</action>
        </script>
        <script state="off">
            <action>maincpu.mb@156C9 = 40</action>
        </script>
    </cheat>

    <cheat desc="round select mode">
        <comment>reset the game (F3) to enter round select mode</comment>
        <script state="on">
            <action>maincpu.mw@04F2 = 4E71</action>
        </script>
        <script state="off">
            <action>maincpu.mw@04F2 = 6712</action>
        </script>
    </cheat>

    <cheat desc="region">
        <parameter>
            <item value="0x01">japan</item>
            <item value="0x02">usa  </item>
            <item value="0x03">world</item>
            <item value="0x04">other</item>
        </parameter>
        <script state="change">
            <action>maincpu.mb@3FFFF = param</action>
        </script>
        <script state="off">
            <action>maincpu.mb@3FFFF = 03</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@0089E = 0001FAA0        </action>
            <action>maincpu.mq@1FAA0 = 41ED010043ED3088</action>
            <action>maincpu.mq@1FAA8 = 3200102D0710B200</action>
            <action>maincpu.mq@1FAB0 = 67F60C0000FB6602</action>
            <action>maincpu.mq@1FAB8 = 53100C0000F76602</action>
            <action>maincpu.mq@1FAC0 = 52100C0000FD6604</action>
            <action>maincpu.mq@1FAC8 = 041000100C0000FE</action>
            <action>maincpu.mq@1FAD0 = 6604061000100C00</action>
            <action>maincpu.mq@1FAD8 = 00EF660212900C00</action>
            <action>maincpu.mq@1FAE0 = 00DF6602421160C0</action>
            <!--
            1FAA0 | 41ED 0100 : lea     ($100,A5), A0  // sound code address ($200100)
            1FAA4 | 43ED 3088 : lea     ($3088,A5), A1 // sound latch address ($203088)
            1FAA8 | 3200      : move.w  D0, D1
            1FAAA | 102D 0710 : move.b  ($710,A5), D0  // read input ($200710)
            1FAAE | B200      : cmp.b   D0, D1
            1FAB0 | 67F6      : beq     $1faa8
            1FAB2 | 0C00 00FB : cmpi.b  #-$5, D0
            1FAB6 | 6602      : bne     $1faba
            1FAB8 | 5310      : subq.b  #1, (A0)       // decrease code -01
            1FABA | 0C00 00F7 : cmpi.b  #-$9, D0
            1FABE | 6602      : bne     $1fac2
            1FAC0 | 5210      : addq.b  #1, (A0)       // increase code +01
            1FAC2 | 0C00 00FD : cmpi.b  #-$3, D0
            1FAC6 | 6604      : bne     $1facc
            1FAC8 | 0410 0010 : subi.b  #$10, (A0)     // decrease code -10
            1FACC | 0C00 00FE : cmpi.b  #-$2, D0
            1FAD0 | 6604      : bne     $1fad6
            1FAD2 | 0610 0010 : addi.b  #$10, (A0)     // increase code +10
            1FAD6 | 0C00 00EF : cmpi.b  #-$11, D0
            1FADA | 6602      : bne     $1fade
            1FADC | 1290      : move.b  (A0), (A1)     // play sound
            1FADE | 0C00 00DF : cmpi.b  #-$21, D0
            1FAE2 | 6602      : bne     $1fae6
            1FAE4 | 4211      : clr.b   (A1)           // stop sound
            1FAE6 | 60C0      : bra     $1faa8
            -->
        </script>
        <script state="run">
            <output format="----- master of weapon 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@200100</argument>
            </output>
        </script>
        <script state="off">
            <action>maincpu.md@0089E = 000069F2        </action>
            <action>maincpu.mq@1FAA0 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@1FAA8 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@1FAB0 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@1FAB8 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@1FAC0 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@1FAC8 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@1FAD0 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@1FAD8 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@1FAE0 = FFFFFFFFFFFFFFFF</action>
        </script>
    </cheat>

</mamecheat>
masterwu.xml

Code: Select all

<!-- Master of Weapon (US) -->
<mamecheat version="1">

    <cheat desc="no hit">
        <script state="on">
            <!-- enemy -->
            <action>maincpu.mq@158EA = 4EB90001FA206500</action>
            <action>maincpu.mq@1FA20 = B1FC002010806608</action>
            <action>maincpu.mq@1FA28 = 0C2E00F300106506</action>
            <action>maincpu.mq@1FA30 = DC6B0006BC434E75</action>
            <!--
            1FA20 | B1FC 0020 1080 : cmpa.l  #$201080, A0   // check player or others
            1FA26 | 6608           : bne     $1fa30
            1FA28 | 0C2E 00F3 0010 : cmpi.b  #-$d, ($10,A6) // check item or others
            1FA2E | 6506           : bcs     $1fa36
            1FA30 | DC6B 0006      : add.w   ($6,A3), D6
            1FA34 | BC43           : cmp.w   D3, D6
            1FA36 | 4E75           : rts
            -->
            <action>maincpu.mb@15A0C = 60</action> <!-- bullet -->
        </script>
        <script state="off">
            <action>maincpu.mq@158EA = DC6B0006BC436500</action>
            <action>maincpu.mq@1FA20 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@1FA28 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@1FA30 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mb@15A0C = 65              </action>
        </script>
    </cheat>

    <cheat desc="auto fire">
        <script state="on">
            <action>maincpu.mb@B8DF = 01</action> <!-- shot -->
            <action>maincpu.mb@B8EB = 01</action> <!-- shot -->
            <action>maincpu.mb@BA4B = 01</action> <!-- bomb -->
            <action>maincpu.mb@BA57 = 01</action> <!-- bomb -->
        </script>
        <script state="off">
            <action>maincpu.mb@B8DF = 18</action>
            <action>maincpu.mb@B8EB = 08</action>
            <action>maincpu.mb@BA4B = 08</action>
            <action>maincpu.mb@BA57 = 0C</action>
        </script>
    </cheat>

    <cheat desc="player speed">
        <parameter>
            <item value="0x0001">01 (slow)</item>
            <item value="0x0002">02       </item>
            <item value="0x0004">03       </item>
            <item value="0x0006">04       </item>
            <item value="0x0008">05 (fast)</item>
        </parameter>
        <script state="on">
            <action>maincpu.mq@0C518 = 4EB90001FA404E71</action> <!-- y position -->
            <action>maincpu.mq@0C562 = 4EB90001FA664E71</action> <!-- x position -->
            <action>maincpu.mq@1FA40 = B3FC002010806614</action>
            <action>maincpu.mq@1FA48 = 08110004660E3A3C</action>
            <action>maincpu.mq@1FA50 = 00004A4267066A02</action>
            <action>maincpu.mq@1FA58 = 44453405D4690006</action>
            <action>maincpu.mq@1FA60 = 334200064E75B3FC</action>
            <action>maincpu.mq@1FA68 = 0020108066140811</action>
            <action>maincpu.mq@1FA70 = 0004660E3A3C0000</action>
            <action>maincpu.mq@1FA78 = 4A4467066A024445</action>
            <action>maincpu.mq@1FA80 = 3805D86900083344</action>
            <action>maincpu.mq@1FA88 = 00084E75FFFFFFFF</action>
            <!--
            1FA40 | B3FC 0020 1080 : cmpa.l  #$201080, A1 // check player or others
            1FA46 | 6614           : bne     $1fa5c
            1FA48 | 0811 0004      : btst    #$4, (A1)    // check auto move flag
            1FA4C | 660E           : bne     $1fa5c
            1FA4E | 3A3C xxxx      : move.w  #$xx, D5
            1FA52 | 4A42           : tst.w   D2
            1FA54 | 6706           : beq     $1fa5c
            1FA56 | 6A02           : bpl     $1fa5a
            1FA58 | 4445           : neg.w   D5
            1FA5A | 3405           : move.w  D5, D2
            1FA5C | D469 0006      : add.w   ($6,A1), D2
            1FA60 | 3342 0006      : move.w  D2, ($6,A1)
            1FA64 | 4E75           : rts
            1FA66 | B3FC 0020 1080 : cmpa.l  #$201080, A1 // check player or others
            1FA6C | 6614           : bne     $1fa82
            1FA6E | 0811 0004      : btst    #$4, (A1)    // check auto move flag
            1FA72 | 660E           : bne     $1fa82
            1FA74 | 3A3C xxxx      : move.w  #$xx, D5
            1FA78 | 4A44           : tst.w   D4
            1FA7A | 6706           : beq     $1fa82
            1FA7C | 6A02           : bpl     $1fa80
            1FA7E | 4445           : neg.w   D5
            1FA80 | 3805           : move.w  D5, D4
            1FA82 | D869 0008      : add.w   ($8,A1), D4
            1FA86 | 3344 0008      : move.w  D4, ($8,A1)
            1FA8A | 4E75           : rts
            -->
        </script>
        <script state="change">
            <action>maincpu.mw@1FA50 = param</action>
            <action>maincpu.mw@1FA76 = param</action>
        </script>
        <script state="off">
            <action>maincpu.mq@0C518 = D469000633420006</action>
            <action>maincpu.mq@0C562 = D869000833440008</action>
            <action>maincpu.mq@1FA40 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@1FA48 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@1FA50 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@1FA58 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@1FA60 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@1FA68 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@1FA70 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@1FA78 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@1FA80 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@1FA88 = FFFFFFFFFFFFFFFF</action>
        </script>
    </cheat>

    <cheat desc="fast bomb">
        <script state="on">
            <action>maincpu.mb@0BAB5 = 02              </action>
            <action>maincpu.mq@0BAC8 = 4EB90001FA903568</action>
            <action>maincpu.mq@1FA90 = 356800060006066A</action>
            <action>maincpu.mq@1FA98 = 004800064E75FFFF</action>
            <!--
            1FA90 | 3568 0006 0006 : move.w  ($6,A0), ($6,A2)
            1FA96 | 066A 0048 0006 : addi.w  #$48, ($6,A2)
            1FA9C | 4E75           : rts
            -->
        </script>
        <script state="off">
            <action>maincpu.mb@0BAB5 =  B              </action>
            <action>maincpu.mq@0BAC8 = 3568000600063568</action>
            <action>maincpu.mq@1FA90 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@1FA98 = FFFFFFFFFFFFFFFF</action>
        </script>
    </cheat>

    <cheat desc="fast power charge">
        <script state="on">
            <action>maincpu.mb@0A8F3 = 01</action>
            <action>maincpu.mb@0B1C7 = 01</action>
            <action>maincpu.mb@0B2D7 = 01</action>
            <action>maincpu.mb@0BBF1 = 01</action>
            <action>maincpu.mb@13B73 = 01</action>
        </script>
        <script state="off">
            <action>maincpu.mb@0A8F3 = 78</action>
            <action>maincpu.mb@0B1C7 = 78</action>
            <action>maincpu.mb@0B2D7 = 78</action>
            <action>maincpu.mb@0BBF1 = 78</action>
            <action>maincpu.mb@13B73 = 78</action>
        </script>
    </cheat>

    <cheat desc="short hit mark">
        <script state="on">
            <action>maincpu.mb@14A28 = FF</action> <!-- shot -->
            <action>maincpu.mb@14AD4 = FF</action> <!-- bomb -->
        </script>
        <script state="off">
            <action>maincpu.mb@14A28 = 02</action>
            <action>maincpu.mb@14AD4 = 02</action>
        </script>
    </cheat>

    <cheat desc="shot breaks ground enemy">
        <script state="on">
            <action>maincpu.mb@156C9 = 12</action>
        </script>
        <script state="off">
            <action>maincpu.mb@156C9 = 40</action>
        </script>
    </cheat>

    <cheat desc="round select mode">
        <comment>reset the game (F3) to enter round select mode</comment>
        <script state="on">
            <action>maincpu.mw@04F2 = 4E71</action>
        </script>
        <script state="off">
            <action>maincpu.mw@04F2 = 6712</action>
        </script>
    </cheat>

    <cheat desc="region">
        <parameter>
            <item value="0x01">japan</item>
            <item value="0x02">usa  </item>
            <item value="0x03">world</item>
            <item value="0x04">other</item>
        </parameter>
        <script state="change">
            <action>maincpu.mb@3FFFF = param</action>
        </script>
        <script state="off">
            <action>maincpu.mb@3FFFF = 02</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@0089E = 0001FAA0        </action>
            <action>maincpu.mq@1FAA0 = 41ED010043ED3088</action>
            <action>maincpu.mq@1FAA8 = 3200102D0710B200</action>
            <action>maincpu.mq@1FAB0 = 67F60C0000FB6602</action>
            <action>maincpu.mq@1FAB8 = 53100C0000F76602</action>
            <action>maincpu.mq@1FAC0 = 52100C0000FD6604</action>
            <action>maincpu.mq@1FAC8 = 041000100C0000FE</action>
            <action>maincpu.mq@1FAD0 = 6604061000100C00</action>
            <action>maincpu.mq@1FAD8 = 00EF660212900C00</action>
            <action>maincpu.mq@1FAE0 = 00DF6602421160C0</action>
            <!--
            1FAA0 | 41ED 0100 : lea     ($100,A5), A0  // sound code address ($200100)
            1FAA4 | 43ED 3088 : lea     ($3088,A5), A1 // sound latch address ($203088)
            1FAA8 | 3200      : move.w  D0, D1
            1FAAA | 102D 0710 : move.b  ($710,A5), D0  // read input ($200710)
            1FAAE | B200      : cmp.b   D0, D1
            1FAB0 | 67F6      : beq     $1faa8
            1FAB2 | 0C00 00FB : cmpi.b  #-$5, D0
            1FAB6 | 6602      : bne     $1faba
            1FAB8 | 5310      : subq.b  #1, (A0)       // decrease code -01
            1FABA | 0C00 00F7 : cmpi.b  #-$9, D0
            1FABE | 6602      : bne     $1fac2
            1FAC0 | 5210      : addq.b  #1, (A0)       // increase code +01
            1FAC2 | 0C00 00FD : cmpi.b  #-$3, D0
            1FAC6 | 6604      : bne     $1facc
            1FAC8 | 0410 0010 : subi.b  #$10, (A0)     // decrease code -10
            1FACC | 0C00 00FE : cmpi.b  #-$2, D0
            1FAD0 | 6604      : bne     $1fad6
            1FAD2 | 0610 0010 : addi.b  #$10, (A0)     // increase code +10
            1FAD6 | 0C00 00EF : cmpi.b  #-$11, D0
            1FADA | 6602      : bne     $1fade
            1FADC | 1290      : move.b  (A0), (A1)     // play sound
            1FADE | 0C00 00DF : cmpi.b  #-$21, D0
            1FAE2 | 6602      : bne     $1fae6
            1FAE4 | 4211      : clr.b   (A1)           // stop sound
            1FAE6 | 60C0      : bra     $1faa8
            -->
        </script>
        <script state="run">
            <output format="----- master of weapon 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@200100</argument>
            </output>
        </script>
        <script state="off">
            <action>maincpu.md@0089E = 000069F2        </action>
            <action>maincpu.mq@1FAA0 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@1FAA8 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@1FAB0 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@1FAB8 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@1FAC0 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@1FAC8 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@1FAD0 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@1FAD8 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@1FAE0 = FFFFFFFFFFFFFFFF</action>
        </script>
    </cheat>

</mamecheat>
masterwj.xml

Code: Select all

<!-- Master of Weapon (Japan) -->
<mamecheat version="1">

    <cheat desc="no hit">
        <script state="on">
            <!-- enemy -->
            <action>maincpu.mq@158EA = 4EB90001FA206500</action>
            <action>maincpu.mq@1FA20 = B1FC002010806608</action>
            <action>maincpu.mq@1FA28 = 0C2E00F300106506</action>
            <action>maincpu.mq@1FA30 = DC6B0006BC434E75</action>
            <!--
            1FA20 | B1FC 0020 1080 : cmpa.l  #$201080, A0   // check player or others
            1FA26 | 6608           : bne     $1fa30
            1FA28 | 0C2E 00F3 0010 : cmpi.b  #-$d, ($10,A6) // check item or others
            1FA2E | 6506           : bcs     $1fa36
            1FA30 | DC6B 0006      : add.w   ($6,A3), D6
            1FA34 | BC43           : cmp.w   D3, D6
            1FA36 | 4E75           : rts
            -->
            <action>maincpu.mb@15A0C = 60</action> <!-- bullet -->
        </script>
        <script state="off">
            <action>maincpu.mq@158EA = DC6B0006BC436500</action>
            <action>maincpu.mq@1FA20 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@1FA28 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@1FA30 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mb@15A0C = 65              </action>
        </script>
    </cheat>

    <cheat desc="auto fire">
        <script state="on">
            <action>maincpu.mb@B8DF = 01</action> <!-- shot -->
            <action>maincpu.mb@B8EB = 01</action> <!-- shot -->
            <action>maincpu.mb@BA4B = 01</action> <!-- bomb -->
            <action>maincpu.mb@BA57 = 01</action> <!-- bomb -->
        </script>
        <script state="off">
            <action>maincpu.mb@B8DF = 18</action>
            <action>maincpu.mb@B8EB = 08</action>
            <action>maincpu.mb@BA4B = 08</action>
            <action>maincpu.mb@BA57 = 0C</action>
        </script>
    </cheat>

    <cheat desc="player speed">
        <parameter>
            <item value="0x0001">01 (slow)</item>
            <item value="0x0002">02       </item>
            <item value="0x0004">03       </item>
            <item value="0x0006">04       </item>
            <item value="0x0008">05 (fast)</item>
        </parameter>
        <script state="on">
            <action>maincpu.mq@0C518 = 4EB90001FA404E71</action> <!-- y position -->
            <action>maincpu.mq@0C562 = 4EB90001FA664E71</action> <!-- x position -->
            <action>maincpu.mq@1FA40 = B3FC002010806614</action>
            <action>maincpu.mq@1FA48 = 08110004660E3A3C</action>
            <action>maincpu.mq@1FA50 = 00004A4267066A02</action>
            <action>maincpu.mq@1FA58 = 44453405D4690006</action>
            <action>maincpu.mq@1FA60 = 334200064E75B3FC</action>
            <action>maincpu.mq@1FA68 = 0020108066140811</action>
            <action>maincpu.mq@1FA70 = 0004660E3A3C0000</action>
            <action>maincpu.mq@1FA78 = 4A4467066A024445</action>
            <action>maincpu.mq@1FA80 = 3805D86900083344</action>
            <action>maincpu.mq@1FA88 = 00084E75FFFFFFFF</action>
            <!--
            1FA40 | B3FC 0020 1080 : cmpa.l  #$201080, A1 // check player or others
            1FA46 | 6614           : bne     $1fa5c
            1FA48 | 0811 0004      : btst    #$4, (A1)    // check auto move flag
            1FA4C | 660E           : bne     $1fa5c
            1FA4E | 3A3C xxxx      : move.w  #$xx, D5
            1FA52 | 4A42           : tst.w   D2
            1FA54 | 6706           : beq     $1fa5c
            1FA56 | 6A02           : bpl     $1fa5a
            1FA58 | 4445           : neg.w   D5
            1FA5A | 3405           : move.w  D5, D2
            1FA5C | D469 0006      : add.w   ($6,A1), D2
            1FA60 | 3342 0006      : move.w  D2, ($6,A1)
            1FA64 | 4E75           : rts
            1FA66 | B3FC 0020 1080 : cmpa.l  #$201080, A1 // check player or others
            1FA6C | 6614           : bne     $1fa82
            1FA6E | 0811 0004      : btst    #$4, (A1)    // check auto move flag
            1FA72 | 660E           : bne     $1fa82
            1FA74 | 3A3C xxxx      : move.w  #$xx, D5
            1FA78 | 4A44           : tst.w   D4
            1FA7A | 6706           : beq     $1fa82
            1FA7C | 6A02           : bpl     $1fa80
            1FA7E | 4445           : neg.w   D5
            1FA80 | 3805           : move.w  D5, D4
            1FA82 | D869 0008      : add.w   ($8,A1), D4
            1FA86 | 3344 0008      : move.w  D4, ($8,A1)
            1FA8A | 4E75           : rts
            -->
        </script>
        <script state="change">
            <action>maincpu.mw@1FA50 = param</action>
            <action>maincpu.mw@1FA76 = param</action>
        </script>
        <script state="off">
            <action>maincpu.mq@0C518 = D469000633420006</action>
            <action>maincpu.mq@0C562 = D869000833440008</action>
            <action>maincpu.mq@1FA40 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@1FA48 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@1FA50 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@1FA58 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@1FA60 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@1FA68 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@1FA70 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@1FA78 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@1FA80 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@1FA88 = FFFFFFFFFFFFFFFF</action>
        </script>
    </cheat>

    <cheat desc="fast bomb">
        <script state="on">
            <action>maincpu.mb@0BAB5 = 02              </action>
            <action>maincpu.mq@0BAC8 = 4EB90001FA903568</action>
            <action>maincpu.mq@1FA90 = 356800060006066A</action>
            <action>maincpu.mq@1FA98 = 004800064E75FFFF</action>
            <!--
            1FA90 | 3568 0006 0006 : move.w  ($6,A0), ($6,A2)
            1FA96 | 066A 0048 0006 : addi.w  #$48, ($6,A2)
            1FA9C | 4E75           : rts
            -->
        </script>
        <script state="off">
            <action>maincpu.mb@0BAB5 =  B              </action>
            <action>maincpu.mq@0BAC8 = 3568000600063568</action>
            <action>maincpu.mq@1FA90 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@1FA98 = FFFFFFFFFFFFFFFF</action>
        </script>
    </cheat>

    <cheat desc="fast power charge">
        <script state="on">
            <action>maincpu.mb@0A8F3 = 01</action>
            <action>maincpu.mb@0B1C7 = 01</action>
            <action>maincpu.mb@0B2D7 = 01</action>
            <action>maincpu.mb@0BBF1 = 01</action>
            <action>maincpu.mb@13B73 = 01</action>
        </script>
        <script state="off">
            <action>maincpu.mb@0A8F3 = 78</action>
            <action>maincpu.mb@0B1C7 = 78</action>
            <action>maincpu.mb@0B2D7 = 78</action>
            <action>maincpu.mb@0BBF1 = 78</action>
            <action>maincpu.mb@13B73 = 78</action>
        </script>
    </cheat>

    <cheat desc="short hit mark">
        <script state="on">
            <action>maincpu.mb@14A28 = FF</action> <!-- shot -->
            <action>maincpu.mb@14AD4 = FF</action> <!-- bomb -->
        </script>
        <script state="off">
            <action>maincpu.mb@14A28 = 02</action>
            <action>maincpu.mb@14AD4 = 02</action>
        </script>
    </cheat>

    <cheat desc="shot breaks ground enemy">
        <script state="on">
            <action>maincpu.mb@156C9 = 12</action>
        </script>
        <script state="off">
            <action>maincpu.mb@156C9 = 40</action>
        </script>
    </cheat>

    <cheat desc="round select mode">
        <comment>reset the game (F3) to enter round select mode</comment>
        <script state="on">
            <action>maincpu.mw@04F2 = 4E71</action>
        </script>
        <script state="off">
            <action>maincpu.mw@04F2 = 6712</action>
        </script>
    </cheat>

    <cheat desc="region">
        <parameter>
            <item value="0x01">japan</item>
            <item value="0x02">usa  </item>
            <item value="0x03">world</item>
            <item value="0x04">other</item>
        </parameter>
        <script state="change">
            <action>maincpu.mb@3FFFF = param</action>
        </script>
        <script state="off">
            <action>maincpu.mb@3FFFF = 01</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@0089E = 0001FAA0        </action>
            <action>maincpu.mq@1FAA0 = 41ED010043ED3088</action>
            <action>maincpu.mq@1FAA8 = 3200102D0710B200</action>
            <action>maincpu.mq@1FAB0 = 67F60C0000FB6602</action>
            <action>maincpu.mq@1FAB8 = 53100C0000F76602</action>
            <action>maincpu.mq@1FAC0 = 52100C0000FD6604</action>
            <action>maincpu.mq@1FAC8 = 041000100C0000FE</action>
            <action>maincpu.mq@1FAD0 = 6604061000100C00</action>
            <action>maincpu.mq@1FAD8 = 00EF660212900C00</action>
            <action>maincpu.mq@1FAE0 = 00DF6602421160C0</action>
            <!--
            1FAA0 | 41ED 0100 : lea     ($100,A5), A0  // sound code address ($200100)
            1FAA4 | 43ED 3088 : lea     ($3088,A5), A1 // sound latch address ($203088)
            1FAA8 | 3200      : move.w  D0, D1
            1FAAA | 102D 0710 : move.b  ($710,A5), D0  // read input ($200710)
            1FAAE | B200      : cmp.b   D0, D1
            1FAB0 | 67F6      : beq     $1faa8
            1FAB2 | 0C00 00FB : cmpi.b  #-$5, D0
            1FAB6 | 6602      : bne     $1faba
            1FAB8 | 5310      : subq.b  #1, (A0)       // decrease code -01
            1FABA | 0C00 00F7 : cmpi.b  #-$9, D0
            1FABE | 6602      : bne     $1fac2
            1FAC0 | 5210      : addq.b  #1, (A0)       // increase code +01
            1FAC2 | 0C00 00FD : cmpi.b  #-$3, D0
            1FAC6 | 6604      : bne     $1facc
            1FAC8 | 0410 0010 : subi.b  #$10, (A0)     // decrease code -10
            1FACC | 0C00 00FE : cmpi.b  #-$2, D0
            1FAD0 | 6604      : bne     $1fad6
            1FAD2 | 0610 0010 : addi.b  #$10, (A0)     // increase code +10
            1FAD6 | 0C00 00EF : cmpi.b  #-$11, D0
            1FADA | 6602      : bne     $1fade
            1FADC | 1290      : move.b  (A0), (A1)     // play sound
            1FADE | 0C00 00DF : cmpi.b  #-$21, D0
            1FAE2 | 6602      : bne     $1fae6
            1FAE4 | 4211      : clr.b   (A1)           // stop sound
            1FAE6 | 60C0      : bra     $1faa8
            -->
        </script>
        <script state="run">
            <output format="----- master of weapon 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@200100</argument>
            </output>
        </script>
        <script state="off">
            <action>maincpu.md@0089E = 000069F2        </action>
            <action>maincpu.mq@1FAA0 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@1FAA8 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@1FAB0 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@1FAB8 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@1FAC0 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@1FAC8 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@1FAD0 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@1FAD8 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@1FAE0 = FFFFFFFFFFFFFFFF</action>
        </script>
    </cheat>

</mamecheat>
yukiwo.xml

Code: Select all

<!-- Yukiwo (World, prototype) -->
<mamecheat version="1">

    <cheat desc="no hit">
        <script state="on">
            <action>maincpu.mq@07460 = 4EB900018C206500</action>
            <action>maincpu.mq@18C20 = B1FC002010806608</action>
            <action>maincpu.mq@18C28 = 0C2C00F100106506</action>
            <action>maincpu.mq@18C30 = DC6B0006BC434E75</action>
            <!--
            18C20 | B1FC 0020 1080 : cmpa.l  #$201080, A0   // check player or others
            18C26 | 6608           : bne     $18c30
            18C28 | 0C2C 00F1 0010 : cmpi.b  #-$f, ($10,A4) // check item or others
            18C2E | 6506           : bcs     $18c36
            18C30 | DC6B 0006      : add.w   ($6,A3), D6
            18C34 | BC43           : cmp.w   D3, D6
            18C36 | 4E75           : rts
            -->
        </script>
        <script state="off">
            <action>maincpu.mq@07460 = DC6B0006BC436500</action>
            <action>maincpu.mq@18C20 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@18C28 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@18C30 = FFFFFFFFFFFFFFFF</action>
        </script>
    </cheat>

    <cheat desc="auto fire">
        <script state="on">
            <action>maincpu.mb@170D = 01</action> <!-- shot -->
            <action>maincpu.mb@17C5 = 01</action> <!-- bomb -->
        </script>
        <script state="off">
            <action>maincpu.mb@170D = 0A</action>
            <action>maincpu.mb@17C5 = 06</action>
        </script>
    </cheat>

    <cheat desc="player speed">
        <parameter>
            <item value="0x0001">01 (slow)</item>
            <item value="0x0002">02       </item>
            <item value="0x0004">03       </item>
            <item value="0x0006">04       </item>
            <item value="0x0008">05 (fast)</item>
        </parameter>
        <script state="on">
            <action>maincpu.mq@0213C = 4EB900018C404E71</action> <!-- y position -->
            <action>maincpu.mq@02182 = 4EB900018C664E71</action> <!-- x position -->
            <action>maincpu.mq@18C40 = B3FC002010806614</action>
            <action>maincpu.mq@18C48 = 08110004660E3A3C</action>
            <action>maincpu.mq@18C50 = 00004A4267066A02</action>
            <action>maincpu.mq@18C58 = 44453405D4690006</action>
            <action>maincpu.mq@18C60 = 334200064E75B3FC</action>
            <action>maincpu.mq@18C68 = 0020108066140811</action>
            <action>maincpu.mq@18C70 = 0004660E3A3C0000</action>
            <action>maincpu.mq@18C78 = 4A4467066A024445</action>
            <action>maincpu.mq@18C80 = 3805D86900083344</action>
            <action>maincpu.mq@18C88 = 00084E75FFFFFFFF</action>
            <!--
            18C40 | B3FC 0020 1080 : cmpa.l  #$201080, A1 // check player or others
            18C46 | 6614           : bne     $18c5c
            18C48 | 0811 0004      : btst    #$4, (A1)    // check auto move flag
            18C4C | 660E           : bne     $18c5c
            18C4E | 3A3C xxxx      : move.w  #$xx, D5
            18C52 | 4A42           : tst.w   D2
            18C54 | 6706           : beq     $18c5c
            18C56 | 6A02           : bpl     $18c5a
            18C58 | 4445           : neg.w   D5
            18C5A | 3405           : move.w  D5, D2
            18C5C | D469 0006      : add.w   ($6,A1), D2
            18C60 | 3342 0006      : move.w  D2, ($6,A1)
            18C64 | 4E75           : rts
            18C66 | B3FC 0020 1080 : cmpa.l  #$201080, A1 // check player or others
            18C6C | 6614           : bne     $18c82
            18C6E | 0811 0004      : btst    #$4, (A1)    // check auto move flag
            18C72 | 660E           : bne     $18c82
            18C74 | 3A3C xxxx      : move.w  #$xx, D5
            18C78 | 4A44           : tst.w   D4
            18C7A | 6706           : beq     $18c82
            18C7C | 6A02           : bpl     $18c80
            18C7E | 4445           : neg.w   D5
            18C80 | 3805           : move.w  D5, D4
            18C82 | D869 0008      : add.w   ($8,A1), D4
            18C86 | 3344 0008      : move.w  D4, ($8,A1)
            18C8A | 4E75           : rts
            -->
        </script>
        <script state="change">
            <action>maincpu.mw@18C50 = param</action>
            <action>maincpu.mw@18C76 = param</action>
        </script>
        <script state="off">
            <action>maincpu.mq@0213C = D469000633420006</action>
            <action>maincpu.mq@02182 = D869000833440008</action>
            <action>maincpu.mq@18C40 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@18C48 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@18C50 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@18C58 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@18C60 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@18C68 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@18C70 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@18C78 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@18C80 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@18C88 = FFFFFFFFFFFFFFFF</action>
        </script>
    </cheat>

    <cheat desc="fast bomb">
        <script state="on">
            <action>maincpu.mb@0181F = 02              </action>
            <action>maincpu.mq@01832 = 4EB900018C903568</action>
            <action>maincpu.mq@18C90 = 356800060006066A</action>
            <action>maincpu.mq@18C98 = 004800064E75FFFF</action>
            <!--
            18C90 | 3568 0006 0006 : move.w  ($6,A0), ($6,A2)
            18C96 | 066A 0048 0006 : addi.w  #$48, ($6,A2)
            18C9C | 4E75           : rts
            -->
        </script>
        <script state="off">
            <action>maincpu.mb@0181F =  B              </action>
            <action>maincpu.mq@01832 = 3568000600063568</action>
            <action>maincpu.mq@18C90 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@18C98 = FFFFFFFFFFFFFFFF</action>
        </script>
    </cheat>

    <cheat desc="fast power charge">
        <script state="on">
            <action>maincpu.mb@0BFD = 01</action>
            <action>maincpu.mb@12F3 = 01</action>
            <action>maincpu.mb@1335 = 01</action>
            <action>maincpu.mb@1945 = 01</action>
            <action>maincpu.mb@7FA5 = 01</action>
        </script>
        <script state="off">
            <action>maincpu.mb@0BFD = 78</action>
            <action>maincpu.mb@12F3 = 78</action>
            <action>maincpu.mb@1335 = 78</action>
            <action>maincpu.mb@1945 = 78</action>
            <action>maincpu.mb@7FA5 = 78</action>
        </script>
    </cheat>

    <cheat desc="short hit mark">
        <script state="on">
            <action>maincpu.mb@8DEE = FF</action> <!-- shot -->
            <action>maincpu.mb@8E92 = FF</action> <!-- bomb -->
        </script>
        <script state="off">
            <action>maincpu.mb@8DEE = 02</action>
            <action>maincpu.mb@8E92 = 02</action>
        </script>
    </cheat>

    <cheat desc="shot breaks ground enemy">
        <script state="on">
            <action>maincpu.mb@7213 = 02</action>
        </script>
        <script state="off">
            <action>maincpu.mb@7213 = 32</action>
        </script>
    </cheat>

    <cheat desc="round select mode">
        <comment>reset the game (F3) to enter round select mode</comment>
        <script state="on">
            <action>maincpu.mw@9958 = 4E71</action>
        </script>
        <script state="off">
            <action>maincpu.mw@9958 = 6710</action>
        </script>
    </cheat>

    <cheat desc="region">
        <parameter>
            <item value="0x01">japan</item>
            <item value="0x02">usa  </item>
            <item value="0x03">world</item>
            <item value="0x04">other</item>
        </parameter>
        <script state="change">
            <action>maincpu.mb@3FFFF = param</action>
        </script>
        <script state="off">
            <action>maincpu.mb@3FFFF = 03</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@09CC0 = 00018CA0        </action>
            <action>maincpu.mq@18CA0 = 41ED010043ED3088</action>
            <action>maincpu.mq@18CA8 = 3200102D0710B200</action>
            <action>maincpu.mq@18CB0 = 67F60C0000FB6602</action>
            <action>maincpu.mq@18CB8 = 53100C0000F76602</action>
            <action>maincpu.mq@18CC0 = 52100C0000FD6604</action>
            <action>maincpu.mq@18CC8 = 041000100C0000FE</action>
            <action>maincpu.mq@18CD0 = 6604061000100C00</action>
            <action>maincpu.mq@18CD8 = 00EF660212900C00</action>
            <action>maincpu.mq@18CE0 = 00DF6602421160C0</action>
            <!--
            18CA0 | 41ED 0100 : lea     ($100,A5), A0  // sound code address ($200100)
            18CA4 | 43ED 3088 : lea     ($3088,A5), A1 // sound latch address ($203088)
            18CA8 | 3200      : move.w  D0, D1
            18CAA | 102D 0710 : move.b  ($710,A5), D0  // read input ($200710)
            18CAE | B200      : cmp.b   D0, D1
            18CB0 | 67F6      : beq     $18ca8
            18CB2 | 0C00 00FB : cmpi.b  #-$5, D0
            18CB6 | 6602      : bne     $18cba
            18CB8 | 5310      : subq.b  #1, (A0)       // decrease code -01
            18CBA | 0C00 00F7 : cmpi.b  #-$9, D0
            18CBE | 6602      : bne     $18cc2
            18CC0 | 5210      : addq.b  #1, (A0)       // increase code +01
            18CC2 | 0C00 00FD : cmpi.b  #-$3, D0
            18CC6 | 6604      : bne     $18ccc
            18CC8 | 0410 0010 : subi.b  #$10, (A0)     // decrease code -10
            18CCC | 0C00 00FE : cmpi.b  #-$2, D0
            18CD0 | 6604      : bne     $18cd6
            18CD2 | 0610 0010 : addi.b  #$10, (A0)     // increase code +10
            18CD6 | 0C00 00EF : cmpi.b  #-$11, D0
            18CDA | 6602      : bne     $18cde
            18CDC | 1290      : move.b  (A0), (A1)     // play sound
            18CDE | 0C00 00DF : cmpi.b  #-$21, D0
            18CE2 | 6602      : bne     $18ce6
            18CE4 | 4211      : clr.b   (A1)           // stop sound
            18CE6 | 60C0      : bra     $18ca8
            -->
        </script>
        <script state="run">
            <output format="----- yukiwo 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@200100</argument>
            </output>
        </script>
        <script state="off">
            <action>maincpu.md@09CC0 = 0000E230        </action>
            <action>maincpu.mq@18CA0 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@18CA8 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@18CB0 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@18CB8 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@18CC0 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@18CC8 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@18CD0 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@18CD8 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@18CE0 = FFFFFFFFFFFFFFFF</action>
        </script>
    </cheat>

</mamecheat>
Post Reply