[marineb] Marine Boy

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

[marineb] Marine Boy

Post by jman »

Code: Select all

<cheat desc="no hit">
    <script state="on">
        <action>maincpu.md@1e87 =         285000cd</action>
        <action>maincpu.mq@5000 = c9af0228a780bc3a</action>
        <action>maincpu.mq@5008 = 00000000c97fcb1a</action>
        <!--
        5000 | 3a bc 80 : ld  a,($80BC)
        5003 | a7       : and a
        5004 | 28 02    : jr  z,$5008
        5006 | af       : xor a
        5007 | c9       : ret
        5008 | 1a       : ld  a,(de)
        5009 | cb 7f    : bit 7,a
        500b | c9       : ret
        -->
    </script>
    <script state="off">
        <action>maincpu.md@1e87 =         287fcb1a</action>
        <action>maincpu.mq@5000 = 0000000000000000</action>
        <action>maincpu.mq@5008 = 0000000000000000</action>
    </script>
</cheat>

<cheat desc="walk through wall">
    <script state="on">
        <action>maincpu.mb@3318 = 18</action> <!-- x position -->
        <action>maincpu.mb@33a9 = 00</action> <!-- y position -->
    </script>
    <script state="off">
        <action>maincpu.mb@3318 = 30</action>
        <action>maincpu.mb@33a9 = d8</action>
    </script>
</cheat>

<cheat desc="auto fire">
    <script state="on">
        <action>maincpu.md@33e0 =         205010cd</action>
        <action>maincpu.mq@5010 = 36d81dfec8b7347e</action>
        <action>maincpu.mq@5018 = 0000000000c9af01</action>
        <!--
        5010 | 7e    : ld  a,(hl)
        5011 | 34    : inc (hl)
        5012 | b7    : or  a
        5013 | c8    : ret z
        5014 | fe 1d : cp  $1D
        5016 | d8    : ret c
        5017 | 36 01 : ld  (hl),$01
        5019 | af    : xor a
        501a | c9    : ret
        -->
    </script>
    <script state="off">
        <action>maincpu.md@33e0 =         20b7347e</action>
        <action>maincpu.mq@5010 = 0000000000000000</action>
        <action>maincpu.mq@5018 = 0000000000000000</action>
    </script>
</cheat>

<cheat desc="player speed">
    <comment>incorrect dive animation at game start</comment>
    <parameter min="0x01" max="0x05" step="0x01" />
    <script state="on">
        <action>maincpu.mb@3384 =               00</action> <!-- disable fall down -->
        <action>maincpu.mw@3377 =             5080</action> <!-- y position -->
        <action>maincpu.mw@33ca =             5080</action> <!-- x position -->
        <action>maincpu.mq@5080 = 0fe680c63a509b21</action>
        <action>maincpu.mq@5088 = e6052078befe7b47</action>
        <action>maincpu.mq@5090 = 85c80ae60318c805</action>
        <action>maincpu.mq@5098 = 0000000000c97e6f</action>
        <action>maincpu.mq@50a0 = 0000000000000000</action>
        <!--
        5080 | 21 9b 50 : ld  hl,$509B
        5083 | 3a c6 80 : ld  a,($80C6)
        5086 | e6 0f    : and $0F
        5088 | 47       : ld  b,a
        5089 | 7b       : ld  a,e
        508a | fe be    : cp  $BE
        508c | 78       : ld  a,b
        508d | 20 05    : jr  nz,$5094
        508f | e6 05    : and $05      // y position
        5091 | c8       : ret z
        5092 | 18 03    : jr  $5097
        5094 | e6 0a    : and $0A      // x position
        5096 | c8       : ret z
        5097 | 85       : add a,l
        5098 | 6f       : ld  l,a
        5099 | 7e       : ld  a,(hl)
        509a | c9       : ret
        509b - 50a3     : speed table
        -->
    </script>
    <script state="change">
        <action>maincpu.mb@509c =  param</action> <!-- up -->
        <action>maincpu.mb@509d =  param</action> <!-- right -->
        <action>maincpu.mb@509f = -param</action> <!-- down -->
        <action>maincpu.mb@50a3 = -param</action> <!-- left -->
    </script>
    <script state="off">
        <action>maincpu.mb@3384 =               3d</action>
        <action>maincpu.mw@3377 =             3459</action>
        <action>maincpu.mw@33ca =             3459</action>
        <action>maincpu.mq@5080 = 0000000000000000</action>
        <action>maincpu.mq@5088 = 0000000000000000</action>
        <action>maincpu.mq@5090 = 0000000000000000</action>
        <action>maincpu.mq@5098 = 0000000000000000</action>
        <action>maincpu.mq@50a0 = 0000000000000000</action>
    </script>
