[sub] Submarine (Sigma)

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

[sub] Submarine (Sigma)

Post by jman »

Code: Select all

<cheat desc="no hit">
    <script state="on">
        <!-- objects -->
        <action>maincpu.md@1632 =         e68760cd</action>
        <action>maincpu.mq@8760 = c980eec87eb5fe7d</action>
        <!--
        8760 | 7d    : ld  a,l
        8761 | fe b5 : cp  $B5
        8763 | 7e    : ld  a,(hl)
        8764 | c8    : ret z
        8765 | ee 80 : xor $80
        8767 | c9    : ret
        -->
        <!-- background -->
        <action>maincpu.mb@688d = 18</action>
        <action>maincpu.mb@6901 = c3</action>
    </script>
    <script state="off">
        <action>maincpu.md@1632 =         e680ee7e</action>
        <action>maincpu.mq@8760 = ffffffffffffffff</action>
        <action>maincpu.mb@688d =               20</action>
        <action>maincpu.mb@6901 =               d2</action>
    </script>
</cheat>

<cheat desc="auto fire">
    <script state="on">
        <action>maincpu.mb@684f = 00</action> <!-- shot -->
        <action>maincpu.mb@6870 = 00</action> <!-- bomb -->
    </script>
    <script state="off">
        <action>maincpu.mb@684f = 13</action>
        <action>maincpu.mb@6870 = 13</action>
    </script>
</cheat>

<cheat desc="player speed">
    <parameter>
        <item value="0x01">01 (slow)</item>
        <item value="0x02">02       </item>
        <item value="0x04">03       </item>
        <item value="0x06">04       </item>
        <item value="0x08">05 (fast)</item>
    </parameter>
    <script state="on">
        <action>maincpu.md@68df =         fe8770c3</action>
        <action>maincpu.mq@8770 = c60b30d8fe08387e</action>
        <action>maincpu.mq@8778 = d6033810fe061805</action>
        <action>maincpu.mq@8780 = ffffff68eac37705</action>
        <!--
        8770 | 7e       : ld  a,(hl)
        8771 | 38 08    : jr  c,$877B
        8773 | fe d8    : cp  $D8
        8775 | 30 0b    : jr  nc,$8782
        8777 | c6 xx    : add a,$xx
        8779 | 18 06    : jr  $8781
        877b | fe 10    : cp  $10
        877d | 38 03    : jr  c,$8782
        877f | d6 xx    : sub $xx
        8781 | 77       : ld  (hl),a
        8782 | c3 ea 68 : jp  $68EA
        -->
    </script>
    <script state="change">
        <action>maincpu.mb@8778 = param</action>
        <action>maincpu.mb@8780 = param</action>
    </script>
    <script state="off">
        <action>maincpu.md@68df =         fe07387e</action>
        <action>maincpu.mq@8770 = ffffffffffffffff</action>
        <action>maincpu.mq@8778 = ffffffffffffffff</action>
        <action>maincpu.mq@8780 = ffffffffffffffff</action>
    </script>
</cheat>

<cheat desc="bullet speed">
    <parameter>
        <item value="0x01">01 (slow)</item>
        <item value="0x06">02       </item>
        <item value="0x0c">03       </item>
        <item value="0x12">04       </item>
        <item value="0x18">05 (fast)</item>
    </parameter>
    <script state="change">
        <action>maincpu.mb@6b52 = param</action>
    </script>
    <script state="off">
        <action>maincpu.mb@6b52 = 0a</action>
    </script>
</cheat>

<cheat desc="bomb 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="change">
        <action>maincpu.mb@6bf4 = param</action>
    </script>
    <script state="off">
        <action>maincpu.mb@6bf4 = 04</action>
    </script>
</cheat>

<cheat desc="fuel speed">
    <parameter>
        <item value="0x28">01 (slow)</item>
        <item value="0x1e">02       </item>
        <item value="0x14">03       </item>
        <item value="0x0a">04       </item>
        <item value="0x01">05 (fast)</item>
    </parameter>
    <script state="change">
        <action>maincpu.mb@6b23 = param</action>
    </script>
    <script state="off">
        <action>maincpu.mb@6b23 = 0a</action>
    </script>
</cheat>

