[punchkid] Oli-Boo-Chu/Punching Kid

This forum is for posting M.A.M.E. Work In Progress "Arcade"cheats that are not quite ready for the prime time. If the cheats are buggy or the cheat descriptions are non-standard then please post them here. Help maybe given but there are no guarantees and they will only be added to the cheat file when the cheat file maintainer is happy with them.
Post Reply
jman
Posts: 874
Joined: Tue Dec 01, 2020 1:24 pm
Been thanked: 3 times

[punchkid] Oli-Boo-Chu/Punching Kid

Post by jman »

punchkid was added in 0.250.

This game has in-game rom check. The following codes may cause the game crash unless set "skip rom check".

Code: Select all

<cheat desc="no hit">
    <script state="on">
        <action>maincpu.mb@3a34 = da</action> <!-- rare collision -->
        <action>maincpu.mb@3b29 = c3</action> <!-- most collision -->
    </script>
    <script state="off">
        <action>maincpu.mw@3a34 = c2</action>
        <action>maincpu.mb@3b29 = d2</action>
    </script>
</cheat>

<cheat desc="player speed">
    <parameter>
        <item value="0x08">01 (slow)</item>
        <item value="0x06">02       </item>
        <item value="0x04">03       </item>
        <item value="0x02">04       </item>
        <item value="0x01">05 (fast)</item>
    </parameter>
    <script state="on">
        <action>maincpu.md@1574 = 3200003e</action> <!-- normal way -->
        <action>maincpu.md@2800 = 6f00003e</action> <!-- narrow way -->
    </script>
    <script state="change">
        <action>maincpu.mb@1575 = param</action>
        <action>maincpu.mb@2801 = param</action>
    </script>
    <script state="off">
        <action>maincpu.md@1574 = 32f0813a</action>
        <action>maincpu.md@2800 = 6ff0833a</action>
    </script>
</cheat>

<cheat desc="move manually">
    <script state="on">
        <action>maincpu.md@177f =         207fd0cd</action>
        <action>maincpu.mq@7fd0 = 32f1163ac0f11732</action>
        <action>maincpu.mq@7fd8 = 3a40e6a0033af117</action>
        <action>maincpu.mq@7fe0 = 3a5537cd0b28a001</action>
        <action>maincpu.mq@7fe8 = 2fa0023a0328a001</action>
        <action>maincpu.mq@7ff0 = afc901fe03200fe6</action>
        <action>maincpu.mq@7ff8 = 00110500210320c9</action>
        <!--
        7fd0 | 32 17 f1 : ld   ($F117),a
        7fd3 | c0       : ret  nz
        7fd4 | 3a 16 f1 : ld   a,($F116)
        7fd7 | 32 17 f1 : ld   ($F117),a
        7fda | 3a 03 a0 : ld   a,($A003)
        7fdd | e6 40    : and  $40
        7fdf | 3a 01 a0 : ld   a,($A001)
        7fe2 | 28 0b    : jr   z,$7FEF
        7fe4 | cd 37 55 : call $5537
        7fe7 | 3a 01 a0 : ld   a,($A001)
        7fea | 28 03    : jr   z,$7FEF
        7fec | 3a 02 a0 : ld   a,($A002)
        7fef | 2f       : cpl
        7ff0 | e6 0f    : and  $0F
        7ff2 | 20 03    : jr   nz,$7FF7
        7ff4 | fe 01    : cp   $01
        7ff6 | c9       : ret
        7ff7 | af       : xor  a
        7ff8 | c9       : ret
        -->
    </script>
    <script state="off">
        <action>maincpu.md@177f =         20f11732</action>
        <action>maincpu.mq@7fd0 = 2040e6a0033a4f80</action>
        <action>maincpu.mq@7fd8 = b17fe608c23a4f01</action>
        <action>maincpu.mq@7fe0 = 00cda8023208c232</action>
        <action>maincpu.mq@7fe8 = 00cd006032803e00</action>
        <action>maincpu.mq@7ff0 = 002102e608c83a00</action>
        <action>maincpu.mq@7ff8 = 0011050021032009</action>
    </script>
</cheat>