</cheat>

<cheat desc="direct turn">
    <script state="on">
        <action>maincpu.mw@3309 =             5050</action>
        <action>maincpu.mq@5050 = c63a806111506521</action>
        <action>maincpu.mq@5058 = 1a466f85c80fe680</action>
        <action>maincpu.mq@5060 = 020000c912b0f0e6</action>
        <action>maincpu.mq@5068 = 0007060003000401</action>
        <action>maincpu.mq@5070 = 0000000000000500</action>
        <!--
        5050 | 21 65 50 : ld  hl,$5065
        5053 | 11 61 80 : ld  de,$8061
        5056 | 3a c6 80 : ld  a,($80C6)
        5059 | e6 0f    : and $0F
        505b | c8       : ret z
        505c | 85       : add a,l
        505d | 6f       : ld  l,a
        505e | 46       : ld  b,(hl)
        505f | 1a       : ld  a,(de)
        5060 | e6 f0    : and $F0
        5062 | b0       : or  b
        5063 | 12       : ld  (de),a
        5064 | c9       : ret
        5065 - 5071     : input/direction conversion table
          input direction
            01    00      up
            02    02      right
            03    01      upper-right
            04    04      down
            06    03      lower-right
            08    06      left
            09    07      upper-left
            0c    05      lower-left
        -->
    </script>
    <script state="off">
        <action>maincpu.mw@3309 =             3331</action>
        <action>maincpu.mq@5050 = 0000000000000000</action>
        <action>maincpu.mq@5058 = 0000000000000000</action>
        <action>maincpu.mq@5060 = 0000000000000000</action>
        <action>maincpu.mq@5068 = 0000000000000000</action>
        <action>maincpu.mq@5070 = 0000000000000000</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.mw@01ab =             01ad</action> <!-- enable sound -->
        <action>maincpu.mb@024f =               00</action> <!-- disable reset -->
        <action>maincpu.md@07c8 =         50205020</action>
        <action>maincpu.mq@5020 = 003a810121085fcd</action>
        <action>maincpu.mq@5028 = 77beb0a8003a47b8</action>
        <action>maincpu.mq@5030 = fe35012040fe2bc8</action>
        <action>maincpu.mq@5038 = 032010fe34012080</action>
        <action>maincpu.mq@5040 = 3e052001fe06187e</action>
        <action>maincpu.mq@5048 = 000000c90050cdf2</action>
        <!--
        5020 | cd 5f 08 : call $085F
        5023 | 21 01 81 : ld   hl,$8101  // sound code/input address
        5026 | 3a 00 b8 : ld   a,($B800) // read button input
        5029 | 47       : ld   b,a
        502a | 3a 00 a8 : ld   a,($A800) // read stick input
        502d | b0       : or   b
        502e | be       : cp   (hl)
        502f | 77       : ld   (hl),a
        5030 | c8       : ret  z
        5031 | 2b       : dec  hl
        5032 | fe 40    : cp   $40
        5034 | 20 01    : jr   nz,$5037
        5036 | 35       : dec  (hl)      // decrease code
        5037 | fe 80    : cp   $80
        5039 | 20 01    : jr   nz,$503C
        503b | 34       : inc  (hl)      // increase code
        503c | fe 10    : cp   $10
        503e | 20 03    : jr   nz,$5043
        5040 | 7e       : ld   a,(hl)    // play sound
        5041 | 18 06    : jr   $5049
        5043 | fe 01    : cp   $01
        5045 | 20 05    : jr   nz,$504C
        5047 | 3e f2    : ld   a,$F2     // stop sound
        5049 | cd 50 00 : call $0050     // send sound code
        504c | c9       : ret
        -->
    </script>
    <script state="run">
        <output format="----- marine boy 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@8100</argument>
        </output>
    </script>
    <script state="off">
        <action>maincpu.mw@01ab =             0235</action>
        <action>maincpu.mb@024f =               fc</action>
        <action>maincpu.md@07c8 =         07cc0a57</action>
        <action>maincpu.mq@5020 = 0000000000000000</action>
        <action>maincpu.mq@5028 = 0000000000000000</action>
        <action>maincpu.mq@5030 = 0000000000000000</action>
        <action>maincpu.mq@5038 = 0000000000000000</action>
        <action>maincpu.mq@5040 = 0000000000000000</action>
        <action>maincpu.mq@5048 = 0000000000000000</action>
    </script>
