[wboy]+ Wonder Boy

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

[wboy]+ Wonder Boy

Post by jman »

wboy.xml

Code: Select all

<!-- Wonder Boy (set 1, 315-5177) -->
<mamecheat version="1">

    <cheat desc="no hit">
        <comment>you hit an enemy on the skateboard</comment>
        <script state="on">
            <action>maincpu.ob@2E72 = 18</action> <!-- boss (body) -->
            <action>maincpu.ob@3027 = 18</action> <!-- boss (head) -->
            <action>maincpu.ob@31B6 = 18</action> <!-- boss (fireball) -->
            <action>maincpu.ob@36F1 = C9</action> <!-- stone -->
            <action>maincpu.ob@37C8 = C9</action> <!-- bonfire -->
            <action>maincpu.ob@383B = C9</action> <!-- snail -->
            <action>maincpu.ob@3899 = C9</action> <!-- skull -->
            <action>maincpu.ob@3B52 = C9</action> <!-- cobra -->
            <action>maincpu.ob@3CB2 = C9</action> <!-- rock -->
            <action>maincpu.ob@3D0A = C9</action> <!-- blue people -->
            <action>maincpu.ob@4248 = C9</action> <!-- frog -->
            <action>maincpu.ob@42AF = C9</action> <!-- bee -->
            <action>maincpu.ob@4357 = C9</action> <!-- bat -->
            <action>maincpu.ob@4513 = C9</action> <!-- spider -->
            <action>maincpu.ob@47C2 = C9</action> <!-- coyote -->
            <action>maincpu.ob@4ADD = C9</action> <!-- swordfish -->
            <action>maincpu.ob@4B98 = C9</action> <!-- octopus -->
            <action>maincpu.ob@4CDC = C9</action> <!-- icicle -->
        </script>
        <script state="off">
            <action>maincpu.ob@2E72 = 30</action>
            <action>maincpu.ob@3027 = 30</action>
            <action>maincpu.ob@31B6 = 30</action>
            <action>maincpu.ob@36F1 = 21</action>
            <action>maincpu.ob@37C8 = 21</action>
            <action>maincpu.ob@383B = 21</action>
            <action>maincpu.ob@3899 = 21</action>
            <action>maincpu.ob@3B52 = 21</action>
            <action>maincpu.ob@3CB2 = 21</action>
            <action>maincpu.ob@3D0A = 21</action>
            <action>maincpu.ob@4248 = 21</action>
            <action>maincpu.ob@42AF = 21</action>
            <action>maincpu.ob@4357 = 21</action>
            <action>maincpu.ob@4513 = 21</action>
            <action>maincpu.ob@47C2 = 21</action>
            <action>maincpu.ob@4ADD = 21</action>
            <action>maincpu.ob@4B98 = 21</action>
            <action>maincpu.ob@4CDC = 21</action>
        </script>
    </cheat>

    <cheat desc="auto fire">
        <script state="on">
            <action>maincpu.mb@2B60 = 86</action>
            <action>maincpu.ob@2B63 = 4F</action>
        </script>
        <script state="off">
            <action>maincpu.mb@2B60 = 84</action>
            <action>maincpu.ob@2B63 = 67</action>
        </script>
    </cheat>

    <cheat desc="multiple jump">
        <script state="on">
            <action>maincpu.od@29A1 = 00FFFFCD        </action> <!-- jump -->
            <action>maincpu.md@29A1 = FFBFE0FF        </action>
            <action>maincpu.od@2A25 = 00FFFFCD        </action> <!-- fall down -->
            <action>maincpu.md@2A25 = FFBFE0FF        </action>
            <action>maincpu.mq@BFE0 = CB08286ECBC08421</action>
            <action>maincpu.mq@BFE8 = DDC9E1031F36DDAE</action>
            <action>maincpu.mq@BFF0 = FFFFFFFFC97E1FCB</action>
            <!--
            BFE0 | 21 84 C0    : ld   hl,$C084     // check jump button
            BFE3 | CB 6E       : bit  5,(hl)
            BFE5 | 28 08       : jr   z,$BFEF
            BFE7 | CB AE       : res  5,(hl)
            BFE9 | DD 36 1F 03 : ld   (ix+$1f),$03 // set jump flag
            BFED | E1          : pop  hl
            BFEE | C9          : ret
            BFEF | DD CB 1F 7E : bit  7,(ix+$1f)
            BFF3 | C9          : ret
            -->
        </script>
        <script state="off">
            <action>maincpu.od@29A1 = 2E5BCBDD        </action>
            <action>maincpu.md@29A1 = 7E1F9B99        </action>
            <action>maincpu.od@2A25 = 3B4FCBDD        </action>
            <action>maincpu.md@2A25 = 7E1FCF8D        </action>
            <action>maincpu.mq@BFE0 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@BFE8 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@BFF0 = FFFFFFFFFFFFFFFF</action>
        </script>
    </cheat>

    <cheat desc="no slip">
        <script state="on">
            <action>maincpu.ob@263D = CD              </action>
            <action>maincpu.mw@263E = 96D0            </action>
            <action>maincpu.mq@96D0 = 01280CE6C0843A47</action>
            <action>maincpu.mq@96D8 = FFFFFFC91477DD78</action>
            <!--
            96D0 | 47       : ld   b,a
            96D1 | 3A 84 C0 : ld   a,($C084)
            96D4 | E6 0C    : and  $0C
            96D6 | 28 01    : jr   z,$96D9
            96D8 | 78       : ld   a,b
            96D9 | DD 77 14 : ld   (ix+$14),a
            96DC | C9       : ret
            -->
        </script>
        <script state="off">
            <action>maincpu.ob@263D = DD              </action>
            <action>maincpu.mw@263E = 1432            </action>
            <action>maincpu.mq@96D0 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@96D8 = FFFFFFFFFFFFFFFF</action>
        </script>
    </cheat>

    <cheat desc="vitality speed">
        <parameter>
            <item value="0x0000">no decrease</item>
            <item value="0x0001">01 (slow)  </item>
            <item value="0x0002">02         </item>
            <item value="0x0008">03         </item>
            <item value="0x0020">04         </item>
            <item value="0x0100">05 (fast)  </item>
        </parameter>
        <script state="change">
            <action>maincpu.mw@4E58 = -param</action>
            <action>maincpu.mw@4E61 = -param</action>
        </script>
        <script state="off">
            <action>maincpu.mw@4E58 = FFFF</action>
            <action>maincpu.mw@4E61 = FFF8</action>
        </script>
    </cheat>

    <cheat desc="hidden panel finder">
        <script state="on">
            <action>maincpu.ob@4725 = 00</action>
        </script>
        <script state="off">
            <action>maincpu.ob@4725 = D0</action>
        </script>
    </cheat>

    <cheat desc="hidden fried potato finder">
        <script state="on">
            <action>maincpu.mw@3958 = 96E0            </action>
            <action>maincpu.mq@96E0 = 3705FE0FE6187EDD</action>
            <action>maincpu.mq@96E8 = FFFFFFFFC9206AC4</action>
            <!--
            96E0 | DD 7E 18 : ld   a,(ix+$18)
            96E3 | E6 0F    : and  $0F
            96E5 | FE 05    : cp   $05
            96E7 | 37       : scf
            96E8 | C4 6A 20 : call nz,$206A
            96EB | C9       : ret
            -->
        </script>
        <script state="off">
            <action>maincpu.mw@3958 = 206A            </action>
            <action>maincpu.mq@96E0 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@96E8 = FFFFFFFFFFFFFFFF</action>
        </script>
    </cheat>

    <cheat desc="no fruit disappearance">
        <script state="on">
            <action>maincpu.ob@3922 = 18</action> <!-- fruit -->
            <action>maincpu.mb@39C3 = C5</action> <!-- fried potato -->
            <action>maincpu.ob@4753 = 18</action> <!-- panel -->
        </script>
        <script state="off">
            <action>maincpu.ob@3922 = 20</action>
            <action>maincpu.mb@39C3 = 24</action>
            <action>maincpu.ob@4753 = 20</action>
        </script>
    </cheat>

    <cheat desc="sound test mode">
        <comment>set &quot;skip rom check&quot; then reset the game (F3)</comment>
        <script state="on">
            <action>maincpu.mw@015E = 8000            </action>
            <action>maincpu.mq@8000 = 10E62F08DBC10021</action>
            <action>maincpu.mq@8008 = 2847B8B12F00DB4F</action>
            <action>maincpu.mq@8010 = 40FE35012080FEF2</action>
            <action>maincpu.mq@8018 = 3E042090FE340120</action>
            <action>maincpu.mq@8020 = 3E052050FE0618F0</action>
            <action>maincpu.mq@8028 = 032002FE78778610</action>
            <action>maincpu.mq@8030 = AF032004FE05187E</action>
            <action>maincpu.mq@8038 = 00000000C71818D3</action>
            <!--
            8000 | 21 00 C1 : ld   hl,$C100 // sound code address
            8003 | DB 08    : in   a,($08)  // read start button
            8005 | 2F       : cpl
            8006 | E6 10    : and  $10
            8008 | 4F       : ld   c,a
            8009 | DB 00    : in   a,($00)  // read other inputs
            800B | 2F       : cpl
            800C | B1       : or   c
            800D | B8       : cp   b
            800E | 47       : ld   b,a
            800F | 28 F2    : jr   z,$8003
            8011 | FE 80    : cp   $80
            8013 | 20 01    : jr   nz,$8016
            8015 | 35       : dec  (hl)     // decrease code -01
            8016 | FE 40    : cp   $40
            8018 | 20 01    : jr   nz,$801B
            801A | 34       : inc  (hl)     // increase code +01
            801B | FE 90    : cp   $90
            801D | 20 04    : jr   nz,$8023
            801F | 3E F0    : ld   a,$F0    // decrease code -10
            8021 | 18 06    : jr   $8029
            8023 | FE 50    : cp   $50
            8025 | 20 05    : jr   nz,$802C
            8027 | 3E 10    : ld   a,$10    // increase code +10
            8029 | 86       : add  a,(hl)
            802A | 77       : ld   (hl),a
            802B | 78       : ld   a,b
            802C | FE 02    : cp   $02
            802E | 20 03    : jr   nz,$8033
            8030 | 7E       : ld   a,(hl)   // play sound
            8031 | 18 05    : jr   $8038
            8033 | FE 04    : cp   $04
            8035 | 20 03    : jr   nz,$803A
            8037 | AF       : xor  a        // stop sound
            8038 | D3 18    : out  ($18),a  // send sound code
            803A | 18 C7    : jr   $8003
            -->
        </script>
        <script state="run">
            <output format="----- wonder boy 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="start + left : decrease code -10"       line="13" align="center" />
            <output format="start + right : 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@C100</argument>
            </output>
        </script>
        <script state="off">
            <action>maincpu.mw@015E = 0755            </action>
            <action>maincpu.mq@8000 = 2032302220323022</action>
            <action>maincpu.mq@8008 = C47F7F7F7F7F7F1A</action>
            <action>maincpu.mq@8010 = 3123210401B6B4A6</action>
            <action>maincpu.mq@8018 = 3123213331232133</action>
            <action>maincpu.mq@8020 = 7F7F7F7F7F1B2133</action>
            <action>maincpu.mq@8028 = 240401B7B5A7C57F</action>
            <action>maincpu.mq@8030 = 2436342624363426</action>
            <action>maincpu.mq@8038 = 7F7F7F1E240B0926</action>
        </script>
    </cheat>

    <cheat desc="skip rom check">
        <script state="on">
            <action>maincpu.mb@015B = 27</action>
        </script>
        <script state="off">
            <action>maincpu.mb@015B = 09</action>
        </script>
    </cheat>

</mamecheat>
wboyo.xml

Code: Select all

<!-- Wonder Boy (set 2, 315-5135) -->
<mamecheat version="1">

    <cheat desc="no hit">
        <comment>you hit an enemy on the skateboard</comment>
        <script state="on">
            <action>maincpu.ob@2E72 = 18</action> <!-- boss (body) -->
            <action>maincpu.ob@3027 = 18</action> <!-- boss (head) -->
            <action>maincpu.ob@31B6 = 18</action> <!-- boss (fireball) -->
            <action>maincpu.ob@36F1 = C9</action> <!-- stone -->
            <action>maincpu.ob@37C8 = C9</action> <!-- bonfire -->
            <action>maincpu.ob@383B = C9</action> <!-- snail -->
            <action>maincpu.ob@3899 = C9</action> <!-- skull -->
            <action>maincpu.ob@3B52 = C9</action> <!-- cobra -->
            <action>maincpu.ob@3CB2 = C9</action> <!-- rock -->
            <action>maincpu.ob@3D0A = C9</action> <!-- blue people -->
            <action>maincpu.ob@4248 = C9</action> <!-- frog -->
            <action>maincpu.ob@42AF = C9</action> <!-- bee -->
            <action>maincpu.ob@4357 = C9</action> <!-- bat -->
            <action>maincpu.ob@4513 = C9</action> <!-- spider -->
            <action>maincpu.ob@47C2 = C9</action> <!-- coyote -->
            <action>maincpu.ob@4ADD = C9</action> <!-- swordfish -->
            <action>maincpu.ob@4B98 = C9</action> <!-- octopus -->
            <action>maincpu.ob@4CDC = C9</action> <!-- icicle -->
        </script>
        <script state="off">
            <action>maincpu.ob@2E72 = 30</action>
            <action>maincpu.ob@3027 = 30</action>
            <action>maincpu.ob@31B6 = 30</action>
            <action>maincpu.ob@36F1 = 21</action>
            <action>maincpu.ob@37C8 = 21</action>
            <action>maincpu.ob@383B = 21</action>
            <action>maincpu.ob@3899 = 21</action>
            <action>maincpu.ob@3B52 = 21</action>
            <action>maincpu.ob@3CB2 = 21</action>
            <action>maincpu.ob@3D0A = 21</action>
            <action>maincpu.ob@4248 = 21</action>
            <action>maincpu.ob@42AF = 21</action>
            <action>maincpu.ob@4357 = 21</action>
            <action>maincpu.ob@4513 = 21</action>
            <action>maincpu.ob@47C2 = 21</action>
            <action>maincpu.ob@4ADD = 21</action>
            <action>maincpu.ob@4B98 = 21</action>
            <action>maincpu.ob@4CDC = 21</action>
        </script>
    </cheat>

    <cheat desc="auto fire">
        <script state="on">
            <action>maincpu.mb@2B60 = 86</action>
            <action>maincpu.ob@2B63 = 4F</action>
        </script>
        <script state="off">
            <action>maincpu.mb@2B60 = 84</action>
            <action>maincpu.ob@2B63 = 67</action>
        </script>
    </cheat>

    <cheat desc="multiple jump">
        <script state="on">
            <action>maincpu.od@29A1 = 00FFFFCD        </action> <!-- jump -->
            <action>maincpu.md@29A1 = FFBFE0FF        </action>
            <action>maincpu.od@2A25 = 00FFFFCD        </action> <!-- fall down -->
            <action>maincpu.md@2A25 = FFBFE0FF        </action>
            <action>maincpu.mq@BFE0 = CB08286ECBC08421</action>
            <action>maincpu.mq@BFE8 = DDC9E1031F36DDAE</action>
            <action>maincpu.mq@BFF0 = FFFFFFFFC97E1FCB</action>
            <!--
            BFE0 | 21 84 C0    : ld   hl,$C084     // check jump button
            BFE3 | CB 6E       : bit  5,(hl)
            BFE5 | 28 08       : jr   z,$BFEF
            BFE7 | CB AE       : res  5,(hl)
            BFE9 | DD 36 1F 03 : ld   (ix+$1f),$03 // set jump flag
            BFED | E1          : pop  hl
            BFEE | C9          : ret
            BFEF | DD CB 1F 7E : bit  7,(ix+$1f)
            BFF3 | C9          : ret
            -->
        </script>
        <script state="off">
            <action>maincpu.od@29A1 = 2E5BCBDD        </action>
            <action>maincpu.md@29A1 = 7E1F9B99        </action>
            <action>maincpu.od@2A25 = 3B4FCBDD        </action>
            <action>maincpu.md@2A25 = 7E1FCF8D        </action>
            <action>maincpu.mq@BFE0 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@BFE8 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@BFF0 = FFFFFFFFFFFFFFFF</action>
        </script>
    </cheat>

    <cheat desc="no slip">
        <script state="on">
            <action>maincpu.ob@263D = CD              </action>
            <action>maincpu.mw@263E = 96D0            </action>
            <action>maincpu.mq@96D0 = 01280CE6C0843A47</action>
            <action>maincpu.mq@96D8 = FFFFFFC91477DD78</action>
            <!--
            96D0 | 47       : ld   b,a
            96D1 | 3A 84 C0 : ld   a,($C084)
            96D4 | E6 0C    : and  $0C
            96D6 | 28 01    : jr   z,$96D9
            96D8 | 78       : ld   a,b
            96D9 | DD 77 14 : ld   (ix+$14),a
            96DC | C9       : ret
            -->
        </script>
        <script state="off">
            <action>maincpu.ob@263D = DD              </action>
            <action>maincpu.mw@263E = 1432            </action>
            <action>maincpu.mq@96D0 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@96D8 = FFFFFFFFFFFFFFFF</action>
        </script>
    </cheat>

    <cheat desc="vitality speed">
        <parameter>
            <item value="0x0000">no decrease</item>
            <item value="0x0001">01 (slow)  </item>
            <item value="0x0002">02         </item>
            <item value="0x0008">03         </item>
            <item value="0x0020">04         </item>
            <item value="0x0100">05 (fast)  </item>
        </parameter>
        <script state="change">
            <action>maincpu.mw@4E58 = -param</action>
            <action>maincpu.mw@4E61 = -param</action>
        </script>
        <script state="off">
            <action>maincpu.mw@4E58 = FFFF</action>
            <action>maincpu.mw@4E61 = FFF8</action>
        </script>
    </cheat>

    <cheat desc="hidden panel finder">
        <script state="on">
            <action>maincpu.ob@4725 = 00</action>
        </script>
        <script state="off">
            <action>maincpu.ob@4725 = D0</action>
        </script>
    </cheat>

    <cheat desc="hidden fried potato finder">
        <script state="on">
            <action>maincpu.mw@3958 = 96E0            </action>
            <action>maincpu.mq@96E0 = 3705FE0FE6187EDD</action>
            <action>maincpu.mq@96E8 = FFFFFFFFC9206AC4</action>
            <!--
            96E0 | DD 7E 18 : ld   a,(ix+$18)
            96E3 | E6 0F    : and  $0F
            96E5 | FE 05    : cp   $05
            96E7 | 37       : scf
            96E8 | C4 6A 20 : call nz,$206A
            96EB | C9       : ret
            -->
        </script>
        <script state="off">
            <action>maincpu.mw@3958 = 206A            </action>
            <action>maincpu.mq@96E0 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@96E8 = FFFFFFFFFFFFFFFF</action>
        </script>
    </cheat>

    <cheat desc="no fruit disappearance">
        <script state="on">
            <action>maincpu.ob@3922 = 18</action> <!-- fruit -->
            <action>maincpu.mb@39C3 = C5</action> <!-- fried potato -->
            <action>maincpu.ob@4753 = 18</action> <!-- panel -->
        </script>
        <script state="off">
            <action>maincpu.ob@3922 = 20</action>
            <action>maincpu.mb@39C3 = 24</action>
            <action>maincpu.ob@4753 = 20</action>
        </script>
    </cheat>

    <cheat desc="sound test mode">
        <comment>set &quot;skip rom check&quot; then reset the game (F3)</comment>
        <script state="on">
            <action>maincpu.mw@015E = 8000            </action>
            <action>maincpu.mq@8000 = 10E62F08DBC10021</action>
            <action>maincpu.mq@8008 = 2847B8B12F00DB4F</action>
            <action>maincpu.mq@8010 = 40FE35012080FEF2</action>
            <action>maincpu.mq@8018 = 3E042090FE340120</action>
            <action>maincpu.mq@8020 = 3E052050FE0618F0</action>
            <action>maincpu.mq@8028 = 032002FE78778610</action>
            <action>maincpu.mq@8030 = AF032004FE05187E</action>
            <action>maincpu.mq@8038 = 00000000C71818D3</action>
            <!--
            8000 | 21 00 C1 : ld   hl,$C100 // sound code address
            8003 | DB 08    : in   a,($08)  // read start button
            8005 | 2F       : cpl
            8006 | E6 10    : and  $10
            8008 | 4F       : ld   c,a
            8009 | DB 00    : in   a,($00)  // read other inputs
            800B | 2F       : cpl
            800C | B1       : or   c
            800D | B8       : cp   b
            800E | 47       : ld   b,a
            800F | 28 F2    : jr   z,$8003
            8011 | FE 80    : cp   $80
            8013 | 20 01    : jr   nz,$8016
            8015 | 35       : dec  (hl)     // decrease code -01
            8016 | FE 40    : cp   $40
            8018 | 20 01    : jr   nz,$801B
            801A | 34       : inc  (hl)     // increase code +01
            801B | FE 90    : cp   $90
            801D | 20 04    : jr   nz,$8023
            801F | 3E F0    : ld   a,$F0    // decrease code -10
            8021 | 18 06    : jr   $8029
            8023 | FE 50    : cp   $50
            8025 | 20 05    : jr   nz,$802C
            8027 | 3E 10    : ld   a,$10    // increase code +10
            8029 | 86       : add  a,(hl)
            802A | 77       : ld   (hl),a
            802B | 78       : ld   a,b
            802C | FE 02    : cp   $02
            802E | 20 03    : jr   nz,$8033
            8030 | 7E       : ld   a,(hl)   // play sound
            8031 | 18 05    : jr   $8038
            8033 | FE 04    : cp   $04
            8035 | 20 03    : jr   nz,$803A
            8037 | AF       : xor  a        // stop sound
            8038 | D3 18    : out  ($18),a  // send sound code
            803A | 18 C7    : jr   $8003
            -->
        </script>
        <script state="run">
            <output format="----- wonder boy 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="start + left : decrease code -10"       line="13" align="center" />
            <output format="start + right : 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@C100</argument>
            </output>
        </script>
        <script state="off">
            <action>maincpu.mw@015E = 0755            </action>
            <action>maincpu.mq@8000 = 2032302220323022</action>
            <action>maincpu.mq@8008 = C47F7F7F7F7F7F1A</action>
            <action>maincpu.mq@8010 = 3123210401B6B4A6</action>
            <action>maincpu.mq@8018 = 3123213331232133</action>
            <action>maincpu.mq@8020 = 7F7F7F7F7F1B2133</action>
            <action>maincpu.mq@8028 = 240401B7B5A7C57F</action>
            <action>maincpu.mq@8030 = 2436342624363426</action>
            <action>maincpu.mq@8038 = 7F7F7F1E240B0926</action>
        </script>
    </cheat>

    <cheat desc="skip rom check">
        <script state="on">
            <action>maincpu.mb@015B = 27</action>
        </script>
        <script state="off">
            <action>maincpu.mb@015B = 09</action>
        </script>
    </cheat>

