[vulgusj] Vulgus

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

[vulgusj] Vulgus

Post by jman »

Code: Select all

<cheat desc="no hit">
    <script state="on">
        <action>maincpu.mb@43ea = c9</action>
    </script>
    <script state="off">
        <action>maincpu.mb@43ea = c0</action>
    </script>
</cheat>

<cheat desc="auto fire">
    <script state="on">
        <action>maincpu.mq@1d56 = c010fe10e6e0023a</action>
        <!--
        1d56 | 3a 02 e0 : ld  a,($e002)
        1d59 | e6 10    : and $10
        1d5b | fe 10    : cp  $10
        -->
    </script>
    <script state="off">
        <action>maincpu.mq@1d56 = c003fe07e6e00c3a</action>
    </script>
</cheat>

<cheat desc="player speed">
    <parameter>
        <item value="0x0080">01 (slow)</item>
        <item value="0x0100">02       </item>
        <item value="0x0200">03       </item>
        <item value="0x0300">04       </item>
        <item value="0x0400">05 (fast)</item>
    </parameter>
    <script state="change">
        <action>maincpu.mw@1b72 = -param</action> <!-- down -->
        <action>maincpu.mw@1b79 = -param</action> <!-- lower-left/right -->
        <action>maincpu.mw@1b7e =  param</action> <!-- up -->
        <action>maincpu.mw@1b85 =  param</action> <!-- upper-left/right -->
        <action>maincpu.mw@1bc2 = -param</action> <!-- left -->
        <action>maincpu.mw@1be4 =  param</action> <!-- right -->
    </script>
    <script state="off">
        <action>maincpu.mw@1b72 = fe80</action>
        <action>maincpu.mw@1b79 = ff00</action>
        <action>maincpu.mw@1b7e = 0180</action>
        <action>maincpu.mw@1b85 = 0100</action>
        <action>maincpu.mw@1bc2 = ff00</action>
        <action>maincpu.mw@1be4 = 0100</action>
    </script>
</cheat>

<cheat desc="bullet speed">
    <parameter>
        <item value="0x01">01 (slow)</item>
        <item value="0x05">02       </item>
        <item value="0x07">03       </item>
        <item value="0x09">04       </item>
        <item value="0x0b">05 (fast)</item>
    </parameter>
    <script state="change">
        <action>maincpu.mb@1cf7 = param</action>
        <action>maincpu.mb@1de2 = param</action>
    </script>
    <script state="off">
        <action>maincpu.mb@1cf7 = 05</action>
        <action>maincpu.mb@1de2 = 05</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@02c2 =         ff6b40c3</action>
        <action>maincpu.mq@6b40 = 0021e00522020221</action>
        <action>maincpu.mq@6b48 = bdc0013ae1002200</action>
        <action>maincpu.mq@6b50 = 250120fdfef6286f</action>
        <action>maincpu.mq@6b58 = 20effe240120fefe</action>
        <action>maincpu.mq@6b60 = 0520dffe06187c03</action>
        <action>maincpu.mq@6b68 = ffda18c80032303e</action>
        <!--
        6b40 | 21 02 02 : ld  hl,$0202
        6b43 | 22 05 e0 : ld  ($e005),hl
        6b46 | 21 00 00 : ld  hl,$0000   // initialize sound and input values
        6b49 | 22 00 e1 : ld  ($e100),hl
        6b4c | 3a 01 c0 : ld  a,($c001)  // read input
        6b4f | bd       : cp  l
        6b50 | 6f       : ld  l,a
        6b51 | 28 f6    : jr  z,$6b49
        6b53 | fe fd    : cp  $fd
        6b55 | 20 01    : jr  nz,$6b58
        6b57 | 25       : dec h          // decrease code
        6b58 | fe fe    : cp  $fe
        6b5a | 20 01    : jr  nz,$6b5d
        6b5c | 24       : inc h          // increase code
        6b5d | fe ef    : cp  $ef
        6b5f | 20 03    : jr  nz,$6b64 
        6b61 | 7c       : ld  a,h        // play sound
        6b62 | 18 06    : jr  $6b6a
        6b64 | fe df    : cp  $df
        6b66 | 20 05    : jr  nz,$6b6d
        6b68 | 3e 30    : ld  a,$30      // stop sound
        6b6a | 32 00 c8 : ld  ($c800),a
        6b6d | 18 da    : jr  $6b49
        -->
        <action>audiocpu.mb@0061 =   11</action> <!-- change sound code 0x80 to 0x11 -->
        <action>audiocpu.mw@0419 = 8418</action> <!-- stop sfx and music at the same time -->
    </script>
    <script state="run">
        <output format="----- vulgus 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@e101</argument>
        </output>
    </script>
    <script state="off">
        <action> maincpu.md@02c2 =         ff36573d</action>
        <action> maincpu.mq@6b40 = ffffffffffffffff</action>
        <action> maincpu.mq@6b48 = ffffffffffffffff</action>
        <action> maincpu.mq@6b50 = ffffffffffffffff</action>
        <action> maincpu.mq@6b58 = ffffffffffffffff</action>
        <action> maincpu.mq@6b60 = ffffffffffffffff</action>
        <action> maincpu.mq@6b68 = ffffffffffffffff</action>
        <action>audiocpu.mb@0061 =               80</action>
        <action>audiocpu.mw@0419 =             21fd</action>
    </script>
