[teddybb] TeddyBoy Blues

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

[teddybb] TeddyBoy Blues

Post by jman »

Code: Select all

<cheat desc="no hit">
    <script state="on">
        <action>maincpu.ob@3b95 = c9</action>
        <action>maincpu.ob@5d42 = c9</action>
        <action>maincpu.ob@5eda = c9</action>
        <action>maincpu.ob@61d5 = c9</action>
    </script>
    <script state="off">
        <action>maincpu.ob@3b95 = d0</action>
        <action>maincpu.ob@5d42 = d0</action>
        <action>maincpu.ob@5eda = d0</action>
        <action>maincpu.ob@61d5 = d0</action>
    </script>
</cheat>

<cheat desc="auto fire">
    <script state="on">
        <action>maincpu.ob@2d40 = 00</action>
    </script>
    <script state="off">
        <action>maincpu.ob@2d40 = c0</action>
    </script>
</cheat>

<cheat desc="bullet speed">
    <parameter>
        <item value="0x01">01 (slow)</item>
        <item value="0x04">02       </item>
        <item value="0x08">03       </item>
        <item value="0x0c">04       </item>
        <item value="0x10">05 (fast)</item>
    </parameter>
    <script state="on">
        <action>maincpu.ob@3017=                cd</action>
        <action>maincpu.mw@3018=              8c20</action>
        <action>maincpu.mq@8c20 = f0003ec8a70d7edd</action>
        <action>maincpu.mq@8c28 = ffffffffffc944ed</action>
        <!--
        8c20 | dd 7e 0d : ld  a,(ix+$0d)
        8c23 | a7       : and a
        8c24 | c8       : ret z
        8c25 | 3e xx    : ld  a,$xx
        8c27 | f0       : ret p
        8c28 | ed 44    : neg
        8c2a | c9       : ret
        -->
    </script>
    <script state="change">
        <action>maincpu.mb@8c26 =  param</action>
    </script>
    <script state="off">
        <action>maincpu.ob@3017=                dd</action>
        <action>maincpu.mw@3018=              0dde</action>
        <action>maincpu.mq@8c20 = ffffffffffffffff</action>
        <action>maincpu.mq@8c28 = ffffffffffffffff</action>
    </script>
</cheat>

<cheat desc="multiple jump">
    <script state="on">
        <!-- in jumping -->
        <action>maincpu.mw@2c8c =             8bf0</action>
        <action>maincpu.mq@8bf0 = 04e6c6283ac62921</action>
        <action>maincpu.mq@8bf8 = d6cb072056cb0928</action>
        <action>maincpu.mq@8c00 = 2c96c396cb2c52c3</action>
        <!--
        8bf0 | 21 29 c6 : ld  hl,$C629
        8bf3 | 3a 28 c6 : ld  a,($C628)
        8bf6 | e6 04    : and $04
        8bf8 | 28 09    : jr  z,$8C03
        8bfa | cb 56    : bit 2,(hl)
        8bfc | 20 07    : jr  nz,$8C05
        8bfe | cb d6    : set 2,(hl)
        8c00 | c3 52 2c : jp  $2C52
        8c03 | cb 96    : res 2,(hl)
        8c05 | c3 96 2c : jp  $2C96
        -->
        <!-- in falling -->
        <action>maincpu.mw@2ca2 =             8c08</action>
        <action>maincpu.mw@2c3b =             8c08</action>
        <action>maincpu.mq@8c08 = 04e6c6283ac62921</action>
        <action>maincpu.mq@8c10 = d6cb072056cb0928</action>
        <action>maincpu.mq@8c18 = 2caac396cb2c52c3</action>
        <!--
        8c08 | 21 29 c6 : ld  hl,$C629
        8c0b | 3a 28 c6 : ld  a,($C628)
        8c0e | e6 04    : and $04
        8c10 | 28 09    : jr  z,$8C1B
        8c12 | cb 56    : bit 2,(hl)
        8c14 | 20 07    : jr  nz,$8C1D
        8c16 | cb d6    : set 2,(hl)
        8c18 | c3 52 2c : jp  $2C52
        8c1b | cb 96    : res 2,(hl)
        8c1d | c3 aa 2c : jp  $2CAA
        -->
    </script>
    <script state="off">
    </script>
</cheat>

<cheat desc="auto kick">
    <script state="on">
        <action>maincpu.ob@6684 = 18</action>
        <action>maincpu.mb@6685 = 15</action>
    </script>
    <script state="off">
        <action>maincpu.ob@6684 = 0f</action>
        <action>maincpu.mb@6685 = 50</action>
    </script>
</cheat>

<cheat desc="timer speed">
    <parameter>
        <item value="0xff">01 (slow)</item>
        <item value="0x80">02       </item>
        <item value="0x40">03       </item>
        <item value="0x20">04       </item>
        <item value="0x01">05 (fast)</item>
    </parameter>
    <script state="on">
        <action>maincpu.od@2603 = 7700aa3e</action>
    </script>
    <script state="change">
        <action>maincpu.mb@2604 = param</action>
    </script>
    <script state="off">
        <action>maincpu.od@2603 = 77e6aa3a</action>
        <action>maincpu.mb@2604 =       0a</action>
    </script>
</cheat>

<cheat desc="sound test mode">
    <comment>set IC check skip then reset the game (F3)</comment>
    <script state="on">
        <action>maincpu.mw@2003 =             8c30</action>
        <action>maincpu.mq@8c30 = b800db8036c10021</action>
        <action>maincpu.mq@8c38 = 3501207ffefa2847</action>
        <action>maincpu.mq@8c40 = 20fdfe340120bffe</action>
        <action>maincpu.mq@8c48 = 0320fbfe05187e03</action>
        <action>maincpu.mq@8c50 = ffffffe01818d3af</action>
        <!--
        8c30 | 21 00 c1 : ld  hl,$C100 // sound code address
        8c33 | 36 80    : ld  (hl),$80 // initialize sound code
        8c35 | db 00    : in  a,($00)  // read input
        8c37 | b8       : cp  b
        8c38 | 47       : ld  b,a
        8c39 | 28 fa    : jr  z,$8C35
        8c3b | fe 7f    : cp  $7F
        8c3d | 20 01    : jr  nz,$8C40
        8c3f | 35       : dec (hl)     // decrease code
        8c40 | fe bf    : cp  $BF
        8c42 | 20 01    : jr  nz,$8C45
        8c44 | 34       : inc (hl)     // increase code
        8c45 | fe fd    : cp  $FD
        8c47 | 20 03    : jr  nz,$8C4C
        8c49 | 7e       : ld  a,(hl)   // play sound
        8c4a | 18 05    : jr  $8C51
        8c4c | fe fb    : cp  $FB
        8c4e | 20 03    : jr  nz,$8C53
        8c50 | af       : xor a        // stop sound
        8c51 | d3 18    : out ($18),a  // send sound code
        8c53 | 18 e0    : jr  $8C35
        -->
    </script>
    <script state="run">
        <output format="----- teddyboy blues 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="button 1 : play sound"                      line="13" align="center" />
        <output format="button 2 : 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@c100</argument>
        </output>
    </script>
    <script state="off">
        <action>maincpu.mw@2003 =             2842</action>
        <action>maincpu.mq@8c30 = ffffffffffffffff</action>
        <action>maincpu.mq@8c38 = ffffffffffffffff</action>
        <action>maincpu.mq@8c40 = ffffffffffffffff</action>
        <action>maincpu.mq@8c48 = ffffffffffffffff</action>
        <action>maincpu.mq@8c50 = ffffffffffffffff</action>
    </script>
</cheat>

<cheat desc="skip IC check">
    <script state="on">
        <action>maincpu.mw@0025 = 0027</action>
    </script>
    <script state="off">
        <action>maincpu.mw@0025 = 3e01</action>
    </script>
</cheat>
jman
Posts: 843
Joined: Tue Dec 01, 2020 1:24 pm

[teddybb] TeddyBoy Blues (update)

Post by jman »

Code: Select all

