[nprinceso] Sega Ninja/Ninja Princess

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

[nprinceso] Sega Ninja/Ninja Princess

Post by jman »

Code: Select all

<cheat desc="no hit">
    <script state="on">
        <action>maincpu.ob@08a5 = 18</action> <!-- bullet -->
        <action>maincpu.ob@4067 = 18</action> <!-- enemy -->
        <action>maincpu.ob@5135 = 18</action> <!-- enemy -->
    </script>
    <script state="off">
        <action>maincpu.ob@08a5 = 28</action>
        <action>maincpu.ob@4067 = 28</action>
        <action>maincpu.ob@5135 = 28</action>
    </script>
</cheat>

<cheat desc="walk through wall (test)">
    <comment>doesn't work in river scene</comment>
    <script state="on">
        <action>maincpu.mb@02ba = 00</action>
    </script>
    <script state="off">
        <action>maincpu.mb@02ba = 0a</action>
    </script>
</cheat>

<cheat desc="auto fire">
    <script state="on">
        <action>maincpu.mb@0151 = 00</action> <!-- button 2 -->
        <action>maincpu.mb@0155 = 00</action> <!-- button 1 -->
    </script>
    <script state="off">
        <action>maincpu.mb@0151 = 0d</action>
        <action>maincpu.mb@0155 = 1b</action>
    </script>
</cheat>

<cheat desc="player speed">
    <comment>scroll speed doesn't change</comment>
    <parameter>
        <item value="0x08">01 (slow)</item>
        <item value="0x10">02      </item>
        <item value="0x30">03      </item>
        <item value="0x50">04      </item>
        <item value="0x70">05 (fast)</item>
    </parameter>
    <script state="change">
        <!-- left -->
        <action>maincpu.mb@034d = -param</action>
        <action>maincpu.mb@0352 = -param</action>
        <!-- right -->
        <action>maincpu.mb@0361 = param</action>
        <action>maincpu.mb@0366 = param</action>
        <!-- up -->
        <action>maincpu.mb@0379 = -param</action>
        <action>maincpu.mb@037e = -param</action>
        <!-- down -->
        <action>maincpu.mb@039c = param</action>
        <action>maincpu.mb@03a1 = param</action>
    </script>
    <script state="off">
        <action>maincpu.mb@034d = e0</action>
        <action>maincpu.mb@0352 = f0</action>
        <action>maincpu.mb@0361 = 20</action>
        <action>maincpu.mb@0366 = 10</action>
        <action>maincpu.mb@0379 = f0</action>
        <action>maincpu.mb@037e = f8</action>
        <action>maincpu.mb@039c = 10</action>
        <action>maincpu.mb@03a1 = 08</action>
    </script>
</cheat>

<cheat desc="timer speed">
    <comment>timer bar doesn't be connected</comment>
    <parameter>
        <item value="0xfe">01 (slow)</item>
        <item value="0xc0">02       </item>
        <item value="0x80">03       </item>
        <item value="0x40">04       </item>
        <item value="0x08">05 (fast)</item>
    </parameter>
    <script state="change">
        <action>maincpu.mb@186b = param</action>
    </script>
    <script state="off">
        <action>maincpu.mb@186b = 3b</action>
    </script>
</cheat>

<cheat desc="always get 100% bonus">
    <script state="on">
        <action>maincpu.od@1619 = 001d4b01</action>
        <action>maincpu.md@1619 = c000004d</action>
    </script>
    <script state="off">
        <action>maincpu.od@1619 = e81d4bed</action>
        <action>maincpu.md@1619 = c035eb4d</action>
    </script>
</cheat>

<cheat desc="sound test mode">
    <comment>reset the game (F3) to enter sound test mode</comment>
    <script state="on">
        <action>maincpu.mw@1ecd =             bf70</action>
        <action>maincpu.mq@bf70 = 2847b800dbc10021</action>
        <action>maincpu.mq@bf78 = bffe3501207ffefa</action>
        <action>maincpu.mq@bf80 = 3e0420effe340120</action>
        <action>maincpu.mq@bf88 = 3e0520dffe0618f0</action>
        <action>maincpu.mq@bf90 = 0520fbfe78778610</action>
        <action>maincpu.mq@bf98 = 20fdfe051880f67e</action>
        <action>maincpu.mq@bfa0 = ffffcd1818d3af03</action>
        <!--
        bf70 | 21 00 c1 : ld  hl,$C100 // sound code address
        bf73 | db 00    : in  a,($00)  // read input
        bf75 | b8       : cp  b
        bf76 | 47       : ld  b,a
        bf77 | 28 fa    : jr  z,$BF73
        bf79 | fe 7f    : cp  $7F
        bf7b | 20 01    : jr  nz,$BF7E
        bf7d | 35       : dec (hl)     // decrease code -01
        bf7e | fe bf    : cp  $BF
        bf80 | 20 01    : jr  nz,$BF83
        bf82 | 34       : inc (hl)     // increase code +01
        bf83 | fe ef    : cp  $EF
        bf85 | 20 04    : jr  nz,$BF8B
        bf87 | 3e f0    : ld  a,$F0    // decrease code -10
        bf89 | 18 06    : jr  $BF91
        bf8b | fe df    : cp  $DF
        bf8d | 20 05    : jr  nz,$BF94
        bf8f | 3e 10    : ld  a,$10    // increase code +10
        bf91 | 86       : add a,(hl)
        bf92 | 77       : ld  (hl),a
        bf93 | 78       : ld  a,b
        bf94 | fe fb    : cp  $FB
        bf96 | 20 05    : jr  nz,$BF9D
        bf98 | 7e       : ld  a,(hl)   // play sound
        bf99 | f6 80    : or  $80
        bf9b | 18 05    : jr  $BFA2
        bf9d | fe fd    : cp  $FD
        bf9f | 20 03    : jr  nz,$BFA4
        bfa1 | af       : xor a        // stop sound
        bfa2 | d3 18    : out ($18),a  // send sound code
        bfa4 | 18 cd    : jr  $BF73
        -->
    </script>
    <script state="run">
        <output format="----- ninja princess 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@c100</argument>
        </output>
    </script>
    <script state="off">
        <action>maincpu.mw@1ecd =             2b64</action>
        <action>maincpu.mq@bf70 = ffffffffffffffff</action>
        <action>maincpu.mq@bf78 = ffffffffffffffff</action>
        <action>maincpu.mq@bf80 = ffffffffffffffff</action>
        <action>maincpu.mq@bf88 = ffffffffffffffff</action>
        <action>maincpu.mq@bf90 = ffffffffffffffff</action>
        <action>maincpu.mq@bf98 = ffffffffffffffff</action>
        <action>maincpu.mq@bfa0 = ffffffffffffffff</action>
    </script>
</cheat>
"always get 100% bonus" is unique.
Image
jman
Posts: 870
Joined: Tue Dec 01, 2020 1:24 pm
Been thanked: 1 time

[seganinj]+ Sega Ninja/Ninja Princess

Post by jman »

seganinj.xml

Code: Select all

