[commandoj] Commando/Senjou no Ookami

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

[commandoj] Commando/Senjou no Ookami

Post by jman »

Code: Select all

<cheat desc="no hit">
    <script state="on">
        <action>maincpu.ob@aed7 = 18</action> <!-- bullet -->
        <action>maincpu.ob@af19 = 18</action> <!-- enemy -->
        <action>maincpu.ob@9256 = c3</action> <!-- grenade -->
        <action>maincpu.ob@8c88 = c9</action> <!-- background -->
        <action>maincpu.ob@190e = 18</action> <!-- vehicle from side -->
        <action>maincpu.ob@231e = 18</action> <!-- bullet (tochka) -->
        <action>maincpu.ob@1a0b = c9</action> <!-- vehicle from front -->
        <action>maincpu.ob@3539 = c9</action> <!-- vehicle from back -->
    </script>
    <script state="off">
        <action>maincpu.ob@aed7 = 30</action>
        <action>maincpu.ob@af19 = 30</action>
        <action>maincpu.ob@9256 = d2</action>
        <action>maincpu.ob@8c88 = c8</action>
        <action>maincpu.ob@190e = 30</action>
        <action>maincpu.ob@231e = 30</action>
        <action>maincpu.ob@1a0b = d0</action>
        <action>maincpu.ob@3539 = d0</action>
    </script>
</cheat>

<cheat desc="walk through wall">
    <script state="on">
        <action>maincpu.ob@8bdc = c3</action>
        <action>maincpu.mb@8bdd = 4a</action>
    </script>
    <script state="off">
        <action>maincpu.ob@8bdc = c2</action>
        <action>maincpu.mb@8bdd = 80</action>
    </script>
</cheat>

<cheat desc="auto fire">
    <script state="on">
        <action>maincpu.mq@933a = 0c10fe106ee004b2</action>
        <!--
        933a | 3a 04 e0 : ld  a,($e004)
        933d | e6 10    : and $10
        933f | fe 10    : cp  $10
        -->
        <action>maincpu.ob@9347 = 18</action>
    </script>
    <script state="off">
        <action>maincpu.mq@933a = 0c01fe076ee00cb2</action>
        <action>maincpu.ob@9347 =               28</action>
    </script>
</cheat>

<cheat desc="player speed">
    <parameter min="0x01" max="0x05" step="0x01" />
    <script state="on">
        <action>maincpu.mw@084e =             b860</action>
        <action>maincpu.oq@b860 = 10c1ff00cdc5ff06</action>
        <action>maincpu.mq@b860 = ff008939ff000000</action>
        <action>maincpu.oq@b868 = ff00ff00ff00c900</action>
        <action>maincpu.mq@b868 = ff00ff00ff0000f9</action>
        <!--
        b860 | 06 xx    : ld   b,$xx
        b862 | c5       : push bc
        b863 | cd 39 89 : call $8939
        b866 | c1       : pop  bc
        b867 | 10 f9    : djnz $b862
        b869 | c9       : ret
        -->
    </script>
    <script state="change">
        <action>maincpu.mb@b861 = param</action>
    </script>
    <script state="off">
        <action>maincpu.mw@084e =             8939</action>
        <action>maincpu.oq@b860 = ff00ff00ff00ff00</action>
        <action>maincpu.mq@b860 = ff00ff00ff00ff00</action>
        <action>maincpu.oq@b868 = ff00ff00ff00ff00</action>
        <action>maincpu.mq@b868 = ff00ff00ff00ff00</action>
    </script>
</cheat>

