[powj] Prisoners of War/Datsugoku

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

[powj] Prisoners of War/Datsugoku

Post by jman »

Code: Select all

<cheat desc="no hit">
    <script state="on">
        <action>maincpu.mb@101b6 = 60</action> <!-- attack -->
        <action>maincpu.mb@1078e = 60</action> <!-- knife -->
        <action>maincpu.mb@10bb4 = 60</action> <!-- bomb -->
        <action>maincpu.mb@10ff6 = 60</action> <!-- tank -->
        <action>maincpu.mb@1149a = 60</action> <!-- crane -->
    </script>
    <script state="off">
        <action>maincpu.mb@101b6 = 6e</action>
        <action>maincpu.mb@1078e = 6e</action>
        <action>maincpu.mb@10bb4 = 6e</action>
        <action>maincpu.mb@10ff6 = 6e</action>
        <action>maincpu.mb@1149a = 6e</action>
    </script>
</cheat>

<cheat desc="auto fire">
    <script state="on">
        <action>maincpu.mb@0147c = 6d</action> <!-- punch -->
        <action>maincpu.mb@01494 = 6d</action> <!-- kick -->
    </script>
    <script state="off">
        <action>maincpu.mb@0147c = 66</action>
        <action>maincpu.mb@01494 = 66</action>
    </script>
</cheat>

<cheat desc="attack speed up">
    <script state="on">
        <action>maincpu.mb@15a3 = 00</action>
        <action>maincpu.mb@1615 = 00</action>
        <action>maincpu.mb@1841 = 00</action>
        <action>maincpu.mb@19b1 = 00</action>
        <action>maincpu.mb@194d = 00</action>
        <action>maincpu.mb@1a21 = 00</action>
        <action>maincpu.mb@1a99 = 00</action>
    </script>
    <script state="off">
        <action>maincpu.mb@15a3 = 03</action>
        <action>maincpu.mb@1615 = 04</action>
        <action>maincpu.mb@1841 = 01</action>
        <action>maincpu.mb@19b1 = 03</action>
        <action>maincpu.mb@194d = 03</action>
        <action>maincpu.mb@1a21 = 02</action>
        <action>maincpu.mb@1a99 = 02</action>
    </script>
</cheat>

<cheat desc="sound test mode">
    <comment>set ram/rom check skip then reset the game (F3)</comment>
    <script state="on">
        <action> maincpu.mq@004be = 4ef9000194104a39</action>
        <action> maincpu.mq@19410 = 41f90004100043f9</action>
        <action> maincpu.mq@19418 = 0008000010bc003a</action>
        <action> maincpu.mq@19420 = 140112290001b401</action>
        <action> maincpu.mq@19428 = 67f60c0100fb6602</action>
        <action> maincpu.mq@19430 = 53100c0100f76602</action>
        <action> maincpu.mq@19438 = 52100c0100fd6604</action>
        <action> maincpu.mq@19440 = 041000100c0100fe</action>
        <action> maincpu.mq@19448 = 6604061000100c01</action>
        <action> maincpu.mq@19450 = 00ef66041010600a</action>
        <action> maincpu.mq@19458 = 0c0100df6606103c</action>
        <action> maincpu.mq@19460 = 0040128060baffff</action>
        <action>soundcpu.mb@009b1 =               00</action> <!-- forced to play music -->
        <action>soundcpu.mb@00a76 =               00</action> <!-- forced to play sfx -->
        <action>soundcpu.mb@00b08 =               00</action> <!-- forced to play sample -->
        <!--
        19410 | 41f9 0004 1000 : lea    $41000.l,A0 // sound code address
        19416 | 43f9 0008 0000 : lea    $80000.l,A1 // input and sound address
        1941c | 10bc 003a      : move.b #$3a,(A0)   // initialize sound code
        19420 | 1401           : move.b D1,D2
        19422 | 1229 0001      : move.b ($1,A1),D1  // read input
        19426 | b401           : cmp.b  D1,D2
        19428 | 67f6           : beq    $19420
        1942a | 0c01 00fb      : cmpi.b #-$5,D1
        1942e | 6602           : bne    $19432
        19430 | 5310           : subq.b #1,(A0)     // decrease code -01
        19432 | 0c01 00f7      : cmpi.b #-$9,D1
        19436 | 6602           : bne    $1943a
        19438 | 5210           : addq.b #1,(A0)     // increase code +01
        1943a | 0c01 00fd      : cmpi.b #-$3,D1
        1943e | 6604           : bne    $19444
        19440 | 0410 0010      : subi.b #$10,(A0)   // decrease code -10
        19444 | 0c01 00fe      : cmpi.b #-$2,D1
        19448 | 6604           : bne    $1944e
        1944a | 0610 0010      : addi.b #$10,(A0)   // increase code +10
        1944e | 0c01 00ef      : cmpi.b #-$11,D1
        19452 | 6604           : bne    $19458
        19454 | 1010           : move.b (A0),D0     // play sound
        19456 | 600a           : bra    $19462
        19458 | 0c01 00df      : cmpi.b #-$21,D1
        1945c | 6606           : bne    $19464
        1945e | 103c 0040      : move.b #$40,D0     // stop sound
        19462 | 1280           : move.b D0,(A1)     // send sound code
        19464 | 60ba           : bra    $19420
        -->
    </script>
    <script state="run">
        <output format="----- datsugoku 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="up : increase code +10"                line="13" align="center" />
        <output format="down : decrease code -10"              line="14" align="center" />
        <output format="button 1 : play sound"                 line="15" align="center" />
        <output format="button 2 : stop sound"                 line="16" align="center" />
        <output format="----------------------------"          line="17" align="center" />
        <output format="&lt;&lt; sound code %2.2X &gt;&gt;"    line="19" align="center">
            <argument>maincpu.pb@41000</argument>
        </output>
    </script>
    <script state="off">
        <action> maincpu.mq@004be = 4a39000e00004a39</action>
        <action> maincpu.mq@19410 = ffffffffffffffff</action>
        <action> maincpu.mq@19418 = ffffffffffffffff</action>
        <action> maincpu.mq@19420 = ffffffffffffffff</action>
        <action> maincpu.mq@19428 = ffffffffffffffff</action>
        <action> maincpu.mq@19430 = ffffffffffffffff</action>
        <action> maincpu.mq@19438 = ffffffffffffffff</action>
        <action> maincpu.mq@19440 = ffffffffffffffff</action>
        <action> maincpu.mq@19448 = ffffffffffffffff</action>
        <action> maincpu.mq@19450 = ffffffffffffffff</action>
        <action> maincpu.mq@19458 = ffffffffffffffff</action>
        <action> maincpu.mq@19460 = ffffffffffffffff</action>
        <action>soundcpu.mb@009b1 =               c0</action>
        <action>soundcpu.mb@00a76 =               c0</action>
        <action>soundcpu.mb@00b08 =               c8</action>
    </script>
</cheat>
<cheat desc="skip ram/rom check">
    <script state="on">
        <action> maincpu.mw@045e = 0460</action> <!-- skip test -->
        <action> maincpu.mw@0470 = 57ce</action> <!-- skip result -->
        <action>soundcpu.mw@0b76 = 5a18</action>
    </script>
    <script state="off">
        <action> maincpu.mw@045e = 61e6</action>
        <action> maincpu.mw@0470 = 57d0</action>
        <action>soundcpu.mw@0b76 = 013e</action>
    </script>
</cheat>
In sound test mode, code 0x3a is "sound hardware no error" music. If you want to play "error" music, turn "skip ram/rom check" off after enter sound test mode then play 0x3a.
Post Reply