[fantzone] Fantasy Zone

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: 829
Joined: Tue Dec 01, 2020 1:24 pm

[fantzone] Fantasy Zone

Post by jman »

Code: Select all

<cheat desc="auto fire">
    <script state="on">
        <action>maincpu.mb@6849 = 01</action> <!-- shot -->
        <action>maincpu.mb@6869 = 01</action> <!-- bomb -->
    </script>
    <script state="off">
        <action>maincpu.mb@6849 = 0f</action>
        <action>maincpu.mb@6869 = 0f</action>
    </script>
</cheat>

<cheat desc="player speed">
    <parameter>
        <item value="0x0080">01 (slow)</item>
        <item value="0x0180">02       </item>
        <item value="0x0380">03       </item>
        <item value="0x0580">04       </item>
        <item value="0x0780">05 (fast)</item>
    </parameter>
    <script state="on">
        <action>maincpu.mw@66a2 = 323c</action> <!-- x position -->
        <action>maincpu.mw@68c6 = 323c</action> <!-- x position (boss) -->
        <action>maincpu.mw@697e = 323c</action> <!-- x position (boss) -->
        <action>maincpu.mw@6c9c = 323c</action> <!-- x position (final boss) -->
        <action>maincpu.mw@6d42 = 323c</action> <!-- x position (round finish) -->
        <action>maincpu.mw@70de = 343c</action> <!-- y position -->
        <action>maincpu.mw@711e = 343c</action> <!-- y position (final boss) -->
    </script>
    <script state="change">
        <action>maincpu.mw@66a4 = param</action>
        <action>maincpu.mw@68c8 = param</action>
        <action>maincpu.mw@6980 = param</action>
        <action>maincpu.mw@6c9e = param</action>
        <action>maincpu.mw@6d44 = param</action>
        <action>maincpu.mw@70e0 = param</action>
        <action>maincpu.mw@7120 = param</action>
    </script>
    <script state="off">
        <action>maincpu.md@66a2 = 322e0024</action>
        <action>maincpu.md@68c6 = 322e0024</action>
        <action>maincpu.md@697e = 322e0024</action>
        <action>maincpu.md@6c9c = 322e0024</action>
        <action>maincpu.md@6d42 = 322e0024</action>
        <action>maincpu.md@70de = 342e0026</action>
        <action>maincpu.md@711e = 342e0026</action>
    </script>
</cheat>

<cheat desc="free price">
    <script state="on">
        <!-- engine, shot, bomb -->
        <action>maincpu.mq@04678 = 4eb90002e7e02649</action>
        <action>maincpu.mq@2e7e0 = 5048429924494299</action>
        <action>maincpu.mq@2e7e8 = 4e75ffffffffffff</action>
        <!--
        2e7e0 | 5048 : addq.w  #8,A0
        2e7e2 | 4299 : clr.l   (A1)+
        2e7e4 | 2449 : movea.l A1,A2
        2e7e6 | 4299 : clr.l   (A1)+
        2e7e8 | 4e75 : rts
        -->
        <!-- extra ship -->
        <action>maincpu.mw@46b4 = 42a2</action> <!-- clr.l -(A2) -->
        <action>maincpu.mw@4f8c = 4290</action> <!-- clr.l (A0) -->
    </script>
    <script state="off">
        <action>maincpu.mq@04678 = 22d8244922d82649</action>
        <action>maincpu.mq@2e7e0 = ffffffffffffffff</action>
        <action>maincpu.mq@2e7e8 = ffffffffffffffff</action>
        <action>maincpu.mw@046b4 =             2500</action>
        <action>maincpu.mw@04f8c =             2080</action>
    </script>
</cheat>

<cheat desc="drop max coin">
    <script state="on">
        <action>maincpu.md@33e8 = 303c0008</action> <!-- base -->
        <action>maincpu.md@b4f0 = 303c0008</action> <!-- boss -->
        <action>maincpu.md@b50e = 1d7c0008</action> <!-- enemy -->
    </script>
    <script state="off">
        <action>maincpu.md@33e8 = 64027000</action>
        <action>maincpu.md@b4f0 = d0301000</action>
        <action>maincpu.md@b50e = 1d700000</action>
    </script>
</cheat>

<cheat desc="short hit mark - bomb">
    <script state="on">
        <!-- objects -->
        <action>maincpu.mb@8ce1 = 01</action>
        <action>maincpu.mb@8ce7 = 01</action>
        <!-- ground -->
        <action>maincpu.mb@8d0d = 01</action>
        <action>maincpu.mb@8d13 = 01</action>
    </script>
    <script state="off">
        <action>maincpu.mb@8ce1 = 02</action>
        <action>maincpu.mb@8ce7 = 05</action>
        <action>maincpu.mb@8d0d = 02</action>
        <action>maincpu.mb@8d13 = 05</action>
    </script>
</cheat>

<cheat desc="sound test mode">
    <comment>reset the game (F3) to enter sound test mode</comment>
    <script state="on">
        <action>maincpu.mq@01f90 = 4ef90002e7f06100</action>
        <action>maincpu.mq@2e7f0 = 41f8c10043f900c4</action>
        <action>maincpu.mq@2e7f8 = 0001120010291002</action>
        <action>maincpu.mq@2e800 = b20067f60c00007f</action>
        <action>maincpu.mq@2e808 = 660253100c0000bf</action>
        <action>maincpu.mq@2e810 = 660252100c0000ef</action>
        <action>maincpu.mq@2e818 = 6604041000100c00</action>
        <action>maincpu.mq@2e820 = 00df660406100010</action>
        <action>maincpu.mq@2e828 = 0c0000fd66021290</action>
        <action>maincpu.mq@2e830 = 0c0000fb66024211</action>
        <action>maincpu.mq@2e838 = 60c0ffffffffffff</action>
        <!--
        2e7f0 | 41f8 c100      : lea    $c100.w,A0    // sound code address
        2e7f4 | 43f9 00c4 0001 : lea    $c40001.l,A1  // sound latch address
        2e7fa | 1200           : move.b D0,D1
        2e7fc | 1029 1002      : move.b ($1002,A1),D0 // read input
        2e800 | b200           : cmp.b  D0,D1
        2e802 | 67f6           : beq    $2e7fa
        2e804 | 0c00 007f      : cmpi.b #$7f,D0
        2e808 | 6602           : bne    $2e80c
        2e80a | 5310           : subq.b #1,(A0)       // decrease code -01
        2e80c | 0c00 00bf      : cmpi.b #-$41,D0
        2e810 | 6602           : bne    $2e814
        2e812 | 5210           : addq.b #1,(A0)       // increase code +01
        2e814 | 0c00 00ef      : cmpi.b #-$11,D0
        2e818 | 6604           : bne    $2e81e
        2e81a | 0410 0010      : subi.b #$10,(A0)     // decrease code -10
        2e81e | 0c00 00df      : cmpi.b #-$21,D0
        2e822 | 6604           : bne    $2e828
        2e824 | 0610 0010      : addi.b #$10,(A0)     // increase code +10
        2e828 | 0c00 00fd      : cmpi.b #-$3,D0
        2e82c | 6602           : bne    $2e830
        2e82e | 1290           : move.b (A0),(A1)     // play sound
        2e830 | 0c00 00fb      : cmpi.b #-$5,D0
        2e834 | 6602           : bne    $2e838
        2e836 | 4211           : clr.b  (A1)          // stop sound
        2e838 | 60c0           : bra    $2e7fa
        -->
    </script>
    <script state="run">
        <output format="----- fantasy zone sound test mode -----" line="10" align="center" />
        <output format="left : decrease code -01"                 line="11" align="center" />
        <output format="right : increase code +01"                line="12" align="center" />
        <output format="up : increase code +10"                   line="13" align="center" />
        <output format="down : decrease code -10"                 line="14" align="center" />
        <output format="button 1 : play sound"                    line="15" align="center" />
        <output format="button 2 : stop sound"                    line="16" align="center" />
        <output format="----------------------------"             line="17" align="center" />
        <output format="&lt;&lt; sound code %2.2X &gt;&gt;"       line="19" align="center">
            <argument>maincpu.pb@ffc100</argument>
        </output>
    </script>
    <script state="off">
        <action>maincpu.mq@01f90 = 08b80002c23b6100</action>
        <action>maincpu.mq@2e7f0 = ffffffffffffffff</action>
        <action>maincpu.mq@2e7f8 = ffffffffffffffff</action>
        <action>maincpu.mq@2e800 = ffffffffffffffff</action>
        <action>maincpu.mq@2e808 = ffffffffffffffff</action>
        <action>maincpu.mq@2e810 = ffffffffffffffff</action>
        <action>maincpu.mq@2e818 = ffffffffffffffff</action>
        <action>maincpu.mq@2e820 = ffffffffffffffff</action>
        <action>maincpu.mq@2e828 = ffffffffffffffff</action>
        <action>maincpu.mq@2e830 = ffffffffffffffff</action>
        <action>maincpu.mq@2e838 = ffffffffffffffff</action>
    </script>