</cheat>

<cheat desc="skip ram/rom check">
    <script state="on">
        <action>maincpu.mw@0005 = 06a9</action>
    </script>
    <script state="off">
        <action>maincpu.mw@0005 = 4d51</action>
    </script>
</cheat>
In "sound test mode", the game will reset when you try to play code 0x12.
jman
Posts: 842
Joined: Tue Dec 01, 2020 1:24 pm

[marineb] Marine Boy (update)

Post by jman »

Code: Select all

<cheat desc="player speed">
    <parameter min="0x01" max="0x05" step="0x01" />
    <script state="on">
        <action>maincpu.mb@3384 =               00</action> <!-- disable fall down -->
        <action>maincpu.mw@3377 =             5020</action> <!-- y position -->
        <action>maincpu.mw@33ca =             5020</action> <!-- x position -->
        <action>maincpu.mq@5020 = 064f070fe680c63a</action>
        <action>maincpu.mq@5028 = 8787eb4e237e0900</action>
        <action>maincpu.mq@5030 = 3ef20c28907e4787</action>
        <action>maincpu.mq@5038 = 3091031806308150</action>
        <action>maincpu.mq@5040 = 2fcb2fcb7780af01</action>
        <action>maincpu.mq@5048 = e629cb29cb4f2fcb</action>
        <action>maincpu.mq@5050 = 672100165f070703</action>
        <action>maincpu.mq@5058 = 5f03e680bc3a1936</action>
        <action>maincpu.mq@5060 = 80bb3ac847817e19</action>
        <action>maincpu.mq@5068 = e680c63ac8784fcb</action>
        <action>maincpu.mq@5070 = edf0003ea7c8780f</action>
        <action>maincpu.mq@5078 = 000000000000c944</action>
        <!--
        5020 | 3a c6 80 : ld   a,($80C6)
        5023 | e6 0f    : and  $0F
        5025 | 07       : rlca
        5026 | 4f       : ld   c,a
        5027 | 06 00    : ld   b,$00
        5029 | 09       : add  hl,bc
        502a | 7e       : ld   a,(hl)
        502b | 23       : inc  hl
        502c | 4e       : ld   c,(hl)
        502d | eb       : ex   de,hl
        502e | 87       : add  a,a
        502f | 87       : add  a,a
        5030 | 87       : add  a,a
        5031 | 47       : ld   b,a
        5032 | 7e       : ld   a,(hl)
        5033 | 90       : sub  b
        5034 | 28 0c    : jr   z,$5042
        5036 | f2 3e 50 : jp   p,$503E
        5039 | 81       : add  a,c
        503a | 30 06    : jr   nc,$5042
        503c | 18 03    : jr   $5041
        503e | 91       : sub  c
        503f | 30 01    : jr   nc,$5042
        5041 | af       : xor  a
        5042 | 80       : add  a,b
        5043 | 77       : ld   (hl),a
        5044 | cb 2f    : sra  a
        5046 | cb 2f    : sra  a
        5048 | cb 2f    : sra  a
        504a | 4f       : ld   c,a
        504b | cb 29    : sra  c
        504d | cb 29    : sra  c
        504f | e6 03    : and  $03
        5051 | 07       : rlca
        5052 | 07       : rlca
        5053 | 5f       : ld   e,a
        5054 | 16 00    : ld   d,$00
        5056 | 21 67 36 : ld   hl,$3667
        5059 | 19       : add  hl,de
        505a | 3a bc 80 : ld   a,($80BC)
        505d | e6 03    : and  $03
        505f | 5f       : ld   e,a
        5060 | 19       : add  hl,de
        5061 | 7e       : ld   a,(hl)
        5062 | 81       : add  a,c
        5063 | 47       : ld   b,a
        5064 | c8       : ret  z
        5065 | 3a bb 80 : ld   a,($80BB) // check auto moving flag
        5068 | cb 4f    : bit  1,a
        506a | 78       : ld   a,b
        506b | c8       : ret  z
        506c | 3a c6 80 : ld   a,($80C6) // check input
        506f | e6 0f    : and  $0F
        5071 | 78       : ld   a,b
        5072 | c8       : ret  z
        5073 | a7       : and  a
        5074 | 3e xx    : ld   a,$xx
        5076 | f0       : ret  p
        5077 | ed 44    : neg
        5079 | c9       : ret
        -->
    </script>
    <script state="change">
        <action>maincpu.mb@5075 = param</action>
    </script>
    <script state="off">
        <action>maincpu.mb@3384 =               3d</action>
        <action>maincpu.mw@3377 =             3459</action>
        <action>maincpu.mw@33ca =             3459</action>
        <action>maincpu.mq@5020 = 0000000000000000</action>
        <action>maincpu.mq@5028 = 0000000000000000</action>
        <action>maincpu.mq@5030 = 0000000000000000</action>
        <action>maincpu.mq@5038 = 0000000000000000</action>
        <action>maincpu.mq@5040 = 0000000000000000</action>
        <action>maincpu.mq@5048 = 0000000000000000</action>
        <action>maincpu.mq@5050 = 0000000000000000</action>
        <action>maincpu.mq@5058 = 0000000000000000</action>
        <action>maincpu.mq@5060 = 0000000000000000</action>
        <action>maincpu.mq@5068 = 0000000000000000</action>
        <action>maincpu.mq@5070 = 0000000000000000</action>
        <action>maincpu.mq@5078 = 0000000000000000</action>
    </script>
