[leprechn] Leprechaun

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

[leprechn] Leprechaun

Post by jman »

Code: Select all

<!-- Leprechaun (set 1) -->
<mamecheat version="1">

    <cheat desc="player speed">
        <parameter>
            <item value="0x02">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.mb@8c99 = a9</action> <!-- right -->
            <action>maincpu.mb@8ca4 = a9</action> <!-- upper-right -->
            <action>maincpu.mb@8cb2 = a9</action> <!-- up -->
            <action>maincpu.mb@8cbb = e9</action> <!-- upper-left : left -->
            <action>maincpu.mb@8cc0 = a9</action> <!-- upper-left : up -->
            <action>maincpu.mb@8cc9 = e9</action> <!-- left -->
            <action>maincpu.mb@8cd7 = e9</action> <!-- lower-left -->
            <action>maincpu.mb@8ce8 = e9</action> <!-- down -->
            <action>maincpu.mb@8cee = a9</action> <!-- lower-right : right -->
            <action>maincpu.mb@8cf6 = e9</action> <!-- lower-right : down -->
        </script>
        <script state="change">
            <action>maincpu.mb@8c9a = param</action>
            <action>maincpu.mb@8ca5 = param</action>
            <action>maincpu.mb@8cb3 = param</action>
            <action>maincpu.mb@8cbc = param</action>
            <action>maincpu.mb@8cc1 = param</action>
            <action>maincpu.mb@8cca = param</action>
            <action>maincpu.mb@8cd8 = param</action>
            <action>maincpu.mb@8ce9 = param</action>
            <action>maincpu.mb@8cef = param</action>
            <action>maincpu.mb@8cf7 = param</action>
        </script>
        <script state="off">
            <action>maincpu.mw@8c99 = 13a5</action>
            <action>maincpu.mw@8ca4 = 14a5</action>
            <action>maincpu.mw@8cb2 = 13a5</action>
            <action>maincpu.mw@8cbb = 14e5</action>
            <action>maincpu.mw@8cc0 = 14a5</action>
            <action>maincpu.mw@8cc9 = 13e5</action>
            <action>maincpu.mw@8cd7 = 14e5</action>
            <action>maincpu.mw@8ce8 = 13e5</action>
            <action>maincpu.mw@8cee = 14a5</action>
            <action>maincpu.mw@8cf6 = 14e5</action>
        </script>
    </cheat>

    <cheat desc="sound test mode (test)">
        <!-- you can't stop "no loop" sound by sound stop button -->
        <comment>reset the game (F3) to enter sound test mode</comment>
        <script state="on">
            <action>maincpu.mq@f063 = 4af0ac2002a98184</action>
            <action>maincpu.mq@f06b = 2004a982854a4a4a</action>
            <action>maincpu.mq@f073 = f081c5a88205f0ac</action>
            <action>maincpu.mq@f07b = ca01d010c080a6e7</action>
            <action>maincpu.mq@f083 = d020c0e801d040c0</action>
            <action>maincpu.mq@f08b = 80c0aa10e9388a05</action>
            <action>maincpu.mq@f093 = 86aa1069188a05d0</action>
            <action>maincpu.mq@f09b = d002c006f008c080</action>
            <action>maincpu.mq@f0a3 = 634c30018e00a205</action>
            <action>maincpu.mq@f0ab = adeaea28008d78f0</action>
            <action>maincpu.mq@f0b3 = 85026058ff492801</action>
            <!--
            f065 | a9 02    : lda #$02
            f067 | 20 ac f0 : jsr $f0ac // read start buttons
            f06a | 4a       : lsr a
            f06b | 4a       : lsr a
            f06c | 4a       : lsr a
            f06d | 4a       : lsr a
            f06e | 85 82    : sta $82
            f070 | a9 04    : lda #$04
            f072 | 20 ac f0 : jsr $f0ac // read other inputs
            f075 | 05 82    : ora $82
            f077 | a8       : tay
            f078 | c5 81    : cmp $81
            f07a | f0 e7    : beq $f063
            f07c | a6 80    : ldx $80
            f07e | c0 10    : cpy #$10
            f080 | d0 01    : bne $f083
            f082 | ca       : dex       // decrease code -01
            f083 | c0 40    : cpy #$40
            f085 | d0 01    : bne $f088
            f087 | e8       : inx       // increase code +01
            f088 | c0 20    : cpy #$20
            f08a | d0 05    : bne $f091
            f08c | 8a       : txa       // decrease code -10
            f08d | 38       : sec
            f08e | e9 10    : sbc #$10
            f090 | aa       : tax
            f091 | c0 80    : cpy #$80
            f093 | d0 05    : bne $f09a
            f095 | 8a       : txa       // increase code +10
            f096 | 18       : clc
            f097 | 69 10    : adc #$10
            f099 | aa       : tax
            f09a | 86 80    : stx $80
            f09c | c0 08    : cpy #$08
            f09e | f0 06    : beq $f0a6 // play sound
            f0a0 | c0 02    : cpy #$02
            f0a2 | d0 05    : bne $f0a9
            f0a4 | a2 00    : ldx #$00  // stop sound
            f0a6 | 8e 01 30 : stx $3001
            f0a9 | 4c 63 f0 : jmp $f063
            f0ac | 78       : sei       // input read routine
            f0ad | 8d 00 28 : sta $2800
            f0b0 | ea       : nop
            f0b1 | ea       : nop
            f0b2 | ad 01 28 : lda $2801
            f0b5 | 49 ff    : eor #$ff
            f0b7 | 58       : cli
            f0b8 | 60       : rts
            -->
            <action>audiocpu.mw@e1fe = f047</action> <!-- reset audio cpu when sound code 0x00 is set -->
        </script>
        <script state="run">
            <output format="----- leprechaun 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="start 1 : play sound"                   line="15" align="center" />
            <output format="start 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@0080</argument>
            </output>
        </script>
        <script state="off">
            <action> maincpu.mq@f063 = 0aa9f0eb208b8520</action>
            <action> maincpu.mq@f06b = 02a92085f2a97a85</action>
            <action> maincpu.mq@f073 = 86a92285f4a92185</action>
            <action> maincpu.mq@f07b = e5a92685d1a92385</action>
            <action> maincpu.mq@f083 = 3fa93a85b7a92785</action>
            <action> maincpu.mq@f08b = 383aa58734203985</action>
            <action> maincpu.mq@f093 = 691820a53a8511e9</action>
            <action> maincpu.mq@f09b = 85006921a5208504</action>
            <action> maincpu.mq@f0a3 = 850aa9e1d07ac621</action>
            <action> maincpu.mq@f0ab = 8502a91a85caa97a</action>
            <action> maincpu.mq@f0b3 = 8502a92085ada91b</action>
            <action>audiocpu.mw@e1fe =             f1a5</action>
        </script>
    </cheat>