<cheat desc="sound test mode">
    <comment>reset the game (F3) to enter sound test mode</comment>
    <script state="on">
        <action>maincpu.md@09d8 =         0e87b0c3</action>
        <action>maincpu.mq@87b0 = 4006d80011d00021</action>
        <action>maincpu.mq@87b8 = 21f91013122377af</action>
        <action>maincpu.mq@87c0 = f0403ae00032b100</action>
        <action>maincpu.mq@87c8 = 0120c1fef62847b8</action>
        <action>maincpu.mq@87d0 = d0fe340120c2fe35</action>
        <action>maincpu.mq@87d8 = 20e0fe06187e0320</action>
        <action>maincpu.mq@87e0 = d3022803fef23e08</action>
        <action>maincpu.mq@87e8 = ffffffffffd71800</action>
        <!--
        87b0 | 21 00 d0 : ld   hl,$D000  // erase sprite
        87b3 | 11 00 d8 : ld   de,$D800
        87b6 | 06 40    : ld   b,$40
        87b8 | af       : xor  a
        87b9 | 77       : ld   (hl),a
        87ba | 23       : inc  hl
        87bb | 12       : ld   (de),a
        87bc | 13       : inc  de
        87bd | 10 f9    : djnz $87B8
        87bf | 21 00 b1 : ld   hl,$B100  // sound code address
        87c2 | 32 00 e0 : ld   ($E000),a // watchdog
        87c5 | 3a 40 f0 : ld   a,($F040) // read input
        87c8 | b8       : cp   b
        87c9 | 47       : ld   b,a
        87ca | 28 f6    : jr   z,$87C2
        87cc | fe c1    : cp   $C1
        87ce | 20 01    : jr   nz,$87D1
        87d0 | 35       : dec  (hl)      // decrease code
        87d1 | fe c2    : cp   $C2
        87d3 | 20 01    : jr   nz,$87D6
        87d5 | 34       : inc  (hl)      // increase code
        87d6 | fe d0    : cp   $D0
        87d8 | 20 03    : jr   nz,$87DD
        87da | 7e       : ld   a,(hl)    // play sound
        87db | 18 06    : jr   $87E3
        87dd | fe e0    : cp   $E0
        87df | 20 08    : jr   nz,$87E9
        87e1 | 3e f2    : ld   a,$F2     // stop sound
        87e3 | fe 03    : cp   $03       // disable code 0x03 to prevent from crashing sound
        87e5 | 28 02    : jr   z,$87E9
        87e7 | d3 00    : out  ($00),a   // send sound code
        87e9 | 18 d7    : jr   $87C2
        -->
    </script>
    <script state="run">
        <output format="----- submarine 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@b100</argument>
        </output>
    </script>
    <script state="off">
        <action>maincpu.md@09d8 =         0ee00032</action>
        <action>maincpu.mq@87b0 = ffffffffffffffff</action>
        <action>maincpu.mq@87b8 = ffffffffffffffff</action>
        <action>maincpu.mq@87c0 = ffffffffffffffff</action>
        <action>maincpu.mq@87c8 = ffffffffffffffff</action>
        <action>maincpu.mq@87d0 = ffffffffffffffff</action>
        <action>maincpu.mq@87d8 = ffffffffffffffff</action>
        <action>maincpu.mq@87e0 = ffffffffffffffff</action>
        <action>maincpu.mq@87e8 = ffffffffffffffff</action>
    </script>
</cheat>
Current "invincibility" in official database based on 0.221 has problem. Suddenly player submarine breaks when you turn this code OFF after you strike against an object.
jman
Posts: 842
Joined: Tue Dec 01, 2020 1:24 pm

[sub] Submarine (Sigma) (update)

Post by jman »

Code: Select all

<cheat desc="no inertia (test)">
    <script state="on">
        <action>maincpu.md@68d5 =         b78790cd</action>
        <action>maincpu.mq@8790 = 3e032857cbb0253a</action>
        <action>maincpu.mq@8798 = 013e03285fcbc9ff</action>
        <action>maincpu.mq@87a0 = ffffffffffc9afc9</action>
        <!--
        8790 | 3a 25 b0 : ld  a,($B025)
        8793 | cb 57    : bit 2,a
        8795 | 28 03    : jr  z,$879A
        8797 | 3e ff    : ld  a,$FF
        8799 | c9       : ret
        879a | cb 5f    : bit 3,a
        879c | 28 03    : jr  z,$87A1
        879e | 3e 01    : ld  a,$01
        87a0 | c9       : ret
        87a1 | af       : xor a
        87a2 | c9       : ret
        -->
    </script>
    <script state="off">
        <action>maincpu.md@68d5 =         b7b0373a</action>
        <action>maincpu.mq@8790 = ffffffffffffffff</action>
        <action>maincpu.mq@8798 = ffffffffffffffff</action>
        <action>maincpu.mq@87a0 = ffffffffffffffff</action>
    </script>