</cheat>
"player speed" : rewrite routine. reallocate address. fix diving animation at the game start.

Code: Select all

<cheat desc="no inertia">
    <script state="on">
        <action>maincpu.md@3387 =         345080cd</action> <!-- y position -->
        <action>maincpu.md@33ce =         345080cd</action> <!-- x position -->
        <action>maincpu.mq@5080 = 05280fe680c63a4f</action>
        <action>maincpu.mq@5088 = 00c9c1c980c12179</action>
        <!--
        5080 | 4f       : ld  c,a
        5081 | 3a c6 80 : ld  a,($80C6)
        5084 | e6 0f    : and $0F
        5086 | 28 05    : jr  z,$508D
        5088 | 79       : ld  a,c
        5089 | 21 c1 80 : ld  hl,$80C1
        508c | c9       : ret
        508d | c1       : pop bc
        508e | c9       : ret
        -->
    </script>
    <script state="off">
        <action>maincpu.md@3387 =         3480c121</action>
        <action>maincpu.md@33ce =         3480c121</action>
        <action>maincpu.mq@5080 = 0000000000000000</action>
        <action>maincpu.mq@5088 = 0000000000000000</action>
    </script>
</cheat>
"no inertia" : add new.

Code: Select all

<cheat desc="direct turn">
    <script state="on">
        <action>maincpu.mw@3309 =             5090</action>
        <action>maincpu.mq@5090 = c63a80611150a521</action>
        <action>maincpu.mq@5098 = 1a466f85c80fe680</action>
        <action>maincpu.mq@50a0 = 020000c912b0f0e6</action>
        <action>maincpu.mq@50a8 = 0007060003000401</action>
        <action>maincpu.mq@50b0 = 0000000000000500</action>
        <!--
        5090 | 21 a5 50 : ld  hl,$50A5
        5093 | 11 61 80 : ld  de,$8061
        5096 | 3a c6 80 : ld  a,($80C6)
        5099 | e6 0f    : and $0F
        509b | c8       : ret z
        509c | 85       : add a,l
        509d | 6f       : ld  l,a
        509e | 46       : ld  b,(hl)
        509f | 1a       : ld  a,(de)
        50a0 | e6 f0    : and $F0
        50a2 | b0       : or  b
        50a3 | 12       : ld  (de),a
        50a4 | c9       : ret
        50a5 - 50b1     : input/direction conversion table
         input direction
           01    00     : up
           02    02     : right
           03    01     : upper-right
           04    04     : down
           06    03     : lower-right
           08    06     : left
           09    07     : upper-left
           0c    05     : lower-left
        -->
    </script>
    <script state="off">
        <action>maincpu.mw@3309 =             3331</action>
        <action>maincpu.mq@5090 = 0000000000000000</action>
        <action>maincpu.mq@5098 = 0000000000000000</action>
        <action>maincpu.mq@50a0 = 0000000000000000</action>
        <action>maincpu.mq@50a8 = 0000000000000000</action>
        <action>maincpu.mq@50b0 = 0000000000000000</action>
    </script>
