[pitfall2] Pitfall II

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

[pitfall2] Pitfall II

Post by jman »

Code: Select all

<!-- Pitfall II (315-5093) -->
<mamecheat version="1">

    <cheat desc="no hit (test)">
        <!-- you are caught in stone gate though no pressed -->
        <script state="on">
            <action>maincpu.mw@1694 = 1696</action> <!-- objects -->
            <action>maincpu.mw@3c6a = 3c6c</action> <!-- stone gate -->
            <action>maincpu.mw@3d04 = 3d06</action> <!-- lava, pool (walk) -->
            <action>maincpu.mw@3e8e = 3e90</action> <!-- lava, pool (fall down) -->
            <action>maincpu.mw@43ee = 4448</action> <!-- trolley stopper -->
        </script>
        <script state="off">
            <action>maincpu.mw@1694 = 3de6</action>
            <action>maincpu.mw@3c6a = 3de6</action>
            <action>maincpu.mw@3d04 = 3de2</action>
            <action>maincpu.mw@3e8e = 3de2</action>
            <action>maincpu.mw@43ee = 3de6</action>
        </script>
    </cheat>

    <cheat desc="multiple jump">
        <script state="on">
            <action>maincpu.ob@3c9c =               cd</action>
            <action>maincpu.mw@3c9d =             b8c0</action>
            <action>maincpu.mq@b8c0 = 13cbdd0c2845accd</action>
            <action>maincpu.mq@b8c8 = 0e36fdbe13cbddae</action>
            <action>maincpu.mq@b8d0 = ffffffc9137edd10</action>
            <!--
            b8c0 | cd ac 45    : call $45AC
            b8c3 | 28 0c       : jr   z,$B8D1
            b8c5 | dd cb 13 ae : res  5,(ix+$13)
            b8c9 | dd cb 13 be : res  7,(ix+$13)
            b8cd | fd 36 0e 10 : ld   (iy+$0e),$10
            b8d1 | dd 7e 13    : ld   a,(ix+$13)
            b8d4 | c9          : ret
            -->
        </script>
        <script state="off">
            <action>maincpu.ob@3c9c =               dd</action>
            <action>maincpu.mw@3c9d =             13d6</action>
            <action>maincpu.mq@b8c0 = ffffffffffffffff</action>
            <action>maincpu.mq@b8c8 = ffffffffffffffff</action>
            <action>maincpu.mq@b8d0 = ffffffffffffffff</action>
        </script>
    </cheat>

    <cheat desc="timer speed">
        <parameter>
            <item value="0xff">01 (slow)</item>
            <item value="0x80">02       </item>
            <item value="0x40">03       </item>
            <item value="0x20">04       </item>
            <item value="0x01">05 (fast)</item>
        </parameter>
        <script state="change">
            <action>maincpu.mb@060c = param</action>
            <action>maincpu.mb@1249 = param</action> <!-- initialize -->
        </script>
        <script state="off">
            <action>maincpu.mb@060c = 3e</action>
            <action>maincpu.mb@1249 = 3e</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@0059 =             b8e0</action>
            <action>maincpu.mq@b8e0 = 2847b800dbc40021</action>
            <action>maincpu.mq@b8e8 = bffe3501207ffefa</action>
            <action>maincpu.mq@b8f0 = 3e0420effe340120</action>
            <action>maincpu.mq@b8f8 = 3e0520dffe0618f0</action>
            <action>maincpu.mq@b900 = 0520fbfe78778610</action>
            <action>maincpu.mq@b908 = 20fdfe051880f67e</action>
            <action>maincpu.mq@b910 = ffffcd1818d3af03</action>
            <!--
            b8e0 | 21 00 c4 : ld  hl,$C400 // sound code address
            b8e3 | db 00    : in  a,($00)  // read input
            b8e5 | b8       : cp  b
            b8e6 | 47       : ld  b,a
            b8e7 | 28 fa    : jr  z,$B8E3
            b8e9 | fe 7f    : cp  $7F
            b8eb | 20 01    : jr  nz,$B8EE
            b8ed | 35       : dec (hl)     // decrease code -01
            b8ee | fe bf    : cp  $BF
            b8f0 | 20 01    : jr  nz,$B8F3
            b8f2 | 34       : inc (hl)     // increase code +01
            b8f3 | fe ef    : cp  $EF
            b8f5 | 20 04    : jr  nz,$B8FB
            b8f7 | 3e f0    : ld  a,$F0    // decrease code -10
            b8f9 | 18 06    : jr  $B901
            b8fb | fe df    : cp  $DF
            b8fd | 20 05    : jr  nz,$B904
            b8ff | 3e 10    : ld  a,$10    // increase code +10
            b901 | 86       : add a,(hl)
            b902 | 77       : ld  (hl),a
            b903 | 78       : ld  a,b
            b904 | fe fb    : cp  $FB
            b906 | 20 05    : jr  nz,$B90D
            b908 | 7e       : ld  a,(hl)   // play sound
            b909 | f6 80    : or  $80
            b90b | 18 05    : jr  $B912
            b90d | fe fd    : cp  $FD
            b90f | 20 03    : jr  nz,$B914
            b911 | af       : xor a        // stop sound
            b912 | d3 18    : out ($18),a  // send sound code
            b914 | 18 cd    : jr  $B8E3
            -->
        </script>
        <script state="run">
            <output format="----- pitfall II 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@c400</argument>
            </output>
        </script>
        <script state="off">
            <action>maincpu.mw@0059 =             4be9</action>
            <action>maincpu.mq@b8e0 = ffffffffffffffff</action>
            <action>maincpu.mq@b8e8 = ffffffffffffffff</action>
            <action>maincpu.mq@b8f0 = ffffffffffffffff</action>
            <action>maincpu.mq@b8f8 = ffffffffffffffff</action>
            <action>maincpu.mq@b900 = ffffffffffffffff</action>
            <action>maincpu.mq@b908 = ffffffffffffffff</action>
            <action>maincpu.mq@b910 = ffffffffffffffff</action>
        </script>
    </cheat>

