Code: Select all
<cheat desc="no hit (test)">
<!-- disable for trap in death match mode -->
<parameter>
<item value="0x01">P1 </item>
<item value="0x02">P2 </item>
<item value="0x03">both players</item>
</parameter>
<script state="on">
<action>maincpu.rd@62bc2 = 00071f80</action> <!-- direct attack -->
<action>maincpu.rd@62dc8 = 00071f80</action> <!-- firearms -->
<action>maincpu.rq@1c00e = 4eb900071f8e4e71</action> <!-- throw -->
<action>maincpu.rq@1beda = 4eb900071fa06700</action> <!-- throw (air) -->
<action>maincpu.rq@71f70 = b1fc001000006706</action>
<action>maincpu.rq@71f78 = b1fc001001004e75</action>
<action>maincpu.rq@71f80 = 4eb9000f409e61e8</action>
<action>maincpu.rq@71f88 = 67024a464e7561e0</action>
<action>maincpu.rq@71f90 = 660470014e75102d</action>
<action>maincpu.rq@71f98 = 60d6020000c04e75</action>
<action>maincpu.rq@71fa0 = 61ce670608280000</action>
<action>maincpu.rq@71fa8 = 60d54e7500000000</action>
<!--
71f70 | b1fc 0010 0000 : cmpa.l #$100000,A0 // player check routine
71f76 | 6706 : beq $71f7e
71f78 | b1fc 0010 0100 : cmpa.l #$100100,A0
71f7e | 4e75 : rts
71f80 | 4eb9 000f 409e : jsr $f409e.l // direct attack, firearms
71f86 | 61e8 : bsr $71f70
71f88 | 6702 : beq $71f8c
71f8a | 4a46 : tst.w D6
71f8c | 4e75 : rts
71f8e | 61e0 : bsr $71f70 // throw
71f90 | 6604 : bne $71f96
71f92 | 7001 : moveq #$1,D0
71f94 | 4e75 : rts
71f96 | 102d 60d6 : move.b ($60d6,A5),D0
71f9a | 0200 00c0 : andi.b #$c0,D0
71f9e | 4e75 : rts
71fa0 | 61ce : bsr $71f70 // throw (air)
71fa2 | 6706 : beq $71faa
71fa4 | 0828 0000 60d5 : btst #$0,($60d5,A0)
71faa | 4e75 : rts
-->
</script>
<script state="change">
<action >maincpu.rd@71f72 = 00000000</action>
<action >maincpu.rd@71f7a = 00000000</action>
<action condition="(param band 01) != 00">maincpu.rd@71f72 = 00100000</action>
<action condition="(param band 02) != 00">maincpu.rd@71f7a = 00100100</action>
</script>
<script state="off">
<action>maincpu.rd@62bc2 = 000f409e</action>
<action>maincpu.rd@62dc8 = 000f409e</action>
<action>maincpu.rq@1c00e = 102d60d6020000c0</action>
<action>maincpu.rq@1beda = 0828000060d56700</action>
<action>maincpu.rq@71f70 = 0000000000000000</action>
<action>maincpu.rq@71f78 = 0000000000000000</action>
<action>maincpu.rq@71f80 = 0000000000000000</action>
<action>maincpu.rq@71f88 = 0000000000000000</action>
<action>maincpu.rq@71f90 = 0000000000000000</action>
<action>maincpu.rq@71f98 = 0000000000000000</action>
<action>maincpu.rq@71fa0 = 0000000000000000</action>
<action>maincpu.rq@71fa8 = 0000000000000000</action>
</script>
</cheat>
<cheat desc="auto fire">
<parameter>
<item value="0x01">P1 </item>
<item value="0x02">P2 </item>
<item value="0x03">both players</item>
</parameter>
<script state="on">
<action>maincpu.rq@1a46a = 4eb900071fc04e71</action>
<action>maincpu.rq@71fb0 = 102d6001bbfc0010</action>
<action>maincpu.rq@71fb8 = 00006708bbfc0010</action>
<action>maincpu.rq@71fc0 = 01006604102d6000</action>
<action>maincpu.rq@71fc8 = 080000044e750000</action>
<!--
71fb0 | 102d 6001 : move.b ($6001,A5),D0
71fb4 | bbfc 0010 0000 : cmpa.l #$100000,A5
71fba | 6708 : beq $71fc4
71fbc | bbfc 0010 0100 : cmpa.l #$100100,A5
71fc2 | 6604 : bne $71fc8
71fc4 | 102d 6000 : move.b ($6000,A5),D0
71fc8 | 0800 0004 : btst #$4, D0
71fcc | 4e75 : rts
-->
</script>
<script state="change">
<action >maincpu.rd@71fb6 = 00000000</action>
<action >maincpu.rd@71fbe = 00000000</action>
<action condition="(param band 01) != 00">maincpu.rd@71fb6 = 00100000</action>
<action condition="(param band 02) != 00">maincpu.rd@71fbe = 00100100</action>
</script>
<script state="off">
<action>maincpu.rq@1a46a = 102d600108000004</action>
<action>maincpu.rq@71fb0 = 0000000000000000</action>
<action>maincpu.rq@71fb8 = 0000000000000000</action>
<action>maincpu.rq@71fc0 = 0000000000000000</action>
<action>maincpu.rq@71fc8 = 0000000000000000</action>
</script>
</cheat>
<cheat desc="attack speed up">
<parameter>
<item value="0x01">P1 </item>
<item value="0x02">P2 </item>
<item value="0x03">both players</item>
</parameter>
<script state="on">
<action>maincpu.rq@794dc = 4eb900071fd04e71</action>
<action>maincpu.rq@71fd0 = 30360000bbfc0010</action>
<action>maincpu.rq@71fd8 = 00006708bbfc0010</action>
<action>maincpu.rq@71fe0 = 01006606003c0001</action>
<action>maincpu.rq@71fe8 = 4e75916d60e04e75</action>
<!--
71fd0 | 3036 0000 : move.w (A6,D0.w),D0
71fd4 | bbfc 0010 0000 : cmpa.l #$100000,A5
71fda | 6708 : beq $71fe4
71fdc | bbfc 0010 0100 : cmpa.l #$100100,A5
71fe2 | 6606 : bne $71fea
71fe4 | 003c 0001 : ori #$1,CCR
71fe8 | 4e75 : rts
71fea | 916d 60e0 : sub.w D0,($60e0,A5)
71fee | 4e75 : rts
-->
</script>
<script state="change">
<action >maincpu.rd@71fd6 = 00000000</action>
<action >maincpu.rd@71fde = 00000000</action>
<action condition="(param band 01) != 00">maincpu.rd@71fd6 = 00100000</action>
<action condition="(param band 02) != 00">maincpu.rd@71fde = 00100100</action>
</script>
<script state="off">
<action>maincpu.rq@794dc = 30360000916d60e0</action>
<action>maincpu.rq@71fd0 = 0000000000000000</action>
<action>maincpu.rq@71fd8 = 0000000000000000</action>
<action>maincpu.rq@71fe0 = 0000000000000000</action>
<action>maincpu.rq@71fe8 = 0000000000000000</action>
</script>
</cheat>
<cheat desc="timer speed">
<parameter>
<item value="0x7f">01 (slow)</item>
<item value="0x60">02 </item>
<item value="0x40">03 </item>
<item value="0x1e">04 </item>
<item value="0x00">05 (fast)</item>
</parameter>
<script state="on">
<action>maincpu.rq@1e1c4 = 1d7c000030094eb9</action>
</script>
<script state="change">
<action>maincpu.rw@1e1c6 = param</action>
</script>
<script state="off">
<action>maincpu.rq@1e1c4 = 1d6e30c530094eb9</action>
</script>
</cheat>
<cheat desc="sound test mode">
<!-- don't play code 0x01 because of no sound response -->
<!-- valid bank number seems to be 0x00 only? -->
<script state="on">
<action>maincpu.rd@f00b6 = 000f09ac</action> <!-- enable sound code check in interrupt -->
<action>maincpu.rd@f4c32 = 00071ff0</action>
<action>maincpu.rq@71ff0 = 41ee010043e80001</action>
<action>maincpu.rq@71ff8 = 247c000f09701401</action>
<action>maincpu.rq@72000 = 123900300000b401</action>
<action>maincpu.rq@72008 = 67f40c0100fb6602</action>
<action>maincpu.rq@72010 = 53100c0100f76602</action>
<action>maincpu.rq@72018 = 52100c0100fd6604</action>
<action>maincpu.rq@72020 = 041000100c0100fe</action>
<action>maincpu.rq@72028 = 6604061000100c01</action>
<action>maincpu.rq@72030 = 00bb660253110c01</action>
<action>maincpu.rq@72038 = 00b7660252110211</action>
<action>maincpu.rq@72040 = 000f0c0100ef660e</action>
<action>maincpu.rq@72048 = 10116706060000f0</action>
<action>maincpu.rq@72050 = 4e9210104e920c01</action>
<action>maincpu.rq@72058 = 00df660c103c0001</action>
<action>maincpu.rq@72060 = 4e92103c00034e92</action>
<action>maincpu.rq@72068 = 6094000000000000</action>
<!--
71ff0 | 41ee 0100 : lea ($100,A6),A0 // $108100 : sound code address
71ff4 | 43e8 0001 : lea ($1,A0),A1 // $108101 : bank number address
71ff8 | 247c 000f 0970 : movea.l #$f0970,A2
71ffe | 1401 : move.b D1,D2
72000 | 1239 0030 0000 : move.b $300000.l,D1 // read input
72006 | b401 : cmp.b D1,D2
72008 | 67f4 : beq $71ffe
7200a | 0c01 00fb : cmpi.b #-$5,D1
7200e | 6602 : bne $72012
72010 | 5310 : subq.b #1,(A0) // decrease code -01
72012 | 0c01 00f7 : cmpi.b #-$9,D1
72016 | 6602 : bne $7201a
72018 | 5210 : addq.b #1,(A0) // increase code +01
7201a | 0c01 00fd : cmpi.b #-$3,D1
7201e | 6604 : bne $72024
72020 | 0410 0010 : subi.b #$10,(A0) // decrease code -10
72024 | 0c01 00fe : cmpi.b #-$2,D1
72028 | 6604 : bne $7202e
7202a | 0610 0010 : addi.b #$10,(A0) // increase code +10
7202e | 0c01 00bb : cmpi.b #-$45,D1
72032 | 6602 : bne $72036
72034 | 5311 : subq.b #1,(A1) // decrease bank -01
72036 | 0c01 00b7 : cmpi.b #-$49,D1
7203a | 6602 : bne $7203e
7203c | 5211 : addq.b #1,(A1) // increase bank +01
7203e | 0211 000f : andi.b #$f,(A1)
72042 | 0c01 00ef : cmpi.b #-$11,D1
72046 | 660e : bne $72056
72048 | 1011 : move.b (A1),D0 // play sound
7204a | 6706 : beq $72052
7204c | 0600 00f0 : addi.b #-$10,D0
72050 | 4e92 : jsr (A2)
72052 | 1010 : move.b (A0),D0
72054 | 4e92 : jsr (A2)
72056 | 0c01 00df : cmpi.b #-$21,D1
7205a | 660c : bne $72068
7205c | 103c 0001 : move.b #$1,D0 // stop sound
72060 | 4e92 : jsr (A2)
72062 | 103c 0003 : move.b #$3,D0
72066 | 4e92 : jsr (A2)
72068 | 6094 : bra $71ffe
-->
</script>
<script state="run">
<output format="----- world heroes 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 3 + left : decrease bank -01" line="15" align="center" />
<output format="button 3 + right : increase bank +01" line="16" align="center" />
<output format="button 1 : play sound" line="17" align="center" />
<output format="button 2 : stop sound" line="18" align="center" />
<output format="----------------------------" line="19" align="center" />
<output format="<< bank %2.2X >>" line="21" align="center" >
<argument>maincpu.pb@108101</argument>
</output>
<output format="<< sound code %2.2X >>" line="23" align="center" >
<argument>maincpu.pb@108100</argument>
</output>
</script>
<script state="off">
<action>maincpu.rd@f00b6 = 00c0044a</action>
<action>maincpu.rd@f4c32 = 00009200</action>
<action>maincpu.rq@71ff0 = 0000000000000000</action>
<action>maincpu.rq@71ff8 = 0000000000000000</action>
<action>maincpu.rq@72000 = 0000000000000000</action>
<action>maincpu.rq@72008 = 0000000000000000</action>
<action>maincpu.rq@72010 = 0000000000000000</action>
<action>maincpu.rq@72018 = 0000000000000000</action>
<action>maincpu.rq@72020 = 0000000000000000</action>
<action>maincpu.rq@72028 = 0000000000000000</action>
<action>maincpu.rq@72030 = 0000000000000000</action>
<action>maincpu.rq@72038 = 0000000000000000</action>
<action>maincpu.rq@72040 = 0000000000000000</action>
<action>maincpu.rq@72048 = 0000000000000000</action>
<action>maincpu.rq@72050 = 0000000000000000</action>
<action>maincpu.rq@72058 = 0000000000000000</action>
<action>maincpu.rq@72060 = 0000000000000000</action>
<action>maincpu.rq@72068 = 0000000000000000</action>
</script>
</cheat>
- "no hit" : this is test code because doesn't work for the traps in death match mode.
- "sound test mode" : this game seems to use bank code 0x00 only...? So "bank" in this code is temporary.