[higemaru] Pirate Ship Higemaru

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: 842
Joined: Tue Dec 01, 2020 1:24 pm

[higemaru] Pirate Ship Higemaru

Post by jman »

Code: Select all

<cheat desc="no hit">
    <script state="on">
        <action>maincpu.mb@4c27 = c9</action> <!-- skull -->
        <action>maincpu.mb@4da9 = 18</action> <!-- enemy -->
    </script>
    <script state="off">
        <action>maincpu.mb@4c27 = d0</action>
        <action>maincpu.mb@4da9 = 30</action>
    </script>
</cheat>

<cheat desc="player speed">
    <parameter min="0x01" max="0x05" step="0x01" />
    <script state="on">
        <action>maincpu.mw@1443 =             7190</action> <!-- normal deck -->
        <action>maincpu.mw@247b =             7190</action> <!-- lesson deck -->
        <action>maincpu.mq@7190 = 10c12638cdc50306</action>
        <action>maincpu.mq@7198 = ffffffffffffc9f9</action>
        <!--
        7190 | 06 xx    : ld   b,$xx
        7192 | c5       : push bc
        7193 | cd 38 26 : call $2638
        7196 | c1       : pop  bc
        7197 | 10 f9    : djnz $7192
        7199 | c9       : ret
        -->
    </script>
    <script state="change">
        <action>maincpu.mb@7191 = param</action>
    </script>
    <script state="off">
        <action>maincpu.mw@1443 =             2638</action>
        <action>maincpu.mw@247b =             2638</action>
        <action>maincpu.mq@7190 = ffffffffffffffff</action>
        <action>maincpu.mq@7198 = ffffffffffffffff</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.mb@10ef =               00</action> <!-- disable next sequence at boot -->
        <action>maincpu.mw@016f =             71a0</action>
        <action>maincpu.mq@71a0 = f7fec0023ae10021</action>
        <action>maincpu.mq@71a8 = 003a0318ef3e0420</action>
        <action>maincpu.mq@71b0 = fe2bea2877be23c0</action>
        <action>maincpu.mq@71b8 = 0120fefe350120fd</action>
        <action>maincpu.mq@71c0 = 71d3cd0520effe34</action>
        <action>maincpu.mq@71c8 = 00cd0320f7fe0718</action>
        <action>maincpu.mq@71d0 = b860a9f77ecd1860</action>
        <action>maincpu.mq@71d8 = f460e560d660c760</action>
        <action>maincpu.mq@71e0 = 5161386112610360</action>
        <action>maincpu.mq@71e8 = 816178616f615d61</action>
        <action>maincpu.mq@71f0 = a8619c6193618a61</action>
        <action>maincpu.mq@71f8 = db61cc61c061b461</action>
        <action>maincpu.mq@7200 = 1a620261f661e761</action>
        <action>maincpu.mq@7208 = ffffffffffffff62</action>
        <!--
        71a0 | 21 00 e1 : ld   hl,$E100  // sound code address
        71a3 | 3a 02 c0 : ld   a,($C002) // read button input
        71a6 | fe f7    : cp   $F7
        71a8 | 20 04    : jr   nz,$71AE
        71aa | 3e ef    : ld   a,$EF
        71ac | 18 03    : jr   $71B1
        71ae | 3a 00 c0 : ld   a,($C000) // read stick input
        71b1 | 23       : inc  hl
        71b2 | be       : cp   (hl)
        71b3 | 77       : ld   (hl),a
        71b4 | 28 ea    : jr   z,$71A0
        71b6 | 2b       : dec  hl
        71b7 | fe fd    : cp   $FD
        71b9 | 20 01    : jr   nz,$71BC
        71bb | 35       : dec  (hl)      // decrease code
        71bc | fe fe    : cp   $FE
        71be | 20 01    : jr   nz,$71C1
        71c0 | 34       : inc  (hl)      // increase code
        71c1 | fe ef    : cp   $EF
        71c3 | 20 05    : jr   nz,$71CA
        71c5 | cd d3 71 : call $71D3     // play sound
        71c8 | 18 07    : jr   $71D1
        71ca | fe f7    : cp   $F7
        71cc | 20 03    : jr   nz,$71D1
        71ce | cd 00 60 : call $6000     // stop sound
        71d1 | 18 cd    : jr   $71A0
        71d3 | 7e       : ld   a,(hl)    // jump to each address
        71d4 | f7       : rst  $30
        71d5 - 7208     : jump addresses
            code  address
             00    $60a9
             01    $60b8
             02    $60c7
             03    $60d6
             04    $60e5
             05    $60f4
             06    $6103
             07    $6112
             08    $6138
             09    $6151
             0a    $615d
             0b    $616f
             0c    $6178
             0d    $6181
             0e    $618a
             0f    $6193
             11    $619c
             12    $61a8
             13    $61b4
             14    $61c0
             15    $61cc
             16    $61db
             17    $61e7
             18    $61f6
             19    $6202
             1a    $621a
        -->
    </script>
    <script state="run">
        <output format="----- higemaru 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="up : stop sound"                      line="14" align="center" />
        <output format="----------------------------"         line="15" align="center" />
        <output format="&lt;&lt; sound code %2.2X &gt;&gt;"   line="17" align="center">
            <argument>maincpu.pb@e100</argument>
        </output>
    </script>
    <script state="off">
        <action>maincpu.mb@10ef =               34</action>
        <action>maincpu.mw@016f =             0324</action>
        <action>maincpu.mq@71a0 = ffffffffffffffff</action>
        <action>maincpu.mq@71a8 = ffffffffffffffff</action>
        <action>maincpu.mq@71b0 = ffffffffffffffff</action>
        <action>maincpu.mq@71b8 = ffffffffffffffff</action>
        <action>maincpu.mq@71c0 = ffffffffffffffff</action>
        <action>maincpu.mq@71c8 = ffffffffffffffff</action>
        <action>maincpu.mq@71d0 = ffffffffffffffff</action>
        <action>maincpu.mq@71d8 = ffffffffffffffff</action>
        <action>maincpu.mq@71e0 = ffffffffffffffff</action>
        <action>maincpu.mq@71e8 = ffffffffffffffff</action>
        <action>maincpu.mq@71f0 = ffffffffffffffff</action>
        <action>maincpu.mq@71f8 = ffffffffffffffff</action>
        <action>maincpu.mq@7200 = ffffffffffffffff</action>
        <action>maincpu.mq@7208 = ffffffffffffffff</action>
    </script>
