Page 1 of 1

[mystston]+ Mysterious Stones

Posted: Wed Jun 01, 2022 10:03 am
by jman
mystston.

Code: Select all

<cheat desc="no hit">
    <script state="on">
        <action>maincpu.mb@43f7 = 06</action> <!-- rebound object -->
        <action>maincpu.mb@5817 = 60</action> <!-- crocodile -->
        <action>maincpu.mb@a13c = 60</action> <!-- background (lava) -->
        <action>maincpu.mb@a140 = 60</action> <!-- background (fire) -->
        <action>maincpu.mb@ba74 = 60</action> <!-- guardian -->
        <action>maincpu.mb@bf84 = 60</action> <!-- fire (guardian) -->
        <action>maincpu.mb@c18a = 60</action> <!-- small monster -->
        <action>maincpu.mb@c81d = 60</action> <!-- skull -->
        <action>maincpu.mb@d9fc = 60</action> <!-- grim reaper -->
    </script>
    <script state="off">
        <action>maincpu.mb@43f7 = 47</action>
        <action>maincpu.mb@5817 = a9</action>
        <action>maincpu.mb@a13c = 20</action>
        <action>maincpu.mb@a140 = 20</action>
        <action>maincpu.mb@ba74 = a9</action>
        <action>maincpu.mb@bf84 = 20</action>
        <action>maincpu.mb@c18a = ae</action>
        <action>maincpu.mb@c81d = ae</action>
        <action>maincpu.mb@d9fc = a9</action>
    </script>
</cheat>

<cheat desc="walk through wall">
    <script state="on">
        <action>maincpu.mb@44b3 = 00</action>
    </script>
    <script state="off">
        <action>maincpu.mb@44b3 = 0f</action>
    </script>
</cheat>

<cheat desc="timer speed">
    <parameter>
        <item value="0xff">01 (slow)</item>
        <item value="0x80">02       </item>
        <item value="0x20">03       </item>
        <item value="0x0b">04       </item>
        <item value="0x01">05 (fast)</item>
    </parameter>
    <script state="change">
        <action>maincpu.mb@5b23 = param</action>
    </script>
    <script state="off">
        <action>maincpu.mb@5b23 = 0x0b</action>
    </script>
</cheat>

<cheat desc="floor changes into lava">
    <parameter>
        <item value="0xea676f4c">never</item>
        <item value="0xea673f4c">soon </item>
    </parameter>
    <script state="change">
        <action>maincpu.md@672e = param</action>
    </script>
    <script state="off">
        <action>maincpu.md@672e = 3d903ec9</action>
    </script>
</cheat>

