[valtric] Valtric

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

[valtric] Valtric

Post by jman »

First of all, this game has in-game rom check so that the following codes causes game crash unless you use together with "skip in-game rom check" code.

Code: Select all

<cheat desc="no hit">
    <script state="on">
        <action>maincpu.mb@2a73 = c9</action> <!-- water -->
        <action>maincpu.mb@2fae = 18</action> <!-- battery -->
        <action>maincpu.mb@45fa = c3</action> <!-- enemy -->
        <action>maincpu.mb@6ba4 = c3</action> <!-- bullet -->
        <action>maincpu.mb@6db8 = c3</action> <!-- missile -->
        <action>maincpu.mb@6fc9 = c9</action> <!-- bomb -->
        <action>maincpu.mb@70f9 = c3</action> <!-- mini missile -->
        <action>maincpu.mb@7247 = c9</action> <!-- laser -->
    </script>
    <script state="off">
        <action>maincpu.mb@2a73 = c0</action>
        <action>maincpu.mb@2fae = 30</action>
        <action>maincpu.mb@45fa = da</action>
        <action>maincpu.mb@6ba4 = da</action>
        <action>maincpu.mb@6db8 = da</action>
        <action>maincpu.mb@6fc9 = c0</action>
        <action>maincpu.mb@70f9 = da</action>
        <action>maincpu.mb@7247 = d8</action>
    </script>
</cheat>

<cheat desc="walk through wall">
    <script state="on">
        <action>maincpu.mb@24d9 = c3</action> <!-- up -->
        <action>maincpu.mb@251b = c3</action> <!-- upper-left -->
        <action>maincpu.mb@258c = c3</action> <!-- upper-right -->
        <action>maincpu.mb@2600 = c3</action> <!-- down -->
        <action>maincpu.mb@2642 = c3</action> <!-- lower-left -->
        <action>maincpu.mb@26b4 = c3</action> <!-- lower-right -->
        <action>maincpu.mb@272c = c3</action> <!-- left -->
        <action>maincpu.mb@276a = c3</action> <!-- right -->
    </script>
    <script state="off">
        <action>maincpu.mb@24d9 = ca</action>
        <action>maincpu.mb@251b = ca</action>
        <action>maincpu.mb@258c = ca</action>
        <action>maincpu.mb@2600 = ca</action>
        <action>maincpu.mb@2642 = ca</action>
        <action>maincpu.mb@26b4 = ca</action>
        <action>maincpu.mb@272c = ca</action>
        <action>maincpu.mb@276a = ca</action>
    </script>
</cheat>

<cheat desc="player speed">
    <parameter min="0x01" max="0x05" step="0x01" />
    <script state="on">
        <action>maincpu.md@0281b =         c9b8a0cd</action> <!-- down -->
        <action>maincpu.md@02830 =         c9b8a7cd</action> <!-- up -->
        <action>maincpu.md@02840 =         c9b8aecd</action> <!-- left -->
        <action>maincpu.md@02847 =         c9b8b5cd</action> <!-- right -->
        <action>maincpu.mq@138a0 = cbc95700d67ac8cb</action>
        <action>maincpu.mq@138a8 = e0cbc95700c67ac8</action>
        <action>maincpu.mq@138b0 = 7bc0cbc95f00d67b</action>
        <action>maincpu.mq@138b8 = ffffffffc95f00c6</action>
        <!--
        b8a0 | cb c8 : set 1,b   // down
        b8a2 | 7a    : ld  a,d
        b8a3 | d6 xx : sub $xx
        b8a5 | 57    : ld  d,a
        b8a6 | c9    : ret
        b8a7 | cb c8 : set 1,b   // up
        b8a9 | 7a    : ld  a,d
        b8aa | c6 xx : add a,$xx
        b8ac | 57    : ld  d,a
        b8ad | c9    : ret
        b8ae | cb e0 : set 4,b   // left
        b8b0 | 7b    : ld  a,e
        b8b1 | d6 xx : sub $xx
        b8b3 | 5f    : ld  e,a
        b8b4 | c9    : ret
        b8b5 | cb c0 : set 0,b   // right
        b8b7 | 7b    : ld  a,e
        b8b8 | c6 xx : add a,$xx
        b8ba | 5f    : ld  e,a
        b8bb | c9    : ret
        -->
    </script>
    <script state="change">
        <action>maincpu.mb@138a4 = param</action>
        <action>maincpu.mb@138ab = param</action>
        <action>maincpu.mb@138b2 = param</action>
        <action>maincpu.mb@138b9 = param</action>
    </script>
    <script state="off">
        <action>maincpu.md@0281b =         c915c8cb</action>
        <action>maincpu.md@02830 =         c914c8cb</action>
        <action>maincpu.md@02840 =         c91de0cb</action>
        <action>maincpu.md@02847 =         c91cc0cb</action>
        <action>maincpu.mq@138a0 = ffffffffffffffff</action>
        <action>maincpu.mq@138a8 = ffffffffffffffff</action>
        <action>maincpu.mq@138b0 = ffffffffffffffff</action>
        <action>maincpu.mq@138b8 = ffffffffffffffff</action>
    </script>