</cheat>
jman
Posts: 829
Joined: Tue Dec 01, 2020 1:24 pm

[fantzone]+ Fantasy Zone

Post by jman »

fantzone.xml

Code: Select all

<!-- Fantasy Zone (Rev A, unprotected) -->
<mamecheat version="1">

    <cheat desc="no hit">
        <script state="on">
            <action>maincpu.mw@8582 = 4E71</action> <!-- bullet -->
            <action>maincpu.mw@B134 = 4E75</action> <!-- enemy -->
        </script>
        <script state="off">
            <action>maincpu.mw@8582 = 6622</action>
            <action>maincpu.mw@B134 = 2078</action>
        </script>
    </cheat>

    <cheat desc="auto fire">
        <script state="on">
            <action>maincpu.mb@6849 = 01</action> <!-- shot -->
            <action>maincpu.mb@6869 = 01</action> <!-- bomb -->
        </script>
        <script state="off">
            <action>maincpu.mb@6849 = 0F</action>
            <action>maincpu.mb@6869 = 0F</action>
        </script>
    </cheat>

    <cheat desc="player speed">
        <parameter>
            <item value="0x0080">01 (slow)</item>
            <item value="0x0180">02       </item>
            <item value="0x0380">03       </item>
            <item value="0x0580">04       </item>
            <item value="0x0780">05 (fast)</item>
        </parameter>
        <script state="on">
            <action>maincpu.mw@66A2 = 323C</action> <!-- x position -->
            <action>maincpu.mw@68C6 = 323C</action> <!-- x position (boss) -->
            <action>maincpu.mw@697E = 323C</action> <!-- x position (boss) -->
            <action>maincpu.mw@6C9C = 323C</action> <!-- x position (final boss) -->
            <action>maincpu.mw@6D42 = 323C</action> <!-- x position (round finish) -->
            <action>maincpu.mw@70DE = 343C</action> <!-- y position -->
            <action>maincpu.mw@711E = 343C</action> <!-- y position (final boss) -->
        </script>
        <script state="change">
            <action>maincpu.mw@66A4 = param</action>
            <action>maincpu.mw@68C8 = param</action>
            <action>maincpu.mw@6980 = param</action>
            <action>maincpu.mw@6C9E = param</action>
            <action>maincpu.mw@6D44 = param</action>
            <action>maincpu.mw@70E0 = param</action>
            <action>maincpu.mw@7120 = param</action>
        </script>
        <script state="off">
            <action>maincpu.md@66A2 = 322E0024</action>
            <action>maincpu.md@68C6 = 322E0024</action>
            <action>maincpu.md@697E = 322E0024</action>
            <action>maincpu.md@6C9C = 322E0024</action>
            <action>maincpu.md@6D42 = 322E0024</action>
            <action>maincpu.md@70DE = 342E0026</action>
            <action>maincpu.md@711E = 342E0026</action>
        </script>
    </cheat>

    <cheat desc="free price">
        <script state="on">
            <!-- engine, shot, bomb -->
            <action>maincpu.mq@04678 = 4EB90002E7E02649</action>
            <action>maincpu.mq@2E7E0 = 5048429924494299</action>
            <action>maincpu.mq@2E7E8 = 4E75FFFFFFFFFFFF</action>
            <!--
            2E7E0 | 5048 : addq.w  #8, A0
            2E7E2 | 4299 : clr.l   (A1)+
            2E7E4 | 2449 : movea.l A1, A2
            2E7E6 | 4299 : clr.l   (A1)+
            2E7E8 | 4E75 : rts
            -->
            <!-- extra ship -->
            <action>maincpu.mw@46B4 = 42A2</action> <!-- clr.l -(A2) -->
            <action>maincpu.mw@4F8C = 4290</action> <!-- clr.l (A0) -->
        </script>
        <script state="off">
            <action>maincpu.mq@04678 = 22D8244922D82649</action>
            <action>maincpu.mq@2E7E0 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@2E7E8 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mw@046B4 = 2500            </action>
            <action>maincpu.mw@04F8C = 2080            </action>
        </script>
    </cheat>

    <cheat desc="drop max coin">
        <script state="on">
            <action>maincpu.md@33E8 = 303C0008</action> <!-- base -->
            <action>maincpu.md@B4F0 = 303C0008</action> <!-- boss -->
            <action>maincpu.md@B50E = 1D7C0008</action> <!-- enemy -->
        </script>
        <script state="off">
            <action>maincpu.md@33E8 = 64027000</action>
            <action>maincpu.md@B4F0 = D0301000</action>
            <action>maincpu.md@B50E = 1D700000</action>
        </script>
    </cheat>

    <cheat desc="short hit mark - bomb">
        <script state="on">
            <!-- objects -->
            <action>maincpu.mb@8CE1 = 01</action>
            <action>maincpu.mb@8CE7 = 01</action>
            <!-- ground -->
            <action>maincpu.mb@8D0D = 01</action>
            <action>maincpu.mb@8D13 = 01</action>
        </script>
        <script state="off">
            <action>maincpu.mb@8CE1 = 02</action>
            <action>maincpu.mb@8CE7 = 05</action>
            <action>maincpu.mb@8D0D = 02</action>
            <action>maincpu.mb@8D13 = 05</action>
        </script>
    </cheat>

    <cheat desc="sound test mode">
        <comment>reset the game (F3) to enter sound test mode</comment>
        <script state="on">
            <action>maincpu.mq@01F90 = 4EF90002E7F06100</action>
            <action>maincpu.mq@2E7F0 = 41F8C00043F900C4</action>
            <action>maincpu.mq@2E7F8 = 0001120010291002</action>
            <action>maincpu.mq@2E800 = B20067F60C00007F</action>
            <action>maincpu.mq@2E808 = 660253100C0000BF</action>
            <action>maincpu.mq@2E810 = 660252100C0000EF</action>
            <action>maincpu.mq@2E818 = 6604041000100C00</action>
            <action>maincpu.mq@2E820 = 00DF660406100010</action>
            <action>maincpu.mq@2E828 = 0C0000FD66021290</action>
            <action>maincpu.mq@2E830 = 0C0000FB66024211</action>
            <action>maincpu.mq@2E838 = 60C0FFFFFFFFFFFF</action>
            <!--
            2E7F0 | 41F8 C000      : lea     $c000.w, A0    // sound code address ($ffc000)
            2E7F4 | 43F9 00C4 0001 : lea     $c40001.l, A1  // sound latch address
            2E7FA | 1200           : move.b  D0, D1
            2E7FC | 1029 1002      : move.b  ($1002,A1), D0 // read input ($c41003)
            2E800 | B200           : cmp.b   D0, D1
            2E802 | 67F6           : beq     $2e7fa
            2E804 | 0C00 007F      : cmpi.b  #$7f, D0
            2E808 | 6602           : bne     $2e80c
            2E80A | 5310           : subq.b  #1, (A0)       // decrease code -01
            2E80C | 0C00 00BF      : cmpi.b  #-$41, D0
            2E810 | 6602           : bne     $2e814
            2E812 | 5210           : addq.b  #1, (A0)       // increase code +01
            2E814 | 0C00 00EF      : cmpi.b  #-$11, D0
            2E818 | 6604           : bne     $2e81e
            2E81A | 0410 0010      : subi.b  #$10, (A0)     // decrease code -10
            2E81E | 0C00 00DF      : cmpi.b  #-$21, D0
            2E822 | 6604           : bne     $2e828
            2E824 | 0610 0010      : addi.b  #$10, (A0)     // increase code +10
            2E828 | 0C00 00FD      : cmpi.b  #-$3, D0
            2E82C | 6602           : bne     $2e830
            2E82E | 1290           : move.b  (A0), (A1)     // play sound
            2E830 | 0C00 00FB      : cmpi.b  #-$5, D0
            2E834 | 6602           : bne     $2e838
            2E836 | 4211           : clr.b   (A1)           // stop sound
            2E838 | 60C0           : bra     $2e7fa
            -->
        </script>
        <script state="run">
            <output format="----- fantasy zone sound test mode -----" line="10" align="center" />
            <output format="left : decrease code -01"                 line="11" align="center" />
            <output format="right : increase code +01"                line="12" align="center" />
            <output format="down : decrease code -10"                 line="13" align="center" />
            <output format="up : increase code +10"                   line="14" align="center" />
            <output format="button 1 : play sound"                    line="15" align="center" />
            <output format="button 2 : stop sound"                    line="16" align="center" />
            <output format="----------------------------"             line="17" align="center" />
            <output format="&lt;&lt; sound code %2.2X &gt;&gt;"       line="19" align="center"  >
                <argument>maincpu.pb@FFC000</argument>
            </output>
        </script>
        <script state="off">
            <action>maincpu.mq@01F90 = 08B80002C23B6100</action>
            <action>maincpu.mq@2E7F0 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@2E7F8 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@2E800 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@2E808 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@2E810 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@2E818 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@2E820 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@2E828 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@2E830 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@2E838 = FFFFFFFFFFFFFFFF</action>
        </script>
    </cheat>

