[desertdn] Gonta Road-Rush/Desert Dan

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

[desertdn] Gonta Road-Rush/Desert Dan

Post by jman »

Code: Select all

<cheat desc="auto fire">
    <script state="on">
        <!-- first scene -->
        <action>maincpu.mw@1650 =             6ce0</action>
        <action>maincpu.mq@6ce0 = 52ca46cb3487f021</action>
        <action>maincpu.mq@6ce8 = 000000001744c316</action>
        <!--
        6ce0 | 21 f0 87 : ld  hl,$87f0
        6ce3 | 34       : inc (hl)
        6ce4 | cb 46    : bit 0,(hl)
        6ce6 | ca 52 16 : jp  z,$1652
        6ce9 | c3 44 17 : jp  $1744
        -->
        <!-- second scene -->
        <action>maincpu.mw@189c =             6cf0</action>
        <action>maincpu.mq@6cf0 = 9eca46cb3487f021</action>
        <action>maincpu.mq@6cf8 = 000000001a07c318</action>
        <!--
        6cf0 | 21 f0 87 : ld  hl,$87f0
        6cf3 | 34       : inc (hl)
        6cf4 | cb 46    : bit 0,(hl)
        6cf6 | ca 9e 18 : jp  z,$189e
        6cf9 | c3 07 1a : jp  $1a07
        -->
    </script>
    <script state="off">
        <action>maincpu.mw@1650 =             1744</action>
        <action>maincpu.mq@6cf0 = 0000000000000000</action>
        <action>maincpu.mq@6cf8 = 0000000000000000</action>
        <action>maincpu.mw@189c =             1a07</action>
        <action>maincpu.mq@6cf0 = 0000000000000000</action>
        <action>maincpu.mq@6cf8 = 0000000000000000</action>
    </script>
</cheat>

<cheat desc="walk through wall">
    <script state="on">
        <!-- first scene -->
        <action>maincpu.mw@16bf = 16c1</action> <!-- left -->
        <action>maincpu.mw@16d6 = 16d8</action> <!-- right -->
        <action>maincpu.mw@16f7 = 16f9</action> <!-- down -->
        <action>maincpu.mw@170e = 1710</action> <!-- up -->
        <!-- second scene -->
        <action>maincpu.mw@1983 = 1985</action> <!-- left -->
        <action>maincpu.mw@199a = 199c</action> <!-- right -->
        <action>maincpu.mw@19ba = 19bc</action> <!-- down -->
        <action>maincpu.mw@19d1 = 19d3</action> <!-- up -->
    </script>
    <script state="off">
        <action>maincpu.mw@16bf = 16e6</action>
        <action>maincpu.mw@16d6 = 16e6</action>
        <action>maincpu.mw@16f7 = 1763</action>
        <action>maincpu.mw@170e = 1763</action>
        <action>maincpu.mw@1983 = 19aa</action>
        <action>maincpu.mw@199a = 19aa</action>
        <action>maincpu.mw@19ba = 1a26</action>
        <action>maincpu.mw@19d1 = 1a26</action>
    </script>
</cheat>