</cheat>
jman
Posts: 843
Joined: Tue Dec 01, 2020 1:24 pm

[vulgusj] Vulgus (update)

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@02c2 =         ff6b40c3</action>
        <action>maincpu.mq@6b40 = 0021e00522020221</action>
        <action>maincpu.mq@6b48 = f92847b8c0013ae1</action>
        <action>maincpu.mq@6b50 = 20fefe350120fdfe</action>
        <action>maincpu.mq@6b58 = f03e0420fbfe3401</action>
        <action>maincpu.mq@6b60 = 103e0520f7fe0618</action>
        <action>maincpu.mq@6b68 = 7e0320effe787786</action>
        <action>maincpu.mq@6b70 = 303e0520dffe0618</action>
        <action>maincpu.mq@6b78 = ffffffcc18c80032</action>
        <!--
        6b40 | 21 02 02 : ld  hl,$0202
        6b43 | 22 05 e0 : ld  ($E005),hl
        6b46 | 21 00 e1 : ld  hl,$E100   // sound code address
        6b49 | 3a 01 c0 : ld  a,($C001)  // read input
        6b4c | b8       : cp  b
        6b4d | 47       : ld  b,a
        6b4e | 28 f9    : jr  z,$6B49
        6b50 | fe fd    : cp  $FD
        6b52 | 20 01    : jr  nz,$6B55
        6b54 | 35       : dec (hl)       // decrease code -01
        6b55 | fe fe    : cp  $FE
        6b57 | 20 01    : jr  nz,$6B5A
        6b59 | 34       : inc (hl)       // increase code +10
        6b5a | fe fb    : cp  $FB
        6b5c | 20 04    : jr  nz,$6B62
        6b5e | 3e f0    : ld  a,$F0      // decrease code -10
        6b60 | 18 06    : jr  $6B68
        6b62 | fe f7    : cp  $F7
        6b64 | 20 05    : jr  nz,$6B6B
        6b66 | 3e 10    : ld  a,$10      // increase code +10
        6b68 | 86       : add a,(hl)
        6b69 | 77       : ld  (hl),a
        6b6a | 78       : ld  a,b
        6b6b | fe ef    : cp  $EF
        6b6d | 20 03    : jr  nz,$6B72
        6b6f | 7e       : ld  a,(hl)     // play sound
        6b70 | 18 06    : jr  $6B78
        6b72 | fe df    : cp  $DF
        6b74 | 20 05    : jr  nz,$6B7B
        6b76 | 3e 30    : ld  a,$30      // stop sound
        6b78 | 32 00 c8 : ld  ($C800),a  // send sound code
        6b7b | 18 cc    : jr  $6B49
        -->
        <action>audiocpu.mb@0061 =   11</action> <!-- change sound code 0x80 to 0x11 -->
        <action>audiocpu.mw@0419 = 8418</action> <!-- stop sfx and music at the same time -->
    </script>
    <script state="run">
        <output format="----- vulgus 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.md@02c2 =         ff36573d</action>
        <action> maincpu.mq@6b40 = ffffffffffffffff</action>
        <action> maincpu.mq@6b48 = ffffffffffffffff</action>
        <action> maincpu.mq@6b50 = ffffffffffffffff</action>
        <action> maincpu.mq@6b58 = ffffffffffffffff</action>
        <action> maincpu.mq@6b60 = ffffffffffffffff</action>
        <action> maincpu.mq@6b68 = ffffffffffffffff</action>
        <action> maincpu.mq@6b70 = ffffffffffffffff</action>
        <action> maincpu.mq@6b78 = ffffffffffffffff</action>
        <action>audiocpu.mb@0061 =               80</action>
        <action>audiocpu.mw@0419 =             21fd</action>
    </script>
