Page 1 of 1

[baluba] Baluba-louk no Densetsu

Posted: Tue Jul 06, 2021 1:10 pm
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>

[baluba] Baluba-louk no Densetsu (update)

Posted: Sun Oct 30, 2022 1:25 pm
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.

[baluba] Baluba-louk no Densetsu

Posted: Sat Nov 16, 2024 10:53 am
by jman
baluba.xml

Code: Select all

<!-- Baluba-louk no Densetsu (Japan) -->
<mamecheat version="1">

    <cheat desc="no hit">
        <script state="on">
            <action>maincpu.mw@2488 = 243B</action>
        </script>
        <script state="off">
            <action>maincpu.mw@2488 = 2525</action>
        </script>
    </cheat>

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

    <cheat desc="timer 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@1C56 = param</action>
        </script>
        <script state="off">
            <action>maincpu.mb@1C56 = 3C</action>
        </script>
    </cheat>

    <cheat desc="item">
        <parameter>
            <item value="0x40">bonus        </item>
            <item value="0x41">magnification</item>
            <item value="0x42">warp hole    </item>
            <item value="0x43">box open     </item>
            <item value="0x44">extra player </item>
            <item value="0x45">p-chip       </item>
        </parameter>
        <script state="change">
            <action>maincpu.mb@430C = param</action>
            <action>maincpu.mb@432F = param</action>
            <action>maincpu.mb@4346 = param</action>
            <action>maincpu.mb@4363 = param</action>
            <action>maincpu.mb@436E = param</action>
            <action>maincpu.mb@43AD = param</action>
        </script>
        <script state="off">
            <action>maincpu.mb@430C = 44</action>
            <action>maincpu.mb@432F = 43</action>
            <action>maincpu.mb@4346 = 45</action>
            <action>maincpu.mb@4363 = 42</action>
            <action>maincpu.mb@436E = 41</action>
            <action>maincpu.mb@43AD = 40</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 = 04E6D0023A810021</action>
            <action>maincpu.mq@03EB = B1D0003A4F070707</action>
            <action>maincpu.mq@03F3 = 012002FEEF2847B8</action>
            <action>maincpu.mq@03FB = 08FE34012001FE35</action>
            <action>maincpu.mq@0403 = 04FE0618F03E0420</action>
            <action>maincpu.mq@040B = FE787786103E0520</action>
            <action>maincpu.mq@0413 = 20FE05187E032010</action>
            <action>maincpu.mq@041B = C318D00432AF0420</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 | 07       : rlca
            03EC | 07       : rlca
            03ED | 07       : rlca
            03EE | 4F       : ld   c,a
            03EF | 3A 00 D0 : ld   a,($D000) // read other inputs
            03F2 | B1       : or   c
            03F3 | B8       : cp   b
            03F4 | 47       : ld   b,a
            03F5 | 28 EF    : jr   z,$03E6
            03F7 | FE 02    : cp   $02
            03F9 | 20 01    : jr   nz,$03FC
            03FB | 35       : dec  (hl)      // decrease code -01
            03FC | FE 01    : cp   $01
            03FE | 20 01    : jr   nz,$0401
            0400 | 34       : inc  (hl)      // increase code +01
            0401 | FE 08    : cp   $08
            0403 | 20 04    : jr   nz,$0409
            0405 | 3E F0    : ld   a,$F0     // decreae code -10
            0407 | 18 06    : jr   $040F
            0409 | FE 04    : cp   $04
            040B | 20 05    : jr   nz,$0412
            040D | 3E 10    : ld   a,$10     // increae code +10
            040F | 86       : add  a,(hl)
            0410 | 77       : ld   (hl),a
            0411 | 78       : ld   a,b
            0412 | FE 10    : cp   $10
            0414 | 20 03    : jr   nz,$0419
            0416 | 7E       : ld   a,(hl)    // play sound
            0417 | 18 05    : jr   $041E
            0419 | FE 20    : cp   $20
            041B | 20 04    : jr   nz,$0421
            041D | AF       : xor  a         // stop sound
            041E | 32 04 D0 : ld   ($D004),a // send sound code
            0421 | 18 C3    : jr   $03E6
            -->
        </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="start : 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.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>
        </script>
    </cheat>

</mamecheat>
[code]
"item" : Added new. You can select an item after kill an enemy.