Code: Select all
<!-- Bare Knuckle II (scrambled bootleg of Mega Drive version) -->
<mamecheat version="1">
<cheat desc="no hit">
<script state="on">
<!-- attack -->
<action>maincpu.mq@0540A = 4EB90003AB306E06</action>
<action>maincpu.mq@3AB30 = B6FCF0006F08D643</action>
<action>maincpu.mq@3AB38 = D443B2424E757401</action>
<action>maincpu.mq@3AB40 = 4E75FFFFFFFFFFFF</action>
<!--
3AB30 | B6FC F000 : cmpa.w #$f000, A3
3AB34 | 6F08 : ble $3ab3e
3AB36 | D643 : add.w D3, D3
3AB38 | D443 : add.w D3, D2
3AB3A | B242 : cmp.w D2, D1
3AB3C | 4E75 : rts
3AB3E | 7401 : moveq #$1, D2
3AB40 | 4E75 : rts
-->
<!-- throw -->
<action>maincpu.mb@122DC = 60</action> <!-- boss 5 -->
<action>maincpu.mb@12FB4 = 60</action> <!-- boss 4 -->
<action>maincpu.mb@15374 = 60</action> <!-- boss 1 -->
<action>maincpu.mb@16868 = 60</action> <!-- signal -->
<action>maincpu.mb@17AF2 = 60</action> <!-- boss 3 -->
<action>maincpu.mb@17B24 = 60</action> <!-- boss 3 -->
<action>maincpu.mb@19768 = 60</action> <!-- boxer -->
<action>maincpu.mb@1A556 = 60</action> <!-- boss 2 -->
<action>maincpu.mb@1B0C2 = 60</action> <!-- ninja -->
<action>maincpu.mb@1C988 = 60</action> <!-- armor -->
<action>maincpu.mb@1FC28 = 60</action> <!-- shiva -->
</script>
<script state="off">
<action>maincpu.mq@0540A = B2426E06003C0001</action>
<action>maincpu.mq@3AB30 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@3AB38 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@3AB40 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mb@122DC = 66 </action>
<action>maincpu.mb@12FB4 = 66 </action>
<action>maincpu.mb@15374 = 66 </action>
<action>maincpu.mb@16868 = 66 </action>
<action>maincpu.mb@17AF2 = 66 </action>
<action>maincpu.mb@17B24 = 66 </action>
<action>maincpu.mb@19768 = 66 </action>
<action>maincpu.mb@1A556 = 66 </action>
<action>maincpu.mb@1B0C2 = 66 </action>
<action>maincpu.mb@1C988 = 66 </action>
<action>maincpu.mb@1FC28 = 66 </action>
</script>
</cheat>
<cheat desc="rapid fire">
<script state="on">
<action>maincpu.mb@BF49 = 0C</action> <!-- attack -->
<action>maincpu.mb@CB37 = 0C</action> <!-- body blow -->
<action>maincpu.mb@CAB5 = 0C</action> <!-- body blow -->
<action>maincpu.mb@CA5F = 0C</action> <!-- throw (front) -->
<action>maincpu.mb@CD29 = 0C</action> <!-- throw (back) -->
</script>
<script state="off">
<action>maincpu.mb@BF49 = 04</action>
<action>maincpu.mb@CB37 = 04</action>
<action>maincpu.mb@CAB5 = 04</action>
<action>maincpu.mb@CA5F = 04</action>
<action>maincpu.mb@CD29 = 04</action>
</script>
</cheat>
<cheat desc="player speed">
<parameter>
<item value="0x363c0080">01 (slow)</item>
<item value="0x363c0180">02 </item>
<item value="0x363c0300">03 </item>
<item value="0x363c0480">04 </item>
<item value="0x363c0600">05 (fast)</item>
</parameter>
<script state="change">
<action>maincpu.md@C04A = param</action>
</script>
<script state="off">
<action>maincpu.md@C04A = 36300000</action>
</script>
</cheat>
<cheat desc="attack speed up">
<script state="on">
<action>maincpu.mq@20E52 = 4EB90003AB50BBFC</action>
<action>maincpu.mq@3AB50 = 3B7100000016BAFC</action>
<action>maincpu.mq@3AB58 = F0006E1A0C550002</action>
<action>maincpu.mq@3AB60 = 67140C550018670E</action>
<action>maincpu.mq@3AB68 = 0C6D000200166D06</action>
<action>maincpu.mq@3AB70 = 3B7C000200164E75</action>
<!--
3AB50 | 3B71 0000 0016 : move.w (A1,D0.w), ($16,A5)
3AB56 | BAFC F000 : cmpa.w #$f000, A5
3AB5A | 6E1A : bgt $3ab76
3AB5C | 0C55 0002 : cmpi.w #$2, (A5)
3AB60 | 6714 : beq $3ab76
3AB62 | 0C55 0018 : cmpi.w #$18, (A5)
3AB66 | 670E : beq $3ab76
3AB68 | 0C6D 0002 0016 : cmpi.w #$2, ($16,A5)
3AB6E | 6D06 : blt $3ab76
3AB70 | 3B7C 0002 0016 : move.w #$2, ($16,A5)
3AB76 | 4E75 : rts
-->
</script>
<script state="off">
<action>maincpu.mq@20E52 = 3B7100000016BBFC</action>
<action>maincpu.mq@3AB50 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@3AB58 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@3AB60 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@3AB68 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@3AB70 = FFFFFFFFFFFFFFFF</action>
</script>
</cheat>
<cheat desc="easy stage finish">
<comment>press 1P button 1 + 2 + 3 at the same time to finish current stage</comment>
<script state="on">
<action>maincpu.mq@081DA = 4EB90003AB804A38</action>
<action>maincpu.mq@3ABA0 = 000C31C0FC4431C0</action>
<action>maincpu.mq@3ABA8 = FCCE4E75000C000C</action>
<action>maincpu.mq@3ABB0 = 00100016000A000A</action>
<action>maincpu.mq@3ABB8 = 0012000AFFFFFFFF</action>
<!--
3AB80 | 08B8 0004 FA5E : bclr #$4, $fa5e.w
3AB86 | 3038 FC08 : move.w $fc08.w, D0
3AB8A | 0240 F000 : andi.w #$f000, D0
3AB8E | 0C40 7000 : cmpi.w #$7000, D0 // check 1P button 1 + 2 + 3
3AB92 | 6616 : bne $3abaa
3AB94 | 11FC 00FF FC4A : move.b #$ff, $fc4a.w
3AB9A | 3038 FC42 : move.w $fc42.w, D0
3AB9E | 303B 000C : move.w ($c,PC,D0.w), D0
3ABA2 | 31C0 FC44 : move.w D0, $fc44.w
3ABA6 | 31C0 FCCE : move.w D0, $fcce.w
3ABAA | 4E75 : rts
3ABAC - 3ABBB : stage table
-->
</script>
<script state="off">
<action>maincpu.mq@081DA = 08B80004FA5E4A38</action>
<action>maincpu.mq@3ABA0 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@3ABA8 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@3ABB0 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@3ABB8 = FFFFFFFFFFFFFFFF</action>
</script>
</cheat>
<cheat desc="console mode">
<script state="on">
<action>maincpu.mq@5A56 = 1038FC098038FC0B</action>
<action>maincpu.mq@5A5E = 020000A0665E41FA</action>
<!--
5A56 | 1038 FC09 : move.b $fc09.w, D0
5A5A | 8038 FC0B : or.b $fc0b.w, D0
5A5E | 0200 00A0 : andi.b #$a0, D0
5A62 | 665E : bne $5ac2
-->
</script>
<script state="off">
<action>maincpu.mq@5A56 = 4EF9001F54004E71</action>
<action>maincpu.mq@5A5E = 4E714E714E7141FA</action>
</script>
</cheat>
<cheat desc="sound test mode">
<!-- you can't stop voices by sound stop button -->
<!-- music, sfx : bank 01, voice : bank 02 -->
<comment>reset the game (F3) to enter sound test mode</comment>
<script state="on">
<action>maincpu.md@0048E = 0003ABC0 </action>
<action>maincpu.mq@3ABC0 = 41F8800043F88001</action>
<action>maincpu.mq@3ABC8 = 16021438FC08B602</action>
<action>maincpu.mq@3ABD0 = 67F60C0200046602</action>
<action>maincpu.mq@3ABD8 = 53100C0200086602</action>
<action>maincpu.mq@3ABE0 = 52100C0200026604</action>
<action>maincpu.mq@3ABE8 = 041000100C020001</action>
<action>maincpu.mq@3ABF0 = 6604061000100C02</action>
<action>maincpu.mq@3ABF8 = 0044660253110C02</action>
<action>maincpu.mq@3AC00 = 0048660252110211</action>
<action>maincpu.mq@3AC08 = 0007424042410C02</action>
<action>maincpu.mq@3AC10 = 001066081011E148</action>
<action>maincpu.mq@3AC18 = 801060060C020020</action>
<action>maincpu.mq@3AC20 = 66064EB900040008</action>
<action>maincpu.mq@3AC28 = 609EFFFFFFFFFFFF</action>
<!--
3ABC0 | 41F8 8000 : lea $8000.w, A0 // sound code address ($ff8000)
3ABC4 | 43F8 8001 : lea $8001.w, A1 // bank number address ($ff8001)
3ABC8 | 1602 : move.b D2, D3
3ABCA | 1438 FC08 : move.b $fc08.w, D2 // read input ($fffc08)
3ABCE | B602 : cmp.b D2, D3
3ABD0 | 67F6 : beq $3abc8
3ABD2 | 0C02 0004 : cmpi.b #$4, D2
3ABD6 | 6602 : bne $3abda
3ABD8 | 5310 : subq.b #1, (A0) // decrease code -01
3ABDA | 0C02 0008 : cmpi.b #$8, D2
3ABDE | 6602 : bne $3abe2
3ABE0 | 5210 : addq.b #1, (A0) // increase code +01
3ABE2 | 0C02 0002 : cmpi.b #$2, D2
3ABE6 | 6604 : bne $3abec
3ABE8 | 0410 0010 : subi.b #$10, (A0) // decrease code -10
3ABEC | 0C02 0001 : cmpi.b #$1, D2
3ABF0 | 6604 : bne $3abf6
3ABF2 | 0610 0010 : addi.b #$10, (A0) // increase code +10
3ABF6 | 0C02 0044 : cmpi.b #$44, D2
3ABFA | 6602 : bne $3abfe
3ABFC | 5311 : subq.b #1, (A1) // decrease bank -01
3ABFE | 0C02 0048 : cmpi.b #$48, D2
3AC02 | 6602 : bne $3ac06
3AC04 | 5211 : addq.b #1, (A1) // increase bank +01
3AC06 | 0211 0007 : andi.b #$7, (A1) // mask bank number
3AC0A | 4240 : clr.w D0
3AC0C | 4241 : clr.w D1
3AC0E | 0C02 0010 : cmpi.b #$10, D2
3AC12 | 6608 : bne $3ac1c
3AC14 | 1011 : move.b (A1), D0 // play sound
3AC16 | E148 : lsl.w #8, D0
3AC18 | 8010 : or.b (A0), D0
3AC1A | 6006 : bra $3ac22
3AC1C | 0C02 0020 : cmpi.b #$20, D2
3AC20 | 6606 : bne $3ac28
3AC22 | 4EB9 0004 0008 : jsr $40008.l // send sound code
3AC28 | 609E : bra $3abc8
-->
</script>
<script state="run">
<output format="----- 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 -10" line="15" align="center" />
<output format="button 3 + right : increase bank +10" 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 %02X >>" line="21" align="center" >
<argument>maincpu.pb@FF8001</argument>
</output>
<output format="<< sound code %02X >>" line="23" align="center" >
<argument>maincpu.pb@FF8000</argument>
</output>
</script>
<script state="off">
<action>maincpu.md@0048E = 001F5200 </action>
<action>maincpu.mq@3ABC0 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@3ABC8 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@3ABD0 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@3ABD8 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@3ABE0 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@3ABE8 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@3ABF0 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@3ABF8 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@3AC00 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@3AC08 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@3AC10 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@3AC18 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@3AC20 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@3AC28 = FFFFFFFFFFFFFFFF</action>
</script>
</cheat>
</mamecheat>