<cheat desc="sound test mode">
    <comment>reset the game (F3) to enter sound test mode</comment>
    <script state="on">
        <action>maincpu.mw@62fb =             11a9</action> <!-- paint screen with black -->
        <action>maincpu.mq@4046 = 81848086ffa001a2</action>
        <action>maincpu.mq@404e = f4f081c5a82000ad</action>
        <action>maincpu.mq@4056 = d0fec9ca01d0fdc9</action>
        <action>maincpu.mq@405e = 8a4807d0f7c9e801</action>
        <action>maincpu.mq@4066 = d0fbc968aa10e938</action>
        <action>maincpu.mq@406e = 68aa1069188a4807</action>
        <action>maincpu.mq@4076 = c902018e03d0efc9</action>
        <action>maincpu.mq@407e = 02018dffa905d0df</action>
        <action>maincpu.mq@4086 = eaeaeaeaea404a4c</action>
        <!--
        4046 | a2 01    : ldx #$01  // initialize sound code value
        4048 | a0 ff    : ldy #$ff  // initialize input value
        404a | 86 80    : stx $80
        404c | 84 81    : sty $81
        404e | ad 00 20 : lda $2000 // read input
        4051 | a8       : tay
        4052 | c5 81    : cmp $81
        4054 | f0 f4    : beq $404a
        4056 | c9 fd    : cmp #$fd
        4058 | d0 01    : bne $405b
        405a | ca       : dex       // decrease code -01
        405b | c9 fe    : cmp #$fe
        405d | d0 01    : bne $4060
        405f | e8       : inx       // increase code +01
        4060 | c9 f7    : cmp #$f7
        4062 | d0 07    : bne $406b
        4064 | 48       : pha       // decrease code -10
        4065 | 8a       : txa
        4066 | 38       : sec
        4067 | e9 10    : sbc #$10
        4069 | aa       : tax
        406a | 68       : pla
        406b | c9 fb    : cmp #$fb
        406d | d0 07    : bne $4076
        406f | 48       : pha       // increase code +10
        4070 | 8a       : txa
        4071 | 18       : clc
        4072 | 69 10    : adc #$10
        4074 | aa       : tax
        4075 | 68       : pla
        4076 | c9 ef    : cmp #$ef
        4078 | d0 03    : bne $407d
        407a | 8e 01 02 : stx $0201 // play sound
        407d | c9 df    : cmp #$df
        407f | d0 05    : bne $4086
        4081 | a9 ff    : lda #$ff  // stop sound
        4083 | 8d 01 02 : sta $0201
        4086 | 4c 4a 40 : jmp $404a
        -->
    </script>
    <script state="run">
        <output format="----- mysterious stones 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="up : increase code +10"                        line="13" align="center" />
        <output format="down : decrease 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@0080</argument>
        </output>
    </script>
    <script state="off">
        <action>maincpu.mw@62fb =             97b1</action>
        <action>maincpu.mq@4046 = ae092017a9e72420</action>
        <action>maincpu.mq@404e = 80a9e74c20e77c20</action>
        <action>maincpu.mq@4056 = 85218500a9584620</action>
        <action>maincpu.mq@405e = 852e852585248522</action>
        <action>maincpu.mq@4066 = 31855ad22030852f</action>
        <action>maincpu.mq@406e = 21869affa240cd4c</action>
        <action>maincpu.mq@4076 = 42792072f92058d8</action>
        <action>maincpu.mq@407e = 428520ae092015a9</action>
        <action>maincpu.mq@4086 = 8522a5ab7b20fb90</action>
    </script>
</cheat>
myststono and myststonoi.

Code: Select all

<cheat desc="no hit">
    <script state="on">
        <action>maincpu.mb@43e5 = 06</action> <!-- rebound object -->
        <action>maincpu.mb@5805 = 60</action> <!-- crocodile -->
        <action>maincpu.mb@a10d = 60</action> <!-- background (lava) -->
        <action>maincpu.mb@a111 = 60</action> <!-- background (fire) -->
        <action>maincpu.mb@b8f5 = 60</action> <!-- guardian -->
        <action>maincpu.mb@be05 = 60</action> <!-- fire (guardian) -->
        <action>maincpu.mb@c00b = 60</action> <!-- small monster -->
        <action>maincpu.mb@c69e = 60</action> <!-- skull -->
        <action>maincpu.mb@d87d = 60</action> <!-- grim reaper -->
    </script>
    <script state="off">
        <action>maincpu.mb@43e5 = 47</action>
        <action>maincpu.mb@5805 = a9</action>
        <action>maincpu.mb@a10d = 20</action>
        <action>maincpu.mb@a111 = 20</action>
        <action>maincpu.mb@b8f5 = a9</action>
        <action>maincpu.mb@be05 = 20</action>
        <action>maincpu.mb@c00b = ae</action>
        <action>maincpu.mb@c69e = ae</action>
        <action>maincpu.mb@d87d = a9</action>
    </script>
</cheat>

<cheat desc="walk through wall">
    <script state="on">
        <action>maincpu.mb@44a1 = 00</action>
    </script>
    <script state="off">
        <action>maincpu.mb@44a1 = 0f</action>
    </script>
</cheat>

<cheat desc="timer speed">
    <parameter>
        <item value="0xff">01 (slow)</item>
        <item value="0x80">02       </item>
        <item value="0x20">03       </item>
        <item value="0x0b">04       </item>
        <item value="0x01">05 (fast)</item>
    </parameter>
    <script state="change">
        <action>maincpu.mb@5b11 = param</action>
    </script>
    <script state="off">
        <action>maincpu.mb@5b11 = 0x0b</action>
    </script>
</cheat>

<cheat desc="floor changes into lava">
    <parameter>
        <item value="0xea675d4c">never</item>
        <item value="0xea672d4c">soon </item>
    </parameter>
    <script state="change">
        <action>maincpu.md@671c = param</action>
    </script>
    <script state="off">
        <action>maincpu.md@671c = 3d903ec9</action>
    </script>
