[bayroutej] Bay Route

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

[bayroutej] Bay Route

Post by jman »

Code: Select all

<cheat desc="no hit">
    <script state="run">
        <action>maincpu.ob@1b12a = 60</action> <!-- enemy -->
        <action>maincpu.mb@1b537 = ba</action> <!-- flame -->
        <action>maincpu.ob@1bbae = 60</action> <!-- bullet -->
    </script>
    <script state="off">
        <action>maincpu.ob@1b170 = 66</action>
        <action>maincpu.mb@1b537 = 8a</action>
        <action>maincpu.ob@1bbae = 66</action>
    </script>
</cheat>

<cheat desc="auto fire">
    <script state="run">
        <action>maincpu.ob@5327 = 02</action> <!-- multi-way shot -->
        <action>maincpu.ob@53bf = 02</action> <!-- bomb -->
        <action>maincpu.ob@53eb = 02</action> <!-- spread shot -->
        <action>maincpu.ob@5495 = 02</action> <!-- flame thrower -->
    </script>
    <script state="off">
        <action>maincpu.ob@5327 = 1a</action>
        <action>maincpu.ob@53bf = 22</action>
        <action>maincpu.ob@53eb = 5e</action>
        <action>maincpu.ob@5495 = 08</action>
    </script>
</cheat>

<cheat desc="walk speed (test)">
    <parameter>
        <item value="0x00001000">01 (slow)</item>
        <item value="0x00003000">02       </item>
        <item value="0x00006000">03       </item>
        <item value="0x00009000">04       </item>
        <item value="0x0000c000">05 (fast)</item>
    </parameter>
    <script state="run">
        <action>maincpu.oq@04102 = 4eb90001fc304eb9</action>
        <action>maincpu.oq@0410a = 0001fc4208e90001</action>
        <action>maincpu.oq@1fc30 = 203900500a80611c</action>
        <action>maincpu.oq@1fc38 = 23c000500a80dc80</action>
        <action>maincpu.oq@1fc40 = 4e75203900500a84</action>
        <action>maincpu.oq@1fc48 = 610a23c000500a84</action>
        <action>maincpu.oq@1fc50 = de804e754a390050</action>
        <action>maincpu.oq@1fc58 = 0a986a10223c0000</action>
        <action>maincpu.oq@1fc60 = 00004a8067066a02</action>
        <action>maincpu.oq@1fc68 = 448120014e75ffff</action>
        <action>maincpu.od@1fc5e =            param</action>
        <!--
        1fc30 | 2039 0050 0a80 : move.l $500a80.l,D0 // x-position
        1fc36 | 611c           : bsr    $1fc54
        1fc38 | 23c0 0050 0a80 : move.l D0,$500a80.l
        1fc3e | dc80           : add.l  D0,D6
        1fc40 | 4e75           : rts
        1fc42 | 2039 0050 0a84 : move.l $500a84.l,D0 // y-position
        1fc48 | 610a           : bsr    $1fc54
        1fc4a | 23c0 0050 0a84 : move.l D0,$500a84.l
        1fc50 | de80           : add.l  D0,D7
        1fc52 | 4e75           : rts
        1fc54 | 4a39 0050 0a98 : tst.b  $500a98.l    // check auto-moving flag
        1fc5a | 6a10           : bpl    $1fc6c
        1fc5c | 223c xxxx xxxx : move.l #$xxxx,D1
        1fc62 | 4a80           : tst.l  D0
        1fc64 | 6706           : beq    $1fc6c
        1fc66 | 6a02           : bpl    $1fc6a
        1fc68 | 4481           : neg.l  D1
        1fc6a | 2001           : move.l D1,D0
        1fc6c | 4e75           : rts
        -->
    </script>
    <script state="off">
        <action>maincpu.oq@04102 = dcb900500a80deb9</action>
        <action>maincpu.oq@0410a = 00500a8408e90001</action>
        <action>maincpu.oq@1fc30 = ad80a422ad20a482</action>
        <action>maincpu.oq@1fc38 = a422a422a590a5a0</action>
        <action>maincpu.oq@1fc40 = a482a590a422a590</action>
        <action>maincpu.oq@1fc48 = a482ad20a5a0a482</action>
        <action>maincpu.oq@1fc50 = a482a422a482a422</action>
        <action>maincpu.oq@1fc58 = ad20ad20a5a0a422</action>
        <action>maincpu.oq@1fc60 = ad20ad20a482a422</action>
        <action>maincpu.oq@1fc68 = a482a5a0a5a0a482</action>
    </script>
