[marioj] Mario Bros.

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

[marioj] Mario Bros.

Post by jman »

Code: Select all

<cheat desc="no hit">
    <script state="on">
        <action>maincpu.mb@53e7 = d2</action> <!-- enemy -->
        <action>maincpu.mb@53eb = d2</action> <!-- fireball 1 -->
        <action>maincpu.mb@247f = 18</action> <!-- fireball 2 -->
        <action>maincpu.mb@11fe = 18</action> <!-- fireball 3 -->
        <action>maincpu.mb@2496 = c9</action> <!-- ice 1 -->
        <action>maincpu.mb@1a2e = c9</action> <!-- ice 2 -->
    </script>
    <script state="off">
        <action>maincpu.mb@53e7 = 8d</action>
        <action>maincpu.mb@53eb = 8d</action>
        <action>maincpu.mb@247f = 28</action>
        <action>maincpu.mb@11fe = 28</action>
        <action>maincpu.mb@2496 = c0</action>
        <action>maincpu.mb@1a2e = d8</action>
    </script>
</cheat>

<cheat desc="player speed">
    <parameter min="0x01" max="0x08" step="0x01" />
    <script state="on">
        <action>maincpu.md@0493 = dd000006</action>
    </script>
    <script state="change">
        <action>maincpu.mb@0494 = param</action>
    </script>
    <script state="off">
        <action>maincpu.md@0493 = dd0646dd</action>
    </script>
</cheat>

<cheat desc="slip level">
    <parameter>
        <item value="0x01">no slip  </item>
        <item value="0x10">01       </item>
        <item value="0x20">02       </item>
        <item value="0x40">03       </item>
        <item value="0x80">04       </item>
        <item value="0xff">long slip</item>
    </parameter>
    <script state="change">
        <action>maincpu.mb@041f = param</action> <!-- normal floor -->
        <action>maincpu.mb@043b = param</action> <!-- ice floor -->
        <action>maincpu.mb@0cbe = param</action> <!-- bonus floor -->
    </script>
    <script state="off">
        <action>maincpu.mb@041f = 0a</action>
        <action>maincpu.mb@043b = 16</action>
        <action>maincpu.mb@0cbe = 19</action>
    </script>
</cheat>

<cheat desc="multiple jump">
    <script state="on">
        <action>maincpu.md@038f =         4ff740cd</action>
        <action>maincpu.mq@f740 = 062880e64f127edd</action>
        <action>maincpu.mq@f748 = 7edd0177dd7fe679</action>
        <action>maincpu.mw@f750 =             c901</action>
        <!--
        038F | cd 40 f7    : call $f740
        f740 | dd 7e 12    : ld   a,(ix+$12)
        f743 | 4f          : ld   c,a
        f744 | e6 80       : and  $80
        f746 | 28 06       : jr   z,$F74e
        f748 | 79          : ld   a,c
        f749 | e6 7f       : and  $7f
        f74b | dd 77 01    : ld   (ix+$01),a
        f74e | dd 7e 01    : ld   a,(ix+$01)
        f751 | C9          : ret
        -->
    </script>
    <script state="off">
        <action>maincpu.md@038f =         4f017edd</action>
        <action>maincpu.mq@f740 = ffffffffffffffff</action>
        <action>maincpu.mq@f748 = ffffffffffffffff</action>
        <action>maincpu.mw@f750 =             ffff</action>
    </script>
</cheat>
"no hit" code is improved version of current "invincibility" because it doesn't take care of any ice enemies. But I give up testing to phase 25 so that "no hit" code doesn't work correctly when new enemy appears in later phase.
jman
Posts: 843
Joined: Tue Dec 01, 2020 1:24 pm

[marioj] Mario Bros. (update)

Post by jman »

Code: Select all