</cheat>

<cheat desc="fast bomb">
    <script state="on">
        <action>maincpu.md@01fb0 =         18a73021</action>
        <action>maincpu.md@01fc7 =         ddb890cd</action>
        <action>maincpu.mq@13890 = c9675fc67cf4db2a</action>
        <!--
        b890 | 2a db f4 : ld  hl,($f4db)
        b893 | 7c       : ld  a,h
        b894 | c6 5f    : add a,$5f
        b896 | 67       : ld  h,a
        b897 | c9       : ret
        -->
    </script>
    <script state="off">
        <action>maincpu.md@01fb0 =         28a70021</action>
        <action>maincpu.md@01fc7 =         ddf4db2a</action>
        <action>maincpu.mq@13890 = ffffffffffffffff</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@00439 =             b8c0</action>
        <action>maincpu.mq@138c0 = 3ad5b8c311e10021</action>
        <action>maincpu.mq@138c8 = 20fdfec847b8c001</action>
        <action>maincpu.mq@138d0 = fe340120fefe3501</action>
        <action>maincpu.mq@138d8 = dffe04187e0320ef</action>
        <action>maincpu.mq@138e0 = ffffc9c20032afc0</action>
        <!--
        b8c0 | 21 00 e1 : ld   hl,$e100
        b8c3 | 11 c3 b8 : ld   de,$b8c3
        b8c6 | d5       : push de
        b8c7 | 3a 01 c0 : ld   a,($c001) // read input
        b8ca | b8       : cp   b
        b8cb | 47       : ld   b,a
        b8cc | c8       : ret  z
        b8cd | fe fd    : cp   $fd
        b8cf | 20 01    : jr   nz,$b8d2
        b8d1 | 35       : dec  (hl)      // decrease code
        b8d2 | fe fe    : cp   $fe
        b8d4 | 20 01    : jr   nz,$b8d7
        b8d6 | 34       : inc  (hl)      // increase code
        b8d7 | fe ef    : cp   $ef
        b8d9 | 20 03    : jr   nz,$b8de
        b8db | 7e       : ld   a,(hl)    // play sound
        b8dc | 18 04    : jr   $b8e2
        b8de | fe df    : cp   $df
        b8e0 | c0       : ret  nz
        b8e1 | af       : xor  a         // stop sound
        b8e2 | 32 00 c2 : ld   ($c200),a // send sound code
        b8e5 | c9       : ret
        -->
    </script>
    <script state="run">
        <output format="----- valtric 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@e100</argument>
        </output>
    </script>
    <script state="off">
        <action>maincpu.mw@00439 =             3546</action>
        <action>maincpu.mq@138c0 = ffffffffffffffff</action>
        <action>maincpu.mq@138c8 = ffffffffffffffff</action>
        <action>maincpu.mq@138d0 = ffffffffffffffff</action>
        <action>maincpu.mq@138d8 = ffffffffffffffff</action>
        <action>maincpu.mq@138e0 = ffffffffffffffff</action>
    </script>
</cheat>

<cheat desc="skip in-game rom check">
    <script state="on">
        <action>maincpu.mw@05d2 = f518</action>
    </script>
    <script state="off">
        <action>maincpu.mw@05d2 = aa7e</action>
    </script>
