This forum is for posting M.A.M.E. Work In Progress "Arcade"cheats that are not quite ready for the prime time. If the cheats are buggy or the cheat descriptions are non-standard then please post them here. Help maybe given but there are no guarantees and they will only be added to the cheat file when the cheat file maintainer is happy with them.
jman
Posts: 844 Joined: Tue Dec 01, 2020 1:24 pm
Post
by jman » Thu Jul 29, 2021 9:30 am
mjsiyoub is playable in 0.234.
Code: Select all
<cheat desc="winning hand">
<script state="on">
<action>maincpu.mw@357d = 6580</action> <!-- tsumo -->
<action>maincpu.mw@37de = 6587</action> <!-- ron -->
<action>maincpu.mq@6580 = cdc9608fcd658ecd</action>
<action>maincpu.mq@6588 = a521c960a1cd658e</action>
<action>maincpu.mq@6590 = ed000e0170011165</action>
<action>maincpu.mq@6598 = 0170c01165b321b0</action>
<action>maincpu.mq@65a0 = 313131c9b0ed0004</action>
<action>maincpu.mq@65a8 = 3b3b3b3a3a3a3232</action>
<action>maincpu.mq@65b0 = 003c3b3a313c3c3c</action>
<!--
6580 | cd 8e 65 : call $658e // tsumo
6583 | cd 8f 60 : call $608f
6586 | c9 : ret
6587 | cd 8e 65 : call $658e // ron
658a | cd a1 60 : call $60a1
658d | c9 : ret
658e | 21 a5 65 : ld hl,$65a5 // tile data copied from table 1
6591 | 11 01 70 : ld de,$7001
6594 | 01 0e 00 : ld bc,$000e
6597 | ed b0 : ldir
6599 | 21 b3 65 : ld hl,$65b3 // tile data copied from table 2
659c | 11 c0 70 : ld de,$70c0
659f | 01 04 00 : ld bc,$0004
65a2 | ed b0 : ldir
65a4 | c9 : ret
65a5 - 65b2 : table 1
65b3 - 65b6 : table 2
-->
</script>
<script state="off">
<action>maincpu.mw@357d = 608f</action>
<action>maincpu.mw@37de = 60a1</action>
<action>maincpu.mq@6580 = 0000000000000000</action>
<action>maincpu.mq@6588 = 0000000000000000</action>
<action>maincpu.mq@6590 = 0000000000000000</action>
<action>maincpu.mq@6598 = 0000000000000000</action>
<action>maincpu.mq@65a0 = 0000000000000000</action>
<action>maincpu.mq@65a8 = 0000000000000000</action>
<action>maincpu.mq@65b0 = 0000000000000000</action>
</script>
</cheat>
jman
Posts: 844 Joined: Tue Dec 01, 2020 1:24 pm
Post
by jman » Tue Nov 21, 2023 9:44 am
Code: Select all
<!-- Mahjong Shiyou (Japan) -->
<mamecheat version="1">
<cheat desc="winning hand">
<script state="on">
<action>maincpu.mw@357D = 6580 </action> <!-- tsumo -->
<action>maincpu.mw@37DE = 6587 </action> <!-- ron -->
<action>maincpu.mq@6580 = CDC9608FCD658ECD</action>
<action>maincpu.mq@6588 = A521C960A1CD658E</action>
<action>maincpu.mq@6590 = ED000E0170011165</action>
<action>maincpu.mq@6598 = 0170C01165B321B0</action>
<action>maincpu.mq@65A0 = 313131C9B0ED0004</action>
<action>maincpu.mq@65A8 = 3B3B3B3A3A3A3232</action>
<action>maincpu.mq@65B0 = 003C3B3A313C3C3C</action>
<!--
6580 | CD 8E 65 : call $658E // tsumo
6583 | CD 8F 60 : call $608F
6586 | C9 : ret
6587 | CD 8E 65 : call $658E // ron
658A | CD A1 60 : call $60A1
658D | C9 : ret
658E | 21 A5 65 : ld hl,$65A5 // copy tiles from table 1
6591 | 11 01 70 : ld de,$7001
6594 | 01 0E 00 : ld bc,$000E
6597 | ED B0 : ldir
6599 | 21 B3 65 : ld hl,$65B3 // copy tiles from table 2
659C | 11 C0 70 : ld de,$70C0
659F | 01 04 00 : ld bc,$0004
65A2 | ED B0 : ldir
65A4 | C9 : ret
65A5 - 65B2 : table 1
65B3 - 65B6 : table 2
-->
</script>
<script state="off">
<action>maincpu.mw@357D = 608F </action>
<action>maincpu.mw@37DE = 60A1 </action>
<action>maincpu.mq@6580 = 0000000000000000</action>
<action>maincpu.mq@6588 = 0000000000000000</action>
<action>maincpu.mq@6590 = 0000000000000000</action>
<action>maincpu.mq@6598 = 0000000000000000</action>
<action>maincpu.mq@65A0 = 0000000000000000</action>
<action>maincpu.mq@65A8 = 0000000000000000</action>
<action>maincpu.mq@65B0 = 0000000000000000</action>
</script>
</cheat>
<cheat desc="sound test mode">
<comment>reset the game to enter sound test mode</comment>
<script state="on">
<action>maincpu.mw@2D31 = 6580 </action>
<action>maincpu.mq@6580 = 52CDC5F3700032AF</action>
<action>maincpu.mq@6588 = F42847B8FBC1782D</action>
<action>maincpu.mq@6590 = 35012081FE700021</action>
<action>maincpu.mq@6598 = 2083FE34012082FE</action>
<action>maincpu.mq@65A0 = 2084FE0618F03E04</action>
<action>maincpu.mq@65A8 = 85FE787786103E05</action>
<action>maincpu.mq@65B0 = 2086FE06187E0320</action>
<action>maincpu.mq@65B8 = C418730F32FF3E05</action>
<!--
6580 | AF : xor a // initialize sound code address
6581 | 32 00 70 : ld ($7000),a
6584 | F3 : di
6585 | C5 : push bc
6586 | CD 52 2D : call $2D52 // read input
6589 | 78 : ld a,b
658A | C1 : pop bc
658B | FB : ei
658C | B8 : cp b
658D | 47 : ld b,a
658E | 28 F4 : jr z,$6584
6590 | 21 00 70 : ld hl,$7000 // sound code address
6593 | FE 81 : cp $81
6595 | 20 01 : jr nz,$6598
6597 | 35 : dec (hl) // decrease code -01
6598 | FE 82 : cp $82
659A | 20 01 : jr nz,$659D
659C | 34 : inc (hl) // increase code +01
659D | FE 83 : cp $83
659F | 20 04 : jr nz,$65A5
65A1 | 3E F0 : ld a,$F0 // decrease code -10
65A3 | 18 06 : jr $65A7
65A5 | FE 84 : cp $84
65A7 | 20 05 : jr nz,$65AE
65A9 | 3E 10 : ld a,$10 // increase code +10
65AB | 86 : add a,(hl)
65AC | 77 : ld (hl),a
65AD | 78 : ld a,b
65AE | FE 85 : cp $85
65B0 | 20 03 : jr nz,$65B5
65B2 | 7E : ld a,(hl) // play sound
65B3 | 18 06 : jr $65BB
65B5 | FE 86 : cp $86
65B7 | 20 05 : jr nz,$65BE
65B9 | 3E FF : ld a,$FF // stop sound
65BB | 32 0F 73 : ld ($730F),a
65BE | 18 C4 : jr $6584
-->
</script>
<script state="run">
<output format="----- mahjong shiyou sound test mode -----" line="10" align="center" />
<output format="A : decrease code -01" line="11" align="center" />
<output format="B : increase code +01" line="12" align="center" />
<output format="C : decrease code -10" line="13" align="center" />
<output format="D : increase code +10" line="14" align="center" />
<output format="E : play sound" line="15" align="center" />
<output format="F : 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@7000</argument>
</output>
</script>
<script state="off">
<action>maincpu.mw@2D31 = 7800 </action>
<action>maincpu.mq@6580 = 0000000000000000</action>
<action>maincpu.mq@6588 = 0000000000000000</action>
<action>maincpu.mq@6590 = 0000000000000000</action>
<action>maincpu.mq@6598 = 0000000000000000</action>
<action>maincpu.mq@65A0 = 0000000000000000</action>
<action>maincpu.mq@65A8 = 0000000000000000</action>
<action>maincpu.mq@65B0 = 0000000000000000</action>
<action>maincpu.mq@65B8 = 0000000000000000</action>
</script>
</cheat>
</mamecheat>
Added "sound test mode".