[sengoku] Sengoku/Sengoku Denshou

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.
Post Reply
jman
Posts: 843
Joined: Tue Dec 01, 2020 1:24 pm

[sengoku] Sengoku/Sengoku Denshou

Post by jman »

Code: Select all

<cheat desc="no hit">
    <script state="on">
        <action>maincpu.rb@9268 = 60</action> <!-- object -->
        <action>maincpu.rb@930a = 60</action> <!-- trap -->
    </script>
    <script state="off">
        <action>maincpu.rb@9268 = 66</action>
        <action>maincpu.rb@930a = 66</action>
    </script>
</cheat>

<cheat desc="auto fire">
    <comment>you can't charge the power</comment>
    <script state="on">
        <action>maincpu.rb@b4b4 = 60</action> <!-- human (charge cancel) -->
        <action>maincpu.rb@b68d = 00</action> <!-- human -->
        <action>maincpu.rb@b937 = 00</action> <!-- human (jump) -->
        <action>maincpu.rb@be56 = 60</action> <!-- ninja (charge cancel) -->
        <action>maincpu.rb@c0c3 = 00</action> <!-- ninja -->
        <action>maincpu.rb@c3ad = 00</action> <!-- ninja (jump) -->
        <action>maincpu.rb@cb75 = 00</action> <!-- samurai -->
        <action>maincpu.rb@ce8f = 00</action> <!-- samurai (jump) -->
        <action>maincpu.rb@d534 = 60</action> <!-- dog (charge cancel) -->
        <action>maincpu.rb@d6d5 = 00</action> <!-- dog -->
        <action>maincpu.rb@d99d = 00</action> <!-- dog (jump) -->
        <action>maincpu.rb@e2ea = 60</action> <!-- last battle (charge cancel) -->
        <action>maincpu.rb@e443 = 00</action> <!-- last battle -->
    </script>
    <script state="off">
        <action>maincpu.rb@b4b4 = 67</action>
        <action>maincpu.rb@b68d = 01</action>
        <action>maincpu.rb@b937 = 01</action>
        <action>maincpu.rb@be56 = 67</action>
        <action>maincpu.rb@c0c3 = 01</action>
        <action>maincpu.rb@c3ad = 01</action>
        <action>maincpu.rb@cb75 = 01</action>
        <action>maincpu.rb@ce8f = 01</action>
        <action>maincpu.rb@d534 = 67</action>
        <action>maincpu.rb@d6d5 = 01</action>
        <action>maincpu.rb@d99d = 01</action>
        <action>maincpu.rb@e2ea = 67</action>
        <action>maincpu.rb@e443 = 01</action>
    </script>
</cheat>

<cheat desc="player speed">
    <parameter>
        <item value="0x08">01 (slow)</item>
        <item value="0x18">02       </item>
        <item value="0x28">03       </item>
        <item value="0x38">04       </item>
        <item value="0x48">05 (fast)</item>
    </parameter>
    <script state="change">
        <action>maincpu.rb@b43f = param</action> <!-- human -->
        <action>maincpu.rb@bddd = param</action> <!-- ninja -->
        <action>maincpu.rb@c9f3 = param</action> <!-- samurai -->
        <action>maincpu.rb@d4c1 = param</action> <!-- dog -->
    </script>
    <script state="off">
        <action>maincpu.rb@b43f = 18</action>
        <action>maincpu.rb@bddd = 26</action>
        <action>maincpu.rb@c9f3 = 14</action>
        <action>maincpu.rb@d4c1 = 1e</action>
    </script>
</cheat>