</cheat>
"sound test mode" : rewrite routine. add up/down key (code ±10).
jman
Posts: 843
Joined: Tue Dec 01, 2020 1:24 pm

[vulgus]+ Vulgus

Post by jman »

vulgus.xml

Code: Select all

<!-- Vulgus (set 1) -->
<mamecheat version="1">

    <cheat desc="no hit">
        <script state="on">
            <action>maincpu.mb@4242 = C9</action>
        </script>
        <script state="off">
            <action>maincpu.mb@4242 = C0</action>
        </script>
    </cheat>

    <cheat desc="auto fire">
        <script state="on">
            <action>maincpu.mq@1BA6 = C010FE10E61ABBCD</action>
            <!--
            1D56 | CD BB 1A : call $1ABB
            1D59 | E6 10    : and  $10
            1D5B | FE 10    : cp   $10
            -->
        </script>
        <script state="off">
            <action>maincpu.mq@1BA6 = C003FE07E6E00C3A</action>
        </script>
    </cheat>

    <cheat desc="player speed">
        <parameter>
            <item value="0x0080">01 (slow)</item>
            <item value="0x0100">02       </item>
            <item value="0x0200">03       </item>
            <item value="0x0300">04       </item>
            <item value="0x0400">05 (fast)</item>
        </parameter>
        <script state="change">
            <action>maincpu.mw@19C2 = -param</action> <!-- down -->
            <action>maincpu.mw@19C9 = -param</action> <!-- lower-left/right -->
            <action>maincpu.mw@19CE =  param</action> <!-- up -->
            <action>maincpu.mw@19D5 =  param</action> <!-- upper-left/right -->
            <action>maincpu.mw@1A12 = -param</action> <!-- left -->
            <action>maincpu.mw@1A34 =  param</action> <!-- right -->
        </script>
        <script state="off">
            <action>maincpu.mw@19C2 = FE80</action>
            <action>maincpu.mw@19C9 = FF00</action>
            <action>maincpu.mw@19CE = 0180</action>
            <action>maincpu.mw@19D5 = 0100</action>
            <action>maincpu.mw@1A12 = FF00</action>
            <action>maincpu.mw@1A34 = 0100</action>
        </script>
    </cheat>

    <cheat desc="bullet speed">
        <parameter>
            <item value="0x0100">01 (slow)</item>
            <item value="0x0500">02       </item>
            <item value="0x0700">03       </item>
            <item value="0x0900">04       </item>
            <item value="0x0b00">05 (fast)</item>
        </parameter>
        <script state="change">
            <action>maincpu.mw@1B46 = param</action>
            <action>maincpu.mw@1C31 = param</action>
        </script>
        <script state="off">
            <action>maincpu.mw@1B46 = 0500</action>
            <action>maincpu.mw@1C31 = 0500</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@02C2 = FF6990C3        </action>
            <action>maincpu.mq@6990 = 0021E00522020221</action>
            <action>maincpu.mq@6998 = F92847B8C0013AE1</action>
            <action>maincpu.mq@69A0 = 20FEFE350120FDFE</action>
            <action>maincpu.mq@69A8 = F03E0420FBFE3401</action>
            <action>maincpu.mq@69B0 = 103E0520F7FE0618</action>
            <action>maincpu.mq@69B8 = 7E0320EFFE787786</action>
            <action>maincpu.mq@69C0 = 303E0520DFFE0618</action>
            <action>maincpu.mq@69C8 = FFFFFFCC18C80032</action>
            <!--
            6990 | 21 02 02 : ld   hl,$0202
            6993 | 22 05 E0 : ld   ($E005),hl
            6996 | 21 00 E1 : ld   hl,$E100   // sound code address
            6999 | 3A 01 C0 : ld   a,($C001)  // read input
            699C | B8       : cp   b
            699D | 47       : ld   b,a
            699E | 28 F9    : jr   z,$6999
            69A0 | FE FD    : cp   $FD
            69A2 | 20 01    : jr   nz,$69A5
            69A4 | 35       : dec  (hl)       // decrease code -01
            69A5 | FE FE    : cp   $FE
            69A7 | 20 01    : jr   nz,$69AA
            69A9 | 34       : inc  (hl)       // increase code +01
            69AA | FE FB    : cp   $FB
            69AC | 20 04    : jr   nz,$69B2
            69AE | 3E F0    : ld   a,$F0      // decrease code -10
            69B0 | 18 06    : jr   $69B8
            69B2 | FE F7    : cp   $F7
            69B4 | 20 05    : jr   nz,$69BB
            69B6 | 3E 10    : ld   a,$10      // increase code +10
            69B8 | 86       : add  a,(hl)
            69B9 | 77       : ld   (hl),a
            69BA | 78       : ld   a,b
            69BB | FE EF    : cp   $EF
            69BD | 20 03    : jr   nz,$69C2
            69BF | 7E       : ld   a,(hl)     // play sound
            69C0 | 18 06    : jr   $69C8
            69C2 | FE DF    : cp   $DF
            69C4 | 20 05    : jr   nz,$69CB
            69C6 | 3E 30    : ld   a,$30      // stop sound
            69C8 | 32 00 C8 : ld   ($C800),a  // send sound code
            69CB | 18 CC    : jr   $6999
            -->
            <action>audiocpu.mb@0061 = 11  </action> <!-- change sound code 0x80 to 0x11 -->
            <action>audiocpu.mw@0419 = 8418</action> <!-- stop sfx and music at the same time -->
        </script>
        <script state="run">
            <output format="----- vulgus 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 %02X &gt;&gt;"  line="19" align="center"  >
                <argument>maincpu.pb@E100</argument>
            </output>
        </script>
        <script state="off">
            <action> maincpu.md@02C2 = FF36573D        </action>
            <action> maincpu.mq@6990 = FFFFFFFFFFFFFFFF</action>
            <action> maincpu.mq@6998 = FFFFFFFFFFFFFFFF</action>
            <action> maincpu.mq@69A0 = FFFFFFFFFFFFFFFF</action>
            <action> maincpu.mq@69A8 = FFFFFFFFFFFFFFFF</action>
            <action> maincpu.mq@69B0 = FFFFFFFFFFFFFFFF</action>
            <action> maincpu.mq@69B8 = FFFFFFFFFFFFFFFF</action>
            <action> maincpu.mq@69C0 = FFFFFFFFFFFFFFFF</action>
            <action> maincpu.mq@69C8 = FFFFFFFFFFFFFFFF</action>
            <action>audiocpu.mb@0061 = 80              </action>
            <action>audiocpu.mw@0419 = 21FD            </action>
        </script>
    </cheat>