</cheat>

<cheat desc="sound test mode">
    <comment>reset the game (F3) to enter sound test mode</comment>
    <script state="on">
        <action>maincpu.mw@62e9 =             11a9</action> <!-- paint screen with black -->
        <action>maincpu.mq@4043 = 81848086ffa001a2</action>
        <action>maincpu.mq@404b = f4f081c5a82000ad</action>
        <action>maincpu.mq@4053 = d0fec9ca01d0fdc9</action>
        <action>maincpu.mq@405b = 8a4807d0f7c9e801</action>
        <action>maincpu.mq@4063 = d0fbc968aa10e938</action>
        <action>maincpu.mq@406b = 68aa1069188a4807</action>
        <action>maincpu.mq@4073 = c902018e03d0efc9</action>
        <action>maincpu.mq@407b = 02018dffa905d0df</action>
        <action>maincpu.mq@4083 = eaeaeaeaea40474c</action>
        <!--
        4043 | a2 01    : ldx #$01  // initialize sound code value
        4045 | a0 ff    : ldy #$ff  // initialize input value
        4047 | 86 80    : stx $80
        4049 | 84 81    : sty $81
        404b | ad 00 20 : lda $2000 // read input
        404e | a8       : tay
        404f | c5 81    : cmp $81
        4051 | f0 f4    : beq $4047
        4053 | c9 fd    : cmp #$fd
        4055 | d0 01    : bne $4058
        4057 | ca       : dex       // decrease code -01
        4058 | c9 fe    : cmp #$fe
        405a | d0 01    : bne $405d
        405c | e8       : inx       // increase code +01
        405d | c9 f7    : cmp #$f7
        405f | d0 07    : bne $4068
        4061 | 48       : pha       // decrease code -10
        4062 | 8a       : txa
        4063 | 38       : sec
        4064 | e9 10    : sbc #$10
        4066 | aa       : tax
        4067 | 68       : pla
        4068 | c9 fb    : cmp #$fb
        406a | d0 07    : bne $4073
        406c | 48       : pha       // increase code +10
        406d | 8a       : txa
        406e | 18       : clc
        406f | 69 10    : adc #$10
        4071 | aa       : tax
        4072 | 68       : pla
        4073 | c9 ef    : cmp #$ef
        4075 | d0 03    : bne $407a
        4077 | 8e 01 02 : stx $0201 // play sound
        407a | c9 df    : cmp #$df
        407c | d0 05    : bne $4083
        407e | a9 ff    : lda #$ff  // stop sound
        4080 | 8d 01 02 : sta $0201
        4083 | 4c 4a 40 : jmp $4047
        -->
    </script>
    <script state="run">
        <output format="----- mysterious stones 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="up : increase code +10"                        line="13" align="center" />
        <output format="down : decrease 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@0080</argument>
        </output>
    </script>
    <script state="off">
        <action>maincpu.mw@62e9 =             97b1</action>
        <action>maincpu.mq@4043 = add72017a9e5a520</action>
        <action>maincpu.mq@404b = 80a9e5cd20e5fd20</action>
        <action>maincpu.mq@4053 = 85218500a9583420</action>
        <action>maincpu.mq@405b = 852e852585248522</action>
        <action>maincpu.mq@4063 = 31855ac02030852f</action>
        <action>maincpu.mq@406b = 21869affa240ce4c</action>
        <action>maincpu.mq@4073 = 872002008dffa9d8</action>
        <action>maincpu.mq@407b = a942772072e720aa</action>
        <action>maincpu.mq@4083 = 90428320add72015</action>
        <action>maincpu.mq@408b = 238522a5ab4920fb</action>
        <action>maincpu.mq@4093 = 8d5ac020248500a9</action>
        <action>maincpu.mq@409b = bd03a203738d0354</action>
    </script>
</cheat>

[mystston]+ Mysterious Stones

Posted: Tue Jan 16, 2024 9:54 am
by jman
mystston.xml

Code: Select all