<cheat desc="fast grenade">
    <script state="on">
        <action>maincpu.ob@9115 =               cd</action>
        <action>maincpu.mw@9116 =             b8a0</action>
        <action>maincpu.oq@b8a0 = ff77dd00c6007edd</action>
        <action>maincpu.mq@b8a0 = 0500ff4eff05ff00</action>
        <action>maincpu.oq@b8a8 = ff00ff00ff00c9af</action>
        <action>maincpu.mq@b8a8 = ff00ff00ff00ff00</action>
        <!--
        9115 | cd a0 b8 : call $b8a0
        b8a0 | dd 7e 05 : ld   a,(ix+$05)
        b8a3 | c6 4e    : add  a,$4e
        b8a5 | dd 77 05 : ld   (ix+$05),a
        b8a8 | af       : xor  a
        b8a9 | c9       : ret
        -->
    </script>
    <script state="off">
        <action>maincpu.ob@9115 =               dd</action>
        <action>maincpu.mw@9116 =             1553</action>
        <action>maincpu.oq@b8a0 = ff00ff00ff00ff00</action>
        <action>maincpu.mq@b8a0 = ff00ff00ff00ff00</action>
        <action>maincpu.oq@b8a8 = ff00ff00ff00ff00</action>
        <action>maincpu.mq@b8a8 = ff00ff00ff00ff00</action>
    </script>
</cheat>

<cheat desc="sound test mode">
    <comment>reset the game (F3) to enter sound test mode</comment>
    <script state="on">
        <action>maincpu.mb@0067 =               02</action>
        <action>maincpu.mw@0165 =             b870</action>
        <action>maincpu.oq@b870 = 003a00ff22ff0021</action>
        <action>maincpu.mq@b870 = 01ffe100000000ff</action>
        <action>maincpu.oq@b878 = 20fffeff286fbdff</action>
        <action>maincpu.mq@b878 = 00fd00f600ff00c0</action>
        <action>maincpu.oq@b880 = fe24ff20fffe2500</action>
        <action>maincpu.mq@b880 = ff000100fe00ff01</action>
        <action>maincpu.oq@b888 = fffeff187c002000</action>
        <action>maincpu.mq@b888 = df000600ff03ffef</action>
        <action>maincpu.oq@b890 = 18ff0032003e0020</action>
        <action>maincpu.mq@b890 = 00c800ff00ff05ff</action>
        <action>maincpu.oq@b898 = 00ff00ff00ff00ff</action>
        <action>maincpu.mq@b898 = 00ff00ff00ff00da</action>
        <!--
        b870 | 21 00 00 : ld  hl,$0000   // initialize sound and input values
        b873 | 22 00 e1 : ld  ($e100),hl
        b876 | 3a 01 c0 : ld  a,($c001)  // read input
        b879 | bd       : cp  l
        b87a | 6f       : ld  l,a
        b87b | 28 f6    : jr  z,$b873
        b87d | fe fd    : cp  $fd
        b87f | 20 01    : jr  nz,$b882
        b881 | 25       : dec h          // decrease code
        b882 | fe fe    : cp  $fe
        b884 | 20 01    : jr  nz,$b887
        b886 | 24       : inc h          // increase code
        b887 | fe ef    : cp  $ef
        b889 | 20 03    : jr  nz,$b88e
        b88b | 7c       : ld  a,h        // play sound
        b88c | 18 06    : jr  $b894
        b88e | fe df    : cp  $df
        b890 | 20 05    : jr  nz,$b897
        b892 | 3e 00    : ld  a,$00      // stop sound
        b894 | 32 00 c8 : ld  ($c800),a  // send sound code
        b897 | 18 da    : jr  $b873
        -->
        <action>audiocpu.mb@0100 = 00</action> <!-- stop sfx and music at the same time -->
    </script>
    <script state="run">
        <output format="----- senjou no ookami 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="button 2 : 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@e101</argument>
        </output>
    </script>
    <script state="off">
        <action> maincpu.mb@0067 =               00</action>
        <action> maincpu.mw@0165 =             8000</action>
        <action> maincpu.oq@b870 = 00ff00ff00ff00ff</action>
        <action> maincpu.mq@b870 = 00ff00ff00ff00ff</action>
        <action> maincpu.oq@b878 = 00ff00ff00ff00ff</action>
        <action> maincpu.mq@b878 = 00ff00ff00ff00ff</action>
        <action> maincpu.oq@b880 = ff00ff00ff00ff00</action>
        <action> maincpu.mq@b880 = ff00ff00ff00ff00</action>
        <action> maincpu.oq@b888 = ff00ff00ff00ff00</action>
        <action> maincpu.mq@b888 = ff00ff00ff00ff00</action>
        <action> maincpu.oq@b890 = 00ff00ff00ff00ff</action>
        <action> maincpu.mq@b890 = 00ff00ff00ff00ff</action>
        <action> maincpu.oq@b898 = 00ff00ff00ff00ff</action>
        <action> maincpu.mq@b898 = 00ff00ff00ff00ff</action>
        <action>audiocpu.mb@0100 =               c9</action>
    </script>