</mamecheat>
wboy3.xml

Code: Select all

<!-- Wonder Boy (set 3, 315-5135) -->
<mamecheat version="1">

    <cheat desc="no hit">
        <comment>you hit an enemy on the skateboard</comment>
        <script state="on">
            <action>maincpu.ob@2E70 = 18</action> <!-- boss (body) -->
            <action>maincpu.ob@3025 = 18</action> <!-- boss (head) -->
            <action>maincpu.ob@31B4 = 18</action> <!-- boss (fireball) -->
            <action>maincpu.ob@36EF = C9</action> <!-- stone -->
            <action>maincpu.ob@37C6 = C9</action> <!-- bonfire -->
            <action>maincpu.ob@3839 = C9</action> <!-- snail -->
            <action>maincpu.ob@3897 = C9</action> <!-- skull -->
            <action>maincpu.ob@3B50 = C9</action> <!-- cobra -->
            <action>maincpu.ob@3CB0 = C9</action> <!-- rock -->
            <action>maincpu.ob@3D08 = C9</action> <!-- blue people -->
            <action>maincpu.ob@4246 = C9</action> <!-- frog -->
            <action>maincpu.ob@42AD = C9</action> <!-- bee -->
            <action>maincpu.ob@4355 = C9</action> <!-- bat -->
            <action>maincpu.ob@4511 = C9</action> <!-- spider -->
            <action>maincpu.ob@47C0 = C9</action> <!-- coyote -->
            <action>maincpu.ob@4ADB = C9</action> <!-- swordfish -->
            <action>maincpu.ob@4B96 = C9</action> <!-- octopus -->
            <action>maincpu.ob@4CDA = C9</action> <!-- icicle -->
        </script>
        <script state="off">
            <action>maincpu.ob@2E70 = 30</action>
            <action>maincpu.ob@3025 = 30</action>
            <action>maincpu.ob@31B4 = 30</action>
            <action>maincpu.ob@36EF = 21</action>
            <action>maincpu.ob@37C6 = 21</action>
            <action>maincpu.ob@3839 = 21</action>
            <action>maincpu.ob@3897 = 21</action>
            <action>maincpu.ob@3B50 = 21</action>
            <action>maincpu.ob@3CB0 = 21</action>
            <action>maincpu.ob@3D08 = 21</action>
            <action>maincpu.ob@4246 = 21</action>
            <action>maincpu.ob@42AD = 21</action>
            <action>maincpu.ob@4355 = 21</action>
            <action>maincpu.ob@4511 = 21</action>
            <action>maincpu.ob@47C0 = 21</action>
            <action>maincpu.ob@4ADB = 21</action>
            <action>maincpu.ob@4B96 = 21</action>
            <action>maincpu.ob@4CDA = 21</action>
        </script>
    </cheat>

    <cheat desc="auto fire">
        <script state="on">
            <action>maincpu.mb@2B5E = 86</action>
            <action>maincpu.ob@2B61 = 4F</action>
        </script>
        <script state="off">
            <action>maincpu.mb@2B5E = 84</action>
            <action>maincpu.ob@2B61 = 67</action>
        </script>
    </cheat>

    <cheat desc="multiple jump">
        <script state="on">
            <action>maincpu.od@299F = 00FFFFCD        </action> <!-- jump -->
            <action>maincpu.md@299F = FFBFD0FF        </action>
            <action>maincpu.od@2A23 = 00FFFFCD        </action> <!-- fall down -->
            <action>maincpu.md@2A23 = FFBFD0FF        </action>
            <action>maincpu.mq@BFD0 = CB08286ECBC08421</action>
            <action>maincpu.mq@BFD8 = DDC9E1031F36DDAE</action>
            <action>maincpu.mq@BFE0 = FFFFFFFFC97E1FCB</action>
            <!--
            BFD0 | 21 84 C0    : ld   hl,$C084     // check jump button
            BFD3 | CB 6E       : bit  5,(hl)
            BFD5 | 28 08       : jr   z,$BFDF
            BFD7 | CB AE       : res  5,(hl)
            BFD9 | DD 36 1F 03 : ld   (ix+$1f),$03 // set jump flag
            BFDD | E1          : pop  hl
            BFDE | C9          : ret
            BFDF | DD CB 1F 7E : bit  7,(ix+$1f)
            BFE3 | C9          : ret
            -->
        </script>
        <script state="off">
            <action>maincpu.od@299F = 7E1FCBDD        </action>
            <action>maincpu.md@299F = 7E1F437D        </action>
            <action>maincpu.od@2A23 = 5697CBDD        </action>
            <action>maincpu.md@2A23 = 7E1FE3DD        </action>
            <action>maincpu.mq@BFD0 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@BFE8 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@BFE0 = FFFFFFFFFFFFFFFF</action>
        </script>
    </cheat>

    <cheat desc="no slip">
        <script state="on">
            <action>maincpu.ob@263B = CD              </action>
            <action>maincpu.mw@263C = 96D0            </action>
            <action>maincpu.mq@96D0 = 01280CE6C0843A47</action>
            <action>maincpu.mq@96D8 = FFFFFFC91477DD78</action>
            <!--
            96D0 | 47       : ld   b,a
            96D1 | 3A 84 C0 : ld   a,($C084)
            96D4 | E6 0C    : and  $0C
            96D6 | 28 01    : jr   z,$96D9
            96D8 | 78       : ld   a,b
            96D9 | DD 77 14 : ld   (ix+$14),a
            96DC | C9       : ret
            -->
        </script>
        <script state="off">
            <action>maincpu.ob@263B = DD              </action>
            <action>maincpu.mw@263C = 145F            </action>
            <action>maincpu.mq@96D0 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@96D8 = FFFFFFFFFFFFFFFF</action>
        </script>
    </cheat>

    <cheat desc="vitality speed">
        <parameter>
            <item value="0x0000">no decrease</item>
            <item value="0x0001">01 (slow)  </item>
            <item value="0x0002">02         </item>
            <item value="0x0008">03         </item>
            <item value="0x0020">04         </item>
            <item value="0x0100">05 (fast)  </item>
        </parameter>
        <script state="change">
            <action>maincpu.mw@4E56 = -param</action>
            <action>maincpu.mw@4E5F = -param</action>
        </script>
        <script state="off">
            <action>maincpu.mw@4E55 = FFFF</action>
            <action>maincpu.mw@4E5F = FFF8</action>
        </script>
    </cheat>

    <cheat desc="hidden panel finder">
        <script state="on">
            <action>maincpu.ob@4723 = 00</action>
        </script>
        <script state="off">
            <action>maincpu.ob@4723 = D0</action>
        </script>
    </cheat>

    <cheat desc="hidden fried potato finder">
        <script state="on">
            <action>maincpu.mw@3956 = 96E0            </action>
            <action>maincpu.mq@96E0 = 3705FE0FE6187EDD</action>
            <action>maincpu.mq@96E8 = FFFFFFFFC92068C4</action>
            <!--
            96E0 | DD 7E 18 : ld   a,(ix+$18)
            96E3 | E6 0F    : and  $0F
            96E5 | FE 05    : cp   $05
            96E7 | 37       : scf
            96E8 | C4 68 20 : call nz,$2068
            96EB | C9       : ret
            -->
        </script>
        <script state="off">
            <action>maincpu.mw@3956 = 2068            </action>
            <action>maincpu.mq@96E0 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@96E8 = FFFFFFFFFFFFFFFF</action>
        </script>
    </cheat>

    <cheat desc="no fruit disappearance">
        <script state="on">
            <action>maincpu.ob@3920 = 18</action> <!-- fruit -->
            <action>maincpu.mb@39C1 = C3</action> <!-- fried potato -->
            <action>maincpu.ob@4751 = 18</action> <!-- panel -->
        </script>
        <script state="off">
            <action>maincpu.ob@3920 = 20</action>
            <action>maincpu.mb@39C1 = 22</action>
            <action>maincpu.ob@4751 = 20</action>
        </script>
    </cheat>

    <cheat desc="sound test mode">
        <comment>set &quot;skip rom check&quot; then reset the game (F3)</comment>
        <script state="on">
            <action>maincpu.mw@015E = 8000            </action>
            <action>maincpu.mq@8000 = 10E62F08DBC10021</action>
            <action>maincpu.mq@8008 = 2847B8B12F00DB4F</action>
            <action>maincpu.mq@8010 = 40FE35012080FEF2</action>
            <action>maincpu.mq@8018 = 3E042090FE340120</action>
            <action>maincpu.mq@8020 = 3E052050FE0618F0</action>
            <action>maincpu.mq@8028 = 032002FE78778610</action>
            <action>maincpu.mq@8030 = AF032004FE05187E</action>
            <action>maincpu.mq@8038 = 00000000C71818D3</action>
            <!--
            8000 | 21 00 C1 : ld   hl,$C100 // sound code address
            8003 | DB 08    : in   a,($08)  // read start button
            8005 | 2F       : cpl
            8006 | E6 10    : and  $10
            8008 | 4F       : ld   c,a
            8009 | DB 00    : in   a,($00)  // read other inputs
            800B | 2F       : cpl
            800C | B1       : or   c
            800D | B8       : cp   b
            800E | 47       : ld   b,a
            800F | 28 F2    : jr   z,$8003
            8011 | FE 80    : cp   $80
            8013 | 20 01    : jr   nz,$8016
            8015 | 35       : dec  (hl)     // decrease code -01
            8016 | FE 40    : cp   $40
            8018 | 20 01    : jr   nz,$801B
            801A | 34       : inc  (hl)     // increase code +01
            801B | FE 90    : cp   $90
            801D | 20 04    : jr   nz,$8023
            801F | 3E F0    : ld   a,$F0    // decrease code -10
            8021 | 18 06    : jr   $8029
            8023 | FE 50    : cp   $50
            8025 | 20 05    : jr   nz,$802C
            8027 | 3E 10    : ld   a,$10    // increase code +10
            8029 | 86       : add  a,(hl)
            802A | 77       : ld   (hl),a
            802B | 78       : ld   a,b
            802C | FE 02    : cp   $02
            802E | 20 03    : jr   nz,$8033
            8030 | 7E       : ld   a,(hl)   // play sound
            8031 | 18 05    : jr   $8038
            8033 | FE 04    : cp   $04
            8035 | 20 03    : jr   nz,$803A
            8037 | AF       : xor  a        // stop sound
            8038 | D3 18    : out  ($18),a  // send sound code
            803A | 18 C7    : jr   $8003
            -->
        </script>
        <script state="run">
            <output format="----- wonder boy 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="start + left : decrease code -10"       line="13" align="center" />
            <output format="start + right : 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@C100</argument>
            </output>
        </script>
        <script state="off">
            <action>maincpu.mw@015E = 0755            </action>
            <action>maincpu.mq@8000 = 7F1A203230222032</action>
            <action>maincpu.mq@8008 = B4A6C47F7F7F7F7F</action>
            <action>maincpu.mq@8010 = 21333123210401B6</action>
            <action>maincpu.mq@8018 = 2133312321333123</action>
            <action>maincpu.mq@8020 = C57F7F7F7F7F7F1B</action>
            <action>maincpu.mq@8028 = 3426240401B7B5A7</action>
            <action>maincpu.mq@8030 = 0926243634262436</action>
            <action>maincpu.mq@8038 = 7F7F7F7F7F1E240B</action>
        </script>
    </cheat>

    <cheat desc="skip rom check">
        <script state="on">
            <action>maincpu.mb@015B = 27</action>
        </script>
        <script state="off">
            <action>maincpu.mb@015B = 09</action>
        </script>
    </cheat>

</mamecheat>
wboy4.xml

Code: Select all