<!-- Mysterious Stones - Dr. John's Adventure -->
<mamecheat version="1">

    <cheat desc="no hit">
        <script state="on">
            <action>maincpu.mb@43F7 = 06</action> <!-- rebound object -->
            <action>maincpu.mb@5817 = 60</action> <!-- crocodile -->
            <action>maincpu.mb@A13C = 60</action> <!-- background (lava) -->
            <action>maincpu.mb@A140 = 60</action> <!-- background (fire) -->
            <action>maincpu.mb@BA74 = 60</action> <!-- guardian -->
            <action>maincpu.mb@BF84 = 60</action> <!-- fire (guardian) -->
            <action>maincpu.mb@C18A = 60</action> <!-- small monster -->
            <action>maincpu.mb@C81D = 60</action> <!-- skull -->
            <action>maincpu.mb@D9FC = 60</action> <!-- grim reaper -->
        </script>
        <script state="off">
            <action>maincpu.mb@43F7 = 47</action>
            <action>maincpu.mb@5817 = A9</action>
            <action>maincpu.mb@A13C = 20</action>
            <action>maincpu.mb@A140 = 20</action>
            <action>maincpu.mb@BA74 = A9</action>
            <action>maincpu.mb@BF84 = 20</action>
            <action>maincpu.mb@C18A = AE</action>
            <action>maincpu.mb@C81D = AE</action>
            <action>maincpu.mb@D9FC = A9</action>
        </script>
    </cheat>

    <cheat desc="walk through wall">
        <script state="on">
            <action>maincpu.mb@44B3 = 00</action>
        </script>
        <script state="off">
            <action>maincpu.mb@44B3 = 0F</action>
        </script>
    </cheat>

    <cheat desc="timer speed">
        <parameter>
            <item value="0xff">01 (slow)</item>
            <item value="0x80">02       </item>
            <item value="0x20">03       </item>
            <item value="0x0b">04       </item>
            <item value="0x01">05 (fast)</item>
        </parameter>
        <script state="change">
            <action>maincpu.mb@5B23 = param</action>
        </script>
        <script state="off">
            <action>maincpu.mb@5B23 = B</action>
        </script>
    </cheat>

    <cheat desc="floor changes into lava">
        <parameter>
            <item value="0xea676f4c">never</item>
            <item value="0xea673f4c">soon </item>
        </parameter>
        <script state="change">
            <action>maincpu.md@672E = param</action>
        </script>
        <script state="off">
            <action>maincpu.md@672E = 3D903EC9</action>
        </script>
    </cheat>

    <cheat desc="sound test mode">
        <comment>reset the game (F3) to enter sound test mode</comment>
        <script state="on">
            <action>maincpu.mw@62fb = 11A9            </action> <!-- paint screen with black -->
            <action>maincpu.mq@4046 = 81C4A82000AD8184</action>
            <action>maincpu.mq@404E = 01D0FDC080A6F6F0</action>
            <action>maincpu.mq@4056 = F7C0E801D0FEC0CA</action>
            <action>maincpu.mq@405E = C0AA10E9388A05D0</action>
            <action>maincpu.mq@4066 = AA1069188A05D0FB</action>
            <action>maincpu.mq@406E = DFC006F0EFC08086</action>
            <action>maincpu.mq@4076 = 4C02018EFFA205D0</action>
            <action>maincpu.mq@407E = EAEAEAEAEAEA4046</action>
            <!--
            4046 | 84 81    : sty $81
            4048 | AD 00 20 : lda $2000 // read input
            404B | A8       : tay
            404C | C4 81    : cpy $81
            404E | F0 F6    : beq $4046
            4050 | A6 80    : ldx $80
            4052 | C0 FD    : cpy #$fd
            4054 | D0 01    : bne $4057
            4056 | CA       : dex       // decrease code -01
            4057 | C0 FE    : cpy #$fe
            4059 | D0 01    : bne $405c
            405B | E8       : inx       // increase code +01
            405C | C0 F7    : cpy #$f7
            405E | D0 05    : bne $4065
            4060 | 8A       : txa       // decrease code -10
            4061 | 38       : sec
            4062 | E9 10    : sbc #$10
            4064 | AA       : tax
            4065 | C0 FB    : cpy #$fb
            4067 | D0 05    : bne $406e
            4069 | 8A       : txa       // increase code +10
            406A | 18       : clc
            406B | 69 10    : adc #$10
            406D | AA       : tax
            406E | 86 80    : stx $80
            4070 | C0 EF    : cpy #$ef
            4072 | F0 06    : beq $407a // play sound
            4074 | C0 DF    : cpy #$df
            4076 | D0 05    : bne $407d
            4078 | A2 FF    : ldx #$ff  // stop sound
            407A | 8E 01 02 : stx $0201 // send sound code
            407D | 4C 46 40 : jmp $4046
            -->
        </script>
        <script state="run">
            <output format="----- mysterious stones 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@0080</argument>
            </output>
        </script>
        <script state="off">
            <action>maincpu.mw@62FB = 97B1            </action>
            <action>maincpu.mq@4046 = AE092017A9E72420</action>
            <action>maincpu.mq@404E = 80A9E74C20E77C20</action>
            <action>maincpu.mq@4056 = 85218500A9584620</action>
            <action>maincpu.mq@405E = 852E852585248522</action>
            <action>maincpu.mq@4066 = 31855AD22030852F</action>
            <action>maincpu.mq@406E = 21869AFFA240CD4C</action>
            <action>maincpu.mq@4076 = 42792072F92058D8</action>
            <action>maincpu.mq@407E = 428520AE092015A9</action>
        </script>
    </cheat>