</cheat>

<cheat desc="sound test mode">
    <comment>reset the game (F3) to enter sound test mode</comment>
    <script state="run">
        <!-- routine -->
        <action>maincpu.od@01088 =         0001fc70</action>
        <action>maincpu.oq@1fc70 = 41f90050000043f9</action>
        <action>maincpu.oq@1fc78 = 00ff000712001039</action>
        <action>maincpu.oq@1fc80 = 00901003b20067f4</action>
        <action>maincpu.oq@1fc88 = 0c00007f66025310</action>
        <action>maincpu.oq@1fc90 = 0c0000bf66025210</action>
        <action>maincpu.oq@1fc98 = 0c0000ef66040410</action>
        <action>maincpu.oq@1fca0 = 00100c0000df6604</action>
        <action>maincpu.oq@1fca8 = 061000100c0000fd</action>
        <action>maincpu.oq@1fcb0 = 660212900c0000fb</action>
        <action>maincpu.oq@1fcb8 = 660412bc00ff66bc</action>
        <!--
        1fc70 | 41f9 0050 0000 : lea    $500000.l,A0 // sound code address
        1fc76 | 43f9 00ff 0007 : lea    $ff0007.l,A1 // sound latch address
        1fc7c | 1200           : move.b D0,D1
        1fc7e | 1039 0090 1003 : move.b $901003.l,D0 // read input
        1fc84 | b200           : cmp.b  D0,D1
        1fc86 | 67f4           : beq    $1fc7c
        1fc88 | 0c00 007f      : cmpi.b #$7f,D0
        1fc8c | 6602           : bne    $1fc90
        1fc8e | 5310           : subq.b #1,(A0)      // decrease code -01
        1fc90 | 0c00 00bf      : cmpi.b #-$41,D0
        1fc94 | 6602           : bne    $1fc98
        1fc96 | 5210           : addq.b #1,(A0)      // increase code +01
        1fc98 | 0c00 00ef      : cmpi.b #-$11,D0
        1fc9c | 6604           : bne    $1fca2
        1fc9e | 0410 0010      : subi.b #$10,(A0)    // decrease code -10
        1fca2 | 0c00 00df      : cmpi.b #-$21,D0
        1fca6 | 6604           : bne    $1fcac
        1fca8 | 0610 0010      : addi.b #$10,(A0)    // increase code +10
        1fcac | 0c00 00fd      : cmpi.b #-$3,D0
        1fcb0 | 6602           : bne    $1fcb4
        1fcb2 | 1290           : move.b (A0),(A1)    // play sound
        1fcb4 | 0c00 00fb      : cmpi.b #-$5,D0
        1fcb8 | 6604           : bne    $1fcbe
        1fcba | 12bc 00ff      : move.b #$ff,(A1)    // stop sound
        1fcbe | 60be           : bra    $1fc7c
        -->
        <!-- display -->
        <output format="----- bay route 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@500000</argument>
        </output>
    </script>
    <script state="off">
        <action>maincpu.od@01088 =         0001e376</action>
        <action>maincpu.oq@1fc70 = a422a422a422a422</action>
        <action>maincpu.oq@1fc78 = a422ad80a590a482</action>
        <action>maincpu.oq@1fc80 = a590a482a5a0a482</action>
        <action>maincpu.oq@1fc88 = a422a482a422a482</action>
        <action>maincpu.oq@1fc90 = ad20ad80ad20a482</action>
        <action>maincpu.oq@1fc98 = ad20a482ad80a482</action>
        <action>maincpu.oq@1fca0 = a5a0a5a0ad80a482</action>
        <action>maincpu.oq@1fca8 = a422a422ad20a422</action>
        <action>maincpu.oq@1fcb0 = a482a482a482a482</action>
        <action>maincpu.oq@1fcb8 = ad20a482a422ad20</action>
    </script>
</cheat>
"walk speed" is test code. Player speed doesn't change when you hold a gun in the upper direction (press upper-left or upper-right key). Of course, also when you ride in a vehicle.
Post Reply