</cheat>

<cheat desc="skip warning message">
    <script state="on">
        <action>maincpu.ob@03dc = 00</action>
        <action>maincpu.ob@03e1 = 00</action>
    </script>
    <script state="off">
        <action>maincpu.ob@03dc = c0</action>
        <action>maincpu.ob@03e1 = c0</action>
    </script>
</cheat>
I confirm that "player speed" causes some gfx scroll bug.
jman
Posts: 843
Joined: Tue Dec 01, 2020 1:24 pm

[commandoj] Commando/Senjou no Ookami (update)

Post by jman »

Code: Select all

<cheat desc="fast grenade">
    <script state="on">
        <action>maincpu.ob@9115 =               cd</action>
        <action>maincpu.mw@9116 =             b870</action>
        <action>maincpu.oq@b870 = ff77dd00c6007edd</action>
        <action>maincpu.mq@b870 = 0500ff4eff05ff00</action>
        <action>maincpu.oq@b878 = ff00ff00ff00c9af</action>
        <action>maincpu.mq@b878 = ff00ff00ff00ff00</action>
        <!--
        b870 | dd 7e 05 : ld  a,(ix+$05)
        b873 | c6 4e    : add a,$4E
        b875 | dd 77 05 : ld  (ix+$05),a
        b878 | af       : xor a
        b879 | c9       : ret
        -->
    </script>
    <script state="off">
        <action>maincpu.ob@9115 =               dd</action>
        <action>maincpu.mw@9116 =             1553</action>
        <action>maincpu.oq@b870 = ff00ff00ff00ff00</action>
        <action>maincpu.mq@b870 = ff00ff00ff00ff00</action>
        <action>maincpu.oq@b878 = ff00ff00ff00ff00</action>
        <action>maincpu.mq@b878 = ff00ff00ff00ff00</action>
    </script>
</cheat>
"fast grenade" : reallocate address.

Code: Select all

<cheat desc="short hit mark (test)">
    <script state="on">
        <action>maincpu.mb@8fd1 = 01</action>
        <action>maincpu.mb@902e = 01</action>
        <action>maincpu.mb@90f3 = 01</action>
    </script>
    <script state="off">
        <action>maincpu.mb@8fd1 = 06</action>
        <action>maincpu.mb@902e = 07</action>
        <action>maincpu.mb@90f3 = 06</action>
    </script>
</cheat>
"short hit mark" : add new as "test" code. unverified.

Code: Select all

