Page 1 of 1

[twineagl] Twin Eagle

Posted: Fri May 20, 2022 11:23 am
by jman

Code: Select all

<cheat desc="no hit">
    <script state="on">
        <action>maincpu.mb@fd28 = 60</action> <!-- P1 bullet -->
        <action>maincpu.mb@fe00 = 60</action> <!-- P1 enemy -->
        <action>maincpu.mb@fd82 = 60</action> <!-- P2 bullet -->
        <action>maincpu.mb@fe58 = 60</action> <!-- P2 enemy -->
    </script>
    <script state="off">
        <action>maincpu.mb@fd28 = 62</action>
        <action>maincpu.mb@fe00 = 62</action>
        <action>maincpu.mb@fd82 = 62</action>
        <action>maincpu.mb@fe58 = 62</action>
    </script>
</cheat>

<cheat desc="auto fire">
    <script state="on">
        <action>maincpu.mb@1012b = 01</action> <!-- P1 -->
        <action>maincpu.mb@10141 = 01</action> <!-- P1 -->
        <action>maincpu.mb@101f3 = 01</action> <!-- P2 -->
        <action>maincpu.mb@10209 = 01</action> <!-- P2 -->
    </script>
    <script state="off">
        <action>maincpu.mb@1012b = 1e</action>
        <action>maincpu.mb@10141 = 1e</action>
        <action>maincpu.mb@101f3 = 1e</action>
        <action>maincpu.mb@10209 = 1e</action>
    </script>
</cheat>

<cheat desc="player speed">
    <parameter>
        <item value="0x00008000">01 (slow)</item>
        <item value="0x00018000">02       </item>
        <item value="0x00038000">03       </item>
        <item value="0x00058000">04       </item>
        <item value="0x00078000">05 (fast)</item>
    </parameter>
    <script state="on">
        <action>maincpu.mq@102dc = 4eb900080000d480</action> <!-- P1 x position -->
        <action>maincpu.mq@103c4 = 4eb900080018d284</action> <!-- P1 y position -->
        <action>maincpu.mq@80000 = 243c000000004a80</action>
        <action>maincpu.mq@80008 = 67066a0244822002</action>
        <action>maincpu.mq@80010 = 243900ffe9124e75</action>
        <action>maincpu.mq@80018 = 243c000000004a84</action>
        <action>maincpu.mq@80020 = 67066a0244822802</action>
        <action>maincpu.mq@80028 = 243900ffe90e4e75</action>
        <!--
        80000 | 243c xxxx xxxx : move.l #$xxxx,D2    // P1 x position
        80006 | 4a80           : tst.l  D0
        80008 | 6706           : beq    $80010
        8000a | 6a02           : bpl    $8000e
        8000c | 4482           : neg.l  D2
        8000e | 2002           : move.l D2,D0
        80010 | 2439 00ff e912 : move.l $ffe912.l,D2
        80016 | 4e75           : rts
        80018 | 243c xxxx xxxx : move.l #$xxxx,D2    // P1 y position
        8001e | 4a84           : tst.l  D4
        80020 | 6706           : beq    $80028
        80022 | 6a02           : bpl    $80026
        80024 | 4482           : neg.l  D2
        80026 | 2802           : move.l D2,D4
        80028 | 2439 00ff e90e : move.l $ffe90e.l,D2
        8002e | 4e75           : rts
        -->
        <action>maincpu.mq@10716 = 4eb900080030d480</action> <!-- P2 x position -->
        <action>maincpu.mq@107fe = 4eb900080048d284</action> <!-- P2 y position -->
        <action>maincpu.mq@80030 = 243c000000004a80</action>
        <action>maincpu.mq@80038 = 67066a0244822002</action>
        <action>maincpu.mq@80040 = 243900ffe9224e75</action>
        <action>maincpu.mq@80048 = 243c000000004a84</action>
        <action>maincpu.mq@80050 = 67066a0244822802</action>
        <action>maincpu.mq@80058 = 243900ffe91e4e75</action>
        <!--
        80030 | 243c xxxx xxxx : move.l #$xxxx,D2    // P2 x position
        80036 | 4a80           : tst.l  D0
        80038 | 6706           : beq    $80040
        8003a | 6a02           : bpl    $8003e
        8003c | 4482           : neg.l  D2
        8003e | 2002           : move.l D2,D0
        80040 | 2439 00ff e922 : move.l $ffe922.l,D2
        80046 | 4e75           : rts
        80048 | 243c xxxx xxxx : move.l #$xxxx,D2    // P2 y position
        8004e | 4a84           : tst.l  D4
        80050 | 6706           : beq    $80058
        80052 | 6a02           : bpl    $80056
        80054 | 4482           : neg.l  D2
        80056 | 2802           : move.l D2,D4
        80058 | 2439 00ff e91e : move.l $ffe91e.l,D2
        8005e | 4e75           : rts
        -->
    </script>
    <script state="change">
        <action>maincpu.md@80002 = param</action>
        <action>maincpu.md@8001a = param</action>
        <action>maincpu.md@80032 = param</action>
        <action>maincpu.md@8004a = param</action>
    </script>
    <script state="off">
        <action>maincpu.mq@102dc = 243900ffe912d480</action>
        <action>maincpu.mq@103c4 = 243900ffe90ed284</action>
        <action>maincpu.mq@80000 = 0000000000000000</action>
        <action>maincpu.mq@80008 = 0000000000000000</action>
        <action>maincpu.mq@80010 = 0000000000000000</action>
        <action>maincpu.mq@80018 = 0000000000000000</action>
        <action>maincpu.mq@80020 = 0000000000000000</action>
        <action>maincpu.mq@80028 = 0000000000000000</action>
        <action>maincpu.mq@10716 = 243900ffe922d480</action>
        <action>maincpu.mq@107fe = 243900ffe91ed284</action>
        <action>maincpu.mq@80030 = 0000000000000000</action>
        <action>maincpu.mq@80038 = 0000000000000000</action>
        <action>maincpu.mq@80040 = 0000000000000000</action>
        <action>maincpu.mq@80048 = 0000000000000000</action>
        <action>maincpu.mq@80050 = 0000000000000000</action>
        <action>maincpu.mq@80058 = 0000000000000000</action>
    </script>