</mamecheat>
"sound test mode" : you can't stop "no loop" sound by sound stop button. So sound code : 0x01,0x02,0x06,0x07 and 0x08 are stoppable because of "loop" sound.
NOTE : music (0x06,0x07 and 0x08) have problem in 0.257 (see https://mametesters.org/view.php?id=293).
jman

my wip cheat database back-up (06/01/2025 ver.)
https://u3.getuploader.com/...../download/58
downloadpass : jman2020
jman
Posts: 1296
Joined: Tue Dec 01, 2020 1:24 pm
Been thanked: 9 times

[leprechn]+ Leprechaun

Post by jman »

leprechn.xml

Code: Select all

<!-- Leprechaun (set 1) -->
<mamecheat version="1">

    <cheat desc="no hit - player">
        <script state="on">
            <action>maincpu.mb@8FA0 = FF</action>
        </script>
        <script state="off">
            <action>maincpu.mb@8FA0 = 12</action>
        </script>
    </cheat>

    <cheat desc="no hit - tree">
        <script state="on">
            <action>maincpu.mw@901E = D710</action>
        </script>
        <script state="off">
            <action>maincpu.mw@901E = 05A0</action>
        </script>
    </cheat>

    <cheat desc="player speed">
        <parameter>
            <item value="0x02">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.mb@8C99 = A9</action> <!-- right -->
            <action>maincpu.mb@8CA4 = A9</action> <!-- upper-right -->
            <action>maincpu.mb@8CB2 = A9</action> <!-- up -->
            <action>maincpu.mb@8CBB = E9</action> <!-- upper-left : left -->
            <action>maincpu.mb@8CC0 = A9</action> <!-- upper-left : up -->
            <action>maincpu.mb@8CC9 = E9</action> <!-- left -->
            <action>maincpu.mb@8CD7 = E9</action> <!-- lower-left -->
            <action>maincpu.mb@8CE8 = E9</action> <!-- down -->
            <action>maincpu.mb@8CEE = A9</action> <!-- lower-right : right -->
            <action>maincpu.mb@8CF6 = E9</action> <!-- lower-right : down -->
        </script>
        <script state="change">
            <action>maincpu.mb@8C9A = param</action>
            <action>maincpu.mb@8CA5 = param</action>
            <action>maincpu.mb@8CB3 = param</action>
            <action>maincpu.mb@8CBC = param</action>
            <action>maincpu.mb@8CC1 = param</action>
            <action>maincpu.mb@8CCA = param</action>
            <action>maincpu.mb@8CD8 = param</action>
            <action>maincpu.mb@8CE9 = param</action>
            <action>maincpu.mb@8CEF = param</action>
            <action>maincpu.mb@8CF7 = param</action>
        </script>
        <script state="off">
            <action>maincpu.mw@8C99 = 13A5</action>
            <action>maincpu.mw@8CA4 = 14A5</action>
            <action>maincpu.mw@8CB2 = 13A5</action>
            <action>maincpu.mw@8CBB = 14E5</action>
            <action>maincpu.mw@8CC0 = 14A5</action>
            <action>maincpu.mw@8CC9 = 13E5</action>
            <action>maincpu.mw@8CD7 = 14E5</action>
            <action>maincpu.mw@8CE8 = 13E5</action>
            <action>maincpu.mw@8CEE = 14A5</action>
            <action>maincpu.mw@8CF6 = 14E5</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@F063 = 02A98184808500A9</action>
            <action>maincpu.mq@F06B = 854A4A4A4AF0B020</action>
            <action>maincpu.mq@F073 = 8205F0B02004A982</action>
            <action>maincpu.mq@F07B = C080A6E7F081C4A8</action>
            <action>maincpu.mq@F083 = 01D040C0CA01D010</action>
            <action>maincpu.mq@F08B = E9388A05D020C0E8</action>
            <action>maincpu.mq@F093 = 188A05D080C0AA10</action>
            <action>maincpu.mq@F09B = F008C08086AA1069</action>
            <action>maincpu.mq@F0A3 = 8E00A205D002C006</action>
            <action>maincpu.mq@F0AB = 008D78F0674C3001</action>
            <action>maincpu.mq@F0B3 = FF492801ADEAEA28</action>
            <action>maincpu.mq@F0BB = 8586A92285EA6058</action>
            <!--
            F063 | A9 00    : lda #$00  // initialize sound code
            F065 | 85 80    : sta $80
            F067 | 84 81    : sty $81
            F069 | A9 02    : lda #$02  // read start button
            F06B | 20 B0 F0 : jsr $f0b0
            F06E | 4A       : lsr a
            F06F | 4A       : lsr a
            F070 | 4A       : lsr a
            F071 | 4A       : lsr a
            F072 | 85 82    : sta $82
            F074 | A9 04    : lda #$04  // read other inputs
            F076 | 20 B0 F0 : jsr $f0b0
            F079 | 05 82    : ora $82
            F07B | A8       : tay
            F07C | C4 81    : cpy $81
            F07E | F0 E7    : beq $f067
            F080 | A6 80    : ldx $80
            F082 | C0 10    : cpy #$10
            F084 | D0 01    : bne $f087
            F086 | CA       : dex       // decrease code -01
            F087 | C0 40    : cpy #$40
            F089 | D0 01    : bne $f08c
            F08B | E8       : inx       // increase code +01
            F08C | C0 20    : cpy #$20
            F08E | D0 05    : bne $f095
            F090 | 8A       : txa       // decrease code -10
            F091 | 38       : sec
            F092 | E9 10    : sbc #$10
            F094 | AA       : tax
            F095 | C0 80    : cpy #$80
            F097 | D0 05    : bne $f09e
            F099 | 8A       : txa       // increase code +10
            F09A | 18       : clc
            F09B | 69 10    : adc #$10
            F09D | AA       : tax
            F09E | 86 80    : stx $80
            F0A0 | C0 08    : cpy #$08
            F0A2 | F0 06    : beq $f0aa // play sound
            F0A4 | C0 02    : cpy #$02
            F0A6 | D0 05    : bne $f0ad
            F0A8 | A2 00    : ldx #$00  // stop sound
            F0AA | 8E 01 30 : stx $3001 // send sound code
            F0AD | 4C 67 F0 : jmp $f067
            F0B0 | 78       : sei
            F0B1 | 8D 00 28 : sta $2800 // input read routine
            F0B4 | EA       : nop
            F0B5 | EA       : nop
            F0B6 | AD 01 28 : lda $2801
            F0B9 | 49 FF    : eor #$ff
            F0BB | 58       : cli
            F0BC | 60       : rts
            -->
            <!-- reset audio cpu when code 0x00 is selected -->
            <action>audiocpu.mw@E158 = F000            </action>
            <action>audiocpu.mq@E000 = 60F1AE2004F000C9</action>
            <action>audiocpu.mq@E008 = B9B1A0A9C3F0474C</action>
            <!--
            F000 | C9 00    : cmp #$00
            F002 | F0 04    : beq $f008
            F004 | 20 AE F1 : jsr $f1ae
            F007 | 60       : rts
            F008 | 4C 47 F0 : jmp $f047
            -->
        </script>
        <script state="run">
            <output format="----- 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="1P start : play sound"             line="15" align="center" />
            <output format="2P start : 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@0080</argument>
            </output>
        </script>
        <script state="off">
            <action> maincpu.mq@F063 = 0AA9F0EB208B8520</action>
            <action> maincpu.mq@F06B = 02A92085F2A97A85</action>
            <action> maincpu.mq@F073 = 86A92285F4A92185</action>
            <action> maincpu.mq@F07B = E5A92685D1A92385</action>
            <action> maincpu.mq@F083 = 3FA93A85B7A92785</action>
            <action> maincpu.mq@F08B = 383AA58734203985</action>
            <action> maincpu.mq@F093 = 691820A53A8511E9</action>
            <action> maincpu.mq@F09B = 85006921A5208504</action>
            <action> maincpu.mq@F0A3 = 850AA9E1D07AC621</action>
            <action> maincpu.mq@F0AB = 8502A91A85CAA97A</action>
            <action> maincpu.mq@F0B3 = 8502A92085ADA91B</action>
            <action> maincpu.mq@F0BB = 8586A92285F2A921</action>
            <action>audiocpu.mq@E000 = C8C7C9D2D9D0CFC3</action>
            <action>audiocpu.mq@E008 = B9B1A0A9C3A8A0D4</action>
        </script>
    </cheat>

</mamecheat>
leprechna.xml

Code: Select all

<!-- Leprechaun (set 2) -->
<mamecheat version="1">

    <cheat desc="no hit - player">
        <script state="on">
            <action>maincpu.mb@8FA0 = FF</action>
        </script>
        <script state="off">
            <action>maincpu.mb@8FA0 = 12</action>
        </script>
    </cheat>

    <cheat desc="no hit - tree">
        <script state="on">
            <action>maincpu.mw@901E = D710</action>
        </script>
        <script state="off">
            <action>maincpu.mw@901E = 05A0</action>
        </script>
    </cheat>

    <cheat desc="player speed">
        <parameter>
            <item value="0x02">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.mb@8C99 = A9</action> <!-- right -->
            <action>maincpu.mb@8CA4 = A9</action> <!-- upper-right -->
            <action>maincpu.mb@8CB2 = A9</action> <!-- up -->
            <action>maincpu.mb@8CBB = E9</action> <!-- upper-left : left -->
            <action>maincpu.mb@8CC0 = A9</action> <!-- upper-left : up -->
            <action>maincpu.mb@8CC9 = E9</action> <!-- left -->
            <action>maincpu.mb@8CD7 = E9</action> <!-- lower-left -->
            <action>maincpu.mb@8CE8 = E9</action> <!-- down -->
            <action>maincpu.mb@8CEE = A9</action> <!-- lower-right : right -->
            <action>maincpu.mb@8CF6 = E9</action> <!-- lower-right : down -->
        </script>
        <script state="change">
            <action>maincpu.mb@8C9A = param</action>
            <action>maincpu.mb@8CA5 = param</action>
            <action>maincpu.mb@8CB3 = param</action>
            <action>maincpu.mb@8CBC = param</action>
            <action>maincpu.mb@8CC1 = param</action>
            <action>maincpu.mb@8CCA = param</action>
            <action>maincpu.mb@8CD8 = param</action>
            <action>maincpu.mb@8CE9 = param</action>
            <action>maincpu.mb@8CEF = param</action>
            <action>maincpu.mb@8CF7 = param</action>
        </script>
        <script state="off">
            <action>maincpu.mw@8C99 = 13A5</action>
            <action>maincpu.mw@8CA4 = 14A5</action>
            <action>maincpu.mw@8CB2 = 13A5</action>
            <action>maincpu.mw@8CBB = 14E5</action>
            <action>maincpu.mw@8CC0 = 14A5</action>
            <action>maincpu.mw@8CC9 = 13E5</action>
            <action>maincpu.mw@8CD7 = 14E5</action>
            <action>maincpu.mw@8CE8 = 13E5</action>
            <action>maincpu.mw@8CEE = 14A5</action>
            <action>maincpu.mw@8CF6 = 14E5</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@F063 = 02A98184808500A9</action>
            <action>maincpu.mq@F06B = 854A4A4A4AF0B020</action>
            <action>maincpu.mq@F073 = 8205F0B02004A982</action>
            <action>maincpu.mq@F07B = C080A6E7F081C4A8</action>
            <action>maincpu.mq@F083 = 01D040C0CA01D010</action>
            <action>maincpu.mq@F08B = E9388A05D020C0E8</action>
            <action>maincpu.mq@F093 = 188A05D080C0AA10</action>
            <action>maincpu.mq@F09B = F008C08086AA1069</action>
            <action>maincpu.mq@F0A3 = 8E00A205D002C006</action>
            <action>maincpu.mq@F0AB = 008D78F0674C3001</action>
            <action>maincpu.mq@F0B3 = FF492801ADEAEA28</action>
            <action>maincpu.mq@F0BB = 8586A92285EA6058</action>
            <!--
            F063 | A9 00    : lda #$00  // initialize sound code
            F065 | 85 80    : sta $80
            F067 | 84 81    : sty $81
            F069 | A9 02    : lda #$02  // read start button
            F06B | 20 B0 F0 : jsr $f0b0
            F06E | 4A       : lsr a
            F06F | 4A       : lsr a
            F070 | 4A       : lsr a
            F071 | 4A       : lsr a
            F072 | 85 82    : sta $82
            F074 | A9 04    : lda #$04  // read other inputs
            F076 | 20 B0 F0 : jsr $f0b0
            F079 | 05 82    : ora $82
            F07B | A8       : tay
            F07C | C4 81    : cpy $81
            F07E | F0 E7    : beq $f067
            F080 | A6 80    : ldx $80
            F082 | C0 10    : cpy #$10
            F084 | D0 01    : bne $f087
            F086 | CA       : dex       // decrease code -01
            F087 | C0 40    : cpy #$40
            F089 | D0 01    : bne $f08c
            F08B | E8       : inx       // increase code +01
            F08C | C0 20    : cpy #$20
            F08E | D0 05    : bne $f095
            F090 | 8A       : txa       // decrease code -10
            F091 | 38       : sec
            F092 | E9 10    : sbc #$10
            F094 | AA       : tax
            F095 | C0 80    : cpy #$80
            F097 | D0 05    : bne $f09e
            F099 | 8A       : txa       // increase code +10
            F09A | 18       : clc
            F09B | 69 10    : adc #$10
            F09D | AA       : tax
            F09E | 86 80    : stx $80
            F0A0 | C0 08    : cpy #$08
            F0A2 | F0 06    : beq $f0aa // play sound
            F0A4 | C0 02    : cpy #$02
            F0A6 | D0 05    : bne $f0ad
            F0A8 | A2 00    : ldx #$00  // stop sound
            F0AA | 8E 01 30 : stx $3001 // send sound code
            F0AD | 4C 67 F0 : jmp $f067
            F0B0 | 78       : sei
            F0B1 | 8D 00 28 : sta $2800 // input read routine
            F0B4 | EA       : nop
            F0B5 | EA       : nop
            F0B6 | AD 01 28 : lda $2801
            F0B9 | 49 FF    : eor #$ff
            F0BB | 58       : cli
            F0BC | 60       : rts
            -->
            <!-- reset audio cpu when code 0x00 is selected -->
            <action>audiocpu.mw@E158 = F000            </action>
            <action>audiocpu.mq@E000 = 60F1AE2004F000C9</action>
            <action>audiocpu.mq@E008 = B9B1A0A9C3F0474C</action>
            <!--
            F000 | C9 00    : cmp #$00
            F002 | F0 04    : beq $f008
            F004 | 20 AE F1 : jsr $f1ae
            F007 | 60       : rts
            F008 | 4C 47 F0 : jmp $f047
            -->
        </script>
        <script state="run">
            <output format="----- 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="1P start : play sound"             line="15" align="center" />
            <output format="2P start : 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@0080</argument>
            </output>
        </script>
        <script state="off">
            <action> maincpu.mq@F063 = 0AA9F0EB208B8520</action>
            <action> maincpu.mq@F06B = 02A92085F2A97A85</action>
            <action> maincpu.mq@F073 = 86A92285F4A92185</action>
            <action> maincpu.mq@F07B = E5A92685D1A92385</action>
            <action> maincpu.mq@F083 = 3FA93A85B7A92785</action>
            <action> maincpu.mq@F08B = 383AA58734203985</action>
            <action> maincpu.mq@F093 = 691820A53A8511E9</action>
            <action> maincpu.mq@F09B = 85006921A5208504</action>
            <action> maincpu.mq@F0A3 = 850AA9E1D07AC621</action>
            <action> maincpu.mq@F0AB = 8502A91A85CAA97A</action>
            <action> maincpu.mq@F0B3 = 8502A92085ADA91B</action>
            <action> maincpu.mq@F0BB = 8586A92285F2A921</action>
            <action> maincpu.mq@F0BB = 8586A92285F2A921</action>
            <action>audiocpu.mq@E000 = C8C7C9D2D9D0CFC3</action>
            <action>audiocpu.mq@E008 = B9B1A0A9C3A8A0D4</action>
        </script>
    </cheat>

</mamecheat>
potogold.xml

Code: Select all

<!-- Pot of Gold -->
<mamecheat version="1">

    <cheat desc="no hit - player">
        <script state="on">
            <action>maincpu.mb@8EF4 = FF</action>
        </script>
        <script state="off">
            <action>maincpu.mb@8EF4 = 12</action>
        </script>
    </cheat>

    <cheat desc="no hit - tree">
        <script state="on">
            <action>maincpu.mw@8F72 = D710</action>
        </script>
        <script state="off">
            <action>maincpu.mw@8F72 = 05A0</action>
        </script>
    </cheat>

    <cheat desc="player speed">
        <parameter>
            <item value="0x02">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.mb@8C03 = A9</action> <!-- right -->
            <action>maincpu.mb@8C0E = A9</action> <!-- upper-right -->
            <action>maincpu.mb@8C1C = A9</action> <!-- up -->
            <action>maincpu.mb@8C25 = E9</action> <!-- upper-left : left -->
            <action>maincpu.mb@8C2A = A9</action> <!-- upper-left : up -->
            <action>maincpu.mb@8C33 = E9</action> <!-- left -->
            <action>maincpu.mb@8C41 = E9</action> <!-- lower-left -->
            <action>maincpu.mb@8C52 = E9</action> <!-- down -->
            <action>maincpu.mb@8C58 = A9</action> <!-- lower-right : right -->
            <action>maincpu.mb@8C60 = E9</action> <!-- lower-right : down -->
        </script>
        <script state="change">
            <action>maincpu.mb@8C04 = param</action>
            <action>maincpu.mb@8C0F = param</action>
            <action>maincpu.mb@8C1D = param</action>
            <action>maincpu.mb@8C26 = param</action>
            <action>maincpu.mb@8C2B = param</action>
            <action>maincpu.mb@8C34 = param</action>
            <action>maincpu.mb@8C42 = param</action>
            <action>maincpu.mb@8C53 = param</action>
            <action>maincpu.mb@8C59 = param</action>
            <action>maincpu.mb@8C61 = param</action>
        </script>
        <script state="off">
            <action>maincpu.mw@8C03 = 13A5</action>
            <action>maincpu.mw@8C0E = 14A5</action>
            <action>maincpu.mw@8C1C = 13A5</action>
            <action>maincpu.mw@8C25 = 14E5</action>
            <action>maincpu.mw@8C2A = 14A5</action>
            <action>maincpu.mw@8C33 = 13E5</action>
            <action>maincpu.mw@8C41 = 14E5</action>
            <action>maincpu.mw@8C52 = 13E5</action>
            <action>maincpu.mw@8C58 = 14A5</action>
            <action>maincpu.mw@8C60 = 14E5</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@ECEA = 02A98184808500A9</action>
            <action>maincpu.mq@ECF2 = 854A4A4A4AED3720</action>
            <action>maincpu.mq@ECFA = 8205ED372004A982</action>
            <action>maincpu.mq@ED02 = C080A6E7F081C4A8</action>
            <action>maincpu.mq@ED0A = 01D040C0CA01D010</action>
            <action>maincpu.mq@ED12 = E9388A05D020C0E8</action>
            <action>maincpu.mq@ED1A = 188A05D080C0AA10</action>
            <action>maincpu.mq@ED22 = F008C08086AA1069</action>
            <action>maincpu.mq@ED2A = 8E00A205D002C006</action>
            <action>maincpu.mq@ED32 = 008D78ECEE4C3001</action>
            <action>maincpu.mq@ED3A = FF492801ADEAEA28</action>
            <action>maincpu.mq@ED42 = 8586A92285EA6058</action>
            <!--
            ECEA | A9 00    : lda #$00  // initialize sound code
            ECEC | 85 80    : sta $80
            ECEE | 84 81    : sty $81
            ECF0 | A9 02    : lda #$02  // read start button
            ECF2 | 20 37 ED : jsr $ed37
            ECF5 | 4A       : lsr a
            ECF6 | 4A       : lsr a
            ECF7 | 4A       : lsr a
            ECF8 | 4A       : lsr a
            ECF9 | 85 82    : sta $82
            ECFB | A9 04    : lda #$04  // read other inputs
            ECFD | 20 37 ED : jsr $de37
            ED00 | 05 82    : ora $82
            ED02 | A8       : tay
            ED03 | C4 81    : cpy $81
            ED05 | F0 E7    : beq $ecee
            ED07 | A6 80    : ldx $80
            ED09 | C0 10    : cpy #$10
            ED0B | D0 01    : bne $ed0e
            ED0D | CA       : dex       // decrease code -01
            ED0E | C0 40    : cpy #$40
            ED10 | D0 01    : bne $ed13
            ED12 | E8       : inx       // increase code +01
            ED13 | C0 20    : cpy #$20
            ED15 | D0 05    : bne $ed1c
            ED17 | 8A       : txa       // decrease code -10
            ED18 | 38       : sec
            ED19 | E9 10    : sbc #$10
            ED1B | AA       : tax
            ED1C | C0 80    : cpy #$80
            ED1E | D0 05    : bne $ed25
            ED20 | 8A       : txa       // increase code +10
            ED21 | 18       : clc
            ED22 | 69 10    : adc #$10
            ED24 | AA       : tax
            ED25 | 86 80    : stx $80
            ED27 | C0 08    : cpy #$08
            ED29 | F0 06    : beq $ed31 // play sound
            ED2B | C0 02    : cpy #$02
            ED2D | D0 05    : bne $ed34
            ED2F | A2 00    : ldx #$00  // stop sound
            ED31 | 8E 01 30 : stx $3001 // send sound code
            ED34 | 4C EE EC : jmp $ecee
            ED37 | 78       : sei
            ED38 | 8D 00 28 : sta $2800 // input read routine
            ED3B | EA       : nop
            ED3C | EA       : nop
            ED3D | AD 01 28 : lda $2801
            ED40 | 49 FF    : eor #$ff
            ED42 | 58       : cli
            ED43 | 60       : rts
            -->
            <!-- reset audio cpu when code 0x00 is selected -->
            <action>audiocpu.mw@E111 = FFE0            </action>
            <action>audiocpu.mq@EFE0 = 60F1672004F000C9</action>
            <action>audiocpu.mq@EFE8 = A095A0EAEAF0004C</action>
            <!--
            FFE0 | C9 00    : cmp #$00
            FFE2 | F0 04    : beq $ffe8
            FFE4 | 20 67 F1 : jsr $f167
            FFE7 | 60       : rts
            FFE8 | 4C 00 F0 : jmp $f000
            -->
        </script>
        <script state="run">
            <output format="----- 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="1P start : play sound"             line="15" align="center" />
            <output format="2P start : 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@0080</argument>
            </output>
        </script>
        <script state="off">
            <action> maincpu.mq@ECEA = 0AA9ED72208AEF20</action>
            <action> maincpu.mq@ECF2 = 02A92085F2A97885</action>
            <action> maincpu.mq@ECFA = 86A922857AA92185</action>
            <action> maincpu.mq@ED02 = E2A9268558A92385</action>
            <action> maincpu.mq@ED0A = 3FA93A85B7A92785</action>
            <action> maincpu.mq@ED12 = 383AA586BA203985</action>
            <action> maincpu.mq@ED1A = 691820A53A8511E9</action>
            <action> maincpu.mq@ED22 = 85006921A5208504</action>
            <action> maincpu.mq@ED2A = 850AA9E1D078C621</action>
            <action> maincpu.mq@ED32 = 8502A91A85CAA978</action>
            <action> maincpu.mq@ED3A = 8502A92085ADA91B</action>
            <action> maincpu.mq@ED42 = 8586A9228578A921</action>
            <action>audiocpu.mq@EFE0 = B8A092A0D5A0A0A2</action>
            <action>audiocpu.mq@EFE8 = A095A093A0FF96A0</action>
        </script>
    </cheat>

</mamecheat>
"sound test mode" : Fixed sound stop problem.
jman

my wip cheat database back-up (06/01/2025 ver.)
https://u3.getuploader.com/...../download/58
downloadpass : jman2020
Post Reply