<cheat desc="sound test mode">
    <comment>set &quot;skip IC check&quot; then reset the game (F3)</comment>
    <script state="on">
        <action>maincpu.mw@2003 =             8c30</action>
        <action>maincpu.mq@8c30 = 2847b800dbc10021</action>
        <action>maincpu.mq@8c38 = bffe3501207ffefa</action>
        <action>maincpu.mq@8c40 = 3e0420effe340120</action>
        <action>maincpu.mq@8c48 = 3e0520dffe0618f0</action>
        <action>maincpu.mq@8c50 = 0520fdfe78778610</action>
        <action>maincpu.mq@8c58 = 20fbfe051880f67e</action>
        <action>maincpu.mq@8c60 = ffffcd1818d3af03</action>
        <!--
        8c30 | 21 00 c1 : ld  hl,$C100 // sound code address
        8c33 | db 00    : in  a,($00)  // read input
        8c35 | b8       : cp  b
        8c36 | 47       : ld  b,a
        8c37 | 28 fa    : jr  z,$8C33
        8c39 | fe 7f    : cp  $7F
        8c3b | 20 01    : jr  nz,$8C3E
        8c3d | 35       : dec (hl)     // decrease code -01
        8c3e | fe bf    : cp  $BF
        8c40 | 20 01    : jr  nz,$8C43
        8c42 | 34       : inc (hl)     // increase code +01
        8c43 | fe ef    : cp  $EF
        8c45 | 20 04    : jr  nz,$8C4B
        8c47 | 3e f0    : ld  a,$F0    // decrease code -10
        8c49 | 18 06    : jr  $8C51
        8c4b | fe df    : cp  $DF
        8c4d | 20 05    : jr  nz,$8C54
        8c4f | 3e 10    : ld  a,$10    // increase code +10
        8c51 | 86       : add a,(hl)
        8c52 | 77       : ld  (hl),a
        8c53 | 78       : ld  a,b
        8c54 | fe fd    : cp  $FD
        8c56 | 20 05    : jr  nz,$8C5D
        8c58 | 7e       : ld  a,(hl)   // play sound
        8c59 | f6 80    : or  $80
        8c5b | 18 05    : jr  $8C62
        8c5d | fe fb    : cp  $FB
        8c5f | 20 03    : jr  nz,$8C64
        8c61 | af       : xor a        // stop sound
        8c62 | d3 18    : out ($18),a
        8c64 | 18 cd    : jr  $8C33
        -->
    </script>
    <script state="run">
        <output format="----- teddyboy blues 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@2003 =             2842</action>
        <action>maincpu.mq@8c30 = ffffffffffffffff</action>
        <action>maincpu.mq@8c38 = ffffffffffffffff</action>
        <action>maincpu.mq@8c40 = ffffffffffffffff</action>
        <action>maincpu.mq@8c48 = ffffffffffffffff</action>
        <action>maincpu.mq@8c50 = ffffffffffffffff</action>
        <action>maincpu.mq@8c58 = ffffffffffffffff</action>
        <action>maincpu.mq@8c60 = ffffffffffffffff</action>
    </script>
</cheat>
"sound test mode" : rewrite routine. add up/down key (code ±10).
jman
Posts: 843
Joined: Tue Dec 01, 2020 1:24 pm

[teddybb] TeddyBoy Blues (update)

Post by jman »

teddybboa will be added in 0.256.

Code: Select all

<!-- TeddyBoy Blues (315-5111, Old Ver.) -->
<mamecheat version="1">

    <cheat desc="no hit">
        <script state="on">
            <action>maincpu.ob@3b9b = c9</action>
            <action>maincpu.ob@5d6e = c9</action>
            <action>maincpu.ob@5f06 = c9</action>
            <action>maincpu.ob@6201 = c9</action>
        </script>
        <script state="off">
            <action>maincpu.ob@3b9b = d0</action>
            <action>maincpu.ob@5d6e = d0</action>
            <action>maincpu.ob@5f06 = d0</action>
            <action>maincpu.ob@6201 = d0</action>
        </script>
    </cheat>

    <cheat desc="auto fire">
        <script state="on">
            <action>maincpu.ob@2d46 = 00</action>
        </script>
        <script state="off">
            <action>maincpu.ob@2d46 = c0</action>
        </script>
    </cheat>

    <cheat desc="bullet speed">
        <parameter>
            <item value="0x01">01 (slow)</item>
            <item value="0x08">02       </item>
            <item value="0x0c">03       </item>
            <item value="0x10">04       </item>
            <item value="0x14">05 (fast)</item>
        </parameter>
        <script state="run">
            <action>maincpu.ob@301d =               cd</action>
            <action>maincpu.mw@301e =             c790</action>
            <action>maincpu.pq@c790 = f0003ec8a70d7edd</action>
            <action>maincpu.pq@c798 = 0000000000c944ed</action>
            <!--
            c790 | dd 7e 0d : ld  a,(ix+$0d)
            c793 | a7       : and a
            c794 | c8       : ret z
            c795 | 3e xx    : ld  a,$xx
            c797 | f0       : ret p
            c798 | ed 44    : neg
            c79a | c9       : ret
            -->
            <action>maincpu.pb@c796 =  param</action>
        </script>
        <script state="off">
            <action>maincpu.ob@301d =               dd</action>
            <action>maincpu.mw@301e =             0d7e</action>
            <action>maincpu.mq@c790 = 0000000000000000</action>
            <action>maincpu.mq@c798 = 0000000000000000</action>
        </script>
    </cheat>

    <cheat desc="multiple jump">
        <script state="run">
            <!-- in jumping -->
            <action>maincpu.mw@2c92 =             c7a0</action>
            <action>maincpu.pq@c7a0 = 04e6c6283ac62921</action>
            <action>maincpu.pq@c7a8 = d6cb072056cb0928</action>
            <action>maincpu.pq@c7b0 = 2c9cc396cb2c58c3</action>
            <!--
            c7a0 | 21 29 c6 : ld  hl,$C629
            c7a3 | 3a 28 c6 : ld  a,($C628)
            c7a6 | e6 04    : and $04
            c7a8 | 28 09    : jr  z,$C7B3
            c7aa | cb 56    : bit 2,(hl)
            c7ac | 20 07    : jr  nz,$C7B5
            c7ae | cb d6    : set 2,(hl)
            c7b0 | c3 58 2c : jp  $2C58
            c7b3 | cb 96    : res 2,(hl)
            c7b5 | c3 9c 2c : jp  $2C9C
            -->
            <!-- in falling -->
            <action>maincpu.mw@2c41 =             c7b8</action>
            <action>maincpu.mw@2ca8 =             c7b8</action>
            <action>maincpu.pq@c7b8 = 04e6c6283ac62921</action>
            <action>maincpu.pq@c7c0 = d6cb072056cb0928</action>
            <action>maincpu.pq@c7c8 = 2cb0c396cb2c58c3</action>
            <!--
            c7b8 | 21 29 c6 : ld  hl,$C629
            c7bb | 3a 28 c6 : ld  a,($C628)
            c7be | e6 04    : and $04
            c7c0 | 28 09    : jr  z,$C7CB
            c7c2 | cb 56    : bit 2,(hl)
            c7c4 | 20 07    : jr  nz,$C7CD
            c7c6 | cb d6    : set 2,(hl)
            c7c8 | c3 58 2c : jp  $2C58
            c7cb | cb 96    : res 2,(hl)
            c7cd | c3 b0 2c : jp  $2CB0
            -->
        </script>
        <script state="off">
            <action>maincpu.mw@2c92 =             2c9c</action>
            <action>maincpu.pq@c7a0 = 0000000000000000</action>
            <action>maincpu.pq@c7a8 = 0000000000000000</action>
            <action>maincpu.pq@c7b0 = 0000000000000000</action>
            <action>maincpu.mw@2c41 =             2cb0</action>
            <action>maincpu.mw@2ca8 =             2cb0</action>
            <action>maincpu.pq@c7b8 = 0000000000000000</action>
            <action>maincpu.pq@c7c0 = 0000000000000000</action>
            <action>maincpu.pq@c7c8 = 0000000000000000</action>
        </script>
    </cheat>

    <cheat desc="auto kick">
        <script state="on">
            <action>maincpu.ob@66b0 = 18</action>
            <action>maincpu.mb@66b1 = 15</action>
        </script>
        <script state="off">
            <action>maincpu.ob@66b0 = 0f</action>
            <action>maincpu.mb@66b1 = d0</action>
        </script>
    </cheat>

    <cheat desc="timer speed">
        <parameter>
            <item value="0xff">01 (slow)</item>
            <item value="0x80">02       </item>
            <item value="0x40">03       </item>
            <item value="0x20">04       </item>
            <item value="0x01">05 (fast)</item>
        </parameter>
        <script state="on">
            <action>maincpu.od@2609 = 7700aa3e</action>
        </script>
        <script state="change">
            <action>maincpu.mb@260a = param</action>
        </script>
        <script state="off">
            <action>maincpu.od@2609 = 77c60a3a</action>
            <action>maincpu.mb@260a =       0a</action>
        </script>
    </cheat>

    <cheat desc="sound test mode">
        <comment>set &quot;skip IC check&quot; then reset the game (F3)</comment>
        <script state="on">
            <action>maincpu.mw@2003 =             8c30</action>
            <action>maincpu.mq@8c30 = 2847b800dbc10021</action>
            <action>maincpu.mq@8c38 = bffe3501207ffefa</action>
            <action>maincpu.mq@8c40 = 3e0420effe340120</action>
            <action>maincpu.mq@8c48 = 3e0520dffe0618f0</action>
            <action>maincpu.mq@8c50 = 0520fdfe78778610</action>
            <action>maincpu.mq@8c58 = 20fbfe051880f67e</action>
            <action>maincpu.mq@8c60 = ffffcd1818d3af03</action>
            <!--
            8c30 | 21 00 c1 : ld  hl,$C100 // sound code address
            8c33 | db 00    : in  a,($00)  // read input
            8c35 | b8       : cp  b
            8c36 | 47       : ld  b,a
            8c37 | 28 fa    : jr  z,$8C33
            8c39 | fe 7f    : cp  $7F
            8c3b | 20 01    : jr  nz,$8C3E
            8c3d | 35       : dec (hl)     // decrease code -01
            8c3e | fe bf    : cp  $BF
            8c40 | 20 01    : jr  nz,$8C43
            8c42 | 34       : inc (hl)     // increase code +01
            8c43 | fe ef    : cp  $EF
            8c45 | 20 04    : jr  nz,$8C4B
            8c47 | 3e f0    : ld  a,$F0    // decrease code -10
            8c49 | 18 06    : jr  $8C51
            8c4b | fe df    : cp  $DF
            8c4d | 20 05    : jr  nz,$8C54
            8c4f | 3e 10    : ld  a,$10    // increase code +10
            8c51 | 86       : add a,(hl)
            8c52 | 77       : ld  (hl),a
            8c53 | 78       : ld  a,b
            8c54 | fe fd    : cp  $FD
            8c56 | 20 05    : jr  nz,$8C5D
            8c58 | 7e       : ld  a,(hl)   // play sound
            8c59 | f6 80    : or  $80
            8c5b | 18 05    : jr  $8C62
            8c5d | fe fb    : cp  $FB
            8c5f | 20 03    : jr  nz,$8C64
            8c61 | af       : xor a        // stop sound
            8c62 | d3 18    : out ($18),a
            8c64 | 18 cd    : jr  $8C33
            -->
        </script>
        <script state="run">
            <output format="----- teddyboy blues 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@2003 =             2842</action>
            <action>maincpu.mq@8c30 = f8fb291bfe6639ef</action>
            <action>maincpu.mq@8c38 = 620f000375863046</action>
            <action>maincpu.mq@8c40 = 6bafbf4ffa7bb2bf</action>
            <action>maincpu.mq@8c48 = fc31210eb04e3cc9</action>
            <action>maincpu.mq@8c50 = fe7ff0ffbfe7fedf</action>
            <action>maincpu.mq@8c58 = 8048100f9804220b</action>
            <action>maincpu.mq@8c60 = fa95b879fa7f713f</action>
        </script>
    </cheat>

    <cheat desc="skip IC check">
        <script state="on">
            <action>maincpu.mw@0025 = 0027</action>
        </script>
        <script state="off">
            <action>maincpu.mw@0025 = 3e07</action>
        </script>
    </cheat>