<!-- Mario Bros. (Japan, Revision C) -->
<mamecheat version="1">

    <cheat desc="no hit">
        <script state="on">
            <action>maincpu.mb@11fe = 18</action> <!-- fireball -->
            <action>maincpu.mb@1a2e = c9</action> <!-- ice -->
            <action>maincpu.mb@247f = 18</action> <!-- fireball -->
            <action>maincpu.mb@2496 = c9</action> <!-- ice -->
            <action>maincpu.mb@53e7 = d2</action> <!-- enemy -->
            <action>maincpu.mb@53eb = d2</action> <!-- fireball -->
        </script>
        <script state="off">
            <action>maincpu.mb@11fe = 28</action>
            <action>maincpu.mb@1a2e = d8</action>
            <action>maincpu.mb@247f = 28</action>
            <action>maincpu.mb@2496 = c0</action>
            <action>maincpu.mb@53e7 = 8d</action>
            <action>maincpu.mb@53eb = 8d</action>
        </script>
    </cheat>

    <cheat desc="player speed">
        <parameter>
            <item value="0x01">01 (slow)</item>
            <item value="0x02">02       </item>
            <item value="0x04">03       </item>
            <item value="0x06">04       </item>
            <item value="0x08">05 (fast)</item>
        </parameter>
        <script state="on">
            <action>maincpu.md@0493 =         ddf740cd</action>
            <action>maincpu.mq@f740 = 0cfe600a3a0646dd</action>
            <action>maincpu.mq@f748 = ffffffffc90006c0</action>
            <!--
            f740 | dd 46 06 : ld  b,(ix+$06)
            f743 | 3a 0a 60 : ld  a,($600A)
            f746 | fe 0c    : cp  $0C
            f748 | c0       : ret nz
            f749 | 06 xx    : ld  b,$xx
            f74b | c9       : ret
            -->
        </script>
        <script state="change">
            <action>maincpu.mb@f74a = param</action>
        </script>
        <script state="off">
            <action>maincpu.md@0493 =         dd0646dd</action>
            <action>maincpu.mq@f740 = ffffffffffffffff</action>
            <action>maincpu.mq@f748 = ffffffffffffffff</action>
        </script>
    </cheat>

    <cheat desc="slip level">
        <parameter>
            <item value="0x01">01 (no slip)  </item>
            <item value="0x10">02            </item>
            <item value="0x20">03            </item>
            <item value="0x40">04            </item>
            <item value="0x80">05 (long slip)</item>
        </parameter>
        <script state="on">
            <action>maincpu.md@041e =         28f750cd</action> <!-- normal floor -->
            <action>maincpu.md@043a =         28f754cd</action> <!-- ice floor -->
            <action>maincpu.md@043f =         28f754cd</action> <!-- ice floor -->
            <action>maincpu.mq@f750 = 3af5161602180a16</action>
            <action>maincpu.mq@f758 = 001602200cfe600a</action>
            <action>maincpu.mq@f760 = ffffffffffc93df1</action>
            <!--
            f750 | 16 0a    : ld   d,$0A
            f752 | 18 02    : jr   $F756
            f754 | 16 16    : ld   d,$16
            f756 | f5       : push af
            f757 | 3a 0a 60 : ld   a,($600A)
            f75a | fe 0c    : cp   $0C
            f75c | 20 02    : jr   nz,$F760
            f75e | 16 xx    : ld   d,$xx
            f760 | f1       : pop  af
            f761 | 3d       : dec  a
            f762 | c9       : ret
            -->
        </script>
        <script state="change">
            <action>maincpu.mb@f75f = param</action>
            <action>maincpu.mb@0cbe = param</action> <!-- bonus floor -->
        </script>
        <script state="off">
            <action>maincpu.md@041e =         283d0a16</action>
            <action>maincpu.md@043a =         283d1616</action>
            <action>maincpu.md@043f =         283d1616</action>
            <action>maincpu.mq@f750 = ffffffffffffffff</action>
            <action>maincpu.mq@f758 = ffffffffffffffff</action>
            <action>maincpu.mq@f760 = ffffffffffffffff</action>
            <action>maincpu.mb@0cbe =               19</action>
        </script>
    </cheat>

    <cheat desc="multiple jump">
        <script state="on">
            <action>maincpu.mw@0345 =             f770</action>
            <action>maincpu.mq@f770 = 600a3ac8a7007edd</action>
            <action>maincpu.mq@f778 = cb127edd0c200cfe</action>
            <action>maincpu.mq@f780 = 0177ddbfcb05287f</action>
            <action>maincpu.mq@f788 = ffffffffff038fc3</action>
            <!--
            f770 | dd 7e 00 : ld  a,(ix+$00)
            f773 | a7       : and a
            f774 | c8       : ret z
            f775 | 3a 0a 60 : ld  a,($600A)
            f778 | fe 0c    : cp  $0C
            f77a | 20 0c    : jr  nz,$F788
            f77c | dd 7e 12 : ld  a,(ix+$12)
            f77f | cb 7f    : bit 7,a
            f781 | 28 05    : jr  z,$F788
            f783 | cb bf    : res 7,a
            f785 | dd 77 01 : ld  (ix+$01),a
            f788 | c3 8f 03 : jp  $038F
            -->
        </script>
        <script state="off">
            <action>maincpu.mw@0345 =             f770</action>
            <action>maincpu.mq@f770 = ffffffffffffffff</action>
            <action>maincpu.mq@f778 = ffffffffffffffff</action>
            <action>maincpu.mq@f780 = ffffffffffffffff</action>
            <action>maincpu.mq@f788 = ffffffffffffffff</action>
        </script>
    </cheat>

</mamecheat>
"player speed", "slip level", "multiple jump" : previous codes works even in title and intermission. So Mario and Luigi move strangely in there scenes. New codes fix it.
Post Reply