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.
jman
Posts: 1318 Joined: Tue Dec 01, 2020 1:24 pm
Been thanked: 10 times
Post
by jman » Fri Jul 30, 2021 11:29 am
Code: Select all
<cheat desc="auto fire">
<script state="on">
<action>maincpu.mw@3f01 = 5a30</action>
<action>maincpu.mq@5a30 = aecb8077211157cd</action>
<action>maincpu.mq@5a38 = ffffffffffffffc9</action>
<!--
5a30 | cd 57 11 : call $1157
5a33 | 21 77 80 : ld hl,$8077
5a36 | cb ae : res 5,(hl)
5a38 | c9 : ret
-->
</script>
<script state="off">
<action>maincpu.mw@3f01 = 1157</action>
<action>maincpu.mq@5a30 = ffffffffffffffff</action>
<action>maincpu.mq@5a38 = ffffffffffffffff</action>
</script>
</cheat>
<cheat desc="player speed">
<parameter min="0x01" max="0x05" step="0x01" />
<script state="change">
<action>maincpu.mb@3fea = -param</action> <!-- left -->
<action>maincpu.mb@3fec = param</action> <!-- right -->
</script>
<script state="off">
<action>maincpu.mb@3fea = ff</action>
<action>maincpu.mb@3fec = 01</action>
</script>
</cheat>
<cheat desc="bullet speed">
<parameter min="0x01" max="0x08" step="0x01" />
<script state="change">
<action>maincpu.mb@20f3 = param</action>
</script>
<script state="off">
<action>maincpu.mb@20f3 = 02</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@51de = 5a40</action>
<action>maincpu.mq@5a40 = 810021800032ff3e</action>
<action>maincpu.mq@5a48 = 23c877b8a8003a46</action>
<action>maincpu.mq@5a50 = 20c2fe350120c1fe</action>
<action>maincpu.mq@5a58 = 187e0320e0fe3401</action>
<action>maincpu.mq@5a60 = b6cdf23ec0c8fe05</action>
<action>maincpu.mq@5a68 = ffffffffffffc905</action>
<!--
5a40 | 3e ff : ld a,$ff
5a42 | 32 00 80 : ld ($8000),a
5a45 | 21 00 81 : ld hl,$8100
5a48 | 46 : ld b,(hl)
5a49 | 3a 00 a8 : ld a,($a800) // read input
5a4c | b8 : cp b
5a4d | 77 : ld (hl),a
5a4e | c8 : ret z
5a4f | 23 : inc hl
5a50 | fe c1 : cp $c1
5a52 | 20 01 : jr nz,$5a55
5a54 | 35 : dec (hl) // decrease code
5a55 | fe c2 : cp $c2
5a57 | 20 01 : jr nz,$5a5a
5a59 | 34 : inc (hl) // increase code
5a5a | fe e0 : cp $e0
5a5c | 20 03 : jr nz,$5a61
5a5e | 7e : ld a,(hl) // play sound
5a5f | 18 05 : jr $5a66
5a61 | fe c8 : cp $c8
5a63 | c0 : ret nz
5a64 | 3e f2 : ld a,$f2 // stop sound
5a66 | cd b6 05 : call $05b6
5a69 | c9 : ret
-->
</script>
<script state="run">
<output format="----- battle cruiser M-12 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="<< sound code %2.2X >>" line="17" align="center">
<argument>maincpu.pb@8101</argument>
</output>
</script>
<script state="off">
<action>maincpu.mw@51de = 0d48</action>
<action>maincpu.mq@5a40 = ffffffffffffffff</action>
<action>maincpu.mq@5a48 = ffffffffffffffff</action>
<action>maincpu.mq@5a50 = ffffffffffffffff</action>
<action>maincpu.mq@5a58 = ffffffffffffffff</action>
<action>maincpu.mq@5a60 = ffffffffffffffff</action>
<action>maincpu.mq@5a68 = ffffffffffffffff</action>
</script>
</cheat>
<cheat desc="skip ram/rom check">
<script state="on">
<action>maincpu.mw@0006 = 0a7c</action>
</script>
<script state="off">
<action>maincpu.mw@0006 = 0170</action>
</script>
</cheat>
jman
Posts: 1318 Joined: Tue Dec 01, 2020 1:24 pm
Been thanked: 10 times
Post
by jman » Sun Nov 06, 2022 10:13 am
Code: Select all
<cheat desc="sound test mode">
<!-- playing code 0x13 causes the game reset -->
<comment>set "skip ram/rom check" then reset the game (F3)</comment>
<script state="on">
<action>maincpu.mb@007b = 00</action> <!-- enable sound in interrupt -->
<action>maincpu.mw@51de = 5a40</action>
<action>maincpu.mq@5a40 = 80e6a0003a810121</action>
<action>maincpu.mq@5a48 = beb02fe6a8003a47</action>
<action>maincpu.mq@5a50 = 35012001fe2bc877</action>
<action>maincpu.mq@5a58 = 2004fe34012002fe</action>
<action>maincpu.mq@5a60 = 2008fe0618f03e04</action>
<action>maincpu.mq@5a68 = 20fec97786103e05</action>
<action>maincpu.mq@5a70 = c080fe05187e0320</action>
<action>maincpu.mq@5a78 = ffffc905b6cdf23e</action>
<!--
5a40 | 21 01 81 : ld hl,$8101 // $8100 = sound code, $8101 = temporary input
5a43 | 3a 00 a0 : ld a,($A000) // read start button
5a46 | e6 80 : and $80
5a48 | 47 : ld b,a
5a49 | 3a 00 a8 : ld a,($A800) // read other inputs
5a4c | e6 2f : and $2F
5a4e | b0 : or b
5a4f | be : cp (hl)
5a50 | 77 : ld (hl),a
5a51 | c8 : ret z
5a52 | 2b : dec hl
5a53 | fe 01 : cp $01
5a55 | 20 01 : jr nz,$5A58
5a57 | 35 : dec (hl) // decrease code -01
5a58 | fe 02 : cp $02
5a5a | 20 01 : jr nz,$5A5D
5a5c | 34 : inc (hl) // increase code +01
5a5d | fe 04 : cp $04
5a5f | 20 04 : jr nz,$5A65
5a61 | 3e f0 : ld a,$F0 // decrease code -10
5a63 | 18 06 : jr $5A6B
5a65 | fe 08 : cp $08
5a67 | 20 05 : jr nz,$5A6E
5a69 | 3e 10 : ld a,$10 // increase code +10
5a6b | 86 : add a,(hl)
5a6c | 77 : ld (hl),a
5a6d | c9 : ret
5a6e | fe 20 : cp $20
5a70 | 20 03 : jr nz,$5A75
5a72 | 7e : ld a,(hl) // play sound
5a73 | 18 05 : jr $5A7A
5a75 | fe 80 : cp $80
5a77 | c0 : ret nz
5a78 | 3e f2 : ld a,$F2 // stop sound
5a7a | cd b6 05 : call $05B6 // send sound code
5a7d | c9 : ret
-->
</script>
<script state="run">
<output format="----- battle cruiser m-12 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="<< sound code %2.2X >>" line="19" align="center" >
<argument>maincpu.pb@8100</argument>
</output>
</script>
<script state="off">
<action>maincpu.mb@007b = 69</action>
<action>maincpu.mw@51de = 0d48</action>
<action>maincpu.mq@5a40 = ffffffffffffffff</action>
<action>maincpu.mq@5a48 = ffffffffffffffff</action>
<action>maincpu.mq@5a50 = ffffffffffffffff</action>
<action>maincpu.mq@5a58 = ffffffffffffffff</action>
<action>maincpu.mq@5a60 = ffffffffffffffff</action>
<action>maincpu.mq@5a68 = ffffffffffffffff</action>
<action>maincpu.mq@5a70 = ffffffffffffffff</action>
<action>maincpu.mq@5a78 = ffffffffffffffff</action>
</script>
</cheat>
"sound test mode" : rewrite routine. add up/down key (code ±10). change sound stop button from up to start.
jman
Posts: 1318 Joined: Tue Dec 01, 2020 1:24 pm
Been thanked: 10 times
Post
by jman » Sun Nov 10, 2024 2:39 pm
bcruzm12.xml
Code: Select all
<!-- Battle Cruiser M-12 -->
<mamecheat version="1">
<cheat desc="no hit">
<script state="on">
<action>maincpu.mb@185F = C9</action>
</script>
<script state="off">
<action>maincpu.mb@185F = C6</action>
</script>
</cheat>
<cheat desc="rapid fire">
<script state="on">
<action>maincpu.mw@3F01 = 5A30 </action>
<action>maincpu.mq@5A30 = AECB8077211157CD</action>
<action>maincpu.mq@5A38 = FFFFFFFFFFFFFFC9</action>
<!--
5A30 | CD 57 11 : call $1157
5A33 | 21 77 80 : ld hl,$8077
5A36 | CB AE : res 5,(hl)
5A38 | C9 : ret
-->
</script>
<script state="off">
<action>maincpu.mw@3F01 = 1157 </action>
<action>maincpu.mq@5A30 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@5A38 = FFFFFFFFFFFFFFFF</action>
</script>
</cheat>
<cheat desc="player speed">
<parameter min="0x01" max="0x05" step="0x01" />
<script state="change">
<action>maincpu.mb@3FEA = -param</action> <!-- left -->
<action>maincpu.mb@3FEC = param</action> <!-- right -->
</script>
<script state="off">
<action>maincpu.mb@3FEA = FF</action>
<action>maincpu.mb@3FEC = 01</action>
</script>
</cheat>
<cheat desc="bullet speed">
<parameter>
<item value="0x01">01 (slow)</item>
<item value="0x02">02 </item>
<item value="0x04">03 </item>
<item value="0x06">04 </item>
<item value="0x08">05 (fast)</item>
</parameter>
<script state="change">
<action>maincpu.mb@20F3 = param</action>
</script>
<script state="off">
<action>maincpu.mb@20F3 = 02</action>
</script>
</cheat>
<cheat desc="sea speed">
<parameter>
<item value="0x80">01 (slow)</item>
<item value="0x40">02 </item>
<item value="0x20">03 </item>
<item value="0x10">04 </item>
<item value="0x01">05 (fast)</item>
</parameter>
<script state="change">
<action>maincpu.pb@80BA = param</action>
<action>maincpu.mb@390B = param</action>
</script>
<script state="off">
<action>maincpu.pb@80BA = 06</action>
<action>maincpu.mb@390B = 06</action>
</script>
</cheat>
<cheat desc="short hit mark">
<script state="on">
<action>maincpu.md@1941 = 0F5A80CD </action>
<action>maincpu.mq@5A80 = 3602380BFED978D9</action>
<action>maincpu.mq@5A88 = FFFFFFC9807B3A01</action>
<!--
5A80 | D9 : exx
5A81 | 78 : ld a,b
5A82 | D9 : exx
5A83 | FE 0B : cp $0B
5A85 | 38 02 : jr c,$5A89
5A87 | 36 01 : ld (hl),$01
5A89 | 3A 7B 80 : ld a,($807B)
5A8C | C9 : ret
-->
</script>
<script state="off">
<action>maincpu.md@1941 = 0F807B3A </action>
<action>maincpu.mq@5A80 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@5A88 = FFFFFFFFFFFFFFFF</action>
</script>
</cheat>
<cheat desc="sound test mode">
<!-- playing code 0x13 causes the game reset -->
<comment>set "skip ram/rom check" then reset the game (F3)</comment>
<script state="on">
<action>maincpu.mb@007B = 00 </action> <!-- enable sound in interrupt -->
<action>maincpu.mb@0B5B = 00 </action> <!-- disable score display -->
<action>maincpu.mw@51DE = 5A40 </action>
<action>maincpu.mq@5A40 = 80E6A0003A810121</action>
<action>maincpu.mq@5A48 = BEB02FE6A8003A47</action>
<action>maincpu.mq@5A50 = 35012001FE2BC877</action>
<action>maincpu.mq@5A58 = 2004FE34012002FE</action>
<action>maincpu.mq@5A60 = 2008FE0618F03E04</action>
<action>maincpu.mq@5A68 = 20FEC97786103E05</action>
<action>maincpu.mq@5A70 = C080FE05187E0320</action>
<action>maincpu.mq@5A78 = FFFFC905B6CDF23E</action>
<!--
5A40 | 21 01 81 : ld hl,$8101 // temporary input address
5A43 | 3A 00 A0 : ld a,($A000) // read start button
5A46 | E6 80 : and $80
5A48 | 47 : ld b,a
5A49 | 3A 00 A8 : ld a,($A800) // read other inputs
5A4C | E6 2F : and $2F
5A4E | B0 : or b
5A4F | BE : cp (hl)
5A50 | 77 : ld (hl),a
5A51 | C8 : ret z
5A52 | 2B : dec hl // sound code address ($8100)
5A53 | FE 01 : cp $01
5A55 | 20 01 : jr nz,$5A58
5A57 | 35 : dec (hl) // decraese code -01
5A58 | FE 02 : cp $02
5A5A | 20 01 : jr nz,$5A5D
5A5C | 34 : inc (hl) // increase code +01
5A5D | FE 04 : cp $04
5A5F | 20 04 : jr nz,$5A65
5A61 | 3E F0 : ld a,$F0 // decrease code -10
5A63 | 18 06 : jr $5A6B
5A65 | FE 08 : cp $08
5A67 | 20 05 : jr nz,$5A6E
5A69 | 3E 10 : ld a,$10 // increase code +10
5A6B | 86 : add a,(hl)
5A6C | 77 : ld (hl),a
5A6D | C9 : ret
5A6E | FE 20 : cp $20
5A70 | 20 03 : jr nz,$5A75
5A72 | 7E : ld a,(hl) // play sound
5A73 | 18 05 : jr $5A7A
5A75 | FE 80 : cp $80
5A77 | C0 : ret nz
5A78 | 3E F2 : ld a,$F2 // stop sound
5A7A | CD B6 05 : call $05B6 // send sound code
5A7D | C9 : ret
-->
</script>
<script state="run">
<output format="----- 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="<< sound code %02X >>" line="19" align="center" >
<argument>maincpu.pb@8100</argument>
</output>
</script>
<script state="off">
<action>maincpu.mb@007B = 69 </action>
<action>maincpu.mb@0B5B = F7 </action>
<action>maincpu.mw@51DE = 0D48 </action>
<action>maincpu.mq@5A40 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@5A48 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@5A50 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@5A58 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@5A60 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@5A68 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@5A70 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@5A78 = FFFFFFFFFFFFFFFF</action>
</script>
</cheat>
<cheat desc="skip ram/rom check">
<script state="on">
<action>maincpu.mw@0006 = 0A7C</action>
</script>
<script state="off">
<action>maincpu.mw@0006 = 0170</action>
</script>
</cheat>
</mamecheat>
"sea speed" and "short hit mark" : Added new.
"bullet speed" : Converted value parameter to item parameter.