<!-- Sega Ninja (315-5102) -->
<mamecheat version="1">

    <cheat desc="no hit">
        <script state="on">
            <action>maincpu.ob@08A5 = 18</action> <!-- bullet -->
            <action>maincpu.ob@4067 = 18</action> <!-- enemy -->
            <action>maincpu.ob@5135 = 18</action> <!-- enemy -->
        </script>
        <script state="off">
            <action>maincpu.ob@08A5 = 28</action>
            <action>maincpu.ob@4067 = 28</action>
            <action>maincpu.ob@5135 = 28</action>
        </script>
    </cheat>

    <cheat desc="walk through wall (test)">
        <comment>doesn't work in river scene</comment>
        <script state="on">
            <action>maincpu.mb@02BA = 00</action>
        </script>
        <script state="off">
            <action>maincpu.mb@02BA = 0A</action>
        </script>
    </cheat>

    <cheat desc="auto fire">
        <script state="on">
            <action>maincpu.mb@0151 = 00</action> <!-- button 2 -->
            <action>maincpu.mb@0155 = 00</action> <!-- button 1 -->
        </script>
        <script state="off">
            <action>maincpu.mb@0151 = 0D</action>
            <action>maincpu.mb@0155 = 1B</action>
        </script>
    </cheat>

    <cheat desc="player speed">
        <comment>scroll speed doesn't change</comment>
        <parameter>
            <item value="0x08">01 (slow)</item>
            <item value="0x10">02      </item>
            <item value="0x30">03      </item>
            <item value="0x50">04      </item>
            <item value="0x70">05 (fast)</item>
        </parameter>
        <script state="change">
            <!-- left -->
            <action>maincpu.mb@034D = -param</action>
            <action>maincpu.mb@0352 = -param</action>
            <!-- right -->
            <action>maincpu.mb@0361 = param</action>
            <action>maincpu.mb@0366 = param</action>
            <!-- up -->
            <action>maincpu.mb@0379 = -param</action>
            <action>maincpu.mb@037E = -param</action>
            <!-- down -->
            <action>maincpu.mb@039C = param</action>
            <action>maincpu.mb@03A1 = param</action>
        </script>
        <script state="off">
            <action>maincpu.mb@034D = E0</action>
            <action>maincpu.mb@0352 = F0</action>
            <action>maincpu.mb@0361 = 20</action>
            <action>maincpu.mb@0366 = 10</action>
            <action>maincpu.mb@0379 = F0</action>
            <action>maincpu.mb@037E = F8</action>
            <action>maincpu.mb@039C = 10</action>
            <action>maincpu.mb@03A1 = 08</action>
        </script>
    </cheat>

    <cheat desc="timer speed">
        <comment>timer bar doesn't be connected</comment>
        <parameter>
            <item value="0xfe">01 (slow)</item>
            <item value="0xc0">02       </item>
            <item value="0x80">03       </item>
            <item value="0x40">04       </item>
            <item value="0x08">05 (fast)</item>
        </parameter>
        <script state="change">
            <action>maincpu.mb@186B = param</action>
        </script>
        <script state="off">
            <action>maincpu.mb@186B = 3B</action>
        </script>
    </cheat>

    <cheat desc="100% bonus">
        <script state="on">
            <action>maincpu.od@1619 = 00FFFF01</action>
            <action>maincpu.md@1619 = FF0000FF</action>
        </script>
        <script state="off">
            <action>maincpu.od@1619 = C0354BED</action>
            <action>maincpu.md@1619 = C0354BED</action>
        </script>
    </cheat>

    <cheat desc="sound test mode">
        <comment>reset the game (F3) to enter sound test mode</comment>
        <script state="on">
            <action>maincpu.mw@1ECD = BF70            </action>
            <action>maincpu.mq@BF70 = 2847B800DBC00021</action>
            <action>maincpu.mq@BF78 = BFFE3501207FFEFA</action>
            <action>maincpu.mq@BF80 = 3E0420EFFE340120</action>
            <action>maincpu.mq@BF88 = 3E0520DFFE0618F0</action>
            <action>maincpu.mq@BF90 = 0520FBFE78778610</action>
            <action>maincpu.mq@BF98 = 20FDFE051880F67E</action>
            <action>maincpu.mq@BFA0 = FFFFCD1818D3AF03</action>
            <!--
            BF70 | 21 00 C0 : ld   hl,$C000 // sound code address
            BF73 | DB 00    : in   a,($00)  // read input
            BF75 | B8       : cp   b
            BF76 | 47       : ld   b,a
            BF77 | 28 FA    : jr   z,$BF73
            BF79 | FE 7F    : cp   $7F
            BF7B | 20 01    : jr   nz,$BF7E
            BF7D | 35       : dec  (hl)     // decrease code -01
            BF7E | FE BF    : cp   $BF
            BF80 | 20 01    : jr   nz,$BF83
            BF82 | 34       : inc  (hl)     // increase code +01
            BF83 | FE EF    : cp   $EF
            BF85 | 20 04    : jr   nz,$BF8B
            BF87 | 3E F0    : ld   a,$F0    // decrease code -10
            BF89 | 18 06    : jr   $BF91
            BF8B | FE DF    : cp   $DF
            BF8D | 20 05    : jr   nz,$BF94
            BF8F | 3E 10    : ld   a,$10    // increase code +10
            BF91 | 86       : add  a,(hl)
            BF92 | 77       : ld   (hl),a
            BF93 | 78       : ld   a,b
            BF94 | FE FB    : cp   $FB
            BF96 | 20 05    : jr   nz,$BF9D
            BF98 | 7E       : ld   a,(hl)   // play sound
            BF99 | F6 80    : or   $80
            BF9B | 18 05    : jr   $BFA2
            BF9D | FE FD    : cp   $FD
            BF9F | 20 03    : jr   nz,$BFA4
            BFA1 | AF       : xor  a        // stop sound
            BFA2 | D3 18    : out  ($18),a  // send sound code
            BFA4 | 18 CD    : jr   $BF73
            -->
        </script>
        <script state="run">
            <output format="----- sega ninja 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.mw@1ECD = 2B72            </action>
            <action>maincpu.mq@BF70 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@BF78 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@BF80 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@BF88 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@BF90 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@BF98 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@BFA0 = FFFFFFFFFFFFFFFF</action>
        </script>
    </cheat>

</mamecheat>
seganinju.xml

Code: Select all

