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: 843 Joined: Tue Dec 01, 2020 1:24 pm
Post
by jman » Sun May 16, 2021 4:49 am
Code: Select all
<cheat desc="no hit">
<script state="on">
<action>maincpu.mw@22fa = 0318</action>
</script>
<script state="off">
<action>maincpu.mw@22fa = 0136</action>
</script>
</cheat>
<cheat desc="auto fire">
<script state="on">
<action>maincpu.mb@0782 = 01</action> <!-- shot -->
<action>maincpu.mb@0702 = 01</action> <!-- bomb -->
</script>
<script state="off">
<action>maincpu.mb@0782 = 1e</action>
<action>maincpu.mb@0702 = 1e</action>
</script>
</cheat>
<cheat desc="player speed">
<parameter min="0x01" max="0x05" step="0x01" />
<script state="on">
<!-- x position -->
<action>maincpu.md@0659 = 825190cd</action>
<action>maincpu.mq@5190 = 003e80fe0828a77a</action>
<action>maincpu.mq@5198 = c982db3a572f0138</action>
<!--
5190 | 7a : ld a,d
5191 | a7 : and a
5192 | 28 08 : jr z,$519c
5194 | fe 80 : cp $80
5196 | 3e xx : ld a,$xx
5198 | 38 01 : jr c,$519b
519a | 2f : cpl
519b | 57 : ld d,a
519c | 3a db 82 : ld a,($82db)
519f | c9 : ret
-->
<!-- y position -->
<action>maincpu.md@0665 = 1951a0cd</action>
<action>maincpu.mq@51a0 = 003e80fe0828a77b</action>
<action>maincpu.mq@51a8 = c982dc2a5f2f0138</action>
<!--
51a0 | 7b : ld a,e
51a1 | a7 : and a
51a2 | 28 08 : jr z,$51ac
51a4 | fe 80 : cp $80
51a6 | 3e xx : ld a,$xx
51a8 | 38 01 : jr c,$51ab
51aa | 2f : cpl
51ab | 5f : ld e,a
51ac | 2a dc 82 : ld hl,($82dc)
51af | c9 : ret
-->
</script>
<script state="change">
<action>maincpu.mb@5197 = param</action>
<action>maincpu.mb@51a7 = param</action>
</script>
<script state="off">
<action>maincpu.md@0659 = 8282db3a</action>
<action>maincpu.mq@5190 = 0000000000000000</action>
<action>maincpu.mq@5198 = 0000000000000000</action>
<action>maincpu.md@0665 = 1982dc2a</action>
<action>maincpu.mq@51a0 = 0000000000000000</action>
<action>maincpu.mq@51a8 = 0000000000000000</action>
</script>
</cheat>
<cheat desc="bullet speed">
<parameter>
<item value="0xf8">01</item>
<item value="0xf0">02</item>
<item value="0xe8">03</item>
<item value="0xe0">04</item>
<item value="0xd8">05</item>
</parameter>
<script state="change">
<action>maincpu.mb@07d0 = param</action>
</script>
<script state="off">
<action>maincpu.mb@07d0 = f0</action>
</script>
</cheat>
<cheat desc="fast bomb">
<script state="on">
<action>maincpu.mb@0733 = 01</action>
</script>
<script state="off">
<action>maincpu.mb@0733 = 05</action>
</script>
</cheat>
<cheat desc="skip ram check">
<script state="on">
<action>maincpu.mw@0011 = 0013</action>
</script>
<script state="off">
<action>maincpu.mw@0011 = 03a7</action>
</script>
</cheat>
I research current ROM codes for firebatl in the database and improve there codes.
Especially, "Scrap the Self Check" (="skip ram check") has memory initialization problem in some cases.
Last edited by
jman on Sat Oct 23, 2021 8:36 am, edited 1 time in total.
jman
Posts: 843 Joined: Tue Dec 01, 2020 1:24 pm
Post
by jman » Wed May 19, 2021 3:06 pm
Code: Select all
<cheat desc="player speed">
<parameter min="0x01" max="0x05" step="0x01" />
<script state="on">
<!-- x position -->
<action>maincpu.md@0659 = 825190cd</action>
<action>maincpu.mq@5190 = 9bf2003e0828a77a</action>
<action>maincpu.mq@5198 = c982db3a5744ed51</action>
<!--
5190 | 7a : ld a,d
5191 | a7 : and a
5192 | 28 08 : jr z,$519c
5194 | 3e xx : ld a,$xx
5196 | f2 9b 51 : jp p,$519b
5199 | ed 44 : neg
519b | 57 : ld d,a
519c | 3a db 82 : ld a,($82db)
519f | c9 : ret
-->
<!-- y position -->
<action>maincpu.md@0665 = 1951a0cd</action>
<action>maincpu.mq@51a0 = abf2003e0828a77b</action>
<action>maincpu.mq@51a8 = c982dc2a5f44ed51</action>
<!--
51a0 | 7b : ld a,e
51a1 | a7 : and a
51a2 | 28 08 : jr z,$51ac
51a4 | 3e xx : ld a,$xx
51a6 | f2 ab 51 : jp p,$51ab
51a9 | ed 44 : neg
51ab | 5f : ld e,a
51ac | 2a dc 82 : ld hl,($82dc)
51af | c9 : ret
-->
</script>
<script state="change">
<action>maincpu.mb@5195 = param</action>
<action>maincpu.mb@51a5 = param</action>
</script>
<script state="off">
<action>maincpu.md@0659 = 8282db3a</action>
<action>maincpu.mq@5190 = 0000000000000000</action>
<action>maincpu.mq@5198 = 0000000000000000</action>
<action>maincpu.md@0665 = 1982dc2a</action>
<action>maincpu.mq@51a0 = 0000000000000000</action>
<action>maincpu.mq@51a8 = 0000000000000000</action>
</script>
</cheat>
Fixed "player speed" code. I mistake "NEG" opcode for "CPL".
jman
Posts: 843 Joined: Tue Dec 01, 2020 1:24 pm
Post
by jman » Tue Jan 11, 2022 9:48 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.mw@0522 = 51b0</action>
<action>maincpu.mq@51b0 = 47b880473a810021</action>
<action>maincpu.mq@51b8 = fe35012004fef928</action>
<action>maincpu.mq@51c0 = 032010fe34012008</action>
<action>maincpu.mq@51c8 = 3e052020fe06187e</action>
<action>maincpu.mq@51d0 = 0000dd18960132ff</action>
<!--
51b0 | 21 00 81 : ld hl,$8100 // sound code address
51b3 | 3a 47 80 : ld a,($8047) // read input
51b6 | b8 : cp b
51b7 | 47 : ld b,a
51b8 | 28 f9 : jr z,$51B3
51ba | fe 04 : cp $04
51bc | 20 01 : jr nz,$51BF
51be | 35 : dec (hl) // decrease code
51bf | fe 08 : cp $08
51c1 | 20 01 : jr nz,$51C4
51c3 | 34 : inc (hl) // increase code
51c4 | fe 10 : cp $10
51c6 | 20 03 : jr nz,$51CB
51c8 | 7e : ld a,(hl) // play sound
51c9 | 18 06 : jr $51D1
51cb | fe 20 : cp $20
51cd | 20 05 : jr nz,$51D4
51cf | 3e ff : ld a,$FF // stop sound
51d1 | 32 01 96 : ld ($9601),a // send sound code
51d4 | 18 dd : jr $51B3
-->
<action>audiocpu.mb@004a = cd</action> <!-- enable sound -->
</script>
<script state="run">
<output format="----- fire battle 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@8100</argument>
</output>
</script>
<script state="off">
<action> maincpu.mw@0522 = 2922</action>
<action> maincpu.mq@51b0 = 0000000000000000</action>
<action> maincpu.mq@51b8 = 0000000000000000</action>
<action> maincpu.mq@51c0 = 0000000000000000</action>
<action> maincpu.mq@51c8 = 0000000000000000</action>
<action> maincpu.mq@51d0 = 0000000000000000</action>
<action>audiocpu.mb@004a = c4</action>
</script>
</cheat>
jman
Posts: 843 Joined: Tue Dec 01, 2020 1:24 pm
Post
by jman » Fri Jun 17, 2022 11:13 am
Random maintenance.
Code: Select all
<cheat desc="player speed">
<parameter min="0x01" max="0x05" step="0x01" />
<script state="on">
<action>maincpu.md@0659 = 825190cd</action> <!-- x position -->
<action>maincpu.md@0665 = 195199cd</action> <!-- y position -->
<action>maincpu.mq@5190 = 82db3a5751a2cd7a</action>
<action>maincpu.mq@5198 = dc2a5f51a2cd7bc9</action>
<action>maincpu.mq@51a0 = edf0083ec8a7c982</action>
<action>maincpu.mq@51a8 = 000000000000c944</action>
<!--
5190 | 7a : ld a,d // x position
5191 | cd a2 51 : call $51A2
5194 | 57 : ld d,a
5195 | 3a db 82 : ld a,($82DB)
5198 | c9 : ret
5199 | 7b : ld a,e // y position
519a | cd a2 51 : call $51A2
519d | 5f : ld e,a
519e | 2a dc 82 : ld hl,($82DC)
51a1 | c9 : ret
51a2 | a7 : and a
51a3 | c8 : ret z
51a4 | 3e xx : ld a,$xx
51a6 | f0 : ret p
51a7 | ed 44 : neg
51a9 | c9 : ret
-->
</script>
<script state="change">
<action>maincpu.mb@51a5 = param</action>
</script>
<script state="off">
<action>maincpu.md@0659 = 8282db3a</action>
<action>maincpu.md@0665 = 1982dc2a</action>
<action>maincpu.mq@5190 = 0000000000000000</action>
<action>maincpu.mq@5198 = 0000000000000000</action>
<action>maincpu.mq@51a0 = 0000000000000000</action>
<action>maincpu.mq@51a8 = 0000000000000000</action>
</script>
</cheat>
"player speed" : merge two routines into one. code size is reduced.
Code: Select all
<cheat desc="bullet speed">
<parameter>
<item value="0x01">01 (slow)</item>
<item value="0x08">02 </item>
<item value="0x10">03 </item>
<item value="0x18">04 </item>
<item value="0x20">05 (fast)</item>
</parameter>
<script state="change">
<action>maincpu.mb@07d0 = -param</action>
</script>
<script state="off">
<action>maincpu.mb@07d0 = f0</action>
</script>
</cheat>
"bullet speed" : adjust parameter value.
Code: Select all
<cheat desc="sound test mode">
<comment>reset the game (F3) to enter sound test mode</comment>
<script state="on">
<action>maincpu.mw@0522 = 51b0</action>
<action>maincpu.mq@51b0 = 47b880473a810021</action>
<action>maincpu.mq@51b8 = fe35012004fef928</action>
<action>maincpu.mq@51c0 = 042002fe34012008</action>
<action>maincpu.mq@51c8 = 052001fe0618f03e</action>
<action>maincpu.mq@51d0 = 2010fe787786103e</action>
<action>maincpu.mq@51d8 = 052020fe06187e03</action>
<action>maincpu.mq@51e0 = 00cc18960132ff3e</action>
<!--
51b0 | 21 00 81 : ld hl,$8100 // sound code address
51b3 | 3a 47 80 : ld a,($8047) // read input
51b6 | b8 : cp b
51b7 | 47 : ld b,a
51b8 | 28 f9 : jr z,$51B3
51ba | fe 04 : cp $04
51bc | 20 01 : jr nz,$51BF
51be | 35 : dec (hl) // decrease code -01
51bf | fe 08 : cp $08
51c1 | 20 01 : jr nz,$51C4
51c3 | 34 : inc (hl) // increase code +01
51c4 | fe 02 : cp $02
51c6 | 20 04 : jr nz,$51CC
51c8 | 3e f0 : ld a,$F0 // decrease code -10
51ca | 18 06 : jr $51D2
51cc | fe 01 : cp $01
51ce | 20 05 : jr nz,$51D5
51d0 | 3e 10 : ld a,$10 // increase code +10
51d2 | 86 : add a,(hl)
51d3 | 77 : ld (hl),a
51d4 | 78 : ld a,b
51d5 | fe 10 : cp $10
51d7 | 20 03 : jr nz,$51DC
51d9 | 7e : ld a,(hl) // play sound
51da | 18 06 : jr $51E2
51dc | fe 20 : cp $20
51de | 20 05 : jr nz,$51E5
51e0 | 3e ff : ld a,$FF // stop sound
51e2 | 32 01 96 : ld ($9601),a
51e5 | 18 cc : jr $51B3
-->
<action>audiocpu.mb@004a = cd</action> <!-- enable to play sound -->
</script>
<script state="run">
<output format="----- fire battle 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@8100</argument>
</output>
</script>
<script state="off">
<action> maincpu.mw@0522 = 2922</action>
<action> maincpu.mq@51b0 = 0000000000000000</action>
<action> maincpu.mq@51b8 = 0000000000000000</action>
<action> maincpu.mq@51c0 = 0000000000000000</action>
<action> maincpu.mq@51c8 = 0000000000000000</action>
<action> maincpu.mq@51d0 = 0000000000000000</action>
<action> maincpu.mq@51d8 = 0000000000000000</action>
<action> maincpu.mq@51e0 = 0000000000000000</action>
<action>audiocpu.mb@004a = c4</action>
</script>
</cheat>
"sound test mode" : add up/down key (code±10).