</cheat>
For some reasons, sub-units get "no hit" at the same time when you set "no hit" code.
jman
Posts: 843
Joined: Tue Dec 01, 2020 1:24 pm

[valtric] Valtric (update)

Post by jman »

Code: Select all

<cheat desc="player speed">
    <parameter min="0x01" max="0x05" step="0x01" />
    <script state="on">
        <action>maincpu.md@0281b =         c9b890cd</action> <!-- down -->
        <action>maincpu.md@02830 =         c9b897cd</action> <!-- up -->
        <action>maincpu.md@02840 =         c9b89ecd</action> <!-- left -->
        <action>maincpu.md@02847 =         c9b8a5cd</action> <!-- right -->
        <action>maincpu.mq@13890 = cbc95700d67ac8cb</action>
        <action>maincpu.mq@13898 = e0cbc95700c67ac8</action>
        <action>maincpu.mq@138a0 = 7bc0cbc95f00d67b</action>
        <action>maincpu.mq@138a8 = ffffffffc95f00c6</action>
        <!--
        b890 | cb c8 : set 1,b   // down
        b892 | 7a    : ld  a,d
        b893 | d6 xx : sub $xx
        b895 | 57    : ld  d,a
        b896 | c9    : ret
        b897 | cb c8 : set 1,b   // up
        b899 | 7a    : ld  a,d
        b89a | c6 xx : add a,$xx
        b89c | 57    : ld  d,a
        b89d | c9    : ret
        b89e | cb e0 : set 4,b   // left
        b8a0 | 7b    : ld  a,e
        b8a1 | d6 xx : sub $xx
        b8a3 | 5f    : ld  e,a
        b8a4 | c9    : ret
        b8a5 | cb c0 : set 0,b   // right
        b8a7 | 7b    : ld  a,e
        b8a8 | c6 xx : add a,$xx
        b8aa | 5f    : ld  e,a
        b8ab | c9    : ret
        -->
    </script>
    <script state="change">
        <action>maincpu.mb@13894 = param</action>
        <action>maincpu.mb@1389b = param</action>
        <action>maincpu.mb@138a2 = param</action>
        <action>maincpu.mb@138a9 = param</action>
    </script>
    <script state="off">
        <action>maincpu.md@0281b =         c915c8cb</action>
        <action>maincpu.md@02830 =         c914c8cb</action>
        <action>maincpu.md@02840 =         c91de0cb</action>
        <action>maincpu.md@02847 =         c91cc0cb</action>
        <action>maincpu.mq@13890 = ffffffffffffffff</action>
        <action>maincpu.mq@13898 = ffffffffffffffff</action>
        <action>maincpu.mq@138a0 = ffffffffffffffff</action>
        <action>maincpu.mq@138a8 = ffffffffffffffff</action>
    </script>
</cheat>
"player speed" : reallocate address.

Code: Select all

<cheat desc="fast bomb">
    <script state="on">
        <action>maincpu.md@01fb0 =         18a73021</action>
        <action>maincpu.md@01fc7 =         ddb8b0cd</action>
        <action>maincpu.mq@138b0 = c9675fc67cf4db2a</action>
        <!--
        b8b0 | 2a db f4 : ld  hl,($F4DB)
        b8b3 | 7c       : ld  a,h
        b8b4 | c6 5f    : add a,$5F
        b8b6 | 67       : ld  h,a
        b8b7 | c9       : ret
        -->
    </script>
    <script state="off">
        <action>maincpu.md@01fb0 =         28a70021</action>
        <action>maincpu.md@01fc7 =         ddf4db2a</action>
        <action>maincpu.mq@138b0 = ffffffffffffffff</action>
    </script>
</cheat>
"fast bomb" : reallocate address.

Code: Select all