<!-- Sega Ninja (not encrypted) -->
<mamecheat version="1">

    <cheat desc="no hit">
        <script state="on">
            <action>maincpu.mb@08A5 = 18</action> <!-- bullet -->
            <action>maincpu.mb@4067 = 18</action> <!-- enemy -->
            <action>maincpu.mb@5135 = 18</action> <!-- enemy -->
        </script>
        <script state="off">
            <action>maincpu.mb@08A5 = 28</action>
            <action>maincpu.mb@4067 = 28</action>
            <action>maincpu.mb@5135 = 28</action>
        </script>
    </cheat>

    <cheat desc="walk through wall (test)">
        <comment>doesn't work in river scene</comment>
        <script state="on">
            <action>maincpu.mb@02BA = 00</action>
        </script>
        <script state="off">
            <action>maincpu.mb@02BA = 0A</action>
        </script>
    </cheat>

    <cheat desc="auto fire">
        <script state="on">
            <action>maincpu.mb@0151 = 00</action> <!-- button 2 -->
            <action>maincpu.mb@0155 = 00</action> <!-- button 1 -->
        </script>
        <script state="off">
            <action>maincpu.mb@0151 = 0D</action>
            <action>maincpu.mb@0155 = 1B</action>
        </script>
    </cheat>

    <cheat desc="player speed">
        <comment>scroll speed doesn't change</comment>
        <parameter>
            <item value="0x08">01 (slow)</item>
            <item value="0x10">02      </item>
            <item value="0x30">03      </item>
            <item value="0x50">04      </item>
            <item value="0x70">05 (fast)</item>
        </parameter>
        <script state="change">
            <!-- left -->
            <action>maincpu.mb@034D = -param</action>
            <action>maincpu.mb@0352 = -param</action>
            <!-- right -->
            <action>maincpu.mb@0361 = param</action>
            <action>maincpu.mb@0366 = param</action>
            <!-- up -->
            <action>maincpu.mb@0379 = -param</action>
            <action>maincpu.mb@037E = -param</action>
            <!-- down -->
            <action>maincpu.mb@039C = param</action>
            <action>maincpu.mb@03A1 = param</action>
        </script>
        <script state="off">
            <action>maincpu.mb@034D = E0</action>
            <action>maincpu.mb@0352 = F0</action>
            <action>maincpu.mb@0361 = 20</action>
            <action>maincpu.mb@0366 = 10</action>
            <action>maincpu.mb@0379 = F0</action>
            <action>maincpu.mb@037E = F8</action>
            <action>maincpu.mb@039C = 10</action>
            <action>maincpu.mb@03A1 = 08</action>
        </script>
    </cheat>

    <cheat desc="timer speed">
        <comment>timer bar doesn't be connected</comment>
        <parameter>
            <item value="0xfe">01 (slow)</item>
            <item value="0xc0">02       </item>
            <item value="0x80">03       </item>
            <item value="0x40">04       </item>
            <item value="0x08">05 (fast)</item>
        </parameter>
        <script state="change">
            <action>maincpu.mb@186B = param</action>
        </script>
        <script state="off">
            <action>maincpu.mb@186B = 3B</action>
        </script>
    </cheat>

    <cheat desc="100% bonus">
        <script state="on">
            <action>maincpu.md@1619 = 00000001</action>
        </script>
        <script state="off">
            <action>maincpu.md@1619 = CD354BED</action>
        </script>
    </cheat>

    <cheat desc="sound test mode">
        <comment>reset the game (F3) to enter sound test mode</comment>
        <script state="on">
            <action>maincpu.mw@1ECD = BF70            </action>
            <action>maincpu.mq@BF70 = 2847B800DBC00021</action>
            <action>maincpu.mq@BF78 = BFFE3501207FFEFA</action>
            <action>maincpu.mq@BF80 = 3E0420EFFE340120</action>
            <action>maincpu.mq@BF88 = 3E0520DFFE0618F0</action>
            <action>maincpu.mq@BF90 = 0520FBFE78778610</action>
            <action>maincpu.mq@BF98 = 20FDFE051880F67E</action>
            <action>maincpu.mq@BFA0 = FFFFCD1818D3AF03</action>
            <!--
            BF70 | 21 00 C0 : ld   hl,$C000 // sound code address
            BF73 | DB 00    : in   a,($00)  // read input
            BF75 | B8       : cp   b
            BF76 | 47       : ld   b,a
            BF77 | 28 FA    : jr   z,$BF73
            BF79 | FE 7F    : cp   $7F
            BF7B | 20 01    : jr   nz,$BF7E
            BF7D | 35       : dec  (hl)     // decrease code -01
            BF7E | FE BF    : cp   $BF
            BF80 | 20 01    : jr   nz,$BF83
            BF82 | 34       : inc  (hl)     // increase code +01
            BF83 | FE EF    : cp   $EF
            BF85 | 20 04    : jr   nz,$BF8B
            BF87 | 3E F0    : ld   a,$F0    // decrease code -10
            BF89 | 18 06    : jr   $BF91
            BF8B | FE DF    : cp   $DF
            BF8D | 20 05    : jr   nz,$BF94
            BF8F | 3E 10    : ld   a,$10    // increase code +10
            BF91 | 86       : add  a,(hl)
            BF92 | 77       : ld   (hl),a
            BF93 | 78       : ld   a,b
            BF94 | FE FB    : cp   $FB
            BF96 | 20 05    : jr   nz,$BF9D
            BF98 | 7E       : ld   a,(hl)   // play sound
            BF99 | F6 80    : or   $80
            BF9B | 18 05    : jr   $BFA2
            BF9D | FE FD    : cp   $FD
            BF9F | 20 03    : jr   nz,$BFA4
            BFA1 | AF       : xor  a        // stop sound
            BFA2 | D3 18    : out  ($18),a  // send sound code
            BFA4 | 18 CD    : jr   $BF73
            -->
        </script>
        <script state="run">
            <output format="----- sega ninja 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.mw@1ECD = 2B72            </action>
            <action>maincpu.mq@BF70 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@BF78 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@BF80 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@BF88 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@BF90 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@BF98 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@BFA0 = FFFFFFFFFFFFFFFF</action>
        </script>
    </cheat>

</mamecheat>
seganinja.xml

Code: Select all

