Code: Select all
<cheat desc="no hit">
<script state="on">
<!-- main collision check -->
<action>temp0 = maincpu.pb@e040</action> <!-- backup bank -->
<action>maincpu.ib@00f7 = 0x0b</action> <!-- set bank -->
<action>maincpu.ow@ba04 = bf90</action>
<action>maincpu.oq@bf90 = 7efdc807fec0a03a</action>
<action>maincpu.oq@bf98 = ed000501bfa62100</action>
<action>maincpu.oq@bfa0 = 1214c9ba82cdc0b1</action>
<action>maincpu.oq@bfa8 = ffffffffff040611</action>
<!--
bf90 | 3a a0 c0 : ld a,($C0A0) // check current round
bf93 | fe 07 : cp $07
bf95 | c8 : ret z
bf96 | fd 7e 00 : ld a,(iy+$00)
bf99 | 21 a6 bf : ld hl,$BFA6
bf9c | 01 05 00 : ld bc,$0005
bf9f | ed b1 : cpir // search table
bfa1 | c0 : ret nz
bfa2 | cd 82 ba : call $BA82 // call collision check
bfa5 | c9 : ret
bfa6 - bfaa : target value table
value target
04 coin
06 paper money
11 warp
12 boss warp
14 shop
-->
<action>maincpu.ib@00f7 = temp0</action> <!-- restore bank -->
<!-- boss -->
<action>maincpu.ob@12c3 = 18</action>
</script>
<script state="off">
<action>temp0 = maincpu.pb@e040</action>
<action>maincpu.ib@00f7 = 0x0b</action>
<action>maincpu.ow@ba04 = ba82</action>
<action>maincpu.oq@bf90 = ffffffffffffffff</action>
<action>maincpu.oq@bf98 = ffffffffffffffff</action>
<action>maincpu.oq@bfa0 = ffffffffffffffff</action>
<action>maincpu.oq@bfa8 = ffffffffffffffff</action>
<action>maincpu.ib@00f7 = temp0</action>
<action>maincpu.ob@12c3 = 28</action>
</script>
</cheat>
<cheat desc="auto fire">
<script state="on">
<action>maincpu.mb@1699 = 00</action> <!-- shot -->
<action>maincpu.mb@16c0 = 00</action> <!-- bomb -->
</script>
<script state="off">
<action>maincpu.mb@1699 = 0e</action>
<action>maincpu.mb@16c0 = 06</action>
</script>
</cheat>
<cheat desc="free price">
<script state="on">
<action>maincpu.ob@4b0c = af</action> <!-- price display -->
<action>maincpu.ob@4b18 = af</action> <!-- price display -->
<action>maincpu.oq@5098 = 00c9772c772c77af</action>
<!--
5098 | af : xor a
5099 | 77 : ld (hl),a
509a | 2c : inc l
509b | 77 : ld (hl),a
509c | 2c : inc l
509d | 77 : ld (hl),a
509e | c9 : ret
-->
</script>
<script state="off">
<action>maincpu.ob@4b0c = 7e</action>
<action>maincpu.ob@4b18 = 7e</action>
<action>maincpu.oq@5098 = 1a2c1c961a648611</action>
</script>
</cheat>
<cheat desc="mark secret shop">
<script state="on">
<action>maincpu.mb@4724 = 04</action>
</script>
<script state="off">
<action>maincpu.mb@4724 = 1a</action>
</script>
</cheat>
<cheat desc="sound test mode">
<comment>reset the game (F3) to enter sound test mode</comment>
<script state="on">
<action>temp0 = maincpu.pb@e040</action> <!-- backup bank -->
<action>maincpu.ib@00f7 = 00</action> <!-- set bank -->
<action>maincpu.mw@00c0 = b730</action>
<action>maincpu.oq@b730 = 2847b8e1dbc10021</action>
<action>maincpu.oq@b738 = f7fe350120fbfefa</action>
<action>maincpu.oq@b740 = 3e0420fdfe340120</action>
<action>maincpu.oq@b748 = 3e0620fefe0618f0</action>
<action>maincpu.oq@b750 = 20effe1118778610</action>
<action>maincpu.oq@b758 = dffe051880f67e05</action>
<action>maincpu.oq@b760 = cb18de0232af0420</action>
<!--
b730 | 21 00 c1 : ld hl,$C100 // sound code address
b733 | db e1 : in a,($E1) // read input
b735 | b8 : cp b
b736 | 47 : ld b,a
b737 | 28 fa : jr z,$B733
b739 | fe fb : cp $FB
b73b | 20 01 : jr nz,$B73E
b73d | 35 : dec (hl) // decrease code -01
b73e | fe f7 : cp $F7
b740 | 20 01 : jr nz,$B743
b742 | 34 : inc (hl) // increase code +01
b743 | fe fe : cp $FD
b745 | 20 04 : jr nz,$B74B
b747 | 3e 10 : ld a,$F0 // decrease code -10
b749 | 18 06 : jr $B751
b74b | fe fd : cp $FE
b74d | 20 06 : jr nz,$B755
b74f | 3e f0 : ld a,$10 // increase code +10
b751 | 86 : add a,(hl)
b752 | 77 : ld (hl),a
b753 | 18 11 : jr $B766
b755 | fe ef : cp $EF
b757 | 20 05 : jr nz,$B75E
b759 | 7e : ld a,(hl) // play sound
b75a | f6 80 : or $80
b75c | 18 05 : jr $B763
b75e | fe df : cp $DF
b760 | 20 04 : jr nz,$B766
b762 | af : xor a // stop sound
b763 | 32 02 de : ld ($DE02),a // send sound code
b766 | 18 cb : jr $B733
-->
<action>maincpu.ib@00f7 = temp0</action> <!-- restore bank -->
</script>
<script state="run">
<output format="----- fantasy zone 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="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="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@c100</argument>
</output>
</script>
<script state="off">
<action>temp0 = maincpu.pb@e040</action>
<action>maincpu.ib@00f7 = 00</action>
<action>maincpu.mw@00c0 = 082f</action>
<action>maincpu.oq@b730 = ffffffffffffffff</action>
<action>maincpu.oq@b738 = ffffffffffffffff</action>
<action>maincpu.oq@b740 = ffffffffffffffff</action>
<action>maincpu.oq@b748 = ffffffffffffffff</action>
<action>maincpu.oq@b750 = ffffffffffffffff</action>
<action>maincpu.oq@b758 = ffffffffffffffff</action>
<action>maincpu.oq@b760 = ffffffffffffffff</action>
<action>maincpu.ib@00f7 = temp0</action>
</script>
</cheat>