[chwy] Highway Chase

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

[chwy] Highway Chase

Post by jman »

Code: Select all

<cheat desc="no hit">
    <script state="run">
        <action>maincpu.pw@15da = 6058</action> <!-- enemy -->
        <action>maincpu.pw@1a01 = 6058</action> <!-- motorbike -->
        <action>maincpu.pw@1eda = 6058</action> <!-- bullet -->
    </script>
    <script state="off">
        <action>maincpu.pw@15da = 45c5</action>
        <action>maincpu.pw@1a01 = 45c5</action>
        <action>maincpu.pw@1eda = 45c5</action>
    </script>
</cheat>

<cheat desc="auto fire">
    <script state="run">
        <action>maincpu.pw@1cf4 = fafa</action>
    </script>
    <script state="off">
        <action>maincpu.pw@1cf4 = 4e25</action>
    </script>
</cheat>

<cheat desc="player speed">
    <parameter>
        <item value="0x01">01 (slow)</item>
        <item value="0x03">02       </item>
        <item value="0x06">03       </item>
        <item value="0x09">04       </item>
        <item value="0x0c">05 (fast)</item>
    </parameter>
    <script state="run">
        <action>maincpu.pb@1cb4 = -param</action> <!-- up -->
        <action>maincpu.pb@1cb6 =  param</action> <!-- down -->
        <action>maincpu.pb@29d5 =  param</action> <!-- right -->
        <action>maincpu.pb@29d6 = -param</action> <!-- left -->
    </script>
    <script state="off">
        <action>maincpu.pb@1cb4 = fe</action>
        <action>maincpu.pb@1cb6 = 02</action>
        <action>maincpu.pb@29d5 = 03</action>
        <action>maincpu.pb@29d6 = fd</action>
    </script>
</cheat>

<cheat desc="bullet speed">
    <parameter>
        <item value="0x01">01 (slow)</item>
        <item value="0x04">02       </item>
        <item value="0x08">03       </item>
        <item value="0x0c">04       </item>
        <item value="0x10">05 (fast)</item>
    </parameter>
    <script state="run">
        <action>maincpu.pb@1f3d = param</action>
    </script>
    <script state="off">
        <action>maincpu.pb@1f3d = 04</action>
    </script>
</cheat>

<cheat desc="penetration shot">
    <script state="run">
        <action>maincpu.pb@1f1a = 00</action>
    </script>
    <script state="off">
        <action>maincpu.pb@1f1a = 04</action>
    </script>
</cheat>

<cheat desc="sound test mode">
    <script state="run">
        <!-- routine -->
        <action>maincpu.pw@0526 =             50c0</action>
        <action>maincpu.pq@50c0 = f011a5e600cd1185</action>
        <action>maincpu.pq@50c8 = 01b002a910c6c8f7</action>
        <action>maincpu.pq@50d0 = 08a9e801b001a9aa</action>
        <action>maincpu.pq@50d8 = 98ca10e9588a06b0</action>
        <action>maincpu.pq@50e0 = 1069188a06b004a9</action>
        <action>maincpu.pq@50e8 = 06f010a9108698ca</action>
        <action>maincpu.pq@50f0 = 148e00c205b020a9</action>
        <action>maincpu.pq@50f8 = 0000000050c02ce4</action>
        <!--
        50c0 | 85 11    : sta $11
        50c2 | ad 00 e6 : lda $e600 // read input
        50c5 | c5 11    : cmp $11
        50c7 | f0 f7    : beq $50c0
        50c9 | a8       : tay
        50ca | a6 10    : ldx $10
        50cc | c9 02    : cmp #$02
        50ce | d0 01    : bne $50d1
        50d0 | ca       : dex       // decrease code -01
        50d1 | c9 01    : cmp #$01
        50d3 | d0 01    : bne $50d6
        50d5 | e8       : inx       // increase code +01
        50d6 | c9 08    : cmp #$08
        50d8 | d0 06    : bne $50e0
        50da | 8a       : txa       // decrease code -10
        50db | 38       : sec
        50dc | e9 10    : sbc #$10
        50de | aa       : tax
        50df | 98       : tya
        50e0 | c9 04    : cmp #$04
        50e2 | d0 06    : bne $50ea
        50e4 | 8a       : txa       // increase code +10
        50e5 | 18       : clc
        50e6 | 69 10    : adc #$10
        50e8 | aa       : tax
        50e9 | 98       : tya
        50ea | 86 10    : stx $10
        50ec | c9 10    : cmp #$10
        50ee | f0 06    : beq $50f6
        50f0 | c9 20    : cmp #$20
        50f2 | d0 05    : bne $50f9
        50f4 | a2 00    : ldx #$00  // stop sound
        50f6 | 8e 14 e4 : stx $e414 // send sound code
        50f9 | 4c c0 50 : jmp $50c0
        -->
        <action>audiocpu.pb@0ab5 = 58</action> <!-- enable interrupt in playing music to stop sound -->
        <!-- display -->
        <output format="----- highway chase 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@0010</argument>
        </output>
    </script>
    <script state="off">
        <action> maincpu.pw@0526 =             2488</action>
        <action> maincpu.pq@50c0 = 0000000000000000</action>
        <action> maincpu.pq@50c8 = 0000000000000000</action>
        <action> maincpu.pq@50d0 = 0000000000000000</action>
        <action> maincpu.pq@50d8 = 0000000000000000</action>
        <action> maincpu.pq@50e0 = 0000000000000000</action>
        <action> maincpu.pq@50e8 = 0000000000000000</action>
        <action> maincpu.pq@50f0 = 0000000000000000</action>
        <action> maincpu.pq@50f8 = 0000000000000000</action>
        <action>audiocpu.pb@0ab5 =               78</action>
    </script>
</cheat>
Post Reply