<!-- Wonder Boy (315-5162, 4-D Warriors Conversion) -->
<mamecheat version="1">

    <cheat desc="no hit">
        <comment>you hit an enemy on the skateboard</comment>
        <script state="on">
            <action>maincpu.ob@2E72 = 18</action> <!-- boss (body) -->
            <action>maincpu.ob@3027 = 18</action> <!-- boss (head) -->
            <action>maincpu.ob@31B6 = 18</action> <!-- boss (fireball) -->
            <action>maincpu.ob@36F1 = C9</action> <!-- stone -->
            <action>maincpu.ob@37C8 = C9</action> <!-- bonfire -->
            <action>maincpu.ob@383B = C9</action> <!-- snail -->
            <action>maincpu.ob@3899 = C9</action> <!-- skull -->
            <action>maincpu.ob@3B52 = C9</action> <!-- cobra -->
            <action>maincpu.ob@3CB2 = C9</action> <!-- rock -->
            <action>maincpu.ob@3D0A = C9</action> <!-- blue people -->
            <action>maincpu.ob@4248 = C9</action> <!-- frog -->
            <action>maincpu.ob@42AF = C9</action> <!-- bee -->
            <action>maincpu.ob@4357 = C9</action> <!-- bat -->
            <action>maincpu.ob@4513 = C9</action> <!-- spider -->
            <action>maincpu.ob@47C2 = C9</action> <!-- coyote -->
            <action>maincpu.ob@4ADD = C9</action> <!-- swordfish -->
            <action>maincpu.ob@4B98 = C9</action> <!-- octopus -->
            <action>maincpu.ob@4CDC = C9</action> <!-- icicle -->
        </script>
        <script state="off">
            <action>maincpu.ob@2E72 = 30</action>
            <action>maincpu.ob@3027 = 30</action>
            <action>maincpu.ob@31B6 = 30</action>
            <action>maincpu.ob@36F1 = 21</action>
            <action>maincpu.ob@37C8 = 21</action>
            <action>maincpu.ob@383B = 21</action>
            <action>maincpu.ob@3899 = 21</action>
            <action>maincpu.ob@3B52 = 21</action>
            <action>maincpu.ob@3CB2 = 21</action>
            <action>maincpu.ob@3D0A = 21</action>
            <action>maincpu.ob@4248 = 21</action>
            <action>maincpu.ob@42AF = 21</action>
            <action>maincpu.ob@4357 = 21</action>
            <action>maincpu.ob@4513 = 21</action>
            <action>maincpu.ob@47C2 = 21</action>
            <action>maincpu.ob@4ADD = 21</action>
            <action>maincpu.ob@4B98 = 21</action>
            <action>maincpu.ob@4CDC = 21</action>
        </script>
    </cheat>

    <cheat desc="auto fire">
        <script state="on">
            <action>maincpu.mb@2B60 = 86</action>
            <action>maincpu.ob@2B63 = 4F</action>
        </script>
        <script state="off">
            <action>maincpu.mb@2B60 = 84</action>
            <action>maincpu.ob@2B63 = 67</action>
        </script>
    </cheat>

    <cheat desc="multiple jump">
        <script state="on">
            <action>maincpu.od@29A1 = 00FFFFCD        </action> <!-- jump -->
            <action>maincpu.md@29A1 = FFBFE0FF        </action>
            <action>maincpu.od@2A25 = 00FFFFCD        </action> <!-- fall down -->
            <action>maincpu.md@2A25 = FFBFE0FF        </action>
            <action>maincpu.mq@BFE0 = CB08286ECBC08421</action>
            <action>maincpu.mq@BFE8 = DDC9E1031F36DDAE</action>
            <action>maincpu.mq@BFF0 = FFFFFFFFC97E1FCB</action>
            <!--
            BFE0 | 21 84 C0    : ld   hl,$C084     // check jump button
            BFE3 | CB 6E       : bit  5,(hl)
            BFE5 | 28 08       : jr   z,$BFEF
            BFE7 | CB AE       : res  5,(hl)
            BFE9 | DD 36 1F 03 : ld   (ix+$1f),$03 // set jump flag
            BFED | E1          : pop  hl
            BFEE | C9          : ret
            BFEF | DD CB 1F 7E : bit  7,(ix+$1f)
            BFF3 | C9          : ret
            -->
        </script>
        <script state="off">
            <action>maincpu.od@29A1 = 2E4BCBDD        </action>
            <action>maincpu.md@29A1 = 7E1F9B89        </action>
            <action>maincpu.od@2A25 = 2E4BCBDD        </action>
            <action>maincpu.md@2A25 = 7E1F9B89        </action>
            <action>maincpu.mq@BFE0 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@BFE8 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@BFF0 = FFFFFFFFFFFFFFFF</action>
        </script>
    </cheat>

    <cheat desc="no slip">
        <script state="on">
            <action>maincpu.ob@263D = CD              </action>
            <action>maincpu.mw@263E = 96D0            </action>
            <action>maincpu.mq@96D0 = 01280CE6C0843A47</action>
            <action>maincpu.mq@96D8 = FFFFFFC91477DD78</action>
            <!--
            96D0 | 47       : ld   b,a
            96D1 | 3A 84 C0 : ld   a,($C084)
            96D4 | E6 0C    : and  $0C
            96D6 | 28 01    : jr   z,$96D9
            96D8 | 78       : ld   a,b
            96D9 | DD 77 14 : ld   (ix+$14),a
            96DC | C9       : ret
            -->
        </script>
        <script state="off">
            <action>maincpu.ob@263D = DD              </action>
            <action>maincpu.mw@263E = 1427            </action>
            <action>maincpu.mq@96D0 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@96D8 = FFFFFFFFFFFFFFFF</action>
        </script>
    </cheat>

    <cheat desc="vitality speed">
        <parameter>
            <item value="0x0000">no decrease</item>
            <item value="0x0001">01 (slow)  </item>
            <item value="0x0002">02         </item>
            <item value="0x0008">03         </item>
            <item value="0x0020">04         </item>
            <item value="0x0100">05 (fast)  </item>
        </parameter>
        <script state="change">
            <action>maincpu.mw@4E58 = -param</action>
            <action>maincpu.mw@4E61 = -param</action>
        </script>
        <script state="off">
            <action>maincpu.mw@4E58 = FFFF</action>
            <action>maincpu.mw@4E61 = FFF8</action>
        </script>
    </cheat>

    <cheat desc="hidden panel finder">
        <script state="on">
            <action>maincpu.ob@4725 = 00</action>
        </script>
        <script state="off">
            <action>maincpu.ob@4725 = D0</action>
        </script>
    </cheat>

    <cheat desc="hidden fried potato finder">
        <script state="on">
            <action>maincpu.mw@3958 = 96E0            </action>
            <action>maincpu.mq@96E0 = 3705FE0FE6187EDD</action>
            <action>maincpu.mq@96E8 = FFFFFFFFC9206AC4</action>
            <!--
            96E0 | DD 7E 18 : ld   a,(ix+$18)
            96E3 | E6 0F    : and  $0F
            96E5 | FE 05    : cp   $05
            96E7 | 37       : scf
            96E8 | C4 6A 20 : call nz,$206A
            96EB | C9       : ret
            -->
        </script>
        <script state="off">
            <action>maincpu.mw@3958 = 206A            </action>
            <action>maincpu.mq@96E0 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@96E8 = FFFFFFFFFFFFFFFF</action>
        </script>
    </cheat>

    <cheat desc="no fruit disappearance">
        <script state="on">
            <action>maincpu.ob@3922 = 18</action> <!-- fruit -->
            <action>maincpu.mb@39C3 = C5</action> <!-- fried potato -->
            <action>maincpu.ob@4753 = 18</action> <!-- panel -->
        </script>
        <script state="off">
            <action>maincpu.ob@3922 = 20</action>
            <action>maincpu.mb@39C3 = 24</action>
            <action>maincpu.ob@4753 = 20</action>
        </script>
    </cheat>

    <cheat desc="sound test mode">
        <comment>set &quot;skip rom check&quot; then reset the game (F3)</comment>
        <script state="on">
            <action>maincpu.mw@015E = 8000            </action>
            <action>maincpu.mq@8000 = 10E62F08DBC10021</action>
            <action>maincpu.mq@8008 = 2847B8B12F00DB4F</action>
            <action>maincpu.mq@8010 = 40FE35012080FEF2</action>
            <action>maincpu.mq@8018 = 3E042090FE340120</action>
            <action>maincpu.mq@8020 = 3E052050FE0618F0</action>
            <action>maincpu.mq@8028 = 032002FE78778610</action>
            <action>maincpu.mq@8030 = AF032004FE05187E</action>
            <action>maincpu.mq@8038 = 00000000C71818D3</action>
            <!--
            8000 | 21 00 C1 : ld   hl,$C100 // sound code address
            8003 | DB 08    : in   a,($08)  // read start button
            8005 | 2F       : cpl
            8006 | E6 10    : and  $10
            8008 | 4F       : ld   c,a
            8009 | DB 00    : in   a,($00)  // read other inputs
            800B | 2F       : cpl
            800C | B1       : or   c
            800D | B8       : cp   b
            800E | 47       : ld   b,a
            800F | 28 F2    : jr   z,$8003
            8011 | FE 80    : cp   $80
            8013 | 20 01    : jr   nz,$8016
            8015 | 35       : dec  (hl)     // decrease code -01
            8016 | FE 40    : cp   $40
            8018 | 20 01    : jr   nz,$801B
            801A | 34       : inc  (hl)     // increase code +01
            801B | FE 90    : cp   $90
            801D | 20 04    : jr   nz,$8023
            801F | 3E F0    : ld   a,$F0    // decrease code -10
            8021 | 18 06    : jr   $8029
            8023 | FE 50    : cp   $50
            8025 | 20 05    : jr   nz,$802C
            8027 | 3E 10    : ld   a,$10    // increase code +10
            8029 | 86       : add  a,(hl)
            802A | 77       : ld   (hl),a
            802B | 78       : ld   a,b
            802C | FE 02    : cp   $02
            802E | 20 03    : jr   nz,$8033
            8030 | 7E       : ld   a,(hl)   // play sound
            8031 | 18 05    : jr   $8038
            8033 | FE 04    : cp   $04
            8035 | 20 03    : jr   nz,$803A
            8037 | AF       : xor  a        // stop sound
            8038 | D3 18    : out  ($18),a  // send sound code
            803A | 18 C7    : jr   $8003
            -->
        </script>
        <script state="run">
            <output format="----- wonder boy 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="start + left : decrease code -10"       line="13" align="center" />
            <output format="start + right : 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@C100</argument>
            </output>
        </script>
        <script state="off">
            <action>maincpu.mw@015E = 0755            </action>
            <action>maincpu.mq@8000 = 2032302220323022</action>
            <action>maincpu.mq@8008 = C47F7F7F7F7F7F1A</action>
            <action>maincpu.mq@8010 = 3123210401B6B4A6</action>
            <action>maincpu.mq@8018 = 3123213331232133</action>
            <action>maincpu.mq@8020 = 7F7F7F7F7F1B2133</action>
            <action>maincpu.mq@8028 = 240401B7B5A7C57F</action>
            <action>maincpu.mq@8030 = 2436342624363426</action>
            <action>maincpu.mq@8038 = 7F7F7F1E240B0926</action>
        </script>
    </cheat>

    <cheat desc="skip rom check">
        <script state="on">
            <action>maincpu.mb@015B = 27</action>
        </script>
        <script state="off">
            <action>maincpu.mb@015B = 09</action>
        </script>
    </cheat>

</mamecheat>
jman
Posts: 903
Joined: Tue Dec 01, 2020 1:24 pm
Been thanked: 4 times

[wboy]+ Wonder Boy

Post by jman »

wboyu.xml

Code: Select all

<!-- Wonder Boy (prototype?) -->
<mamecheat version="1">

    <cheat desc="no hit">
        <comment>you hit an enemy on the skateboard</comment>
        <script state="on">
            <action>maincpu.mb@2C68 = 18</action> <!-- boss (body) -->
            <action>maincpu.mb@2DE1 = 18</action> <!-- boss (head) -->
            <action>maincpu.mb@2F4B = 18</action> <!-- boss (fireball) -->
            <action>maincpu.mb@33D4 = C9</action> <!-- stone -->
            <action>maincpu.mb@34A2 = C9</action> <!-- bonfire -->
            <action>maincpu.mb@3515 = C9</action> <!-- snail -->
            <action>maincpu.mb@3573 = C9</action> <!-- skull -->
            <action>maincpu.mb@3822 = C9</action> <!-- cobra -->
            <action>maincpu.mb@3981 = C9</action> <!-- rock -->
            <action>maincpu.mb@39D9 = C9</action> <!-- blue people -->
            <action>maincpu.mb@3EED = C9</action> <!-- frog -->
            <action>maincpu.mb@3F4B = C9</action> <!-- bee -->
            <action>maincpu.mb@3FF3 = C9</action> <!-- bat -->
            <action>maincpu.mb@41A6 = C9</action> <!-- spider -->
            <action>maincpu.mb@4436 = C9</action> <!-- coyote -->
            <action>maincpu.mb@4748 = C9</action> <!-- swordfish -->
            <action>maincpu.mb@47FE = C9</action> <!-- octopus -->
            <action>maincpu.mb@493D = C9</action> <!-- icicle -->
        </script>
        <script state="off">
            <action>maincpu.mb@2C68 = 30</action>
            <action>maincpu.mb@2DE1 = 30</action>
            <action>maincpu.mb@2F4B = 30</action>
            <action>maincpu.mb@33D4 = 21</action>
            <action>maincpu.mb@34A2 = 21</action>
            <action>maincpu.mb@3515 = 21</action>
            <action>maincpu.mb@3573 = 21</action>
            <action>maincpu.mb@3822 = 21</action>
            <action>maincpu.mb@3981 = 21</action>
            <action>maincpu.mb@39D9 = 21</action>
            <action>maincpu.mb@3EED = 21</action>
            <action>maincpu.mb@3F4B = 21</action>
            <action>maincpu.mb@3FF3 = 21</action>
            <action>maincpu.mb@41A6 = 21</action>
            <action>maincpu.mb@4436 = 21</action>
            <action>maincpu.mb@4748 = 21</action>
            <action>maincpu.mb@47FE = 21</action>
            <action>maincpu.mb@493D = 21</action>
        </script>
    </cheat>

    <cheat desc="auto fire">
        <script state="on">
            <action>maincpu.mb@297C = 7C</action>
            <action>maincpu.mb@297F = 4F</action>
        </script>
        <script state="off">
            <action>maincpu.mb@297C = 7A</action>
            <action>maincpu.mb@297F = 67</action>
        </script>
    </cheat>

    <cheat desc="multiple jump">
        <script state="on">
            <action>maincpu.md@27E1 = 00BF40CD        </action> <!-- jump -->
            <action>maincpu.md@2865 = 00BF40CD        </action> <!-- fall down -->
            <action>maincpu.mq@BF40 = CB08286ECBC07A21</action>
            <action>maincpu.mq@BF48 = DDC9E1031F36DDAE</action>
            <action>maincpu.mq@BF50 = FFFFFFFFC97E1FCB</action>
            <!--
            BF40 | 21 7A C0    : ld   hl,$C07A     // check jump button
            BF43 | CB 6E       : bit  5,(hl)
            BF45 | 28 08       : jr   z,$BFEF
            BF47 | CB AE       : res  5,(hl)
            BF49 | DD 36 1F 03 : ld   (ix+$1f),$03 // set jump flag
            BF4D | E1          : pop  hl
            BF4E | C9          : ret
            BF4F | DD CB 1F 7E : bit  7,(ix+$1f)
            BF53 | C9          : ret
            -->
        </script>
        <script state="off">
            <action>maincpu.md@27E1 = 7E1FCBDD        </action>
            <action>maincpu.md@2865 = 7E1FCBDD        </action>
            <action>maincpu.mq@BF40 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@BF48 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@BF50 = FFFFFFFFFFFFFFFF</action>
        </script>
    </cheat>

    <cheat desc="no slip">
        <script state="on">
            <action>maincpu.md@2499 = C9BF60CD        </action>
            <action>maincpu.mq@BF60 = 01280CE6C07A3A47</action>
            <action>maincpu.mq@BF68 = FFFFFFC91477DD78</action>
            <!--
            BF60 | 47       : ld   b,a
            BF61 | 3A 7A C0 : ld   a,($C07A)
            BF64 | E6 0C    : and  $0C
            BF66 | 28 01    : jr   z,$BF69
            BF68 | 78       : ld   a,b
            BF69 | DD 77 14 : ld   (ix+$14),a
            BF6C | C9       : ret
            -->
        </script>
        <script state="off">
            <action>maincpu.md@2499 = C91477DD        </action>
            <action>maincpu.mq@BF60 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@BF68 = FFFFFFFFFFFFFFFF</action>
        </script>
    </cheat>

    <cheat desc="vitality speed">
        <parameter>
            <item value="0x0000">no decrease</item>
            <item value="0x0001">01 (slow)  </item>
            <item value="0x0002">02         </item>
            <item value="0x0008">03         </item>
            <item value="0x0020">04         </item>
            <item value="0x0100">05 (fast)  </item>
        </parameter>
        <script state="change">
            <action>maincpu.mw@4AB9 = -param</action>
            <action>maincpu.mw@4AC2 = -param</action>
        </script>
        <script state="off">
            <action>maincpu.mw@4AB9 = FFFF</action>
            <action>maincpu.mw@4AC2 = FFF8</action>
        </script>
    </cheat>

    <cheat desc="hidden panel finder">
        <script state="on">
            <action>maincpu.mb@4391 = 00</action>
        </script>
        <script state="off">
            <action>maincpu.mb@4391 = D0</action>
        </script>
    </cheat>

    <cheat desc="hidden fried potato finder">
        <script state="on">
            <action>maincpu.mw@3632 = BF70            </action>
            <action>maincpu.mq@BF70 = 3705FE0FE6187EDD</action>
            <action>maincpu.mq@BF78 = FFFFFFFFC91EB6C4</action>
            <!--
            BF70 | DD 7E 18 : ld   a,(ix+$18)
            BF73 | E6 0F    : and  $0F
            BF75 | FE 05    : cp   $05
            BF77 | 37       : scf
            BF78 | C4 B6 1E : call nz,$1EB6
            BF7B | C9       : ret
            -->
        </script>
        <script state="off">
            <action>maincpu.mw@3632 = 1EB6            </action>
            <action>maincpu.mq@BF70 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@BF78 = FFFFFFFFFFFFFFFF</action>
        </script>
    </cheat>

    <cheat desc="no fruit disappearance">
        <script state="on">
            <action>maincpu.mb@35FC = 18  </action> <!-- fruit -->
            <action>maincpu.mw@369D = 369F</action> <!-- fried potato -->
            <action>maincpu.mb@43C6 = 18  </action> <!-- panel -->
        </script>
        <script state="off">
            <action>maincpu.mb@35FC = 20  </action>
            <action>maincpu.mw@369D = 35FE</action>
            <action>maincpu.mb@43C6 = 20  </action>
        </script>
    </cheat>

    <cheat desc="sound test mode">
        <comment>reset the game (F3) to enter sound test mode</comment>
        <script state="on">
            <action>maincpu.md@0135 = CBBF70CD        </action>
            <action>maincpu.mq@BF70 = 10E62F08DBC10021</action>
            <action>maincpu.mq@BF78 = 2847B8B12F00DB4F</action>
            <action>maincpu.mq@BF80 = 40FE35012080FEF2</action>
            <action>maincpu.mq@BF88 = 3E042090FE340120</action>
            <action>maincpu.mq@BF90 = 3E052050FE0618F0</action>
            <action>maincpu.mq@BF98 = 032002FE78778610</action>
            <action>maincpu.mq@BFA0 = AF032004FE05187E</action>
            <action>maincpu.mq@BFA8 = 00000000C71818D3</action>
            <!--
            BF70 | 21 00 C1 : ld   hl,$C100 // sound code address
            BF73 | DB 08    : in   a,($08)  // read start button
            BF75 | 2F       : cpl
            BF76 | E6 10    : and  $10
            BF78 | 4F       : ld   c,a
            BF79 | DB 00    : in   a,($00)  // read other inputs
            BF7B | 2F       : cpl
            BF7C | B1       : or   c
            BF7D | B8       : cp   b
            BF7E | 47       : ld   b,a
            BF7F | 28 F2    : jr   z,$BF73
            BF81 | FE 80    : cp   $80
            BF83 | 20 01    : jr   nz,$BF86
            BF85 | 35       : dec  (hl)     // decrease code -01
            BF86 | FE 40    : cp   $40
            BF88 | 20 01    : jr   nz,$BF8B
            BF8A | 34       : inc  (hl)     // increase code +01
            BF8B | FE 90    : cp   $90
            BF8D | 20 04    : jr   nz,$BF93
            BF8F | 3E F0    : ld   a,$F0    // decrease code -10
            BF91 | 18 06    : jr   $BF99
            BF93 | FE 50    : cp   $50
            BF95 | 20 05    : jr   nz,$BF9C
            BF97 | 3E 10    : ld   a,$10    // increase code +10
            BF99 | 86       : add  a,(hl)
            BF9A | 77       : ld   (hl),a
            BF9B | 78       : ld   a,b
            BF9C | FE 02    : cp   $02
            BF9E | 20 03    : jr   nz,$BFA3
            BFA0 | 7E       : ld   a,(hl)   // play sound
            BFA1 | 18 05    : jr   $BFA8
            BFA3 | FE 04    : cp   $04
            BFA5 | 20 03    : jr   nz,$BFAA
            BFA7 | AF       : xor  a        // stop sound
            BFA8 | D3 18    : out  ($18),a  // send sound code
            BFAA | 18 C7    : jr   $BF73
            -->
        </script>
        <script state="run">
            <output format="----- wonder boy 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="start + left : decrease code -10"       line="13" align="center" />
            <output format="start + right : 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@C100</argument>
            </output>
        </script>
        <script state="off">
            <action>maincpu.md@0135 = CBC00D3A        </action>
            <action>maincpu.mq@BF70 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@BF78 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@BF80 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@BF88 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@BF90 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@BF98 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@BFA0 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@BFA8 = FFFFFFFFFFFFFFFF</action>
        </script>
    </cheat>

</mamecheat>
wboy5.xml

Code: Select all