<!-- Sega Ninja (315-5113) -->
<mamecheat version="1">

    <cheat desc="no hit">
        <script state="on">
            <action>maincpu.ob@08A5 = 18</action> <!-- bullet -->
            <action>maincpu.ob@4067 = 18</action> <!-- enemy -->
            <action>maincpu.ob@5135 = 18</action> <!-- enemy -->
        </script>
        <script state="off">
            <action>maincpu.ob@08A5 = 28</action>
            <action>maincpu.ob@4067 = 28</action>
            <action>maincpu.ob@5135 = 28</action>
        </script>
    </cheat>

    <cheat desc="walk through wall (test)">
        <comment>doesn't work in river scene</comment>
        <script state="on">
            <action>maincpu.mb@02BA = 00</action>
        </script>
        <script state="off">
            <action>maincpu.mb@02BA = 0A</action>
        </script>
    </cheat>

    <cheat desc="auto fire">
        <script state="on">
            <action>maincpu.mb@0151 = 00</action> <!-- button 2 -->
            <action>maincpu.mb@0155 = 00</action> <!-- button 1 -->
        </script>
        <script state="off">
            <action>maincpu.mb@0151 = 0D</action>
            <action>maincpu.mb@0155 = 1B</action>
        </script>
    </cheat>

    <cheat desc="player speed">
        <comment>scroll speed doesn't change</comment>
        <parameter>
            <item value="0x08">01 (slow)</item>
            <item value="0x10">02      </item>
            <item value="0x30">03      </item>
            <item value="0x50">04      </item>
            <item value="0x70">05 (fast)</item>
        </parameter>
        <script state="change">
            <!-- left -->
            <action>maincpu.mb@034D = -param</action>
            <action>maincpu.mb@0352 = -param</action>
            <!-- right -->
            <action>maincpu.mb@0361 = param</action>
            <action>maincpu.mb@0366 = param</action>
            <!-- up -->
            <action>maincpu.mb@0379 = -param</action>
            <action>maincpu.mb@037E = -param</action>
            <!-- down -->
            <action>maincpu.mb@039C = param</action>
            <action>maincpu.mb@03A1 = param</action>
        </script>
        <script state="off">
            <action>maincpu.mb@034D = E0</action>
            <action>maincpu.mb@0352 = F0</action>
            <action>maincpu.mb@0361 = 20</action>
            <action>maincpu.mb@0366 = 10</action>
            <action>maincpu.mb@0379 = F0</action>
            <action>maincpu.mb@037E = F8</action>
            <action>maincpu.mb@039C = 10</action>
            <action>maincpu.mb@03A1 = 08</action>
        </script>
    </cheat>

    <cheat desc="timer speed">
        <comment>timer bar doesn't be connected</comment>
        <parameter>
            <item value="0xfe">01 (slow)</item>
            <item value="0xc0">02       </item>
            <item value="0x80">03       </item>
            <item value="0x40">04       </item>
            <item value="0x08">05 (fast)</item>
        </parameter>
        <script state="change">
            <action>maincpu.mb@186B = param</action>
        </script>
        <script state="off">
            <action>maincpu.mb@186B = 3B</action>
        </script>
    </cheat>

    <cheat desc="100% bonus">
        <script state="on">
            <action>maincpu.od@1619 = 00FFFF01</action>
            <action>maincpu.md@1619 = FF0000FF</action>
        </script>
        <script state="off">
            <action>maincpu.od@1619 = C0354BED</action>
            <action>maincpu.md@1619 = C0354BED</action>
        </script>
    </cheat>

    <cheat desc="sound test mode">
        <comment>reset the game (F3) to enter sound test mode</comment>
        <script state="on">
            <action>maincpu.mw@1ECD = BF70            </action>
            <action>maincpu.mq@BF70 = 2847B800DBC00021</action>
            <action>maincpu.mq@BF78 = BFFE3501207FFEFA</action>
            <action>maincpu.mq@BF80 = 3E0420EFFE340120</action>
            <action>maincpu.mq@BF88 = 3E0520DFFE0618F0</action>
            <action>maincpu.mq@BF90 = 0520FBFE78778610</action>
            <action>maincpu.mq@BF98 = 20FDFE051880F67E</action>
            <action>maincpu.mq@BFA0 = FFFFCD1818D3AF03</action>
            <!--
            BF70 | 21 00 C0 : ld   hl,$C000 // sound code address
            BF73 | DB 00    : in   a,($00)  // read input
            BF75 | B8       : cp   b
            BF76 | 47       : ld   b,a
            BF77 | 28 FA    : jr   z,$BF73
            BF79 | FE 7F    : cp   $7F
            BF7B | 20 01    : jr   nz,$BF7E
            BF7D | 35       : dec  (hl)     // decrease code -01
            BF7E | FE BF    : cp   $BF
            BF80 | 20 01    : jr   nz,$BF83
            BF82 | 34       : inc  (hl)     // increase code +01
            BF83 | FE EF    : cp   $EF
            BF85 | 20 04    : jr   nz,$BF8B
            BF87 | 3E F0    : ld   a,$F0    // decrease code -10
            BF89 | 18 06    : jr   $BF91
            BF8B | FE DF    : cp   $DF
            BF8D | 20 05    : jr   nz,$BF94
            BF8F | 3E 10    : ld   a,$10    // increase code +10
            BF91 | 86       : add  a,(hl)
            BF92 | 77       : ld   (hl),a
            BF93 | 78       : ld   a,b
            BF94 | FE FB    : cp   $FB
            BF96 | 20 05    : jr   nz,$BF9D
            BF98 | 7E       : ld   a,(hl)   // play sound
            BF99 | F6 80    : or   $80
            BF9B | 18 05    : jr   $BFA2
            BF9D | FE FD    : cp   $FD
            BF9F | 20 03    : jr   nz,$BFA4
            BFA1 | AF       : xor  a        // stop sound
            BFA2 | D3 18    : out  ($18),a  // send sound code
            BFA4 | 18 CD    : jr   $BF73
            -->
        </script>
        <script state="run">
            <output format="----- sega ninja 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.mw@1ECD = 2B72            </action>
            <action>maincpu.mq@BF70 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@BF78 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@BF80 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@BF88 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@BF90 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@BF98 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@BFA0 = FFFFFFFFFFFFFFFF</action>
        </script>
    </cheat>

</mamecheat>
ninja.xml

Code: Select all

<!-- Ninja (315-5102) -->
<mamecheat version="1">

    <cheat desc="no hit">
        <script state="on">
            <action>maincpu.ob@08A5 = 18</action> <!-- bullet -->
            <action>maincpu.ob@405B = 18</action> <!-- enemy -->
            <action>maincpu.ob@5129 = 18</action> <!-- enemy -->
        </script>
        <script state="off">
            <action>maincpu.ob@08A5 = 28</action>
            <action>maincpu.ob@405B = 28</action>
            <action>maincpu.ob@5129 = 28</action>
        </script>
    </cheat>

    <cheat desc="walk through wall (test)">
        <comment>doesn't work in river scene</comment>
        <script state="on">
            <action>maincpu.mb@02BA = 00</action>
        </script>
        <script state="off">
            <action>maincpu.mb@02BA = 0A</action>
        </script>
    </cheat>

    <cheat desc="auto fire">
        <script state="on">
            <action>maincpu.mb@0151 = 00</action> <!-- button 2 -->
            <action>maincpu.mb@0155 = 00</action> <!-- button 1 -->
        </script>
        <script state="off">
            <action>maincpu.mb@0151 = 0D</action>
            <action>maincpu.mb@0155 = 1B</action>
        </script>
    </cheat>

    <cheat desc="player speed">
        <comment>scroll speed doesn't change</comment>
        <parameter>
            <item value="0x08">01 (slow)</item>
            <item value="0x10">02      </item>
            <item value="0x30">03      </item>
            <item value="0x50">04      </item>
            <item value="0x70">05 (fast)</item>
        </parameter>
        <script state="change">
            <!-- left -->
            <action>maincpu.mb@034D = -param</action>
            <action>maincpu.mb@0352 = -param</action>
            <!-- right -->
            <action>maincpu.mb@0361 = param</action>
            <action>maincpu.mb@0366 = param</action>
            <!-- up -->
            <action>maincpu.mb@0379 = -param</action>
            <action>maincpu.mb@037E = -param</action>
            <!-- down -->
            <action>maincpu.mb@039C = param</action>
            <action>maincpu.mb@03A1 = param</action>
        </script>
        <script state="off">
            <action>maincpu.mb@034D = E0</action>
            <action>maincpu.mb@0352 = F0</action>
            <action>maincpu.mb@0361 = 20</action>
            <action>maincpu.mb@0366 = 10</action>
            <action>maincpu.mb@0379 = F0</action>
            <action>maincpu.mb@037E = F8</action>
            <action>maincpu.mb@039C = 10</action>
            <action>maincpu.mb@03A1 = 08</action>
        </script>
    </cheat>

    <cheat desc="timer speed">
        <comment>timer bar doesn't be connected</comment>
        <parameter>
            <item value="0xfe">01 (slow)</item>
            <item value="0xc0">02       </item>
            <item value="0x80">03       </item>
            <item value="0x40">04       </item>
            <item value="0x08">05 (fast)</item>
        </parameter>
        <script state="change">
            <action>maincpu.mb@186B = param</action>
        </script>
        <script state="off">
            <action>maincpu.mb@186B = 3B</action>
        </script>
    </cheat>

    <cheat desc="100% bonus">
        <script state="on">
            <action>maincpu.od@1619 = 00FFFF01</action>
            <action>maincpu.md@1619 = FF0000FF</action>
        </script>
        <script state="off">
            <action>maincpu.od@1619 = 689D4BED</action>
            <action>maincpu.md@1619 = C035436D</action>
        </script>
    </cheat>

    <cheat desc="sound test mode">
        <comment>reset the game (F3) to enter sound test mode</comment>
        <script state="on">
            <action>maincpu.mw@1ECD = BF70            </action>
            <action>maincpu.mq@BF70 = 2847B800DBC00021</action>
            <action>maincpu.mq@BF78 = BFFE3501207FFEFA</action>
            <action>maincpu.mq@BF80 = 3E0420EFFE340120</action>
            <action>maincpu.mq@BF88 = 3E0520DFFE0618F0</action>
            <action>maincpu.mq@BF90 = 0520FBFE78778610</action>
            <action>maincpu.mq@BF98 = 20FDFE051880F67E</action>
            <action>maincpu.mq@BFA0 = FFFFCD1818D3AF03</action>
            <!--
            BF70 | 21 00 C0 : ld   hl,$C000 // sound code address
            BF73 | DB 00    : in   a,($00)  // read input
            BF75 | B8       : cp   b
            BF76 | 47       : ld   b,a
            BF77 | 28 FA    : jr   z,$BF73
            BF79 | FE 7F    : cp   $7F
            BF7B | 20 01    : jr   nz,$BF7E
            BF7D | 35       : dec  (hl)     // decrease code -01
            BF7E | FE BF    : cp   $BF
            BF80 | 20 01    : jr   nz,$BF83
            BF82 | 34       : inc  (hl)     // increase code +01
            BF83 | FE EF    : cp   $EF
            BF85 | 20 04    : jr   nz,$BF8B
            BF87 | 3E F0    : ld   a,$F0    // decrease code -10
            BF89 | 18 06    : jr   $BF91
            BF8B | FE DF    : cp   $DF
            BF8D | 20 05    : jr   nz,$BF94
            BF8F | 3E 10    : ld   a,$10    // increase code +10
            BF91 | 86       : add  a,(hl)
            BF92 | 77       : ld   (hl),a
            BF93 | 78       : ld   a,b
            BF94 | FE FB    : cp   $FB
            BF96 | 20 05    : jr   nz,$BF9D
            BF98 | 7E       : ld   a,(hl)   // play sound
            BF99 | F6 80    : or   $80
            BF9B | 18 05    : jr   $BFA2
            BF9D | FE FD    : cp   $FD
            BF9F | 20 03    : jr   nz,$BFA4
            BFA1 | AF       : xor  a        // stop sound
            BFA2 | D3 18    : out  ($18),a  // send sound code
            BFA4 | 18 CD    : jr   $BF73
            -->
        </script>
        <script state="run">
            <output format="----- ninja 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.mw@1ECD = 2B64            </action>
            <action>maincpu.mq@BF70 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@BF78 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@BF80 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@BF88 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@BF90 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@BF98 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@BFA0 = FFFFFFFFFFFFFFFF</action>
        </script>
    </cheat>