</mamecheat>
"no hit" : you are caught in stone gate though no pressed.
jman
Posts: 887
Joined: Tue Dec 01, 2020 1:24 pm
Been thanked: 4 times

[pitfall2]+ Pitfall II

Post by jman »

pitfall2.xml

Code: Select all

<!-- Pitfall II (315-5093) -->
<mamecheat version="1">

    <cheat desc="no hit (test)">
        <!-- you are caught in stone gate though no pressed -->
        <script state="on">
            <action>maincpu.mw@1694 = 1696</action> <!-- objects -->
            <action>maincpu.mw@3C6A = 3C6C</action> <!-- stone gate -->
            <action>maincpu.mw@3D04 = 3D06</action> <!-- lava, pool (walk) -->
            <action>maincpu.mw@3E8E = 3E90</action> <!-- lava, pool (fall down) -->
            <action>maincpu.mw@43EE = 4448</action> <!-- trolley stopper -->
        </script>
        <script state="off">
            <action>maincpu.mw@1694 = 3DE6</action>
            <action>maincpu.mw@3C6A = 3DE6</action>
            <action>maincpu.mw@3D04 = 3DE2</action>
            <action>maincpu.mw@3E8E = 3DE2</action>
            <action>maincpu.mw@43EE = 3DE6</action>
        </script>
    </cheat>

    <cheat desc="multiple jump">
        <script state="on">
            <action>maincpu.ob@3C9C = CD              </action>
            <action>maincpu.mw@3C9D = B8C0            </action>
            <action>maincpu.mq@B8C0 = 13CBDD0C2845ACCD</action>
            <action>maincpu.mq@B8C8 = 0E36FDBE13CBDDAE</action>
            <action>maincpu.mq@B8D0 = FFFFFFC9137EDD10</action>
            <!--
            B8C0 | CD AC 45    : call $45AC
            B8C3 | 28 0C       : jr   z,$B8D1
            B8C5 | DD CB 13 AE : res  5,(ix+$13)
            B8C9 | DD CB 13 BE : res  7,(ix+$13)
            B8CD | FD 36 0E 10 : ld   (iy+$0e),$10
            B8D1 | DD 7E 13    : ld   a,(ix+$13)
            B8D4 | C9          : ret
            -->
        </script>
        <script state="off">
            <action>maincpu.ob@3C9C = DD              </action>
            <action>maincpu.mw@3C9D = 13D6            </action>
            <action>maincpu.mq@B8C0 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@B8C8 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@B8D0 = FFFFFFFFFFFFFFFF</action>
        </script>
    </cheat>

    <cheat desc="timer speed">
        <parameter>
            <item value="0xff">01 (slow)</item>
            <item value="0x80">02       </item>
            <item value="0x40">03       </item>
            <item value="0x20">04       </item>
            <item value="0x01">05 (fast)</item>
        </parameter>
        <script state="change">
            <action>maincpu.mb@060C = param</action>
            <action>maincpu.mb@1249 = param</action> <!-- initialize -->
        </script>
        <script state="off">
            <action>maincpu.mb@060C = 3E</action>
            <action>maincpu.mb@1249 = 3E</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@0059 = B8E0            </action>
            <action>maincpu.mq@B8E0 = 2847B800DBC00021</action>
            <action>maincpu.mq@B8E8 = BFFE3501207FFEFA</action>
            <action>maincpu.mq@B8F0 = 3E0420EFFE340120</action>
            <action>maincpu.mq@B8F8 = 3E0520DFFE0618F0</action>
            <action>maincpu.mq@B900 = 0520FBFE78778610</action>
            <action>maincpu.mq@B908 = 20FDFE051880F67E</action>
            <action>maincpu.mq@B910 = FFFFCD1818D3AF03</action>
            <!--
            B8E0 | 21 00 C0 : ld   hl,$C000 // sound code address
            B8E3 | DB 00    : in   a,($00)  // read input
            B8E5 | B8       : cp   b
            B8E6 | 47       : ld   b,a
            B8E7 | 28 FA    : jr   z,$B8E3
            B8E9 | FE 7F    : cp   $7F
            B8EB | 20 01    : jr   nz,$B8EE
            B8ED | 35       : dec  (hl)     // decrease code -01
            B8EE | FE BF    : cp   $BF
            B8F0 | 20 01    : jr   nz,$B8F3
            B8F2 | 34       : inc  (hl)     // increase code +01
            B8F3 | FE EF    : cp   $EF
            B8F5 | 20 04    : jr   nz,$B8FB
            B8F7 | 3E F0    : ld   a,$F0    // decrease code -10
            B8F9 | 18 06    : jr   $B901
            B8FB | FE DF    : cp   $DF
            B8FD | 20 05    : jr   nz,$B904
            B8FF | 3E 10    : ld   a,$10    // increase code +10
            B901 | 86       : add  a,(hl)
            B902 | 77       : ld   (hl),a
            B903 | 78       : ld   a,b
            B904 | FE FB    : cp   $FB
            B906 | 20 05    : jr   nz,$B90D
            B908 | 7E       : ld   a,(hl)   // play sound
            B909 | F6 80    : or   $80
            B90B | 18 05    : jr   $B912
            B90D | FE FD    : cp   $FD
            B90F | 20 03    : jr   nz,$B914
            B911 | AF       : xor  a        // stop sound
            B912 | D3 18    : out  ($18),a  // send sound code
            B914 | 18 CD    : jr   $B8E3
            -->
        </script>
        <script state="run">
            <output format="----- pitfall II sound test mode -----" line="10" align="center" />
            <output format="left : decrease code -01"               line="11" align="center" />
            <output format="right : increase code +01"              line="12" align="center" />
            <output format="down : decrease code -10"               line="13" align="center" />
            <output format="up : increase code +10"                 line="14" align="center" />
            <output format="button 1 : play sound"                  line="15" align="center" />
            <output format="button 2 : stop sound"                  line="16" align="center" />
            <output format="----------------------------"           line="17" align="center" />
            <output format="&lt;&lt; sound code %02X &gt;&gt;"      line="19" align="center"  >
                <argument>maincpu.pb@C000</argument>
            </output>
        </script>
        <script state="off">
            <action>maincpu.mw@0059 = 4BE9            </action>
            <action>maincpu.mq@B8E0 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@B8E8 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@B8F0 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@B8F8 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@B900 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@B908 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@B910 = FFFFFFFFFFFFFFFF</action>
        </script>
    </cheat>