</mamecheat>
I don't find any "empty" memory area on ROM. So I put custome routines for "bullet speed" and "multiple jump" onto RAM.
$c790 - $c7ff seems to safe (unused) area. But I'm not certain.
The game will be crashed if other routines use the same RAM address.
Please tell me when you encounter a problem by "bullet speed" or "multiple jump".

Also update teddybb.

Code: Select all

<!-- TeddyBoy Blues (315-5115, New Ver.) -->
<mamecheat version="1">

    <cheat desc="no hit">
        <script state="on">
            <action>maincpu.ob@3b95 = c9</action>
            <action>maincpu.ob@5d42 = c9</action>
            <action>maincpu.ob@5eda = c9</action>
            <action>maincpu.ob@61d5 = c9</action>
        </script>
        <script state="off">
            <action>maincpu.ob@3b95 = d0</action>
            <action>maincpu.ob@5d42 = d0</action>
            <action>maincpu.ob@5eda = d0</action>
            <action>maincpu.ob@61d5 = d0</action>
        </script>
    </cheat>

    <cheat desc="auto fire">
        <script state="on">
            <action>maincpu.ob@2d40 = 00</action>
        </script>
        <script state="off">
            <action>maincpu.ob@2d40 = c0</action>
        </script>
    </cheat>

    <cheat desc="bullet speed">
        <parameter>
            <item value="0x01">01 (slow)</item>
            <item value="0x08">02       </item>
            <item value="0x0c">03       </item>
            <item value="0x10">04       </item>
            <item value="0x14">05 (fast)</item>
        </parameter>
        <script state="on">
            <action>maincpu.ob@3017 =               cd</action>
            <action>maincpu.mw@3018 =             8bf0</action>
            <action>maincpu.mq@8bf0 = f0003ec8a70d7edd</action>
            <action>maincpu.mq@8bf8 = ffffffffffc944ed</action>
            <!--
            8bf0 | dd 7e 0d : ld  a,(ix+$0d)
            8bf3 | a7       : and a
            8bf4 | c8       : ret z
            8bf5 | 3e xx    : ld  a,$xx
            8bf7 | f0       : ret p
            8bf8 | ed 44    : neg
            8bfa | c9       : ret
            -->
        </script>
        <script state="change">
            <action>maincpu.mb@8bf6 =  param</action>
        </script>
        <script state="off">
            <action>maincpu.ob@3017 =               dd</action>
            <action>maincpu.mw@3018 =             0dde</action>
            <action>maincpu.mq@8bf0 = ffffffffffffffff</action>
            <action>maincpu.mq@8bf8 = ffffffffffffffff</action>
        </script>
    </cheat>

    <cheat desc="multiple jump">
        <script state="on">
            <!-- in jumping -->
            <action>maincpu.mw@2c8c =             8c00</action>
            <action>maincpu.mq@8c00 = 04e6c6283ac62921</action>
            <action>maincpu.mq@8c08 = d6cb072056cb0928</action>
            <action>maincpu.mq@8c10 = 2c96c396cb2c52c3</action>
            <!--
            8c00 | 21 29 c6 : ld  hl,$C629
            8c03 | 3a 28 c6 : ld  a,($C628)
            8c06 | e6 04    : and $04
            8c08 | 28 09    : jr  z,$8C13
            8c0a | cb 56    : bit 2,(hl)
            8c0c | 20 07    : jr  nz,$8C15
            8c0e | cb d6    : set 2,(hl)
            8c10 | c3 52 2c : jp  $2C52
            8c13 | cb 96    : res 2,(hl)
            8c15 | c3 96 2c : jp  $2C96
            -->
            <!-- in falling -->
            <action>maincpu.mw@2c3b =             8c18</action>
            <action>maincpu.mw@2ca2 =             8c18</action>
            <action>maincpu.mq@8c18 = 04e6c6283ac62921</action>
            <action>maincpu.mq@8c20 = d6cb072056cb0928</action>
            <action>maincpu.mq@8c28 = 2caac396cb2c52c3</action>
            <!--
            8c18 | 21 29 c6 : ld  hl,$C629
            8c1b | 3a 28 c6 : ld  a,($C628)
            8c1e | e6 04    : and $04
            8c20 | 28 09    : jr  z,$8C2B
            8c22 | cb 56    : bit 2,(hl)
            8c24 | 20 07    : jr  nz,$8C2D
            8c26 | cb d6    : set 2,(hl)
            8c28 | c3 52 2c : jp  $2C52
            8c2b | cb 96    : res 2,(hl)
            8c2d | c3 aa 2c : jp  $2CAA
            -->
        </script>
        <script state="off">
            <action>maincpu.mw@2c8c =             2c96</action>
            <action>maincpu.mq@8c00 = ffffffffffffffff</action>
            <action>maincpu.mq@8c08 = ffffffffffffffff</action>
            <action>maincpu.mq@8c10 = ffffffffffffffff</action>
            <action>maincpu.mw@2c3b =             2caa</action>
            <action>maincpu.mw@2ca2 =             2caa</action>
            <action>maincpu.mq@8c18 = ffffffffffffffff</action>
            <action>maincpu.mq@8c20 = ffffffffffffffff</action>
            <action>maincpu.mq@8c28 = ffffffffffffffff</action>
        </script>
    </cheat>

    <cheat desc="auto kick">
        <script state="on">
            <action>maincpu.ob@6684 = 18</action>
            <action>maincpu.mb@6685 = 15</action>
        </script>
        <script state="off">
            <action>maincpu.ob@6684 = 0f</action>
            <action>maincpu.mb@6685 = 50</action>
        </script>
    </cheat>

    <cheat desc="timer speed">
        <parameter>
            <item value="0xff">01 (slow)</item>
            <item value="0x80">02       </item>
            <item value="0x40">03       </item>
            <item value="0x20">04       </item>
            <item value="0x01">05 (fast)</item>
        </parameter>
        <script state="on">
            <action>maincpu.od@2603 = 7700aa3e</action>
        </script>
        <script state="change">
            <action>maincpu.mb@2604 = param</action>
        </script>
        <script state="off">
            <action>maincpu.od@2603 = 77e6aa3a</action>
            <action>maincpu.mb@2604 =       0a</action>
        </script>
    </cheat>

    <cheat desc="sound test mode">
        <comment>set &quot;skip IC check&quot; then reset the game (F3)</comment>
        <script state="on">
            <action>maincpu.mw@2003 =             8c30</action>
            <action>maincpu.mq@8c30 = 2847b800dbc10021</action>
            <action>maincpu.mq@8c38 = bffe3501207ffefa</action>
            <action>maincpu.mq@8c40 = 3e0420effe340120</action>
            <action>maincpu.mq@8c48 = 3e0520dffe0618f0</action>
            <action>maincpu.mq@8c50 = 0520fdfe78778610</action>
            <action>maincpu.mq@8c58 = 20fbfe051880f67e</action>
            <action>maincpu.mq@8c60 = ffffcd1818d3af03</action>
            <!--
            8c30 | 21 00 c1 : ld  hl,$C100 // sound code address
            8c33 | db 00    : in  a,($00)  // read input
            8c35 | b8       : cp  b
            8c36 | 47       : ld  b,a
            8c37 | 28 fa    : jr  z,$8C33
            8c39 | fe 7f    : cp  $7F
            8c3b | 20 01    : jr  nz,$8C3E
            8c3d | 35       : dec (hl)     // decrease code -01
            8c3e | fe bf    : cp  $BF
            8c40 | 20 01    : jr  nz,$8C43
            8c42 | 34       : inc (hl)     // increase code +01
            8c43 | fe ef    : cp  $EF
            8c45 | 20 04    : jr  nz,$8C4B
            8c47 | 3e f0    : ld  a,$F0    // decrease code -10
            8c49 | 18 06    : jr  $8C51
            8c4b | fe df    : cp  $DF
            8c4d | 20 05    : jr  nz,$8C54
            8c4f | 3e 10    : ld  a,$10    // increase code +10
            8c51 | 86       : add a,(hl)
            8c52 | 77       : ld  (hl),a
            8c53 | 78       : ld  a,b
            8c54 | fe fd    : cp  $FD
            8c56 | 20 05    : jr  nz,$8C5D
            8c58 | 7e       : ld  a,(hl)   // play sound
            8c59 | f6 80    : or  $80
            8c5b | 18 05    : jr  $8C62
            8c5d | fe fb    : cp  $FB
            8c5f | 20 03    : jr  nz,$8C64
            8c61 | af       : xor a        // stop sound
            8c62 | d3 18    : out ($18),a
            8c64 | 18 cd    : jr  $8C33
            -->
        </script>
        <script state="run">
            <output format="----- teddyboy blues 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@2003 =             2842</action>
            <action>maincpu.mq@8c30 = ffffffffffffffff</action>
            <action>maincpu.mq@8c38 = ffffffffffffffff</action>
            <action>maincpu.mq@8c40 = ffffffffffffffff</action>
            <action>maincpu.mq@8c48 = ffffffffffffffff</action>
            <action>maincpu.mq@8c50 = ffffffffffffffff</action>
            <action>maincpu.mq@8c58 = ffffffffffffffff</action>
            <action>maincpu.mq@8c60 = ffffffffffffffff</action>
        </script>
    </cheat>

    <cheat desc="skip IC check">
        <script state="on">
            <action>maincpu.mw@0025 = 0027</action>
        </script>
        <script state="off">
            <action>maincpu.mw@0025 = 3e01</action>
        </script>
    </cheat>