</mamecheat>
myststono.xml

Code: Select all

<!-- Mysterious Stones - Dr. Kick in Adventure -->
<mamecheat version="1">

    <cheat desc="no hit">
        <script state="on">
            <action>maincpu.mb@43E5 = 06</action> <!-- rebound object -->
            <action>maincpu.mb@5805 = 60</action> <!-- crocodile -->
            <action>maincpu.mb@A10D = 60</action> <!-- background (lava) -->
            <action>maincpu.mb@A111 = 60</action> <!-- background (fire) -->
            <action>maincpu.mb@B8F5 = 60</action> <!-- guardian -->
            <action>maincpu.mb@BE05 = 60</action> <!-- fire (guardian) -->
            <action>maincpu.mb@C00B = 60</action> <!-- small monster -->
            <action>maincpu.mb@C69E = 60</action> <!-- skull -->
            <action>maincpu.mb@D87D = 60</action> <!-- grim reaper -->
        </script>
        <script state="off">
            <action>maincpu.mb@43E5 = 47</action>
            <action>maincpu.mb@5805 = A9</action>
            <action>maincpu.mb@A10D = 20</action>
            <action>maincpu.mb@A111 = 20</action>
            <action>maincpu.mb@B8F5 = A9</action>
            <action>maincpu.mb@BE05 = 20</action>
            <action>maincpu.mb@C00B = AE</action>
            <action>maincpu.mb@C69E = AE</action>
            <action>maincpu.mb@D87D = A9</action>
        </script>
    </cheat>

    <cheat desc="walk through wall">
        <script state="on">
            <action>maincpu.mb@44A1 = 00</action>
        </script>
        <script state="off">
            <action>maincpu.mb@44A1 = 0F</action>
        </script>
    </cheat>

    <cheat desc="timer speed">
        <parameter>
            <item value="0xff">01 (slow)</item>
            <item value="0x80">02       </item>
            <item value="0x20">03       </item>
            <item value="0x0b">04       </item>
            <item value="0x01">05 (fast)</item>
        </parameter>
        <script state="change">
            <action>maincpu.mb@5B11 = param</action>
        </script>
        <script state="off">
            <action>maincpu.mb@5B11 = B</action>
        </script>
    </cheat>

    <cheat desc="floor changes into lava">
        <parameter>
            <item value="0xea675d4c">never</item>
            <item value="0xea672d4c">soon </item>
        </parameter>
        <script state="change">
            <action>maincpu.md@671C = param</action>
        </script>
        <script state="off">
            <action>maincpu.md@671C = 3D903EC9</action>
        </script>
    </cheat>

    <cheat desc="sound test mode">
        <comment>reset the game (F3) to enter sound test mode</comment>
        <script state="on">
            <action>maincpu.mw@62E9 = 11A9            </action> <!-- paint screen with black -->
            <action>maincpu.mq@4043 = 81C4A82000AD8184</action>
            <action>maincpu.mq@404B = 01D0FDC080A6F6F0</action>
            <action>maincpu.mq@4053 = F7C0E801D0FEC0CA</action>
            <action>maincpu.mq@405B = C0AA10E9388A05D0</action>
            <action>maincpu.mq@4063 = AA1069188A05D0FB</action>
            <action>maincpu.mq@406B = DFC006F0EFC08086</action>
            <action>maincpu.mq@4073 = 4C02018EFFA205D0</action>
            <action>maincpu.mq@407B = EAEAEAEAEAEA4043</action>
            <!--
            4043 | 84 81    : sty $81
            4045 | AD 00 20 : lda $2000 // read input
            4048 | A8       : tay
            4049 | C4 81    : cpy $81
            404B | F0 F6    : beq $4043
            404D | A6 80    : ldx $80
            404F | C0 FD    : cpy #$fd
            4051 | D0 01    : bne $4054
            4053 | CA       : dex       // decrease code -01
            4054 | C0 FE    : cpy #$fe
            4056 | D0 01    : bne $4059
            4058 | E8       : inx       // increase code +01
            4059 | C0 F7    : cpy #$f7
            405B | D0 05    : bne $4062
            405D | 8A       : txa       // decrease code -10
            405E | 38       : sec
            405F | E9 10    : sbc #$10
            4061 | AA       : tax
            4062 | C0 FB    : cpy #$fb
            4064 | D0 05    : bne $406b
            4066 | 8A       : txa       // increase code +10
            4067 | 18       : clc
            4068 | 69 10    : adc #$10
            406A | AA       : tax
            406B | 86 80    : stx $80
            406D | C0 EF    : cpy #$ef
            406F | F0 06    : beq $4077 // play sound
            4071 | C0 DF    : cpy #$df
            4073 | D0 05    : bne $407a
            4075 | A2 FF    : ldx #$ff  // stop sound
            4077 | 8E 01 02 : stx $0201 // send sound code
            407A | 4C 43 40 : jmp $4043
            -->
        </script>
        <script state="run">
            <output format="----- mysterious stones 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@0080</argument>
            </output>
        </script>
        <script state="off">
            <action>maincpu.mw@62E9 = 97B1            </action>
            <action>maincpu.mq@4043 = ADD72017A9E5A520</action>
            <action>maincpu.mq@404B = 80A9E5CD20E5FD20</action>
            <action>maincpu.mq@4053 = 85218500A9583420</action>
            <action>maincpu.mq@405B = 852E852585248522</action>
            <action>maincpu.mq@4063 = 31855AC02030852F</action>
            <action>maincpu.mq@406B = 21869AFFA240CE4C</action>
            <action>maincpu.mq@4073 = 872002008DFFA9D8</action>
            <action>maincpu.mq@407B = A942772072E720AA</action>
        </script>
    </cheat>