<cheat desc="no slip">
    <script state="on">
        <action>maincpu.mb@1648 = 00</action>
    </script>
    <script state="off">
        <action>maincpu.mb@1648 = 14</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.mw@0389 =             6ca0</action>
        <action>maincpu.mq@6ca0 = 810021b00332013e</action>
        <action>maincpu.mq@6ca8 = 3ad56cab1177843e</action>
        <action>maincpu.mq@6cb0 = c847b8a0003ab800</action>
        <action>maincpu.mq@6cb8 = 2002fe35012001fe</action>
        <action>maincpu.mq@6cc0 = 187e032010fe3401</action>
        <action>maincpu.mq@6cc8 = 0032a03ec008fe05</action>
        <action>maincpu.mq@6cd0 = 000000000000c9b8</action>
        <!--
        6ca0 | 3e 01    : ld   a,$01     // enable sound
        6ca2 | 32 03 b0 : ld   ($b003),a
        6ca5 | 21 00 81 : ld   hl,$8100  // sound code address
        6ca8 | 3e 84    : ld   a,$84
        6caa | 77       : ld   (hl),a    // intialize sound code
        6cab | 11 ab 6c : ld   de,$6cab
        6cae | d5       : push de
        6caf | 3a 00 b8 : ld   a,($b800) // watchdog
        6cb2 | 3a 00 a0 : ld   a,($a000) // read input
        6cb5 | b8       : cp   b
        6cb6 | 47       : ld   b,a
        6cb7 | c8       : ret  z
        6cb8 | fe 01    : cp   $01
        6cba | 20 01    : jr   nz,$6cbd
        6cbc | 35       : dec  (hl)      // decrease code
        6cbd | fe 02    : cp   $02
        6cbf | 20 01    : jr   nz,$6cc2
        6cc1 | 34       : inc  (hl)      // increase code
        6cc2 | fe 10    : cp   $10
        6cc4 | 20 03    : jr   nz,$6cc9
        6cc6 | 7e       : ld   a,(hl)    // play sound
        6cc7 | 18 05    : jr   $6cce
        6cc9 | fe 08    : cp   $08
        6ccb | c0       : ret  nz
        6ccc | 3e a0    : ld   a,$a0     // stop sound
        6cce | 32 00 b8 : ld   ($b800),a // send sound code
        6cd1 | c9       : ret
        -->
    </script>
    <script state="run">
        <output format="----- desert dan 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@8100</argument>
        </output>
    </script>
    <script state="off">
        <action>maincpu.mw@0389 =             0165</action>
        <action>maincpu.mq@6ca0 = 0000000000000000</action>
        <action>maincpu.mq@6ca8 = 0000000000000000</action>
        <action>maincpu.mq@6cb0 = 0000000000000000</action>
        <action>maincpu.mq@6cb8 = 0000000000000000</action>
        <action>maincpu.mq@6cc0 = 0000000000000000</action>
        <action>maincpu.mq@6cc8 = 0000000000000000</action>
        <action>maincpu.mq@6cd0 = 0000000000000000</action>
    </script>
</cheat>

<cheat desc="skip ram/rom check">
    <script state="on">
        <action>maincpu.mw@0009 = 0367</action>
    </script>
    <script state="off">
        <action>maincpu.mw@0009 = 024b</action>
    </script>
</cheat>
jman
Posts: 843
Joined: Tue Dec 01, 2020 1:24 pm

[desertdn] Gonta Road-Rush/Desert Dan (update)

Post by jman »

Code: Select all

<cheat desc="auto fire">
    <script state="on">
        <action>maincpu.md@164a =         e66ca0cd</action> <!-- first scene -->
        <action>maincpu.md@1896 =         e66ca0cd</action> <!-- second scene -->
        <action>maincpu.mq@6ca0 = f021c810e682de32</action>
        <action>maincpu.mq@6ca8 = 00c9afc846cb3487</action>
        <!--
        6ca0 | 32 de 82 : ld  ($82DE),a
        6ca3 | e6 10    : and $10
        6ca5 | c8       : ret z
        6ca6 | 21 f0 87 : ld  hl,$87F0
        6ca9 | 34       : inc (hl)
        6caa | cb 46    : bit 0,(hl)
        6cac | c8       : ret z
        6cad | af       : xor a
        6cae | c9       : ret
        -->
    </script>
    <script state="off">
        <action>maincpu.md@164a =         e682de32</action>
        <action>maincpu.md@1896 =         e682de32</action>
        <action>maincpu.mq@6ca0 = 0000000000000000</action>
        <action>maincpu.mq@6ca8 = 0000000000000000</action>
    </script>
