Code: Select all
<cheat desc="no hit">
<script state="on">
<!-- objects -->
<action>maincpu.md@1632 = e68760cd</action>
<action>maincpu.mq@8760 = c980eec87eb5fe7d</action>
<!--
8760 | 7d : ld a,l
8761 | fe b5 : cp $B5
8763 | 7e : ld a,(hl)
8764 | c8 : ret z
8765 | ee 80 : xor $80
8767 | c9 : ret
-->
<!-- background -->
<action>maincpu.mb@688d = 18</action>
<action>maincpu.mb@6901 = c3</action>
</script>
<script state="off">
<action>maincpu.md@1632 = e680ee7e</action>
<action>maincpu.mq@8760 = ffffffffffffffff</action>
<action>maincpu.mb@688d = 20</action>
<action>maincpu.mb@6901 = d2</action>
</script>
</cheat>
<cheat desc="auto fire">
<script state="on">
<action>maincpu.mb@684f = 00</action> <!-- shot -->
<action>maincpu.mb@6870 = 00</action> <!-- bomb -->
</script>
<script state="off">
<action>maincpu.mb@684f = 13</action>
<action>maincpu.mb@6870 = 13</action>
</script>
</cheat>
<cheat desc="player speed">
<parameter>
<item value="0x01">01 (slow)</item>
<item value="0x02">02 </item>
<item value="0x04">03 </item>
<item value="0x06">04 </item>
<item value="0x08">05 (fast)</item>
</parameter>
<script state="on">
<action>maincpu.md@68df = fe8770c3</action>
<action>maincpu.mq@8770 = c60b30d8fe08387e</action>
<action>maincpu.mq@8778 = d6033810fe061805</action>
<action>maincpu.mq@8780 = ffffff68eac37705</action>
<!--
8770 | 7e : ld a,(hl)
8771 | 38 08 : jr c,$877B
8773 | fe d8 : cp $D8
8775 | 30 0b : jr nc,$8782
8777 | c6 xx : add a,$xx
8779 | 18 06 : jr $8781
877b | fe 10 : cp $10
877d | 38 03 : jr c,$8782
877f | d6 xx : sub $xx
8781 | 77 : ld (hl),a
8782 | c3 ea 68 : jp $68EA
-->
</script>
<script state="change">
<action>maincpu.mb@8778 = param</action>
<action>maincpu.mb@8780 = param</action>
</script>
<script state="off">
<action>maincpu.md@68df = fe07387e</action>
<action>maincpu.mq@8770 = ffffffffffffffff</action>
<action>maincpu.mq@8778 = ffffffffffffffff</action>
<action>maincpu.mq@8780 = ffffffffffffffff</action>
</script>
</cheat>
<cheat desc="bullet speed">
<parameter>
<item value="0x01">01 (slow)</item>
<item value="0x06">02 </item>
<item value="0x0c">03 </item>
<item value="0x12">04 </item>
<item value="0x18">05 (fast)</item>
</parameter>
<script state="change">
<action>maincpu.mb@6b52 = param</action>
</script>
<script state="off">
<action>maincpu.mb@6b52 = 0a</action>
</script>
</cheat>
<cheat desc="bomb speed">
<parameter>
<item value="0x01">01 (slow)</item>
<item value="0x04">02 </item>
<item value="0x08">03 </item>
<item value="0x0c">04 </item>
<item value="0x10">05 (fast)</item>
</parameter>
<script state="change">
<action>maincpu.mb@6bf4 = param</action>
</script>
<script state="off">
<action>maincpu.mb@6bf4 = 04</action>
</script>
</cheat>
<cheat desc="fuel speed">
<parameter>
<item value="0x28">01 (slow)</item>
<item value="0x1e">02 </item>
<item value="0x14">03 </item>
<item value="0x0a">04 </item>
<item value="0x01">05 (fast)</item>
</parameter>
<script state="change">
<action>maincpu.mb@6b23 = param</action>
</script>
<script state="off">
<action>maincpu.mb@6b23 = 0a</action>
</script>
</cheat>
<cheat desc="sound test mode">
<comment>reset the game (F3) to enter sound test mode</comment>
<script state="on">
<action>maincpu.md@09d8 = 0e87b0c3</action>
<action>maincpu.mq@87b0 = 4006d80011d00021</action>
<action>maincpu.mq@87b8 = 21f91013122377af</action>
<action>maincpu.mq@87c0 = f0403ae00032b100</action>
<action>maincpu.mq@87c8 = 0120c1fef62847b8</action>
<action>maincpu.mq@87d0 = d0fe340120c2fe35</action>
<action>maincpu.mq@87d8 = 20e0fe06187e0320</action>
<action>maincpu.mq@87e0 = d3022803fef23e08</action>
<action>maincpu.mq@87e8 = ffffffffffd71800</action>
<!--
87b0 | 21 00 d0 : ld hl,$D000 // erase sprite
87b3 | 11 00 d8 : ld de,$D800
87b6 | 06 40 : ld b,$40
87b8 | af : xor a
87b9 | 77 : ld (hl),a
87ba | 23 : inc hl
87bb | 12 : ld (de),a
87bc | 13 : inc de
87bd | 10 f9 : djnz $87B8
87bf | 21 00 b1 : ld hl,$B100 // sound code address
87c2 | 32 00 e0 : ld ($E000),a // watchdog
87c5 | 3a 40 f0 : ld a,($F040) // read input
87c8 | b8 : cp b
87c9 | 47 : ld b,a
87ca | 28 f6 : jr z,$87C2
87cc | fe c1 : cp $C1
87ce | 20 01 : jr nz,$87D1
87d0 | 35 : dec (hl) // decrease code
87d1 | fe c2 : cp $C2
87d3 | 20 01 : jr nz,$87D6
87d5 | 34 : inc (hl) // increase code
87d6 | fe d0 : cp $D0
87d8 | 20 03 : jr nz,$87DD
87da | 7e : ld a,(hl) // play sound
87db | 18 06 : jr $87E3
87dd | fe e0 : cp $E0
87df | 20 08 : jr nz,$87E9
87e1 | 3e f2 : ld a,$F2 // stop sound
87e3 | fe 03 : cp $03 // disable code 0x03 to prevent from crashing sound
87e5 | 28 02 : jr z,$87E9
87e7 | d3 00 : out ($00),a // send sound code
87e9 | 18 d7 : jr $87C2
-->
</script>
<script state="run">
<output format="----- submarine 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="button 1 : play sound" line="13" align="center" />
<output format="button 2 : stop sound" line="14" align="center" />
<output format="----------------------------" line="15" align="center" />
<output format="<< sound code %2.2X >>" line="17" align="center">
<argument>maincpu.pb@b100</argument>
</output>
</script>
<script state="off">
<action>maincpu.md@09d8 = 0ee00032</action>
<action>maincpu.mq@87b0 = ffffffffffffffff</action>
<action>maincpu.mq@87b8 = ffffffffffffffff</action>
<action>maincpu.mq@87c0 = ffffffffffffffff</action>
<action>maincpu.mq@87c8 = ffffffffffffffff</action>
<action>maincpu.mq@87d0 = ffffffffffffffff</action>
<action>maincpu.mq@87d8 = ffffffffffffffff</action>
<action>maincpu.mq@87e0 = ffffffffffffffff</action>
<action>maincpu.mq@87e8 = ffffffffffffffff</action>
</script>
</cheat>