</mamecheat>
pitfall2a.xml

Code: Select all

<!-- Pitfall II (315-5093, Flicky Conversion) -->
<mamecheat version="1">

    <cheat desc="no hit (test)">
        <!-- you are caught in stone gate though no pressed -->
        <script state="on">
            <action>maincpu.mw@3227 = 3229</action> <!-- stone gate -->
            <action>maincpu.mw@32C1 = 32C3</action> <!-- lava, pool (walk) -->
            <action>maincpu.mw@344B = 344D</action> <!-- lava, pool (fall down) -->
            <action>maincpu.mw@39AB = 3A05</action> <!-- trolley stopper -->
            <action>maincpu.mw@4E4D = 4E4F</action> <!-- objects -->
        </script>
        <script state="off">
            <action>maincpu.mw@3227 = 33A3</action>
            <action>maincpu.mw@32C1 = 339F</action>
            <action>maincpu.mw@344B = 339F</action>
            <action>maincpu.mw@39AB = 33A3</action>
            <action>maincpu.mw@4E4D = 33A3</action>
        </script>
    </cheat>

    <cheat desc="multiple jump">
        <script state="on">
            <action>maincpu.ob@3259 = CD              </action>
            <action>maincpu.mw@325A = B8C0            </action>
            <action>maincpu.mq@B8C0 = 13CBDD0C283B69CD</action>
            <action>maincpu.mq@B8C8 = 0E36FDBE13CBDDAE</action>
            <action>maincpu.mq@B8D0 = FFFFFFC9137EDD10</action>
            <!--
            B8C0 | CD 69 3B    : call $3B69
            B8C3 | 28 0C       : jr   z,$B8D1
            B8C5 | DD CB 13 AE : res  5,(ix+$13)
            B8C9 | DD CB 13 BE : res  7,(ix+$13)
            B8CD | FD 36 0E 10 : ld   (iy+$0e),$10
            B8D1 | DD 7E 13    : ld   a,(ix+$13)
            B8D4 | C9          : ret
            -->
        </script>
        <script state="off">
            <action>maincpu.ob@3259 = DD              </action>
            <action>maincpu.mw@325A = 13DE            </action>
            <action>maincpu.mq@B8C0 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@B8C8 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@B8D0 = FFFFFFFFFFFFFFFF</action>
        </script>
    </cheat>

    <cheat desc="timer speed">
        <parameter>
            <item value="0xff">01 (slow)</item>
            <item value="0x80">02       </item>
            <item value="0x40">03       </item>
            <item value="0x20">04       </item>
            <item value="0x01">05 (fast)</item>
        </parameter>
        <script state="change">
            <action>maincpu.mb@045E = param</action> <!-- initialize -->
            <action>maincpu.mb@1F3A = param</action>
        </script>
        <script state="off">
            <action>maincpu.mb@045E = 3E</action>
            <action>maincpu.mb@1F3A = 3E</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@195F = B8E0            </action>
            <action>maincpu.mq@B8E0 = 2847B800DBC00021</action>
            <action>maincpu.mq@B8E8 = BFFE3501207FFEFA</action>
            <action>maincpu.mq@B8F0 = 3E0420EFFE340120</action>
            <action>maincpu.mq@B8F8 = 3E0520DFFE0618F0</action>
            <action>maincpu.mq@B900 = 0520FBFE78778610</action>
            <action>maincpu.mq@B908 = 20FDFE051880F67E</action>
            <action>maincpu.mq@B910 = FFFFCD1818D3AF03</action>
            <!--
            B8E0 | 21 00 C0 : ld   hl,$C000 // sound code address
            B8E3 | DB 00    : in   a,($00)  // read input
            B8E5 | B8       : cp   b
            B8E6 | 47       : ld   b,a
            B8E7 | 28 FA    : jr   z,$B8E3
            B8E9 | FE 7F    : cp   $7F
            B8EB | 20 01    : jr   nz,$B8EE
            B8ED | 35       : dec  (hl)     // decrease code -01
            B8EE | FE BF    : cp   $BF
            B8F0 | 20 01    : jr   nz,$B8F3
            B8F2 | 34       : inc  (hl)     // increase code +01
            B8F3 | FE EF    : cp   $EF
            B8F5 | 20 04    : jr   nz,$B8FB
            B8F7 | 3E F0    : ld   a,$F0    // decrease code -10
            B8F9 | 18 06    : jr   $B901
            B8FB | FE DF    : cp   $DF
            B8FD | 20 05    : jr   nz,$B904
            B8FF | 3E 10    : ld   a,$10    // increase code +10
            B901 | 86       : add  a,(hl)
            B902 | 77       : ld   (hl),a
            B903 | 78       : ld   a,b
            B904 | FE FB    : cp   $FB
            B906 | 20 05    : jr   nz,$B90D
            B908 | 7E       : ld   a,(hl)   // play sound
            B909 | F6 80    : or   $80
            B90B | 18 05    : jr   $B912
            B90D | FE FD    : cp   $FD
            B90F | 20 03    : jr   nz,$B914
            B911 | AF       : xor  a        // stop sound
            B912 | D3 18    : out  ($18),a  // send sound code
            B914 | 18 CD    : jr   $B8E3
            -->
        </script>
        <script state="run">
            <output format="----- pitfall II sound test mode -----" line="10" align="center" />
            <output format="left : decrease code -01"               line="11" align="center" />
            <output format="right : increase code +01"              line="12" align="center" />
            <output format="down : decrease code -10"               line="13" align="center" />
            <output format="up : increase code +10"                 line="14" align="center" />
            <output format="button 1 : play sound"                  line="15" align="center" />
            <output format="button 2 : stop sound"                  line="16" align="center" />
            <output format="----------------------------"           line="17" align="center" />
            <output format="&lt;&lt; sound code %02X &gt;&gt;"      line="19" align="center"  >
                <argument>maincpu.pb@C000</argument>
            </output>
        </script>
        <script state="off">
            <action>maincpu.mw@195F = 05D5            </action>
            <action>maincpu.mq@B8E0 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@B8E8 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@B8F0 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@B8F8 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@B900 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@B908 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@B910 = FFFFFFFFFFFFFFFF</action>
        </script>
    </cheat>

