Code: Select all
<!-- Lode Runner II - The Bungeling Strikes Back -->
<mamecheat version="1">
<cheat desc="no hit">
<script state="on">
<action>maincpu.mb@31ce = c9</action>
<action>maincpu.mb@31ed = c9</action>
<action>maincpu.mb@3209 = c9</action>
</script>
<script state="off">
<action>maincpu.mb@31ce = d0</action>
<action>maincpu.mb@31ed = d0</action>
<action>maincpu.mb@3209 = d0</action>
</script>
</cheat>
<cheat desc="walk through wall">
<script state="on">
<action>maincpu.mb@0e67 = 18</action> <!-- left -->
<action>maincpu.mb@0ebd = 18</action> <!-- right -->
</script>
<script state="off">
<action>maincpu.mb@0e67 = 20</action>
<action>maincpu.mb@0ebd = 20</action>
</script>
</cheat>
<cheat desc="no stolen gold">
<script state="on">
<action>maincpu.mb@1e21 = c9</action>
</script>
<script state="off">
<action>maincpu.mb@1e21 = c0</action>
</script>
</cheat>
<cheat desc="walk speed">
<parameter>
<item value="0x0008">01 (slow)</item>
<item value="0x0018">02 </item>
<item value="0x0028">03 </item>
<item value="0x0030">04 </item>
<item value="0x0038">05 (fast)</item>
</parameter>
<script state="on">
<action>maincpu.md@0e82 = 00000011</action>
<action>maincpu.md@0ed6 = 00000011</action>
</script>
<script state="change">
<action>maincpu.mw@0e83 = param</action> <!-- left-->
<action>maincpu.mw@0ed7 = param</action> <!-- right -->
</script>
<script state="off">
<action>maincpu.md@0e82 = e8d45bed</action>
<action>maincpu.md@0ed6 = e8d45bed</action>
</script>
</cheat>
<cheat desc="invisible ladder">
<script state="on">
<action>maincpu.mw@0cb8 = 7fa0</action> <!-- common -->
<action>maincpu.mw@0faa = 7fa0</action> <!-- up -->
<action>maincpu.mq@7fa0 = af02280ce6e40d3a</action>
<action>maincpu.mq@7fa8 = c7c7c7c93172cdc9</action>
<!--
7fa0 | 3a 0d e4 : ld a,($E40D)
7fa3 | e6 0c : and $0C
7fa5 | 28 02 : jr z,$7FA9
7fa7 | af : xor a
7fa8 | c9 : ret
7fa9 | cd 72 31 : call $3172
7fac | c9 : ret
-->
<action>maincpu.mb@0fbb = 00</action> <!-- up -->
<action>maincpu.mb@0ffb = c3</action> <!-- up -->
<action>maincpu.mb@102a = 18</action> <!-- down -->
</script>
<script state="off">
<action>maincpu.mw@0cb8 = 3172</action>
<action>maincpu.mw@0faa = 3172</action>
<action>maincpu.mq@7fa0 = c7c7c7c7c7c7c7c7</action>
<action>maincpu.mq@7fa8 = c7c7c7c7c7c7c7c7</action>
<action>maincpu.mb@0fbb = 0e</action>
<action>maincpu.mb@0ffb = c2</action>
<action>maincpu.mb@102a = 20</action>
</script>
</cheat>
<cheat desc="timer speed">
<parameter>
<item value="0x0008">01 (slow)</item>
<item value="0x0080">02 </item>
<item value="0x0100">03 </item>
<item value="0x0400">04 </item>
<item value="0x0800">05 (fast)</item>
</parameter>
<script state="on">
<action>maincpu.md@04bd = 00000011</action>
</script>
<script state="change">
<action>maincpu.mw@04be = param</action>
</script>
<script state="off">
<action>maincpu.md@04bd = e6b95bed</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@0024 = 7fb0</action>
<action>maincpu.mq@7fb0 = 2847b801dbe10021</action>
<action>maincpu.mq@7fb8 = fefe350120fdfefa</action>
<action>maincpu.mq@7fc0 = 3e0420fbfe340120</action>
<action>maincpu.mq@7fc8 = 3e0520f7fe0618f0</action>
<action>maincpu.mq@7fd0 = 03207ffe78778610</action>
<action>maincpu.mq@7fd8 = af0420dffe05187e</action>
<action>maincpu.mq@7fe0 = c7c7c7ce1800b7cd</action>
<!--
7fb0 | 21 00 e1 : ld hl,$E100 // sound code address
7fb3 | db 01 : in a,($01) // read input
7fb5 | b8 : cp b
7fb6 | 47 : ld b,a
7fb7 | 28 fa : jr z,$7FB3
7fb9 | fe fd : cp $FD
7fbb | 20 01 : jr nz,$7FBE
7fbd | 35 : dec (hl) // decrease code -01
7fbe | fe fe : cp $FE
7fc0 | 20 01 : jr nz,$7FC3
7fc2 | 34 : inc (hl) // increase code +01
7fc3 | fe fb : cp $FB
7fc5 | 20 04 : jr nz,$7FCB
7fc7 | 3e f0 : ld a,$F0 // decrease code -10
7fc9 | 18 06 : jr $7FD1
7fcb | fe f7 : cp $F7
7fcd | 20 05 : jr nz,$7FD4
7fcf | 3e 10 : ld a,$10 // increase code +10
7fd1 | 86 : add a,(hl)
7fd2 | 77 : ld (hl),a
7fd3 | 78 : ld a,b
7fd4 | fe 7f : cp $7F
7fd6 | 20 03 : jr nz,$7FDB
7fd8 | 7e : ld a,(hl) // play sound
7fd9 | 18 05 : jr $7FE0
7fdb | fe df : cp $DF
7fdd | 20 04 : jr nz,$7FE3
7fdf | af : xor a // stop sound
7fe0 | cd b7 00 : call $00B7 // send sound code
7fe3 | 18 ce : jr $7FB3
-->
</script>
<script state="run">
<output format="----- lode runner II 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="<< sound code %2.2X >>" line="19" align="center" >
<argument>maincpu.pb@e100</argument>
</output>
</script>
<script state="off">
<action>maincpu.mw@0024 = 26c5</action>
<action>maincpu.mq@7fb0 = c7c7c7c7c7c7c7c7</action>
<action>maincpu.mq@7fb8 = c7c7c7c7c7c7c7c7</action>
<action>maincpu.mq@7fc0 = c7c7c7c7c7c7c7c7</action>
<action>maincpu.mq@7fc8 = c7c7c7c7c7c7c7c7</action>
<action>maincpu.mq@7fd0 = c7c7c7c7c7c7c7c7</action>
<action>maincpu.mq@7fd8 = c7c7c7c7c7c7c7c7</action>
<action>maincpu.mq@7fe0 = c7c7c7c7c7c7c7c7</action>
</script>
</cheat>
</mamecheat>