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: 865 Joined: Tue Dec 01, 2020 1:24 pm
Post
by jman » Fri Jul 09, 2021 9:22 am
Code: Select all
<cheat desc="no hit">
<script state="on">
<action>maincpu.mb@1986 = c9</action>
</script>
<script state="off">
<action>maincpu.mb@1986 = c0</action>
</script>
</cheat>
<cheat desc="auto fire">
<script state="on">
<action>maincpu.mb@3ae3 = c3</action>
</script>
<script state="off">
<action>maincpu.mb@3ae3 = c2</action>
</script>
</cheat>
<cheat desc="player speed">
<parameter min="0x01" max="0x08" step="0x01" />
<script state="change">
<action>maincpu.mb@4f7a = param</action> <!-- right -->
<action>maincpu.mb@4f96 = -param</action> <!-- left -->
<action>maincpu.mb@4fb6 = param</action> <!-- up -->
<action>maincpu.mb@4fd9 = -param</action> <!-- down -->
</script>
<script state="off">
<action>maincpu.mb@4f7a = 03</action>
<action>maincpu.mb@4f96 = fd</action>
<action>maincpu.mb@4fb6 = 03</action>
<action>maincpu.mb@4fd9 = fd</action>
</script>
</cheat>
<cheat desc="bullet speed">
<parameter>
<item value="0x09">01 (slow)</item>
<item value="0x12">02 </item>
<item value="0x1b">03 </item>
<item value="0x24">04 </item>
<item value="0x2d">05 (fast)</item>
</parameter>
<script state="change">
<!-- green -->
<action>maincpu.mb@3e1e = param</action>
<!-- red -->
<action>maincpu.mb@3f06 = param</action>
<action>maincpu.mb@3f08 = param</action>
<action>maincpu.mb@3f0a = param</action>
</script>
<script state="off">
<action>maincpu.mb@3e1e = 12</action>
<action>maincpu.mb@3f06 = 12</action>
<action>maincpu.mb@3f08 = 12</action>
<action>maincpu.mb@3f0a = 12</action>
</script>
</cheat>
<cheat desc="sound test mode">
<comment>reset the game (F3) to enter sound test mode</comment>
<script state="on">
<action>maincpu.mq@00a0 = 0a3ad00022600021</action>
<action>maincpu.mq@00a8 = 2802fef6286fbdd0</action>
<action>maincpu.mq@00b0 = 2810fe0d2801fe0e</action>
<action>maincpu.mq@00b8 = 25e4180b2820fe0c</action>
<action>maincpu.mq@00c0 = 01187cde1824e118</action>
<action>maincpu.mq@00c8 = 0000d518e02032af</action>
<!--
00a0 | 21 00 60 : ld hl,$6000 // initialize sound and input values
00a3 | 22 00 d0 : ld ($d000),hl
00a6 | 3a 0a d0 : ld a,($d00a) // read input
00a9 | bd : cp l
00aa | 6f : ld l,a
00ab | 28 f6 : jr z,$a3
00ad | fe 02 : cp $02 // pressed left?
00af | 28 0e : jr z,$bf
00b1 | fe 01 : cp $01 // pressed right?
00b3 | 28 0d : jr z,$c2
00b5 | fe 10 : cp $10
00b7 | 28 0c : jr z,$c5 // pressed button1?
00b9 | fe 20 : cp $20
00bb | 28 0b : jr z,$c8 // pressed button2?
00bd | 18 e4 : jr $a3
00bf | 25 : dec h // decrease code
00c0 | 18 e1 : jr $a3
00c2 | 24 : inc h // increase code
00c3 | 18 de : jr $a3
00c5 | 7c : ld a,h // play sound
00c6 | 18 01 : jr $c9
00c8 | af : xor a // stop sound
00c9 | 32 20 e0 : ld ($e020),a // send sound code
00cc | 18 d5 : jr $a3
-->
</script>
<script state="run">
<output format="----- flying tiger 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@d001</argument>
</output>
</script>
<script state="off">
<action>maincpu.mq@00a0 = 3ed23753ed030011</action>
<action>maincpu.mq@00a8 = 3ed61632d2343201</action>
<action>maincpu.mq@00b0 = 0032043ed6153200</action>
<action>maincpu.mq@00b8 = 30ca47cbe0063ae0</action>
<action>maincpu.mq@00c0 = f2c3e00032023eb7</action>
<action>maincpu.mq@00c8 = 000000027f000833</action>
</script>
</cheat>
jman
Posts: 865 Joined: Tue Dec 01, 2020 1:24 pm
Post
by jman » Sun Nov 27, 2022 1:29 pm
Code: Select all
<cheat desc="player 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@4f7a = param</action> <!-- right -->
<action>maincpu.mb@4f96 = -param</action> <!-- left -->
<action>maincpu.mb@4fb6 = param</action> <!-- up -->
<action>maincpu.mb@4fd9 = -param</action> <!-- down -->
</script>
<script state="off">
<action>maincpu.mb@4f7a = 03</action>
<action>maincpu.mb@4f96 = fd</action>
<action>maincpu.mb@4fb6 = 03</action>
<action>maincpu.mb@4fd9 = fd</action>
</script>
</cheat>
"player speed" : change parameter from values to items.
Code: Select all
<cheat desc="sound test mode">
<comment>reset the game (F3) to enter sound test mode</comment>
<script state="on">
<action>maincpu.mq@00a0 = 47b8e0003ad10021</action>
<action>maincpu.mq@00a8 = fe350120fdfef928</action>
<action>maincpu.mq@00b0 = 0420fbfe340120fe</action>
<action>maincpu.mq@00b8 = 0520f7fe0618f03e</action>
<action>maincpu.mq@00c0 = 20effe787786103e</action>
<action>maincpu.mq@00c8 = 0420dffe05187e03</action>
<action>maincpu.mq@00d0 = 0000cd18e02032af</action>
<!--
00a0 | 21 00 d1 : ld hl,$D100 // sound code address
00a3 | 3a 00 e0 : ld a,($E000) // read input
00a6 | b8 : cp b
00a7 | 47 : ld b,a
00a8 | 28 f9 : jr z,$00A3
00aa | fe fd : cp $FD
00ac | 20 01 : jr nz,$00AF
00ae | 35 : dec (hl) // decrease code -01
00af | fe fe : cp $FE
00b1 | 20 01 : jr nz,$00B4
00b3 | 34 : inc (hl) // increase code +01
00b4 | fe fb : cp $FB
00b6 | 20 04 : jr nz,$00BC
00b8 | 3e f0 : ld a,$F0 // decrease code -10
00ba | 18 06 : jr $00C2
00bc | fe f7 : cp $F7
00be | 20 05 : jr nz,$00C5
00c0 | 3e 10 : ld a,$10 // increase code +10
00c2 | 86 : add a,(hl)
00c3 | 77 : ld (hl),a
00c4 | 78 : ld a,b
00c5 | fe ef : cp $EF
00c7 | 20 03 : jr nz,$00CC
00c9 | 7e : ld a,(hl) // play sound
00ca | 18 05 : jr $00D1
00cc | fe df : cp $DF
00ce | 20 04 : jr nz,$00D4
00d0 | af : xor a // stop sound
00d1 | 32 20 e0 : ld ($E020),a // send sound code
00d4 | 18 cd : jr $00A3
-->
<action>audiocpu.mb@03bd = cd</action> <!-- stop sfx and music at the same time -->
</script>
<script state="run">
<output format="----- flying tiger 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@d100</argument>
</output>
</script>
<script state="off">
<action> maincpu.mq@00a0 = 3ed23753ed030011</action>
<action> maincpu.mq@00a8 = 3ed61632d2343201</action>
<action> maincpu.mq@00b0 = 0032043ed6153200</action>
<action> maincpu.mq@00b8 = 30ca47cbe0063ae0</action>
<action> maincpu.mq@00c0 = f2c3e00032023eb7</action>
<action> maincpu.mq@00c8 = 000000027f000833</action>
<action> maincpu.mq@00d0 = 0000004e08000800</action>
<action>audiocpu.mb@03bd = c3</action>
</script>
</cheat>
"sound test mode" : rewrite routine. add up/down key (code ±10). fix sfx and music stop problem.
jman
Posts: 865 Joined: Tue Dec 01, 2020 1:24 pm
Post
by jman » Sat Feb 17, 2024 11:48 pm
flytiger.xml
Code: Select all
<!-- Flying Tiger (set 1) -->
<mamecheat version="1">
<cheat desc="no hit">
<script state="on">
<action>maincpu.mb@1986 = C9</action>
</script>
<script state="off">
<action>maincpu.mb@1986 = C0</action>
</script>
</cheat>
<cheat desc="auto fire">
<script state="on">
<action>maincpu.mb@3AE3 = C3</action>
</script>
<script state="off">
<action>maincpu.mb@3AE3 = C2</action>
</script>
</cheat>
<cheat desc="player 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@4F7A = param</action> <!-- right -->
<action>maincpu.mb@4F96 = -param</action> <!-- left -->
<action>maincpu.mb@4FB6 = param</action> <!-- up -->
<action>maincpu.mb@4FD9 = -param</action> <!-- down -->
</script>
<script state="off">
<action>maincpu.mb@4F7A = 03</action>
<action>maincpu.mb@4F96 = FD</action>
<action>maincpu.mb@4FB6 = 03</action>
<action>maincpu.mb@4FD9 = FD</action>
</script>
</cheat>
<cheat desc="bullet speed">
<parameter>
<item value="0x09">01 (slow)</item>
<item value="0x12">02 </item>
<item value="0x1b">03 </item>
<item value="0x24">04 </item>
<item value="0x2d">05 (fast)</item>
</parameter>
<script state="change">
<!-- green -->
<action>maincpu.mb@3E1E = param</action>
<!-- red -->
<action>maincpu.mb@3F06 = param</action>
<action>maincpu.mb@3F08 = param</action>
<action>maincpu.mb@3F0A = param</action>
</script>
<script state="off">
<action>maincpu.mb@3E1E = 12</action>
<action>maincpu.mb@3F06 = 12</action>
<action>maincpu.mb@3F08 = 12</action>
<action>maincpu.mb@3F0A = 12</action>
</script>
</cheat>
<cheat desc="sound test mode">
<comment>reset the game (F3) to enter sound test mode</comment>
<script state="on">
<action>maincpu.mb@2221 = 03 </action> <!-- fix bank -->
<action>maincpu.mq@00A0 = 86F0C3E00032033E</action>
<action>maincpu.mq@C6F0 = 47B8E0003AD10021</action>
<action>maincpu.mq@C6F8 = FE350120FDFEF928</action>
<action>maincpu.mq@C700 = 0420FBFE340120FE</action>
<action>maincpu.mq@C708 = 0520F7FE0618F03E</action>
<action>maincpu.mq@C710 = 20EFFE787786103E</action>
<action>maincpu.mq@C718 = 0420DFFE05187E03</action>
<action>maincpu.mq@C720 = FFFFCD18E02032AF</action>
<!--
00A0 | 3E 03 : ld a,$03 // set bank
00A2 | 32 00 E0 : ld ($E000),a
00A5 | C3 F0 86 : jp $86F0
================================
86F0 | 21 00 D1 : ld hl,$D100 // sound code address
86F3 | 3A 00 E0 : ld a,($E000) // read input
86F6 | B8 : cp b
86F7 | 47 : ld b,a
86F8 | 28 F9 : jr z,$86F3
86FA | FE FD : cp $FD
86FC | 20 01 : jr nz,$86FF
86FE | 35 : dec (hl) // decrease code -01
86FF | FE FE : cp $FE
8701 | 20 01 : jr nz,$8704
8703 | 34 : inc (hl) // increase code +01
8704 | FE FB : cp $FB
8706 | 20 04 : jr nz,$870C
8708 | 3E F0 : ld a,$F0 // decrease code -10
870A | 18 06 : jr $8712
870C | FE F7 : cp $F7
870E | 20 05 : jr nz,$8715
8710 | 3E 10 : ld a,$10 // increase code +10
8712 | 86 : add a,(hl)
8713 | 77 : ld (hl),a
8714 | 78 : ld a,b
8715 | FE EF : cp $EF
8717 | 20 03 : jr nz,$871C
8719 | 7E : ld a,(hl) // play sound
871A | 18 05 : jr $8721
871C | FE DF : cp $DF
871E | 20 04 : jr nz,$8724
8720 | AF : xor a // stop sound
8721 | 32 20 E0 : ld ($E020),a // send sound code
8724 | 18 CD : jr $86F3
-->
<action>audiocpu.mb@03BD = CD</action> <!-- stop sfx and music at the same time -->
</script>
<script state="run">
<output format="----- flying tiger 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@D100</argument>
</output>
</script>
<script state="off">
<action> maincpu.mb@2221 = 02 </action>
<action> maincpu.mq@00A0 = 3ED23753ED030011</action>
<action> maincpu.mq@C6F0 = FFFFFFFFFFFFFFFF</action>
<action> maincpu.mq@C6F8 = FFFFFFFFFFFFFFFF</action>
<action> maincpu.mq@C700 = FFFFFFFFFFFFFFFF</action>
<action> maincpu.mq@C708 = FFFFFFFFFFFFFFFF</action>
<action> maincpu.mq@C710 = FFFFFFFFFFFFFFFF</action>
<action> maincpu.mq@C718 = FFFFFFFFFFFFFFFF</action>
<action> maincpu.mq@C720 = FFFFFFFFFFFFFFFF</action>
<action>audiocpu.mb@03BD = C3 </action>
</script>
</cheat>
</mamecheat>
flytigera.xml
Code: Select all
<!-- Flying Tiger (set 2) -->
<mamecheat version="1">
<cheat desc="no hit">
<script state="on">
<action>maincpu.mb@1971 = C9</action>
</script>
<script state="off">
<action>maincpu.mb@1971 = C0</action>
</script>
</cheat>
<cheat desc="auto fire">
<script state="on">
<action>maincpu.mb@3AB0 = C3</action>
</script>
<script state="off">
<action>maincpu.mb@3AB0 = C2</action>
</script>
</cheat>
<cheat desc="player 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@4F47 = param</action> <!-- right -->
<action>maincpu.mb@4F63 = -param</action> <!-- left -->
<action>maincpu.mb@4F83 = param</action> <!-- up -->
<action>maincpu.mb@4FA6 = -param</action> <!-- down -->
</script>
<script state="off">
<action>maincpu.mb@4F47 = 03</action>
<action>maincpu.mb@4F63 = FD</action>
<action>maincpu.mb@4F83 = 03</action>
<action>maincpu.mb@4FA6 = FD</action>
</script>
</cheat>
<cheat desc="bullet speed">
<parameter>
<item value="0x09">01 (slow)</item>
<item value="0x12">02 </item>
<item value="0x1b">03 </item>
<item value="0x24">04 </item>
<item value="0x2d">05 (fast)</item>
</parameter>
<script state="change">
<!-- green -->
<action>maincpu.mb@3DEB = param</action>
<!-- red -->
<action>maincpu.mb@3ED3 = param</action>
<action>maincpu.mb@3ED5 = param</action>
<action>maincpu.mb@3ED7 = param</action>
</script>
<script state="off">
<action>maincpu.mb@3DEB = 12</action>
<action>maincpu.mb@3ED3 = 12</action>
<action>maincpu.mb@3ED5 = 12</action>
<action>maincpu.mb@3ED7 = 12</action>
</script>
</cheat>
<cheat desc="sound test mode">
<comment>reset the game (F3) to enter sound test mode</comment>
<script state="on">
<action>maincpu.mb@21F1 = 03 </action> <!-- fix bank -->
<action>maincpu.mq@00A0 = 86F0C3E00032033E</action>
<action>maincpu.mq@C6F0 = 47B8E0003AD10021</action>
<action>maincpu.mq@C6F8 = FE350120FDFEF928</action>
<action>maincpu.mq@C700 = 0420FBFE340120FE</action>
<action>maincpu.mq@C708 = 0520F7FE0618F03E</action>
<action>maincpu.mq@C710 = 20EFFE787786103E</action>
<action>maincpu.mq@C718 = 0420DFFE05187E03</action>
<action>maincpu.mq@C720 = FFFFCD18E02032AF</action>
<!--
00A0 | 3E 03 : ld a,$03 // set bank
00A2 | 32 00 E0 : ld ($E000),a
00A5 | C3 F0 86 : jp $86F0
================================
86F0 | 21 00 D1 : ld hl,$D100 // sound code address
86F3 | 3A 00 E0 : ld a,($E000) // read input
86F6 | B8 : cp b
86F7 | 47 : ld b,a
86F8 | 28 F9 : jr z,$86F3
86FA | FE FD : cp $FD
86FC | 20 01 : jr nz,$86FF
86FE | 35 : dec (hl) // decrease code -01
86FF | FE FE : cp $FE
8701 | 20 01 : jr nz,$8704
8703 | 34 : inc (hl) // increase code +01
8704 | FE FB : cp $FB
8706 | 20 04 : jr nz,$870C
8708 | 3E F0 : ld a,$F0 // decrease code -10
870A | 18 06 : jr $8712
870C | FE F7 : cp $F7
870E | 20 05 : jr nz,$8715
8710 | 3E 10 : ld a,$10 // increase code +10
8712 | 86 : add a,(hl)
8713 | 77 : ld (hl),a
8714 | 78 : ld a,b
8715 | FE EF : cp $EF
8717 | 20 03 : jr nz,$871C
8719 | 7E : ld a,(hl) // play sound
871A | 18 05 : jr $8721
871C | FE DF : cp $DF
871E | 20 04 : jr nz,$8724
8720 | AF : xor a // stop sound
8721 | 32 20 E0 : ld ($E020),a // send sound code
8724 | 18 CD : jr $86F3
-->
<action>audiocpu.mb@03BD = CD</action> <!-- stop sfx and music at the same time -->
</script>
<script state="run">
<output format="----- flying tiger 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@D100</argument>
</output>
</script>
<script state="off">
<action> maincpu.mb@21F1 = 02 </action>
<action> maincpu.mq@00A0 = 3ED23753ED030011</action>
<action> maincpu.mq@C6F0 = FFFFFFFFFFFFFFFF</action>
<action> maincpu.mq@C6F8 = FFFFFFFFFFFFFFFF</action>
<action> maincpu.mq@C700 = FFFFFFFFFFFFFFFF</action>
<action> maincpu.mq@C708 = FFFFFFFFFFFFFFFF</action>
<action> maincpu.mq@C710 = FFFFFFFFFFFFFFFF</action>
<action> maincpu.mq@C718 = FFFFFFFFFFFFFFFF</action>
<action> maincpu.mq@C720 = FFFFFFFFFFFFFFFF</action>
<action>audiocpu.mb@03BD = C3 </action>
</script>
</cheat>
</mamecheat>