Page 1 of 1

[fnkyfish] Funky Fish

Posted: Tue Sep 26, 2023 9:46 am
by jman

Code: Select all

<!-- Funky Fish -->
<mamecheat version="1">

    <cheat desc="no hit">
        <script state="on">
            <action>maincpu.mb@28a5 = c9</action> <!-- enemy (level 3) -->
            <action>maincpu.mb@2941 = c9</action> <!-- base (level 3) -->
            <action>maincpu.mb@36eb = c9</action> <!-- fish -->
            <action>maincpu.mb@39e3 = c9</action> <!-- enemy -->
            <action>maincpu.mb@3ae3 = c9</action> <!-- base -->
            <action>maincpu.mb@3d97 = c9</action> <!-- seahorse -->
        </script>
        <script state="off">
            <action>maincpu.mb@28a5 = dd</action>
            <action>maincpu.mb@2941 = 3e</action>
            <action>maincpu.mb@36eb = 3e</action>
            <action>maincpu.mb@39e3 = dd</action>
            <action>maincpu.mb@3ae3 = 3e</action>
            <action>maincpu.mb@3d97 = cb</action>
        </script>
    </cheat>

    <cheat desc="auto fire">
        <script state="on">
            <action>maincpu.mb@26af = 00</action> <!-- tongue -->
            <action>maincpu.mb@383b = 00</action> <!-- shot -->
        </script>
        <script state="off">
            <action>maincpu.mb@26af = c8</action>
            <action>maincpu.mb@383b = c8</action>
        </script>
    </cheat>

    <cheat desc="player speed (test)">
        <comment>also animation speed up so that it's hard to catch fuel by tongue</comment>
        <parameter min="0x01" max="0x05" step="0x01" />
        <script state="on">
            <action>maincpu.mw@043c =             4050</action>
            <action>maincpu.mq@4050 = 10c110f7cdc50006</action>
            <action>maincpu.mq@4058 = 000000000000c9f9</action>
            <!--
            4050 | 06 xx    : ld   b,$xx
            4052 | c5       : push bc
            4053 | cd f7 10 : call $10F7
            4056 | c1       : pop  bc
            4057 | 10 f9    : djnz $4052
            4059 | c9       : ret
            -->
        </script>
        <script state="change">
            <action>maincpu.mb@4051 = param</action>
        </script>
        <script state="off">
            <action>maincpu.mw@043c =             102f</action>
            <action>maincpu.mq@4050 = 0000000000000000</action>
            <action>maincpu.mq@4058 = 0000000000000000</action>
        </script>
    </cheat>

    <cheat desc="fuel speed">
        <parameter>
            <item value="0xff">01 (slow)</item>
            <item value="0x80">02       </item>
            <item value="0x40">03       </item>
            <item value="0x20">04       </item>
            <item value="0x01">05 (fast)</item>
        </parameter>
        <script state="change">
            <action>maincpu.mb@06af = param</action>
        </script>
        <script state="off">
            <action>maincpu.mb@06af = 35</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@00bb =             4000</action>
            <action>maincpu.mq@4000 = 3a3a18023ee10021</action>
            <action>maincpu.mq@4008 = 0707070702e6ec00</action>
            <action>maincpu.mq@4010 = 2847b8b1ed003a4f</action>
            <action>maincpu.mq@4018 = 01fe35012002feee</action>
            <action>maincpu.mq@4020 = 3e042008fe340120</action>
            <action>maincpu.mq@4028 = 3e052004fe0618f0</action>
            <action>maincpu.mq@4030 = 032010fe78778610</action>
            <action>maincpu.mq@4038 = 3e052020fe06187e</action>
            <action>maincpu.mq@4040 = 0000c118ec003201</action>
            <!--
            4000 | 21 00 e1 : ld   hl,$E100  // sound code address
            4003 | 3e 02    : ld   a,$02     // enable sound
            4005 | 18 3a    : jr   $4041
            4007 | 3a 00 ec : ld   a,($EC00) // read start button
            400a | e6 02    : and  $02
            400c | 07       : rlca
            400d | 07       : rlca
            400e | 07       : rlca
            400f | 07       : rlca
            4010 | 4f       : ld   c,a
            4011 | 3a 00 ed : ld   a,($ED00) // read other inputs
            4014 | b1       : or   c
            4015 | b8       : cp   b
            4016 | 47       : ld   b,a
            4017 | 28 ee    : jr   z,$4007
            4019 | fe 02    : cp   $02
            401b | 20 01    : jr   nz,$401E
            401d | 35       : dec  (hl)      // decrease code -01
            401e | fe 01    : cp   $01
            4020 | 20 01    : jr   nz,$4023
            4022 | 34       : inc  (hl)      // increase code +01
            4023 | fe 08    : cp   $08
            4025 | 20 04    : jr   nz,$402B
            4027 | 3e f0    : ld   a,$F0     // decrease code -10
            4029 | 18 06    : jr   $4031
            402b | fe 04    : cp   $04
            402d | 20 05    : jr   nz,$4034
            402f | 3e 10    : ld   a,$10     // increase code +10
            4031 | 86       : add  a,(hl)
            4032 | 77       : ld   (hl),a
            4033 | 78       : ld   a,b
            4034 | fe 10    : cp   $10
            4036 | 20 03    : jr   nz,$403B
            4038 | 7e       : ld   a,(hl)    // play sound
            4039 | 18 06    : jr   $4041
            403b | fe 20    : cp   $20
            403d | 20 05    : jr   nz,$4044
            403f | 3e 01    : ld   a,$01     // stop sound
            4041 | 32 00 ec : ld   ($EC00),a // send sound code
            4044 | 18 c1    : jr   $4007
            -->
            <action>audiocpu.md@0101 =         3e0850c3</action> <!-- recover flag for playing sound after sound stops -->
            <action>audiocpu.mq@0850 = ffff0109c30018cd</action>
            <!--
            0850 | cd 18 00 : call $0018
            0853 | c3 09 01 : jp   $0109
            -->
        </script>
        <script state="run">
            <output format="----- funky fish 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="start 1 : 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@e100</argument>
            </output>
        </script>
        <script state="off">
            <action> maincpu.mw@00bb =             2db3</action>
            <action> maincpu.mq@4000 = 0000000000000000</action>
            <action> maincpu.mq@4008 = 0000000000000000</action>
            <action> maincpu.mq@4010 = 0000000000000000</action>
            <action> maincpu.mq@4018 = 0000000000000000</action>
            <action> maincpu.mq@4020 = 0000000000000000</action>
            <action> maincpu.mq@4028 = 0000000000000000</action>
            <action> maincpu.mq@4030 = 0000000000000000</action>
            <action> maincpu.mq@4038 = 0000000000000000</action>
            <action> maincpu.mq@4040 = 0000000000000000</action>
            <action>audiocpu.md@0101 =         3e0018cd</action>
            <action>audiocpu.mq@0850 = ffffffffffffffff</action>
        </script>
    </cheat>

</mamecheat>
"player speed" : Also animation has speed up. So it's hard to catch fuel item by tongue

BTW, current "invincibility" in the database based on 0.257 has two problems.
  • Object doesn't be erased when you hit a small enemy.
  • Suddenly you die when you turn this code off after you hit an enemy.