</mamecheat>
vulgusa.xml

Code: Select all

<!-- Vulgus (set 2) -->
<mamecheat version="1">

    <cheat desc="no hit">
        <script state="on">
            <action>maincpu.mb@43EB = C9</action>
        </script>
        <script state="off">
            <action>maincpu.mb@43EB = C0</action>
        </script>
    </cheat>

    <cheat desc="auto fire">
        <script state="on">
            <action>maincpu.mq@1D57 = C010FE10E61C6CCD</action>
            <!--
            1D56 | CD 6C 1C : call $1C6C
            1D59 | E6 10    : and  $10
            1D5B | FE 10    : cp   $10
            -->
        </script>
        <script state="off">
            <action>maincpu.mq@1D57 = C003FE07E6E00C3A</action>
        </script>
    </cheat>

    <cheat desc="player speed">
        <parameter>
            <item value="0x0080">01 (slow)</item>
            <item value="0x0100">02       </item>
            <item value="0x0200">03       </item>
            <item value="0x0300">04       </item>
            <item value="0x0400">05 (fast)</item>
        </parameter>
        <script state="change">
            <action>maincpu.mw@1B73 = -param</action> <!-- down -->
            <action>maincpu.mw@1B7A = -param</action> <!-- lower-left/right -->
            <action>maincpu.mw@1B7F =  param</action> <!-- up -->
            <action>maincpu.mw@1B86 =  param</action> <!-- upper-left/right -->
            <action>maincpu.mw@1BC3 = -param</action> <!-- left -->
            <action>maincpu.mw@1BE5 =  param</action> <!-- right -->
        </script>
        <script state="off">
            <action>maincpu.mw@1B73 = FE80</action>
            <action>maincpu.mw@1B7A = FF00</action>
            <action>maincpu.mw@1B7F = 0180</action>
            <action>maincpu.mw@1B86 = 0100</action>
            <action>maincpu.mw@1BC3 = FF00</action>
            <action>maincpu.mw@1BE5 = 0100</action>
        </script>
    </cheat>

    <cheat desc="bullet speed">
        <parameter>
            <item value="0x0100">01 (slow)</item>
            <item value="0x0500">02       </item>
            <item value="0x0700">03       </item>
            <item value="0x0900">04       </item>
            <item value="0x0b00">05 (fast)</item>
        </parameter>
        <script state="change">
            <action>maincpu.mw@1CF7 = param</action>
            <action>maincpu.mw@1DE2 = param</action>
        </script>
        <script state="off">
            <action>maincpu.mw@1CF7 = 0500</action>
            <action>maincpu.mw@1DE2 = 0500</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@02C3 = FF6B40C3        </action>
            <action>maincpu.mq@6B40 = 0021E00522020221</action>
            <action>maincpu.mq@6B48 = F92847B8C0013AE1</action>
            <action>maincpu.mq@6B50 = 20FEFE350120FDFE</action>
            <action>maincpu.mq@6B58 = F03E0420FBFE3401</action>
            <action>maincpu.mq@6B60 = 103E0520F7FE0618</action>
            <action>maincpu.mq@6B68 = 7E0320EFFE787786</action>
            <action>maincpu.mq@6B70 = 303E0520DFFE0618</action>
            <action>maincpu.mq@6B78 = FFFFFFCC18C80032</action>
            <!--
            6B40 | 21 02 02 : ld   hl,$0202
            6B43 | 22 05 E0 : ld   ($E005),hl
            6B46 | 21 00 E1 : ld   hl,$E100   // sound code address
            6B49 | 3A 01 C0 : ld   a,($C001)  // read input
            6B4C | B8       : cp   b
            6B4D | 47       : ld   b,a
            6B4E | 28 F9    : jr   z,$6B49
            6B50 | FE FD    : cp   $FD
            6B52 | 20 01    : jr   nz,$6B55
            6B54 | 35       : dec  (hl)       // decrease code -01
            6B55 | FE FE    : cp   $FE
            6B57 | 20 01    : jr   nz,$6B5A
            6B59 | 34       : inc  (hl)       // increase code +01
            6B5A | FE FB    : cp   $FB
            6B5C | 20 04    : jr   nz,$6B62
            6B5E | 3E F0    : ld   a,$F0      // decrease code -10
            6B60 | 18 06    : jr   $6B68
            6B62 | FE F7    : cp   $F7
            6B64 | 20 05    : jr   nz,$6B6B
            6B66 | 3E 10    : ld   a,$10      // increase code +10
            6B68 | 86       : add  a,(hl)
            6B69 | 77       : ld   (hl),a
            6B6A | 78       : ld   a,b
            6B6B | FE EF    : cp   $EF
            6B6D | 20 03    : jr   nz,$6B72
            6B6F | 7E       : ld   a,(hl)     // play sound
            6B70 | 18 06    : jr   $6B78
            6B72 | FE DF    : cp   $DF
            6B74 | 20 05    : jr   nz,$6B7B
            6B76 | 3E 30    : ld   a,$30      // stop sound
            6B78 | 32 00 C8 : ld   ($C800),a  // send sound code
            6B7B | 18 CC    : jr   $6B49
            -->
            <action>audiocpu.mb@0061 = 11  </action> <!-- change sound code 0x80 to 0x11 -->
            <action>audiocpu.mw@0419 = 8418</action> <!-- stop sfx and music at the same time -->
        </script>
        <script state="run">
            <output format="----- vulgus 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 %02X &gt;&gt;"  line="19" align="center"  >
                <argument>maincpu.pb@E100</argument>
            </output>
        </script>
        <script state="off">
            <action> maincpu.md@02C3 = FF36573D        </action>
            <action> maincpu.mq@6B40 = FFFFFFFFFFFFFFFF</action>
            <action> maincpu.mq@6B48 = FFFFFFFFFFFFFFFF</action>
            <action> maincpu.mq@6B50 = FFFFFFFFFFFFFFFF</action>
            <action> maincpu.mq@6B58 = FFFFFFFFFFFFFFFF</action>
            <action> maincpu.mq@6B60 = FFFFFFFFFFFFFFFF</action>
            <action> maincpu.mq@6B68 = FFFFFFFFFFFFFFFF</action>
            <action> maincpu.mq@6B70 = FFFFFFFFFFFFFFFF</action>
            <action> maincpu.mq@6B78 = FFFFFFFFFFFFFFFF</action>
            <action>audiocpu.mb@0061 = 80              </action>
            <action>audiocpu.mw@0419 = 21FD            </action>
        </script>
    </cheat>