<!-- Wonder Boy (set 5, bootleg) -->
<mamecheat version="1">

    <cheat desc="no hit">
        <comment>you hit an enemy on the skateboard</comment>
        <script state="on">
            <action>maincpu.ob@2E70 = 18</action> <!-- boss (body) -->
            <action>maincpu.ob@3025 = 18</action> <!-- boss (head) -->
            <action>maincpu.ob@31B4 = 18</action> <!-- boss (fireball) -->
            <action>maincpu.ob@36EF = C9</action> <!-- stone -->
            <action>maincpu.ob@37C6 = C9</action> <!-- bonfire -->
            <action>maincpu.ob@3839 = C9</action> <!-- snail -->
            <action>maincpu.ob@3897 = C9</action> <!-- skull -->
            <action>maincpu.ob@3B50 = C9</action> <!-- cobra -->
            <action>maincpu.ob@3CB0 = C9</action> <!-- rock -->
            <action>maincpu.ob@3D08 = C9</action> <!-- blue people -->
            <action>maincpu.ob@4246 = C9</action> <!-- frog -->
            <action>maincpu.ob@42AD = C9</action> <!-- bee -->
            <action>maincpu.ob@4355 = C9</action> <!-- bat -->
            <action>maincpu.ob@4511 = C9</action> <!-- spider -->
            <action>maincpu.ob@47C0 = C9</action> <!-- coyote -->
            <action>maincpu.ob@4ADB = C9</action> <!-- swordfish -->
            <action>maincpu.ob@4B96 = C9</action> <!-- octopus -->
            <action>maincpu.ob@4CDA = C9</action> <!-- icicle -->
        </script>
        <script state="off">
            <action>maincpu.ob@2E70 = 30</action>
            <action>maincpu.ob@3025 = 30</action>
            <action>maincpu.ob@31B4 = 30</action>
            <action>maincpu.ob@36EF = 21</action>
            <action>maincpu.ob@37C6 = 21</action>
            <action>maincpu.ob@3839 = 21</action>
            <action>maincpu.ob@3897 = 21</action>
            <action>maincpu.ob@3B50 = 21</action>
            <action>maincpu.ob@3CB0 = 21</action>
            <action>maincpu.ob@3D08 = 21</action>
            <action>maincpu.ob@4246 = 21</action>
            <action>maincpu.ob@42AD = 21</action>
            <action>maincpu.ob@4355 = 21</action>
            <action>maincpu.ob@4511 = 21</action>
            <action>maincpu.ob@47C0 = 21</action>
            <action>maincpu.ob@4ADB = 21</action>
            <action>maincpu.ob@4B96 = 21</action>
            <action>maincpu.ob@4CDA = 21</action>
        </script>
    </cheat>

    <cheat desc="auto fire">
        <script state="on">
            <action>maincpu.mb@2B5E = 86</action>
            <action>maincpu.ob@2B61 = 4F</action>
        </script>
        <script state="off">
            <action>maincpu.mb@2B5E = 84</action>
            <action>maincpu.ob@2B61 = 67</action>
        </script>
    </cheat>

    <cheat desc="multiple jump">
        <script state="on">
            <action>maincpu.od@299F = 00FFFFCD        </action> <!-- jump -->
            <action>maincpu.md@299F = FFBFD0FF        </action>
            <action>maincpu.od@2A23 = 00FFFFCD        </action> <!-- fall down -->
            <action>maincpu.md@2A23 = FFBFD0FF        </action>
            <action>maincpu.mq@BFD0 = CB08286ECBC08421</action>
            <action>maincpu.mq@BFD8 = DDC9E1031F36DDAE</action>
            <action>maincpu.mq@BFE0 = FFFFFFFFC97E1FCB</action>
            <!--
            BFD0 | 21 84 C0    : ld   hl,$C084     // check jump button
            BFD3 | CB 6E       : bit  5,(hl)
            BFD5 | 28 08       : jr   z,$BFDF
            BFD7 | CB AE       : res  5,(hl)
            BFD9 | DD 36 1F 03 : ld   (ix+$1f),$03 // set jump flag
            BFDD | E1          : pop  hl
            BFDE | C9          : ret
            BFDF | DD CB 1F 7E : bit  7,(ix+$1f)
            BFE3 | C9          : ret
            -->
        </script>
        <script state="off">
            <action>maincpu.od@299F = 7E1FCBDD        </action>
            <action>maincpu.md@299F = 7E1F437D        </action>
            <action>maincpu.od@2A23 = 5697CBDD        </action>
            <action>maincpu.md@2A23 = 7E1FE3DD        </action>
            <action>maincpu.mq@BFD0 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@BFE8 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@BFE0 = FFFFFFFFFFFFFFFF</action>
        </script>
    </cheat>

    <cheat desc="no slip">
        <script state="on">
            <action>maincpu.ob@263B = CD              </action>
            <action>maincpu.mw@263C = 96D0            </action>
            <action>maincpu.mq@96D0 = 01280CE6C0843A47</action>
            <action>maincpu.mq@96D8 = FFFFFFC91477DD78</action>
            <!--
            96D0 | 47       : ld   b,a
            96D1 | 3A 84 C0 : ld   a,($C084)
            96D4 | E6 0C    : and  $0C
            96D6 | 28 01    : jr   z,$96D9
            96D8 | 78       : ld   a,b
            96D9 | DD 77 14 : ld   (ix+$14),a
            96DC | C9       : ret
            -->
        </script>
        <script state="off">
            <action>maincpu.ob@263B = DD              </action>
            <action>maincpu.mw@263C = 145F            </action>
            <action>maincpu.mq@96D0 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@96D8 = FFFFFFFFFFFFFFFF</action>
        </script>
    </cheat>

    <cheat desc="vitality speed">
        <parameter>
            <item value="0x0000">no decrease</item>
            <item value="0x0001">01 (slow)  </item>
            <item value="0x0002">02         </item>
            <item value="0x0008">03         </item>
            <item value="0x0020">04         </item>
            <item value="0x0100">05 (fast)  </item>
        </parameter>
        <script state="change">
            <action>maincpu.mw@4E56 = -param</action>
            <action>maincpu.mw@4E5F = -param</action>
        </script>
        <script state="off">
            <action>maincpu.mw@4E55 = FFFF</action>
            <action>maincpu.mw@4E5F = FFF8</action>
        </script>
    </cheat>

    <cheat desc="hidden panel finder">
        <script state="on">
            <action>maincpu.ob@4723 = 00</action>
        </script>
        <script state="off">
            <action>maincpu.ob@4723 = D0</action>
        </script>
    </cheat>

    <cheat desc="hidden fried potato finder">
        <script state="on">
            <action>maincpu.mw@3956 = 96E0            </action>
            <action>maincpu.mq@96E0 = 3705FE0FE6187EDD</action>
            <action>maincpu.mq@96E8 = FFFFFFFFC92068C4</action>
            <!--
            96E0 | DD 7E 18 : ld   a,(ix+$18)
            96E3 | E6 0F    : and  $0F
            96E5 | FE 05    : cp   $05
            96E7 | 37       : scf
            96E8 | C4 68 20 : call nz,$2068
            96EB | C9       : ret
            -->
        </script>
        <script state="off">
            <action>maincpu.mw@3956 = 2068            </action>
            <action>maincpu.mq@96E0 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@96E8 = FFFFFFFFFFFFFFFF</action>
        </script>
    </cheat>

    <cheat desc="no fruit disappearance">
        <script state="on">
            <action>maincpu.ob@3920 = 18</action> <!-- fruit -->
            <action>maincpu.mb@39C1 = C3</action> <!-- fried potato -->
            <action>maincpu.ob@4751 = 18</action> <!-- panel -->
        </script>
        <script state="off">
            <action>maincpu.ob@3920 = 20</action>
            <action>maincpu.mb@39C1 = 22</action>
            <action>maincpu.ob@4751 = 20</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@015E = 8000            </action>
            <action>maincpu.mq@8000 = 10E62F08DBC10021</action>
            <action>maincpu.mq@8008 = 2847B8B12F00DB4F</action>
            <action>maincpu.mq@8010 = 40FE35012080FEF2</action>
            <action>maincpu.mq@8018 = 3E042090FE340120</action>
            <action>maincpu.mq@8020 = 3E052050FE0618F0</action>
            <action>maincpu.mq@8028 = 032002FE78778610</action>
            <action>maincpu.mq@8030 = AF032004FE05187E</action>
            <action>maincpu.mq@8038 = 00000000C71818D3</action>
            <!--
            8000 | 21 00 C1 : ld   hl,$C100 // sound code address
            8003 | DB 08    : in   a,($08)  // read start button
            8005 | 2F       : cpl
            8006 | E6 10    : and  $10
            8008 | 4F       : ld   c,a
            8009 | DB 00    : in   a,($00)  // read other inputs
            800B | 2F       : cpl
            800C | B1       : or   c
            800D | B8       : cp   b
            800E | 47       : ld   b,a
            800F | 28 F2    : jr   z,$8003
            8011 | FE 80    : cp   $80
            8013 | 20 01    : jr   nz,$8016
            8015 | 35       : dec  (hl)     // decrease code -01
            8016 | FE 40    : cp   $40
            8018 | 20 01    : jr   nz,$801B
            801A | 34       : inc  (hl)     // increase code +01
            801B | FE 90    : cp   $90
            801D | 20 04    : jr   nz,$8023
            801F | 3E F0    : ld   a,$F0    // decrease code -10
            8021 | 18 06    : jr   $8029
            8023 | FE 50    : cp   $50
            8025 | 20 05    : jr   nz,$802C
            8027 | 3E 10    : ld   a,$10    // increase code +10
            8029 | 86       : add  a,(hl)
            802A | 77       : ld   (hl),a
            802B | 78       : ld   a,b
            802C | FE 02    : cp   $02
            802E | 20 03    : jr   nz,$8033
            8030 | 7E       : ld   a,(hl)   // play sound
            8031 | 18 05    : jr   $8038
            8033 | FE 04    : cp   $04
            8035 | 20 03    : jr   nz,$803A
            8037 | AF       : xor  a        // stop sound
            8038 | D3 18    : out  ($18),a  // send sound code
            803A | 18 C7    : jr   $8003
            -->
        </script>
        <script state="run">
            <output format="----- wonder boy 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="start + left : decrease code -10"       line="13" align="center" />
            <output format="start + right : 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@C100</argument>
            </output>
        </script>
        <script state="off">
            <action>maincpu.mw@015E = 0755            </action>
            <action>maincpu.mq@8000 = 7F1A203230222032</action>
            <action>maincpu.mq@8008 = B4A6C47F7F7F7F7F</action>
            <action>maincpu.mq@8010 = 21333123210401B6</action>
            <action>maincpu.mq@8018 = 2133312321333123</action>
            <action>maincpu.mq@8020 = C57F7F7F7F7F7F1B</action>
            <action>maincpu.mq@8028 = 3426240401B7B5A7</action>
            <action>maincpu.mq@8030 = 0926243634262436</action>
            <action>maincpu.mq@8038 = 7F7F7F7F7F1E240B</action>
        </script>
    </cheat>

    <cheat desc="skip rom check">
        <script state="on">
            <action>maincpu.mb@015B = 27</action>
        </script>
        <script state="off">
            <action>maincpu.mb@015B = 09</action>
        </script>
    </cheat>

</mamecheat>
wboyub.xml

Code: Select all

<!-- Wonder Boy (US bootleg) -->
<mamecheat version="1">

    <cheat desc="no hit">
        <comment>you hit an enemy on the skateboard</comment>
        <script state="on">
            <action>maincpu.ob@2E72 = 18</action> <!-- boss (body) -->
            <action>maincpu.ob@3027 = 18</action> <!-- boss (head) -->
            <action>maincpu.ob@31B6 = 18</action> <!-- boss (fireball) -->
            <action>maincpu.ob@36F1 = C9</action> <!-- stone -->
            <action>maincpu.ob@37C8 = C9</action> <!-- bonfire -->
            <action>maincpu.ob@383B = C9</action> <!-- snail -->
            <action>maincpu.ob@3899 = C9</action> <!-- skull -->
            <action>maincpu.ob@3B52 = C9</action> <!-- cobra -->
            <action>maincpu.ob@3CB2 = C9</action> <!-- rock -->
            <action>maincpu.ob@3D0A = C9</action> <!-- blue people -->
            <action>maincpu.ob@4248 = C9</action> <!-- frog -->
            <action>maincpu.ob@42AF = C9</action> <!-- bee -->
            <action>maincpu.ob@4357 = C9</action> <!-- bat -->
            <action>maincpu.ob@4513 = C9</action> <!-- spider -->
            <action>maincpu.ob@47C2 = C9</action> <!-- coyote -->
            <action>maincpu.ob@4ADD = C9</action> <!-- swordfish -->
            <action>maincpu.ob@4B98 = C9</action> <!-- octopus -->
            <action>maincpu.ob@4CDC = C9</action> <!-- icicle -->
        </script>
        <script state="off">
            <action>maincpu.ob@2E72 = 30</action>
            <action>maincpu.ob@3027 = 30</action>
            <action>maincpu.ob@31B6 = 30</action>
            <action>maincpu.ob@36F1 = 21</action>
            <action>maincpu.ob@37C8 = 21</action>
            <action>maincpu.ob@383B = 21</action>
            <action>maincpu.ob@3899 = 21</action>
            <action>maincpu.ob@3B52 = 21</action>
            <action>maincpu.ob@3CB2 = 21</action>
            <action>maincpu.ob@3D0A = 21</action>
            <action>maincpu.ob@4248 = 21</action>
            <action>maincpu.ob@42AF = 21</action>
            <action>maincpu.ob@4357 = 21</action>
            <action>maincpu.ob@4513 = 21</action>
            <action>maincpu.ob@47C2 = 21</action>
            <action>maincpu.ob@4ADD = 21</action>
            <action>maincpu.ob@4B98 = 21</action>
            <action>maincpu.ob@4CDC = 21</action>
        </script>
    </cheat>

    <cheat desc="auto fire">
        <script state="on">
            <action>maincpu.mb@2B60 = 86</action>
            <action>maincpu.ob@2B63 = 4F</action>
        </script>
        <script state="off">
            <action>maincpu.mb@2B60 = 84</action>
            <action>maincpu.ob@2B63 = 67</action>
        </script>
    </cheat>

    <cheat desc="multiple jump">
        <script state="on">
            <action>maincpu.od@29A1 = 00FFFFCD        </action> <!-- jump -->
            <action>maincpu.md@29A1 = FFBFE0FF        </action>
            <action>maincpu.od@2A25 = 00FFFFCD        </action> <!-- fall down -->
            <action>maincpu.md@2A25 = FFBFE0FF        </action>
            <action>maincpu.mq@BFE0 = CB08286ECBC08421</action>
            <action>maincpu.mq@BFE8 = DDC9E1031F36DDAE</action>
            <action>maincpu.mq@BFF0 = FFFFFFFFC97E1FCB</action>
            <!--
            BFE0 | 21 84 C0    : ld   hl,$C084     // check jump button
            BFE3 | CB 6E       : bit  5,(hl)
            BFE5 | 28 08       : jr   z,$BFEF
            BFE7 | CB AE       : res  5,(hl)
            BFE9 | DD 36 1F 03 : ld   (ix+$1f),$03 // set jump flag
            BFED | E1          : pop  hl
            BFEE | C9          : ret
            BFEF | DD CB 1F 7E : bit  7,(ix+$1f)
            BFF3 | C9          : ret
            -->
        </script>
        <script state="off">
            <action>maincpu.od@29A1 = 2E5BCBDD        </action>
            <action>maincpu.md@29A1 = 7E1F9B99        </action>
            <action>maincpu.od@2A25 = 3B4FCBDD        </action>
            <action>maincpu.md@2A25 = 7E1FCF8D        </action>
            <action>maincpu.mq@BFE0 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@BFE8 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@BFF0 = FFFFFFFFFFFFFFFF</action>
        </script>
    </cheat>

    <cheat desc="no slip">
        <script state="on">
            <action>maincpu.ob@263D = CD              </action>
            <action>maincpu.mw@263E = 96D0            </action>
            <action>maincpu.mq@96D0 = 01280CE6C0843A47</action>
            <action>maincpu.mq@96D8 = FFFFFFC91477DD78</action>
            <!--
            96D0 | 47       : ld   b,a
            96D1 | 3A 84 C0 : ld   a,($C084)
            96D4 | E6 0C    : and  $0C
            96D6 | 28 01    : jr   z,$96D9
            96D8 | 78       : ld   a,b
            96D9 | DD 77 14 : ld   (ix+$14),a
            96DC | C9       : ret
            -->
        </script>
        <script state="off">
            <action>maincpu.ob@263D = DD              </action>
            <action>maincpu.mw@263E = 1432            </action>
            <action>maincpu.mq@96D0 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@96D8 = FFFFFFFFFFFFFFFF</action>
        </script>
    </cheat>

    <cheat desc="vitality speed">
        <parameter>
            <item value="0x0000">no decrease</item>
            <item value="0x0001">01 (slow)  </item>
            <item value="0x0002">02         </item>
            <item value="0x0008">03         </item>
            <item value="0x0020">04         </item>
            <item value="0x0100">05 (fast)  </item>
        </parameter>
        <script state="change">
            <action>maincpu.mw@4E58 = -param</action>
            <action>maincpu.mw@4E61 = -param</action>
        </script>
        <script state="off">
            <action>maincpu.mw@4E58 = FFFF</action>
            <action>maincpu.mw@4E61 = FFF8</action>
        </script>
    </cheat>

    <cheat desc="hidden panel finder">
        <script state="on">
            <action>maincpu.ob@4725 = 00</action>
        </script>
        <script state="off">
            <action>maincpu.ob@4725 = D0</action>
        </script>
    </cheat>

    <cheat desc="hidden fried potato finder">
        <script state="on">
            <action>maincpu.mw@3958 = 96E0            </action>
            <action>maincpu.mq@96E0 = 3705FE0FE6187EDD</action>
            <action>maincpu.mq@96E8 = FFFFFFFFC9206AC4</action>
            <!--
            96E0 | DD 7E 18 : ld   a,(ix+$18)
            96E3 | E6 0F    : and  $0F
            96E5 | FE 05    : cp   $05
            96E7 | 37       : scf
            96E8 | C4 6A 20 : call nz,$206A
            96EB | C9       : ret
            -->
        </script>
        <script state="off">
            <action>maincpu.mw@3958 = 206A            </action>
            <action>maincpu.mq@96E0 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@96E8 = FFFFFFFFFFFFFFFF</action>
        </script>
    </cheat>

    <cheat desc="no fruit disappearance">
        <script state="on">
            <action>maincpu.ob@3922 = 18</action> <!-- fruit -->
            <action>maincpu.mb@39C3 = C5</action> <!-- fried potato -->
            <action>maincpu.ob@4753 = 18</action> <!-- panel -->
        </script>
        <script state="off">
            <action>maincpu.ob@3922 = 20</action>
            <action>maincpu.mb@39C3 = 24</action>
            <action>maincpu.ob@4753 = 20</action>
        </script>
    </cheat>

    <cheat desc="sound test mode">
        <comment>set &quot;skip rom check&quot; then reset the game (F3)</comment>
        <script state="on">
            <action>maincpu.mw@015E = 8000            </action>
            <action>maincpu.mq@8000 = 10E62F08DBC10021</action>
            <action>maincpu.mq@8008 = 2847B8B12F00DB4F</action>
            <action>maincpu.mq@8010 = 40FE35012080FEF2</action>
            <action>maincpu.mq@8018 = 3E042090FE340120</action>
            <action>maincpu.mq@8020 = 3E052050FE0618F0</action>
            <action>maincpu.mq@8028 = 032002FE78778610</action>
            <action>maincpu.mq@8030 = AF032004FE05187E</action>
            <action>maincpu.mq@8038 = 00000000C71818D3</action>
            <!--
            8000 | 21 00 C1 : ld   hl,$C100 // sound code address
            8003 | DB 08    : in   a,($08)  // read start button
            8005 | 2F       : cpl
            8006 | E6 10    : and  $10
            8008 | 4F       : ld   c,a
            8009 | DB 00    : in   a,($00)  // read other inputs
            800B | 2F       : cpl
            800C | B1       : or   c
            800D | B8       : cp   b
            800E | 47       : ld   b,a
            800F | 28 F2    : jr   z,$8003
            8011 | FE 80    : cp   $80
            8013 | 20 01    : jr   nz,$8016
            8015 | 35       : dec  (hl)     // decrease code -01
            8016 | FE 40    : cp   $40
            8018 | 20 01    : jr   nz,$801B
            801A | 34       : inc  (hl)     // increase code +01
            801B | FE 90    : cp   $90
            801D | 20 04    : jr   nz,$8023
            801F | 3E F0    : ld   a,$F0    // decrease code -10
            8021 | 18 06    : jr   $8029
            8023 | FE 50    : cp   $50
            8025 | 20 05    : jr   nz,$802C
            8027 | 3E 10    : ld   a,$10    // increase code +10
            8029 | 86       : add  a,(hl)
            802A | 77       : ld   (hl),a
            802B | 78       : ld   a,b
            802C | FE 02    : cp   $02
            802E | 20 03    : jr   nz,$8033
            8030 | 7E       : ld   a,(hl)   // play sound
            8031 | 18 05    : jr   $8038
            8033 | FE 04    : cp   $04
            8035 | 20 03    : jr   nz,$803A
            8037 | AF       : xor  a        // stop sound
            8038 | D3 18    : out  ($18),a  // send sound code
            803A | 18 C7    : jr   $8003
            -->
        </script>
        <script state="run">
            <output format="----- wonder boy 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="start + left : decrease code -10"       line="13" align="center" />
            <output format="start + right : 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@C100</argument>
            </output>
        </script>
        <script state="off">
            <action>maincpu.mw@015E = 0755            </action>
            <action>maincpu.mq@8000 = 2032302220323022</action>
            <action>maincpu.mq@8008 = C47F7F7F7F7F7F1A</action>
            <action>maincpu.mq@8010 = 3123210401B6B4A6</action>
            <action>maincpu.mq@8018 = 3123213331232133</action>
            <action>maincpu.mq@8020 = 7F7F7F7F7F1B2133</action>
            <action>maincpu.mq@8028 = 240401B7B5A7C57F</action>
            <action>maincpu.mq@8030 = 2436342624363426</action>
            <action>maincpu.mq@8038 = 7F7F7F1E240B0926</action>
        </script>
    </cheat>

    <cheat desc="skip rom check">
        <script state="on">
            <action>maincpu.mb@015B = 27</action>
        </script>
        <script state="off">
            <action>maincpu.mb@015B = 09</action>
        </script>
    </cheat>

</mamecheat>
wboyblt.xml

Code: Select all

