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: 864 Joined: Tue Dec 01, 2020 1:24 pm
Post
by jman » Thu Dec 10, 2020 10:07 am
Code: Select all
<cheat desc="no hit">
<script state="on">
<action>slave.mb@0631 = c3</action> <!-- bullet -->
<action>slave.mb@070f = c3</action> <!-- enemy -->
<action>slave.mb@080d = c3</action> <!-- final boss -->
</script>
<script state="off">
<action>slave.mb@0631 = da</action>
<action>slave.mb@070f = da</action>
<action>slave.mb@080d = da</action>
</script>
</cheat>
<cheat desc="auto fire">
<script state="on">
<action>tc0090lvc.mb@52a4 = 00</action>
</script>
<script state="off">
<action>tc0090lvc.mb@52a4 = 1f</action>
</script>
</cheat>
<cheat desc="player speed">
<parameter min="0x01" max="0x05" step="0x01" />
<script state="change">
<action>tc0090lvc.mb@5213 = param</action> <!-- up -->
<action>tc0090lvc.mb@5226 = param</action> <!-- down -->
<action>tc0090lvc.mb@5232 = param</action> <!-- left -->
<action>tc0090lvc.mb@523a = param</action> <!-- right -->
</script>
<script state="off">
<action>tc0090lvc.mb@5213 = 02</action>
<action>tc0090lvc.mb@5226 = 02</action>
<action>tc0090lvc.mb@5232 = 02</action>
<action>tc0090lvc.mb@523a = 02</action>
</script>
</cheat>
<cheat desc="bullet speed">
<parameter>
<item value="0x06">01 (slow)</item>
<item value="0x0c">02 </item>
<item value="0x12">03 </item>
<item value="0x18">04 </item>
<item value="0x1e">05 (fast)</item>
</parameter>
<script state="change">
<action>tc0090lvc.mb@56c1 = param</action> <!-- shot level 1-4 -->
<action>tc0090lvc.mb@555d = param</action> <!-- shot level 5 -->
<action>tc0090lvc.mb@55dd = param</action> <!-- shot level 6 -->
</script>
<script state="off">
<action>tc0090lvc.mb@56c1 = 0c</action>
<action>tc0090lvc.mb@555d = 0c</action>
<action>tc0090lvc.mb@55dd = 0c</action>
</script>
</cheat>
jman
Posts: 864 Joined: Tue Dec 01, 2020 1:24 pm
Post
by jman » Sat Nov 13, 2021 10:43 am
Recent fhawk and clones don't have "tc0090lvc" region tag so that I replace it with "maincpu" for posted codes.
Code: Select all
<cheat desc="auto fire">
<script state="on">
<action>maincpu.mb@52a4 = 00</action>
</script>
<script state="off">
<action>maincpu.mb@52a4 = 1f</action>
</script>
</cheat>
<cheat desc="player speed">
<parameter min="0x01" max="0x05" step="0x01" />
<script state="change">
<action>maincpu.mb@5213 = param</action> <!-- up -->
<action>maincpu.mb@5226 = param</action> <!-- down -->
<action>maincpu.mb@5232 = param</action> <!-- left -->
<action>maincpu.mb@523a = param</action> <!-- right -->
</script>
<script state="off">
<action>maincpu.mb@5213 = 02</action>
<action>maincpu.mb@5226 = 02</action>
<action>maincpu.mb@5232 = 02</action>
<action>maincpu.mb@523a = 02</action>
</script>
</cheat>
<cheat desc="bullet speed">
<parameter>
<item value="0x06">01 (slow)</item>
<item value="0x0c">02 </item>
<item value="0x12">03 </item>
<item value="0x18">04 </item>
<item value="0x1e">05 (fast)</item>
</parameter>
<script state="change">
<action>maincpu.mb@56c1 = param</action> <!-- shot level 1-4 -->
<action>maincpu.mb@555d = param</action> <!-- shot level 5 -->
<action>maincpu.mb@55dd = param</action> <!-- shot level 6 -->
</script>
<script state="off">
<action>maincpu.mb@56c1 = 0c</action>
<action>maincpu.mb@555d = 0c</action>
<action>maincpu.mb@55dd = 0c</action>
</script>
</cheat>
Added "sound test mode".
Code: Select all
<cheat desc="sound test mode">
<comment>reset the game (F3) to enter sound test mode</comment>
<script state="on">
<action>maincpu.mb@005c = c9</action> <!-- disable sequence on main cpu -->
<action> slave.mw@0055 = 1000</action>
<action> slave.mq@1000 = 023ad00032e10021</action>
<action> slave.mq@1008 = 20fbfef62847b8d0</action>
<action> slave.mq@1010 = fe340120f7fe3501</action>
<action> slave.mq@1018 = dffe05187e0320ef</action>
<action> slave.mq@1020 = db180fa5cdaf0420</action>
<!--
1000 | 21 00 e1 : ld hl,$E100 // sound code address
1003 | 32 00 d0 : ld ($D000),a // watchdog
1006 | 3a 02 d0 : ld a,($D002) // read input
1009 | b8 : cp b
100a | 47 : ld b,a
100b | 28 f6 : jr z,$1003
100d | fe fb : cp $FB
100f | 20 01 : jr nz,$1012
1011 | 35 : dec (hl) // decrease code
1012 | fe f7 : cp $F7
1014 | 20 01 : jr nz,$1017
1016 | 34 : inc (hl) // increase code
1017 | fe ef : cp $EF
1019 | 20 03 : jr nz,$101E
101b | 7e : ld a,(hl) // play sound
101c | 18 05 : jr $1023
101e | fe df : cp $DF
1020 | 20 04 : jr nz,$1026
1022 | af : xor a // stop sound
1023 | cd a5 0f : call $0FA5
1026 | 18 db : jr $1003
-->
</script>
<script state="run">
<output format="----- fighting hawk 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>slave.pb@e100</argument>
</output>
</script>
<script state="off">
<action>maincpu.mb@005c = 21</action>
<action> slave.mw@0055 = 0122</action>
<action> slave.mq@1000 = ffffffffffffffff</action>
<action> slave.mq@1008 = ffffffffffffffff</action>
<action> slave.mq@1010 = ffffffffffffffff</action>
<action> slave.mq@1018 = ffffffffffffffff</action>
<action> slave.mq@1020 = ffffffffffffffff</action>
</script>
</cheat>
jman
Posts: 864 Joined: Tue Dec 01, 2020 1:24 pm
Post
by jman » Sat Nov 19, 2022 8:54 am
Code: Select all
<cheat desc="sound test mode">
<comment>reset the game (F3) to enter sound test mode</comment>
<script state="on">
<action>maincpu.mb@005c = c9</action> <!-- disable sequence on main cpu -->
<action> slave.mw@0055 = 1000</action>
<action> slave.mq@1000 = 023ad00032e10021</action>
<action> slave.mq@1008 = 20fbfef62847b8d0</action>
<action> slave.mq@1010 = fe340120f7fe3501</action>
<action> slave.mq@1018 = fe0618f03e0420fd</action>
<action> slave.mq@1020 = 787786103e0520fe</action>
<action> slave.mq@1028 = fe05187e0320effe</action>
<action> slave.mq@1030 = 180fa5cdaf0420df</action>
<action> slave.mq@1038 = ffffffffffffffca</action>
<!--
1000 | 21 00 e1 : ld hl,$E100 // sound code address
1003 | 32 00 d0 : ld ($D000),a // watchdog
1006 | 3a 02 d0 : ld a,($D002) // read input
1009 | b8 : cp b
100a | 47 : ld b,a
100b | 28 f6 : jr z,$1003
100d | fe fb : cp $FB
100f | 20 01 : jr nz,$1012
1011 | 35 : dec (hl) // decrease code -01
1012 | fe f7 : cp $F7
1014 | 20 01 : jr nz,$1017
1016 | 34 : inc (hl) // increase code +01
1017 | fe fd : cp $FD
1019 | 20 04 : jr nz,$101F
101b | 3e f0 : ld a,$F0 // decrease code -10
101d | 18 06 : jr $1025
101f | fe fe : cp $FE
1021 | 20 05 : jr nz,$1028
1023 | 3e 10 : ld a,$10 // increase code +10
1025 | 86 : add a,(hl)
1026 | 77 : ld (hl),a
1027 | 78 : ld a,b
1028 | fe ef : cp $EF
102a | 20 03 : jr nz,$102F
102c | 7e : ld a,(hl) // play sound
102d | 18 05 : jr $1034
102f | fe df : cp $DF
1031 | 20 04 : jr nz,$1037
1033 | af : xor a // stop sound
1034 | cd a5 0f : call $0FA5 // send sound code
1037 | 18 ca : jr $1003
-->
</script>
<script state="run">
<output format="----- fighting hawk 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>slave.pb@e100</argument>
</output>
</script>
<script state="off">
<action>maincpu.mb@005c = 21</action>
<action> slave.mw@0055 = 0122</action>
<action> slave.mq@1000 = ffffffffffffffff</action>
<action> slave.mq@1008 = ffffffffffffffff</action>
<action> slave.mq@1010 = ffffffffffffffff</action>
<action> slave.mq@1018 = ffffffffffffffff</action>
<action> slave.mq@1020 = ffffffffffffffff</action>
<action> slave.mq@1028 = ffffffffffffffff</action>
<action> slave.mq@1030 = ffffffffffffffff</action>
<action> slave.mq@1038 = ffffffffffffffff</action>
</script>
</cheat>
"sound test mode" : rewrite routine. add up/down key (code ±10).
jman
Posts: 864 Joined: Tue Dec 01, 2020 1:24 pm
Post
by jman » Mon Feb 19, 2024 1:16 am
fhawk.xml
Code: Select all
<!-- Fighting Hawk (World) -->
<mamecheat version="1">
<cheat desc="no hit">
<script state="on">
<action>slave.mb@0631 = C3</action> <!-- bullet -->
<action>slave.mb@070F = C3</action> <!-- enemy -->
<action>slave.mb@080D = C3</action> <!-- final boss -->
</script>
<script state="off">
<action>slave.mb@0631 = DA</action>
<action>slave.mb@070F = DA</action>
<action>slave.mb@080D = DA</action>
</script>
</cheat>
<cheat desc="auto fire">
<script state="on">
<action>maincpu.mb@52A4 = 00</action>
</script>
<script state="off">
<action>maincpu.mb@52A4 = 1F</action>
</script>
</cheat>
<cheat desc="player speed">
<parameter min="0x01" max="0x05" step="0x01" />
<script state="change">
<action>maincpu.mb@5213 = param</action> <!-- up -->
<action>maincpu.mb@5226 = param</action> <!-- down -->
<action>maincpu.mb@5232 = param</action> <!-- left -->
<action>maincpu.mb@523A = param</action> <!-- right -->
</script>
<script state="off">
<action>maincpu.mb@5213 = 02</action>
<action>maincpu.mb@5226 = 02</action>
<action>maincpu.mb@5232 = 02</action>
<action>maincpu.mb@523A = 02</action>
</script>
</cheat>
<cheat desc="bullet speed">
<parameter>
<item value="0x06">01 (slow)</item>
<item value="0x0c">02 </item>
<item value="0x12">03 </item>
<item value="0x18">04 </item>
<item value="0x1e">05 (fast)</item>
</parameter>
<script state="change">
<action>maincpu.mb@56C1 = param</action> <!-- shot level 1-4 -->
<action>maincpu.mb@555D = param</action> <!-- shot level 5 -->
<action>maincpu.mb@55DD = param</action> <!-- shot level 6 -->
</script>
<script state="off">
<action>maincpu.mb@56C1 = 0C</action>
<action>maincpu.mb@555D = 0C</action>
<action>maincpu.mb@55DD = 0C</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@005C = C9 </action> <!-- disable sequence on main cpu -->
<action> slave.mw@0055 = 1000 </action>
<action> slave.mq@1000 = 023AD00032E10021</action>
<action> slave.mq@1008 = 20FBFEF62847B8D0</action>
<action> slave.mq@1010 = FE340120F7FE3501</action>
<action> slave.mq@1018 = FE0618F03E0420FD</action>
<action> slave.mq@1020 = 787786103E0520FE</action>
<action> slave.mq@1028 = FE05187E0320EFFE</action>
<action> slave.mq@1030 = 180FA5CDAF0420DF</action>
<action> slave.mq@1038 = FFFFFFFFFFFFFFCA</action>
<!--
1000 | 21 00 E1 : ld hl,$E100 // sound code address
1003 | 32 00 D0 : ld ($D000),a // watchdog
1006 | 3A 02 D0 : ld a,($D002) // read input
1009 | B8 : cp b
100A | 47 : ld b,a
100B | 28 F6 : jr z,$1003
100D | FE FB : cp $FB
100F | 20 01 : jr nz,$1012
1011 | 35 : dec (hl) // decrease code -01
1012 | FE F7 : cp $F7
1014 | 20 01 : jr nz,$1017
1016 | 34 : inc (hl) // increase code +01
1017 | FE FD : cp $FD
1019 | 20 04 : jr nz,$101F
101B | 3E F0 : ld a,$F0 // decrease code -10
101D | 18 06 : jr $1025
101F | FE FE : cp $FE
1021 | 20 05 : jr nz,$1028
1023 | 3E 10 : ld a,$10 // increase code +10
1025 | 86 : add a,(hl)
1026 | 77 : ld (hl),a
1027 | 78 : ld a,b
1028 | FE EF : cp $EF
102A | 20 03 : jr nz,$102F
102C | 7E : ld a,(hl) // play sound
102D | 18 05 : jr $1034
102F | FE DF : cp $DF
1031 | 20 04 : jr nz,$1037
1033 | AF : xor a // stop sound
1034 | CD A5 0F : call $0FA5 // send sound code
1037 | 18 CA : jr $1003
-->
</script>
<script state="run">
<output format="----- fighting hawk 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>slave.pb@E100</argument>
</output>
</script>
<script state="off">
<action>maincpu.mb@005C = 21 </action>
<action> slave.mw@0055 = 0122 </action>
<action> slave.mq@1000 = FFFFFFFFFFFFFFFF</action>
<action> slave.mq@1008 = FFFFFFFFFFFFFFFF</action>
<action> slave.mq@1010 = FFFFFFFFFFFFFFFF</action>
<action> slave.mq@1018 = FFFFFFFFFFFFFFFF</action>
<action> slave.mq@1020 = FFFFFFFFFFFFFFFF</action>
<action> slave.mq@1028 = FFFFFFFFFFFFFFFF</action>
<action> slave.mq@1030 = FFFFFFFFFFFFFFFF</action>
<action> slave.mq@1038 = FFFFFFFFFFFFFFFF</action>
</script>
</cheat>
</mamecheat>
fhawkj.xml
Code: Select all
<!-- Fighting Hawk (Japan) -->
<mamecheat version="1">
<cheat desc="no hit">
<script state="on">
<action>slave.mb@0631 = C3</action> <!-- bullet -->
<action>slave.mb@070F = C3</action> <!-- enemy -->
<action>slave.mb@080D = C3</action> <!-- final boss -->
</script>
<script state="off">
<action>slave.mb@0631 = DA</action>
<action>slave.mb@070F = DA</action>
<action>slave.mb@080D = DA</action>
</script>
</cheat>
<cheat desc="auto fire">
<script state="on">
<action>maincpu.mb@52A4 = 00</action>
</script>
<script state="off">
<action>maincpu.mb@52A4 = 1F</action>
</script>
</cheat>
<cheat desc="player speed">
<parameter min="0x01" max="0x05" step="0x01" />
<script state="change">
<action>maincpu.mb@5213 = param</action> <!-- up -->
<action>maincpu.mb@5226 = param</action> <!-- down -->
<action>maincpu.mb@5232 = param</action> <!-- left -->
<action>maincpu.mb@523A = param</action> <!-- right -->
</script>
<script state="off">
<action>maincpu.mb@5213 = 02</action>
<action>maincpu.mb@5226 = 02</action>
<action>maincpu.mb@5232 = 02</action>
<action>maincpu.mb@523A = 02</action>
</script>
</cheat>
<cheat desc="bullet speed">
<parameter>
<item value="0x06">01 (slow)</item>
<item value="0x0c">02 </item>
<item value="0x12">03 </item>
<item value="0x18">04 </item>
<item value="0x1e">05 (fast)</item>
</parameter>
<script state="change">
<action>maincpu.mb@56C1 = param</action> <!-- shot level 1-4 -->
<action>maincpu.mb@555D = param</action> <!-- shot level 5 -->
<action>maincpu.mb@55DD = param</action> <!-- shot level 6 -->
</script>
<script state="off">
<action>maincpu.mb@56C1 = 0C</action>
<action>maincpu.mb@555D = 0C</action>
<action>maincpu.mb@55DD = 0C</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@005C = C9 </action> <!-- disable sequence on main cpu -->
<action> slave.mw@0055 = 1000 </action>
<action> slave.mq@1000 = 023AD00032E10021</action>
<action> slave.mq@1008 = 20FBFEF62847B8D0</action>
<action> slave.mq@1010 = FE340120F7FE3501</action>
<action> slave.mq@1018 = FE0618F03E0420FD</action>
<action> slave.mq@1020 = 787786103E0520FE</action>
<action> slave.mq@1028 = FE05187E0320EFFE</action>
<action> slave.mq@1030 = 180FA5CDAF0420DF</action>
<action> slave.mq@1038 = FFFFFFFFFFFFFFCA</action>
<!--
1000 | 21 00 E1 : ld hl,$E100 // sound code address
1003 | 32 00 D0 : ld ($D000),a // watchdog
1006 | 3A 02 D0 : ld a,($D002) // read input
1009 | B8 : cp b
100A | 47 : ld b,a
100B | 28 F6 : jr z,$1003
100D | FE FB : cp $FB
100F | 20 01 : jr nz,$1012
1011 | 35 : dec (hl) // decrease code -01
1012 | FE F7 : cp $F7
1014 | 20 01 : jr nz,$1017
1016 | 34 : inc (hl) // increase code +01
1017 | FE FD : cp $FD
1019 | 20 04 : jr nz,$101F
101B | 3E F0 : ld a,$F0 // decrease code -10
101D | 18 06 : jr $1025
101F | FE FE : cp $FE
1021 | 20 05 : jr nz,$1028
1023 | 3E 10 : ld a,$10 // increase code +10
1025 | 86 : add a,(hl)
1026 | 77 : ld (hl),a
1027 | 78 : ld a,b
1028 | FE EF : cp $EF
102A | 20 03 : jr nz,$102F
102C | 7E : ld a,(hl) // play sound
102D | 18 05 : jr $1034
102F | FE DF : cp $DF
1031 | 20 04 : jr nz,$1037
1033 | AF : xor a // stop sound
1034 | CD A5 0F : call $0FA5 // send sound code
1037 | 18 CA : jr $1003
-->
</script>
<script state="run">
<output format="----- fighting hawk 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>slave.pb@E100</argument>
</output>
</script>
<script state="off">
<action>maincpu.mb@005C = 21 </action>
<action> slave.mw@0055 = 0122 </action>
<action> slave.mq@1000 = FFFFFFFFFFFFFFFF</action>
<action> slave.mq@1008 = FFFFFFFFFFFFFFFF</action>
<action> slave.mq@1010 = FFFFFFFFFFFFFFFF</action>
<action> slave.mq@1018 = FFFFFFFFFFFFFFFF</action>
<action> slave.mq@1020 = FFFFFFFFFFFFFFFF</action>
<action> slave.mq@1028 = FFFFFFFFFFFFFFFF</action>
<action> slave.mq@1030 = FFFFFFFFFFFFFFFF</action>
<action> slave.mq@1038 = FFFFFFFFFFFFFFFF</action>
</script>
</cheat>
</mamecheat>