</mamecheat>
myststonoi.xml

Code: Select all

<!-- Mysterious Stones - Dr. Kick in Adventure (Itisa PCB) -->
<mamecheat version="1">

    <cheat desc="no hit">
        <script state="on">
            <action>maincpu.mb@43E5 = 06</action> <!-- rebound object -->
            <action>maincpu.mb@5805 = 60</action> <!-- crocodile -->
            <action>maincpu.mb@A10D = 60</action> <!-- background (lava) -->
            <action>maincpu.mb@A111 = 60</action> <!-- background (fire) -->
            <action>maincpu.mb@B8F5 = 60</action> <!-- guardian -->
            <action>maincpu.mb@BE05 = 60</action> <!-- fire (guardian) -->
            <action>maincpu.mb@C00B = 60</action> <!-- small monster -->
            <action>maincpu.mb@C69E = 60</action> <!-- skull -->
            <action>maincpu.mb@D87D = 60</action> <!-- grim reaper -->
        </script>
        <script state="off">
            <action>maincpu.mb@43E5 = 47</action>
            <action>maincpu.mb@5805 = A9</action>
            <action>maincpu.mb@A10D = 20</action>
            <action>maincpu.mb@A111 = 20</action>
            <action>maincpu.mb@B8F5 = A9</action>
            <action>maincpu.mb@BE05 = 20</action>
            <action>maincpu.mb@C00B = AE</action>
            <action>maincpu.mb@C69E = AE</action>
            <action>maincpu.mb@D87D = A9</action>
        </script>
    </cheat>

    <cheat desc="walk through wall">
        <script state="on">
            <action>maincpu.mb@44A1 = 00</action>
        </script>
        <script state="off">
            <action>maincpu.mb@44A1 = 0F</action>
        </script>
    </cheat>

    <cheat desc="timer speed">
        <parameter>
            <item value="0xff">01 (slow)</item>
            <item value="0x80">02       </item>
            <item value="0x20">03       </item>
            <item value="0x0b">04       </item>
            <item value="0x01">05 (fast)</item>
        </parameter>
        <script state="change">
            <action>maincpu.mb@5B11 = param</action>
        </script>
        <script state="off">
            <action>maincpu.mb@5B11 = B</action>
        </script>
    </cheat>

    <cheat desc="floor changes into lava">
        <parameter>
            <item value="0xea675d4c">never</item>
            <item value="0xea672d4c">soon </item>
        </parameter>
        <script state="change">
            <action>maincpu.md@671C = param</action>
        </script>
        <script state="off">
            <action>maincpu.md@671C = 3D903EC9</action>
        </script>
    </cheat>

    <cheat desc="sound test mode">
        <comment>reset the game (F3) to enter sound test mode</comment>
        <script state="on">
            <action>maincpu.mw@62E9 = 11A9             </action> <!-- paint screen with black -->
            <action>maincpu.mq@4043 = 81C4A82000AD8184</action>
            <action>maincpu.mq@404B = 01D0FDC080A6F6F0</action>
            <action>maincpu.mq@4053 = F7C0E801D0FEC0CA</action>
            <action>maincpu.mq@405B = C0AA10E9388A05D0</action>
            <action>maincpu.mq@4063 = AA1069188A05D0FB</action>
            <action>maincpu.mq@406B = DFC006F0EFC08086</action>
            <action>maincpu.mq@4073 = 4C02018EFFA205D0</action>
            <action>maincpu.mq@407B = EAEAEAEAEAEA4043</action>
            <!--
            4043 | 84 81    : sty $81
            4045 | AD 00 20 : lda $2000 // read input
            4048 | A8       : tay
            4049 | C4 81    : cpy $81
            404B | F0 F6    : beq $4043
            404D | A6 80    : ldx $80
            404F | C0 FD    : cpy #$fd
            4051 | D0 01    : bne $4054
            4053 | CA       : dex       // decrease code -01
            4054 | C0 FE    : cpy #$fe
            4056 | D0 01    : bne $4059
            4058 | E8       : inx       // increase code +01
            4059 | C0 F7    : cpy #$f7
            405B | D0 05    : bne $4062
            405D | 8A       : txa       // decrease code -10
            405E | 38       : sec
            405F | E9 10    : sbc #$10
            4061 | AA       : tax
            4062 | C0 FB    : cpy #$fb
            4064 | D0 05    : bne $406b
            4066 | 8A       : txa       // increase code +10
            4067 | 18       : clc
            4068 | 69 10    : adc #$10
            406A | AA       : tax
            406B | 86 80    : stx $80
            406D | C0 EF    : cpy #$ef
            406F | F0 06    : beq $4077 // play sound
            4071 | C0 DF    : cpy #$df
            4073 | D0 05    : bne $407a
            4075 | A2 FF    : ldx #$ff  // stop sound
            4077 | 8E 01 02 : stx $0201 // send sound code
            407A | 4C 43 40 : jmp $4043
            -->
        </script>
        <script state="run">
            <output format="----- mysterious stones 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@0080</argument>
            </output>
        </script>
        <script state="off">
            <action>maincpu.mw@62E9 = 97B1            </action>
            <action>maincpu.mq@4043 = ADD72017A9E5A520</action>
            <action>maincpu.mq@404B = 80A9E5CD20E5FD20</action>
            <action>maincpu.mq@4053 = 85218500A9583420</action>
            <action>maincpu.mq@405B = 852E852585248522</action>
            <action>maincpu.mq@4063 = 31855AC02030852F</action>
            <action>maincpu.mq@406B = 21869AFFA240CE4C</action>
            <action>maincpu.mq@4073 = 872002008DFFA9D8</action>
            <action>maincpu.mq@407B = A942772072E720AA</action>
        </script>
    </cheat>

</mamecheat>
"sound test mode" : Rewritten routine.