</mamecheat>
fantzone1.xml

Code: Select all

<!-- Fantasy Zone (unprotected) -->
<mamecheat version="1">

    <cheat desc="no hit">
        <script state="on">
            <action>maincpu.mw@7CD4 = 4E71</action> <!-- bullet -->
            <action>maincpu.mw@A878 = 4E75</action> <!-- enemy -->
        </script>
        <script state="off">
            <action>maincpu.mw@7CD4 = 6622</action>
            <action>maincpu.mw@A878 = 2078</action>
        </script>
    </cheat>

    <cheat desc="auto fire">
        <script state="on">
            <action>maincpu.mb@5FA5 = 01</action> <!-- shot -->
            <action>maincpu.mb@5FC5 = 01</action> <!-- bomb -->
        </script>
        <script state="off">
            <action>maincpu.mb@5FA5 = 0F</action>
            <action>maincpu.mb@5FC5 = 0F</action>
        </script>
    </cheat>

    <cheat desc="player speed">
        <parameter>
            <item value="0x0080">01 (slow)</item>
            <item value="0x0180">02       </item>
            <item value="0x0380">03       </item>
            <item value="0x0580">04       </item>
            <item value="0x0780">05 (fast)</item>
        </parameter>
        <script state="on">
            <action>maincpu.mw@5DE0 = 323C</action> <!-- x position -->
            <action>maincpu.mw@6022 = 323C</action> <!-- x position (boss) -->
            <action>maincpu.mw@60DA = 323C</action> <!-- x position (boss) -->
            <action>maincpu.mw@63F8 = 323C</action> <!-- x position (final boss) -->
            <action>maincpu.mw@649E = 323C</action> <!-- x position (round finish) -->
            <action>maincpu.mw@683A = 343C</action> <!-- y position -->
            <action>maincpu.mw@687A = 343C</action> <!-- y position (final boss) -->
        </script>
        <script state="change">
            <action>maincpu.mw@5DE2 = param</action>
            <action>maincpu.mw@6024 = param</action>
            <action>maincpu.mw@60DC = param</action>
            <action>maincpu.mw@63FA = param</action>
            <action>maincpu.mw@64A0 = param</action>
            <action>maincpu.mw@683C = param</action>
            <action>maincpu.mw@687C = param</action>
        </script>
        <script state="off">
            <action>maincpu.md@5DE0 = 322E0024</action>
            <action>maincpu.md@6022 = 322E0024</action>
            <action>maincpu.md@60DA = 322E0024</action>
            <action>maincpu.md@63F8 = 322E0024</action>
            <action>maincpu.md@649E = 322E0024</action>
            <action>maincpu.md@683A = 342E0026</action>
            <action>maincpu.md@687A = 342E0026</action>
        </script>
    </cheat>

    <cheat desc="free price">
        <script state="on">
            <!-- engine, shot, bomb -->
            <action>maincpu.mq@03E52 = 4EB90002E7E02649</action>
            <action>maincpu.mq@2E7E0 = 5048429924494299</action>
            <action>maincpu.mq@2E7E8 = 4E75FFFFFFFFFFFF</action>
            <!--
            2E7E0 | 5048 : addq.w  #8, A0
            2E7E2 | 4299 : clr.l   (A1)+
            2E7E4 | 2449 : movea.l A1, A2
            2E7E6 | 4299 : clr.l   (A1)+
            2E7E8 | 4E75 : rts
            -->
            <!-- extra ship -->
            <action>maincpu.mw@3E8E = 42A2</action> <!-- clr.l -(A2) -->
            <action>maincpu.mw@4766 = 4290</action> <!-- clr.l (A0) -->
        </script>
        <script state="off">
            <action>maincpu.mq@03E52 = 22D8244922D82649</action>
            <action>maincpu.mq@2E7E0 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@2E7E8 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mw@03E8E = 2500            </action>
            <action>maincpu.mw@04766 = 2080            </action>
        </script>
    </cheat>

    <cheat desc="drop max coin">
        <script state="on">
            <action>maincpu.md@2E86 = 303C0008</action> <!-- base -->
            <action>maincpu.md@AC34 = 303C0008</action> <!-- boss -->
            <action>maincpu.md@AC52 = 1D7C0008</action> <!-- enemy -->
        </script>
        <script state="off">
            <action>maincpu.md@2E86 = 64027000</action>
            <action>maincpu.md@AC34 = D0301000</action>
            <action>maincpu.md@AC52 = 1D700000</action>
        </script>
    </cheat>

    <cheat desc="short hit mark - bomb">
        <script state="on">
            <!-- objects -->
            <action>maincpu.mb@8433 = 01</action>
            <action>maincpu.mb@8439 = 01</action>
            <!-- ground -->
            <action>maincpu.mb@845F = 01</action>
            <action>maincpu.mb@8465 = 01</action>
        </script>
        <script state="off">
            <action>maincpu.mb@8433 = 02</action>
            <action>maincpu.mb@8439 = 05</action>
            <action>maincpu.mb@845F = 02</action>
            <action>maincpu.mb@8465 = 05</action>
        </script>
    </cheat>

    <cheat desc="sound test mode">
        <comment>reset the game (F3) to enter sound test mode</comment>
        <script state="on">
            <action>maincpu.mq@01F8E = 4EF90002E7F06100</action>
            <action>maincpu.mq@2E7F0 = 41F8C00043F900C4</action>
            <action>maincpu.mq@2E7F8 = 0001120010291002</action>
            <action>maincpu.mq@2E800 = B20067F60C00007F</action>
            <action>maincpu.mq@2E808 = 660253100C0000BF</action>
            <action>maincpu.mq@2E810 = 660252100C0000EF</action>
            <action>maincpu.mq@2E818 = 6604041000100C00</action>
            <action>maincpu.mq@2E820 = 00DF660406100010</action>
            <action>maincpu.mq@2E828 = 0C0000FD66021290</action>
            <action>maincpu.mq@2E830 = 0C0000FB66024211</action>
            <action>maincpu.mq@2E838 = 60C0FFFFFFFFFFFF</action>
            <!--
            2E7F0 | 41F8 C000      : lea     $c000.w, A0    // sound code address ($ffc000)
            2E7F4 | 43F9 00C4 0001 : lea     $c40001.l, A1  // sound latch address
            2E7FA | 1200           : move.b  D0, D1
            2E7FC | 1029 1002      : move.b  ($1002,A1), D0 // read input ($c41003)
            2E800 | B200           : cmp.b   D0, D1
            2E802 | 67F6           : beq     $2e7fa
            2E804 | 0C00 007F      : cmpi.b  #$7f, D0
            2E808 | 6602           : bne     $2e80c
            2E80A | 5310           : subq.b  #1, (A0)       // decrease code -01
            2E80C | 0C00 00BF      : cmpi.b  #-$41, D0
            2E810 | 6602           : bne     $2e814
            2E812 | 5210           : addq.b  #1, (A0)       // increase code +01
            2E814 | 0C00 00EF      : cmpi.b  #-$11, D0
            2E818 | 6604           : bne     $2e81e
            2E81A | 0410 0010      : subi.b  #$10, (A0)     // decrease code -10
            2E81E | 0C00 00DF      : cmpi.b  #-$21, D0
            2E822 | 6604           : bne     $2e828
            2E824 | 0610 0010      : addi.b  #$10, (A0)     // increase code +10
            2E828 | 0C00 00FD      : cmpi.b  #-$3, D0
            2E82C | 6602           : bne     $2e830
            2E82E | 1290           : move.b  (A0), (A1)     // play sound
            2E830 | 0C00 00FB      : cmpi.b  #-$5, D0
            2E834 | 6602           : bne     $2e838
            2E836 | 4211           : clr.b   (A1)           // stop sound
            2E838 | 60C0           : bra     $2e7fa
            -->
        </script>
        <script state="run">
            <output format="----- fantasy zone sound test mode -----" line="10" align="center" />
            <output format="left : decrease code -01"                 line="11" align="center" />
            <output format="right : increase code +01"                line="12" align="center" />
            <output format="down : decrease code -10"                 line="13" align="center" />
            <output format="up : increase code +10"                   line="14" align="center" />
            <output format="button 1 : play sound"                    line="15" align="center" />
            <output format="button 2 : stop sound"                    line="16" align="center" />
            <output format="----------------------------"             line="17" align="center" />
            <output format="&lt;&lt; sound code %2.2X &gt;&gt;"       line="19" align="center"  >
                <argument>maincpu.pb@FFC000</argument>
            </output>
        </script>
        <script state="off">
            <action>maincpu.mq@01F8E = 08B80002C23B6100</action>
            <action>maincpu.mq@2E7F0 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@2E7F8 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@2E800 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@2E808 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@2E810 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@2E818 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@2E820 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@2E828 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@2E830 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@2E838 = FFFFFFFFFFFFFFFF</action>
        </script>
    </cheat>