</mamecheat>
jman
Posts: 870
Joined: Tue Dec 01, 2020 1:24 pm
Been thanked: 1 time

[seganinj]+ Sega Ninja/Ninja Princess

Post by jman »

nprinceso.xml

Code: Select all

<!-- Ninja Princess (315-5098, 128k Ver.) -->
<mamecheat version="1">

    <cheat desc="no hit">
        <script state="on">
            <action>maincpu.ob@08A5 = 18</action> <!-- bullet -->
            <action>maincpu.ob@4067 = 18</action> <!-- enemy -->
            <action>maincpu.ob@5135 = 18</action> <!-- enemy -->
        </script>
        <script state="off">
            <action>maincpu.ob@08A5 = 28</action>
            <action>maincpu.ob@4067 = 28</action>
            <action>maincpu.ob@5135 = 28</action>
        </script>
    </cheat>

    <cheat desc="walk through wall (test)">
        <comment>doesn't work in river scene</comment>
        <script state="on">
            <action>maincpu.mb@02BA = 00</action>
        </script>
        <script state="off">
            <action>maincpu.mb@02BA = 0A</action>
        </script>
    </cheat>

    <cheat desc="auto fire">
        <script state="on">
            <action>maincpu.mb@0151 = 00</action> <!-- button 2 -->
            <action>maincpu.mb@0155 = 00</action> <!-- button 1 -->
        </script>
        <script state="off">
            <action>maincpu.mb@0151 = 0D</action>
            <action>maincpu.mb@0155 = 1B</action>
        </script>
    </cheat>

    <cheat desc="player speed">
        <comment>scroll speed doesn't change</comment>
        <parameter>
            <item value="0x08">01 (slow)</item>
            <item value="0x10">02      </item>
            <item value="0x30">03      </item>
            <item value="0x50">04      </item>
            <item value="0x70">05 (fast)</item>
        </parameter>
        <script state="change">
            <!-- left -->
            <action>maincpu.mb@034D = -param</action>
            <action>maincpu.mb@0352 = -param</action>
            <!-- right -->
            <action>maincpu.mb@0361 = param</action>
            <action>maincpu.mb@0366 = param</action>
            <!-- up -->
            <action>maincpu.mb@0379 = -param</action>
            <action>maincpu.mb@037E = -param</action>
            <!-- down -->
            <action>maincpu.mb@039C = param</action>
            <action>maincpu.mb@03A1 = param</action>
        </script>
        <script state="off">
            <action>maincpu.mb@034D = E0</action>
            <action>maincpu.mb@0352 = F0</action>
            <action>maincpu.mb@0361 = 20</action>
            <action>maincpu.mb@0366 = 10</action>
            <action>maincpu.mb@0379 = F0</action>
            <action>maincpu.mb@037E = F8</action>
            <action>maincpu.mb@039C = 10</action>
            <action>maincpu.mb@03A1 = 08</action>
        </script>
    </cheat>

    <cheat desc="timer speed">
        <comment>timer bar doesn't be connected</comment>
        <parameter>
            <item value="0xfe">01 (slow)</item>
            <item value="0xc0">02       </item>
            <item value="0x80">03       </item>
            <item value="0x40">04       </item>
            <item value="0x08">05 (fast)</item>
        </parameter>
        <script state="change">
            <action>maincpu.mb@186B = param</action>
        </script>
        <script state="off">
            <action>maincpu.mb@186B = 3B</action>
        </script>
    </cheat>

    <cheat desc="100% bonus">
        <script state="on">
            <action>maincpu.od@1619 = 00FFFF01</action>
            <action>maincpu.md@1619 = FF0000FF</action>
        </script>
        <script state="off">
            <action>maincpu.od@1619 = E81D4BED</action>
            <action>maincpu.md@1619 = C035EB4D</action>
        </script>
    </cheat>

    <cheat desc="sound test mode">
        <comment>reset the game (F3) to enter sound test mode</comment>
        <script state="on">
            <action>maincpu.mw@1ECD = BF70            </action>
            <action>maincpu.mq@BF70 = 2847B800DBC00021</action>
            <action>maincpu.mq@BF78 = BFFE3501207FFEFA</action>
            <action>maincpu.mq@BF80 = 3E0420EFFE340120</action>
            <action>maincpu.mq@BF88 = 3E0520DFFE0618F0</action>
            <action>maincpu.mq@BF90 = 0520FBFE78778610</action>
            <action>maincpu.mq@BF98 = 20FDFE051880F67E</action>
            <action>maincpu.mq@BFA0 = FFFFCD1818D3AF03</action>
            <!--
            BF70 | 21 00 C0 : ld   hl,$C000 // sound code address
            BF73 | DB 00    : in   a,($00)  // read input
            BF75 | B8       : cp   b
            BF76 | 47       : ld   b,a
            BF77 | 28 FA    : jr   z,$BF73
            BF79 | FE 7F    : cp   $7F
            BF7B | 20 01    : jr   nz,$BF7E
            BF7D | 35       : dec  (hl)     // decrease code -01
            BF7E | FE BF    : cp   $BF
            BF80 | 20 01    : jr   nz,$BF83
            BF82 | 34       : inc  (hl)     // increase code +01
            BF83 | FE EF    : cp   $EF
            BF85 | 20 04    : jr   nz,$BF8B
            BF87 | 3E F0    : ld   a,$F0    // decrease code -10
            BF89 | 18 06    : jr   $BF91
            BF8B | FE DF    : cp   $DF
            BF8D | 20 05    : jr   nz,$BF94
            BF8F | 3E 10    : ld   a,$10    // increase code +10
            BF91 | 86       : add  a,(hl)
            BF92 | 77       : ld   (hl),a
            BF93 | 78       : ld   a,b
            BF94 | FE FB    : cp   $FB
            BF96 | 20 05    : jr   nz,$BF9D
            BF98 | 7E       : ld   a,(hl)   // play sound
            BF99 | F6 80    : or   $80
            BF9B | 18 05    : jr   $BFA2
            BF9D | FE FD    : cp   $FD
            BF9F | 20 03    : jr   nz,$BFA4
            BFA1 | AF       : xor  a        // stop sound
            BFA2 | D3 18    : out  ($18),a  // send sound code
            BFA4 | 18 CD    : jr   $BF73
            -->
        </script>
        <script state="run">
            <output format="----- ninja princess 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.mw@1ECD = 2B64            </action>
            <action>maincpu.mq@BF70 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@BF78 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@BF80 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@BF88 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@BF90 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@BF98 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@BFA0 = FFFFFFFFFFFFFFFF</action>
        </script>
    </cheat>

