Code: Select all
<cheat desc="no hit">
<script state="on">
<action>maincpu.md@1e87 = 285000cd</action>
<action>maincpu.mq@5000 = c9af0228a780bc3a</action>
<action>maincpu.mq@5008 = 00000000c97fcb1a</action>
<!--
5000 | 3a bc 80 : ld a,($80BC)
5003 | a7 : and a
5004 | 28 02 : jr z,$5008
5006 | af : xor a
5007 | c9 : ret
5008 | 1a : ld a,(de)
5009 | cb 7f : bit 7,a
500b | c9 : ret
-->
</script>
<script state="off">
<action>maincpu.md@1e87 = 287fcb1a</action>
<action>maincpu.mq@5000 = 0000000000000000</action>
<action>maincpu.mq@5008 = 0000000000000000</action>
</script>
</cheat>
<cheat desc="walk through wall">
<script state="on">
<action>maincpu.mb@3318 = 18</action> <!-- x position -->
<action>maincpu.mb@33a9 = 00</action> <!-- y position -->
</script>
<script state="off">
<action>maincpu.mb@3318 = 30</action>
<action>maincpu.mb@33a9 = d8</action>
</script>
</cheat>
<cheat desc="auto fire">
<script state="on">
<action>maincpu.md@33e0 = 205010cd</action>
<action>maincpu.mq@5010 = 36d81dfec8b7347e</action>
<action>maincpu.mq@5018 = 0000000000c9af01</action>
<!--
5010 | 7e : ld a,(hl)
5011 | 34 : inc (hl)
5012 | b7 : or a
5013 | c8 : ret z
5014 | fe 1d : cp $1D
5016 | d8 : ret c
5017 | 36 01 : ld (hl),$01
5019 | af : xor a
501a | c9 : ret
-->
</script>
<script state="off">
<action>maincpu.md@33e0 = 20b7347e</action>
<action>maincpu.mq@5010 = 0000000000000000</action>
<action>maincpu.mq@5018 = 0000000000000000</action>
</script>
</cheat>
<cheat desc="player speed">
<comment>incorrect dive animation at game start</comment>
<parameter min="0x01" max="0x05" step="0x01" />
<script state="on">
<action>maincpu.mb@3384 = 00</action> <!-- disable fall down -->
<action>maincpu.mw@3377 = 5080</action> <!-- y position -->
<action>maincpu.mw@33ca = 5080</action> <!-- x position -->
<action>maincpu.mq@5080 = 0fe680c63a509b21</action>
<action>maincpu.mq@5088 = e6052078befe7b47</action>
<action>maincpu.mq@5090 = 85c80ae60318c805</action>
<action>maincpu.mq@5098 = 0000000000c97e6f</action>
<action>maincpu.mq@50a0 = 0000000000000000</action>
<!--
5080 | 21 9b 50 : ld hl,$509B
5083 | 3a c6 80 : ld a,($80C6)
5086 | e6 0f : and $0F
5088 | 47 : ld b,a
5089 | 7b : ld a,e
508a | fe be : cp $BE
508c | 78 : ld a,b
508d | 20 05 : jr nz,$5094
508f | e6 05 : and $05 // y position
5091 | c8 : ret z
5092 | 18 03 : jr $5097
5094 | e6 0a : and $0A // x position
5096 | c8 : ret z
5097 | 85 : add a,l
5098 | 6f : ld l,a
5099 | 7e : ld a,(hl)
509a | c9 : ret
509b - 50a3 : speed table
-->
</script>
<script state="change">
<action>maincpu.mb@509c = param</action> <!-- up -->
<action>maincpu.mb@509d = param</action> <!-- right -->
<action>maincpu.mb@509f = -param</action> <!-- down -->
<action>maincpu.mb@50a3 = -param</action> <!-- left -->
</script>
<script state="off">
<action>maincpu.mb@3384 = 3d</action>
<action>maincpu.mw@3377 = 3459</action>
<action>maincpu.mw@33ca = 3459</action>
<action>maincpu.mq@5080 = 0000000000000000</action>
<action>maincpu.mq@5088 = 0000000000000000</action>
<action>maincpu.mq@5090 = 0000000000000000</action>
<action>maincpu.mq@5098 = 0000000000000000</action>
<action>maincpu.mq@50a0 = 0000000000000000</action>
</script>
</cheat>
<cheat desc="direct turn">
<script state="on">
<action>maincpu.mw@3309 = 5050</action>
<action>maincpu.mq@5050 = c63a806111506521</action>
<action>maincpu.mq@5058 = 1a466f85c80fe680</action>
<action>maincpu.mq@5060 = 020000c912b0f0e6</action>
<action>maincpu.mq@5068 = 0007060003000401</action>
<action>maincpu.mq@5070 = 0000000000000500</action>
<!--
5050 | 21 65 50 : ld hl,$5065
5053 | 11 61 80 : ld de,$8061
5056 | 3a c6 80 : ld a,($80C6)
5059 | e6 0f : and $0F
505b | c8 : ret z
505c | 85 : add a,l
505d | 6f : ld l,a
505e | 46 : ld b,(hl)
505f | 1a : ld a,(de)
5060 | e6 f0 : and $F0
5062 | b0 : or b
5063 | 12 : ld (de),a
5064 | c9 : ret
5065 - 5071 : input/direction conversion table
input direction
01 00 up
02 02 right
03 01 upper-right
04 04 down
06 03 lower-right
08 06 left
09 07 upper-left
0c 05 lower-left
-->
</script>
<script state="off">
<action>maincpu.mw@3309 = 3331</action>
<action>maincpu.mq@5050 = 0000000000000000</action>
<action>maincpu.mq@5058 = 0000000000000000</action>
<action>maincpu.mq@5060 = 0000000000000000</action>
<action>maincpu.mq@5068 = 0000000000000000</action>
<action>maincpu.mq@5070 = 0000000000000000</action>
</script>
</cheat>
<cheat desc="sound test mode">
<comment>set ram/rom check skip then reset the game (F3)</comment>
<script state="on">
<action>maincpu.mw@01ab = 01ad</action> <!-- enable sound -->
<action>maincpu.mb@024f = 00</action> <!-- disable reset -->
<action>maincpu.md@07c8 = 50205020</action>
<action>maincpu.mq@5020 = 003a810121085fcd</action>
<action>maincpu.mq@5028 = 77beb0a8003a47b8</action>
<action>maincpu.mq@5030 = fe35012040fe2bc8</action>
<action>maincpu.mq@5038 = 032010fe34012080</action>
<action>maincpu.mq@5040 = 3e052001fe06187e</action>
<action>maincpu.mq@5048 = 000000c90050cdf2</action>
<!--
5020 | cd 5f 08 : call $085F
5023 | 21 01 81 : ld hl,$8101 // sound code/input address
5026 | 3a 00 b8 : ld a,($B800) // read button input
5029 | 47 : ld b,a
502a | 3a 00 a8 : ld a,($A800) // read stick input
502d | b0 : or b
502e | be : cp (hl)
502f | 77 : ld (hl),a
5030 | c8 : ret z
5031 | 2b : dec hl
5032 | fe 40 : cp $40
5034 | 20 01 : jr nz,$5037
5036 | 35 : dec (hl) // decrease code
5037 | fe 80 : cp $80
5039 | 20 01 : jr nz,$503C
503b | 34 : inc (hl) // increase code
503c | fe 10 : cp $10
503e | 20 03 : jr nz,$5043
5040 | 7e : ld a,(hl) // play sound
5041 | 18 06 : jr $5049
5043 | fe 01 : cp $01
5045 | 20 05 : jr nz,$504C
5047 | 3e f2 : ld a,$F2 // stop sound
5049 | cd 50 00 : call $0050 // send sound code
504c | c9 : ret
-->
</script>
<script state="run">
<output format="----- marine boy 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="up : 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@8100</argument>
</output>
</script>
<script state="off">
<action>maincpu.mw@01ab = 0235</action>
<action>maincpu.mb@024f = fc</action>
<action>maincpu.md@07c8 = 07cc0a57</action>
<action>maincpu.mq@5020 = 0000000000000000</action>
<action>maincpu.mq@5028 = 0000000000000000</action>
<action>maincpu.mq@5030 = 0000000000000000</action>
<action>maincpu.mq@5038 = 0000000000000000</action>
<action>maincpu.mq@5040 = 0000000000000000</action>
<action>maincpu.mq@5048 = 0000000000000000</action>
</script>
</cheat>
<cheat desc="skip ram/rom check">
<script state="on">
<action>maincpu.mw@0005 = 06a9</action>
</script>
<script state="off">
<action>maincpu.mw@0005 = 4d51</action>
</script>
</cheat>