Code: Select all
<cheat desc="no hit">
<script state="on">
<action>maincpu.mb@3594 = c9</action>
</script>
<script state="off">
<action>maincpu.mb@3594 = d8</action>
</script>
</cheat>
<cheat desc="auto fire">
<script state="on">
<action>maincpu.mb@2125 = 6b</action> <!-- shot -->
<action>maincpu.mb@2200 = 6b</action> <!-- missile -->
</script>
<script state="off">
<action>maincpu.mb@2125 = 6a</action>
<action>maincpu.mb@2200 = 6a</action>
</script>
</cheat>
<cheat desc="sound test mode">
<script state="on">
<action>maincpu.mq@02a9 = 47b881003ac10021</action>
<action>maincpu.mq@02b1 = fe350120fbfef928</action>
<action>maincpu.mq@02b9 = 0420fdfe340120f7</action>
<action>maincpu.mq@02c1 = 0520fefe0618f03e</action>
<action>maincpu.mq@02c9 = 20dffe787786103e</action>
<action>maincpu.mq@02d1 = 0520effe06187e03</action>
<action>maincpu.mq@02d9 = 32cc18830032013e</action>
<!--
02a9 | 21 00 c1 : ld hl,$C100 // sound code address
02ac | 3a 00 81 : ld a,($8100) // read input
02af | b8 : cp b
02b0 | 47 : ld b,a
02b1 | 28 f9 : jr z,$02AC
02b3 | fe fb : cp $FB
02b5 | 20 01 : jr nz,$02B8
02b7 | 35 : dec (hl) // decrease code -01
02b8 | fe f7 : cp $F7
02ba | 20 01 : jr nz,$02BD
02bc | 34 : inc (hl) // increase code +01
02bd | fe fd : cp $FD
02bf | 20 04 : jr nz,$02C5
02c1 | 3e f0 : ld a,$F0 // decrease code -10
02c3 | 18 06 : jr $02CB
02c5 | fe fe : cp $FE
02c7 | 20 05 : jr nz,$02CE
02c9 | 3e 10 : ld a,$10 // increase code +10
02cb | 86 : add a,(hl)
02cc | 77 : ld (hl),a
02cd | 78 : ld a,b
02ce | fe df : cp $DF
02d0 | 20 03 : jr nz,$02D5
02d2 | 7e : ld a,(hl) // play sound
02d3 | 18 06 : jr $02DB
02d5 | fe ef : cp $EF
02d7 | 20 05 : jr nz,$02DE
02d9 | 3e 01 : ld a,$01 // stop sound
02db | 32 00 83 : ld ($8300),a // send sound code
02de | 18 cc : jr $02AC
-->
<action>audiocpu.mw@06ee = 06f0</action> <!-- enable sound -->
<action>audiocpu.mw@071c = 071e</action> <!-- enable sound -->
<action>audiocpu.mb@0844 = 00</action> <!-- stop sfx and music at the same time -->
</script>
<script state="run">
<output format="----- vanguard 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@c100</argument>
</output>
</script>
<script state="off">
<action> maincpu.mq@02a9 = 092057cbf4623ac9</action>
<action> maincpu.mq@02b1 = 7832033ef46332af</action>
<action> maincpu.mq@02b9 = 633a47cbf4623ac2</action>
<action> maincpu.mq@02c1 = 643a0628c26821f4</action>
<action> maincpu.mq@02c9 = 7e0628a7c26921f4</action>
<action> maincpu.mq@02d1 = 32af77af013001d6</action>
<action> maincpu.mq@02d9 = 32f46a32ff3ec12b</action>
<action>audiocpu.mw@06ee = 06ad</action>
<action>audiocpu.mw@071c = 06ad</action>
<action>audiocpu.mb@0844 = ed</action>
</script>
</cheat>
Code: Select all
<cheat desc="direct turn (test)">
<script state="on">
<action>sub.md@0139 = fe0bc0cd</action>
<action>sub.mq@0bc0 = e62fd46b3ad46c11</action>
<action>sub.mq@0bc8 = 0bd521c91a02200f</action>
<action>sub.mq@0bd0 = 0800ffc9127e6f85</action>
<action>sub.mq@0bd8 = 060204ff0a0e0cff</action>
<!--
0bc0 | 11 6c d4 : ld de,$D46C
0bc3 | 3a 6b d4 : ld a,($D46B)
0bc6 | 2f : cpl
0bc7 | e6 0f : and $0F
0bc9 | 20 02 : jr nz,$0BCD
0bcb | 1a : ld a,(de)
0bcc | c9 : ret
0bcd | 21 d5 0b : ld hl,$0BD5
0bd0 | 85 : add a,l
0bd1 | 6f : ld l,a
0bd2 | 7e : ld a,(hl)
0bd3 | 12 : ld (de),a
0bd4 | c9 : ret
0bd5 - 0bdf : input/direction conversion table
input direction
01 00 : up
02 08 : down
04 0c : left
05 0e : upper-left
06 0a : lower-left
08 04 : right
09 02 : upper-right
0a 06 : lower-right
-->
</script>
<script state="off">
<action>sub.md@0139 = fed46c3a</action>
<action>sub.mq@0bc0 = ffffffffffffffff</action>
<action>sub.mq@0bc8 = ffffffffffffffff</action>
<action>sub.mq@0bd0 = ffffffffffffffff</action>
<action>sub.mq@0bd8 = ffffffffffffffff</action>
</script>
</cheat>
broken gfx is fixed by out of screen though.