<!-- Wonder Boy (Tecfri bootleg) -->
<mamecheat version="1">

    <cheat desc="no hit">
        <comment>you hit an enemy on the skateboard</comment>
        <script state="on">
            <action>maincpu.ob@2E70 = 18</action> <!-- boss (body) -->
            <action>maincpu.ob@3025 = 18</action> <!-- boss (head) -->
            <action>maincpu.ob@31B4 = 18</action> <!-- boss (fireball) -->
            <action>maincpu.ob@36EF = C9</action> <!-- stone -->
            <action>maincpu.ob@37C6 = C9</action> <!-- bonfire -->
            <action>maincpu.ob@3839 = C9</action> <!-- snail -->
            <action>maincpu.ob@3897 = C9</action> <!-- skull -->
            <action>maincpu.ob@3B50 = C9</action> <!-- cobra -->
            <action>maincpu.ob@3CB0 = C9</action> <!-- rock -->
            <action>maincpu.ob@3D08 = C9</action> <!-- blue people -->
            <action>maincpu.ob@4246 = C9</action> <!-- frog -->
            <action>maincpu.ob@42AD = C9</action> <!-- bee -->
            <action>maincpu.ob@4355 = C9</action> <!-- bat -->
            <action>maincpu.ob@4511 = C9</action> <!-- spider -->
            <action>maincpu.ob@47C0 = C9</action> <!-- coyote -->
            <action>maincpu.ob@4ADB = C9</action> <!-- swordfish -->
            <action>maincpu.ob@4B96 = C9</action> <!-- octopus -->
            <action>maincpu.ob@4CDA = C9</action> <!-- icicle -->
        </script>
        <script state="off">
            <action>maincpu.ob@2E70 = 30</action>
            <action>maincpu.ob@3025 = 30</action>
            <action>maincpu.ob@31B4 = 30</action>
            <action>maincpu.ob@36EF = 21</action>
            <action>maincpu.ob@37C6 = 21</action>
            <action>maincpu.ob@3839 = 21</action>
            <action>maincpu.ob@3897 = 21</action>
            <action>maincpu.ob@3B50 = 21</action>
            <action>maincpu.ob@3CB0 = 21</action>
            <action>maincpu.ob@3D08 = 21</action>
            <action>maincpu.ob@4246 = 21</action>
            <action>maincpu.ob@42AD = 21</action>
            <action>maincpu.ob@4355 = 21</action>
            <action>maincpu.ob@4511 = 21</action>
            <action>maincpu.ob@47C0 = 21</action>
            <action>maincpu.ob@4ADB = 21</action>
            <action>maincpu.ob@4B96 = 21</action>
            <action>maincpu.ob@4CDA = 21</action>
        </script>
    </cheat>

    <cheat desc="auto fire">
        <script state="on">
            <action>maincpu.mb@2B5E = 86</action>
            <action>maincpu.ob@2B61 = 4F</action>
        </script>
        <script state="off">
            <action>maincpu.mb@2B5E = 84</action>
            <action>maincpu.ob@2B61 = 67</action>
        </script>
    </cheat>

    <cheat desc="multiple jump">
        <script state="on">
            <action>maincpu.od@299F = 00FFFFCD</action> <!-- jump -->
            <action>maincpu.md@299F = FFC780FF</action>
            <action>maincpu.od@2A23 = 00FFFFCD</action> <!-- fall down -->
            <action>maincpu.md@2A23 = FFC780FF</action>
        </script>
        <script state="run">
            <action>maincpu.pq@C780 = CB08286ECBC08421</action>
            <action>maincpu.pq@C788 = DDC9E1031F36DDAE</action>
            <action>maincpu.pq@C790 = 00000000C97E1FCB</action>
            <!--
            C780 | 21 84 C0    : ld   hl,$C084
            C783 | CB 6E       : bit  5,(hl)       // check jump button
            C785 | 28 08       : jr   z,$C78F
            C787 | CB AE       : res  5,(hl)
            C789 | DD 36 1F 03 : ld   (ix+$1f),$03 // set jump flag
            C78D | E1          : pop  hl
            C78E | C9          : ret
            C78F | DD CB 1F 7E : bit  7,(ix+$1f)
            C793 | C9          : ret
            -->
        </script>
        <script state="off">
            <action>maincpu.od@299F = 7E1FCBDD        </action>
            <action>maincpu.md@299F = 7E1F437D        </action>
            <action>maincpu.od@2A23 = 5697CBDD        </action>
            <action>maincpu.md@2A23 = 7E1FE3DD        </action>
            <action>maincpu.pq@C780 = 0000000000000000</action>
            <action>maincpu.pq@C788 = 0000000000000000</action>
            <action>maincpu.pq@C790 = 0000000000000000</action>
        </script>
    </cheat>

    <cheat desc="no slip">
        <script state="on">
            <action>maincpu.ob@263B = CD              </action>
            <action>maincpu.mw@263C = 96D0            </action>
            <action>maincpu.mq@96D0 = 01280CE6C0843A47</action>
            <action>maincpu.mq@96D8 = FFFFFFC91477DD78</action>
            <!--
            96D0 | 47       : ld   b,a
            96D1 | 3A 84 C0 : ld   a,($C084)
            96D4 | E6 0C    : and  $0C
            96D6 | 28 01    : jr   z,$96D9
            96D8 | 78       : ld   a,b
            96D9 | DD 77 14 : ld   (ix+$14),a
            96DC | C9       : ret
            -->
        </script>
        <script state="off">
            <action>maincpu.ob@263B = DD              </action>
            <action>maincpu.mw@263C = 145F            </action>
            <action>maincpu.mq@96D0 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@96D8 = FFFFFFFFFFFFFFFF</action>
        </script>
    </cheat>

    <cheat desc="vitality speed">
        <parameter>
            <item value="0x0000">no decrease</item>
            <item value="0x0001">01 (slow)  </item>
            <item value="0x0002">02         </item>
            <item value="0x0008">03         </item>
            <item value="0x0020">04         </item>
            <item value="0x0100">05 (fast)  </item>
        </parameter>
        <script state="change">
            <action>maincpu.mw@4E5F = -param</action>
            <action>maincpu.mw@BFE7 = -param</action>
            <action>maincpu.mw@BFEC = -param</action>
        </script>
        <script state="off">
            <action>maincpu.mw@4E5F = FFF8</action>
            <action>maincpu.mw@BFE7 = FFFC</action>
            <action>maincpu.mw@BFEC = FFFB</action>
        </script>
    </cheat>

    <cheat desc="hidden panel finder">
        <script state="on">
            <action>maincpu.ob@4723 = 00</action>
        </script>
        <script state="off">
            <action>maincpu.ob@4723 = D0</action>
        </script>
    </cheat>

    <cheat desc="hidden fried potato finder">
        <script state="on">
            <action>maincpu.mw@3956 = 96E0            </action>
            <action>maincpu.mq@96E0 = 3705FE0FE6187EDD</action>
            <action>maincpu.mq@96E8 = FFFFFFFFC92068C4</action>
            <!--
            96E0 | DD 7E 18 : ld   a,(ix+$18)
            96E3 | E6 0F    : and  $0F
            96E5 | FE 05    : cp   $05
            96E7 | 37       : scf
            96E8 | C4 68 20 : call nz,$2068
            96EB | C9       : ret
            -->
        </script>
        <script state="off">
            <action>maincpu.mw@3956 = 2068            </action>
            <action>maincpu.mq@96E0 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@96E8 = FFFFFFFFFFFFFFFF</action>
        </script>
    </cheat>

    <cheat desc="no fruit disappearance">
        <script state="on">
            <action>maincpu.ob@3920 = 18</action> <!-- fruit -->
            <action>maincpu.mb@39C1 = C3</action> <!-- fried potato -->
            <action>maincpu.ob@4751 = 18</action> <!-- panel -->
        </script>
        <script state="off">
            <action>maincpu.ob@3920 = 20</action>
            <action>maincpu.mb@39C1 = 22</action>
            <action>maincpu.ob@4751 = 20</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@015E = 8000            </action>
            <action>maincpu.mq@8000 = 10E62F08DBC10021</action>
            <action>maincpu.mq@8008 = 2847B8B12F00DB4F</action>
            <action>maincpu.mq@8010 = 40FE35012080FEF2</action>
            <action>maincpu.mq@8018 = 3E042090FE340120</action>
            <action>maincpu.mq@8020 = 3E052050FE0618F0</action>
            <action>maincpu.mq@8028 = 032002FE78778610</action>
            <action>maincpu.mq@8030 = AF032004FE05187E</action>
            <action>maincpu.mq@8038 = 00000000C71818D3</action>
            <!--
            8000 | 21 00 C1 : ld   hl,$C100 // sound code address
            8003 | DB 08    : in   a,($08)  // read start button
            8005 | 2F       : cpl
            8006 | E6 10    : and  $10
            8008 | 4F       : ld   c,a
            8009 | DB 00    : in   a,($00)  // read other inputs
            800B | 2F       : cpl
            800C | B1       : or   c
            800D | B8       : cp   b
            800E | 47       : ld   b,a
            800F | 28 F2    : jr   z,$8003
            8011 | FE 80    : cp   $80
            8013 | 20 01    : jr   nz,$8016
            8015 | 35       : dec  (hl)     // decrease code -01
            8016 | FE 40    : cp   $40
            8018 | 20 01    : jr   nz,$801B
            801A | 34       : inc  (hl)     // increase code +01
            801B | FE 90    : cp   $90
            801D | 20 04    : jr   nz,$8023
            801F | 3E F0    : ld   a,$F0    // decrease code -10
            8021 | 18 06    : jr   $8029
            8023 | FE 50    : cp   $50
            8025 | 20 05    : jr   nz,$802C
            8027 | 3E 10    : ld   a,$10    // increase code +10
            8029 | 86       : add  a,(hl)
            802A | 77       : ld   (hl),a
            802B | 78       : ld   a,b
            802C | FE 02    : cp   $02
            802E | 20 03    : jr   nz,$8033
            8030 | 7E       : ld   a,(hl)   // play sound
            8031 | 18 05    : jr   $8038
            8033 | FE 04    : cp   $04
            8035 | 20 03    : jr   nz,$803A
            8037 | AF       : xor  a        // stop sound
            8038 | D3 18    : out  ($18),a  // send sound code
            803A | 18 C7    : jr   $8003
            -->
        </script>
        <script state="run">
            <output format="----- wonder boy 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="start + left : decrease code -10"       line="13" align="center" />
            <output format="start + right : 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@C100</argument>
            </output>
        </script>
        <script state="off">
            <action>maincpu.mw@015E = 0755            </action>
            <action>maincpu.mq@8000 = 7F1A203230222032</action>
            <action>maincpu.mq@8008 = B4A6C47F7F7F7F7F</action>
            <action>maincpu.mq@8010 = 21333123210401B6</action>
            <action>maincpu.mq@8018 = 2133312321333123</action>
            <action>maincpu.mq@8020 = C57F7F7F7F7F7F1B</action>
            <action>maincpu.mq@8028 = 3426240401B7B5A7</action>
            <action>maincpu.mq@8030 = 0926243634262436</action>
            <action>maincpu.mq@8038 = 7F7F7F7F7F1E240B</action>
        </script>
    </cheat>

    <cheat desc="skip rom check">
        <script state="on">
            <action>maincpu.mb@015B = 27</action>
        </script>
        <script state="off">
            <action>maincpu.mb@015B = 09</action>
        </script>
    </cheat>

</mamecheat>
jman
Posts: 903
Joined: Tue Dec 01, 2020 1:24 pm
Been thanked: 4 times

[wboy]+ Wonder Boy

Post by jman »

wboy2.xml

Code: Select all

<!-- Wonder Boy (set 2, 315-5178) -->
<mamecheat version="1">

    <cheat desc="no hit">
        <comment>you hit an enemy on the skateboard</comment>
        <script state="on">
            <action>maincpu.ob@2E62 = 18</action> <!-- boss (body) -->
            <action>maincpu.ob@3017 = 18</action> <!-- boss (head) -->
            <action>maincpu.ob@31A6 = 18</action> <!-- boss (fireball) -->
            <action>maincpu.ob@36E1 = C9</action> <!-- stone -->
            <action>maincpu.ob@37B8 = C9</action> <!-- bonfire -->
            <action>maincpu.ob@382B = C9</action> <!-- snail -->
            <action>maincpu.ob@3889 = C9</action> <!-- skull -->
            <action>maincpu.ob@3B42 = C9</action> <!-- cobra -->
            <action>maincpu.ob@3CA2 = C9</action> <!-- rock -->
            <action>maincpu.ob@3CFA = C9</action> <!-- blue people -->
            <action>maincpu.ob@4238 = C9</action> <!-- frog -->
            <action>maincpu.ob@429F = C9</action> <!-- bee -->
            <action>maincpu.ob@4347 = C9</action> <!-- bat -->
            <action>maincpu.ob@4503 = C9</action> <!-- spider -->
            <action>maincpu.ob@47B2 = C9</action> <!-- coyote -->
            <action>maincpu.ob@4ACD = C9</action> <!-- swordfish -->
            <action>maincpu.ob@4B88 = C9</action> <!-- octopus -->
            <action>maincpu.ob@4CCC = C9</action> <!-- icicle -->
        </script>
        <script state="off">
            <action>maincpu.ob@2E62 = 30</action>
            <action>maincpu.ob@3017 = 30</action>
            <action>maincpu.ob@31A6 = 30</action>
            <action>maincpu.ob@36E1 = 21</action>
            <action>maincpu.ob@37B8 = 21</action>
            <action>maincpu.ob@382B = 21</action>
            <action>maincpu.ob@3889 = 21</action>
            <action>maincpu.ob@3B42 = 21</action>
            <action>maincpu.ob@3CA2 = 21</action>
            <action>maincpu.ob@3CFA = 21</action>
            <action>maincpu.ob@4238 = 21</action>
            <action>maincpu.ob@429F = 21</action>
            <action>maincpu.ob@4347 = 21</action>
            <action>maincpu.ob@4503 = 21</action>
            <action>maincpu.ob@47B2 = 21</action>
            <action>maincpu.ob@4ACD = 21</action>
            <action>maincpu.ob@4B88 = 21</action>
            <action>maincpu.ob@4CCC = 21</action>
        </script>
    </cheat>

    <cheat desc="auto fire">
        <script state="on">
            <action>maincpu.mb@2B50 = 86</action>
            <action>maincpu.ob@2B53 = 4F</action>
        </script>
        <script state="off">
            <action>maincpu.mb@2B50 = 84</action>
            <action>maincpu.ob@2B53 = 67</action>
        </script>
    </cheat>

    <cheat desc="multiple jump">
        <script state="on">
            <action>maincpu.od@2991 = 00FFFFCD        </action> <!-- jump -->
            <action>maincpu.md@2991 = FFBFE0FF        </action>
            <action>maincpu.od@2A15 = 00FFFFCD        </action> <!-- fall down -->
            <action>maincpu.md@2A15 = FFBFE0FF        </action>
            <action>maincpu.mq@BFE0 = CB08286ECBC08421</action>
            <action>maincpu.mq@BFE8 = DDC9E1031F36DDAE</action>
            <action>maincpu.mq@BFF0 = FFFFFFFFC97E1FCB</action>
            <!--
            BFE0 | 21 84 C0    : ld   hl,$C084     // check jump button
            BFE3 | CB 6E       : bit  5,(hl)
            BFE5 | 28 08       : jr   z,$BFEF
            BFE7 | CB AE       : res  5,(hl)
            BFE9 | DD 36 1F 03 : ld   (ix+$1f),$03 // set jump flag
            BFED | E1          : pop  hl
            BFEE | C9          : ret
            BFEF | DD CB 1F 7E : bit  7,(ix+$1f)
            BFF3 | C9          : ret
            -->
        </script>
        <script state="off">
            <action>maincpu.od@2991 = 2E0FCBDD        </action>
            <action>maincpu.md@2991 = 7E1F9B8C        </action>
            <action>maincpu.od@2A15 = 6A4ACBDD        </action>
            <action>maincpu.md@2A15 = 7E1F8B88        </action>
            <action>maincpu.mq@BFE0 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@BFE8 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@BFF0 = FFFFFFFFFFFFFFFF</action>
        </script>
    </cheat>

    <cheat desc="no slip">
        <script state="on">
            <action>maincpu.ob@262D = CD              </action>
            <action>maincpu.mw@262E = 96C0            </action>
            <action>maincpu.mq@96C0 = 01280CE6C0843A47</action>
            <action>maincpu.mq@96C8 = FFFFFFC91477DD78</action>
            <!--
            96C0 | 47       : ld   b,a
            96C1 | 3A 84 C0 : ld   a,($C084)
            96C4 | E6 0C    : and  $0C
            96C6 | 28 01    : jr   z,$96C9
            96C8 | 78       : ld   a,b
            96C9 | DD 77 14 : ld   (ix+$14),a
            96CC | C9       : ret
            -->
        </script>
        <script state="off">
            <action>maincpu.ob@262D = DD              </action>
            <action>maincpu.mw@262E = 0477            </action>
            <action>maincpu.mq@96C0 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@96C8 = FFFFFFFFFFFFFFFF</action>
        </script>
    </cheat>

    <cheat desc="vitality speed">
        <parameter>
            <item value="0x0000">no decrease</item>
            <item value="0x0001">01 (slow)  </item>
            <item value="0x0002">02         </item>
            <item value="0x0008">03         </item>
            <item value="0x0020">04         </item>
            <item value="0x0100">05 (fast)  </item>
        </parameter>
        <script state="change">
            <action>maincpu.mw@4E48 = -param</action>
            <action>maincpu.mw@4E51 = -param</action>
        </script>
        <script state="off">
            <action>maincpu.mw@4E48 = FFFF</action>
            <action>maincpu.mw@4E51 = FFF8</action>
        </script>
    </cheat>

    <cheat desc="hidden panel finder">
        <script state="on">
            <action>maincpu.ob@4715 = 00</action>
        </script>
        <script state="off">
            <action>maincpu.ob@4715 = D0</action>
        </script>
    </cheat>

    <cheat desc="hidden fried potato finder">
        <script state="on">
            <action>maincpu.mw@3948 = 96D0            </action>
            <action>maincpu.mq@96D0 = 3705FE0FE6187EDD</action>
            <action>maincpu.mq@96D8 = FFFFFFFFC9205AC4</action>
            <!--
            96E0 | DD 7E 18 : ld   a,(ix+$18)
            96E3 | E6 0F    : and  $0F
            96E5 | FE 05    : cp   $05
            96E7 | 37       : scf
            96E8 | C4 5A 20 : call nz,$205A
            96EB | C9       : ret
            -->
        </script>
        <script state="off">
            <action>maincpu.mw@3948 = 205A            </action>
            <action>maincpu.mq@96D0 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@96D8 = FFFFFFFFFFFFFFFF</action>
        </script>
    </cheat>

    <cheat desc="no fruit disappearance">
        <script state="on">
            <action>maincpu.ob@3912 = 18</action> <!-- fruit -->
            <action>maincpu.mb@39B3 = B5</action> <!-- fried potato -->
            <action>maincpu.ob@4743 = 18</action> <!-- panel -->
        </script>
        <script state="off">
            <action>maincpu.ob@3912 = 20</action>
            <action>maincpu.mb@39B3 = 14</action>
            <action>maincpu.ob@4743 = 20</action>
        </script>
    </cheat>

    <cheat desc="sound test mode">
        <comment>set &quot;skip rom check&quot; then reset the game (F3)</comment>
        <script state="on">
            <action>maincpu.mw@014E = 8000            </action>
            <action>maincpu.mq@8000 = 10E62F08DBC10021</action>
            <action>maincpu.mq@8008 = 2847B8B12F00DB4F</action>
            <action>maincpu.mq@8010 = 40FE35012080FEF2</action>
            <action>maincpu.mq@8018 = 3E042090FE340120</action>
            <action>maincpu.mq@8020 = 3E052050FE0618F0</action>
            <action>maincpu.mq@8028 = 032002FE78778610</action>
            <action>maincpu.mq@8030 = AF032004FE05187E</action>
            <action>maincpu.mq@8038 = 00000000C71814D3</action>
            <!--
            8000 | 21 00 C1 : ld   hl,$C100 // sound code address
            8003 | DB 08    : in   a,($08)  // read start button
            8005 | 2F       : cpl
            8006 | E6 10    : and  $10
            8008 | 4F       : ld   c,a
            8009 | DB 00    : in   a,($00)  // read other inputs
            800B | 2F       : cpl
            800C | B1       : or   c
            800D | B8       : cp   b
            800E | 47       : ld   b,a
            800F | 28 F2    : jr   z,$8003
            8011 | FE 80    : cp   $80
            8013 | 20 01    : jr   nz,$8016
            8015 | 35       : dec  (hl)     // decrease code -01
            8016 | FE 40    : cp   $40
            8018 | 20 01    : jr   nz,$801B
            801A | 34       : inc  (hl)     // increase code +01
            801B | FE 90    : cp   $90
            801D | 20 04    : jr   nz,$8023
            801F | 3E F0    : ld   a,$F0    // decrease code -10
            8021 | 18 06    : jr   $8029
            8023 | FE 50    : cp   $50
            8025 | 20 05    : jr   nz,$802C
            8027 | 3E 10    : ld   a,$10    // increase code +10
            8029 | 86       : add  a,(hl)
            802A | 77       : ld   (hl),a
            802B | 78       : ld   a,b
            802C | FE 02    : cp   $02
            802E | 20 03    : jr   nz,$8033
            8030 | 7E       : ld   a,(hl)   // play sound
            8031 | 18 05    : jr   $8038
            8033 | FE 04    : cp   $04
            8035 | 20 03    : jr   nz,$803A
            8037 | AF       : xor  a        // stop sound
            8038 | D3 14    : out  ($14),a  // send sound code
            803A | 18 C7    : jr   $8003
            -->
        </script>
        <script state="run">
            <output format="----- wonder boy 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="start + left : decrease code -10"       line="13" align="center" />
            <output format="start + right : 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@C100</argument>
            </output>
        </script>
        <script state="off">
            <action>maincpu.mw@014E = 0745            </action>
            <action>maincpu.mq@8000 = 3123210401B6B4A6</action>
            <action>maincpu.mq@8008 = 3123213331232133</action>
            <action>maincpu.mq@8010 = 7F7F7F7F7F1B2133</action>
            <action>maincpu.mq@8018 = 240401B7B5A7C57F</action>
            <action>maincpu.mq@8020 = 2436342624363426</action>
            <action>maincpu.mq@8028 = 7F7F7F1E240B0926</action>
            <action>maincpu.mq@8030 = 01BAB8AAC87F7F7F</action>
            <action>maincpu.mq@8038 = 352725373527250C</action>
        </script>
    </cheat>

    <cheat desc="skip rom check">
        <script state="on">
            <action>maincpu.mb@014B = 2A</action>
        </script>
        <script state="off">
            <action>maincpu.mb@014B = 0C</action>
        </script>
    </cheat>