</mamecheat>
  • reallocated addresses for "bullet speed" and "multiple jump".
  • added missing codes for "off" state in "multiple jump".
  • adjusted item values for "bullet speed".
jman
Posts: 843
Joined: Tue Dec 01, 2020 1:24 pm

[teddybb]+ TeddyBoy Blues

Post by jman »

teddybb.xml

Code: Select all

<!-- TeddyBoy Blues (315-5115, New Ver.) -->
<mamecheat version="1">

    <cheat desc="no hit">
        <script state="on">
            <action>maincpu.ob@3B95 = C9</action>
            <action>maincpu.ob@5D42 = C9</action>
            <action>maincpu.ob@5EDA = C9</action>
            <action>maincpu.ob@61D5 = C9</action>
        </script>
        <script state="off">
            <action>maincpu.ob@3B95 = D0</action>
            <action>maincpu.ob@5D42 = D0</action>
            <action>maincpu.ob@5EDA = D0</action>
            <action>maincpu.ob@61D5 = D0</action>
        </script>
    </cheat>

    <cheat desc="auto fire">
        <script state="on">
            <action>maincpu.ob@2D40 = 00</action>
        </script>
        <script state="off">
            <action>maincpu.ob@2D40 = C0</action>
        </script>
    </cheat>

    <cheat desc="bullet speed">
        <parameter>
            <item value="0x01">01 (slow)</item>
            <item value="0x08">02       </item>
            <item value="0x0c">03       </item>
            <item value="0x10">04       </item>
            <item value="0x14">05 (fast)</item>
        </parameter>
        <script state="on">
            <action>maincpu.ob@3017 = CD              </action>
            <action>maincpu.mw@3018 = 8BF0            </action>
            <action>maincpu.mq@8BF0 = F0003EC8A70D7EDD</action>
            <action>maincpu.mq@8BF8 = FFFFFFFFFFC944ED</action>
            <!--
            8BF0 | DD 7E 0D : ld   a,(ix+$0d)
            8BF3 | A7       : and  a
            8BF4 | C8       : ret  z
            8BF5 | 3E xx    : ld   a,$xx
            8BF7 | F0       : ret  p
            8BF8 | ED 44    : neg
            8BFA | C9       : ret
            -->
        </script>
        <script state="change">
            <action>maincpu.mb@8BF6 =  param</action>
        </script>
        <script state="off">
            <action>maincpu.ob@3017 = DD              </action>
            <action>maincpu.mw@3018 = 0DDE            </action>
            <action>maincpu.mq@8BF0 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@8BF8 = FFFFFFFFFFFFFFFF</action>
        </script>
    </cheat>

    <cheat desc="multiple jump">
        <script state="on">
            <!-- in jumping -->
            <action>maincpu.mw@2C8C = 8C00            </action>
            <action>maincpu.mq@8C00 = 04E6C6283AC62921</action>
            <action>maincpu.mq@8C08 = D6CB072056CB0928</action>
            <action>maincpu.mq@8C10 = 2C96C396CB2C52C3</action>
            <!--
            8C00 | 21 29 C6 : ld   hl,$C629
            8C03 | 3A 28 C6 : ld   a,($C628)
            8C06 | E6 04    : and  $04
            8C08 | 28 09    : jr   z,$8C13
            8C0A | CB 56    : bit  2,(hl)
            8C0C | 20 07    : jr   nz,$8C15
            8C0E | CB D6    : set  2,(hl)
            8C10 | C3 52 2C : jp   $2C52
            8C13 | CB 96    : res  2,(hl)
            8C15 | C3 96 2C : jp   $2C96
            -->
            <!-- in falling -->
            <action>maincpu.mw@2C3B = 8C18            </action>
            <action>maincpu.mw@2CA2 = 8C18            </action>
            <action>maincpu.mq@8C18 = 04E6C6283AC62921</action>
            <action>maincpu.mq@8C20 = D6CB072056CB0928</action>
            <action>maincpu.mq@8C28 = 2CAAC396CB2C52C3</action>
            <!--
            8C18 | 21 29 C6 : ld   hl,$C629
            8C1B | 3A 28 C6 : ld   a,($C628)
            8C1E | E6 04    : and  $04
            8C20 | 28 09    : jr   z,$8C2B
            8C22 | CB 56    : bit  2,(hl)
            8C24 | 20 07    : jr   nz,$8C2D
            8C26 | CB D6    : set  2,(hl)
            8C28 | C3 52 2C : jp   $2C52
            8C2B | CB 96    : res  2,(hl)
            8C2D | C3 AA 2C : jp   $2CAA
            -->
        </script>
        <script state="off">
            <action>maincpu.mw@2C8C = 2C96            </action>
            <action>maincpu.mq@8C00 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@8C08 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@8C10 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mw@2C3B = 2CAA            </action>
            <action>maincpu.mw@2CA2 = 2CAA            </action>
            <action>maincpu.mq@8C18 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@8C20 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@8C28 = FFFFFFFFFFFFFFFF</action>
        </script>
    </cheat>

    <cheat desc="auto kick">
        <script state="on">
            <action>maincpu.ob@6684 = 18</action>
            <action>maincpu.mb@6685 = 15</action>
        </script>
        <script state="off">
            <action>maincpu.ob@6684 = 0F</action>
            <action>maincpu.mb@6685 = 50</action>
        </script>
    </cheat>

    <cheat desc="timer speed">
        <parameter>
            <item value="0xff">01 (slow)</item>
            <item value="0x80">02       </item>
            <item value="0x40">03       </item>
            <item value="0x20">04       </item>
            <item value="0x01">05 (fast)</item>
        </parameter>
        <script state="on">
            <action>maincpu.od@2603 = 7700AA3E</action>
        </script>
        <script state="change">
            <action>maincpu.mb@2604 = param</action>
        </script>
        <script state="off">
            <action>maincpu.od@2603 = 77E6AA3A</action>
            <action>maincpu.mb@2604 = 0A      </action>
        </script>
    </cheat>

    <cheat desc="sound test mode">
        <comment>set &quot;skip IC check&quot; then reset the game (F3)</comment>
        <script state="on">
            <action>maincpu.mw@2003 = 8C30            </action>
            <action>maincpu.mq@8C30 = 2847B800DBC00021</action>
            <action>maincpu.mq@8C38 = BFFE3501207FFEFA</action>
            <action>maincpu.mq@8C40 = 3E0420EFFE340120</action>
            <action>maincpu.mq@8C48 = 3E0520DFFE0618F0</action>
            <action>maincpu.mq@8C50 = 0520FDFE78778610</action>
            <action>maincpu.mq@8C58 = 20FBFE051880F67E</action>
            <action>maincpu.mq@8C60 = FFFFCD1818D3AF03</action>
            <!--
            8C30 | 21 00 C0 : ld   hl,$C000 // sound code address
            8C33 | DB 00    : in   a,($00)  // read input
            8C35 | B8       : cp   b
            8C36 | 47       : ld   b,a
            8C37 | 28 FA    : jr   z,$8C33
            8C39 | FE 7F    : cp   $7F
            8C3B | 20 01    : jr   nz,$8C3E
            8C3D | 35       : dec  (hl)     // decrease code -01
            8C3E | FE BF    : cp   $BF
            8C40 | 20 01    : jr   nz,$8C43
            8C42 | 34       : inc  (hl)     // increase code +01
            8C43 | FE EF    : cp   $EF
            8C45 | 20 04    : jr   nz,$8C4B
            8C47 | 3E F0    : ld   a,$F0    // decrease code -10
            8C49 | 18 06    : jr   $8C51
            8C4B | FE DF    : cp   $DF
            8C4D | 20 05    : jr   nz,$8C54
            8C4F | 3E 10    : ld   a,$10    // increase code +10
            8C51 | 86       : add  a,(hl)
            8C52 | 77       : ld   (hl),a
            8C53 | 78       : ld   a,b
            8C54 | FE FD    : cp   $FD
            8C56 | 20 05    : jr   nz,$8C5D
            8C58 | 7E       : ld   a,(hl)   // play sound
            8C59 | F6 80    : or   $80
            8C5B | 18 05    : jr   $8C62
            8C5D | FE FB    : cp   $FB
            8C5F | 20 03    : jr   nz,$8C64
            8C61 | AF       : xor  a        // stop sound
            8C62 | D3 18    : out  ($18),a  // send sound code
            8C64 | 18 CD    : jr   $8C33
            -->
        </script>
        <script state="run">
            <output format="----- teddyboy blues 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@2003 = 2842            </action>
            <action>maincpu.mq@8C30 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@8C38 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@8C40 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@8C48 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@8C50 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@8C58 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@8C60 = FFFFFFFFFFFFFFFF</action>
        </script>
    </cheat>

    <cheat desc="skip IC check">
        <script state="on">
            <action>maincpu.mw@0025 = 0027</action>
        </script>
        <script state="off">
            <action>maincpu.mw@0025 = 3E01</action>
        </script>
    </cheat>