</mamecheat>
fantzonep.xml

Code: Select all

<!-- Fantasy Zone (317-5000) -->
<mamecheat version="1">

    <cheat desc="no hit">
        <script state="on">
            <action>maincpu.mw@7CD4 = 4E71</action> <!-- bullet -->
            <action>maincpu.mw@A878 = 4E75</action> <!-- enemy -->
        </script>
        <script state="off">
            <action>maincpu.mw@7CD4 = 6622</action>
            <action>maincpu.mw@A878 = 2078</action>
        </script>
    </cheat>

    <cheat desc="auto fire">
        <script state="on">
            <action>maincpu.mb@5FA5 = 01</action> <!-- shot -->
            <action>maincpu.mb@5FC5 = 01</action> <!-- bomb -->
        </script>
        <script state="off">
            <action>maincpu.mb@5FA5 = 0F</action>
            <action>maincpu.mb@5FC5 = 0F</action>
        </script>
    </cheat>

    <cheat desc="player speed">
        <parameter>
            <item value="0x0080">01 (slow)</item>
            <item value="0x0180">02       </item>
            <item value="0x0380">03       </item>
            <item value="0x0580">04       </item>
            <item value="0x0780">05 (fast)</item>
        </parameter>
        <script state="on">
            <action>maincpu.mw@5DE0 = 323C</action> <!-- x position -->
            <action>maincpu.mw@6022 = 323C</action> <!-- x position (boss) -->
            <action>maincpu.mw@60DA = 323C</action> <!-- x position (boss) -->
            <action>maincpu.mw@63F8 = 323C</action> <!-- x position (final boss) -->
            <action>maincpu.mw@649E = 323C</action> <!-- x position (round finish) -->
            <action>maincpu.mw@683A = 343C</action> <!-- y position -->
            <action>maincpu.mw@687A = 343C</action> <!-- y position (final boss) -->
        </script>
        <script state="change">
            <action>maincpu.mw@5DE2 = param</action>
            <action>maincpu.mw@6024 = param</action>
            <action>maincpu.mw@60DC = param</action>
            <action>maincpu.mw@63FA = param</action>
            <action>maincpu.mw@64A0 = param</action>
            <action>maincpu.mw@683C = param</action>
            <action>maincpu.mw@687C = param</action>
        </script>
        <script state="off">
            <action>maincpu.md@5DE0 = 322E0024</action>
            <action>maincpu.md@6022 = 322E0024</action>
            <action>maincpu.md@60DA = 322E0024</action>
            <action>maincpu.md@63F8 = 322E0024</action>
            <action>maincpu.md@649E = 322E0024</action>
            <action>maincpu.md@683A = 342E0026</action>
            <action>maincpu.md@687A = 342E0026</action>
        </script>
    </cheat>

    <cheat desc="free price">
        <script state="on">
            <!-- engine, shot, bomb -->
            <action>maincpu.mq@03E52 = 4EB90002E7E02649</action>
            <action>maincpu.mq@2E7E0 = 5048429924494299</action>
            <action>maincpu.mq@2E7E8 = 4E75FFFFFFFFFFFF</action>
            <!--
            2E7E0 | 5048 : addq.w  #8, A0
            2E7E2 | 4299 : clr.l   (A1)+
            2E7E4 | 2449 : movea.l A1, A2
            2E7E6 | 4299 : clr.l   (A1)+
            2E7E8 | 4E75 : rts
            -->
            <!-- extra ship -->
            <action>maincpu.mw@3E8E = 42A2</action> <!-- clr.l -(A2) -->
            <action>maincpu.mw@4766 = 4290</action> <!-- clr.l (A0) -->
        </script>
        <script state="off">
            <action>maincpu.mq@03E52 = 22D8244922D82649</action>
            <action>maincpu.mq@2E7E0 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@2E7E8 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mw@03E8E = 2500            </action>
            <action>maincpu.mw@04766 = 2080            </action>
        </script>
    </cheat>

    <cheat desc="drop max coin">
        <script state="on">
            <action>maincpu.md@2E86 = 303C0008</action> <!-- base -->
            <action>maincpu.md@AC34 = 303C0008</action> <!-- boss -->
            <action>maincpu.md@AC52 = 1D7C0008</action> <!-- enemy -->
        </script>
        <script state="off">
            <action>maincpu.md@2E86 = 64027000</action>
            <action>maincpu.md@AC34 = D0301000</action>
            <action>maincpu.md@AC52 = 1D700000</action>
        </script>
    </cheat>

    <cheat desc="short hit mark - bomb">
        <script state="on">
            <!-- objects -->
            <action>maincpu.mb@8433 = 01</action>
            <action>maincpu.mb@8439 = 01</action>
            <!-- ground -->
            <action>maincpu.mb@845F = 01</action>
            <action>maincpu.mb@8465 = 01</action>
        </script>
        <script state="off">
            <action>maincpu.mb@8433 = 02</action>
            <action>maincpu.mb@8439 = 05</action>
            <action>maincpu.mb@845F = 02</action>
            <action>maincpu.mb@8465 = 05</action>
        </script>
    </cheat>

    <cheat desc="sound test mode">
        <comment>reset the game (F3) to enter sound test mode</comment>
        <script state="on">
            <action>maincpu.mq@01F8E = 4EF90002E7F06100</action>
            <action>maincpu.mq@2E7F0 = 41F8C00043F900C4</action>
            <action>maincpu.mq@2E7F8 = 0001120010291002</action>
            <action>maincpu.mq@2E800 = B20067F60C00007F</action>
            <action>maincpu.mq@2E808 = 660253100C0000BF</action>
            <action>maincpu.mq@2E810 = 660252100C0000EF</action>
            <action>maincpu.mq@2E818 = 6604041000100C00</action>
            <action>maincpu.mq@2E820 = 00DF660406100010</action>
            <action>maincpu.mq@2E828 = 0C0000FD66021290</action>
            <action>maincpu.mq@2E830 = 0C0000FB66024211</action>
            <action>maincpu.mq@2E838 = 60C0FFFFFFFFFFFF</action>
            <!--
            2E7F0 | 41F8 C000      : lea     $c000.w, A0    // sound code address ($ffc000)
            2E7F4 | 43F9 00C4 0001 : lea     $c40001.l, A1  // sound latch address
            2E7FA | 1200           : move.b  D0, D1
            2E7FC | 1029 1002      : move.b  ($1002,A1), D0 // read input ($c41003)
            2E800 | B200           : cmp.b   D0, D1
            2E802 | 67F6           : beq     $2e7fa
            2E804 | 0C00 007F      : cmpi.b  #$7f, D0
            2E808 | 6602           : bne     $2e80c
            2E80A | 5310           : subq.b  #1, (A0)       // decrease code -01
            2E80C | 0C00 00BF      : cmpi.b  #-$41, D0
            2E810 | 6602           : bne     $2e814
            2E812 | 5210           : addq.b  #1, (A0)       // increase code +01
            2E814 | 0C00 00EF      : cmpi.b  #-$11, D0
            2E818 | 6604           : bne     $2e81e
            2E81A | 0410 0010      : subi.b  #$10, (A0)     // decrease code -10
            2E81E | 0C00 00DF      : cmpi.b  #-$21, D0
            2E822 | 6604           : bne     $2e828
            2E824 | 0610 0010      : addi.b  #$10, (A0)     // increase code +10
            2E828 | 0C00 00FD      : cmpi.b  #-$3, D0
            2E82C | 6602           : bne     $2e830
            2E82E | 1290           : move.b  (A0), (A1)     // play sound
            2E830 | 0C00 00FB      : cmpi.b  #-$5, D0
            2E834 | 6602           : bne     $2e838
            2E836 | 4211           : clr.b   (A1)           // stop sound
            2E838 | 60C0           : bra     $2e7fa
            -->
        </script>
        <script state="run">
            <output format="----- fantasy zone sound test mode -----" line="10" align="center" />
            <output format="left : decrease code -01"                 line="11" align="center" />
            <output format="right : increase code +01"                line="12" align="center" />
            <output format="down : decrease code -10"                 line="13" align="center" />
            <output format="up : increase code +10"                   line="14" align="center" />
            <output format="button 1 : play sound"                    line="15" align="center" />
            <output format="button 2 : stop sound"                    line="16" align="center" />
            <output format="----------------------------"             line="17" align="center" />
            <output format="&lt;&lt; sound code %2.2X &gt;&gt;"       line="19" align="center"  >
                <argument>maincpu.pb@FFC000</argument>
            </output>
        </script>
        <script state="off">
            <action>maincpu.mq@01F8E = 08B80002C23B6100</action>
            <action>maincpu.mq@2E7F0 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@2E7F8 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@2E800 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@2E808 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@2E810 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@2E818 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@2E820 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@2E828 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@2E830 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@2E838 = FFFFFFFFFFFFFFFF</action>
        </script>
    </cheat>