</mamecheat>
nprincesb.xml

Code: Select all

<!-- Ninja Princess (315-5051?, 128k Ver. bootleg?) -->
<mamecheat version="1">

    <cheat desc="no hit">
        <script state="on">
            <action>maincpu.ob@08A5 = 18</action> <!-- bullet -->
            <action>maincpu.ob@4067 = 18</action> <!-- enemy -->
            <action>maincpu.ob@5135 = 18</action> <!-- enemy -->
        </script>
        <script state="off">
            <action>maincpu.ob@08A5 = 28</action>
            <action>maincpu.ob@4067 = 28</action>
            <action>maincpu.ob@5135 = 28</action>
        </script>
    </cheat>

    <cheat desc="walk through wall (test)">
        <comment>doesn't work in river scene</comment>
        <script state="on">
            <action>maincpu.mb@02BA = 00</action>
        </script>
        <script state="off">
            <action>maincpu.mb@02BA = 0A</action>
        </script>
    </cheat>

    <cheat desc="auto fire">
        <script state="on">
            <action>maincpu.mb@0151 = 00</action> <!-- button 2 -->
            <action>maincpu.mb@0155 = 00</action> <!-- button 1 -->
        </script>
        <script state="off">
            <action>maincpu.mb@0151 = 0D</action>
            <action>maincpu.mb@0155 = 1B</action>
        </script>
    </cheat>

    <cheat desc="player speed">
        <comment>scroll speed doesn't change</comment>
        <parameter>
            <item value="0x08">01 (slow)</item>
            <item value="0x10">02      </item>
            <item value="0x30">03      </item>
            <item value="0x50">04      </item>
            <item value="0x70">05 (fast)</item>
        </parameter>
        <script state="change">
            <!-- left -->
            <action>maincpu.mb@034D = -param</action>
            <action>maincpu.mb@0352 = -param</action>
            <!-- right -->
            <action>maincpu.mb@0361 = param</action>
            <action>maincpu.mb@0366 = param</action>
            <!-- up -->
            <action>maincpu.mb@0379 = -param</action>
            <action>maincpu.mb@037E = -param</action>
            <!-- down -->
            <action>maincpu.mb@039C = param</action>
            <action>maincpu.mb@03A1 = param</action>
        </script>
        <script state="off">
            <action>maincpu.mb@034D = E0</action>
            <action>maincpu.mb@0352 = F0</action>
            <action>maincpu.mb@0361 = 20</action>
            <action>maincpu.mb@0366 = 10</action>
            <action>maincpu.mb@0379 = F0</action>
            <action>maincpu.mb@037E = F8</action>
            <action>maincpu.mb@039C = 10</action>
            <action>maincpu.mb@03A1 = 08</action>
        </script>
    </cheat>

    <cheat desc="timer speed">
        <comment>timer bar doesn't be connected</comment>
        <parameter>
            <item value="0xfe">01 (slow)</item>
            <item value="0xc0">02       </item>
            <item value="0x80">03       </item>
            <item value="0x40">04       </item>
            <item value="0x08">05 (fast)</item>
        </parameter>
        <script state="change">
            <action>maincpu.mb@186B = param</action>
        </script>
        <script state="off">
            <action>maincpu.mb@186B = 3B</action>
        </script>
    </cheat>

    <cheat desc="100% bonus">
        <script state="on">
            <action>maincpu.od@1619 = 00FFFF01</action>
            <action>maincpu.md@1619 = FF0000FF</action>
        </script>
        <script state="off">
            <action>maincpu.od@1619 = 481548ED</action>
            <action>maincpu.md@1619 = C035C3CD</action>
        </script>
    </cheat>

    <cheat desc="sound test mode">
        <comment>reset the game (F3) to enter sound test mode</comment>
        <script state="on">
            <action>maincpu.mw@1ECD = BF70            </action>
            <action>maincpu.mq@BF70 = 2847B800DBC00021</action>
            <action>maincpu.mq@BF78 = BFFE3501207FFEFA</action>
            <action>maincpu.mq@BF80 = 3E0420EFFE340120</action>
            <action>maincpu.mq@BF88 = 3E0520DFFE0618F0</action>
            <action>maincpu.mq@BF90 = 0520FBFE78778610</action>
            <action>maincpu.mq@BF98 = 20FDFE051880F67E</action>
            <action>maincpu.mq@BFA0 = FFFFCD1818D3AF03</action>
            <!--
            BF70 | 21 00 C0 : ld   hl,$C000 // sound code address
            BF73 | DB 00    : in   a,($00)  // read input
            BF75 | B8       : cp   b
            BF76 | 47       : ld   b,a
            BF77 | 28 FA    : jr   z,$BF73
            BF79 | FE 7F    : cp   $7F
            BF7B | 20 01    : jr   nz,$BF7E
            BF7D | 35       : dec  (hl)     // decrease code -01
            BF7E | FE BF    : cp   $BF
            BF80 | 20 01    : jr   nz,$BF83
            BF82 | 34       : inc  (hl)     // increase code +01
            BF83 | FE EF    : cp   $EF
            BF85 | 20 04    : jr   nz,$BF8B
            BF87 | 3E F0    : ld   a,$F0    // decrease code -10
            BF89 | 18 06    : jr   $BF91
            BF8B | FE DF    : cp   $DF
            BF8D | 20 05    : jr   nz,$BF94
            BF8F | 3E 10    : ld   a,$10    // increase code +10
            BF91 | 86       : add  a,(hl)
            BF92 | 77       : ld   (hl),a
            BF93 | 78       : ld   a,b
            BF94 | FE FB    : cp   $FB
            BF96 | 20 05    : jr   nz,$BF9D
            BF98 | 7E       : ld   a,(hl)   // play sound
            BF99 | F6 80    : or   $80
            BF9B | 18 05    : jr   $BFA2
            BF9D | FE FD    : cp   $FD
            BF9F | 20 03    : jr   nz,$BFA4
            BFA1 | AF       : xor  a        // stop sound
            BFA2 | D3 18    : out  ($18),a  // send sound code
            BFA4 | 18 CD    : jr   $BF73
            -->
        </script>
        <script state="run">
            <output format="----- ninja princess 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.mw@1ECD = 2B64            </action>
            <action>maincpu.mq@BF70 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@BF78 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@BF80 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@BF88 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@BF90 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@BF98 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@BFA0 = FFFFFFFFFFFFFFFF</action>
        </script>
    </cheat>