</mamecheat>
teddybbo.xml

Code: Select all

<!-- TeddyBoy Blues (315-5115, Old Ver.) -->
<mamecheat version="1">

    <cheat desc="no hit">
        <script state="on">
            <action>maincpu.ob@3B9B = C9</action>
            <action>maincpu.ob@5D6E = C9</action>
            <action>maincpu.ob@5F06 = C9</action>
            <action>maincpu.ob@6201 = C9</action>
        </script>
        <script state="off">
            <action>maincpu.ob@3B9B = D0</action>
            <action>maincpu.ob@5D6E = D0</action>
            <action>maincpu.ob@5F06 = D0</action>
            <action>maincpu.ob@6201 = D0</action>
        </script>
    </cheat>

    <cheat desc="auto fire">
        <script state="on">
            <action>maincpu.ob@2D46 = 00</action>
        </script>
        <script state="off">
            <action>maincpu.ob@2D46 = C0</action>
        </script>
    </cheat>

    <cheat desc="bullet speed">
        <parameter>
            <item value="0x01">01 (slow)</item>
            <item value="0x08">02       </item>
            <item value="0x0c">03       </item>
            <item value="0x10">04       </item>
            <item value="0x14">05 (fast)</item>
        </parameter>
        <script state="on">
            <action>maincpu.ob@301D = CD  </action>
            <action>maincpu.mw@301E = C790</action>
        </script>
        <script state="run">
            <action>maincpu.pq@C790 = F0003EC8A70D7EDD</action>
            <action>maincpu.pq@C798 = 0000000000C944ED</action>
            <!--
            C790 | DD 7E 0D : ld   a,(ix+$0d)
            C793 | A7       : and  a
            C794 | C8       : ret  z
            C795 | 3E xx    : ld   a,$xx
            C797 | F0       : ret  p
            C798 | ED 44    : neg
            C79A | C9       : ret
            -->
            <action>maincpu.pb@C796 =  param</action>
        </script>
        <script state="off">
            <action>maincpu.ob@301D = DD              </action>
            <action>maincpu.mw@301E = 0DDE            </action>
            <action>maincpu.pq@C790 = 0000000000000000</action>
            <action>maincpu.pq@C798 = 0000000000000000</action>
        </script>
    </cheat>

    <cheat desc="multiple jump">
        <script state="on">
            <action>maincpu.mw@2C92 = C7A0</action> <!-- in jumping -->
            <action>maincpu.mw@2C41 = C7B8</action> <!-- in falling -->
            <action>maincpu.mw@2CA8 = C7B8</action> <!-- in falling -->
        </script>
        <script state="run">
            <!-- in jumping -->
            <action>maincpu.pq@C7A0 = 04E6C6283AC62921</action>
            <action>maincpu.pq@C7A8 = D6CB072056CB0928</action>
            <action>maincpu.pq@C7B0 = 2C9CC396CB2C58C3</action>
            <!-- in falling -->
            <action>maincpu.pq@C7B8 = 04E6C6283AC62921</action>
            <action>maincpu.pq@C7C0 = D6CB072056CB0928</action>
            <action>maincpu.pq@C7C8 = 2CB0C396CB2C58C3</action>
            <!--
            C7A0 | 21 29 C6 : ld   hl,$C629  // in jumping
            C7A3 | 3A 28 C6 : ld   a,($C628)
            C7A6 | E6 04    : and  $04
            C7A8 | 28 09    : jr   z,$C7B3
            C7AA | CB 56    : bit  2,(hl)
            C7AC | 20 07    : jr   nz,$C7B5
            C7AE | CB D6    : set  2,(hl)
            C7B0 | C3 58 2C : jp   $2C58
            C7B3 | CB 96    : res  2,(hl)
            C7B5 | C3 9C 2C : jp   $2C9C
            C7B8 | 21 29 C6 : ld   hl,$C629  // in falling
            C7BB | 3A 28 C6 : ld   a,($C628)
            C7BE | E6 04    : and  $04
            C7C0 | 28 09    : jr   z,$C7CB
            C7C2 | CB 56    : bit  2,(hl)
            C7C4 | 20 07    : jr   nz,$C7CD
            C7C6 | CB D6    : set  2,(hl)
            C7C8 | C3 58 2C : jp   $2C58
            C7CB | CB 96    : res  2,(hl)
            C7CD | C3 B0 2C : jp   $2CB0
            -->
        </script>
        <script state="off">
            <action>maincpu.mw@2C92 = 2C9C            </action>
            <action>maincpu.mw@2C41 = 2CB0            </action>
            <action>maincpu.mw@2CA8 = 2CB0            </action>
            <action>maincpu.pq@C7A0 = 0000000000000000</action>
            <action>maincpu.pq@C7A8 = 0000000000000000</action>
            <action>maincpu.pq@C7B0 = 0000000000000000</action>
            <action>maincpu.pq@C7B8 = 0000000000000000</action>
            <action>maincpu.pq@C7C0 = 0000000000000000</action>
            <action>maincpu.pq@C7C8 = 0000000000000000</action>
        </script>
    </cheat>

    <cheat desc="auto kick">
        <script state="on">
            <action>maincpu.ob@66B0 = 18</action>
            <action>maincpu.mb@66B1 = 15</action>
        </script>
        <script state="off">
            <action>maincpu.ob@66B0 = 0F</action>
            <action>maincpu.mb@66B1 = 70</action>
        </script>
    </cheat>

    <cheat desc="timer speed">
        <parameter>
            <item value="0xff">01 (slow)</item>
            <item value="0x80">02       </item>
            <item value="0x40">03       </item>
            <item value="0x20">04       </item>
            <item value="0x01">05 (fast)</item>
        </parameter>
        <script state="on">
            <action>maincpu.od@2609 = 7700FF3E</action>
        </script>
        <script state="change">
            <action>maincpu.mb@260A = param</action>
        </script>
        <script state="off">
            <action>maincpu.od@2609 = 77E6AA3A</action>
            <action>maincpu.mb@260A = 0A      </action>
        </script>
    </cheat>

    <cheat desc="sound test mode">
        <comment>set &quot;skip IC check&quot; then reset the game (F3)</comment>
        <script state="on">
            <action>maincpu.mw@2003 = C7D0</action>
        </script>
        <script state="run">
            <action>maincpu.pq@C7D0 = 2847B800DBC00021</action>
            <action>maincpu.pq@C7D8 = BFFE3501207FFEFA</action>
            <action>maincpu.pq@C7E0 = 3E0420EFFE340120</action>
            <action>maincpu.pq@C7E8 = 3E0520DFFE0618F0</action>
            <action>maincpu.pq@C7F0 = 0520FDFE78778610</action>
            <action>maincpu.pq@C7F8 = 20FBFE051880F67E</action>
            <action>maincpu.pq@C800 = 0000CD1818D3AF03</action>
            <!--
            C7D0 | 21 00 C0 : ld   hl,$C000 // sound code address
            C7D3 | DB 00    : in   a,($00)  // read input
            C7D5 | B8       : cp   b
            C7D6 | 47       : ld   b,a
            C7D7 | 28 FA    : jr   z,$C7D3
            C7D9 | FE 7F    : cp   $7F
            C7DB | 20 01    : jr   nz,$C7DE
            C7DD | 35       : dec  (hl)     // decrease code -01
            C7DE | FE BF    : cp   $BF
            C7E0 | 20 01    : jr   nz,$C7E3
            C7E2 | 34       : inc  (hl)     // increase code +01
            C7E3 | FE EF    : cp   $EF
            C7E5 | 20 04    : jr   nz,$C7EB
            C7E7 | 3E F0    : ld   a,$F0    // decrease code -10
            C7E9 | 18 06    : jr   $C7F1
            C7EB | FE DF    : cp   $DF
            C7ED | 20 05    : jr   nz,$C7F4
            C7EF | 3E 10    : ld   a,$10    // increase code +10
            C7F1 | 86       : add  a,(hl)
            C7F2 | 77       : ld   (hl),a
            C7F3 | 78       : ld   a,b
            C7F4 | FE FD    : cp   $FD
            C7F6 | 20 05    : jr   nz,$C7FD
            C7F8 | 7E       : ld   a,(hl)   // play sound
            C7F9 | F6 80    : or   $80
            C7FB | 18 05    : jr   $C802
            C7FD | FE FB    : cp   $FB
            C7FF | 20 03    : jr   nz,$C804
            C801 | AF       : xor  a        // stop sound
            C802 | D3 18    : out  ($18),a  // send sound code
            C804 | 18 CD    : jr   $C7D3
            -->
            <output format="----- teddyboy blues 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@2003 = 284D            </action>
            <action>maincpu.pq@C7D0 = 0000000000000000</action>
            <action>maincpu.pq@C7D8 = 0000000000000000</action>
            <action>maincpu.pq@C7E0 = 0000000000000000</action>
            <action>maincpu.pq@C7E8 = 0000000000000000</action>
            <action>maincpu.pq@C7F0 = 0000000000000000</action>
            <action>maincpu.pq@C7F8 = 0000000000000000</action>
            <action>maincpu.pq@C800 = 0000000000000000</action>
        </script>
    </cheat>

    <cheat desc="skip IC check">
        <script state="on">
            <action>maincpu.mw@0025 = 0027</action>
        </script>
        <script state="off">
            <action>maincpu.mw@0025 = 3E07</action>
        </script>
    </cheat>