</mamecheat>
fantzonee.xml

Code: Select all

<!-- Fantasy Zone (FD1089B 317-0016) -->
<mamecheat version="1">

    <cheat desc="no hit">
        <script state="on">
            <action>maincpu.ow@85A0 = 4E71</action> <!-- bullet -->
            <action>maincpu.ow@B034 = 4E75</action> <!-- enemy -->
        </script>
        <script state="off">
            <action>maincpu.ow@85A0 = 6622</action>
            <action>maincpu.ow@B034 = 2078</action>
        </script>
    </cheat>

    <cheat desc="auto fire">
        <script state="on">
            <action>maincpu.ob@685B = 01</action> <!-- shot -->
            <action>maincpu.ob@687B = 01</action> <!-- bomb -->
        </script>
        <script state="off">
            <action>maincpu.ob@685B = 0F</action>
            <action>maincpu.ob@687B = 0F</action>
        </script>
    </cheat>

    <cheat desc="player speed">
        <parameter>
            <item value="0x0080">01 (slow)</item>
            <item value="0x0180">02       </item>
            <item value="0x0380">03       </item>
            <item value="0x0580">04       </item>
            <item value="0x0780">05 (fast)</item>
        </parameter>
        <script state="on">
            <action>maincpu.ow@66B4 = 323C</action> <!-- x position -->
            <action>maincpu.ow@68D8 = 323C</action> <!-- x position (boss) -->
            <action>maincpu.ow@6990 = 323C</action> <!-- x position (boss) -->
            <action>maincpu.ow@6CAE = 323C</action> <!-- x position (final boss) -->
            <action>maincpu.ow@6D54 = 323C</action> <!-- x position (round finish) -->
            <action>maincpu.ow@70F0 = 343C</action> <!-- y position -->
            <action>maincpu.ow@7130 = 343C</action> <!-- y position (final boss) -->
        </script>
        <script state="change">
            <action>maincpu.ow@66B6 = param</action>
            <action>maincpu.ow@68DA = param</action>
            <action>maincpu.ow@6992 = param</action>
            <action>maincpu.ow@6CB0 = param</action>
            <action>maincpu.ow@6D56 = param</action>
            <action>maincpu.ow@70F2 = param</action>
            <action>maincpu.ow@7132 = param</action>
        </script>
        <script state="off">
            <action>maincpu.od@66B4 = 322E0024</action>
            <action>maincpu.od@68D8 = 322E0024</action>
            <action>maincpu.od@6990 = 322E0024</action>
            <action>maincpu.od@6CAE = 322E0024</action>
            <action>maincpu.od@6D54 = 322E0024</action>
            <action>maincpu.od@70F0 = 342E0026</action>
            <action>maincpu.od@7130 = 342E0026</action>
        </script>
    </cheat>

    <cheat desc="free price">
        <script state="on">
            <!-- engine, shot, bomb -->
            <action>maincpu.oq@04680 = 4EB90002E7E02649</action>
            <action>maincpu.oq@2E7E0 = 5048429924494299</action>
            <action>maincpu.oq@2E7E8 = 4E75FFFFFFFFFFFF</action>
            <!--
            2E7E0 | 5048 : addq.w  #8, A0
            2E7E2 | 4299 : clr.l   (A1)+
            2E7E4 | 2449 : movea.l A1, A2
            2E7E6 | 4299 : clr.l   (A1)+
            2E7E8 | 4E75 : rts
            -->
            <!-- extra ship -->
            <action>maincpu.ow@46BC = 42A2</action> <!-- clr.l -(A2) -->
            <action>maincpu.ow@4F9A = 4290</action> <!-- clr.l (A0) -->
        </script>
        <script state="off">
            <action>maincpu.oq@04680 = 22D8244922D82649</action>
            <action>maincpu.oq@2E7E0 = 6FB737F76FB737F7</action>
            <action>maincpu.oq@2E7E8 = 8FBF53BF8FBF53BF</action>
            <action>maincpu.ow@046BC = 2500            </action>
            <action>maincpu.ow@04F9A = 2080            </action>
        </script>
    </cheat>

    <cheat desc="drop max coin">
        <script state="on">
            <action>maincpu.od@33E8 = 303C0008</action> <!-- base -->
            <action>maincpu.od@B3F0 = 303C0008</action> <!-- boss -->
            <action>maincpu.od@B40E = 1D7C0008</action> <!-- enemy -->
        </script>
        <script state="off">
            <action>maincpu.od@33E8 = 64027000</action>
            <action>maincpu.od@B3F0 = D0301000</action>
            <action>maincpu.od@B40E = 1D700000</action>
        </script>
    </cheat>

    <cheat desc="short hit mark - bomb">
        <script state="on">
            <!-- objects -->
            <action>maincpu.ob@8CFF = 01</action>
            <action>maincpu.ob@8D05 = 01</action>
            <!-- ground -->
            <action>maincpu.ob@8D2B = 01</action>
            <action>maincpu.ob@8D31 = 01</action>
        </script>
        <script state="off">
            <action>maincpu.ob@8CFF = 02</action>
            <action>maincpu.ob@8D05 = 05</action>
            <action>maincpu.ob@8D2B = 02</action>
            <action>maincpu.ob@8D31 = 05</action>
        </script>
    </cheat>

    <cheat desc="sound test mode">
        <comment>reset the game (F3) to enter sound test mode</comment>
        <script state="on">
            <action>maincpu.oq@01F90 = 4EF90002E7F06100</action>
            <action>maincpu.oq@2E7F0 = 41F8C00043F900C4</action>
            <action>maincpu.oq@2E7F8 = 0001120010291002</action>
            <action>maincpu.oq@2E800 = B20067F60C00007F</action>
            <action>maincpu.oq@2E808 = 660253100C0000BF</action>
            <action>maincpu.oq@2E810 = 660252100C0000EF</action>
            <action>maincpu.oq@2E818 = 6604041000100C00</action>
            <action>maincpu.oq@2E820 = 00DF660406100010</action>
            <action>maincpu.oq@2E828 = 0C0000FD66021290</action>
            <action>maincpu.oq@2E830 = 0C0000FB66024211</action>
            <action>maincpu.oq@2E838 = 60C0FFFFFFFFFFFF</action>
            <!--
            2E7F0 | 41F8 C000      : lea     $c000.w, A0    // sound code address ($ffc000)
            2E7F4 | 43F9 00C4 0001 : lea     $c40001.l, A1  // sound latch address
            2E7FA | 1200           : move.b  D0, D1
            2E7FC | 1029 1002      : move.b  ($1002,A1), D0 // read input ($c41003)
            2E800 | B200           : cmp.b   D0, D1
            2E802 | 67F6           : beq     $2e7fa
            2E804 | 0C00 007F      : cmpi.b  #$7f, D0
            2E808 | 6602           : bne     $2e80c
            2E80A | 5310           : subq.b  #1, (A0)       // decrease code -01
            2E80C | 0C00 00BF      : cmpi.b  #-$41, D0
            2E810 | 6602           : bne     $2e814
            2E812 | 5210           : addq.b  #1, (A0)       // increase code +01
            2E814 | 0C00 00EF      : cmpi.b  #-$11, D0
            2E818 | 6604           : bne     $2e81e
            2E81A | 0410 0010      : subi.b  #$10, (A0)     // decrease code -10
            2E81E | 0C00 00DF      : cmpi.b  #-$21, D0
            2E822 | 6604           : bne     $2e828
            2E824 | 0610 0010      : addi.b  #$10, (A0)     // increase code +10
            2E828 | 0C00 00FD      : cmpi.b  #-$3, D0
            2E82C | 6602           : bne     $2e830
            2E82E | 1290           : move.b  (A0), (A1)     // play sound
            2E830 | 0C00 00FB      : cmpi.b  #-$5, D0
            2E834 | 6602           : bne     $2e838
            2E836 | 4211           : clr.b   (A1)           // stop sound
            2E838 | 60C0           : bra     $2e7fa
            -->
        </script>
        <script state="run">
            <output format="----- fantasy zone sound test mode -----" line="10" align="center" />
            <output format="left : decrease code -01"                 line="11" align="center" />
            <output format="right : increase code +01"                line="12" align="center" />
            <output format="down : decrease code -10"                 line="13" align="center" />
            <output format="up : increase code +10"                   line="14" align="center" />
            <output format="button 1 : play sound"                    line="15" align="center" />
            <output format="button 2 : stop sound"                    line="16" align="center" />
            <output format="----------------------------"             line="17" align="center" />
            <output format="&lt;&lt; sound code %2.2X &gt;&gt;"       line="19" align="center"  >
                <argument>maincpu.pb@FFC000</argument>
            </output>
        </script>
        <script state="off">
            <action>maincpu.oq@01F90 = 08B80002C23B6100</action>
            <action>maincpu.oq@2E7F0 = 6FB737F76FB737F7</action>
            <action>maincpu.oq@2E7F8 = 8FBF53BF8FBF53BF</action>
            <action>maincpu.oq@2E800 = 7BFF3FFF7BFF3FFF</action>
            <action>maincpu.oq@2E808 = 07B737B707B737B7</action>
            <action>maincpu.oq@2E810 = 7BFF3FFF7BFF3FFF</action>
            <action>maincpu.oq@2E818 = 07B737B707B737B7</action>
            <action>maincpu.oq@2E820 = 67B73BF767B73BF7</action>
            <action>maincpu.oq@2E828 = 9BB7C3B79BB7C3B7</action>
            <action>maincpu.oq@2E830 = 67B73BF767B73BF7</action>
            <action>maincpu.oq@2E838 = 9BB7C3B79BB7C3B7</action>
        </script>
    </cheat>