<cheat desc="direct turn">
    <script state="on">
        <action>maincpu.mw@0299c =             b8c0</action>
        <action>maincpu.mq@138c0 = d121c80fe6e0913a</action>
        <action>maincpu.mq@138c8 = 0e77dd7e168bcdb8</action>
        <action>maincpu.mq@138d0 = 0a0608ff0c04ffc9</action>
        <action>maincpu.mq@138d8 = ffffffff0e0200ff</action>
        <!--
        b8c0 | 3a 91 e0 : ld   a,($E091)
        b8c3 | e6 0f    : and  $0F
        b8c5 | c8       : ret  z
        b8c6 | 21 d1 b8 : ld   hl,$B8D1
        b8c9 | cd 8b 16 : call $168B
        b8cc | 7e       : ld   a,(hl)
        b8cd | dd 77 0e : ld   (ix+$0e),a
        b8d0 | c9       : ret
        b8d1 - b8db     : input/direction conversion table
         input direction
          01    04      : right
          02    0c      : left
          04    08      : down
          05    06      : lower-right
          06    0a      : lower-left
          08    00      : up
          09    02      : upper-right
          0a    0e      : upper-left
        -->
    </script>
    <script state="off">
        <action>maincpu.mw@0299c =             2be3</action>
        <action>maincpu.mq@138c0 = ffffffffffffffff</action>
        <action>maincpu.mq@138c8 = ffffffffffffffff</action>
        <action>maincpu.mq@138d0 = ffffffffffffffff</action>
        <action>maincpu.mq@138d8 = ffffffffffffffff</action>
    </script>
</cheat>
"direct turn" : add new.

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@00439 =             b8c0</action>
        <action>maincpu.mq@138e0 = 47b8c0013ae10021</action>
        <action>maincpu.mq@138e8 = fe350120fdfef928</action>
        <action>maincpu.mq@138f0 = 0420fbfe340120fe</action>
        <action>maincpu.mq@138f8 = 0520f7fe0618f03e</action>
        <action>maincpu.mq@13900 = 20effe787786103e</action>
        <action>maincpu.mq@13908 = 0420dffe05187e03</action>
        <action>maincpu.mq@13910 = ffffcd18c20032af</action>
        <!--
        b8e0 | 21 00 e1 : ld  hl,$E100  // sound code address
        b8e3 | 3a 01 c0 : ld  a,($C001) // read input
        b8e6 | b8       : cp  b
        b8e7 | 47       : ld  b,a
        b8e8 | 28 f9    : jr  z,$B8E3
        b8ea | fe fd    : cp  $FD
        b8ec | 20 01    : jr  nz,$B8EF
        b8ee | 35       : dec (hl)      // decrease code -01
        b8ef | fe fe    : cp  $FE
        b8f1 | 20 01    : jr  nz,$B8F4
        b8f3 | 34       : inc (hl)      // increase code +01
        b8f4 | fe fb    : cp  $FB
        b8f6 | 20 04    : jr  nz,$B8FC
        b8f8 | 3e f0    : ld  a,$F0     // decrease code -10
        b8fa | 18 06    : jr  $B902
        b8fc | fe f7    : cp  $F7
        b8fe | 20 05    : jr  nz,$B905
        b900 | 3e 10    : ld  a,$10     // increase code +10
        b902 | 86       : add a,(hl)
        b903 | 77       : ld  (hl),a
        b904 | 78       : ld  a,b
        b905 | fe ef    : cp  $EF
        b907 | 20 03    : jr  nz,$B90C
        b909 | 7e       : ld  a,(hl)    // play sound
        b90a | 18 05    : jr  $B911
        b90c | fe df    : cp  $DF
        b90e | 20 04    : jr  nz,$B914
        b910 | af       : xor a         // stop sound
        b911 | 32 00 c2 : ld  ($C200),a // send sound code
        b914 | 18 cd    : jr  $B8E3
        -->
    </script>
    <script state="run">
        <output format="----- valtric 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@e100</argument>
        </output>
    </script>
    <script state="off">
        <action>maincpu.mw@00439 =             3546</action>
        <action>maincpu.mq@138e0 = ffffffffffffffff</action>
        <action>maincpu.mq@138e8 = ffffffffffffffff</action>
        <action>maincpu.mq@138f0 = ffffffffffffffff</action>
        <action>maincpu.mq@138f8 = ffffffffffffffff</action>
        <action>maincpu.mq@13900 = ffffffffffffffff</action>
        <action>maincpu.mq@13908 = ffffffffffffffff</action>
        <action>maincpu.mq@13910 = ffffffffffffffff</action>
    </script>
</cheat>
"sound test mode" : rewrite routine. reallocate address. add up/down key (code ±10).
Post Reply