</mamecheat>
nprinces.xml

Code: Select all

<!-- Ninja Princess (315-5051, 64k Ver. bootleg?) -->
<mamecheat version="1">

    <cheat desc="no hit">
        <script state="on">
            <action>maincpu.ob@08A5 = 18</action> <!-- bullet -->
            <action>maincpu.ob@403B = 18</action> <!-- enemy -->
            <action>maincpu.ob@5109 = 18</action> <!-- enemy -->
        </script>
        <script state="off">
            <action>maincpu.ob@08A5 = 28</action>
            <action>maincpu.ob@403B = 28</action>
            <action>maincpu.ob@5109 = 28</action>
        </script>
    </cheat>

    <cheat desc="walk through wall (test)">
        <comment>doesn't work in river scene</comment>
        <script state="on">
            <action>maincpu.mb@02BA = 00</action>
        </script>
        <script state="off">
            <action>maincpu.mb@02BA = 0A</action>
        </script>
    </cheat>

    <cheat desc="auto fire">
        <script state="on">
            <action>maincpu.mb@0151 = 00</action> <!-- button 2 -->
            <action>maincpu.mb@0155 = 00</action> <!-- button 1 -->
        </script>
        <script state="off">
            <action>maincpu.mb@0151 = 0D</action>
            <action>maincpu.mb@0155 = 1B</action>
        </script>
    </cheat>

    <cheat desc="player speed">
        <comment>scroll speed doesn't change</comment>
        <parameter>
            <item value="0x08">01 (slow)</item>
            <item value="0x10">02      </item>
            <item value="0x30">03      </item>
            <item value="0x50">04      </item>
            <item value="0x70">05 (fast)</item>
        </parameter>
        <script state="change">
            <!-- left -->
            <action>maincpu.mb@034D = -param</action>
            <action>maincpu.mb@0352 = -param</action>
            <!-- right -->
            <action>maincpu.mb@0361 = param</action>
            <action>maincpu.mb@0366 = param</action>
            <!-- up -->
            <action>maincpu.mb@0379 = -param</action>
            <action>maincpu.mb@037E = -param</action>
            <!-- down -->
            <action>maincpu.mb@039C = param</action>
            <action>maincpu.mb@03A1 = param</action>
        </script>
        <script state="off">
            <action>maincpu.mb@034D = E0</action>
            <action>maincpu.mb@0352 = F0</action>
            <action>maincpu.mb@0361 = 20</action>
            <action>maincpu.mb@0366 = 10</action>
            <action>maincpu.mb@0379 = F0</action>
            <action>maincpu.mb@037E = F8</action>
            <action>maincpu.mb@039C = 10</action>
            <action>maincpu.mb@03A1 = 08</action>
        </script>
    </cheat>

    <cheat desc="timer speed">
        <comment>timer bar doesn't be connected</comment>
        <parameter>
            <item value="0xfe">01 (slow)</item>
            <item value="0xc0">02       </item>
            <item value="0x80">03       </item>
            <item value="0x40">04       </item>
            <item value="0x08">05 (fast)</item>
        </parameter>
        <script state="change">
            <action>maincpu.mb@1860 = param</action>
        </script>
        <script state="off">
            <action>maincpu.mb@1860 = 3B</action>
        </script>
    </cheat>

    <cheat desc="100% bonus">
        <script state="on">
            <action>maincpu.od@160E = 00FFFF01</action>
            <action>maincpu.md@160E = FF0000FF</action>
        </script>
        <script state="off">
            <action>maincpu.od@160E = C8954BED</action>
            <action>maincpu.md@160E = C03563C5</action>
        </script>
    </cheat>

    <cheat desc="sound test mode">
        <comment>reset the game (F3) to enter sound test mode</comment>
        <script state="on">
            <action>maincpu.mw@1EB1 = BF70            </action>
            <action>maincpu.mq@BF70 = 00DB16D3AFC00021</action>
            <action>maincpu.mq@BF78 = 01207FFEFA2847B8</action>
            <action>maincpu.mq@BF80 = EFFE340120BFFE35</action>
            <action>maincpu.mq@BF88 = DFFE0618F03E0420</action>
            <action>maincpu.mq@bF90 = FE787786103E0520</action>
            <action>maincpu.mq@BF98 = 051880F67E0520FB</action>
            <action>maincpu.mq@BFA0 = 1814D3AF0320FDFE</action>
            <action>maincpu.mq@BFA8 = FFFFFFFFFFFFFFCD</action>
            <!--
            BF70 | 21 00 C0 : ld   hl,$C000 // sound code address
            BF73 | AF       : xor  a        // enable sound
            BF74 | D3 16    : out  ($16),a
            BF76 | DB 00    : in   a,($00)  // read input
            BF78 | B8       : cp   b
            BF79 | 47       : ld   b,a
            BF7A | 28 FA    : jr   z,$BF76
            BF7C | FE 7F    : cp   $7F
            BF7E | 20 01    : jr   nz,$BF81
            BF80 | 35       : dec  (hl)     // decrease code -01
            BF81 | FE BF    : cp   $BF
            BF83 | 20 01    : jr   nz,$BF86
            BF85 | 34       : inc  (hl)     // increase code +10
            BF86 | FE EF    : cp   $EF
            BF88 | 20 04    : jr   nz,$BF8E
            BF8A | 3E F0    : ld   a,$F0    // decrease code -01
            BF8C | 18 06    : jr   $BF94
            BF8E | FE DF    : cp   $DF
            BF90 | 20 05    : jr   nz,$BF97
            BF92 | 3E 10    : ld   a,$10    // increase code +10
            BF94 | 86       : add  a,(hl)
            BF95 | 77       : ld   (hl),a
            BF96 | 78       : ld   a,b
            BF97 | FE FB    : cp   $FB
            BF99 | 20 05    : jr   nz,$BFA0
            BF9B | 7E       : ld   a,(hl)   // play sound
            BF9C | F6 80    : or   $80
            BF9E | 18 05    : jr   $BFA5
            BFA0 | FE FD    : cp   $FD
            BFA2 | 20 03    : jr   nz,$BFA7
            BFA4 | AF       : xor  a        // stop sound
            BFA5 | D3 14    : out  ($14),a  // send sound code
            BFA7 | 18 CD    : jr   $BF76
            -->
        </script>
        <script state="run">
            <output format="----- ninja princess 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.mw@1EB1 = 2B38            </action>
            <action>maincpu.mq@BF70 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@BF78 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@BF80 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@BF88 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@BF90 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@BF98 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@BFA0 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@BFA8 = FFFFFFFFFFFFFFFF</action>
        </script>
    </cheat>

