[netwars] Net Wars

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

[netwars] Net Wars

Post by jman »

Code: Select all

<cheat desc="auto fire">
    <script state="on">
        <action>maincpu.mb@1712 = 00</action>
    </script>
    <script state="off">
        <action>maincpu.mb@1712 = c0</action>
    </script>
</cheat>

<cheat desc="walk through wall">
    <script state="on">
        <action>maincpu.mb@15ae = 12</action>
        <action>maincpu.mb@15b6 = 0a</action>
    </script>
    <script state="off">
        <action>maincpu.mb@15ae = 3f</action>
        <action>maincpu.mb@15b6 = 37</action>
    </script>
</cheat>

<cheat desc="player speed">
    <parameter min="0x01" max="0x05" step="0x01" />
    <script state="change">
        <action>maincpu.mb@18bd =  param</action> <!-- up -->
        <action>maincpu.mb@18be =  param</action> <!-- right -->
        <action>maincpu.mb@18bf = -param</action> <!-- down -->
        <action>maincpu.mb@18c0 = -param</action> <!-- left -->
    </script>
    <script state="off">
        <action>maincpu.mb@18bd = 02</action>
        <action>maincpu.mb@18be = 02</action>
        <action>maincpu.mb@18bf = fe</action>
        <action>maincpu.mb@18c0 = fe</action>
    </script>
</cheat>

<cheat desc="move manually">
    <script state="on">
        <action>maincpu.mw@15de =             3e20</action>
        <action>maincpu.mq@3e20 = 1663c40fe658363a</action>
        <action>maincpu.mq@3e28 = ffffffffffffffc9</action>
        <!--
        3e20 | 3a 36 58 : ld   a,($5836)
        3e23 | e6 0f    : and  $0f
        3e25 | c4 63 16 : call nz,$1663
        3e28 | c9       : ret
        -->
    </script>
    <script state="off">
        <action>maincpu.mw@15de =             1663</action>
        <action>maincpu.mq@3e20 = ffffffffffffffff</action>
        <action>maincpu.mq@3e28 = ffffffffffffffff</action>
    </script>
</cheat>

<cheat desc="sound test mode">
    <comment>set ram/rom check skip then reset the game (F3)</comment>
    <script state="on">
        <action>maincpu.md@0562 =         0e3e30c3</action>
        <action>maincpu.mq@3e30 = e5d53e3311590021</action>
        <action>maincpu.mq@3e38 = fec847b8e10342cd</action>
        <action>maincpu.mq@3e40 = 012002fe35012008</action>
        <action>maincpu.mq@3e48 = 05187e032080fe34</action>
        <action>maincpu.mq@3e50 = 609032f23ec001fe</action>
        <action>maincpu.mq@3e58 = ffffffffffffffc9</action>
        <!--
        3e30 21 00 59 : ld   hl,$5900  // sound code address
        3e33 11 33 3e : ld   de,$3e33
        3e36 d5       : push de
        3e37 e5       : push hl
        3e38 cd 42 03 : call $0342     // read input
        3e3b e1       : pop  hl
        3e3c b8       : cp   b
        3e3d 47       : ld   b,a
        3e3e c8       : ret  z
        3e3f fe 08    : cp   $08
        3e41 20 01    : jr   nz,$3e44
        3e43 35       : dec  (hl)      // decrease code
        3e44 fe 02    : cp   $02
        3e46 20 01    : jr   nz,$3e49
        3e48 34       : inc  (hl)      // increase code
        3e49 fe 80    : cp   $80
        3e4b 20 03    : jr   nz,$3e50
        3e4d 7e       : ld   a,(hl)    // play sound
        3e4e 18 05    : jr   $3e55
        3e50 fe 01    : cp   $01
        3e52 c0       : ret  nz
        3e53 3e f2    : ld   a,$f2     // stop sound
        3e55 32 90 60 : ld   ($6090),a // send sound code
        3e58 c9       : ret
        -->
    </script>
    <script state="run">
        <output format="----- netwars 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="up : 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@5900</argument>
        </output>
    </script>
    <script state="off">
        <action>maincpu.md@0562 =         0e70003a</action>
        <action>maincpu.mq@3E30 = ffffffffffffffff</action>
        <action>maincpu.mq@3e38 = ffffffffffffffff</action>
        <action>maincpu.mq@3E40 = ffffffffffffffff</action>
        <action>maincpu.mq@3e48 = ffffffffffffffff</action>
        <action>maincpu.mq@3E50 = ffffffffffffffff</action>
        <action>maincpu.mq@3e58 = ffffffffffffffff</action>
    </script>