<cheat desc="attack speed up">
    <script state="on">
        <action>maincpu.rd@0b760 =         0007eef0</action> <!-- human -->
        <action>maincpu.rd@0c1a8 =         0007eef0</action> <!-- ninja -->
        <action>maincpu.rd@0cc3a =         0007eef0</action> <!-- samurai -->
        <action>maincpu.rd@0d758 =         0007eef0</action> <!-- dog -->
        <action>maincpu.rd@0e4b0 =         0007eef0</action> <!-- last battle -->
        <action>maincpu.rq@7eef0 = 4eb84e58426e009e</action>
        <action>maincpu.rq@7eef8 = 4e75ffffffffffff</action>
        <!--
        7eef0 | 4eb8 4e58 : jsr   $4e58.w
        7eef4 | 426e 009e : clr.w ($9e,A6)
        7eef8 | 4e75      : rts
        -->
    </script>
    <script state="off">
        <action>maincpu.rd@0b760 =         00004e58</action>
        <action>maincpu.rd@0c1a8 =         00004e58</action>
        <action>maincpu.rd@0cc3a =         00004e58</action>
        <action>maincpu.rd@0d758 =         00004e58</action>
        <action>maincpu.rd@0e4b0 =         00004e58</action>
        <action>maincpu.rq@7eef0 = ffffffffffffffff</action>
        <action>maincpu.rq@7eef8 = ffffffffffffffff</action>
    </script>
</cheat>
I omit "skip ram/rom check" because it has already posted here.
jman
Posts: 843
Joined: Tue Dec 01, 2020 1:24 pm

[sengoku] Sengoku/Sengoku Denshou (update)

Post by jman »

Code: Select all