</mamecheat>
wboy2u.xml

Code: Select all

<!-- Wonder Boy (set 2, not encrypted) -->
<mamecheat version="1">

    <cheat desc="no hit">
        <comment>you hit an enemy on the skateboard</comment>
        <script state="on">
            <action>maincpu.mb@2E62 = 18</action> <!-- boss (body) -->
            <action>maincpu.mb@3017 = 18</action> <!-- boss (head) -->
            <action>maincpu.mb@31A6 = 18</action> <!-- boss (fireball) -->
            <action>maincpu.mb@36E1 = C9</action> <!-- stone -->
            <action>maincpu.mb@37B8 = C9</action> <!-- bonfire -->
            <action>maincpu.mb@382B = C9</action> <!-- snail -->
            <action>maincpu.mb@3889 = C9</action> <!-- skull -->
            <action>maincpu.mb@3B42 = C9</action> <!-- cobra -->
            <action>maincpu.mb@3CA2 = C9</action> <!-- rock -->
            <action>maincpu.mb@3CFA = C9</action> <!-- blue people -->
            <action>maincpu.mb@4238 = C9</action> <!-- frog -->
            <action>maincpu.mb@429F = C9</action> <!-- bee -->
            <action>maincpu.mb@4347 = C9</action> <!-- bat -->
            <action>maincpu.mb@4503 = C9</action> <!-- spider -->
            <action>maincpu.mb@47B2 = C9</action> <!-- coyote -->
            <action>maincpu.mb@4ACD = C9</action> <!-- swordfish -->
            <action>maincpu.mb@4B88 = C9</action> <!-- octopus -->
            <action>maincpu.mb@4CCC = C9</action> <!-- icicle -->
        </script>
        <script state="off">
            <action>maincpu.mb@2E62 = 30</action>
            <action>maincpu.mb@3017 = 30</action>
            <action>maincpu.mb@31A6 = 30</action>
            <action>maincpu.mb@36E1 = 21</action>
            <action>maincpu.mb@37B8 = 21</action>
            <action>maincpu.mb@382B = 21</action>
            <action>maincpu.mb@3889 = 21</action>
            <action>maincpu.mb@3B42 = 21</action>
            <action>maincpu.mb@3CA2 = 21</action>
            <action>maincpu.mb@3CFA = 21</action>
            <action>maincpu.mb@4238 = 21</action>
            <action>maincpu.mb@429F = 21</action>
            <action>maincpu.mb@4347 = 21</action>
            <action>maincpu.mb@4503 = 21</action>
            <action>maincpu.mb@47B2 = 21</action>
            <action>maincpu.mb@4ACD = 21</action>
            <action>maincpu.mb@4B88 = 21</action>
            <action>maincpu.mb@4CCC = 21</action>
        </script>
    </cheat>

    <cheat desc="auto fire">
        <script state="on">
            <action>maincpu.mb@2B50 = 86</action>
            <action>maincpu.mb@2B53 = 4F</action>
        </script>
        <script state="off">
            <action>maincpu.mb@2B50 = 84</action>
            <action>maincpu.mb@2B53 = 67</action>
        </script>
    </cheat>

    <cheat desc="multiple jump">
        <script state="on">
            <action>maincpu.md@2991 = 00BFE0CD        </action> <!-- jump -->
            <action>maincpu.md@2A15 = 00BFE0CD        </action> <!-- fall down -->
            <action>maincpu.mq@BFE0 = CB08286ECBC08421</action>
            <action>maincpu.mq@BFE8 = DDC9E1031F36DDAE</action>
            <action>maincpu.mq@BFF0 = FFFFFFFFC97E1FCB</action>
            <!--
            BFE0 | 21 84 C0    : ld   hl,$C084     // check jump button
            BFE3 | CB 6E       : bit  5,(hl)
            BFE5 | 28 08       : jr   z,$BFEF
            BFE7 | CB AE       : res  5,(hl)
            BFE9 | DD 36 1F 03 : ld   (ix+$1f),$03 // set jump flag
            BFED | E1          : pop  hl
            BFEE | C9          : ret
            BFEF | DD CB 1F 7E : bit  7,(ix+$1f)
            BFF3 | C9          : ret
            -->
        </script>
        <script state="off">
            <action>maincpu.md@2991 = 7E1FCBDD        </action>
            <action>maincpu.md@2A15 = 7E1FCBDD        </action>
            <action>maincpu.mq@BFE0 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@BFE8 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@BFF0 = FFFFFFFFFFFFFFFF</action>
        </script>
    </cheat>

    <cheat desc="no slip">
        <script state="on">
            <action>maincpu.md@262D = C996C0CD        </action>
            <action>maincpu.mq@96C0 = 01280CE6C0843A47</action>
            <action>maincpu.mq@96C8 = FFFFFFC91477DD78</action>
            <!--
            96C0 | 47       : ld   b,a
            96C1 | 3A 84 C0 : ld   a,($C084)
            96C4 | E6 0C    : and  $0C
            96C6 | 28 01    : jr   z,$96C9
            96C8 | 78       : ld   a,b
            96C9 | DD 77 14 : ld   (ix+$14),a
            96CC | C9       : ret
            -->
        </script>
        <script state="off">
            <action>maincpu.md@262D = C91477DD        </action>
            <action>maincpu.mq@96C0 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@96C8 = FFFFFFFFFFFFFFFF</action>
        </script>
    </cheat>

    <cheat desc="vitality speed">
        <parameter>
            <item value="0x0000">no decrease</item>
            <item value="0x0001">01 (slow)  </item>
            <item value="0x0002">02         </item>
            <item value="0x0008">03         </item>
            <item value="0x0020">04         </item>
            <item value="0x0100">05 (fast)  </item>
        </parameter>
        <script state="change">
            <action>maincpu.mw@4E48 = -param</action>
            <action>maincpu.mw@4E51 = -param</action>
        </script>
        <script state="off">
            <action>maincpu.mw@4E48 = FFFF</action>
            <action>maincpu.mw@4E51 = FFF8</action>
        </script>
    </cheat>

    <cheat desc="hidden panel finder">
        <script state="on">
            <action>maincpu.mb@4715 = 00</action>
        </script>
        <script state="off">
            <action>maincpu.mb@4715 = D0</action>
        </script>
    </cheat>

    <cheat desc="hidden fried potato finder">
        <script state="on">
            <action>maincpu.mw@3948 = 96D0            </action>
            <action>maincpu.mq@96D0 = 3705FE0FE6187EDD</action>
            <action>maincpu.mq@96D8 = FFFFFFFFC9205AC4</action>
            <!--
            96E0 | DD 7E 18 : ld   a,(ix+$18)
            96E3 | E6 0F    : and  $0F
            96E5 | FE 05    : cp   $05
            96E7 | 37       : scf
            96E8 | C4 5A 20 : call nz,$205A
            96EB | C9       : ret
            -->
        </script>
        <script state="off">
            <action>maincpu.mw@3948 = 205A            </action>
            <action>maincpu.mq@96D0 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@96D8 = FFFFFFFFFFFFFFFF</action>
        </script>
    </cheat>

    <cheat desc="no fruit disappearance">
        <script state="on">
            <action>maincpu.mb@3912 = 18</action> <!-- fruit -->
            <action>maincpu.mb@39B3 = B5</action> <!-- fried potato -->
            <action>maincpu.mb@4743 = 18</action> <!-- panel -->
        </script>
        <script state="off">
            <action>maincpu.mb@3912 = 20</action>
            <action>maincpu.mb@39B3 = 14</action>
            <action>maincpu.mb@4743 = 20</action>
        </script>
    </cheat>

    <cheat desc="sound test mode">
        <comment>set &quot;skip rom check&quot; then reset the game (F3)</comment>
        <script state="on">
            <action>maincpu.mw@014E = 8000            </action>
            <action>maincpu.mq@8000 = 10E62F08DBC10021</action>
            <action>maincpu.mq@8008 = 2847B8B12F00DB4F</action>
            <action>maincpu.mq@8010 = 40FE35012080FEF2</action>
            <action>maincpu.mq@8018 = 3E042090FE340120</action>
            <action>maincpu.mq@8020 = 3E052050FE0618F0</action>
            <action>maincpu.mq@8028 = 032002FE78778610</action>
            <action>maincpu.mq@8030 = AF032004FE05187E</action>
            <action>maincpu.mq@8038 = 00000000C71814D3</action>
            <!--
            8000 | 21 00 C1 : ld   hl,$C100 // sound code address
            8003 | DB 08    : in   a,($08)  // read start button
            8005 | 2F       : cpl
            8006 | E6 10    : and  $10
            8008 | 4F       : ld   c,a
            8009 | DB 00    : in   a,($00)  // read other inputs
            800B | 2F       : cpl
            800C | B1       : or   c
            800D | B8       : cp   b
            800E | 47       : ld   b,a
            800F | 28 F2    : jr   z,$8003
            8011 | FE 80    : cp   $80
            8013 | 20 01    : jr   nz,$8016
            8015 | 35       : dec  (hl)     // decrease code -01
            8016 | FE 40    : cp   $40
            8018 | 20 01    : jr   nz,$801B
            801A | 34       : inc  (hl)     // increase code +01
            801B | FE 90    : cp   $90
            801D | 20 04    : jr   nz,$8023
            801F | 3E F0    : ld   a,$F0    // decrease code -10
            8021 | 18 06    : jr   $8029
            8023 | FE 50    : cp   $50
            8025 | 20 05    : jr   nz,$802C
            8027 | 3E 10    : ld   a,$10    // increase code +10
            8029 | 86       : add  a,(hl)
            802A | 77       : ld   (hl),a
            802B | 78       : ld   a,b
            802C | FE 02    : cp   $02
            802E | 20 03    : jr   nz,$8033
            8030 | 7E       : ld   a,(hl)   // play sound
            8031 | 18 05    : jr   $8038
            8033 | FE 04    : cp   $04
            8035 | 20 03    : jr   nz,$803A
            8037 | AF       : xor  a        // stop sound
            8038 | D3 14    : out  ($14),a  // send sound code
            803A | 18 C7    : jr   $8003
            -->
        </script>
        <script state="run">
            <output format="----- wonder boy 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="start + left : decrease code -10"       line="13" align="center" />
            <output format="start + right : 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@C100</argument>
            </output>
        </script>
        <script state="off">
            <action>maincpu.mw@014E = 0745            </action>
            <action>maincpu.mq@8000 = 3123210401B6B4A6</action>
            <action>maincpu.mq@8008 = 3123213331232133</action>
            <action>maincpu.mq@8010 = 7F7F7F7F7F1B2133</action>
            <action>maincpu.mq@8018 = 240401B7B5A7C57F</action>
            <action>maincpu.mq@8020 = 2436342624363426</action>
            <action>maincpu.mq@8028 = 7F7F7F1E240B0926</action>
            <action>maincpu.mq@8030 = 01BAB8AAC87F7F7F</action>
            <action>maincpu.mq@8038 = 352725373527250C</action>
        </script>
    </cheat>

    <cheat desc="skip rom check">
        <script state="on">
            <action>maincpu.mb@014B = 2A</action>
        </script>
        <script state="off">
            <action>maincpu.mb@014B = 0C</action>
        </script>
    </cheat>

</mamecheat>
wboy6.xml

Code: Select all

<!-- Wonder Boy (set 6, 315-5179) -->
<mamecheat version="1">

    <cheat desc="no hit">
        <comment>you hit an enemy on the skateboard</comment>
        <script state="on">
            <action>maincpu.ob@2E62 = 18</action> <!-- boss (body) -->
            <action>maincpu.ob@3017 = 18</action> <!-- boss (head) -->
            <action>maincpu.ob@31A6 = 18</action> <!-- boss (fireball) -->
            <action>maincpu.ob@36E1 = C9</action> <!-- stone -->
            <action>maincpu.ob@37B8 = C9</action> <!-- bonfire -->
            <action>maincpu.ob@382B = C9</action> <!-- snail -->
            <action>maincpu.ob@3889 = C9</action> <!-- skull -->
            <action>maincpu.ob@3B42 = C9</action> <!-- cobra -->
            <action>maincpu.ob@3CA2 = C9</action> <!-- rock -->
            <action>maincpu.ob@3CFA = C9</action> <!-- blue people -->
            <action>maincpu.ob@4238 = C9</action> <!-- frog -->
            <action>maincpu.ob@429F = C9</action> <!-- bee -->
            <action>maincpu.ob@4347 = C9</action> <!-- bat -->
            <action>maincpu.ob@4503 = C9</action> <!-- spider -->
            <action>maincpu.ob@47B2 = C9</action> <!-- coyote -->
            <action>maincpu.ob@4ACD = C9</action> <!-- swordfish -->
            <action>maincpu.ob@4B88 = C9</action> <!-- octopus -->
            <action>maincpu.ob@4CCC = C9</action> <!-- icicle -->
        </script>
        <script state="off">
            <action>maincpu.ob@2E62 = 30</action>
            <action>maincpu.ob@3017 = 30</action>
            <action>maincpu.ob@31A6 = 30</action>
            <action>maincpu.ob@36E1 = 21</action>
            <action>maincpu.ob@37B8 = 21</action>
            <action>maincpu.ob@382B = 21</action>
            <action>maincpu.ob@3889 = 21</action>
            <action>maincpu.ob@3B42 = 21</action>
            <action>maincpu.ob@3CA2 = 21</action>
            <action>maincpu.ob@3CFA = 21</action>
            <action>maincpu.ob@4238 = 21</action>
            <action>maincpu.ob@429F = 21</action>
            <action>maincpu.ob@4347 = 21</action>
            <action>maincpu.ob@4503 = 21</action>
            <action>maincpu.ob@47B2 = 21</action>
            <action>maincpu.ob@4ACD = 21</action>
            <action>maincpu.ob@4B88 = 21</action>
            <action>maincpu.ob@4CCC = 21</action>
        </script>
    </cheat>

    <cheat desc="auto fire">
        <script state="on">
            <action>maincpu.mb@2B50 = 86</action>
            <action>maincpu.ob@2B53 = 4F</action>
        </script>
        <script state="off">
            <action>maincpu.mb@2B50 = 84</action>
            <action>maincpu.ob@2B53 = 67</action>
        </script>
    </cheat>

    <cheat desc="multiple jump">
        <script state="on">
            <action>maincpu.od@2991 = 00FFFFCD        </action> <!-- jump -->
            <action>maincpu.md@2991 = FFBFE0FF        </action>
            <action>maincpu.od@2A15 = 00FFFFCD        </action> <!-- fall down -->
            <action>maincpu.md@2A15 = FFBFE0FF        </action>
            <action>maincpu.mq@BFE0 = CB08286ECBC08421</action>
            <action>maincpu.mq@BFE8 = DDC9E1031F36DDAE</action>
            <action>maincpu.mq@BFF0 = FFFFFFFFC97E1FCB</action>
            <!--
            BFE0 | 21 84 C0    : ld   hl,$C084     // check jump button
            BFE3 | CB 6E       : bit  5,(hl)
            BFE5 | 28 08       : jr   z,$BFEF
            BFE7 | CB AE       : res  5,(hl)
            BFE9 | DD 36 1F 03 : ld   (ix+$1f),$03 // set jump flag
            BFED | E1          : pop  hl
            BFEE | C9          : ret
            BFEF | DD CB 1F 7E : bit  7,(ix+$1f)
            BFF3 | C9          : ret
            -->
        </script>
        <script state="off">
            <action>maincpu.od@2991 = 3E4ACBDD        </action>
            <action>maincpu.md@2991 = 7E1F8B88        </action>
            <action>maincpu.od@2A15 = 7B1ACBDD        </action>
            <action>maincpu.md@2A15 = 7E1FCEC9        </action>
            <action>maincpu.mq@BFE0 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@BFE8 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@BFF0 = FFFFFFFFFFFFFFFF</action>
        </script>
    </cheat>

    <cheat desc="no slip">
        <script state="on">
            <action>maincpu.ob@262D = CD              </action>
            <action>maincpu.mw@262E = 96C0            </action>
            <action>maincpu.mq@96C0 = 01280CE6C0843A47</action>
            <action>maincpu.mq@96C8 = FFFFFFC91477DD78</action>
            <!--
            96C0 | 47       : ld   b,a
            96C1 | 3A 84 C0 : ld   a,($C084)
            96C4 | E6 0C    : and  $0C
            96C6 | 28 01    : jr   z,$96C9
            96C8 | 78       : ld   a,b
            96C9 | DD 77 14 : ld   (ix+$14),a
            96CC | C9       : ret
            -->
        </script>
        <script state="off">
            <action>maincpu.ob@262D = DD              </action>
            <action>maincpu.mw@262E = 1466            </action>
            <action>maincpu.mq@96C0 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@96C8 = FFFFFFFFFFFFFFFF</action>
        </script>
    </cheat>

    <cheat desc="vitality speed">
        <parameter>
            <item value="0x0000">no decrease</item>
            <item value="0x0001">01 (slow)  </item>
            <item value="0x0002">02         </item>
            <item value="0x0008">03         </item>
            <item value="0x0020">04         </item>
            <item value="0x0100">05 (fast)  </item>
        </parameter>
        <script state="change">
            <action>maincpu.mw@4E48 = -param</action>
            <action>maincpu.mw@4E51 = -param</action>
        </script>
        <script state="off">
            <action>maincpu.mw@4E48 = FFFF</action>
            <action>maincpu.mw@4E51 = FFF8</action>
        </script>
    </cheat>

    <cheat desc="hidden panel finder">
        <script state="on">
            <action>maincpu.ob@4715 = 00</action>
        </script>
        <script state="off">
            <action>maincpu.ob@4715 = D0</action>
        </script>
    </cheat>

    <cheat desc="hidden fried potato finder">
        <script state="on">
            <action>maincpu.mw@3948 = 96D0            </action>
            <action>maincpu.mq@96D0 = 3705FE0FE6187EDD</action>
            <action>maincpu.mq@96D8 = FFFFFFFFC9205AC4</action>
            <!--
            96E0 | DD 7E 18 : ld   a,(ix+$18)
            96E3 | E6 0F    : and  $0F
            96E5 | FE 05    : cp   $05
            96E7 | 37       : scf
            96E8 | C4 5A 20 : call nz,$205A
            96EB | C9       : ret
            -->
        </script>
        <script state="off">
            <action>maincpu.mw@3948 = 205A            </action>
            <action>maincpu.mq@96D0 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@96D8 = FFFFFFFFFFFFFFFF</action>
        </script>
    </cheat>

    <cheat desc="no fruit disappearance">
        <script state="on">
            <action>maincpu.ob@3912 = 18</action> <!-- fruit -->
            <action>maincpu.mb@39B3 = B5</action> <!-- fried potato -->
            <action>maincpu.ob@4743 = 18</action> <!-- panel -->
        </script>
        <script state="off">
            <action>maincpu.ob@3912 = 20</action>
            <action>maincpu.mb@39B3 = 14</action>
            <action>maincpu.ob@4743 = 20</action>
        </script>
    </cheat>

    <cheat desc="sound test mode">
        <comment>set &quot;skip rom check&quot; then reset the game (F3)</comment>
        <script state="on">
            <action>maincpu.mw@014E = 8000            </action>
            <action>maincpu.mq@8000 = 10E62F08DBC10021</action>
            <action>maincpu.mq@8008 = 2847B8B12F00DB4F</action>
            <action>maincpu.mq@8010 = 40FE35012080FEF2</action>
            <action>maincpu.mq@8018 = 3E042090FE340120</action>
            <action>maincpu.mq@8020 = 3E052050FE0618F0</action>
            <action>maincpu.mq@8028 = 032002FE78778610</action>
            <action>maincpu.mq@8030 = AF032004FE05187E</action>
            <action>maincpu.mq@8038 = 00000000C71814D3</action>
            <!--
            8000 | 21 00 C1 : ld   hl,$C100 // sound code address
            8003 | DB 08    : in   a,($08)  // read start button
            8005 | 2F       : cpl
            8006 | E6 10    : and  $10
            8008 | 4F       : ld   c,a
            8009 | DB 00    : in   a,($00)  // read other inputs
            800B | 2F       : cpl
            800C | B1       : or   c
            800D | B8       : cp   b
            800E | 47       : ld   b,a
            800F | 28 F2    : jr   z,$8003
            8011 | FE 80    : cp   $80
            8013 | 20 01    : jr   nz,$8016
            8015 | 35       : dec  (hl)     // decrease code -01
            8016 | FE 40    : cp   $40
            8018 | 20 01    : jr   nz,$801B
            801A | 34       : inc  (hl)     // increase code +01
            801B | FE 90    : cp   $90
            801D | 20 04    : jr   nz,$8023
            801F | 3E F0    : ld   a,$F0    // decrease code -10
            8021 | 18 06    : jr   $8029
            8023 | FE 50    : cp   $50
            8025 | 20 05    : jr   nz,$802C
            8027 | 3E 10    : ld   a,$10    // increase code +10
            8029 | 86       : add  a,(hl)
            802A | 77       : ld   (hl),a
            802B | 78       : ld   a,b
            802C | FE 02    : cp   $02
            802E | 20 03    : jr   nz,$8033
            8030 | 7E       : ld   a,(hl)   // play sound
            8031 | 18 05    : jr   $8038
            8033 | FE 04    : cp   $04
            8035 | 20 03    : jr   nz,$803A
            8037 | AF       : xor  a        // stop sound
            8038 | D3 14    : out  ($14),a  // send sound code
            803A | 18 C7    : jr   $8003
            -->
        </script>
        <script state="run">
            <output format="----- wonder boy 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="start + left : decrease code -10"       line="13" align="center" />
            <output format="start + right : 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@C100</argument>
            </output>
        </script>
        <script state="off">
            <action>maincpu.mw@014E = 0745            </action>
            <action>maincpu.mq@8000 = 3123210401B6B4A6</action>
            <action>maincpu.mq@8008 = 3123213331232133</action>
            <action>maincpu.mq@8010 = 7F7F7F7F7F1B2133</action>
            <action>maincpu.mq@8018 = 240401B7B5A7C57F</action>
            <action>maincpu.mq@8020 = 2436342624363426</action>
            <action>maincpu.mq@8028 = 7F7F7F1E240B0926</action>
            <action>maincpu.mq@8030 = 01BAB8AAC87F7F7F</action>
            <action>maincpu.mq@8038 = 352725373527250C</action>
        </script>
    </cheat>

    <cheat desc="skip rom check">
        <script state="on">
            <action>maincpu.mb@014B = 2A</action>
        </script>
        <script state="off">
            <action>maincpu.mb@014B = 0C</action>
        </script>
    </cheat>