</cheat>

<cheat desc="bullet speed">
    <parameter>
        <item value="0x00010000">01 (slow)</item>
        <item value="0x00048000">02       </item>
        <item value="0x00088000">03       </item>
        <item value="0x000c8000">04       </item>
        <item value="0x00108000">05 (fast)</item>
    </parameter>
    <script state="on">
        <action>maincpu.mq@10cca = 4eb9000800604e71</action>
        <action>maincpu.mq@80060 = 3142000206830000</action>
        <action>maincpu.mq@80068 = 00004e7500000000</action>
        <!--
        80060 | 3142 0002      : move.w D2,($2,A0)
        80064 | 0683 xxxx xxxx : addi.l #$xxxx,D3
        8006a | 4e75           : rts
        -->
    </script>
    <script state="change">
        <action>maincpu.md@80066 = param</action>
    </script>
    <script state="off">
        <action>maincpu.mq@10cca = 31420002e182d682</action>
        <action>maincpu.mq@80060 = 0000000000000000</action>
        <action>maincpu.mq@80068 = 0000000000000000</action>
    </script>
</cheat>

<cheat desc="sound test mode">
    <comment>set rom check skip then reset the game (F3)</comment>
    <script state="on">
        <action>maincpu.mq@04108 = 4ef90008007066f8</action>
        <action>maincpu.mq@80070 = 41f900f0010043f9</action>
        <action>maincpu.mq@80078 = 00b0040112001039</action>
        <action>maincpu.mq@80080 = 00b0000bb20067f4</action>
        <action>maincpu.mq@80088 = 0c00000266025310</action>
        <action>maincpu.mq@80090 = 0c00000166025210</action>
        <action>maincpu.mq@80098 = 0c00000866040410</action>
        <action>maincpu.mq@800a0 = 00100c0000046604</action>
        <action>maincpu.mq@800a8 = 061000100c000010</action>
        <action>maincpu.mq@800b0 = 660212900c000020</action>
        <action>maincpu.mq@800b8 = 660412bc000160bc</action>
        <!--
        80070 | 41f9 00f0 0100 : lea    $f00100.l,A0 // sound code address
        80076 | 43f9 00b0 0401 : lea    $b00401.l,A1 // sound latch address
        8007c | 1200           : move.b D0,D1
        8007e | 1039 00b0 000b : move.b $b0000b.l,D0 // read input
        80084 | b200           : cmp.b  D0,D1
        80086 | 67f4           : beq    $8007c
        80088 | 0c00 0002      : cmpi.b #$2,D0
        8008c | 6602           : bne    $80090
        8008e | 5310           : subq.b #1,(A0)      // decrease code -01
        80090 | 0c00 0001      : cmpi.b #$1,D0
        80094 | 6602           : bne    $80098
        80096 | 5210           : addq.b #1,(A0)      // increase code +01
        80098 | 0c00 0008      : cmpi.b #$8,D0
        8009c | 6604           : bne    $800a2
        8009e | 0410 0010      : subi.b #$10,(A0)    // decrease code -10
        800a2 | 0c00 0004      : cmpi.b #$4,D0
        800a6 | 6604           : bne    $800ac
        800a8 | 0610 0010      : addi.b #$10,(A0)    // increase code +10
        800ac | 0c00 0010      : cmpi.b #$10,D0
        800b0 | 6602           : bne    $800b4
        800b2 | 1290           : move.b (A0),(A1)    // play sound
        800b4 | 0c00 0020      : cmpi.b #$20,D0
        800b8 | 6604           : bne    $800be
        800ba | 12bc 0001      : move.b #$1,(A1)     // stop sound
        800be | 60bc           : bra    $8007c
        -->
    </script>
    <script state="run">
        <output format="----- twin eagle 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@f00100</argument>
        </output>
    </script>
    <script state="off">
        <action>maincpu.mq@04108 = 4a3900ffcdb466f8</action>
        <action>maincpu.mq@80070 = 0000000000000000</action>
        <action>maincpu.mq@80078 = 0000000000000000</action>
        <action>maincpu.mq@80080 = 0000000000000000</action>
        <action>maincpu.mq@80088 = 0000000000000000</action>
        <action>maincpu.mq@80090 = 0000000000000000</action>
        <action>maincpu.mq@80098 = 0000000000000000</action>
        <action>maincpu.mq@800a0 = 0000000000000000</action>
        <action>maincpu.mq@800a8 = 0000000000000000</action>
        <action>maincpu.mq@800b0 = 0000000000000000</action>
        <action>maincpu.mq@800b8 = 0000000000000000</action>
    </script>