</mamecheat>
fantzonepr.xml

Code: Select all

<!-- Fantasy Zone (prototype) -->
<mamecheat version="1">

    <cheat desc="no hit">
        <script state="on">
            <action>maincpu.mw@6C7E = 4E71</action> <!-- bullet -->
            <action>maincpu.mw@9834 = 4E75</action> <!-- enemy -->
        </script>
        <script state="off">
            <action>maincpu.mw@6C7E = 6622</action>
            <action>maincpu.mw@9834 = 2078</action>
        </script>
    </cheat>

    <cheat desc="auto fire">
        <script state="on">
            <action>maincpu.mb@530B = 01</action> <!-- shot -->
            <action>maincpu.mb@532B = 01</action> <!-- bomb -->
        </script>
        <script state="off">
            <action>maincpu.mb@530B = 0F</action>
            <action>maincpu.mb@532B = 0F</action>
        </script>
    </cheat>

    <cheat desc="player speed">
        <parameter>
            <item value="0x0080">01 (slow)</item>
            <item value="0x0180">02       </item>
            <item value="0x0380">03       </item>
            <item value="0x0580">04       </item>
            <item value="0x0780">05 (fast)</item>
        </parameter>
        <script state="on">
            <action>maincpu.mw@514A = 323C</action> <!-- x position -->
            <action>maincpu.mw@5380 = 323C</action> <!-- x position (boss) -->
            <action>maincpu.mw@5438 = 323C</action> <!-- x position (boss) -->
            <action>maincpu.mw@5706 = 323C</action> <!-- x position (final boss) -->
            <action>maincpu.mw@57AC = 323C</action> <!-- x position (round finish) -->
            <action>maincpu.mw@58BC = 343C</action> <!-- y position -->
            <action>maincpu.mw@58FC = 343C</action> <!-- y position (final boss) -->
        </script>
        <script state="change">
            <action>maincpu.mw@514C = param</action>
            <action>maincpu.mw@5382 = param</action>
            <action>maincpu.mw@543A = param</action>
            <action>maincpu.mw@5708 = param</action>
            <action>maincpu.mw@57AE = param</action>
            <action>maincpu.mw@58BE = param</action>
            <action>maincpu.mw@58FE = param</action>
        </script>
        <script state="off">
            <action>maincpu.md@514A = 322E0024</action>
            <action>maincpu.md@5380 = 322E0024</action>
            <action>maincpu.md@5438 = 322E0024</action>
            <action>maincpu.md@5706 = 322E0024</action>
            <action>maincpu.md@57AC = 322E0024</action>
            <action>maincpu.md@58BC = 342E0026</action>
            <action>maincpu.md@58FC = 342E0026</action>
        </script>
    </cheat>

    <cheat desc="free price">
        <script state="on">
            <action>maincpu.mq@035B0 = 4EB90002E7E04E71</action>
            <action>maincpu.mq@2E7E0 = 32D85848429951C8</action>
            <action>maincpu.mq@2E7E8 = FFF84E75FFFFFFFF</action>
            <!--
            2E7E0 | 32D8      : move.w  (A0)+, (A1)+
            2E7E2 | 5848      : addq.w  #4, A0
            2E7E4 | 4299      : clr.l   (A1)+
            2E7E6 | 51C8 FFF8 : dbra    D0, $2e7e0
            2E7EA | 4E75      : rts
            -->
        </script>
        <script state="off">
            <action>maincpu.mq@035B0 = 32D822D851C8FFFA</action>
            <action>maincpu.mq@2E7E0 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@2E7E8 = FFFFFFFFFFFFFFFF</action>
        </script>
    </cheat>

    <cheat desc="drop max coin">
        <script state="on">
            <action>maincpu.md@2604 = 303C0008</action> <!-- base -->
            <action>maincpu.md@9BBA = 303C0008</action> <!-- boss -->
            <action>maincpu.md@9BD8 = 1D7C0008</action> <!-- enemy -->
        </script>
        <script state="off">
            <action>maincpu.md@2604 = 64027000</action>
            <action>maincpu.md@9BBA = D0301000</action>
            <action>maincpu.md@9BD8 = 1D700000</action>
        </script>
    </cheat>

    <cheat desc="short hit mark - bomb">
        <script state="on">
            <!-- objects -->
            <action>maincpu.mb@73DD = 01</action>
            <action>maincpu.mb@73E3 = 01</action>
            <!-- ground -->
            <action>maincpu.mb@7409 = 01</action>
            <action>maincpu.mb@740F = 01</action>
        </script>
        <script state="off">
            <action>maincpu.mb@73DD = 02</action>
            <action>maincpu.mb@73E3 = 05</action>
            <action>maincpu.mb@7409 = 02</action>
            <action>maincpu.mb@740F = 05</action>
        </script>
    </cheat>

    <cheat desc="sound test mode">
        <comment>reset the game (F3) to enter sound test mode</comment>
        <script state="on">
            <action>maincpu.mq@01CDA = 4EF90002E7F06100</action>
            <action>maincpu.mq@2E7F0 = 41F8C00043F900C4</action>
            <action>maincpu.mq@2E7F8 = 0001120010291002</action>
            <action>maincpu.mq@2E800 = B20067F60C00007F</action>
            <action>maincpu.mq@2E808 = 660253100C0000BF</action>
            <action>maincpu.mq@2E810 = 660252100C0000EF</action>
            <action>maincpu.mq@2E818 = 6604041000100C00</action>
            <action>maincpu.mq@2E820 = 00DF660406100010</action>
            <action>maincpu.mq@2E828 = 0C0000FD66021290</action>
            <action>maincpu.mq@2E830 = 0C0000FB66024211</action>
            <action>maincpu.mq@2E838 = 60C0FFFFFFFFFFFF</action>
            <!--
            2E7F0 | 41F8 C000      : lea     $c000.w, A0    // sound code address ($ffc000)
            2E7F4 | 43F9 00C4 0001 : lea     $c40001.l, A1  // sound latch address
            2E7FA | 1200           : move.b  D0, D1
            2E7FC | 1029 1002      : move.b  ($1002,A1), D0 // read input ($c41003)
            2E800 | B200           : cmp.b   D0, D1
            2E802 | 67F6           : beq     $2e7fa
            2E804 | 0C00 007F      : cmpi.b  #$7f, D0
            2E808 | 6602           : bne     $2e80c
            2E80A | 5310           : subq.b  #1, (A0)       // decrease code -01
            2E80C | 0C00 00BF      : cmpi.b  #-$41, D0
            2E810 | 6602           : bne     $2e814
            2E812 | 5210           : addq.b  #1, (A0)       // increase code +01
            2E814 | 0C00 00EF      : cmpi.b  #-$11, D0
            2E818 | 6604           : bne     $2e81e
            2E81A | 0410 0010      : subi.b  #$10, (A0)     // decrease code -10
            2E81E | 0C00 00DF      : cmpi.b  #-$21, D0
            2E822 | 6604           : bne     $2e828
            2E824 | 0610 0010      : addi.b  #$10, (A0)     // increase code +10
            2E828 | 0C00 00FD      : cmpi.b  #-$3, D0
            2E82C | 6602           : bne     $2e830
            2E82E | 1290           : move.b  (A0), (A1)     // play sound
            2E830 | 0C00 00FB      : cmpi.b  #-$5, D0
            2E834 | 6602           : bne     $2e838
            2E836 | 4211           : clr.b   (A1)           // stop sound
            2E838 | 60C0           : bra     $2e7fa
            -->
        </script>
        <script state="run">
            <output format="----- fantasy zone sound test mode -----" line="10" align="center" />
            <output format="left : decrease code -01"                 line="11" align="center" />
            <output format="right : increase code +01"                line="12" align="center" />
            <output format="down : decrease code -10"                 line="13" align="center" />
            <output format="up : increase code +10"                   line="14" align="center" />
            <output format="button 1 : play sound"                    line="15" align="center" />
            <output format="button 2 : stop sound"                    line="16" align="center" />
            <output format="----------------------------"             line="17" align="center" />
            <output format="&lt;&lt; sound code %2.2X &gt;&gt;"       line="19" align="center"  >
                <argument>maincpu.pb@FFC000</argument>
            </output>
        </script>
        <script state="off">
            <action>maincpu.mq@01CDA = 08B80002C23B6100</action>
            <action>maincpu.mq@2E7F0 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@2E7F8 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@2E800 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@2E808 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@2E810 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@2E818 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@2E820 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@2E828 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@2E830 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@2E838 = FFFFFFFFFFFFFFFF</action>
        </script>
    </cheat>

