[baluba] Baluba-louk no Densetsu

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: 843
Joined: Tue Dec 01, 2020 1:24 pm

[baluba] Baluba-louk no Densetsu

Post by jman »

Code: Select all

<cheat desc="multiple jump">
    <script state="on">
        <action>maincpu.mw@1c40 =             6be0</action>
        <action>maincpu.mq@6be0 = 10e61f7edd8fb721</action>
        <action>maincpu.mq@6be8 = c30520a7347e0828</action>
        <action>maincpu.mq@6bf0 = 00216ec377af217f</action>
        <!--
        6be0 | 21 8f b7 : ld   hl,$8fb7
        6be3 | DD 7e 1f : ld   a,(ix+$1f)
        6be6 | e6 10    : and  $10
        6be8 | 28 08    : jr   z,$6bf2
        6bea | 7e       : ld   a,(hl)
        6beb | 34       : inc  (hl)
        6bec | a7       : and  a
        6bed | 20 03    : jr   nz,$6bf4
        6bef | c3 21 7f : jp   $217f
        6bf2 | af       : xor  a
        6bf3 | 77       : ld   (hl),a
        6bf4 | c3 21 6e : jp   $216e
        -->
    </script>
    <script state="off">
        <action>maincpu.mw@1c40 =             216e</action>
        <action>maincpu.mq@6be0 = 0000000000000000</action>
        <action>maincpu.mq@6be8 = 0000000000000000</action>
        <action>maincpu.mq@6bf0 = 0000000000000000</action>
    </script>
</cheat>

<cheat desc="timer speed">
    <parameter>
        <item value="0xff">01 (slow)</item>
        <item value="0x80">02       </item>
        <item value="0x3c">03       </item>
        <item value="0x1e">04       </item>
        <item value="0x01">05 (fast)</item>
    </parameter>
    <script state="change">
        <action>maincpu.mb@1c56 = param</action>
    </script>
    <script state="off">
        <action>maincpu.mb@1c56 = 3c</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@03e3 = 203a801022000021</action>
        <action>maincpu.mq@03eb = 2802fef6286fbd80</action>
        <action>maincpu.mq@03f3 = 2804fe0d2801fe0e</action>
        <action>maincpu.mq@03fb = 25e4180a2810fe0a</action>
        <action>maincpu.mq@0403 = 7c0118003e240118</action>
        <action>maincpu.mq@040b = 010000d618d00432</action>
        <!--
        03e3 | 21 00 00 : ld  hl,$0000   // initialize sound and input values
        03e6 | 22 10 80 : ld  ($8010),hl
        03e9 | 3a 20 80 : ld  a,($8020)  // read input
        03ec | bd       : cp  l
        03ed | 6f       : ld  l,a
        03ee | 28 f6    : jr  z,$3e6
        03f0 | fe 02    : cp  $02
        03f2 | 28 0e    : jr  z,$402     // pressed left?
        03f4 | fe 01    : cp  $01
        03f6 | 28 0d    : jr  z,$405     // pressed right?
        03f8 | fe 04    : cp  $04
        03fa | 28 0a    : jr  z,$406     // pressed up?
        03fc | fe 10    : cp  $10
        03fe | 28 0a    : jr  z,$40a     // pressed button1?
        0400 | 18 e4    : jr  $3e6
        0402 | 25       : dec h          // decrease code
        0403 | 18 01    : jr  $406
        0405 | 24       : inc h          // increase code
        0406 | 3e 00    : ld  a,$00      // sound stop
        0408 | 18 01    : jr  $40b
        040a | 7c       : ld  a,h        // play sound
        040b | 32 04 d0 : ld  ($d004),a  // send sound code
        040e | 18 d6    : jr  $3e6
        -->
    </script>
    <script state="run">
        <output format="----- baluba-louk no densetsu 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="up : stop sound"                                     line="13" align="center" />
        <output format="button 1 : play 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@8011</argument>
        </output>
    </script>
    <script state="off">
        <action>maincpu.mq@03e3 = 80012186cb800121</action>
        <action>maincpu.mq@03eb = cd0406cdf92846cb</action>
        <action>maincpu.mq@03f3 = 052acd5500210489</action>
        <action>maincpu.mq@03fb = 00cd3000cd03a9cd</action>
        <action>maincpu.mq@0403 = 854421fdc9f8180c</action>
        <action>maincpu.mq@040b = 01000021854521dd</action>
    </script>
</cheat>
jman
Posts: 843
Joined: Tue Dec 01, 2020 1:24 pm

[baluba] Baluba-louk no Densetsu (update)

Post by jman »

Code: Select all

