Page 1 of 1

[bouldashj] Boulder Dash (Data East 1990)

Posted: Mon Jan 02, 2023 11:09 am
by jman

Code: Select all

<cheat desc="invincibility">
    <script state="on">
        <action>maincpu.mb@0db1a = 60</action> <!-- rock -->
        <action>maincpu.mb@0e108 = 60</action> <!-- rock -->
        <action>maincpu.mb@0f408 = 60</action> <!-- explosion -->
        <action>maincpu.mb@13b8e = 60</action> <!-- enemy -->
        <action>maincpu.mb@13bf3 = 02</action> <!-- spider net -->
        <action>maincpu.mb@144a4 = 60</action> <!-- ice breath -->
        <action>maincpu.mb@14663 = 02</action> <!-- beam -->
        <action>maincpu.mb@15e90 = 60</action> <!-- big head -->
        <action>maincpu.mb@15ee2 = 60</action> <!-- mushroom (big) -->
        <action>maincpu.mb@15fc7 = 02</action> <!-- mushroom (small) -->
    </script>
    <script state="off">
        <action>maincpu.mb@0db1a = 66</action>
        <action>maincpu.mb@0e108 = 66</action>
        <action>maincpu.mb@0f408 = 64</action>
        <action>maincpu.mb@13b8e = 66</action>
        <action>maincpu.mb@13bf3 = 12</action>
        <action>maincpu.mb@144a4 = 67</action>
        <action>maincpu.mb@14663 = 80</action>
        <action>maincpu.mb@15e90 = 67</action>
        <action>maincpu.mb@15ee2 = 67</action>
        <action>maincpu.mb@15fc7 = 0e</action>
    </script>
</cheat>
"invincibility" : it is not "no hit" so that you can't stride over an enemy/obstacle.

Code: Select all

<cheat desc="timer speed">
    <comment>time flies by pressing P1 button 2</comment>
    <parameter>
        <item value="0x80">01 (slow)</item>
        <item value="0x40">02       </item>
        <item value="0x20">03       </item>
        <item value="0x08">04       </item>
        <item value="0x01">05 (fast)</item>
    </parameter>
    <script state="on">
        <action>maincpu.md@0168e =         0005d000</action>
        <action>maincpu.mq@5d000 = 41f90030695a4a28</action>
        <action>maincpu.mq@5d008 = 0002671c4a280003</action>
        <action>maincpu.mq@5d010 = 66160c280020f7a7</action>
        <action>maincpu.mq@5d018 = 67085310660a10bc</action>
        <action>maincpu.mq@5d020 = 00ff4ef90000a008</action>
        <action>maincpu.mq@5d028 = 4e75ffffffffffff</action>
        <!--
        5d000 | 41f9 0030 695a : lea    $30695a.l,A0
        5d006 | 4a28 0002      : tst.b  ($2,A0)
        5d00a | 671c           : beq    $5d028
        5d00c | 4a28 0003      : tst.b  ($3,A0)
        5d010 | 6616           : bne    $5d028
        5d012 | 0c28 0020 f7a7 : cmpi.b #$20,(-$859,A0) // check P1 button 2
        5d018 | 6708           : beq    $5d022
        5d01a | 5310           : subq.b #1,(A0)
        5d01c | 660a           : bne    $5d028
        5d01e | 10bc 00xx      : move.b #$xx,(A0)
        5d022 | 4ef9 0000 a008 : jmp    $a008.l
        5d028 | 4e75           : rts
        -->
    </script>
    <script state="change">
        <action>maincpu.mb@5d021 = param</action>
    </script>
    <script state="off">
        <action>maincpu.md@0168e =         00009fde</action>
        <action>maincpu.mq@5d000 = ffffffffffffffff</action>
        <action>maincpu.mq@5d008 = ffffffffffffffff</action>
        <action>maincpu.mq@5d010 = ffffffffffffffff</action>
        <action>maincpu.mq@5d018 = ffffffffffffffff</action>
        <action>maincpu.mq@5d020 = ffffffffffffffff</action>
        <action>maincpu.mq@5d028 = ffffffffffffffff</action>
    </script>
</cheat>
"timer speed" : it has unique function. You can do "time fly" in holding player 1 button 2 when you are stuck the game (eg, surrounded by the rocks).

Code: Select all