</mamecheat>
wbdeluxe.xml

Code: Select all

<!-- Wonder Boy Deluxe -->
<mamecheat version="1">

    <cheat desc="no hit">
        <comment>you hit an enemy on the skateboard</comment>
        <script state="on">
            <action>maincpu.mb@2E62 = 18</action> <!-- boss (body) -->
            <action>maincpu.mb@3017 = 18</action> <!-- boss (head) -->
            <action>maincpu.mb@31A6 = 18</action> <!-- boss (fireball) -->
            <action>maincpu.mb@36E1 = C9</action> <!-- stone -->
            <action>maincpu.mb@37B8 = C9</action> <!-- bonfire -->
            <action>maincpu.mb@382B = C9</action> <!-- snail -->
            <action>maincpu.mb@3889 = C9</action> <!-- skull -->
            <action>maincpu.mb@3B42 = C9</action> <!-- cobra -->
            <action>maincpu.mb@3CA2 = C9</action> <!-- rock -->
            <action>maincpu.mb@3CFA = C9</action> <!-- blue people -->
            <action>maincpu.mb@4238 = C9</action> <!-- frog -->
            <action>maincpu.mb@429F = C9</action> <!-- bee -->
            <action>maincpu.mb@4347 = C9</action> <!-- bat -->
            <action>maincpu.mb@4503 = C9</action> <!-- spider -->
            <action>maincpu.mb@47B2 = C9</action> <!-- coyote -->
            <action>maincpu.mb@4ACD = C9</action> <!-- swordfish -->
            <action>maincpu.mb@4B88 = C9</action> <!-- octopus -->
            <action>maincpu.mb@4CCC = C9</action> <!-- icicle -->
        </script>
        <script state="off">
            <action>maincpu.mb@2E62 = 30</action>
            <action>maincpu.mb@3017 = 30</action>
            <action>maincpu.mb@31A6 = 30</action>
            <action>maincpu.mb@36E1 = 21</action>
            <action>maincpu.mb@37B8 = 21</action>
            <action>maincpu.mb@382B = 21</action>
            <action>maincpu.mb@3889 = 21</action>
            <action>maincpu.mb@3B42 = 21</action>
            <action>maincpu.mb@3CA2 = 21</action>
            <action>maincpu.mb@3CFA = 21</action>
            <action>maincpu.mb@4238 = 21</action>
            <action>maincpu.mb@429F = 21</action>
            <action>maincpu.mb@4347 = 21</action>
            <action>maincpu.mb@4503 = 21</action>
            <action>maincpu.mb@47B2 = 21</action>
            <action>maincpu.mb@4ACD = 21</action>
            <action>maincpu.mb@4B88 = 21</action>
            <action>maincpu.mb@4CCC = 21</action>
        </script>
    </cheat>

    <cheat desc="auto fire">
        <script state="on">
            <action>maincpu.mb@2B50 = 86</action>
            <action>maincpu.mb@2B53 = 4F</action>
        </script>
        <script state="off">
            <action>maincpu.mb@2B50 = 84</action>
            <action>maincpu.mb@2B53 = 67</action>
        </script>
    </cheat>

    <cheat desc="multiple jump">
        <script state="on">
            <action>maincpu.md@2991 = 00C780CD</action> <!-- jump -->
            <action>maincpu.md@2A15 = 00C780CD</action> <!-- fall down -->
        </script>
        <script state="run">
            <action>maincpu.pq@C780 = CB08286ECBC08421</action>
            <action>maincpu.pq@C788 = DDC9E1031F36DDAE</action>
            <action>maincpu.pq@C790 = 00000000C97E1FCB</action>
            <!--
            C780 | 21 84 C0    : ld   hl,$C084
            C783 | CB 6E       : bit  5,(hl)       // check jump button
            C785 | 28 08       : jr   z,$C78F
            C787 | CB AE       : res  5,(hl)
            C789 | DD 36 1F 03 : ld   (ix+$1f),$03 // set jump flag
            C78D | E1          : pop  hl
            C78E | C9          : ret
            C78F | DD CB 1F 7E : bit  7,(ix+$1f)
            C793 | C9          : ret
            -->
        </script>
        <script state="off">
            <action>maincpu.md@2991 = 7E1FCBDD        </action>
            <action>maincpu.md@2A15 = 7E1FCBDD        </action>
            <action>maincpu.pq@C780 = 0000000000000000</action>
            <action>maincpu.pq@C788 = 0000000000000000</action>
            <action>maincpu.pq@C790 = 0000000000000000</action>
        </script>
    </cheat>

    <cheat desc="no slip">
        <script state="on">
            <action>maincpu.md@262D = C996C0CD        </action>
            <action>maincpu.mq@96C0 = 01280CE6C0843A47</action>
            <action>maincpu.mq@96C8 = FFFFFFC91477DD78</action>
            <!--
            96C0 | 47       : ld   b,a
            96C1 | 3A 84 C0 : ld   a,($C084)
            96C4 | E6 0C    : and  $0C
            96C6 | 28 01    : jr   z,$96C9
            96C8 | 78       : ld   a,b
            96C9 | DD 77 14 : ld   (ix+$14),a
            96CC | C9       : ret
            -->
        </script>
        <script state="off">
            <action>maincpu.md@262D = C91477DD        </action>
            <action>maincpu.mq@96C0 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@96C8 = FFFFFFFFFFFFFFFF</action>
        </script>
    </cheat>

    <cheat desc="vitality speed">
        <parameter>
            <item value="0x0000">no decrease</item>
            <item value="0x0001">01 (slow)  </item>
            <item value="0x0002">02         </item>
            <item value="0x0008">03         </item>
            <item value="0x0020">04         </item>
            <item value="0x0100">05 (fast)  </item>
        </parameter>
        <script state="change">
            <action>maincpu.mw@4E51 = -param</action>
            <action>maincpu.mw@96E9 = -param</action>
            <action>maincpu.mw@96EE = -param</action>
        </script>
        <script state="off">
            <action>maincpu.mw@4E51 = FFF8</action>
            <action>maincpu.mw@96E9 = FFFC</action>
            <action>maincpu.mw@96EE = FFFD</action>
        </script>
    </cheat>

    <cheat desc="hidden panel finder">
        <script state="on">
            <action>maincpu.mb@4715 = 00</action>
        </script>
        <script state="off">
            <action>maincpu.mb@4715 = D0</action>
        </script>
    </cheat>

    <cheat desc="hidden fried potato finder">
        <script state="on">
            <action>maincpu.mw@3948 = 96D0            </action>
            <action>maincpu.mq@96D0 = 3705FE0FE6187EDD</action>
            <action>maincpu.mq@96D8 = FFFFFFFFC9205AC4</action>
            <!--
            96E0 | DD 7E 18 : ld   a,(ix+$18)
            96E3 | E6 0F    : and  $0F
            96E5 | FE 05    : cp   $05
            96E7 | 37       : scf
            96E8 | C4 5A 20 : call nz,$205A
            96EB | C9       : ret
            -->
        </script>
        <script state="off">
            <action>maincpu.mw@3948 = 205A            </action>
            <action>maincpu.mq@96D0 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@96D8 = FFFFFFFFFFFFFFFF</action>
        </script>
    </cheat>

    <cheat desc="no fruit disappearance">
        <script state="on">
            <action>maincpu.mb@3912 = 18</action> <!-- fruit -->
            <action>maincpu.mb@39B3 = B5</action> <!-- fried potato -->
            <action>maincpu.mb@4743 = 18</action> <!-- panel -->
        </script>
        <script state="off">
            <action>maincpu.mb@3912 = 20</action>
            <action>maincpu.mb@39B3 = 14</action>
            <action>maincpu.mb@4743 = 20</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@014E = 8000            </action>
            <action>maincpu.mq@8000 = 10E62F08DBC10021</action>
            <action>maincpu.mq@8008 = B8B1C6E62F00DB4F</action>
            <action>maincpu.mq@8010 = 35012080FEF02847</action>
            <action>maincpu.mq@8018 = 2090FE34012040FE</action>
            <action>maincpu.mq@8020 = 2050FE0618F03E04</action>
            <action>maincpu.mq@8028 = 02FE787786103E05</action>
            <action>maincpu.mq@8030 = 2004FE05187E0320</action>
            <action>maincpu.mq@8038 = 0000C51814D3AF03</action>
            <!--
            8000 | 21 00 C1 : ld   hl,$C100 // sound code address
            8003 | DB 08    : in   a,($08)  // read start button
            8005 | 2F       : cpl
            8006 | E6 10    : and  $10
            8008 | 4F       : ld   c,a
            8009 | DB 00    : in   a,($00)  // read other inputs
            800B | 2F       : cpl
            800C | E6 C6    : and  $C6
            800E | B1       : or   c
            800F | B8       : cp   b
            8010 | 47       : ld   b,a
            8011 | 28 F0    : jr   z,$8003
            8013 | FE 80    : cp   $80
            8015 | 20 01    : jr   nz,$8018
            8017 | 35       : dec  (hl)     // decrease code -01
            8018 | FE 40    : cp   $40
            801A | 20 01    : jr   nz,$801D
            801C | 34       : inc  (hl)     // increase code +01
            801D | FE 90    : cp   $90
            801F | 20 04    : jr   nz,$8025
            8021 | 3E F0    : ld   a,$F0    // decrease code -10
            8023 | 18 06    : jr   $802B
            8025 | FE 50    : cp   $50
            8027 | 20 05    : jr   nz,$802E
            8029 | 3E 10    : ld   a,$10    // increase code +10
            802B | 86       : add  a,(hl)
            802C | 77       : ld   (hl),a
            802D | 78       : ld   a,b
            802E | FE 02    : cp   $02
            8030 | 20 03    : jr   nz,$8035
            8032 | 7E       : ld   a,(hl)   // play sound
            8033 | 18 05    : jr   $803A
            8035 | FE 04    : cp   $04
            8037 | 20 03    : jr   nz,$803C
            8039 | AF       : xor  a        // stop sound
            803A | D3 14    : out  ($14),a  // send sound code
            803C | 18 C5    : jr   $8003
            -->
        </script>
        <script state="run">
            <output format="----- wonder boy 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="start + left : decrease code -10"       line="13" align="center" />
            <output format="start + right : 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@C100</argument>
            </output>
        </script>
        <script state="off">
            <action>maincpu.mw@014E = 0745            </action>
            <action>maincpu.mq@8000 = 3123210401B6B4A6</action>
            <action>maincpu.mq@8008 = 3123213331232133</action>
            <action>maincpu.mq@8010 = 7F7F7F7F7F1B2133</action>
            <action>maincpu.mq@8018 = 240401B7B5A7C57F</action>
            <action>maincpu.mq@8020 = 2436342624363426</action>
            <action>maincpu.mq@8028 = 7F7F7F1E240B0926</action>
            <action>maincpu.mq@8030 = 01BAB8AAC87F7F7F</action>
            <action>maincpu.mq@8038 = 352725373527250C</action>
        </script>
    </cheat>

    <cheat desc="skip rom check">
        <script state="on">
            <action>maincpu.mb@014B = 2A</action>
        </script>
        <script state="off">
            <action>maincpu.mb@014B = 0C</action>
        </script>
    </cheat>

</mamecheat>
jman
Posts: 903
Joined: Tue Dec 01, 2020 1:24 pm
Been thanked: 4 times

[wboy]+ Wonder Boy

Post by jman »

wboysys2.xml

Code: Select all

