[failgate] Fail Gate

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

[failgate] Fail Gate

Post by jman »

failgate was added on 0.241.

Code: Select all

<cheat desc="no hit">
    <script state="on">
        <action>maincpu.mb@5fb1 = 18</action>
    </script>
    <script state="off">
        <action>maincpu.mb@5fb1 = 30</action>
    </script>
</cheat>

<cheat desc="skip ram/rom check">
    <script state="on">
        <action>maincpu.mw@005d = 2618</action> <!-- ram -->
        <action>maincpu.mw@00a8 = 2518</action> <!-- rom -->
    </script>
    <script state="off">
        <action>maincpu.mw@005d = 0021</action>
        <action>maincpu.mw@00a8 = 0021</action>
    </script>
</cheat>
jman
Posts: 844
Joined: Tue Dec 01, 2020 1:24 pm

[failgate] sound test mode

Post by jman »

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@0117 =         cd7de0c3</action>
        <action>maincpu.mq@7de0 = 47b8c0003ae20021</action>
        <action>maincpu.mq@7de8 = fe350120fbfef628</action>
        <action>maincpu.mq@7df0 = 0520effe340120f7</action>
        <action>maincpu.mq@7df8 = 20dffe07185e8016</action>
        <action>maincpu.mq@7e00 = 18020bcd82ff1106</action>
        <action>maincpu.mq@7e08 = 00000000000000d7</action>
        <!--
        7de0 | 21 00 e2 : ld   hl,$E200  // sound code address
        7de3 | 3a 00 c0 : ld   a,($C000) // read input
        7de6 | b8       : cp   b
        7de7 | 47       : ld   b,a
        7de8 | 28 f6    : jr   z,$7DE0
        7dea | fe fb    : cp   $FB
        7dec | 20 01    : jr   nz,$7DEF
        7dee | 35       : dec  (hl)      // decrease code
        7def | fe f7    : cp   $F7
        7df1 | 20 01    : jr   nz,$7DF4
        7df3 | 34       : inc  (hl)      // increase code
        7df4 | fe ef    : cp   $EF
        7df6 | 20 05    : jr   nz,$7DFD
        7df8 | 16 80    : ld   d,$80     // play sound
        7dfa | 5e       : ld   e,(hl)
        7dfb | 18 07    : jr   $7E04
        7dfd | fe df    : cp   $DF
        7dff | 20 06    : jr   nz,$7E07
        7e01 | 11 ff 82 : ld   de,$82FF  // stop sound
        7e04 | cd 0b 02 : call $020B     // send sound code
        7e07 | 18 d7    : jr   $7DE0
        -->
    </script>
    <script state="run">
        <output format="----- fail gate 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@e200</argument>
        </output>
    </script>
    <script state="off">
        <action>maincpu.md@0117 =         cd82ff11</action>
        <action>maincpu.mq@7de0 = 0000000000000000</action>
        <action>maincpu.mq@7de8 = 0000000000000000</action>
        <action>maincpu.mq@7df0 = 0000000000000000</action>
        <action>maincpu.mq@7df8 = 0000000000000000</action>
        <action>maincpu.mq@7e00 = 0000000000000000</action>
        <action>maincpu.mq@7e08 = 0000000000000000</action>
    </script>
</cheat>
jman
Posts: 844
Joined: Tue Dec 01, 2020 1:24 pm

[failgate] Fail Gate (update)

Post by jman »

Code: Select all

<cheat desc="no inertia (test)">
    <script state="on">
        <action> maincpu.md@315e =         ddb780cd</action>
        <action> maincpu.md@3165 =         afb780cd</action>
        <action>maindata.mq@3780 = cd04206fcbeb633a</action>
        <action>maindata.mq@3788 = dd0077ddafc9051c</action>
        <action>maindata.mq@3790 = ffffc90277dd0177</action>
        <!--
        b780 | 3a 63 eb : ld   a,($EB63)
        b783 | cb 6f    : bit  5,a
        b785 | 20 04    : jr   nz,$B78B
        b787 | cd 1c 05 : call $051C
        b78a | c9       : ret
        b78b | af       : xor  a
        b78c | dd 77 00 : ld   (ix+$00),a
        b78f | dd 77 01 : ld   (ix+$01),a
        b792 | dd 77 02 : ld   (ix+$02),a
        b795 | c9       : ret
        -->
    </script>
    <script state="off">
        <action> maincpu.md@315e =         dd051ccd</action>
        <action> maincpu.md@3165 =         af051ccd</action>
        <action>maindata.mq@3780 = ffffffffffffffff</action>
        <action>maindata.mq@3788 = ffffffffffffffff</action>
        <action>maindata.mq@3790 = ffffffffffffffff</action>
    </script>
</cheat>
"no inertia" : add new as test code because inertia works during holding button 2.