</mamecheat>
vulgusj.xml

Code: Select all

<!-- Vulgus (Japan?) -->
<mamecheat version="1">

    <cheat desc="no hit">
        <script state="on">
            <action>maincpu.mb@43EA = C9</action>
        </script>
        <script state="off">
            <action>maincpu.mb@43EA = C0</action>
        </script>
    </cheat>

    <cheat desc="auto fire">
        <script state="on">
            <action>maincpu.mq@1D56 = C010FE10E61C6BCD</action>
            <!--
            1D56 | CD 6B 1C : call $1C6B
            1D59 | E6 10    : and  $10
            1D5B | FE 10    : cp   $10
            -->
        </script>
        <script state="off">
            <action>maincpu.mq@1D56 = C003FE07E6E00C3A</action>
        </script>
    </cheat>

    <cheat desc="player speed">
        <parameter>
            <item value="0x0080">01 (slow)</item>
            <item value="0x0100">02       </item>
            <item value="0x0200">03       </item>
            <item value="0x0300">04       </item>
            <item value="0x0400">05 (fast)</item>
        </parameter>
        <script state="change">
            <action>maincpu.mw@1B72 = -param</action> <!-- down -->
            <action>maincpu.mw@1B79 = -param</action> <!-- lower-left/right -->
            <action>maincpu.mw@1B7E =  param</action> <!-- up -->
            <action>maincpu.mw@1B85 =  param</action> <!-- upper-left/right -->
            <action>maincpu.mw@1BC2 = -param</action> <!-- left -->
            <action>maincpu.mw@1BE4 =  param</action> <!-- right -->
        </script>
        <script state="off">
            <action>maincpu.mw@1B72 = FE80</action>
            <action>maincpu.mw@1B79 = FF00</action>
            <action>maincpu.mw@1B7E = 0180</action>
            <action>maincpu.mw@1B85 = 0100</action>
            <action>maincpu.mw@1BC2 = FF00</action>
            <action>maincpu.mw@1BE4 = 0100</action>
        </script>
    </cheat>

    <cheat desc="bullet speed">
        <parameter>
            <item value="0x0100">01 (slow)</item>
            <item value="0x0500">02       </item>
            <item value="0x0700">03       </item>
            <item value="0x0900">04       </item>
            <item value="0x0b00">05 (fast)</item>
        </parameter>
        <script state="change">
            <action>maincpu.mw@1CF6 = param</action>
            <action>maincpu.mw@1DE1 = param</action>
        </script>
        <script state="off">
            <action>maincpu.mw@1CF6 = 0500</action>
            <action>maincpu.mw@1DE1 = 0500</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@02C2 = FF6B40C3        </action>
            <action>maincpu.mq@6B40 = 0021E00522020221</action>
            <action>maincpu.mq@6B48 = F92847B8C0013AE1</action>
            <action>maincpu.mq@6B50 = 20FEFE350120FDFE</action>
            <action>maincpu.mq@6B58 = F03E0420FBFE3401</action>
            <action>maincpu.mq@6B60 = 103E0520F7FE0618</action>
            <action>maincpu.mq@6B68 = 7E0320EFFE787786</action>
            <action>maincpu.mq@6B70 = 303E0520DFFE0618</action>
            <action>maincpu.mq@6B78 = FFFFFFCC18C80032</action>
            <!--
            6B40 | 21 02 02 : ld   hl,$0202
            6B43 | 22 05 E0 : ld   ($E005),hl
            6B46 | 21 00 E1 : ld   hl,$E100   // sound code address
            6B49 | 3A 01 C0 : ld   a,($C001)  // read input
            6B4C | B8       : cp   b
            6B4D | 47       : ld   b,a
            6B4E | 28 F9    : jr   z,$6B49
            6B50 | FE FD    : cp   $FD
            6B52 | 20 01    : jr   nz,$6B55
            6B54 | 35       : dec  (hl)       // decrease code -01
            6B55 | FE FE    : cp   $FE
            6B57 | 20 01    : jr   nz,$6B5A
            6B59 | 34       : inc  (hl)       // increase code +01
            6B5A | FE FB    : cp   $FB
            6B5C | 20 04    : jr   nz,$6B62
            6B5E | 3E F0    : ld   a,$F0      // decrease code -10
            6B60 | 18 06    : jr   $6B68
            6B62 | FE F7    : cp   $F7
            6B64 | 20 05    : jr   nz,$6B6B
            6B66 | 3E 10    : ld   a,$10      // increase code +10
            6B68 | 86       : add  a,(hl)
            6B69 | 77       : ld   (hl),a
            6B6A | 78       : ld   a,b
            6B6B | FE EF    : cp   $EF
            6B6D | 20 03    : jr   nz,$6B72
            6B6F | 7E       : ld   a,(hl)     // play sound
            6B70 | 18 06    : jr   $6B78
            6B72 | FE DF    : cp   $DF
            6B74 | 20 05    : jr   nz,$6B7B
            6B76 | 3E 30    : ld   a,$30      // stop sound
            6B78 | 32 00 C8 : ld   ($C800),a  // send sound code
            6B7B | 18 CC    : jr   $6B49
            -->
            <action>audiocpu.mb@0061 = 11  </action> <!-- change sound code 0x80 to 0x11 -->
            <action>audiocpu.mw@0419 = 8418</action> <!-- stop sfx and music at the same time -->
        </script>
        <script state="run">
            <output format="----- vulgus 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 %02X &gt;&gt;"  line="19" align="center"  >
                <argument>maincpu.pb@E100</argument>
            </output>
        </script>
        <script state="off">
            <action> maincpu.md@02C2 = FF36573D        </action>
            <action> maincpu.mq@6B40 = FFFFFFFFFFFFFFFF</action>
            <action> maincpu.mq@6B48 = FFFFFFFFFFFFFFFF</action>
            <action> maincpu.mq@6B50 = FFFFFFFFFFFFFFFF</action>
            <action> maincpu.mq@6B58 = FFFFFFFFFFFFFFFF</action>
            <action> maincpu.mq@6B60 = FFFFFFFFFFFFFFFF</action>
            <action> maincpu.mq@6B68 = FFFFFFFFFFFFFFFF</action>
            <action> maincpu.mq@6B70 = FFFFFFFFFFFFFFFF</action>
            <action> maincpu.mq@6B78 = FFFFFFFFFFFFFFFF</action>
            <action>audiocpu.mb@0061 = 80              </action>
            <action>audiocpu.mw@0419 = 21FD            </action>
        </script>
    </cheat>