<!-- Wonder Boy (system 2, set 1, 315-5177) -->
<mamecheat version="1">

    <cheat desc="no hit">
        <comment>you hit an enemy on the skateboard</comment>
        <script state="on">
            <action>maincpu.ob@2E79 = 18</action> <!-- boss (body) -->
            <action>maincpu.ob@302E = 18</action> <!-- boss (head) -->
            <action>maincpu.ob@31BD = 18</action> <!-- boss (fireball) -->
            <action>maincpu.ob@36F8 = C9</action> <!-- stone -->
            <action>maincpu.ob@37CF = C9</action> <!-- bonfire -->
            <action>maincpu.ob@3842 = C9</action> <!-- snail -->
            <action>maincpu.ob@38A0 = C9</action> <!-- skull -->
            <action>maincpu.ob@3B59 = C9</action> <!-- cobra -->
            <action>maincpu.ob@3CB9 = C9</action> <!-- rock -->
            <action>maincpu.ob@3D11 = C9</action> <!-- blue people -->
            <action>maincpu.ob@424F = C9</action> <!-- frog -->
            <action>maincpu.ob@42B6 = C9</action> <!-- bee -->
            <action>maincpu.ob@435E = C9</action> <!-- bat -->
            <action>maincpu.ob@451A = C9</action> <!-- spider -->
            <action>maincpu.ob@47C3 = C9</action> <!-- coyote -->
            <action>maincpu.ob@4ADE = C9</action> <!-- swordfish -->
            <action>maincpu.ob@4B99 = C9</action> <!-- octopus -->
            <action>maincpu.ob@4CDD = C9</action> <!-- icicle -->
        </script>
        <script state="off">
            <action>maincpu.ob@2E79 = 30</action>
            <action>maincpu.ob@302E = 30</action>
            <action>maincpu.ob@31BD = 30</action>
            <action>maincpu.ob@36F8 = 21</action>
            <action>maincpu.ob@37CF = 21</action>
            <action>maincpu.ob@3842 = 21</action>
            <action>maincpu.ob@38A0 = 21</action>
            <action>maincpu.ob@3B59 = 21</action>
            <action>maincpu.ob@3CB9 = 21</action>
            <action>maincpu.ob@3D11 = 21</action>
            <action>maincpu.ob@424F = 21</action>
            <action>maincpu.ob@42B6 = 21</action>
            <action>maincpu.ob@435E = 21</action>
            <action>maincpu.ob@451A = 21</action>
            <action>maincpu.ob@47C3 = 21</action>
            <action>maincpu.ob@4ADE = 21</action>
            <action>maincpu.ob@4B99 = 21</action>
            <action>maincpu.ob@4CDD = 21</action>
        </script>
    </cheat>

    <cheat desc="auto fire">
        <script state="on">
            <action>maincpu.mb@2B67 = 85</action>
            <action>maincpu.ob@2B6A = 4F</action>
        </script>
        <script state="off">
            <action>maincpu.mb@2B67 = 83</action>
            <action>maincpu.ob@2B6A = 67</action>
        </script>
    </cheat>

    <cheat desc="multiple jump">
        <script state="on">
            <action>maincpu.od@029A8 = 00FFFFCD        </action> <!-- jump -->
            <action>maincpu.md@029A8 = FFBFE0FF        </action>
            <action>maincpu.od@02A2C = 00FFFFCD        </action> <!-- fall down -->
            <action>maincpu.md@02A2C = FFBFE0FF        </action>
            <action>maincpu.mq@13FE0 = CB08286ECBC08321</action>
            <action>maincpu.mq@13FE8 = DDC9E1031F36DDAE</action>
            <action>maincpu.mq@13FF0 = FFFFFFFFC97E1FCB</action>
            <!--
            BFE0 | 21 83 C0    : ld   hl,$C083     // check jump button
            BFE3 | CB 6E       : bit  5,(hl)
            BFE5 | 28 08       : jr   z,$BFEF
            BFE7 | CB AE       : res  5,(hl)
            BFE9 | DD 36 1F 03 : ld   (ix+$1f),$03 // set jump flag
            BFED | E1          : pop  hl
            BFEE | C9          : ret
            BFEF | DD CB 1F 7E : bit  7,(ix+$1f)
            BFF3 | C9          : ret
            -->
        </script>
        <script state="off">
            <action>maincpu.od@029A8 = 2E1BCBDD        </action>
            <action>maincpu.md@029A8 = 7E1F9BD9        </action>
            <action>maincpu.od@02A2C = 7E5ACBDD        </action>
            <action>maincpu.md@02A2C = 7E1FCB98        </action>
            <action>maincpu.mq@13FE0 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@13FE8 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@13FF0 = FFFFFFFFFFFFFFFF</action>
        </script>
    </cheat>

    <cheat desc="no slip">
        <script state="on">
            <action>maincpu.ob@02644 = CD              </action>
            <action>maincpu.mw@02645 = 96D0            </action>
            <action>maincpu.mq@116D0 = 01280CE6C0833A47</action>
            <action>maincpu.mq@116D8 = FFFFFFC91477DD78</action>
            <!--
            96D0 | 47       : ld   b,a
            96D1 | 3A 83 C0 : ld   a,($C083)
            96D4 | E6 0C    : and  $0C
            96D6 | 28 01    : jr   z,$96D9
            96D8 | 78       : ld   a,b
            96D9 | DD 77 14 : ld   (ix+$14),a
            96DC | C9       : ret
            -->
        </script>
        <script state="off">
            <action>maincpu.ob@02644 = DD              </action>
            <action>maincpu.mw@02645 = 1433            </action>
            <action>maincpu.mq@116D0 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@116D8 = FFFFFFFFFFFFFFFF</action>
        </script>
    </cheat>

    <cheat desc="vitality speed">
        <parameter>
            <item value="0x0000">no decrease</item>
            <item value="0x0001">01 (slow)  </item>
            <item value="0x0002">02         </item>
            <item value="0x0008">03         </item>
            <item value="0x0020">04         </item>
            <item value="0x0100">05 (fast)  </item>
        </parameter>
        <script state="change">
            <action>maincpu.mw@4E59 = -param</action>
            <action>maincpu.mw@4E62 = -param</action>
        </script>
        <script state="off">
            <action>maincpu.mw@4E59 = FFFF</action>
            <action>maincpu.mw@4E62 = FFF8</action>
        </script>
    </cheat>

    <cheat desc="hidden panel finder">
        <script state="on">
            <action>maincpu.ob@472C = 00</action>
        </script>
        <script state="off">
            <action>maincpu.ob@472C = D0</action>
        </script>
    </cheat>

    <cheat desc="hidden fried potato finder">
        <script state="on">
            <action>maincpu.mw@0395F = 96E0            </action>
            <action>maincpu.mq@116E0 = 3705FE0FE6187EDD</action>
            <action>maincpu.mq@116E8 = FFFFFFFFC9206DC4</action>
            <!--
            96E0 | DD 7E 18 : ld   a,(ix+$18)
            96E3 | E6 0F    : and  $0F
            96E5 | FE 05    : cp   $05
            96E7 | 37       : scf
            96E8 | C4 6D 20 : call nz,$206D
            96EB | C9       : ret
            -->
        </script>
        <script state="off">
            <action>maincpu.mw@03958 = 206D            </action>
            <action>maincpu.mq@116E0 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@116E8 = FFFFFFFFFFFFFFFF</action>
        </script>
    </cheat>

    <cheat desc="no fruit disappearance">
        <script state="on">
            <action>maincpu.ob@3929 = 18</action> <!-- fruit -->
            <action>maincpu.mb@39CA = CC</action> <!-- fried potato -->
            <action>maincpu.ob@475A = 18</action> <!-- panel -->
        </script>
        <script state="off">
            <action>maincpu.ob@3929 = 20</action>
            <action>maincpu.mb@39CA = 2B</action>
            <action>maincpu.ob@475A = 20</action>
        </script>
    </cheat>

    <cheat desc="sound test mode">
        <comment>set &quot;skip rom check&quot; then reset the game (F3)</comment>
        <script state="on">
            <action>maincpu.mw@0015D = 8000            </action>
            <action>maincpu.mq@10000 = 10E62F08DBC10021</action>
            <action>maincpu.mq@10008 = 2847B8B12F00DB4F</action>
            <action>maincpu.mq@10010 = 40FE35012080FEF2</action>
            <action>maincpu.mq@10018 = 3E042090FE340120</action>
            <action>maincpu.mq@10020 = 3E052050FE0618F0</action>
            <action>maincpu.mq@10028 = 032002FE78778610</action>
            <action>maincpu.mq@10030 = AF032004FE05187E</action>
            <action>maincpu.mq@10038 = 00000000C71814D3</action>
            <!--
            8000 | 21 00 C1 : ld   hl,$C100 // sound code address
            8003 | DB 08    : in   a,($08)  // read start button
            8005 | 2F       : cpl
            8006 | E6 10    : and  $10
            8008 | 4F       : ld   c,a
            8009 | DB 00    : in   a,($00)  // read other inputs
            800B | 2F       : cpl
            800C | B1       : or   c
            800D | B8       : cp   b
            800E | 47       : ld   b,a
            800F | 28 F2    : jr   z,$8003
            8011 | FE 80    : cp   $80
            8013 | 20 01    : jr   nz,$8016
            8015 | 35       : dec  (hl)     // decrease code -01
            8016 | FE 40    : cp   $40
            8018 | 20 01    : jr   nz,$801B
            801A | 34       : inc  (hl)     // increase code +01
            801B | FE 90    : cp   $90
            801D | 20 04    : jr   nz,$8023
            801F | 3E F0    : ld   a,$F0    // decrease code -10
            8021 | 18 06    : jr   $8029
            8023 | FE 50    : cp   $50
            8025 | 20 05    : jr   nz,$802C
            8027 | 3E 10    : ld   a,$10    // increase code +10
            8029 | 86       : add  a,(hl)
            802A | 77       : ld   (hl),a
            802B | 78       : ld   a,b
            802C | FE 02    : cp   $02
            802E | 20 03    : jr   nz,$8033
            8030 | 7E       : ld   a,(hl)   // play sound
            8031 | 18 05    : jr   $8038
            8033 | FE 04    : cp   $04
            8035 | 20 03    : jr   nz,$803A
            8037 | AF       : xor  a        // stop sound
            8038 | D3 14    : out  ($14),a  // send sound code
            803A | 18 C7    : jr   $8003
            -->
        </script>
        <script state="run">
            <output format="----- wonder boy 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="start + left : decrease code -10"       line="13" align="center" />
            <output format="start + right : 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@C100</argument>
            </output>
        </script>
        <script state="off">
            <action>maincpu.mw@0015D = 0751            </action>
            <action>maincpu.mq@10000 = 0401B6B4A6C47F7F</action>
            <action>maincpu.mq@10008 = 3331232133312321</action>
            <action>maincpu.mq@10010 = 7F7F1B2133312321</action>
            <action>maincpu.mq@10018 = B7B5A7C57F7F7F7F</action>
            <action>maincpu.mq@10020 = 2624363426240401</action>
            <action>maincpu.mq@10028 = 1E240B0926243634</action>
            <action>maincpu.mq@10030 = AAC87F7F7F7F7F7F</action>
            <action>maincpu.mq@10038 = 373527250C01BAB8</action>

        </script>
    </cheat>

    <cheat desc="skip rom check">
        <script state="on">
            <action>maincpu.mb@015A = 2A</action>
        </script>
        <script state="off">
            <action>maincpu.mb@015A = 08</action>
        </script>
    </cheat>

</mamecheat>
wboysys2a.xml

Code: Select all

<!-- Wonder Boy (system 2, set 2, 315-5176) -->
<mamecheat version="1">

    <cheat desc="no hit">
        <comment>you hit an enemy on the skateboard</comment>
        <script state="on">
            <action>maincpu.ob@2E79 = 18</action> <!-- boss (body) -->
            <action>maincpu.ob@302E = 18</action> <!-- boss (head) -->
            <action>maincpu.ob@31BD = 18</action> <!-- boss (fireball) -->
            <action>maincpu.ob@36F8 = C9</action> <!-- stone -->
            <action>maincpu.ob@37CF = C9</action> <!-- bonfire -->
            <action>maincpu.ob@3842 = C9</action> <!-- snail -->
            <action>maincpu.ob@38A0 = C9</action> <!-- skull -->
            <action>maincpu.ob@3B59 = C9</action> <!-- cobra -->
            <action>maincpu.ob@3CB9 = C9</action> <!-- rock -->
            <action>maincpu.ob@3D11 = C9</action> <!-- blue people -->
            <action>maincpu.ob@424F = C9</action> <!-- frog -->
            <action>maincpu.ob@42B6 = C9</action> <!-- bee -->
            <action>maincpu.ob@435E = C9</action> <!-- bat -->
            <action>maincpu.ob@451A = C9</action> <!-- spider -->
            <action>maincpu.ob@47C3 = C9</action> <!-- coyote -->
            <action>maincpu.ob@4ADE = C9</action> <!-- swordfish -->
            <action>maincpu.ob@4B99 = C9</action> <!-- octopus -->
            <action>maincpu.ob@4CDD = C9</action> <!-- icicle -->
        </script>
        <script state="off">
            <action>maincpu.ob@2E79 = 30</action>
            <action>maincpu.ob@302E = 30</action>
            <action>maincpu.ob@31BD = 30</action>
            <action>maincpu.ob@36F8 = 21</action>
            <action>maincpu.ob@37CF = 21</action>
            <action>maincpu.ob@3842 = 21</action>
            <action>maincpu.ob@38A0 = 21</action>
            <action>maincpu.ob@3B59 = 21</action>
            <action>maincpu.ob@3CB9 = 21</action>
            <action>maincpu.ob@3D11 = 21</action>
            <action>maincpu.ob@424F = 21</action>
            <action>maincpu.ob@42B6 = 21</action>
            <action>maincpu.ob@435E = 21</action>
            <action>maincpu.ob@451A = 21</action>
            <action>maincpu.ob@47C3 = 21</action>
            <action>maincpu.ob@4ADE = 21</action>
            <action>maincpu.ob@4B99 = 21</action>
            <action>maincpu.ob@4CDD = 21</action>
        </script>
    </cheat>

    <cheat desc="auto fire">
        <script state="on">
            <action>maincpu.mb@2B67 = 85</action>
            <action>maincpu.ob@2B6A = 4F</action>
        </script>
        <script state="off">
            <action>maincpu.mb@2B67 = 83</action>
            <action>maincpu.ob@2B6A = 67</action>
        </script>
    </cheat>

    <cheat desc="multiple jump">
        <script state="on">
            <action>maincpu.od@029A8 = 00FFFFCD        </action> <!-- jump -->
            <action>maincpu.md@029A8 = FFBFE0FF        </action>
            <action>maincpu.od@02A2C = 00FFFFCD        </action> <!-- fall down -->
            <action>maincpu.md@02A2C = FFBFE0FF        </action>
            <action>maincpu.mq@13FE0 = CB08286ECBC08321</action>
            <action>maincpu.mq@13FE8 = DDC9E1031F36DDAE</action>
            <action>maincpu.mq@13FF0 = FFFFFFFFC97E1FCB</action>
            <!--
            BFE0 | 21 83 C0    : ld   hl,$C083     // check jump button
            BFE3 | CB 6E       : bit  5,(hl)
            BFE5 | 28 08       : jr   z,$BFEF
            BFE7 | CB AE       : res  5,(hl)
            BFE9 | DD 36 1F 03 : ld   (ix+$1f),$03 // set jump flag
            BFED | E1          : pop  hl
            BFEE | C9          : ret
            BFEF | DD CB 1F 7E : bit  7,(ix+$1f)
            BFF3 | C9          : ret
            -->
        </script>
        <script state="off">
            <action>maincpu.od@029A8 = 3B5BCBDD        </action>
            <action>maincpu.md@029A8 = 7E1F8E99        </action>
            <action>maincpu.od@02A2C = 3B5BCBDD        </action>
            <action>maincpu.md@02A2C = 7E1F8E99        </action>
            <action>maincpu.mq@13FE0 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@13FE8 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@13FF0 = FFFFFFFFFFFFFFFF</action>
        </script>
    </cheat>

    <cheat desc="no slip">
        <script state="on">
            <action>maincpu.ob@02644 = CD              </action>
            <action>maincpu.mw@02645 = 96D0            </action>
            <action>maincpu.mq@116D0 = 01280CE6C0833A47</action>
            <action>maincpu.mq@116D8 = FFFFFFC91477DD78</action>
            <!--
            96D0 | 47       : ld   b,a
            96D1 | 3A 83 C0 : ld   a,($C083)
            96D4 | E6 0C    : and  $0C
            96D6 | 28 01    : jr   z,$96D9
            96D8 | 78       : ld   a,b
            96D9 | DD 77 14 : ld   (ix+$14),a
            96DC | C9       : ret
            -->
        </script>
        <script state="off">
            <action>maincpu.ob@02644 = DD              </action>
            <action>maincpu.mw@02645 = 1433            </action>
            <action>maincpu.mq@116D0 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@116D8 = FFFFFFFFFFFFFFFF</action>
        </script>
    </cheat>

    <cheat desc="vitality speed">
        <parameter>
            <item value="0x0000">no decrease</item>
            <item value="0x0001">01 (slow)  </item>
            <item value="0x0002">02         </item>
            <item value="0x0008">03         </item>
            <item value="0x0020">04         </item>
            <item value="0x0100">05 (fast)  </item>
        </parameter>
        <script state="change">
            <action>maincpu.mw@4E59 = -param</action>
            <action>maincpu.mw@4E62 = -param</action>
        </script>
        <script state="off">
            <action>maincpu.mw@4E59 = FFFF</action>
            <action>maincpu.mw@4E62 = FFF8</action>
        </script>
    </cheat>

    <cheat desc="hidden panel finder">
        <script state="on">
            <action>maincpu.ob@472C = 00</action>
        </script>
        <script state="off">
            <action>maincpu.ob@472C = D0</action>
        </script>
    </cheat>

    <cheat desc="hidden fried potato finder">
        <script state="on">
            <action>maincpu.mw@0395F = 96E0            </action>
            <action>maincpu.mq@116E0 = 3705FE0FE6187EDD</action>
            <action>maincpu.mq@116E8 = FFFFFFFFC9206DC4</action>
            <!--
            96E0 | DD 7E 18 : ld   a,(ix+$18)
            96E3 | E6 0F    : and  $0F
            96E5 | FE 05    : cp   $05
            96E7 | 37       : scf
            96E8 | C4 6D 20 : call nz,$206D
            96EB | C9       : ret
            -->
        </script>
        <script state="off">
            <action>maincpu.mw@03958 = 206D            </action>
            <action>maincpu.mq@116E0 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@116E8 = FFFFFFFFFFFFFFFF</action>
        </script>
    </cheat>

    <cheat desc="no fruit disappearance">
        <script state="on">
            <action>maincpu.ob@3929 = 18</action> <!-- fruit -->
            <action>maincpu.mb@39CA = CC</action> <!-- fried potato -->
            <action>maincpu.ob@475A = 18</action> <!-- panel -->
        </script>
        <script state="off">
            <action>maincpu.ob@3929 = 20</action>
            <action>maincpu.mb@39CA = 2B</action>
            <action>maincpu.ob@475A = 20</action>
        </script>
    </cheat>

    <cheat desc="sound test mode">
        <comment>set &quot;skip rom check&quot; then reset the game (F3)</comment>
        <script state="on">
            <action>maincpu.mw@0015D = 8000            </action>
            <action>maincpu.mq@10000 = 10E62F08DBC10021</action>
            <action>maincpu.mq@10008 = 2847B8B12F00DB4F</action>
            <action>maincpu.mq@10010 = 40FE35012080FEF2</action>
            <action>maincpu.mq@10018 = 3E042090FE340120</action>
            <action>maincpu.mq@10020 = 3E052050FE0618F0</action>
            <action>maincpu.mq@10028 = 032002FE78778610</action>
            <action>maincpu.mq@10030 = AF032004FE05187E</action>
            <action>maincpu.mq@10038 = 00000000C71814D3</action>
            <!--
            8000 | 21 00 C1 : ld   hl,$C100 // sound code address
            8003 | DB 08    : in   a,($08)  // read start button
            8005 | 2F       : cpl
            8006 | E6 10    : and  $10
            8008 | 4F       : ld   c,a
            8009 | DB 00    : in   a,($00)  // read other inputs
            800B | 2F       : cpl
            800C | B1       : or   c
            800D | B8       : cp   b
            800E | 47       : ld   b,a
            800F | 28 F2    : jr   z,$8003
            8011 | FE 80    : cp   $80
            8013 | 20 01    : jr   nz,$8016
            8015 | 35       : dec  (hl)     // decrease code -01
            8016 | FE 40    : cp   $40
            8018 | 20 01    : jr   nz,$801B
            801A | 34       : inc  (hl)     // increase code +01
            801B | FE 90    : cp   $90
            801D | 20 04    : jr   nz,$8023
            801F | 3E F0    : ld   a,$F0    // decrease code -10
            8021 | 18 06    : jr   $8029
            8023 | FE 50    : cp   $50
            8025 | 20 05    : jr   nz,$802C
            8027 | 3E 10    : ld   a,$10    // increase code +10
            8029 | 86       : add  a,(hl)
            802A | 77       : ld   (hl),a
            802B | 78       : ld   a,b
            802C | FE 02    : cp   $02
            802E | 20 03    : jr   nz,$8033
            8030 | 7E       : ld   a,(hl)   // play sound
            8031 | 18 05    : jr   $8038
            8033 | FE 04    : cp   $04
            8035 | 20 03    : jr   nz,$803A
            8037 | AF       : xor  a        // stop sound
            8038 | D3 14    : out  ($14),a  // send sound code
            803A | 18 C7    : jr   $8003
            -->
        </script>
        <script state="run">
            <output format="----- wonder boy 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="start + left : decrease code -10"       line="13" align="center" />
            <output format="start + right : 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@C100</argument>
            </output>
        </script>
        <script state="off">
            <action>maincpu.mw@0015D = 0751            </action>
            <action>maincpu.mq@10000 = 0401B6B4A6C47F7F</action>
            <action>maincpu.mq@10008 = 3331232133312321</action>
            <action>maincpu.mq@10010 = 7F7F1B2133312321</action>
            <action>maincpu.mq@10018 = B7B5A7C57F7F7F7F</action>
            <action>maincpu.mq@10020 = 2624363426240401</action>
            <action>maincpu.mq@10028 = 1E240B0926243634</action>
            <action>maincpu.mq@10030 = AAC87F7F7F7F7F7F</action>
            <action>maincpu.mq@10038 = 373527250C01BAB8</action>
        </script>
    </cheat>

    <cheat desc="skip rom check">
        <script state="on">
            <action>maincpu.mb@015A = 2A</action>
        </script>
        <script state="off">
            <action>maincpu.mb@015A = 08</action>
        </script>
    </cheat>

</mamecheat>
  • "no hit" : You hit an enemy on the skateboard.
  • "multiple jump" : wboyblt and wbdeluxe use RAM area to put custome routine because of no ROM space. So some bugs will happen if other routines access this area.
  • "no slip" : You will slip a little in ice field.
  • "hidden fried potato finder" : Fried potato is quick-disappeared. It's better to use "no fruit disappearance" code together.
  • "sound test mode" : wboyu, wboy5, wboyblt and wbdeluxe don't require "skip rom check" because these sets skip rom error from the beginning.
  • "skip rom check" : wboyu doesn't have this code because of no ROM check routine.
Post Reply