[fcombat] Field Combat

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

[fcombat] Field Combat

Post by jman »

Code: Select all

<cheat desc="auto fire - missile">
    <script state="on">
        <action>maincpu.md@1bc0 =         1a4e90cd</action>
        <action>maincpu.mq@4e90 = 67cbc0b83ac0ee11</action>
        <action>maincpu.mq@4e98 = 12afc912023e0428</action>
        <action>maincpu.mq@4ea0 = 00000000000000c9</action>
        <!--
        4e90 | 11 ee c0 : ld  de,$C0EE
        4e93 | 3a b8 c0 : ld  a,($C0B8)
        4e96 | cb 67    : bit 4,a
        4e98 | 28 04    : jr  z,$4E9E
        4e9a | 3e 02    : ld  a,$02
        4e9c | 12       : ld  (de),a
        4e9d | c9       : ret
        4e9e | af       : xor a
        4e9f | 12       : ld  (de),a
        4ea0 | c9       : ret
        -->
    </script>
    <script state="off">
        <action>maincpu.md@1bc0 =         1ac0ee11</action>
        <action>maincpu.mq@4e90 = 0000000000000000</action>
        <action>maincpu.mq@4e98 = 0000000000000000</action>
        <action>maincpu.mq@4ea0 = 0000000000000000</action>
    </script>
</cheat>

<cheat desc="fast missile">
    <script state="on">
        <action>maincpu.mb@2a7d = 03</action>
        <action>maincpu.mb@2a80 = 09</action>
        <action>maincpu.mb@2a89 = d0</action>
    </script>
    <script state="off">
        <action>maincpu.mb@2a7d = 00</action>
        <action>maincpu.mb@2a80 = 00</action>
        <action>maincpu.mb@2a89 = ff</action>
    </script>
</cheat>

<cheat desc="fuel speed">
    <parameter>
        <item value="0xff">01 (slow)</item>
        <item value="0xc0">02       </item>
        <item value="0x80">03       </item>
        <item value="0x40">04       </item>
        <item value="0x01">05 (fast)</item>
    </parameter>
    <script state="change">
        <action>maincpu.mb@0e7b = param</action>
    </script>
    <script state="off">
        <action>maincpu.mb@0e7b = 50</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@0107 =             4eb0</action>
        <action>maincpu.mq@4eb0 = 47b8e0003ac10021</action>
        <action>maincpu.mq@4eb8 = fe350120f7fef928</action>
        <action>maincpu.mq@4ec0 = 0320dffe340120fb</action>
        <action>maincpu.mq@4ec8 = 3e0520effe06187e</action>
        <action>maincpu.mq@4ed0 = 0000dd18ef0032ff</action>
        <!--
        4eb0 | 21 00 c1 : ld  hl,$C100  // sound code address
        4eb3 | 3a 00 e0 : ld  a,($E000) // read input
        4eb6 | b8       : cp  b
        4eb7 | 47       : ld  b,a
        4eb8 | 28 f9    : jr  z,$4EB3
        4eba | fe f7    : cp  $F7
        4ebc | 20 01    : jr  nz,$4EBF
        4ebe | 35       : dec (hl)      // decrease code
        4ebf | fe fb    : cp  $FB
        4ec1 | 20 01    : jr  nz,$4EC4
        4ec3 | 34       : inc (hl)      // increase code
        4ec4 | fe df    : cp  $DF
        4ec6 | 20 03    : jr  nz,$4ECB
        4ec8 | 7e       : ld  a,(hl)    // play sound
        4ec9 | 18 06    : jr  $4ED1
        4ecb | fe ef    : cp  $EF
        4ecd | 20 05    : jr  nz,$4ED4
        4ecf | 3e ff    : ld  a,$FF     // stop sound
        4ed1 | 32 00 ef : ld  ($EF00),a // send sound code
        4ed4 | 18 dd    : jr  $4EB3
        -->
    </script>
    <script state="run">
        <output format="----- field combat sound test mode -----" line="10" align="center" />
        <output format="left : decrease code"                     line="11" align="center" />
        <output format="right : increase code"                    line="12" align="center" />
        <output format="button 1 : play sound"                    line="13" align="center" />
        <output format="button 2 : stop sound"                    line="14" align="center" />
        <output format="----------------------------"             line="15" align="center" />
        <output format="&lt;&lt; sound code %2.2X &gt;&gt;"       line="17" align="center">
            <argument>maincpu.pb@c100</argument>
        </output>
    </script>
    <script state="off">
        <action>maincpu.mw@0107 =             0308</action>
        <action>maincpu.mq@4eb0 = 0000000000000000</action>
        <action>maincpu.mq@4eb8 = 0000000000000000</action>
        <action>maincpu.mq@4ec0 = 0000000000000000</action>
        <action>maincpu.mq@4ec8 = 0000000000000000</action>
        <action>maincpu.mq@4ed0 = 0000000000000000</action>
    </script>