</mamecheat>
nprincesu.xml

Code: Select all

<!-- Ninja Princess (64k Ver. not encrypted) -->
<mamecheat version="1">

    <cheat desc="no hit">
        <script state="on">
            <action>maincpu.mb@3AA1 = 18</action> <!-- enemy -->
            <action>maincpu.mb@4B6F = 18</action> <!-- enemy -->
            <action>maincpu.mb@5113 = 18</action> <!-- bullet -->
        </script>
        <script state="off">
            <action>maincpu.mb@3AA1 = 28</action>
            <action>maincpu.mb@4B6F = 28</action>
            <action>maincpu.mb@5113 = 28</action>
        </script>
    </cheat>

    <cheat desc="walk through wall (test)">
        <comment>doesn't work in river scene</comment>
        <script state="on">
            <action>maincpu.mb@2A28 = 00</action>
        </script>
        <script state="off">
            <action>maincpu.mb@2A28 = 0A</action>
        </script>
    </cheat>

    <cheat desc="auto fire">
        <script state="on">
            <action>maincpu.mb@28BF = 00</action> <!-- button 2 -->
            <action>maincpu.mb@28C3 = 00</action> <!-- button 1 -->
        </script>
        <script state="off">
            <action>maincpu.mb@28BF = 0D</action>
            <action>maincpu.mb@28C3 = 1B</action>
        </script>
    </cheat>

    <cheat desc="player speed">
        <comment>scroll speed doesn't change</comment>
        <parameter>
            <item value="0x08">01 (slow)</item>
            <item value="0x10">02      </item>
            <item value="0x30">03      </item>
            <item value="0x50">04      </item>
            <item value="0x70">05 (fast)</item>
        </parameter>
        <script state="change">
            <!-- left -->
            <action>maincpu.mb@2ABB = -param</action>
            <action>maincpu.mb@2AC0 = -param</action>
            <!-- right -->
            <action>maincpu.mb@2ACF = param</action>
            <action>maincpu.mb@2AD4 = param</action>
            <!-- up -->
            <action>maincpu.mb@2AE7 = -param</action>
            <action>maincpu.mb@2AEC = -param</action>
            <!-- down -->
            <action>maincpu.mb@2B0A = param</action>
            <action>maincpu.mb@2B0F = param</action>
        </script>
        <script state="off">
            <action>maincpu.mb@2ABB = E0</action>
            <action>maincpu.mb@2AC0 = F0</action>
            <action>maincpu.mb@2ACF = 20</action>
            <action>maincpu.mb@2AD4 = 10</action>
            <action>maincpu.mb@2AE7 = F0</action>
            <action>maincpu.mb@2AEC = F8</action>
            <action>maincpu.mb@2B0A = 10</action>
            <action>maincpu.mb@2B0F = 08</action>
        </script>
    </cheat>

    <cheat desc="timer speed">
        <comment>timer bar doesn't be connected</comment>
        <parameter>
            <item value="0xfe">01 (slow)</item>
            <item value="0xc0">02       </item>
            <item value="0x80">03       </item>
            <item value="0x40">04       </item>
            <item value="0x08">05 (fast)</item>
        </parameter>
        <script state="change">
            <action>maincpu.mb@21D5 = param</action>
        </script>
        <script state="off">
            <action>maincpu.mb@21D5 = 3B</action>
        </script>
    </cheat>

    <cheat desc="100% bonus">
        <script state="on">
            <action>maincpu.md@1F83 = 00000001</action>
        </script>
        <script state="off">
            <action>maincpu.md@1F83 = C0354BED</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@00B7 = 00DB16D3AFC00021</action>
            <action>maincpu.mq@00BF = 01207FFEFA2847B8</action>
            <action>maincpu.mq@00C7 = EFFE340120BFFE35</action>
            <action>maincpu.mq@00CF = DFFE0618F03E0420</action>
            <action>maincpu.mq@00D7 = FE787786103E0520</action>
            <action>maincpu.mq@00DF = 051880F67E0520FB</action>
            <action>maincpu.mq@00E7 = 1814D3AF0320FDFE</action>
            <action>maincpu.mq@00EF = 00000000000000CD</action>
            <!--
            00B7 | 21 00 C0 : ld   hl,$C000 // sound code address
            00BA | AF       : xor  a        // enable sound
            00BB | D3 16    : out  ($16),a
            00BD | DB 00    : in   a,($00)  // read input
            00BF | B8       : cp   b
            00C0 | 47       : ld   b,a
            00C1 | 28 FA    : jr   z,$00BD
            00C3 | FE 7F    : cp   $7F
            00C5 | 20 01    : jr   nz,$00C8
            00C7 | 35       : dec  (hl)     // decrease code -01
            00C8 | FE BF    : cp   $BF
            00CA | 20 01    : jr   nz,$00CD
            00CC | 34       : inc  (hl)     // increase code +01
            00CD | FE EF    : cp   $EF
            00CF | 20 04    : jr   nz,$00D5
            00D1 | 3E F0    : ld   a,$F0    // decrease code -10
            00D3 | 18 06    : jr   $00DB
            00D5 | FE DF    : cp   $DF
            00D7 | 20 05    : jr   nz,$00DE
            00D9 | 3E 10    : ld   a,$10    // increase code +10
            00DB | 86       : add  a,(hl)
            00DC | 77       : ld   (hl),a
            00DD | 78       : ld   a,b
            00DE | FE FB    : cp   $FB
            00E0 | 20 05    : jr   nz,$00E7
            00E2 | 7E       : ld   a,(hl)   // play sound
            00E3 | F6 80    : or   $80
            00E5 | 18 05    : jr   $00EC
            00E7 | FE FD    : cp   $FD
            00E9 | 20 03    : jr   nz,$00EE
            00EB | AF       : xor  a        // stop sound
            00EC | D3 14    : out  ($14),a  // send sound code
            00EE | 18 CD    : jr   $00BD
            -->
        </script>
        <script state="run">
            <output format="----- ninja princess 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.mq@00B7 = 10F6C01F3A0D3FCD</action>
            <action>maincpu.mq@00BF = 1032103E76C01F32</action>
            <action>maincpu.mq@00C7 = 04A7CD16D3013EC0</action>
            <action>maincpu.mq@00CF = EECD04DFCD04B5CD</action>
            <action>maincpu.mq@00D7 = 1F32EFE6C01F3A0B</action>
            <action>maincpu.mq@00DF = CDC1B832013E76C0</action>
            <action>maincpu.mq@00E7 = C532AF1C80CD0C0C</action>
            <action>maincpu.mq@00EF = 22E7C821C08432C0</action>
        </script>
    </cheat>

</mamecheat>
Post Reply