</mamecheat>
teddybboa.xml

Code: Select all

<!-- TeddyBoy Blues (315-5111, Old Ver.) -->
<mamecheat version="1">

    <cheat desc="no hit">
        <script state="on">
            <action>maincpu.ob@3B9B = C9</action>
            <action>maincpu.ob@5D6E = C9</action>
            <action>maincpu.ob@5F06 = C9</action>
            <action>maincpu.ob@6201 = C9</action>
        </script>
        <script state="off">
            <action>maincpu.ob@3B9B = D0</action>
            <action>maincpu.ob@5D6E = D0</action>
            <action>maincpu.ob@5F06 = D0</action>
            <action>maincpu.ob@6201 = D0</action>
        </script>
    </cheat>

    <cheat desc="auto fire">
        <script state="on">
            <action>maincpu.ob@2D46 = 00</action>
        </script>
        <script state="off">
            <action>maincpu.ob@2D46 = C0</action>
        </script>
    </cheat>

    <cheat desc="bullet speed">
        <parameter>
            <item value="0x01">01 (slow)</item>
            <item value="0x08">02       </item>
            <item value="0x0c">03       </item>
            <item value="0x10">04       </item>
            <item value="0x14">05 (fast)</item>
        </parameter>
        <script state="on">
            <action>maincpu.ob@301D = CD  </action>
            <action>maincpu.mw@301E = C790</action>
        </script>
        <script state="run">
            <action>maincpu.pq@C790 = F0003EC8A70D7EDD</action>
            <action>maincpu.pq@C798 = 0000000000C944ED</action>
            <!--
            C790 | DD 7E 0D : ld   a,(ix+$0d)
            C793 | A7       : and  a
            C794 | C8       : ret  z
            C795 | 3E xx    : ld   a,$xx
            C797 | F0       : ret  p
            C798 | ED 44    : neg
            C79A | C9       : ret
            -->
            <action>maincpu.pb@C796 =  param</action>
        </script>
        <script state="off">
            <action>maincpu.ob@301D = DD              </action>
            <action>maincpu.mw@301E = 0DDE            </action>
            <action>maincpu.pq@C790 = 0000000000000000</action>
            <action>maincpu.pq@C798 = 0000000000000000</action>
        </script>
    </cheat>

    <cheat desc="multiple jump">
        <script state="on">
            <action>maincpu.mw@2C92 = C7A0</action> <!-- in jumping -->
            <action>maincpu.mw@2C41 = C7B8</action> <!-- in falling -->
            <action>maincpu.mw@2CA8 = C7B8</action> <!-- in falling -->
        </script>
        <script state="run">
            <!-- in jumping -->
            <action>maincpu.pq@C7A0 = 04E6C6283AC62921</action>
            <action>maincpu.pq@C7A8 = D6CB072056CB0928</action>
            <action>maincpu.pq@C7B0 = 2C9CC396CB2C58C3</action>
            <!-- in falling -->
            <action>maincpu.pq@C7B8 = 04E6C6283AC62921</action>
            <action>maincpu.pq@C7C0 = D6CB072056CB0928</action>
            <action>maincpu.pq@C7C8 = 2CB0C396CB2C58C3</action>
            <!--
            C7A0 | 21 29 C6 : ld   hl,$C629  // in jumping
            C7A3 | 3A 28 C6 : ld   a,($C628)
            C7A6 | E6 04    : and  $04
            C7A8 | 28 09    : jr   z,$C7B3
            C7AA | CB 56    : bit  2,(hl)
            C7AC | 20 07    : jr   nz,$C7B5
            C7AE | CB D6    : set  2,(hl)
            C7B0 | C3 58 2C : jp   $2C58
            C7B3 | CB 96    : res  2,(hl)
            C7B5 | C3 9C 2C : jp   $2C9C
            C7B8 | 21 29 C6 : ld   hl,$C629  // in falling
            C7BB | 3A 28 C6 : ld   a,($C628)
            C7BE | E6 04    : and  $04
            C7C0 | 28 09    : jr   z,$C7CB
            C7C2 | CB 56    : bit  2,(hl)
            C7C4 | 20 07    : jr   nz,$C7CD
            C7C6 | CB D6    : set  2,(hl)
            C7C8 | C3 58 2C : jp   $2C58
            C7CB | CB 96    : res  2,(hl)
            C7CD | C3 B0 2C : jp   $2CB0
            -->
        </script>
        <script state="off">
            <action>maincpu.mw@2C92 = 2C9C            </action>
            <action>maincpu.mw@2C41 = 2CB0            </action>
            <action>maincpu.mw@2CA8 = 2CB0            </action>
            <action>maincpu.pq@C7A0 = 0000000000000000</action>
            <action>maincpu.pq@C7A8 = 0000000000000000</action>
            <action>maincpu.pq@C7B0 = 0000000000000000</action>
            <action>maincpu.pq@C7B8 = 0000000000000000</action>
            <action>maincpu.pq@C7C0 = 0000000000000000</action>
            <action>maincpu.pq@C7C8 = 0000000000000000</action>
        </script>
    </cheat>

    <cheat desc="auto kick">
        <script state="on">
            <action>maincpu.ob@66B0 = 18</action>
            <action>maincpu.mb@66B1 = 15</action>
        </script>
        <script state="off">
            <action>maincpu.ob@66B0 = 0F</action>
            <action>maincpu.mb@66B1 = 70</action>
        </script>
    </cheat>

    <cheat desc="timer speed">
        <parameter>
            <item value="0xff">01 (slow)</item>
            <item value="0x80">02       </item>
            <item value="0x40">03       </item>
            <item value="0x20">04       </item>
            <item value="0x01">05 (fast)</item>
        </parameter>
        <script state="on">
            <action>maincpu.od@2609 = 7700FF3E</action>
        </script>
        <script state="change">
            <action>maincpu.mb@260A = param</action>
        </script>
        <script state="off">
            <action>maincpu.od@2609 = 77E6AA3A</action>
            <action>maincpu.mb@260A = 0A      </action>
        </script>
    </cheat>

    <cheat desc="sound test mode">
        <comment>set &quot;skip IC check&quot; then reset the game (F3)</comment>
        <script state="on">
            <action>maincpu.mw@2003 = C7D0</action>
        </script>
        <script state="run">
            <action>maincpu.pq@C7D0 = 2847B800DBC00021</action>
            <action>maincpu.pq@C7D8 = BFFE3501207FFEFA</action>
            <action>maincpu.pq@C7E0 = 3E0420EFFE340120</action>
            <action>maincpu.pq@C7E8 = 3E0520DFFE0618F0</action>
            <action>maincpu.pq@C7F0 = 0520FDFE78778610</action>
            <action>maincpu.pq@C7F8 = 20FBFE051880F67E</action>
            <action>maincpu.pq@C800 = 0000CD1818D3AF03</action>
            <!--
            C7D0 | 21 00 C0 : ld   hl,$C000 // sound code address
            C7D3 | DB 00    : in   a,($00)  // read input
            C7D5 | B8       : cp   b
            C7D6 | 47       : ld   b,a
            C7D7 | 28 FA    : jr   z,$C7D3
            C7D9 | FE 7F    : cp   $7F
            C7DB | 20 01    : jr   nz,$C7DE
            C7DD | 35       : dec  (hl)     // decrease code -01
            C7DE | FE BF    : cp   $BF
            C7E0 | 20 01    : jr   nz,$C7E3
            C7E2 | 34       : inc  (hl)     // increase code +01
            C7E3 | FE EF    : cp   $EF
            C7E5 | 20 04    : jr   nz,$C7EB
            C7E7 | 3E F0    : ld   a,$F0    // decrease code -10
            C7E9 | 18 06    : jr   $C7F1
            C7EB | FE DF    : cp   $DF
            C7ED | 20 05    : jr   nz,$C7F4
            C7EF | 3E 10    : ld   a,$10    // increase code +10
            C7F1 | 86       : add  a,(hl)
            C7F2 | 77       : ld   (hl),a
            C7F3 | 78       : ld   a,b
            C7F4 | FE FD    : cp   $FD
            C7F6 | 20 05    : jr   nz,$C7FD
            C7F8 | 7E       : ld   a,(hl)   // play sound
            C7F9 | F6 80    : or   $80
            C7FB | 18 05    : jr   $C802
            C7FD | FE FB    : cp   $FB
            C7FF | 20 03    : jr   nz,$C804
            C801 | AF       : xor  a        // stop sound
            C802 | D3 18    : out  ($18),a  // send sound code
            C804 | 18 CD    : jr   $C7D3
            -->
            <output format="----- teddyboy blues 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@2003 = 284D            </action>
            <action>maincpu.pq@C7D0 = 0000000000000000</action>
            <action>maincpu.pq@C7D8 = 0000000000000000</action>
            <action>maincpu.pq@C7E0 = 0000000000000000</action>
            <action>maincpu.pq@C7E8 = 0000000000000000</action>
            <action>maincpu.pq@C7F0 = 0000000000000000</action>
            <action>maincpu.pq@C7F8 = 0000000000000000</action>
            <action>maincpu.pq@C800 = 0000000000000000</action>
        </script>
    </cheat>

    <cheat desc="skip IC check">
        <script state="on">
            <action>maincpu.mw@0025 = 0027</action>
        </script>
        <script state="off">
            <action>maincpu.mw@0025 = 3E07</action>
        </script>
    </cheat>