</cheat>
jman
Posts: 842
Joined: Tue Dec 01, 2020 1:24 pm

[fcombat] Field Combat (update)

Post by jman »

Code: Select all

<cheat desc="auto fire - missile">
    <script state="on">
        <action>maincpu.md@1bc0 =         1a4e90cd</action>
        <action>maincpu.mq@4e90 = 67cbc0b83ac0ee11</action>
        <action>maincpu.mq@4e98 = 00c912afc012023e</action>
        <!--
        4e90 | 11 ee c0 : ld  de,$C0EE
        4e93 | 3a b8 c0 : ld  a,($C0B8)
        4e96 | cb 67    : bit 4,a
        4e98 | 3e 02    : ld  a,$02
        4e9a | 12       : ld  (de),a
        4e9b | c0       : ret nz
        4e9c | af       : xor a
        4e9d | 12       : ld  (de),a
        4e9e | c9       : ret
        -->
    </script>
    <script state="off">
        <action>maincpu.md@1bc0 =         1ac0ee11</action>
        <action>maincpu.mq@4e90 = 0000000000000000</action>
        <action>maincpu.mq@4e98 = 0000000000000000</action>
    </script>
</cheat>
"auto fire" : rewrite routine.

Code: Select all

<cheat desc="sound test mode">
    <comment>reset the game (F3) to enter sound test mode</comment>
    <script state="on">
        <action>maincpu.mw@0107 =             4ea0</action>
        <action>maincpu.mq@4ea0 = 47b8e0003ac10021</action>
        <action>maincpu.mq@4ea8 = fe350120f7fef928</action>
        <action>maincpu.mq@4eb0 = 0420fdfe340120fb</action>
        <action>maincpu.mq@4eb8 = 0520fefe0618f03e</action>
        <action>maincpu.mq@4ec0 = 20dffe787786103e</action>
        <action>maincpu.mq@4ec8 = 0520effe06187e03</action>
        <action>maincpu.mq@4ed0 = 00cc18ef0032ff3e</action>
        <!--
        4ea0 | 21 00 c1 : ld  hl,$C100  // sound code address
        4ea3 | 3a 00 e0 : ld  a,($E000) // read input
        4ea6 | b8       : cp  b
        4ea7 | 47       : ld  b,a
        4ea8 | 28 f9    : jr  z,$4EA3
        4eaa | fe f7    : cp  $F7
        4eac | 20 01    : jr  nz,$4EAF
        4eae | 35       : dec (hl)      // decrease code -01
        4eaf | fe fb    : cp  $FB
        4eb1 | 20 01    : jr  nz,$4EB4
        4eb3 | 34       : inc (hl)      // increase code +01
        4eb4 | fe fd    : cp  $FD
        4eb6 | 20 04    : jr  nz,$4EBC
        4eb8 | 3e f0    : ld  a,$F0     // decrease code -10
        4eba | 18 06    : jr  $4EC2
        4ebc | fe fe    : cp  $FE
        4ebe | 20 05    : jr  nz,$4EC5
        4ec0 | 3e 10    : ld  a,$10     // increase code +10
        4ec2 | 86       : add a,(hl)
        4ec3 | 77       : ld  (hl),a
        4ec4 | 78       : ld  a,b
        4ec5 | fe df    : cp  $DF
        4ec7 | 20 03    : jr  nz,$4ECC
        4ec9 | 7e       : ld  a,(hl)    // play sound
        4eca | 18 06    : jr  $4ED2
        4ecc | fe ef    : cp  $EF
        4ece | 20 05    : jr  nz,$4ED5
        4ed0 | 3e ff    : ld  a,$FF     // stop sound
        4ed2 | 32 00 ef : ld  ($EF00),a // send sound code
        4ed5 | 18 cc    : jr  $4EA3
        -->
    </script>
    <script state="run">
        <output format="----- field combat 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@c100</argument>
        </output>
    </script>
    <script state="off">
        <action>maincpu.mw@0107 =             0308</action>
        <action>maincpu.mq@4ea0 = 0000000000000000</action>
        <action>maincpu.mq@4ea8 = 0000000000000000</action>
        <action>maincpu.mq@4eb0 = 0000000000000000</action>
        <action>maincpu.mq@4eb8 = 0000000000000000</action>
        <action>maincpu.mq@4ec0 = 0000000000000000</action>
        <action>maincpu.mq@4ec8 = 0000000000000000</action>
        <action>maincpu.mq@4ed0 = 0000000000000000</action>
    </script>
</cheat>
"sound test mode" : rewrite routine. reallocate address. add up/down key (code ±10).
Post Reply