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: 1315 Joined: Tue Dec 01, 2020 1:24 pm
Been thanked: 9 times
Post
by jman » Wed Jul 14, 2021 10:47 am
Code: Select all
<cheat desc="no hit">
<script state="on">
<action>maincpu.mb@1a0e = c3</action> <!-- enemy -->
<action>maincpu.mb@196c = c3</action> <!-- bullet -->
<action>maincpu.mb@2f18 = c3</action> <!-- boss -->
<action>maincpu.mb@9a65 = 8e</action> <!-- scenery -->
<action>maincpu.mb@1c66 = c3</action> <!-- enemy in cave 1 -->
<action>maincpu.mb@1c40 = c3</action> <!-- enemy in cave 2 -->
<action>maincpu.mb@1f57 = 8e</action> <!-- block in cave -->
<action>maincpu.mb@2e03 = 8e</action> <!-- boss 2 -->
<action>maincpu.mb@2cf9 = 8e</action> <!-- boss 3 -->
<action>maincpu.mb@2bde = 8e</action> <!-- boss 4 -->
</script>
<script state="off">
<action>maincpu.mb@1a0e = d2</action>
<action>maincpu.mb@196c = d2</action>
<action>maincpu.mb@2f18 = d2</action>
<action>maincpu.mb@9a65 = ce</action>
<action>maincpu.mb@1c66 = d2</action>
<action>maincpu.mb@1c40 = d2</action>
<action>maincpu.mb@1f57 = ce</action>
<action>maincpu.mb@2e03 = ce</action>
</script>
</cheat>
<cheat desc="auto fire">
<script state="on">
<action>maincpu.md@0a21 = 003e0038</action> <!-- normal shot -->
<action>maincpu.mb@0bba = 01</action> <!-- 3-way -->
</script>
<script state="off">
<action>maincpu.md@0a21 = 0e3e0238</action>
<action>maincpu.mb@0bba = 20</action>
</script>
</cheat>
<cheat desc="move manually">
<script state="on">
<!-- up/down -->
<action>maincpu.md@8ff3 = cbb9d0cd</action> <!-- down -->
<action>maincpu.md@9cef = c9b9d0cd</action> <!-- up -->
<action>maincpu.mq@b9d0 = 2103200ce6c02d3a</action>
<action>maincpu.mq@b9d8 = ffffc9c0d2220000</action>
<!--
b9d0 | 3a 2d c0 : ld a,($c02d)
b9d3 | e6 0c : and $0c
b9d5 | 20 03 : jr nz,$89da
b9d7 | 21 00 00 : ld hl,$0000
b9da | 22 d2 c0 : ld ($c0d2),hl
b9dd | c9 : ret
-->
<!-- left/right -->
<action>maincpu.md@9d39 = c9b9e0cd</action>
<action>maincpu.mq@b9e0 = 21032003e6c02d3a</action>
<action>maincpu.mq@b9e8 = ffffc9c0c2220000</action>
<!--
b9e0 | 3a 2d c0 : ld a,($c02d)
b9e3 | e6 03 : and $03
b9e5 | 20 03 : jr nz,$89ea
b9e7 | 21 00 00 : ld hl,$0000
b9ea | 22 c2 c0 : ld ($c0c2),hl
b9ed | c9 : ret
-->
</script>
<script state="off">
<action>maincpu.md@8ff3 = cbc0d222</action>
<action>maincpu.md@9cef = c9c0d222</action>
<action>maincpu.mq@b9d0 = ffffffffffffffff</action>
<action>maincpu.mq@b9d8 = ffffffffffffffff</action>
<action>maincpu.md@9d39 = c9c0c222</action>
<action>maincpu.mq@b9e0 = ffffffffffffffff</action>
<action>maincpu.mq@b9e8 = ffffffffffffffff</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@73f5 = 16b9a0c3</action>
<action>maincpu.mq@b9a0 = 003ac10022010021</action>
<action>maincpu.mq@b9a8 = b0f8013a470707f8</action>
<action>maincpu.mq@b9b0 = 012008feef286fbd</action>
<action>maincpu.mq@b9b8 = 02fe25012004fe24</action>
<action>maincpu.mq@b9c0 = 2001fe06187c0320</action>
<action>maincpu.mq@b9c8 = d318f80632ff3e05</action>
<!--
b9a0 | 21 00 01 : ld hl,$0100 // initialize sound and input values
b9a3 | 22 00 c1 : ld ($c100),hl
b9a6 | 3a 00 f8 : ld a,($f800) // read joystick input
b9a9 | 07 : rlca
b9aa | 07 : rlca
b9ab | 47 : ld b,a
b9ac | 3a 01 f8 : ld a,($f801) // read button input
b9af | b0 : or b
b9b0 | bd : cp l
b9b1 | 6f : ld l,a
b9b2 | 28 ef : jr z,$b9a3
b9b4 | fe 08 : cp $08
b9b6 | 20 01 : jr nz,$b9b9
b9b8 | 24 : inc h // increase code
b9b9 | fe 04 : cp $04
b9bb | 20 01 : jr nz,$b9be
b9bd | 25 : dec h // decrease code
b9be | fe 01 : cp $01
b9c0 | 20 03 : jr nz,$b9c5
b9c2 | 7c : ld a,h // play sound
b9c3 | 18 06 : jr $b9cb
b9c5 | fe 02 : cp $02
b9c7 | 20 05 : jr nz,$b9ce
b9c9 | 3e 00 : ld a,$ff // stop sound
b9cb | 32 06 f8 : ld ($f806),a // send sound code
b9ce | 18 d3 : jr $b9a3
-->
<action>soundcpu.mb@007a = 00</action> <!-- accept sound stop code -->
</script>
<script state="run">
<output format="----- backfire 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="<< sound code %2.2X >>" line="17" align="center">
<argument>maincpu.pb@c101</argument>
</output>
</script>
<script state="off">
<action> maincpu.md@73f5 = 16f0cde5</action>
<action> maincpu.mq@b9a0 = ffffffffffffffff</action>
<action> maincpu.mq@b9a8 = ffffffffffffffff</action>
<action> maincpu.mq@b9b0 = ffffffffffffffff</action>
<action> maincpu.mq@b9b8 = ffffffffffffffff</action>
<action> maincpu.mq@b9c0 = ffffffffffffffff</action>
<action> maincpu.mq@b9c8 = ffffffffffffffff</action>
<action>soundcpu.mb@007a = 01</action>
</script>
</cheat>
"move manually" requires enough test. This code causes background gfx buggy in scrolling.
jman
Posts: 1315 Joined: Tue Dec 01, 2020 1:24 pm
Been thanked: 9 times
Post
by jman » Sat Nov 05, 2022 8:12 am
Code: Select all
<cheat desc="no inertia (test)">
<script state="on">
<!-- up/down -->
<action>maincpu.md@8ff3 = cbb9a0cd</action> <!-- down -->
<action>maincpu.md@9cef = c9b9a0cd</action> <!-- up -->
<action>maincpu.mq@b9a0 = 2103200ce6c02d3a</action>
<action>maincpu.mq@b9a8 = ffffc9c0d2220000</action>
<!--
b9a0 | 3a 2d c0 : ld a,($C02D)
b9a3 | e6 0c : and $0C
b9a5 | 20 03 : jr nz,$B9AA
b9a7 | 21 00 00 : ld hl,$0000
b9aa | 22 d2 c0 : ld ($C0D2),hl
b9ad | c9 : ret
-->
<!-- left/right -->
<action>maincpu.md@9d39 = c9b9b0cd</action>
<action>maincpu.mq@b9b0 = 21032003e6c02d3a</action>
<action>maincpu.mq@b9b8 = ffffc9c0c2220000</action>
<!--
b9b0 | 3a 2d c0 : ld a,($C02D)
b9b3 | e6 03 : and $03
b9b5 | 20 03 : jr nz,$B9BA
b9b7 | 21 00 00 : ld hl,$0000
b9ba | 22 c2 c0 : ld ($C0C2),hl
b9bd | c9 : ret
-->
</script>
<script state="off">
<action>maincpu.md@8ff3 = cbc0d222</action>
<action>maincpu.md@9cef = c9c0d222</action>
<action>maincpu.mq@b9a0 = ffffffffffffffff</action>
<action>maincpu.mq@b9a8 = ffffffffffffffff</action>
<action>maincpu.md@9d39 = c9c0c222</action>
<action>maincpu.mq@b9b0 = ffffffffffffffff</action>
<action>maincpu.mq@b9b8 = ffffffffffffffff</action>
</script>
</cheat>
"move manually" : reallocate address. rename to "no inertia". downgrade to "test" code because of background scroll problem.
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@73f5 = 16b9c0c3</action>
<action>maincpu.mq@b9c0 = 03e6f8013ac10021</action>
<action>maincpu.mq@b9c8 = f8003a4f07070707</action>
<action>maincpu.mq@b9d0 = 2001feee2847b8b1</action>
<action>maincpu.mq@b9d8 = fe34012002fe3501</action>
<action>maincpu.mq@b9e0 = fe0618f03e042004</action>
<action>maincpu.mq@b9e8 = 787786103e052008</action>
<action>maincpu.mq@b9f0 = fe06187e032020fe</action>
<action>maincpu.mq@b9f8 = f80632ff3e052010</action>
<action>maincpu.mq@ba00 = ffffffffffffc118</action>
<!--
b9c0 | 21 00 c1 : ld hl,$C100 // sound code address
b9c3 | 3a 01 f8 : ld a,($F801) // read button inputs
b9c6 | e6 03 : and $03
b9c8 | 07 : rlca
b9c9 | 07 : rlca
b9ca | 07 : rlca
b9cb | 07 : rlca
b9cc | 4f : ld c,a
b9cd | 3a 00 f8 : ld a,($F800) // read joystick inputs
b9d0 | b1 : or c
b9d1 | b8 : cp b
b9d2 | 47 : ld b,a
b9d3 | 28 ee : jr z,$B9C3
b9d5 | fe 01 : cp $01
b9d7 | 20 01 : jr nz,$B9DA
b9d9 | 35 : dec (hl) // decrease code -01
b9da | fe 02 : cp $02
b9dc | 20 01 : jr nz,$B9DF
b9de | 34 : inc (hl) // increase code +01
b9df | fe 04 : cp $04
b9e1 | 20 04 : jr nz,$B9E7
b9e3 | 3e f0 : ld a,$F0 // decrease code -10
b9e5 | 18 06 : jr $B9ED
b9e7 | fe 08 : cp $08
b9e9 | 20 05 : jr nz,$B9F0
b9eb | 3e 10 : ld a,$10 // increase code +10
b9ed | 86 : add a,(hl)
b9ee | 77 : ld (hl),a
b9ef | 78 : ld a,b
b9f0 | fe 20 : cp $20
b9f2 | 20 03 : jr nz,$B9F7
b9f4 | 7e : ld a,(hl) // play sound
b9f5 | 18 06 : jr $B9FD
b9f7 | fe 10 : cp $10
b9f9 | 20 05 : jr nz,$BA00
b9fb | 3e ff : ld a,$FF // stop sound
b9fd | 32 06 f8 : ld ($F806),a // send sound code
ba00 | 18 c1 : jr $B9C3
-->
<action>soundcpu.mb@007a = 00</action> <!-- accept sound stop code -->
</script>
<script state="run">
<output format="----- back fire 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="<< sound code %2.2X >>" line="19" align="center" >
<argument>maincpu.pb@c100</argument>
</output>
</script>
<script state="off">
<action> maincpu.md@73f5 = 16f0cde5</action>
<action> maincpu.mq@b9c0 = ffffffffffffffff</action>
<action> maincpu.mq@b9c8 = ffffffffffffffff</action>
<action> maincpu.mq@b9d0 = ffffffffffffffff</action>
<action> maincpu.mq@b9d8 = ffffffffffffffff</action>
<action> maincpu.mq@b9e0 = ffffffffffffffff</action>
<action> maincpu.mq@b9e8 = ffffffffffffffff</action>
<action> maincpu.mq@b9f0 = ffffffffffffffff</action>
<action> maincpu.mq@b9f8 = ffffffffffffffff</action>
<action> maincpu.mq@ba00 = ffffffffffffffff</action>
<action>soundcpu.mb@007a = 01</action>
</script>
</cheat>
"sound test mode" : rewrite routine. reallocate address. add up/down key (code ±10).
jman
Posts: 1315 Joined: Tue Dec 01, 2020 1:24 pm
Been thanked: 9 times
Post
by jman » Wed Dec 04, 2024 9:43 am
backfirt.xml
Code: Select all
<!-- Back Fire (Tecmo, bootleg) -->
<mamecheat version="1">
<cheat desc="no hit">
<script state="on">
<action>maincpu.mb@196C = C3</action> <!-- bullet -->
<action>maincpu.mb@1A0E = C3</action> <!-- enemy -->
<action>maincpu.mb@1C40 = C3</action> <!-- enemy (cave) -->
<action>maincpu.mb@1C66 = C3</action> <!-- enemy (cave) -->
<action>maincpu.mb@1F57 = 8E</action> <!-- block (cave) -->
<action>maincpu.mb@2BDE = 8E</action> <!-- boss -->
<action>maincpu.mb@2CF9 = 8E</action> <!-- boss -->
<action>maincpu.mb@2E03 = 8E</action> <!-- boss -->
<action>maincpu.mb@2F18 = C3</action> <!-- boss -->
<action>maincpu.mb@9A65 = 8E</action> <!-- background -->
</script>
<script state="off">
<action>maincpu.mb@196C = D2</action>
<action>maincpu.mb@1A0E = D2</action>
<action>maincpu.mb@1C40 = D2</action>
<action>maincpu.mb@1C66 = D2</action>
<action>maincpu.mb@1F57 = CE</action>
<action>maincpu.mb@2BDE = CE</action>
<action>maincpu.mb@2CF9 = CE</action>
<action>maincpu.mb@2E03 = CE</action>
<action>maincpu.mb@2F18 = D2</action>
<action>maincpu.mb@9A65 = CE</action>
</script>
</cheat>
<cheat desc="rapid fire">
<script state="on">
<action>maincpu.md@0A21 = 003E0038</action> <!-- normal shot -->
<action>maincpu.mw@0BB9 = 0136 </action> <!-- 3-way -->
</script>
<script state="off">
<action>maincpu.md@0A21 = 0E3E0238</action>
<action>maincpu.mw@0BB9 = 2036 </action>
</script>
</cheat>
<cheat desc="no inertia (test)">
<!-- cause background scroll problem -->
<script state="on">
<!-- up/down -->
<action>maincpu.md@8FF3 = CBB9A0CD </action> <!-- down -->
<action>maincpu.md@9CEF = C9B9A0CD </action> <!-- up -->
<action>maincpu.mq@B9A0 = 2103200CE6C02D3A</action>
<action>maincpu.mq@B9A8 = FFFFC9C0D2220000</action>
<!--
B9A0 | 3A 2D C0 : ld a,($C02D)
B9A3 | E6 0C : and $0C
B9A5 | 20 03 : jr nz,$B9AA
B9A7 | 21 00 00 : ld hl,$0000
B9AA | 22 D2 C0 : ld ($C0D2),hl
B9AD | C9 : ret
-->
<!-- left/right -->
<action>maincpu.md@9D39 = C9B9B0CD </action>
<action>maincpu.mq@B9B0 = 21032003E6C02D3A</action>
<action>maincpu.mq@B9B8 = FFFFC9C0C2220000</action>
<!--
B9B0 | 3A 2D C0 : ld a,($C02D)
B9B3 | E6 03 : and $03
B9B5 | 20 03 : jr nz,$B9BA
B9B7 | 21 00 00 : ld hl,$0000
B9BA | 22 C2 C0 : ld ($C0C2),hl
B9BD | C9 : ret
-->
</script>
<script state="off">
<action>maincpu.md@8FF3 = CBC0D222 </action>
<action>maincpu.md@9CEF = C9C0D222 </action>
<action>maincpu.mq@B9A0 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@B9A8 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.md@9D39 = C9C0C222 </action>
<action>maincpu.mq@B9B0 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@B9B8 = FFFFFFFFFFFFFFFF</action>
</script>
</cheat>
<cheat desc="condition red">
<script state="on">
<action>maincpu.mb@7D39 = C3</action>
<action>maincpu.mb@7D4C = C3</action>
</script>
<script state="off">
<action>maincpu.mb@7D39 = DA</action>
<action>maincpu.mb@7D4C = DA</action>
</script>
</cheat>
<cheat desc="max scroll 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="0xff">05 (fast)</item>
</parameter>
<script state="change">
<action>maincpu.mb@9D32 = param</action>
<action>maincpu.mb@9D38 = param</action>
</script>
<script state="off">
<action>maincpu.mb@9D32 = 08</action>
<action>maincpu.mb@9D38 = 08</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@73F5 = 16B9C0C3 </action>
<action>maincpu.mq@B9C0 = 03E6F8013AC10021</action>
<action>maincpu.mq@B9C8 = F8003A4F07070707</action>
<action>maincpu.mq@B9D0 = 2001FEEE2847B8B1</action>
<action>maincpu.mq@B9D8 = FE34012002FE3501</action>
<action>maincpu.mq@B9E0 = FE0618F03E042004</action>
<action>maincpu.mq@B9E8 = 787786103E052008</action>
<action>maincpu.mq@B9F0 = FE06187E032020FE</action>
<action>maincpu.mq@B9F8 = F80632FF3E052010</action>
<action>maincpu.mq@BA00 = FFFFFFFFFFFFC118</action>
<!--
B9C0 | 21 00 C1 : ld hl,$C100 // sound code address
B9C3 | 3A 01 F8 : ld a,($F801) // read buttons
B9C6 | E6 03 : and $03
B9C8 | 07 : rlca
B9C9 | 07 : rlca
B9CA | 07 : rlca
B9CB | 07 : rlca
B9CC | 4F : ld c,a
B9CD | 3A 00 F8 : ld a,($F800) // read other inputs
B9D0 | B1 : or c
B9D1 | B8 : cp b
B9D2 | 47 : ld b,a
B9D3 | 28 EE : jr z,$B9C3
B9D5 | FE 01 : cp $01
B9D7 | 20 01 : jr nz,$B9DA
B9D9 | 35 : dec (hl) // decrease code -01
B9DA | FE 02 : cp $02
B9DC | 20 01 : jr nz,$B9DF
B9DE | 34 : inc (hl) // increase code +01
B9DF | FE 04 : cp $04
B9E1 | 20 04 : jr nz,$B9E7
B9E3 | 3E F0 : ld a,$F0 // decrease code -10
B9E5 | 18 06 : jr $B9ED
B9E7 | FE 08 : cp $08
B9E9 | 20 05 : jr nz,$B9F0
B9EB | 3E 10 : ld a,$10 // increase code +10
B9ED | 86 : add a,(hl)
B9EE | 77 : ld (hl),a
B9EF | 78 : ld a,b
B9F0 | FE 20 : cp $20
B9F2 | 20 03 : jr nz,$B9F7
B9F4 | 7E : ld a,(hl) // play sound
B9F5 | 18 06 : jr $B9FD
B9F7 | FE 10 : cp $10
B9F9 | 20 05 : jr nz,$BA00
B9FB | 3E FF : ld a,$FF // stop sound
B9FD | 32 06 F8 : ld ($F806),a // send sound code
BA00 | 18 C1 : jr $B9C3
-->
<action>soundcpu.mb@007A = 00</action> <!-- accept sound stop code -->
</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="button 2 : stop sound" line="16" align="center" />
<output format="----------------------------" line="17" align="center" />
<output format="<< sound code %02X >>" line="19" align="center" >
<argument>maincpu.pb@C100</argument>
</output>
</script>
<script state="off">
<action> maincpu.md@73F5 = 16F0CDE5 </action>
<action> maincpu.mq@B9C0 = FFFFFFFFFFFFFFFF</action>
<action> maincpu.mq@B9C8 = FFFFFFFFFFFFFFFF</action>
<action> maincpu.mq@B9D0 = FFFFFFFFFFFFFFFF</action>
<action> maincpu.mq@B9D8 = FFFFFFFFFFFFFFFF</action>
<action> maincpu.mq@B9E0 = FFFFFFFFFFFFFFFF</action>
<action> maincpu.mq@B9E8 = FFFFFFFFFFFFFFFF</action>
<action> maincpu.mq@B9F0 = FFFFFFFFFFFFFFFF</action>
<action> maincpu.mq@B9F8 = FFFFFFFFFFFFFFFF</action>
<action> maincpu.mq@BA00 = FFFFFFFFFFFFFFFF</action>
<action>soundcpu.mb@007A = 01 </action>
</script>
</cheat>
<cheat desc="skip ram/rom check">
<script state="on">
<action>maincpu.md@7323 = 017347C3</action> <!-- work ram -->
<action>maincpu.md@734B = 0173CFC3</action> <!-- video ram/rom -->
<action>maincpu.mw@7455 = 0010 </action> <!-- result display -->
<action>maincpu.mw@748A = 0010 </action> <!-- cross-hatch -->
</script>
<script state="off">
<action>maincpu.md@7323 = 01C00021</action>
<action>maincpu.md@734B = 01D00021</action>
<action>maincpu.mw@7455 = F410 </action>
<action>maincpu.mw@748A = F410 </action>
</script>
</cheat>
</mamecheat>
"condition red" : Added new. This code keeps enemy condition as "red".
"skip ram/rom check" : Added new. But background and sprites don't be cleared when you set this code and "sound test mode" at the same time then reset the game.