</mamecheat>
pitfall2u.xml

Code: Select all

<!-- Pitfall II (not encrypted) -->
<mamecheat version="1">

    <cheat desc="no hit (test)">
        <!-- you are caught in stone gate though no pressed -->
        <script state="on">
            <action>maincpu.mw@05B8 = 05BA</action> <!-- stone gate -->
            <action>maincpu.mw@0652 = 0654</action> <!-- lava, pool (walk) -->
            <action>maincpu.mw@07DC = 07DE</action> <!-- lava, pool (fall down) -->
            <action>maincpu.mw@0D3C = 0D96</action> <!-- trolley stopper -->
            <action>maincpu.mw@2C9C = 2C9E</action> <!-- objects -->
        </script>
        <script state="off">
            <action>maincpu.mw@05B8 = 0734</action>
            <action>maincpu.mw@0652 = 0730</action>
            <action>maincpu.mw@07DC = 0730</action>
            <action>maincpu.mw@0D3C = 0734</action>
            <action>maincpu.mw@2C9C = 0734</action>
        </script>
    </cheat>

    <cheat desc="multiple jump">
        <script state="on">
            <action>maincpu.md@05EA = E6B8D0CD        </action>
            <action>maincpu.mq@B8D0 = 13CBDD0C280EFACD</action>
            <action>maincpu.mq@B8D8 = 0E36FDBE13CBDDAE</action>
            <action>maincpu.mq@B8E0 = FFFFFFC9137EDD10</action>
            <!--
            B8D0 | CD FA 0E    : call $0EFA
            B8D3 | 28 0C       : jr   z,$B8E1
            B8D5 | DD CB 13 AE : res  5,(ix+$13)
            B8D9 | DD CB 13 BE : res  7,(ix+$13)
            B8DD | FD 36 0E 10 : ld   (iy+$0e),$10
            B8E1 | DD 7E 13    : ld   a,(ix+$13)
            B8E4 | C9          : ret
            -->
        </script>
        <script state="off">
            <action>maincpu.md@05EA = E6137EDD        </action>
            <action>maincpu.mq@B8C0 = 0000000000000000</action>
            <action>maincpu.mq@B8C8 = 0000000000000000</action>
            <action>maincpu.mq@B8D0 = 0000000000000000</action>
        </script>
    </cheat>

    <cheat desc="timer speed">
        <parameter>
            <item value="0xff">01 (slow)</item>
            <item value="0x80">02       </item>
            <item value="0x40">03       </item>
            <item value="0x20">04       </item>
            <item value="0x01">05 (fast)</item>
        </parameter>
        <script state="change">
            <action>maincpu.mb@1C58 = param</action>
            <action>maincpu.mb@6467 = param</action> <!-- initialize -->
        </script>
        <script state="off">
            <action>maincpu.mb@1C58 = 3E</action>
            <action>maincpu.mb@6467 = 3E</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@167D = B8F0            </action>
            <action>maincpu.mq@B8F0 = 2847B800DBC00021</action>
            <action>maincpu.mq@B8F8 = BFFE3501207FFEFA</action>
            <action>maincpu.mq@B900 = 3E0420EFFE340120</action>
            <action>maincpu.mq@B908 = 3E0520DFFE0618F0</action>
            <action>maincpu.mq@B910 = 0520FBFE78778610</action>
            <action>maincpu.mq@B918 = 20FDFE051880F67E</action>
            <action>maincpu.mq@B920 = 0000CD1818D3AF03</action>
            <!--
            B8F0 | 21 00 C0 : ld   hl,$C000 // sound code address
            B8F3 | DB 00    : in   a,($00)  // read input
            B8F5 | B8       : cp   b
            B8F6 | 47       : ld   b,a
            B8F7 | 28 FA    : jr   z,$B8F3
            B8F9 | FE 7F    : cp   $7F
            B8FB | 20 01    : jr   nz,$B8FE
            B8FD | 35       : dec  (hl)     // decrease code -01
            B8FE | FE BF    : cp   $BF
            B900 | 20 01    : jr   nz,$B903
            B902 | 34       : inc  (hl)     // increase code +01
            B903 | FE EF    : cp   $EF
            B905 | 20 04    : jr   nz,$B90B
            B907 | 3E F0    : ld   a,$F0    // decrease code -10
            B909 | 18 06    : jr   $B911
            B90B | FE DF    : cp   $DF
            B90D | 20 05    : jr   nz,$B914
            B90F | 3E 10    : ld   a,$10    // increase code +10
            B911 | 86       : add  a,(hl)
            B912 | 77       : ld   (hl),a
            B913 | 78       : ld   a,b
            B914 | FE FB    : cp   $FB
            B916 | 20 05    : jr   nz,$B91D
            B918 | 7E       : ld   a,(hl)   // play sound
            B919 | F6 80    : or   $80
            B91B | 18 05    : jr   $B922
            B91D | FE FD    : cp   $FD
            B91F | 20 03    : jr   nz,$B924
            B921 | AF       : xor  a        // stop sound
            B922 | D3 18    : out  ($18),a  // send sound code
            B924 | 18 CD    : jr   $B8F3
            -->
        </script>
        <script state="run">
            <output format="----- pitfall II sound test mode -----" line="10" align="center" />
            <output format="left : decrease code -01"               line="11" align="center" />
            <output format="right : increase code +01"              line="12" align="center" />
            <output format="down : decrease code -10"               line="13" align="center" />
            <output format="up : increase code +10"                 line="14" align="center" />
            <output format="button 1 : play sound"                  line="15" align="center" />
            <output format="button 2 : stop sound"                  line="16" align="center" />
            <output format="----------------------------"           line="17" align="center" />
            <output format="&lt;&lt; sound code %02X &gt;&gt;"      line="19" align="center"  >
                <argument>maincpu.pb@C000</argument>
            </output>
        </script>
        <script state="off">
            <action>maincpu.mw@167D = 4CD8            </action>
            <action>maincpu.mq@B8E0 = 0000000000000000</action>
            <action>maincpu.mq@B8E8 = 0000000000000000</action>
            <action>maincpu.mq@B8F0 = 0000000000000000</action>
            <action>maincpu.mq@B8F8 = 0000000000000000</action>
            <action>maincpu.mq@B900 = 0000000000000000</action>
            <action>maincpu.mq@B908 = 0000000000000000</action>
            <action>maincpu.mq@B910 = 0000000000000000</action>
        </script>
    </cheat>

</mamecheat>
Post Reply