</mamecheat>
teddybbobl.xml

Code: Select all

<!-- TeddyBoy Blues (Old Ver. bootleg) -->
<mamecheat version="1">

    <cheat desc="no hit">
        <script state="on">
            <action>maincpu.ob@3B9B = C9</action>
            <action>maincpu.ob@5D6E = C9</action>
            <action>maincpu.ob@5F06 = C9</action>
            <action>maincpu.ob@6201 = C9</action>
        </script>
        <script state="off">
            <action>maincpu.ob@3B9B = D0</action>
            <action>maincpu.ob@5D6E = D0</action>
            <action>maincpu.ob@5F06 = D0</action>
            <action>maincpu.ob@6201 = D0</action>
        </script>
    </cheat>

    <cheat desc="auto fire">
        <script state="on">
            <action>maincpu.ob@2D46 = 00</action>
        </script>
        <script state="off">
            <action>maincpu.ob@2D46 = C0</action>
        </script>
    </cheat>

    <cheat desc="bullet speed">
        <parameter>
            <item value="0x01">01 (slow)</item>
            <item value="0x08">02       </item>
            <item value="0x0c">03       </item>
            <item value="0x10">04       </item>
            <item value="0x14">05 (fast)</item>
        </parameter>
        <script state="on">
            <action>maincpu.ob@301D = CD  </action>
            <action>maincpu.mw@301E = C790</action>
        </script>
        <script state="run">
            <action>maincpu.pq@C790 = F0003EC8A70D7EDD</action>
            <action>maincpu.pq@C798 = 0000000000C944ED</action>
            <!--
            C790 | DD 7E 0D : ld   a,(ix+$0d)
            C793 | A7       : and  a
            C794 | C8       : ret  z
            C795 | 3E xx    : ld   a,$xx
            C797 | F0       : ret  p
            C798 | ED 44    : neg
            C79A | C9       : ret
            -->
            <action>maincpu.pb@C796 =  param</action>
        </script>
        <script state="off">
            <action>maincpu.ob@301D = DD              </action>
            <action>maincpu.mw@301E = 0DDE            </action>
            <action>maincpu.pq@C790 = 0000000000000000</action>
            <action>maincpu.pq@C798 = 0000000000000000</action>
        </script>
    </cheat>

    <cheat desc="multiple jump">
        <script state="on">
            <action>maincpu.mw@2C92 = C7A0</action> <!-- in jumping -->
            <action>maincpu.mw@2C41 = C7B8</action> <!-- in falling -->
            <action>maincpu.mw@2CA8 = C7B8</action> <!-- in falling -->
        </script>
        <script state="run">
            <!-- in jumping -->
            <action>maincpu.pq@C7A0 = 04E6C6283AC62921</action>
            <action>maincpu.pq@C7A8 = D6CB072056CB0928</action>
            <action>maincpu.pq@C7B0 = 2C9CC396CB2C58C3</action>
            <!-- in falling -->
            <action>maincpu.pq@C7B8 = 04E6C6283AC62921</action>
            <action>maincpu.pq@C7C0 = D6CB072056CB0928</action>
            <action>maincpu.pq@C7C8 = 2CB0C396CB2C58C3</action>
            <!--
            C7A0 | 21 29 C6 : ld   hl,$C629  // in jumping
            C7A3 | 3A 28 C6 : ld   a,($C628)
            C7A6 | E6 04    : and  $04
            C7A8 | 28 09    : jr   z,$C7B3
            C7AA | CB 56    : bit  2,(hl)
            C7AC | 20 07    : jr   nz,$C7B5
            C7AE | CB D6    : set  2,(hl)
            C7B0 | C3 58 2C : jp   $2C58
            C7B3 | CB 96    : res  2,(hl)
            C7B5 | C3 9C 2C : jp   $2C9C
            C7B8 | 21 29 C6 : ld   hl,$C629  // in falling
            C7BB | 3A 28 C6 : ld   a,($C628)
            C7BE | E6 04    : and  $04
            C7C0 | 28 09    : jr   z,$C7CB
            C7C2 | CB 56    : bit  2,(hl)
            C7C4 | 20 07    : jr   nz,$C7CD
            C7C6 | CB D6    : set  2,(hl)
            C7C8 | C3 58 2C : jp   $2C58
            C7CB | CB 96    : res  2,(hl)
            C7CD | C3 B0 2C : jp   $2CB0
            -->
        </script>
        <script state="off">
            <action>maincpu.mw@2C92 = 2C9C            </action>
            <action>maincpu.mw@2C41 = 2CB0            </action>
            <action>maincpu.mw@2CA8 = 2CB0            </action>
            <action>maincpu.pq@C7A0 = 0000000000000000</action>
            <action>maincpu.pq@C7A8 = 0000000000000000</action>
            <action>maincpu.pq@C7B0 = 0000000000000000</action>
            <action>maincpu.pq@C7B8 = 0000000000000000</action>
            <action>maincpu.pq@C7C0 = 0000000000000000</action>
            <action>maincpu.pq@C7C8 = 0000000000000000</action>
        </script>
    </cheat>

    <cheat desc="auto kick">
        <script state="on">
            <action>maincpu.ob@66B0 = 18</action>
            <action>maincpu.mb@66B1 = 15</action>
        </script>
        <script state="off">
            <action>maincpu.ob@66B0 = 0F</action>
            <action>maincpu.mb@66B1 = 70</action>
        </script>
    </cheat>

    <cheat desc="timer speed">
        <parameter>
            <item value="0xff">01 (slow)</item>
            <item value="0x80">02       </item>
            <item value="0x40">03       </item>
            <item value="0x20">04       </item>
            <item value="0x01">05 (fast)</item>
        </parameter>
        <script state="on">
            <action>maincpu.od@2609 = 7700FF3E</action>
        </script>
        <script state="change">
            <action>maincpu.mb@260A = param</action>
        </script>
        <script state="off">
            <action>maincpu.od@2609 = 77E6AA3A</action>
            <action>maincpu.mb@260A = 0A      </action>
        </script>
    </cheat>

    <cheat desc="sound test mode">
        <comment>set &quot;skip IC check&quot; then reset the game (F3)</comment>
        <script state="on">
            <action>maincpu.mw@2003 = C7D0</action>
        </script>
        <script state="run">
            <action>maincpu.pq@C7D0 = 2847B800DBC00021</action>
            <action>maincpu.pq@C7D8 = BFFE3501207FFEFA</action>
            <action>maincpu.pq@C7E0 = 3E0420EFFE340120</action>
            <action>maincpu.pq@C7E8 = 3E0520DFFE0618F0</action>
            <action>maincpu.pq@C7F0 = 0520FDFE78778610</action>
            <action>maincpu.pq@C7F8 = 20FBFE051880F67E</action>
            <action>maincpu.pq@C800 = 0000CD1818D3AF03</action>
            <!--
            C7D0 | 21 00 C0 : ld   hl,$C000 // sound code address
            C7D3 | DB 00    : in   a,($00)  // read input
            C7D5 | B8       : cp   b
            C7D6 | 47       : ld   b,a
            C7D7 | 28 FA    : jr   z,$C7D3
            C7D9 | FE 7F    : cp   $7F
            C7DB | 20 01    : jr   nz,$C7DE
            C7DD | 35       : dec  (hl)     // decrease code -01
            C7DE | FE BF    : cp   $BF
            C7E0 | 20 01    : jr   nz,$C7E3
            C7E2 | 34       : inc  (hl)     // increase code +01
            C7E3 | FE EF    : cp   $EF
            C7E5 | 20 04    : jr   nz,$C7EB
            C7E7 | 3E F0    : ld   a,$F0    // decrease code -10
            C7E9 | 18 06    : jr   $C7F1
            C7EB | FE DF    : cp   $DF
            C7ED | 20 05    : jr   nz,$C7F4
            C7EF | 3E 10    : ld   a,$10    // increase code +10
            C7F1 | 86       : add  a,(hl)
            C7F2 | 77       : ld   (hl),a
            C7F3 | 78       : ld   a,b
            C7F4 | FE FD    : cp   $FD
            C7F6 | 20 05    : jr   nz,$C7FD
            C7F8 | 7E       : ld   a,(hl)   // play sound
            C7F9 | F6 80    : or   $80
            C7FB | 18 05    : jr   $C802
            C7FD | FE FB    : cp   $FB
            C7FF | 20 03    : jr   nz,$C804
            C801 | AF       : xor  a        // stop sound
            C802 | D3 18    : out  ($18),a  // send sound code
            C804 | 18 CD    : jr   $C7D3
            -->
            <output format="----- teddyboy blues 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@2003 = 284D            </action>
            <action>maincpu.pq@C7D0 = 0000000000000000</action>
            <action>maincpu.pq@C7D8 = 0000000000000000</action>
            <action>maincpu.pq@C7E0 = 0000000000000000</action>
            <action>maincpu.pq@C7E8 = 0000000000000000</action>
            <action>maincpu.pq@C7F0 = 0000000000000000</action>
            <action>maincpu.pq@C7F8 = 0000000000000000</action>
            <action>maincpu.pq@C800 = 0000000000000000</action>
        </script>
    </cheat>

    <cheat desc="skip IC check">
        <script state="on">
            <action>maincpu.mw@0025 = 0027</action>
        </script>
        <script state="off">
            <action>maincpu.mw@0025 = 3E07</action>
        </script>
    </cheat>

</mamecheat>
Post Reply