</mamecheat>
mach9.xml

Code: Select all

<!-- Mach-9 (bootleg of Vulgus) -->
<mamecheat version="1">

    <cheat desc="no hit">
        <script state="on">
            <action>maincpu.mb@4242 = C9</action>
        </script>
        <script state="off">
            <action>maincpu.mb@4242 = C0</action>
        </script>
    </cheat>

    <cheat desc="auto fire">
        <script state="on">
            <action>maincpu.mq@1BA6 = C010FE10E61ABBCD</action>
            <!--
            1D56 | CD BB 1A : call $1ABB
            1D59 | E6 10    : and  $10
            1D5B | FE 10    : cp   $10
            -->
        </script>
        <script state="off">
            <action>maincpu.mq@1BA6 = C003FE07E6E00C3A</action>
        </script>
    </cheat>

    <cheat desc="player speed">
        <parameter>
            <item value="0x0080">01 (slow)</item>
            <item value="0x0100">02       </item>
            <item value="0x0200">03       </item>
            <item value="0x0300">04       </item>
            <item value="0x0400">05 (fast)</item>
        </parameter>
        <script state="change">
            <action>maincpu.mw@19C2 = -param</action> <!-- down -->
            <action>maincpu.mw@19C9 = -param</action> <!-- lower-left/right -->
            <action>maincpu.mw@19CE =  param</action> <!-- up -->
            <action>maincpu.mw@19D5 =  param</action> <!-- upper-left/right -->
            <action>maincpu.mw@1A12 = -param</action> <!-- left -->
            <action>maincpu.mw@1A34 =  param</action> <!-- right -->
        </script>
        <script state="off">
            <action>maincpu.mw@19C2 = FE80</action>
            <action>maincpu.mw@19C9 = FF00</action>
            <action>maincpu.mw@19CE = 0180</action>
            <action>maincpu.mw@19D5 = 0100</action>
            <action>maincpu.mw@1A12 = FF00</action>
            <action>maincpu.mw@1A34 = 0100</action>
        </script>
    </cheat>

    <cheat desc="bullet speed">
        <parameter>
            <item value="0x0100">01 (slow)</item>
            <item value="0x0500">02       </item>
            <item value="0x0700">03       </item>
            <item value="0x0900">04       </item>
            <item value="0x0b00">05 (fast)</item>
        </parameter>
        <script state="change">
            <action>maincpu.mw@1B46 = param</action>
            <action>maincpu.mw@1C31 = param</action>
        </script>
        <script state="off">
            <action>maincpu.mw@1B46 = 0500</action>
            <action>maincpu.mw@1C31 = 0500</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@02C2 = FF6B90C3        </action>
            <action>maincpu.mq@6B90 = 0021E00522020221</action>
            <action>maincpu.mq@6B98 = F92847B8C0013AE1</action>
            <action>maincpu.mq@6BA0 = 20FEFE350120FDFE</action>
            <action>maincpu.mq@6BA8 = F03E0420FBFE3401</action>
            <action>maincpu.mq@6BB0 = 103E0520F7FE0618</action>
            <action>maincpu.mq@6BB8 = 7E0320EFFE787786</action>
            <action>maincpu.mq@6BC0 = 303E0520DFFE0618</action>
            <action>maincpu.mq@6BC8 = FFFFFFCC18C80032</action>
            <!--
            6B90 | 21 02 02 : ld   hl,$0202
            6B93 | 22 05 E0 : ld   ($E005),hl
            6B96 | 21 00 E1 : ld   hl,$E100   // sound code address
            6B99 | 3A 01 C0 : ld   a,($C001)  // read input
            6B9C | B8       : cp   b
            6B9D | 47       : ld   b,a
            6B9E | 28 F9    : jr   z,$6B99
            6BA0 | FE FD    : cp   $FD
            6BA2 | 20 01    : jr   nz,$6BA5
            6BA4 | 35       : dec  (hl)       // decrease code -01
            6BA5 | FE FE    : cp   $FE
            6BA7 | 20 01    : jr   nz,$6BAA
            6BA9 | 34       : inc  (hl)       // increase code +01
            6BAA | FE FB    : cp   $FB
            6BAC | 20 04    : jr   nz,$6BB2
            6BAE | 3E F0    : ld   a,$F0      // decrease code -10
            6BB0 | 18 06    : jr   $6BB8
            6BB2 | FE F7    : cp   $F7
            6BB4 | 20 05    : jr   nz,$6BBB
            6BB6 | 3E 10    : ld   a,$10      // increase code +10
            6BB8 | 86       : add  a,(hl)
            6BB9 | 77       : ld   (hl),a
            6BBA | 78       : ld   a,b
            6BBB | FE EF    : cp   $EF
            6BBD | 20 03    : jr   nz,$6BC2
            6BBF | 7E       : ld   a,(hl)     // play sound
            6BC0 | 18 06    : jr   $6BC8
            6BC2 | FE DF    : cp   $DF
            6BC4 | 20 05    : jr   nz,$6BCB
            6BC6 | 3E 30    : ld   a,$30      // stop sound
            6BC8 | 32 00 C8 : ld   ($C800),a  // send sound code
            6BCB | 18 CC    : jr   $6B99
            -->
            <action>audiocpu.mb@0061 = 11  </action> <!-- change sound code 0x80 to 0x11 -->
            <action>audiocpu.mw@0419 = 8418</action> <!-- stop sfx and music at the same time -->
        </script>
        <script state="run">
            <output format="----- mach-9 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 %02X &gt;&gt;"  line="19" align="center"  >
                <argument>maincpu.pb@E100</argument>
            </output>
        </script>
        <script state="off">
            <action> maincpu.md@02C2 = FF36573D        </action>
            <action> maincpu.mq@6B90 = FFFFFFFFFFFFFFFF</action>
            <action> maincpu.mq@6B98 = FFFFFFFFFFFFFFFF</action>
            <action> maincpu.mq@6BA0 = FFFFFFFFFFFFFFFF</action>
            <action> maincpu.mq@6BA8 = FFFFFFFFFFFFFFFF</action>
            <action> maincpu.mq@6BB0 = FFFFFFFFFFFFFFFF</action>
            <action> maincpu.mq@6BB8 = FFFFFFFFFFFFFFFF</action>
            <action> maincpu.mq@6BC0 = FFFFFFFFFFFFFFFF</action>
            <action> maincpu.mq@6BC8 = FFFFFFFFFFFFFFFF</action>
            <action>audiocpu.mb@0061 = 80              </action>
            <action>audiocpu.mw@0419 = 21FD            </action>
        </script>
    </cheat>

</mamecheat>
Post Reply