<cheat desc="multiple jump">
    <script state="on">
        <action>maincpu.mw@1c40 =             6be0</action>
        <action>maincpu.mq@6be0 = 771f7edd468fb721</action>
        <action>maincpu.mq@6be8 = 10e678216eca10e6</action>
        <action>maincpu.mq@6bf0 = 0000217fc3216ec2</action>
        <!--
        6be0 | 21 b7 8f : ld  hl,$8FB7
        6be3 | 46       : ld  b,(hl)
        6be4 | dd 7e 1f : ld  a,(ix+$1f)
        6be7 | 77       : ld  (hl),a
        6be8 | e6 10    : and $10
        6bea | ca 6e 21 : jp  z,$216E
        6bed | 78       : ld  a,b
        6bee | e6 10    : and $10
        6bf0 | c2 6e 21 : jp  nz,$216E
        6bf3 | c3 7f 21 : jp  $217F
        -->
    </script>
    <script state="off">
        <action>maincpu.mw@1c40 =             216e</action>
        <action>maincpu.mq@6be0 = 0000000000000000</action>
        <action>maincpu.mq@6be8 = 0000000000000000</action>
        <action>maincpu.mq@6bf0 = 0000000000000000</action>
    </script>
</cheat>
"multiple jump" : rewrite routine.

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@03e3 = 04e6d0023a810021</action>
        <action>maincpu.mq@03eb = 3a4f27cb27cb27cb</action>
        <action>maincpu.mq@03f3 = feec2847b8b1d000</action>
        <action>maincpu.mq@03fb = 012001fe35012002</action>
        <action>maincpu.mq@0403 = 18f03e042008fe34</action>
        <action>maincpu.mq@040b = 86103e052004fe06</action>
        <action>maincpu.mq@0413 = 187e032010fe7877</action>
        <action>maincpu.mq@041b = 0432af042020fe05</action>
        <action>maincpu.mq@0423 = 00cbfdc600c018d0</action>
        <!--
        03e3 | 21 00 81 : ld  hl,$8100  // sound code address
        03e6 | 3a 02 d0 : ld  a,($D002) // read start button
        03e9 | e6 04    : and $04
        03eb | cb 27    : sla a
        03ed | cb 27    : sla a
        03ef | cb 27    : sla a
        03f1 | 4f       : ld  c,a
        03f2 | 3a 00 d0 : ld  a,($D000) // read other inputs
        03f5 | b1       : or  c
        03f6 | b8       : cp  b
        03f7 | 47       : ld  b,a
        03f8 | 28 ec    : jr  z,$03E6
        03fa | fe 02    : cp  $02
        03fc | 20 01    : jr  nz,$03FF
        03fe | 35       : dec (hl)      // decrease code -01
        03ff | fe 01    : cp  $01
        0401 | 20 01    : jr  nz,$0404
        0403 | 34       : inc (hl)      // increase code +01
        0404 | fe 08    : cp  $08
        0406 | 20 04    : jr  nz,$040C
        0408 | 3e f0    : ld  a,$F0     // decrease code -10
        040a | 18 06    : jr  $0412
        040c | fe 04    : cp  $04
        040e | 20 05    : jr  nz,$0415
        0410 | 3e 10    : ld  a,$10     // increase code +10
        0412 | 86       : add a,(hl)
        0413 | 77       : ld  (hl),a
        0414 | 78       : ld  a,b
        0415 | fe 10    : cp  $10
        0417 | 20 03    : jr  nz,$041C
        0419 | 7e       : ld  a,(hl)    // play sound
        041a | 18 05    : jr  $0421
        041c | fe 20    : cp  $20
        041e | 20 04    : jr  nz,$0424
        0420 | af       : xor a         // stop sound
        0421 | 32 04 d0 : ld  ($D004),a // send sound code
        0424 | 18 c0    : jr  $03E6
        -->
    </script>
    <script state="run">
        <output format="----- baluba-louk no densetsu 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 : 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.mq@03e3 = 80012186cb800121</action>
        <action>maincpu.mq@03eb = cd0406cdf92846cb</action>
        <action>maincpu.mq@03f3 = 052acd5500210489</action>
        <action>maincpu.mq@03fb = 00cd3000cd03a9cd</action>
        <action>maincpu.mq@0403 = 854421fdc9f8180c</action>
        <action>maincpu.mq@040b = 01000021854521dd</action>
        <action>maincpu.mq@0413 = 790b5f2386af2000</action>
        <action>maincpu.mq@041b = 2800beddf7207bb0</action>
        <action>maincpu.mq@0423 = 00cbfdc600cbfd04</action>
    </script>
</cheat>
"sound test mode" : rewrite routine. add up/down key (code ±10). change "sound stop" from up key to start button.
Post Reply