</mamecheat>
fantzoneta.xml

Code: Select all

<!-- Fantasy Zone (Time Attack, bootleg) -->
<mamecheat version="1">

    <cheat desc="no hit">
        <script state="on">
            <action>maincpu.mw@87D8 = 4E71</action> <!-- bullet -->
            <action>maincpu.mw@B23C = 4E75</action> <!-- enemy -->
        </script>
        <script state="off">
            <action>maincpu.mw@87D8 = 6622</action>
            <action>maincpu.mw@B23C = 2078</action>
        </script>
    </cheat>

    <cheat desc="auto fire">
        <script state="on">
            <action>maincpu.mb@6A69 = 01</action> <!-- shot -->
            <action>maincpu.mb@6A89 = 01</action> <!-- bomb -->
        </script>
        <script state="off">
            <action>maincpu.mb@6A69 = 0F</action>
            <action>maincpu.mb@6A89 = 0F</action>
        </script>
    </cheat>

    <cheat desc="player speed">
        <parameter>
            <item value="0x0080">01 (slow)</item>
            <item value="0x0180">02       </item>
            <item value="0x0380">03       </item>
            <item value="0x0580">04       </item>
            <item value="0x0780">05 (fast)</item>
        </parameter>
        <script state="on">
            <action>maincpu.mw@68BE = 323C</action> <!-- x position -->
            <action>maincpu.mw@6AF8 = 323C</action> <!-- x position (boss) -->
            <action>maincpu.mw@6BB2 = 323C</action> <!-- x position (boss) -->
            <action>maincpu.mw@6EDC = 323C</action> <!-- x position (final boss) -->
            <action>maincpu.mw@6F7E = 323C</action> <!-- x position (round finish) -->
            <action>maincpu.mw@7318 = 343C</action> <!-- y position -->
            <action>maincpu.mw@7358 = 343C</action> <!-- y position (final boss) -->
        </script>
        <script state="change">
            <action>maincpu.mw@68C0 = param</action>
            <action>maincpu.mw@6AFA = param</action>
            <action>maincpu.mw@6BB4 = param</action>
            <action>maincpu.mw@6EDE = param</action>
            <action>maincpu.mw@6F80 = param</action>
            <action>maincpu.mw@731A = param</action>
            <action>maincpu.mw@735A = param</action>
        </script>
        <script state="off">
            <action>maincpu.md@68C0 = 322E0024</action>
            <action>maincpu.md@6AFA = 322E0024</action>
            <action>maincpu.md@6BB4 = 322E0024</action>
            <action>maincpu.md@6EDE = 322E0024</action>
            <action>maincpu.md@6F80 = 322E0024</action>
            <action>maincpu.md@731A = 342E0026</action>
            <action>maincpu.md@735A = 342E0026</action>
        </script>
    </cheat>

    <cheat desc="free price">
        <script state="on">
            <!-- engine, shot, bomb -->
            <action>maincpu.mq@0484C = 4EB90002E7E02649</action>
            <action>maincpu.mq@2E7E0 = 5048429924494299</action>
            <action>maincpu.mq@2E7E8 = 4E75FFFFFFFFFFFF</action>
            <!--
            2E7E0 | 5048 : addq.w  #8, A0
            2E7E2 | 4299 : clr.l   (A1)+
            2E7E4 | 2449 : movea.l A1, A2
            2E7E6 | 4299 : clr.l   (A1)+
            2E7E8 | 4E75 : rts
            -->
            <!-- extra ship -->
            <action>maincpu.mw@4888 = 42A2</action> <!-- clr.l -(A2) -->
            <action>maincpu.mw@51A6 = 4290</action> <!-- clr.l (A0) -->
        </script>
        <script state="off">
            <action>maincpu.mq@0484C = 22D8244922D82649</action>
            <action>maincpu.mq@2E7E0 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@2E7E8 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mw@04888 = 2500            </action>
            <action>maincpu.mw@051A6 = 2080            </action>
        </script>
    </cheat>

    <cheat desc="drop max coin">
        <script state="on">
            <action>maincpu.md@352A = 303C0008</action> <!-- base -->
            <action>maincpu.md@B5E8 = 303C0008</action> <!-- boss -->
            <action>maincpu.md@B60A = 1D7C0008</action> <!-- enemy -->
        </script>
        <script state="off">
            <action>maincpu.md@352A = 64027000</action>
            <action>maincpu.md@B5E8 = D0301000</action>
            <action>maincpu.md@B60A = 1D700000</action>
        </script>
    </cheat>

    <cheat desc="short hit mark - bomb">
        <script state="on">
            <!-- objects -->
            <action>maincpu.mb@8EED = 01</action>
            <action>maincpu.mb@8EF3 = 01</action>
            <!-- ground -->
            <action>maincpu.mb@8F19 = 01</action>
            <action>maincpu.mb@8F1F = 01</action>
        </script>
        <script state="off">
            <action>maincpu.mb@8EED = 02</action>
            <action>maincpu.mb@8EF3 = 05</action>
            <action>maincpu.mb@8F19 = 02</action>
            <action>maincpu.mb@8F1F = 05</action>
        </script>
    </cheat>

    <cheat desc="sound test mode">
        <comment>reset the game (F3) to enter sound test mode</comment>
        <script state="on">
            <action>maincpu.mq@01FBE = 4EF90002E7F06100</action>
            <action>maincpu.mq@2E7F0 = 41F8C00043F900FE</action>
            <action>maincpu.mq@2E7F8 = 00071200103900C4</action>
            <action>maincpu.mq@2E800 = 1003B20067F40C00</action>
            <action>maincpu.mq@2E808 = 007F660253100C00</action>
            <action>maincpu.mq@2E810 = 00BF660252100C00</action>
            <action>maincpu.mq@2E818 = 00EF660404100010</action>
            <action>maincpu.mq@2E820 = 0C0000DF66040610</action>
            <action>maincpu.mq@2E828 = 00100C0000FD6602</action>
            <action>maincpu.mq@2E830 = 12900C0000FB6602</action>
            <action>maincpu.mq@2E838 = 421160BEFFFFFFFF</action>
            <!--
            2E7F0 | 41F8 C000      : lea     $c000.w, A0   // sound code address ($ffc000)
            2E7F4 | 43F9 00FE 0007 : lea     $fe0007.l, A1 // sound latch address
            2E7FA | 1200           : move.b  D0, D1
            2E7FC | 1039 00C4 1003 : move.b  $c41003.l, D0 // read input
            2E802 | B200           : cmp.b   D0, D1
            2E804 | 67F4           : beq     $2e7fa
            2E806 | 0C00 007F      : cmpi.b  #$7f, D0
            2E80A | 6602           : bne     $2e80e
            2E80C | 5310           : subq.b  #1, (A0)      // decrease code -01
            2E80E | 0C00 00BF      : cmpi.b  #-$41, D0
            2E812 | 6602           : bne     $2e816
            2E814 | 5210           : addq.b  #1, (A0)      // increase code +01
            2E816 | 0C00 00EF      : cmpi.b  #-$11, D0
            2E81A | 6604           : bne     $2e820
            2E81C | 0410 0010      : subi.b  #$10, (A0)    // decrease code -10
            2E820 | 0C00 00DF      : cmpi.b  #-$21, D0
            2E824 | 6604           : bne     $2e82a
            2E826 | 0610 0010      : addi.b  #$10, (A0)    // increase code +10
            2E82A | 0C00 00FD      : cmpi.b  #-$3, D0
            2E82E | 6602           : bne     $2e832
            2E830 | 1290           : move.b  (A0), (A1)    // play sound
            2E832 | 0C00 00FB      : cmpi.b  #-$5, D0
            2E836 | 6602           : bne     $2e83a
            2E838 | 4211           : clr.b   (A1)          // stop sound
            2E83A | 60BE           : bra     $2e7fa
            -->
        </script>
        <script state="run">
            <output format="----- fantasy zone sound test mode -----" line="10" align="center" />
            <output format="left : decrease code -01"                 line="11" align="center" />
            <output format="right : increase code +01"                line="12" align="center" />
            <output format="down : decrease code -10"                 line="13" align="center" />
            <output format="up : increase code +10"                   line="14" align="center" />
            <output format="button 1 : play sound"                    line="15" align="center" />
            <output format="button 2 : stop sound"                    line="16" align="center" />
            <output format="----------------------------"             line="17" align="center" />
            <output format="&lt;&lt; sound code %2.2X &gt;&gt;"       line="19" align="center"  >
                <argument>maincpu.pb@FFC000</argument>
            </output>
        </script>
        <script state="off">
            <action>maincpu.mq@01FBE = 08B80002C23B6100</action>
            <action>maincpu.mq@2E7F0 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@2E7F8 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@2E800 = FF00FF00FF0FFF00</action>
            <action>maincpu.mq@2E808 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@2E810 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@2E818 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@2E820 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@2E828 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@2E830 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@2E838 = FFFFFFFFFFFFFFFF</action>
        </script>
    </cheat>

</mamecheat>
Post Reply