</cheat>
"direct turn" : reallocate address.

Code: Select all

<cheat desc="sound test mode">
    <!-- sound code 0x12 causes the game reset -->
    <comment>set &quot;skip ram/rom check&quot; then reset the game (F3)</comment>
    <script state="on">
        <action>maincpu.mw@01ab =             01ad</action> <!-- enable sound -->
        <action>maincpu.mb@024f =               00</action> <!-- disable reset -->
        <action>maincpu.md@07c8 =         50c050c0</action>
        <action>maincpu.mq@50c0 = 003a810121085fcd</action>
        <action>maincpu.mq@50c8 = b0a8003a4714e6b8</action>
        <action>maincpu.mq@50d0 = 012040fe2bc877be</action>
        <action>maincpu.mq@50d8 = 02fe34012080fe35</action>
        <action>maincpu.mq@50e0 = 01fe0618f03e0420</action>
        <action>maincpu.mq@50e8 = fec97786103e0520</action>
        <action>maincpu.mq@50f0 = 04fe05187e032010</action>
        <action>maincpu.mq@50f8 = 00c90050cdf23ec0</action>
        <!--
        50c0 | cd 5f 08 : call $085F
        50c3 | 21 01 81 : ld   hl,$8101  // $8100 = sound code, $8101 = temporary input
        50c6 | 3a 00 b8 : ld   a,($B800) // read button inputs
        50c9 | e6 14    : and  $14
        50cb | 47       : ld   b,a
        50cc | 3a 00 a8 : ld   a,($A800) // read joystick inputs
        50cf | b0       : or   b
        50d0 | be       : cp   (hl)
        50d1 | 77       : ld   (hl),a
        50d2 | c8       : ret  z
        50d3 | 2b       : dec  hl
        50d4 | fe 40    : cp   $40
        50d6 | 20 01    : jr   nz,$50D9
        50d8 | 35       : dec  (hl)      // decrease code -01
        50d9 | fe 80    : cp   $80
        50db | 20 01    : jr   nz,$50DE
        50dd | 34       : inc  (hl)      // increase code +01
        50de | fe 02    : cp   $02
        50e0 | 20 04    : jr   nz,$50E6
        50e2 | 3e f0    : ld   a,$F0     // decrease code -10
        50e4 | 18 06    : jr   $50EC
        50e6 | fe 01    : cp   $01
        50e8 | 20 05    : jr   nz,$50EF
        50ea | 3e 10    : ld   a,$10     // increase code +10
        50ec | 86       : add  a,(hl)
        50ed | 77       : ld   (hl),a
        50ee | c9       : ret
        50ef | fe 10    : cp   $10
        50f1 | 20 03    : jr   nz,$50F6
        50f3 | 7e       : ld   a,(hl)    // play sound
        50f4 | 18 05    : jr   $50FB
        50f6 | fe 04    : cp   $04
        50f8 | c0       : ret  nz
        50f9 | 3e f2    : ld   a,$F2     // stop sound
        50fb | cd 50 00 : call $0050     // send sound code
        50fe | c9       : ret
        -->
    </script>
    <script state="run">
        <output format="----- marine boy 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="start : 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@8100</argument>
        </output>
    </script>
    <script state="off">
        <action>maincpu.mw@01ab =             0235</action>
        <action>maincpu.mb@024f =               fc</action>
        <action>maincpu.md@07c8 =         07cc0a57</action>
        <action>maincpu.mq@50c0 = 0000000000000000</action>
        <action>maincpu.mq@50c8 = 0000000000000000</action>
        <action>maincpu.mq@50d0 = 0000000000000000</action>
        <action>maincpu.mq@50d8 = 0000000000000000</action>
        <action>maincpu.mq@50e0 = 0000000000000000</action>
        <action>maincpu.mq@50e8 = 0000000000000000</action>
        <action>maincpu.mq@50f0 = 0000000000000000</action>
        <action>maincpu.mq@50f8 = 0000000000000000</action>
    </script>
</cheat>
"sound test mode" : rewrite routine. reallocate address. add up/down key (code ±10). change sound stop button from up to start.
Post Reply