</cheat>

<cheat desc="skip ram/rom check">
    <script state="on">
        <action>maincpu.mw@0005 = 04ca</action>
    </script>
    <script state="off">
        <action>maincpu.mw@0005 = 3c7b</action>
    </script>
</cheat>
This game has softreset problem. Try "softreset" command in the debugger to avoid the game freeze.
jman
Posts: 843
Joined: Tue Dec 01, 2020 1:24 pm

[netwars] Net Wars (update)

Post by jman »

Code: Select all

<cheat desc="sound test mode">
    <comment>set &quot;skip ram/rom check&quot; then reset the game (F3)</comment>
    <script state="on">
        <action>maincpu.md@0562 =         0e3e30c3</action>
        <action>maincpu.mq@3e30 = 07070701e660833a</action>
        <action>maincpu.mq@3e38 = 47b8b10342cd4f07</action>
        <action>maincpu.mq@3e40 = 2008fe590021ee28</action>
        <action>maincpu.mq@3e48 = fe34012002fe3501</action>
        <action>maincpu.mq@3e50 = fe0618f03e042004</action>
        <action>maincpu.mq@3e58 = 787786103e052001</action>
        <action>maincpu.mq@3e60 = fe06187e032080fe</action>
        <action>maincpu.mq@3e68 = 609032f23e052010</action>
        <action>maincpu.mq@3e70 = ffffffffffffbe18</action>
        <!--
        3e30 | 3a 83 60 : ld   a,($6083) // read start button
        3e33 | e6 01    : and  $01
        3e35 | 07       : rlca
        3e36 | 07       : rlca
        3e37 | 07       : rlca
        3e38 | 07       : rlca
        3e39 | 4f       : ld   c,a
        3e3a | cd 42 03 : call $0342     // read other inputs
        3e3d | b1       : or   c
        3e3e | b8       : cp   b
        3e3f | 47       : ld   b,a
        3e40 | 28 ee    : jr   z,$3E30
        3e42 | 21 00 59 : ld   hl,$5900  // sound code address
        3e45 | fe 08    : cp   $08
        3e47 | 20 01    : jr   nz,$3E4A
        3e49 | 35       : dec  (hl)      // decrease code -01
        3e4a | fe 02    : cp   $02
        3e4c | 20 01    : jr   nz,$3E4F
        3e4e | 34       : inc  (hl)      // increase code +01
        3e4f | fe 04    : cp   $04
        3e51 | 20 04    : jr   nz,$3E57
        3e53 | 3e f0    : ld   a,$F0     // decrease code -10
        3e55 | 18 06    : jr   $3E5D
        3e57 | fe 01    : cp   $01
        3e59 | 20 05    : jr   nz,$3E60
        3e5b | 3e 10    : ld   a,$10     // increase code +10
        3e5d | 86       : add  a,(hl)
        3e5e | 77       : ld   (hl),a
        3e5f | 78       : ld   a,b
        3e60 | fe 80    : cp   $80
        3e62 | 20 03    : jr   nz,$3E67
        3e64 | 7e       : ld   a,(hl)    // play sound
        3e65 | 18 06    : jr   $3E6D
        3e67 | fe 10    : cp   $10
        3e69 | 20 05    : jr   nz,$3E70
        3e6b | 3e f2    : ld   a,$F2     // stop sound
        3e6d | 32 90 60 : ld   ($6090),a // send sound code
        3e70 | 18 be    : jr   $3E30
        -->
    </script>
    <script state="run">
        <output format="----- net wars 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="start : 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@5900</argument>
        </output>
    </script>
    <script state="off">
        <action>maincpu.md@0562 =         0e70003a</action>
        <action>maincpu.mq@3e30 = ffffffffffffffff</action>
        <action>maincpu.mq@3e38 = ffffffffffffffff</action>
        <action>maincpu.mq@3e40 = ffffffffffffffff</action>
        <action>maincpu.mq@3e48 = ffffffffffffffff</action>
        <action>maincpu.mq@3e50 = ffffffffffffffff</action>
        <action>maincpu.mq@3e58 = ffffffffffffffff</action>
        <action>maincpu.mq@3e60 = ffffffffffffffff</action>
        <action>maincpu.mq@3e68 = ffffffffffffffff</action>
        <action>maincpu.mq@3e70 = ffffffffffffffff</action>
    </script>
</cheat>
"sound test mode" : rewrite routine. add up/down key (code ±10). change sound stop button from up to start.
Post Reply