<cheat desc="sound test mode">
    <comment>reset the game (F3) to enter sound test mode</comment>
    <script state="on">
        <action>maincpu.mb@0067 =               02</action>
        <action>maincpu.mw@0165 =             b880</action>
        <action>maincpu.oq@b880 = 00ff3a77afff0021</action>
        <action>maincpu.mq@b880 = c00100ff00e100ff</action>
        <action>maincpu.oq@b888 = 002000fe002847b8</action>
        <action>maincpu.mq@b888 = 01fffdfff9ff00ff</action>
        <action>maincpu.oq@b890 = fffe34002000fe35</action>
        <action>maincpu.mq@b890 = fb00ff01fffeff00</action>
        <action>maincpu.oq@b898 = fffeff18ff3eff20</action>
        <action>maincpu.mq@b898 = f7000600f0000400</action>
        <action>maincpu.oq@b8a0 = fe787786003e0020</action>
        <action>maincpu.mq@b8a0 = 00ff00ff10ff05ff</action>
        <action>maincpu.oq@b8a8 = 00fe00187eff20ff</action>
        <action>maincpu.mq@b8a8 = dfff05ff000300ef</action>
        <action>maincpu.oq@b8b0 = ff18ff0032afff20</action>
        <action>maincpu.mq@b8b0 = cd00c800ff000400</action>
        <!--
        b880 | 21 00 e1 : ld  hl,$E100  // sound code address
        b883 | af       : xor a
        b884 | 77       : ld  (hl),a
        b885 | 3a 01 c0 : ld  a,($C001) // read input
        b888 | b8       : cp  b
        b889 | 47       : ld  b,a
        b88a | 28 f9    : jr  z,$B885
        b88c | fe fd    : cp  $FD
        b88e | 20 01    : jr  nz,$B891
        b890 | 35       : dec (hl)      // decrease code -01
        b891 | fe fe    : cp  $FE
        b893 | 20 01    : jr  nz,$B896
        b895 | 34       : inc (hl)      // increase code +01
        b896 | fe fb    : cp  $FB
        b898 | 20 04    : jr  nz,$B89E
        b89a | 3e f0    : ld  a,$F0     // decrease code -10
        b89c | 18 06    : jr  $B8a4
        b89e | fe f7    : cp  $F7
        b8a0 | 20 05    : jr  nz,$B8A7
        b8a2 | 3e 10    : ld  a,$10     // increase code +10
        b8a4 | 86       : add a,(hl)
        b8a5 | 77       : ld  (hl),a
        b8a6 | 78       : ld  a,b
        b8a7 | fe ef    : cp  $EF
        b8a9 | 20 03    : jr  nz,$B8AE
        b8ab | 7e       : ld  a,(hl)    // play sound
        b8ac | 18 05    : jr  $B8B3
        b8ae | fe df    : cp  $DF
        b8b0 | 20 04    : jr  nz,$B8B6
        b8b2 | af       : xor a         // stop sound
        b8b3 | 32 00 c8 : ld  ($C800),a // send sound code
        b8b6 | 18 cd    : jr  $B885
        -->
        <action>audiocpu.mb@0100 = 00</action> <!-- stop sfx and music at the same time -->
    </script>
    <script state="run">
        <output format="----- senjou no ookami 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="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@e100</argument>
        </output>
    </script>
    <script state="off">
        <action> maincpu.mb@0067 =               00</action>
        <action> maincpu.mw@0165 =             8000</action>
        <action> maincpu.oq@b880 = 00ff00ff00ff00ff</action>
        <action> maincpu.mq@b880 = 00ff00ff00ff00ff</action>
        <action> maincpu.oq@b888 = 00ff00ff00ff00ff</action>
        <action> maincpu.mq@b888 = 00ff00ff00ff00ff</action>
        <action> maincpu.oq@b890 = ff00ff00ff00ff00</action>
        <action> maincpu.mq@b890 = ff00ff00ff00ff00</action>
        <action> maincpu.oq@b898 = ff00ff00ff00ff00</action>
        <action> maincpu.mq@b898 = ff00ff00ff00ff00</action>
        <action> maincpu.oq@b8a0 = 00ff00ff00ff00ff</action>
        <action> maincpu.mq@b8a0 = 00ff00ff00ff00ff</action>
        <action> maincpu.oq@b8a8 = 00ff00ff00ff00ff</action>
        <action> maincpu.mq@b8a8 = 00ff00ff00ff00ff</action>
        <action> maincpu.oq@b8b0 = 00ff00ff00ff00ff</action>
        <action> maincpu.mq@b8b0 = 00ff00ff00ff00ff</action>
        <action>audiocpu.mb@0100 =               c9</action>
    </script>
</cheat>
"sound test mode" : rewrite routine. reallocate address. add up/down key (code ±10).
Post Reply