</cheat>
"no inertia" : add new as test code. unverified.

Code: Select all

<cheat desc="sound test mode">
    <comment>reset the game (F3) to enter sound test mode</comment>
    <script state="on">
        <action>maincpu.md@09d8 =         0e87b0c3</action>
        <action>maincpu.mq@87b0 = 4006d80011d00021</action>
        <action>maincpu.mq@87b8 = 21fa1013122377af</action>
        <action>maincpu.mq@87c0 = f0403ae00032b100</action>
        <action>maincpu.mq@87c8 = 0120c1fef62847b8</action>
        <action>maincpu.mq@87d0 = c4fe340120c2fe35</action>
        <action>maincpu.mq@87d8 = c8fe0618f03e0420</action>
        <action>maincpu.mq@87e0 = fe787786103e0520</action>
        <action>maincpu.mq@87e8 = e0fe06187e0320d0</action>
        <action>maincpu.mq@87f0 = 022803fef23e0820</action>
        <action>maincpu.mq@87f8 = ffffffffc61800d3</action>
        <!--
        87b0 | 21 00 d0 : ld   hl,$D000  // erase sprites
        87b3 | 11 00 d8 : ld   de,$D800
        87b6 | 06 40    : ld   b,$40
        87b8 | af       : xor  a
        87b9 | 77       : ld   (hl),a
        87ba | 23       : inc  hl
        87bb | 12       : ld   (de),a
        87bc | 13       : inc  de
        87bd | 10 fa    : djnz $87B9
        87bf | 21 00 b1 : ld   hl,$B100  // sound code address
        87c2 | 32 00 e0 : ld   ($E000),a // watchdog
        87c5 | 3a 40 f0 : ld   a,($F040) // read input
        87c8 | b8       : cp   b
        87c9 | 47       : ld   b,a
        87ca | 28 f6    : jr   z,$87C2
        87cc | fe c1    : cp   $C1
        87ce | 20 01    : jr   nz,$87D1
        87d0 | 35       : dec  (hl)      // decrease code -01
        87d1 | fe c2    : cp   $C2
        87d3 | 20 01    : jr   nz,$87D6
        87d5 | 34       : inc  (hl)      // increase code +01
        87d6 | fe c4    : cp   $C4
        87d8 | 20 04    : jr   nz,$87DE
        87da | 3e f0    : ld   a,$F0     // decrease code -10
        87dc | 18 06    : jr   $87E4
        87de | fe c8    : cp   $C8
        87e0 | 20 05    : jr   nz,$87E7
        87e2 | 3e 10    : ld   a,$10     // increase code +10
        87e4 | 86       : add  a,(hl)
        87e5 | 77       : ld   (hl),a
        87e6 | 78       : ld   a,b
        87e7 | fe d0    : cp   $D0
        87e9 | 20 03    : jr   nz,$87EE
        87eb | 7e       : ld   a,(hl)    // play sound
        87ec | 18 06    : jr   $87F4
        87ee | fe e0    : cp   $E0
        87f0 | 20 08    : jr   nz,$87FA
        87f2 | 3e f2    : ld   a,$F2     // stop sound
        87f4 | fe 03    : cp   $03       // disable code 0x03 to prevent from crashing sound
        87f6 | 28 02    : jr   z,$87FA
        87f8 | d3 00    : out  ($00),a   // send sound code
        87fa | 18 c6    : jr   $87C2
        -->
    </script>
    <script state="run">
        <output format="----- submarine 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@b100</argument>
        </output>
    </script>
    <script state="off">
        <action>maincpu.md@09d8 =         0ee00032</action>
        <action>maincpu.mq@87b0 = ffffffffffffffff</action>
        <action>maincpu.mq@87b8 = ffffffffffffffff</action>
        <action>maincpu.mq@87c0 = ffffffffffffffff</action>
        <action>maincpu.mq@87c8 = ffffffffffffffff</action>
        <action>maincpu.mq@87d0 = ffffffffffffffff</action>
        <action>maincpu.mq@87d8 = ffffffffffffffff</action>
        <action>maincpu.mq@87e0 = ffffffffffffffff</action>
        <action>maincpu.mq@87e8 = ffffffffffffffff</action>
        <action>maincpu.mq@87f0 = ffffffffffffffff</action>
        <action>maincpu.mq@87f8 = ffffffffffffffff</action>
    </script>
</cheat>
"sound test mode" : rewrite routine. add up/down key (code ±10).
Post Reply