<cheat desc="direct turn">
    <script state="on">
        <action>maincpu.mw@13f5 =             7fc0</action>
        <action>maincpu.mq@7fc0 = 260acdc547f1033a</action>
        <action>maincpu.mq@7fc8 = e60f0f70c9f910c1</action>
        <!--
        7fc0 | 3a 03 f1 : ld   a,($F103)
        7fc3 | 47       : ld   b,a
        7fc4 | c5       : push bc
        7fc5 | cd 0a 26 : call $260A
        7fc8 | c1       : pop  bc
        7fc9 | 10 f9    : djnz $7FC4
        7fcb | c9       : ret
        -->
    </script>
    <script state="off">
        <action>maincpu.mw@13f5 =             260a</action>
        <action>maincpu.mq@7fc0 = 060620b708c83a8b</action>
        <action>maincpu.mq@7fc8 = e60f0f7000c3df20</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@029f = 47b8a0013af10021</action>
        <action>maincpu.mq@02a7 = fe350120fdfef928</action>
        <action>maincpu.mq@02af = 1120f7fe340120fe</action>
        <action>maincpu.mq@02b7 = 02d421103010fe7e</action>
        <action>maincpu.mq@02bf = 18eb56235e6f8587</action>
        <action>maincpu.mq@02c7 = 0000210620fbfe07</action>
        <action>maincpu.mq@02cf = 020001cb18a80022</action>
        <action>maincpu.mq@02d7 = 2000100008000400</action>
        <action>maincpu.mq@02df = 0001000080004000</action>
        <action>maincpu.mq@02e7 = 0010000800040002</action>
        <action>maincpu.mq@02ef = 1218f08000400020</action>
        <!--
        029f | 21 00 f1 : ld  hl,$F100   // sound code address
        02a2 | 3a 01 a0 : ld  a,($A001)  // read input
        02a5 | b8       : cp  b
        02a6 | 47       : ld  b,a
        02a7 | 28 f9    : jr  z,$02A2
        02a9 | fe fd    : cp  $FD
        02ab | 20 01    : jr  nz,$02AE
        02ad | 35       : dec (hl)       // decrease code
        02ae | fe fe    : cp  $FE
        02b0 | 20 01    : jr  nz,$02B3
        02b2 | 34       : inc (hl)       // increase code
        02b3 | fe f7    : cp  $F7
        02b5 | 20 11    : jr  nz,$02C8
        02b7 | 7e       : ld  a,(hl)     // play sound
        02b8 | fe 10    : cp  $10
        02ba | 30 10    : jr  nc,$02CC
        02bc | 21 d4 02 : ld  hl,$02D4
        02bf | 87       : add a,a
        02c0 | 85       : add a,l
        02c1 | 6f       : ld  l,a
        02c2 | 5e       : ld  e,(hl)
        02c3 | 23       : inc hl
        02c4 | 56       : ld  d,(hl)
        02c5 | eb       : ex  de,hl
        02c6 | 18 07    : jr  $02CF
        02c8 | fe fb    : cp  $FB
        02ca | 20 06    : jr  nz,$02D2
        02cc | 21 00 00 : ld  hl,$0000   // stop sound
        02cf | 22 00 a8 : ld  ($A800),hl
        02d2 | 18 cb    : jr  $029F
        02d4 - 02f3     : sound code conversion table
         code  $a800 $a801
          00    01    00
          01    02    00
          02    04    00
          03    08    00
          04    10    00
          05    20    00
          06    40    00
          07    80    00
          08    00    01
          09    00    02
          0a    00    04
          0b    00    08
          0c    00    10
          0d    00    20
          0e    00    40
          0f    00    80
        -->
    </script>
    <script state="run">
        <output format="----- punching kid sound test mode -----" line="10" align="center" />
        <output format="left : decrease code"                     line="11" align="center" />
        <output format="right : increase code"                    line="12" align="center" />
        <output format="up : play sound"                          line="13" align="center" />
        <output format="down : stop sound"                        line="14" align="center" />
        <output format="----------------------------"             line="15" align="center" />
        <output format="&lt;&lt; sound code %2.2X &gt;&gt;"       line="17" align="center">
            <argument>maincpu.pb@f100</argument>
        </output>
    </script>
    <script state="off">
        <action>maincpu.mq@029f = f8c232023e06b7cd</action>
        <action>maincpu.mq@02a7 = 2e67f0003aa80232</action>
        <action>maincpu.mq@02af = 4ff0003a471f3700</action>
        <action>maincpu.mq@02b7 = 21f910fb200d23ae</action>
        <action>maincpu.mq@02bf = 6032af0a20be002e</action>
        <action>maincpu.mq@02c7 = 3aff1ff901093ef0</action>
        <action>maincpu.mq@02cf = 3a6c00ca10e6a005</action>
        <action>maincpu.mq@02d7 = af042bca80e6a003</action>
        <action>maincpu.mq@02df = 3ab7f0493af04a32</action>
        <action>maincpu.mq@02e7 = 2804e60b202fa000</action>
        <action>maincpu.mq@02ef = 1218f04932013e19</action>
    </script>
</cheat>

<cheat desc="skip rom check">
    <script state="on">
        <action>maincpu.mw@02ae = 1418</action> <!-- boot -->
        <action>maincpu.mw@04df = 2918</action> <!-- boot -->
        <action>maincpu.mw@05d1 = 2a18</action> <!-- after title -->
        <action>maincpu.mw@1cc5 = 1818</action> <!-- level clear -->
        <action>maincpu.mw@6c26 = 2918</action> <!-- test mode -->
    </script>
    <script state="off">
        <action>maincpu.mw@02ae = 002e</action>
        <action>maincpu.mw@04df = 0707</action>
        <action>maincpu.mw@05d1 = 0f57</action>
        <action>maincpu.mw@1cc5 = 0f0f</action>
        <action>maincpu.mw@6c26 = 57af</action>
    </script>
</cheat>
Post Reply