Code: Select all

<cheat desc="direct turn">
    <script state="on">
        <action> maincpu.md@3154 =         01b760cd</action>
        <action>maindata.mq@3760 = e62feb633ab77121</action>
        <action>maindata.mq@3768 = c9eaf0327e6f850f</action>
        <action>maindata.mq@3770 = 0a0e0cff0800ffff</action>
        <action>maindata.mq@3778 = ffffffff060204ff</action>
        <!--
        b760 | 21 71 b7 : ld  hl,$B771
        b763 | 3a 63 eb : ld  a,($EB63)
        b766 | 2f       : cpl
        b767 | e6 0f    : and $0F
        b769 | 85       : add a,l
        b76a | 6f       : ld  l,a
        b76b | 7e       : ld  a,(hl)
        b76c | 32 f0 ea : ld  ($EAF0),a
        b76f | c9       : ret
        b770 - b7bb     : input/direction conversion table
         input direction
          01    00      : up
          02    08      : down
          04    0c      : left
          05    0e      : upper-left
          06    0a      : lower-left
          08    04      : right
          09    02      : upper-right
          0a    06      : lower-right
        -->
    </script>
    <script state="off">
        <action> maincpu.md@3154 =         01eaf032</action>
        <action>maindata.mq@3760 = ffffffffffffffff</action>
        <action>maindata.mq@3768 = ffffffffffffffff</action>
        <action>maindata.mq@3770 = ffffffffffffffff</action>
        <action>maindata.mq@3778 = 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.md@0117 =         cd7de0c3</action>
        <action>maincpu.mq@7de0 = 47b8c0003ae20021</action>
        <action>maincpu.mq@7de8 = fe350120fbfef928</action>
        <action>maincpu.mq@7df0 = 0420fdfe340120f7</action>
        <action>maincpu.mq@7df8 = 0520fefe0618f03e</action>
        <action>maincpu.mq@7e00 = 20effe787786103e</action>
        <action>maincpu.mq@7e08 = dffe07185e801605</action>
        <action>maincpu.mq@7e10 = 020bcd82ff110620</action>
        <action>maincpu.mq@7e18 = 000000000000c618</action>
        <!--
        7de0 | 21 00 e2 : ld   hl,$E200  // sound code address
        7de3 | 3a 00 c0 : ld   a,($C000) // read input
        7de6 | b8       : cp   b
        7de7 | 47       : ld   b,a
        7de8 | 28 f9    : jr   z,$7DE3
        7dea | fe fb    : cp   $FB
        7dec | 20 01    : jr   nz,$7DEF
        7dee | 35       : dec  (hl)      // decrease code -01
        7def | fe f7    : cp   $F7
        7df1 | 20 01    : jr   nz,$7DF4
        7df3 | 34       : inc  (hl)      // increase code +01
        7df4 | fe fd    : cp   $FD
        7df6 | 20 04    : jr   nz,$7DFC
        7df8 | 3e f0    : ld   a,$F0     // decrease code -10
        7dfa | 18 06    : jr   $7E02
        7dfc | fe fe    : cp   $FE
        7dfe | 20 05    : jr   nz,$7E05
        7e00 | 3e 10    : ld   a,$10     // increase code +10
        7e02 | 86       : add  a,(hl)
        7e03 | 77       : ld   (hl),a
        7e04 | 78       : ld   a,b
        7e05 | fe ef    : cp   $EF
        7e07 | 20 05    : jr   nz,$7E0E
        7e09 | 16 80    : ld   d,$80     // play sound
        7e0b | 5e       : ld   e,(hl)
        7e0c | 18 07    : jr   $7E15
        7e0e | fe df    : cp   $DF
        7e10 | 20 06    : jr   nz,$7E18
        7e12 | 11 ff 82 : ld   de,$82FF  // stop sound
        7e15 | cd 0b 02 : call $020B     // send sound code
        7e18 | 18 c6    : jr   $7DE0
        -->
    </script>
    <script state="run">
        <output format="----- fail gate 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@e200</argument>
        </output>
    </script>
    <script state="off">
        <action>maincpu.md@0117 =         cd82ff11</action>
        <action>maincpu.mq@7de0 = 0000000000000000</action>
        <action>maincpu.mq@7de8 = 0000000000000000</action>
        <action>maincpu.mq@7df0 = 0000000000000000</action>
        <action>maincpu.mq@7df8 = 0000000000000000</action>
        <action>maincpu.mq@7e00 = 0000000000000000</action>
        <action>maincpu.mq@7e08 = 0000000000000000</action>
        <action>maincpu.mq@7e10 = 0000000000000000</action>
        <action>maincpu.mq@7e18 = 0000000000000000</action>
    </script>
</cheat>
"sound test mode" : rewrite routine. add up/down key (code ±10).
Post Reply