</cheat>

<cheat desc="skip rom check">
    <script state="on">
        <action>maincpu.mw@0322 = 605c</action>
    </script>
    <script state="off">
        <action>maincpu.mw@0322 = 7000</action>
    </script>
</cheat>

[twineagl] Twin Eagle

Posted: Sun Jan 14, 2024 3:21 am
by jman

Code: Select all

<!-- Twin Eagle - Revenge Joe's Brother -->
<mamecheat version="1">

    <cheat desc="no hit">
        <script state="on">
            <action>maincpu.mb@FD28 = 60</action> <!-- P1 bullet -->
            <action>maincpu.mb@FD82 = 60</action> <!-- P2 bullet -->
            <action>maincpu.mb@FE00 = 60</action> <!-- P1 enemy -->
            <action>maincpu.mb@FE58 = 60</action> <!-- P2 enemy -->
        </script>
        <script state="off">
            <action>maincpu.mb@FD28 = 62</action>
            <action>maincpu.mb@FD82 = 62</action>
            <action>maincpu.mb@FE00 = 62</action>
            <action>maincpu.mb@FE58 = 62</action>
        </script>
    </cheat>

    <cheat desc="auto fire">
        <script state="on">
            <action>maincpu.mb@1012B = 01</action> <!-- P1 -->
            <action>maincpu.mb@10141 = 01</action> <!-- P1 -->
            <action>maincpu.mb@101F3 = 01</action> <!-- P2 -->
            <action>maincpu.mb@10209 = 01</action> <!-- P2 -->
        </script>
        <script state="off">
            <action>maincpu.mb@1012B = 1E</action>
            <action>maincpu.mb@10141 = 1E</action>
            <action>maincpu.mb@101F3 = 1E</action>
            <action>maincpu.mb@10209 = 1E</action>
        </script>
    </cheat>

    <cheat desc="player speed">
        <parameter>
            <item value="0x00008000">01 (slow)</item>
            <item value="0x00018000">02       </item>
            <item value="0x00038000">03       </item>
            <item value="0x00058000">04       </item>
            <item value="0x00078000">05 (fast)</item>
        </parameter>
        <script state="on">
            <action>maincpu.mq@102DC = 4EB900080000D480</action> <!-- P1 x position -->
            <action>maincpu.mq@103C4 = 4EB900080018D284</action> <!-- P1 y position -->
            <action>maincpu.mq@80000 = 243C000000004A80</action>
            <action>maincpu.mq@80008 = 67066A0244822002</action>
            <action>maincpu.mq@80010 = 243900FFE9124E75</action>
            <action>maincpu.mq@80018 = 243C000000004A84</action>
            <action>maincpu.mq@80020 = 67066A0244822802</action>
            <action>maincpu.mq@80028 = 243900FFE90E4E75</action>
            <!--
            80000 | 243C xxxx xxxx : move.l  #$xxxx, D2    // P1 x position
            80006 | 4A80           : tst.l   D0
            80008 | 6706           : beq     $80010
            8000A | 6A02           : bpl     $8000e
            8000C | 4482           : neg.l   D2
            8000E | 2002           : move.l  D2, D0
            80010 | 2439 00FF E912 : move.l  $ffe912.l, D2
            80016 | 4E75           : rts
            80018 | 243C xxxx xxxx : move.l  #$xxxx, D2    // P1 y position
            8001E | 4A84           : tst.l   D4
            80020 | 6706           : beq     $80028
            80022 | 6A02           : bpl     $80026
            80024 | 4482           : neg.l   D2
            80026 | 2802           : move.l  D2, D4
            80028 | 2439 00FF E90E : move.l  $ffe90e.l, D2
            8002E | 4E75           : rts
            -->
            <action>maincpu.mq@10716 = 4EB900080030D480</action> <!-- P2 x position -->
            <action>maincpu.mq@107FE = 4EB900080048D284</action> <!-- P2 y position -->
            <action>maincpu.mq@80030 = 243C000000004A80</action>
            <action>maincpu.mq@80038 = 67066A0244822002</action>
            <action>maincpu.mq@80040 = 243900FFE9224E75</action>
            <action>maincpu.mq@80048 = 243C000000004A84</action>
            <action>maincpu.mq@80050 = 67066A0244822802</action>
            <action>maincpu.mq@80058 = 243900FFE91E4E75</action>
            <!--
            80030 | 243C xxxx xxxx : move.l  #$xxxx, D2    // P2 x position
            80036 | 4A80           : tst.l   D0
            80038 | 6706           : beq     $80040
            8003A | 6A02           : bpl     $8003e
            8003C | 4482           : neg.l   D2
            8003E | 2002           : move.l  D2, D0
            80040 | 2439 00FF E922 : move.l  $ffe922.l, D2
            80046 | 4E75           : rts
            80048 | 243C xxxx xxxx : move.l  #$xxxx, D2    // P2 y position
            8004E | 4A84           : tst.l   D4
            80050 | 6706           : beq     $80058
            80052 | 6A02           : bpl     $80056
            80054 | 4482           : neg.l   D2
            80056 | 2802           : move.l  D2, D4
            80058 | 2439 00FF E91E : move.l  $ffe91e.l, D2
            8005E | 4E75           : rts
            -->
        </script>
        <script state="change">
            <action>maincpu.md@80002 = param</action>
            <action>maincpu.md@8001A = param</action>
            <action>maincpu.md@80032 = param</action>
            <action>maincpu.md@8004A = param</action>
        </script>
        <script state="off">
            <action>maincpu.mq@102DC = 243900FFE912D480</action>
            <action>maincpu.mq@103C4 = 243900FFE90ED284</action>
            <action>maincpu.mq@80000 = 0000000000000000</action>
            <action>maincpu.mq@80008 = 0000000000000000</action>
            <action>maincpu.mq@80010 = 0000000000000000</action>
            <action>maincpu.mq@80018 = 0000000000000000</action>
            <action>maincpu.mq@80020 = 0000000000000000</action>
            <action>maincpu.mq@80028 = 0000000000000000</action>
            <action>maincpu.mq@10716 = 243900FFE922D480</action>
            <action>maincpu.mq@107FE = 243900FFE91ED284</action>
            <action>maincpu.mq@80030 = 0000000000000000</action>
            <action>maincpu.mq@80038 = 0000000000000000</action>
            <action>maincpu.mq@80040 = 0000000000000000</action>
            <action>maincpu.mq@80048 = 0000000000000000</action>
            <action>maincpu.mq@80050 = 0000000000000000</action>
            <action>maincpu.mq@80058 = 0000000000000000</action>
        </script>
    </cheat>

    <cheat desc="bullet speed">
        <parameter>
            <item value="0x00010000">01 (slow)</item>
            <item value="0x00048000">02       </item>
            <item value="0x00088000">03       </item>
            <item value="0x000c8000">04       </item>
            <item value="0x00108000">05 (fast)</item>
        </parameter>
        <script state="on">
            <action>maincpu.mq@10CCA = 4EB9000800604E71</action>
            <action>maincpu.mq@80060 = 3142000206830000</action>
            <action>maincpu.mq@80068 = 00004E7500000000</action>
            <!--
            80060 | 3142 0002      : move.w  D2, ($2,A0) 
            80064 | 0683 xxxx xxxx : addi.l  #$xxxx, D3
            8006A | 4E75           : rts
            -->
        </script>
        <script state="change">
            <action>maincpu.md@80066 = param</action>
        </script>
        <script state="off">
            <action>maincpu.mq@10CCA = 31420002E182D682</action>
            <action>maincpu.mq@80060 = 0000000000000000</action>
            <action>maincpu.mq@80068 = 0000000000000000</action>
        </script>
    </cheat>

    <cheat desc="unlock debug menu">
        <comment>press start button after inserted credit</comment>
        <script state="on">
            <action>maincpu.mw@49E6 = 7B56</action>
        </script>
        <script state="off">
            <action>maincpu.mw@49E6 = 658C</action>
        </script>
    </cheat>

    <cheat desc="sound test mode">
        <comment>set &quot;skip rom check&quot; then reset the game (F3)</comment>
        <script state="on">
            <action>maincpu.mq@04108 = 4EF90008007066F8</action>
            <action>maincpu.mq@80070 = 41F900F0010043F9</action>
            <action>maincpu.mq@80078 = 00B0040112001029</action>
            <action>maincpu.mq@80080 = FC0AB20067F60C00</action>
            <action>maincpu.mq@80088 = 0002660253100C00</action>
            <action>maincpu.mq@80090 = 0001660252100C00</action>
            <action>maincpu.mq@80098 = 0008660404100010</action>
            <action>maincpu.mq@800A0 = 0C00000466040610</action>
            <action>maincpu.mq@800A8 = 00100C0000106602</action>
            <action>maincpu.mq@800B0 = 12900C0000206604</action>
            <action>maincpu.mq@800B8 = 12BC000160BE0000</action>
            <!--
            80070 | 41F9 00F0 0100 : lea     $f00100.l, A0  // sound code address
            80076 | 43F9 00B0 0401 : lea     $b00401.l, A1  // sound latch address
            8007C | 1200           : move.b  D0, D1
            8007E | 1029 FC0A      : move.b  (-$3f6,A1), D0 // read input ($b0000b)
            80082 | B200           : cmp.b   D0, D1
            80084 | 67F6           : beq     $8007c
            80086 | 0C00 0002      : cmpi.b  #$2, D0
            8008A | 6602           : bne     $8008e
            8008C | 5310           : subq.b  #1, (A0)       // decrease code -01
            8008E | 0C00 0001      : cmpi.b  #$1, D0
            80092 | 6602           : bne     $80096
            80094 | 5210           : addq.b  #1, (A0)       // increase code +01
            80096 | 0C00 0008      : cmpi.b  #$8, D0
            8009A | 6604           : bne     $800a0
            8009C | 0410 0010      : subi.b  #$10, (A0)     // decrease code -10
            800A0 | 0C00 0004      : cmpi.b  #$4, D0
            800A4 | 6604           : bne     $800aa
            800A6 | 0610 0010      : addi.b  #$10, (A0)     // increase code +10
            800AA | 0C00 0010      : cmpi.b  #$10, D0
            800AE | 6602           : bne     $800b2
            800B0 | 1290           : move.b  (A0), (A1)     // play sound
            800B2 | 0C00 0020      : cmpi.b  #$20, D0
            800B6 | 6604           : bne     $800bc
            800B8 | 12BC 0001      : move.b  #$1, (A1)      // stop sound
            800BC | 60BE           : bra     $8007c
            -->
        </script>
        <script state="run">
            <output format="----- twin eagle 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@F00100</argument>
            </output>
        </script>
        <script state="off">
            <action>maincpu.mq@04108 = 4A3900FFCDB466F8</action>
            <action>maincpu.mq@80070 = 0000000000000000</action>
            <action>maincpu.mq@80078 = 0000000000000000</action>
            <action>maincpu.mq@80080 = 0000000000000000</action>
            <action>maincpu.mq@80088 = 0000000000000000</action>
            <action>maincpu.mq@80090 = 0000000000000000</action>
            <action>maincpu.mq@80098 = 0000000000000000</action>
            <action>maincpu.mq@800A0 = 0000000000000000</action>
            <action>maincpu.mq@800A8 = 0000000000000000</action>
            <action>maincpu.mq@800B0 = 0000000000000000</action>
            <action>maincpu.mq@800B8 = 0000000000000000</action>
        </script>
    </cheat>

    <cheat desc="skip rom check">
        <script state="on">
            <action>maincpu.mw@0322 = 605C</action>
        </script>
        <script state="off">
            <action>maincpu.mw@0322 = 7000</action>
        </script>
    </cheat>

</mamecheat>