</cheat>

<cheat desc="skip ram/rom check">
    <script state="on">
        <action>maincpu.mw@004b = 0050</action>
    </script>
    <script state="off">
        <action>maincpu.mw@004b = 1bf1</action>
    </script>
</cheat>
jman
Posts: 842
Joined: Tue Dec 01, 2020 1:24 pm

[higemaru] Pirate Ship Higemaru

Post by jman »

Code: Select all

<!-- Pirate Ship Higemaru -->
<mamecheat version="1">

    <cheat desc="no hit">
        <script state="on">
            <action>maincpu.mb@4C27 = C9</action> <!-- skull -->
            <action>maincpu.mb@4DA9 = 18</action> <!-- enemy -->
        </script>
        <script state="off">
            <action>maincpu.mb@4C27 = D0</action>
            <action>maincpu.mb@4DA9 = 30</action>
        </script>
    </cheat>

    <cheat desc="player speed">
        <parameter min="0x01" max="0x05" step="0x01" />
        <script state="on">
            <action>maincpu.mw@1443 = 7190            </action> <!-- normal deck -->
            <action>maincpu.mw@247B = 7190            </action> <!-- lesson deck -->
            <action>maincpu.mq@7190 = 10C12638CDC50006</action>
            <action>maincpu.mq@7198 = FFFFFFFFFFFFC9F9</action>
            <!--
            7190 | 06 xx    : ld   b,$xx
            7192 | C5       : push bc
            7193 | CD 38 26 : call $2638
            7196 | C1       : pop  bc
            7197 | 10 F9    : djnz $7192
            7199 | C9       : ret
            -->
        </script>
        <script state="change">
            <action>maincpu.mb@7191 = param</action>
        </script>
        <script state="off">
            <action>maincpu.mw@1443 = 2638            </action>
            <action>maincpu.mw@247B = 2638            </action>
            <action>maincpu.mq@7190 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@7198 = FFFFFFFFFFFFFFFF</action>
        </script>
    </cheat>

    <cheat desc="hidden item finder (test)">
        <comment>catch an object</comment>
        <script state="on">
            <action>maincpu.mb@45AE = 00</action>
            <action>maincpu.mb@45B6 = 00</action>
        </script>
        <script state="off">
            <action>maincpu.mb@45AE = C0</action>
            <action>maincpu.mb@45B6 = C0</action>
        </script>
    </cheat>

    <cheat desc="sound test mode">
        <!-- reset the game when you choose 0x1a - 0x7f, 0x9a - 0xff -->
        <comment>set &quot;skip ram/rom check&quot; then reset the game (F3)</comment>
        <script state="on">
            <action>maincpu.mb@00BD = 0F              </action> <!-- paint screen with black -->
            <action>maincpu.mb@10EF = 00              </action> <!-- disable next sequence at boot -->
            <action>maincpu.mw@016F = 71A0            </action>
            <action>maincpu.mq@71A0 = E62FC0023AE10121</action>
            <action>maincpu.mq@71A8 = 2FC0003A47070728</action>
            <action>maincpu.mq@71B0 = 02FE2BEB2877BEB0</action>
            <action>maincpu.mq@71B8 = 34012001FE350120</action>
            <action>maincpu.mq@71C0 = 0618F03E042004FE</action>
            <action>maincpu.mq@71C8 = 7786103E062008FE</action>
            <action>maincpu.mq@71D0 = E2CD052020FE0E18</action>
            <action>maincpu.mq@71D8 = 6000CC80FE051871</action>
            <action>maincpu.mq@71E0 = 60B860A9F77EBE18</action>
            <action>maincpu.mq@71E8 = 60F460E560D660C7</action>
            <action>maincpu.mq@71F0 = 6151613861126103</action>
            <action>maincpu.mq@71F8 = 61816178616F615D</action>
            <action>maincpu.mq@7200 = 61A8619C6193618A</action>
            <action>maincpu.mq@7208 = 61DB61CC61C061B4</action>
            <action>maincpu.mq@7210 = 621A620261F661E7</action>
            <!--
            71A0 | 21 01 E1 : ld   hl,$E101  // temporary input address
            71A3 | 3A 02 C0 : ld   a,($C002) // read button inputs
            71A6 | 2F       : cpl
            71A7 | E6 28    : and  $28
            71A9 | 07       : rlca
            71AA | 07       : rlca
            71AB | 47       : ld   b,a
            71AC | 3A 00 C0 : ld   a,($C000) // read other inputs
            71AF | 2F       : cpl
            71B0 | B0       : or   b
            71B1 | BE       : cp   (hl)
            71B2 | 77       : ld   (hl),a
            71B3 | 28 EB    : jr   z,$71A0
            71B5 | 2B       : dec  hl        // sound code address ($e100)
            71B6 | FE 02    : cp   $02
            71B8 | 20 01    : jr   nz,$71BB
            71BA | 35       : dec  (hl)      // decrease code -01
            71BB | FE 01    : cp   $01
            71BD | 20 01    : jr   nz,$71C0
            71BF | 34       : inc  (hl)      // increase code +01
            71C0 | FE 04    : cp   $04
            71C2 | 20 04    : jr   nz,$71C8
            71C4 | 3E F0    : ld   a,$F0     // decrease code -10
            71C6 | 18 06    : jr   $71CE
            71C8 | FE 08    : cp   $08
            71CA | 20 06    : jr   nz,$71D2
            71CC | 3E 10    : ld   a,$10     // increase code +10
            71CE | 86       : add  a,(hl)
            71CF | 77       : ld   (hl),a
            71D0 | 18 0E    : jr   $71E0
            71D2 | FE 20    : cp   $20
            71D4 | 20 05    : jr   nz,$71DB
            71D6 | CD E2 71 : call $71E2     // play sound
            71D9 | 18 05    : jr   $71E0
            71DB | FE 80    : cp   $80
            71DD | CC 00 60 : call z,$6000   // stop sound
            71E0 | 18 BE    : jr   $71A0
            71E2 | 7E       : ld   a,(hl)
            71E3 | F7       : rst  $30
            71E4 - 7217     : jump address table
                code  address
                 00    $60a9  sfx
                 01    $60b8  sfx (loop)
                 02    $60c7  sfx
                 03    $60d6  sfx
                 04    $60e5  sfx
                 05    $60f4  sfx
                 06    $6103  sfx
                 07    $6112  sfx
                 08    $6138  music
                 09    $6151  music
                 0a    $615d  sfx - credit
                 0b    $616f  music
                 0c    $6178  music
                 0d    $6181  music
                 0e    $618a  music
                 0f    $6193  music
                 10    $619c  music
                 11    $61a8  music
                 12    $61b4  music
                 13    $61c0  music
                 14    $61cc  music
                 15    $61db  music
                 16    $61e7  music
                 17    $61f6  music
                 18    $6202  music
                 19    $621a  music
            -->
        </script>
        <script state="run">
            <output format="----- higemaru 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 1 : play sound"                line="15" align="center" />
            <output format="1P start : stop sound"                line="16" align="center" />
            <output format="----------------------------"         line="17" align="center" />
            <output format="&lt;&lt; sound code %02X &gt;&gt;"    line="19" align="center"  >
                <argument>maincpu.pb@E100</argument>
            </output>
        </script>
        <script state="off">
            <action>maincpu.mb@00BD = 07              </action>
            <action>maincpu.mb@10EF = 34              </action>
            <action>maincpu.mw@016F = 0324            </action>
            <action>maincpu.mq@71A0 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@71A8 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@71B0 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@71B8 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@71C0 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@71C8 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@71D0 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@71D8 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@71E0 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@71E8 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@71F0 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@71F8 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@7200 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@7208 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@7210 = FFFFFFFFFFFFFFFF</action>
        </script>
    </cheat>

    <cheat desc="skip ram/rom check">
        <script state="on">
            <action>maincpu.mw@004B = 0050</action>
        </script>
        <script state="off">
            <action>maincpu.mw@004B = 1BF1</action>
        </script>
    </cheat>

</mamecheat>
  • "hidden item finder" : Added new as test code.
  • "sound test mode" : Rewritten routine. Added up/down key to select code ±10. Changed sound stop button from up to start.
Post Reply