Code: Select all
<!-- Mahjong Block Jongbou 2 (Japan) -->
<mamecheat version="1">
<cheat desc="P1 keep a ball">
<script state="on">
<action>maincpu.mq@02AFA = 4EB90001A000605C</action>
<action>maincpu.mq@1A000 = 0C2E00FA0117650A</action>
<action>maincpu.mq@1A008 = 3D7CF9000256462E</action>
<action>maincpu.mq@1A010 = 02524E75FFFFFFFF</action>
<!--
1A000 | 0C2E 00FA 0117 : cmpi.b #-$6, ($117,A6)
1A006 | 650A : bcs $1a012
1A008 | 3D7C F900 0256 : move.w #$f900, ($256,A6)
1A00E | 462E 0252 : not.b ($252,A6)
1A012 | 4E75 : rts
-->
</script>
<script state="off">
<action>maincpu.mq@02AFA = 0C2E00FA0117655C</action>
<action>maincpu.mq@1A000 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@1A008 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@1A010 = FFFFFFFFFFFFFFFF</action>
</script>
</cheat>
<cheat desc="P2 keep a ball">
<script state="on">
<action>maincpu.mq@02A88 = 4EB90001A020606A</action>
<action>maincpu.mq@1A020 = 0C2E00060117640A</action>
<action>maincpu.mq@1A028 = 3D7C07000256462E</action>
<action>maincpu.mq@1A030 = 02524E75FFFFFFFF</action>
<!--
1A020 | 0C2E 0006 0117 : cmpi.b #$6, ($117,A6)
1A026 | 640A : bcc $1a032
1A028 | 3D7C 0700 0256 : move.w #$700, ($256,A6)
1A02E | 462E 0252 : not.b ($252,A6)
1A032 | 4E75 : rts
-->
</script>
<script state="off">
<action>maincpu.mq@02A88 = 0C2E00060117646A</action>
<action>maincpu.mq@1A020 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@1A028 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@1A030 = FFFFFFFFFFFFFFFF</action>
</script>
</cheat>
<cheat desc="ball speed">
<parameter>
<item value="0x0100">01 (slow)</item>
<item value="0x0200">02 </item>
<item value="0x0300">03 </item>
<item value="0x0400">04 </item>
<item value="0x0500">05 (fast)</item>
</parameter>
<script state="on">
<action>maincpu.mq@029D6 = 4EB90001A0404E71</action> <!-- x position -->
<action>maincpu.mq@029E2 = 4EB90001A04E4E71</action> <!-- y position -->
<action>maincpu.mq@1A040 = 302E0254323C0000</action>
<action>maincpu.mq@1A048 = 4A6E0250600C302E</action>
<action>maincpu.mq@1A050 = 0256323C00004A6E</action>
<action>maincpu.mq@1A058 = 025267066A024441</action>
<action>maincpu.mq@1A060 = D0414E75FFFFFFFF</action>
<!--
1A040 | 302E 0254 : move.w ($254,A6), D0 // x position
1A044 | 323C xxxx : move.w #$xx, D1
1A048 | 4A6E 0250 : tst.w ($250,A6)
1A04C | 600C : bra $1a05a
1A04E | 302E 0256 : move.w ($256,A6), D0 // y position
1A052 | 323C xxxx : move.w #$xx, D1
1A056 | 4A6E 0252 : tst.w ($252,A6)
1A05A | 6706 : beq $1a062
1A05C | 6A02 : bpl $1a060
1A05E | 4441 : neg.w D1
1A060 | D041 : add.w D1, D0
1A062 | 4E75 : rts
-->
</script>
<script state="change">
<action>maincpu.mw@1A046 = param</action>
<action>maincpu.mw@1A054 = param</action>
</script>
<script state="off">
<action>maincpu.mq@029D6 = 4EB90001A0404E71</action>
<action>maincpu.mq@029E2 = 4EB90001A0564E71</action>
<action>maincpu.mq@1A040 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@1A048 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@1A050 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@1A058 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@1A060 = FFFFFFFFFFFFFFFF</action>
</script>
</cheat>
<cheat desc="P1 winning hand">
<comment>catch a tile to win</comment>
<script state="on">
<action>maincpu.mq@0694A = 4EB90001A0704E41</action>
<action>maincpu.mq@1A070 = 43EE02C245FA0014</action>
<action>maincpu.mq@1A078 = 700C12DA51C8FFFC</action>
<action>maincpu.mq@1A080 = 115A000311520207</action>
<action>maincpu.mq@1A088 = 4E75313131323235</action>
<action>maincpu.mq@1A090 = 3535363636373737</action>
<action>maincpu.mq@1A098 = 06FFFFFFFFFFFFFF</action>
<!--
1A070 | 43EE 02C2 : lea ($2c2,A6), A1
1A074 | 45FA 0014 : lea ($14,PC) ; ($1a08a), A2
1A078 | 700C : moveq #$c, D0
1A07A | 12DA : move.b (A2)+, (A1)+
1A07C | 51C8 FFFC : dbra D0, $1a07a
1A080 | 115A 0003 : move.b (A2)+, ($3,A0)
1A084 | 1152 0207 : move.b (A2), ($207,A0)
1A088 | 4E75 : rts
1A08A - 1A098 : tile table
-->
</script>
<script state="off">
<action>maincpu.mq@0694A = 1D7C000602074E41</action>
<action>maincpu.mq@1A070 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@1A078 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@1A080 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@1A088 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@1A090 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@1A098 = FFFFFFFFFFFFFFFF</action>
</script>
</cheat>
<cheat desc="P2 winning hand">
<comment>catch a tile to win</comment>
<script state="on">
<action>maincpu.mq@06CBA = 4EB90001A0A04E41</action>
<action>maincpu.mq@1A0A0 = 43EE02E245FA0014</action>
<action>maincpu.mq@1A0A8 = 700C12DA51C8FFFC</action>
<action>maincpu.mq@1A0B0 = 115A000311520207</action>
<action>maincpu.mq@1A0B8 = 4E75313131323235</action>
<action>maincpu.mq@1A0C0 = 3535363636373737</action>
<action>maincpu.mq@1A0C8 = 06FFFFFFFFFFFFFF</action>
<!--
1A0A0 | 43EE 02E2 : lea ($2e2,A6), A1
1A0A4 | 45FA 0014 : lea ($14,PC) ; ($1a0ba), A2
1A0A8 | 700C : moveq #$c, D0
1A0AA | 12DA : move.b (A2)+, (A1)+
1A0AC | 51C8 FFFC : dbra D0, $1a0aa
1A0B0 | 115A 0003 : move.b (A2)+, ($3,A0)
1A0B4 | 1152 0207 : move.b (A2), ($207,A0)
1A0B8 | 4E75 : rts
1A0bA - 1A0C8 : tile table
-->
</script>
<script state="off">
<action>maincpu.mq@06CBA = 1D7C000602074E41</action>
<action>maincpu.mq@1A0A0 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@1A0A8 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@1A0B0 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@1A0B8 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@1A0C0 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@1A0C8 = FFFFFFFFFFFFFFFF</action>
</script>
</cheat>
<cheat desc="sound test mode">
<!-- set "dial sensitivity" as 0x30 or later if you feel it difficult to select code -->
<comment>reset the game (F3) to enter sound test mode</comment>
<script state="on">
<action>maincpu.mw@06764 = 0002 </action>
<action>maincpu.mq@00706 = 4EF90001A0D043F9</action>
<action>maincpu.mq@1A0D0 = 41F9000E00001200</action>
<action>maincpu.mq@1A0D8 = 7400102E02176708</action>
<action>maincpu.mq@1A0E0 = 6A04740260027404</action>
<action>maincpu.mq@1A0E8 = 1039000C00008002</action>
<action>maincpu.mq@1A0F0 = B20067E20C000002</action>
<action>maincpu.mq@1A0F8 = 660253160C000004</action>
<action>maincpu.mq@1A100 = 660252160C000040</action>
<action>maincpu.mq@1A108 = 660210960C000010</action>
<action>maincpu.mq@1A110 = 660410BC001060BE</action>
<!--
1A0D0 | 41F9 000E 0000 : lea $e0000.l, A0 // sound latch address
1A0D6 | 1200 : move.b D0, D1
1A0D8 | 7400 : moveq #$0, D2
1A0DA | 102E 0217 : move.b ($217,A6), D0 // read paddle ($20217)
1A0DE | 6708 : beq $1a0e8
1A0E0 | 6A04 : bpl $1a0e6
1A0E2 | 7402 : moveq #$2, D2
1A0E4 | 6002 : bra $1a0e8
1A0E6 | 7404 : moveq #$4, D2
1A0E8 | 1039 000C 0000 : move.b $c0000.l, D0 // read buttons
1A0EE | 8002 : or.b D2, D0
1A0F0 | B200 : cmp.b D0, D1
1A0F2 | 67E2 : beq $1a0d6
1A0F4 | 0C00 0002 : cmpi.b #$2, D0
1A0F8 | 6602 : bne $1a0fc
1A0FA | 5316 : subq.b #1, (A6) // decrease code -01
1A0FC | 0C00 0004 : cmpi.b #$4, D0
1A100 | 6602 : bne $1a104
1A102 | 5216 : addq.b #1, (A6) // increase code +01
1A104 | 0C00 0040 : cmpi.b #$40, D0
1A108 | 6602 : bne $1a10c
1A10A | 1096 : move.b (A6), (A0) // play sound
1A10C | 0C00 0010 : cmpi.b #$10, D0
1A110 | 6604 : bne $1a116
1A112 | 10BC 0010 : move.b #$10, (A0) // stop sound
1A116 | 60BE : bra $1a0d6
-->
</script>
<script state="run">
<output format="----- jongbou sono-ni 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="P1 start : stop sound" line="14" align="center" />
<output format="----------------------------" line="15" align="center" />
<output format="<< sound code %02X >>" line="17" align="center" >
<argument>maincpu.pb@20000</argument>
</output>
</script>
<script state="off">
<action>maincpu.mw@06764 = FF10 </action>
<action>maincpu.mq@00706 = 41F90002010243F9</action>
<action>maincpu.mq@1A0D0 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@1A0D8 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@1A0E0 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@1A0E8 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@1A0F0 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@1A0F8 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@1A100 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@1A108 = FFFFFFFFFFFFFFFF</action>
<action>maincpu.mq@1A110 = FFFFFFFFFFFFFFFF</action>
</script>
</cheat>
<cheat desc="skip rom check">
<script state="on">
<action>maincpu.mw@0640 = 604C</action>
</script>
<script state="off">
<action>maincpu.mw@0640 = 41F8</action>
</script>
</cheat>
</mamecheat>
"sound test mode" : Changed code selection from button to paddle. Set "dial sensitivity" as 0x30 or later if you feel it difficult to select code.