<cheat desc="change some walls to jewels">
    <comment>set before stage start</comment>
    <script state="on">
        <action>maincpu.mq@0599e = 4eb90005d03051ca</action>
        <action>maincpu.mq@5d030 = 149d0c1200046604</action>
        <action>maincpu.mq@5d038 = 14bc002045ea0008</action>
        <action>maincpu.mq@5d040 = 4e75ffffffffffff</action>
        <!--
        5d030 | 149d      : move.b (A5)+,(A2)
        5d032 | 0c12 0004 : cmpi.b #$4,(A2)
        5d036 | 6604      : bne    $5d03c
        5d038 | 14bc 0020 : move.b #$20,(A2)
        5d03c | 45ea 0008 : lea    ($8,A2),A2
        5d040 | 4e75      : rts
        -->
    </script>
    <script state="off">
        <action>maincpu.mq@0599e = 149d45ea000851ca</action>
        <action>maincpu.mq@5d030 = ffffffffffffffff</action>
        <action>maincpu.mq@5d038 = ffffffffffffffff</action>
        <action>maincpu.mq@5d040 = ffffffffffffffff</action>
    </script>
</cheat>
"change some walls to jewels" : I fail to create "walk through wall" (it's very hard!).
ImageImage

Code: Select all

<cheat desc="sound test mode">
    <comment>reset the game (F3) to enter sound test mode</comment>
    <script state="on">
        <action>maincpu.md@0088c =         0005d050</action>
        <action>maincpu.mq@5d050 = 41f90030410043f9</action>
        <action>maincpu.mq@5d058 = 0031400112001029</action>
        <action>maincpu.mq@5d060 = 000ab20067f60c00</action>
        <action>maincpu.mq@5d068 = 00fb660253100c00</action>
        <action>maincpu.mq@5d070 = 00f7660252100c00</action>
        <action>maincpu.mq@5d078 = 00fd660404100010</action>
        <action>maincpu.mq@5d080 = 0c0000fe66040610</action>
        <action>maincpu.mq@5d088 = 00100c0000ef6602</action>
        <action>maincpu.mq@5d090 = 12900c0000df6604</action>
        <action>maincpu.mq@5d098 = 12bc000160beffff</action>
        <!--
        5d050 | 41f9 0030 4100 : lea    $304100.l,A0 // sound code address
        5d056 | 43f9 0031 4001 : lea    $314001.l,A1 // sound latch address
        5d05c | 1200           : move.b D0,D1
        5d05e | 1029 000a      : move.b ($a,A1),D0   // read input from $31400b
        5d062 | b200           : cmp.b  D0,D1
        5d064 | 67f6           : beq    $5d05c
        5d066 | 0c00 00fb      : cmpi.b #-$5,D0
        5d06a | 6602           : bne    $5d06e
        5d06c | 5310           : subq.b #1,(A0)      // decrease code -01
        5d06e | 0c00 00f7      : cmpi.b #-$9,D0
        5d072 | 6602           : bne    $5d076
        5d074 | 5210           : addq.b #1,(A0)      // increase code +01
        5d076 | 0c00 00fd      : cmpi.b #-$3,D0
        5d07a | 6604           : bne    $5d080
        5d07c | 0410 0010      : subi.b #$10,(A0)    // decrease code -10
        5d080 | 0c00 00fe      : cmpi.b #-$2,D0
        5d084 | 6604           : bne    $5d08a
        5d086 | 0610 0010      : addi.b #$10,(A0)    // increase code +10
        5d08a | 0c00 00ef      : cmpi.b #-$11,D0
        5d08e | 6602           : bne    $5d092
        5d090 | 1290           : move.b (A0),(A1)    // play sound
        5d092 | 0c00 00df      : cmpi.b #-$21,D0
        5d096 | 6604           : bne    $5d09c
        5d098 | 12bc 0001      : move.b #$1,(A1)     // stop sound
        5d09c | 60be           : bra    $5d05c
        -->
    </script>
    <script state="run">
        <output format="----- boulder dash 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="up : increase code +10"                   line="13" align="center" />
        <output format="down : decrease 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@304100</argument>
        </output>
    </script>
    <script state="off">
        <action>maincpu.md@0088c =         00026c88</action>
        <action>maincpu.mq@5d050 = ffffffffffffffff</action>
        <action>maincpu.mq@5d058 = ffffffffffffffff</action>
        <action>maincpu.mq@5d060 = ffffffffffffffff</action>
        <action>maincpu.mq@5d068 = ffffffffffffffff</action>
        <action>maincpu.mq@5d070 = ffffffffffffffff</action>
        <action>maincpu.mq@5d078 = ffffffffffffffff</action>
        <action>maincpu.mq@5d080 = ffffffffffffffff</action>
        <action>maincpu.mq@5d088 = ffffffffffffffff</action>
        <action>maincpu.mq@5d090 = ffffffffffffffff</action>
        <action>maincpu.mq@5d098 = ffffffffffffffff</action>
    </script>
</cheat>