<cheat desc="sound test mode">
    <!-- don't play code 0x01, 0x03, and 0x10 because of no sound response -->
    <!-- valid bank number seems to be 0x00 and 0x08 -->
    <script state="on">
        <action>maincpu.rb@01457 =               48</action> <!-- enable sound in interrupt -->
        <action>maincpu.rq@011fe = 4ef90007ef001b6d</action>
        <action>maincpu.rq@7ef00 = 224d45e90001367c</action>
        <action>maincpu.rq@7ef08 = 1ff0160214390030</action>
        <action>maincpu.rq@7ef10 = 0000b60267f40c02</action>
        <action>maincpu.rq@7ef18 = 00fb660253110c02</action>
        <action>maincpu.rq@7ef20 = 00f7660252110c02</action>
        <action>maincpu.rq@7ef28 = 00fd660404110010</action>
        <action>maincpu.rq@7ef30 = 0c0200fe66040611</action>
        <action>maincpu.rq@7ef38 = 00100c0200bb6602</action>
        <action>maincpu.rq@7ef40 = 53120c0200b76602</action>
        <action>maincpu.rq@7ef48 = 52120212000f0c02</action>
        <action>maincpu.rq@7ef50 = 00ef661042401012</action>
        <action>maincpu.rq@7ef58 = 6706060000104e93</action>
        <action>maincpu.rq@7ef60 = 10114e930c0200df</action>
        <action>maincpu.rq@7ef68 = 6612303c00014e93</action>
        <action>maincpu.rq@7ef70 = 303c00034e93303c</action>
        <action>maincpu.rq@7ef78 = 00074e93608cffff</action>
        <!--
        7ef00 | 224d           : movea.l A5,A1        // $108000 : sound code address
        7ef02 | 45e9 0001      : lea     ($1,A1),A2   // $108001 : bank number address
        7ef06 | 367c 1ff0      : movea.w #$1ff0,A3
        7ef0a | 1602           : move.b  D2,D3
        7ef0c | 1439 0030 0000 : move.b  $300000.l,D2 // read input
        7ef12 | b602           : cmp.b   D2,D3
        7ef14 | 67f4           : beq     $7ef0a
        7ef16 | 0c02 00fb      : cmpi.b  #-$5,D2
        7ef1a | 6602           : bne     $7ef1e
        7ef1c | 5311           : subq.b  #1,(A1)      // decrease code -01
        7ef1e | 0c02 00f7      : cmpi.b  #-$9,D2
        7ef22 | 6602           : bne     $7ef26
        7ef24 | 5211           : addq.b  #1,(A1)      // increase code +01
        7ef26 | 0c02 00fd      : cmpi.b  #-$3,D2
        7ef2a | 6604           : bne     $7ef30
        7ef2c | 0411 0010      : subi.b  #$10,(A1)    // decrease code -10
        7ef30 | 0c02 00fe      : cmpi.b  #-$2,D2
        7ef34 | 6604           : bne     $7ef3a
        7ef36 | 0611 0010      : addi.b  #$10,(A1)    // increase code +10
        7ef3a | 0c02 00bb      : cmpi.b  #-$45,D2
        7ef3e | 6602           : bne     $7ef42
        7ef40 | 5312           : subq.b  #1,(A2)      // decrease bank -01
        7ef42 | 0c02 00b7      : cmpi.b  #-$49,D2
        7ef46 | 6602           : bne     $7ef4a
        7ef48 | 5212           : addq.b  #1,(A2)      // increase bank +01
        7ef4a | 0212 000f      : andi.b  #$f,(A2)
        7ef4e | 0c02 00ef      : cmpi.b  #-$11,D2
        7ef52 | 6610           : bne     $7ef64
        7ef54 | 4240           : clr.w   D0           // play sound
        7ef56 | 1012           : move.b  (A2),D0
        7ef58 | 6706           : beq     $7ef60
        7ef5a | 0600 0010      : addi.b  #$10,D0
        7ef5e | 4e93           : jsr     (A3)
        7ef60 | 1011           : move.b  (A1),D0
        7ef62 | 4e93           : jsr     (A3)
        7ef64 | 0c02 00df      : cmpi.b  #-$21,D2
        7ef68 | 6612           : bne     $7ef7c
        7ef6a | 303c 0001      : move.w  #$1,D0       // stop sound
        7ef6e | 4e93           : jsr     (A3)
        7ef70 | 303c 0003      : move.w  #$3,D0
        7ef74 | 4e93           : jsr     (A3)
        7ef76 | 303c 0007      : move.w  #$7,D0
        7ef7a | 4e93           : jsr     (A3)
        7ef7c | 608c           : bra     $7ef0a
        -->
    </script>
    <script state="run">
        <output format="----- sengoku denshou 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="&lt;&lt; bank %2.2X &gt;&gt;"                line="21" align="center"  >
            <argument>maincpu.pb@108001</argument>
        </output>
        <output format="&lt;&lt; sound code %2.2X &gt;&gt;"          line="23" align="center"  >
            <argument>maincpu.pb@108000</argument>
        </output>
    </script>
    <script state="off">
        <action>maincpu.rb@01457 =               4c</action>
        <action>maincpu.rq@011fe = 1b6d7d8280a71b6d</action>
        <action>maincpu.rq@7ef00 = ffffffffffffffff</action>
        <action>maincpu.rq@7ef08 = ffffffffffffffff</action>
        <action>maincpu.rq@7ef10 = ffffffffffffffff</action>
        <action>maincpu.rq@7ef18 = ffffffffffffffff</action>
        <action>maincpu.rq@7ef20 = ffffffffffffffff</action>
        <action>maincpu.rq@7ef28 = ffffffffffffffff</action>
        <action>maincpu.rq@7ef30 = ffffffffffffffff</action>
        <action>maincpu.rq@7ef38 = ffffffffffffffff</action>
        <action>maincpu.rq@7ef40 = ffffffffffffffff</action>
        <action>maincpu.rq@7ef48 = ffffffffffffffff</action>
        <action>maincpu.rq@7ef50 = ffffffffffffffff</action>
        <action>maincpu.rq@7ef58 = ffffffffffffffff</action>
        <action>maincpu.rq@7ef60 = ffffffffffffffff</action>
        <action>maincpu.rq@7ef68 = ffffffffffffffff</action>
        <action>maincpu.rq@7ef70 = ffffffffffffffff</action>
        <action>maincpu.rq@7ef78 = ffffffffffffffff</action>
    </script>
</cheat>
"sound test mode" : add new.
Post Reply