</cheat>
"auto fire" : rewrite routine. reallocate address.

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.mw@0389 =             6ca0</action>
        <action>maincpu.mq@6cb0 = 810021b00332013e</action>
        <action>maincpu.mq@6cb8 = 04e6a8003ab8003a</action>
        <action>maincpu.mq@6cc0 = b1a0003a4f070707</action>
        <action>maincpu.mq@6cc8 = 012001feec2847b8</action>
        <action>maincpu.mq@6cd0 = 04fe34012002fe35</action>
        <action>maincpu.mq@6cd8 = 08fe0618f03e0420</action>
        <action>maincpu.mq@6ce0 = fe787786103e0520</action>
        <action>maincpu.mq@6ce8 = 061880f67e052010</action>
        <action>maincpu.mq@6cf0 = 0032a03e052020fe</action>
        <action>maincpu.mq@6cf8 = 0000000000bd18b8</action>
        <!--
        6cb0 | 3e 01    : ld   a,$01     // enable sound
        6cb2 | 32 03 b0 : ld   ($B003),a
        6cb5 | 21 00 81 : ld   hl,$8100  // sound code address
        6cb8 | 3a 00 b8 : ld   a,($B800) // watchdog
        6cbb | 3a 00 a8 : ld   a,($A800) // read start button
        6cbe | e6 04    : and  $04
        6cc0 | 07       : rlca
        6cc1 | 07       : rlca
        6cc2 | 07       : rlca
        6cc3 | 4f       : ld   c,a
        6cc4 | 3a 00 a0 : ld   a,($A000) // read other inputs
        6cc7 | b1       : or   c
        6cc8 | b8       : cp   b
        6cc9 | 47       : ld   b,a
        6cca | 28 ec    : jr   z,$6CB8
        6ccc | fe 01    : cp   $01
        6cce | 20 01    : jr   nz,$6CD1
        6cd0 | 35       : dec  (hl)      // decrease code -01
        6cd1 | fe 02    : cp   $02
        6cd3 | 20 01    : jr   nz,$6CD6
        6cd5 | 34       : inc  (hl)      // increase code +01
        6cd6 | fe 04    : cp   $04
        6cd8 | 20 04    : jr   nz,$6CDE
        6cda | 3e f0    : ld   a,$F0     // decrease code -10
        6cdc | 18 06    : jr   $6CE4
        6cde | fe 08    : cp   $08
        6ce0 | 20 05    : jr   nz,$6CE7
        6ce2 | 3e 10    : ld   a,$10     // increase code +10
        6ce4 | 86       : add  a,(hl)
        6ce5 | 77       : ld   (hl),a
        6ce6 | 78       : ld   a,b
        6ce7 | fe 10    : cp   $10
        6ce9 | 20 05    : jr   nz,$6CF0
        6ceb | 7e       : ld   a,(hl)    // play sound
        6cec | f6 80    : or   $80
        6cee | 18 06    : jr   $6CF6
        6cf0 | fe 20    : cp   $20
        6cf2 | 20 05    : jr   nz,$6CF9
        6cf4 | 3e a0    : ld   a,$A0     // stop sound
        6cf6 | 32 00 b8 : ld   ($B800),a // send sound code
        6cf9 | 18 bd    : jr   $6CB8
        -->
    </script>
    <script state="run">
        <output format="----- desert dan 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@8100</argument>
        </output>
    </script>
    <script state="off">
        <action>maincpu.mw@0389 =             0165</action>
        <action>maincpu.mq@6cb0 = 0000000000000000</action>
        <action>maincpu.mq@6cb8 = 0000000000000000</action>
        <action>maincpu.mq@6cc0 = 0000000000000000</action>
        <action>maincpu.mq@6cc8 = 0000000000000000</action>
        <action>maincpu.mq@6cd0 = 0000000000000000</action>
        <action>maincpu.mq@6cd8 = 0000000000000000</action>
        <action>maincpu.mq@6ce0 = 0000000000000000</action>
        <action>maincpu.mq@6ce8 = 0000000000000000</action>
        <action>maincpu.mq@6cf0 = 0000000000000000</action>
        <action>maincpu.mq@6cf8 = 0000000000000000</action>
    </script>
</cheat>
"sound test mode" : rewrite routine. reallocate address. add up/down key (code ±10). change sound stop button from up to start.
But this code has problem. Music is played after sfx when you stop music by sound stop button then try to play sfx.
For example...
  1. Play code 0x08
  2. Stop music with sound stop button
  3. Play code 0x01
  4. You will listen the same music (code 0x08) again after played sfx (code 0x01)
Post Reply