[firebatl] Fire Battle

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.
Post Reply
jman
Posts: 1318
Joined: Tue Dec 01, 2020 1:24 pm
Been thanked: 10 times

[firebatl] Fire Battle

Post by jman »

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

my wip cheat database back-up (06/01/2025 ver.)
https://u3.getuploader.com/...../download/58
downloadpass : jman2020
jman
Posts: 1318
Joined: Tue Dec 01, 2020 1:24 pm
Been thanked: 10 times

[firebatl] update

Post by jman »

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

my wip cheat database back-up (06/01/2025 ver.)
https://u3.getuploader.com/...../download/58
downloadpass : jman2020
jman
Posts: 1318
Joined: Tue Dec 01, 2020 1:24 pm
Been thanked: 10 times

[firebatl] sound test mode

Post by jman »

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="&lt;&lt; sound code %2.2X &gt;&gt;"      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

my wip cheat database back-up (06/01/2025 ver.)
https://u3.getuploader.com/...../download/58
downloadpass : jman2020
jman
Posts: 1318
Joined: Tue Dec 01, 2020 1:24 pm
Been thanked: 10 times

[firebatl] update

Post by jman »

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="&lt;&lt; sound code %2.2X &gt;&gt;"      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).
jman

my wip cheat database back-up (06/01/2025 ver.)
https://u3.getuploader.com/...../download/58
downloadpass : jman2020
jman
Posts: 1318
Joined: Tue Dec 01, 2020 1:24 pm
Been thanked: 10 times

[firebatl] Fire Battle

Post by jman »

firebatl.xml

Code: Select all

<!-- Fire Battle -->
<mamecheat version="1">

    <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="rapid fire">
        <script state="on">
            <action>maincpu.mb@0702 = 01</action> <!-- bomb -->
            <action>maincpu.mb@0782 = 01</action> <!-- shot -->
        </script>
        <script state="off">
            <action>maincpu.mb@0702 = 1E</action>
            <action>maincpu.mb@0782 = 1E</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="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>

    <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>

    <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="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 // send sound code
            51E5 | 18 CC    : jr   $51B3
            -->
            <action>audiocpu.mb@004A = CD</action> <!-- enable to play sound -->
        </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="&lt;&lt; sound code %02X &gt;&gt;" 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>

    <cheat desc="skip ram check">
        <script state="on">
            <action>maincpu.mw@0011 = 0013</action> <!-- skip ram check -->
            <action>maincpu.mw@0462 = 0466</action> <!-- skip wait -->
        </script>
        <script state="off">
            <action>maincpu.mw@0011 = 03A7</action>
            <action>maincpu.mw@0462 = 045A</action>
        </script>
    </cheat>

</mamecheat>
"skip ram check" : Improved. New code skips wait at boot.
jman

my wip cheat database back-up (06/01/2025 ver.)
https://u3.getuploader.com/...../download/58
downloadpass : jman2020
Post Reply