Page 1 of 1

[pprobe] Planet Probe

Posted: Wed Sep 27, 2023 2:17 pm
by jman

Code: Select all

<!-- Planet Probe (prototype?) -->
<mamecheat version="1">

    <cheat desc="no hit">
        <script state="on">
            <action>maincpu.mb@0324 = 6b</action>
        </script>
        <script state="off">
            <action>maincpu.mb@0324 = 6c</action>
        </script>
    </cheat>

    <cheat desc="auto fire - shot">
        <script state="on">
            <action>maincpu.mb@18f9 = 04</action>
        </script>
        <script state="off">
            <action>maincpu.mb@18f9 = 28</action>
        </script>
    </cheat>

    <cheat desc="player speed">
        <parameter min="0x01" max="0x05" step="0x01" />
        <script state="change">
            <action>maincpu.mb@1873 = param</action>
        </script>
        <script state="off">
            <action>maincpu.mb@1873 = 01</action>
        </script>
    </cheat>

    <cheat desc="bullet speed - shot">
        <parameter>
            <item value="0x01">01 (slow)</item>
            <item value="0x04">02       </item>
            <item value="0x08">03       </item>
            <item value="0x0c">04       </item>
            <item value="0x10">05 (fast)</item>
        </parameter>
        <script state="change">
            <action>maincpu.mb@1ae6 =      param</action> <!-- speed -->
            <action>maincpu.mb@1aeb = fa - param</action> <!-- range -->
        </script>
        <script state="off">
            <action>maincpu.mb@1ae6 = 05</action>
            <action>maincpu.mb@1aeb = fa</action>
        </script>
    </cheat>

    <cheat desc="fast bomb">
        <script state="on">
            <action>maincpu.mb@1ace =               1e</action> <!-- timer -->
            <action>maincpu.mw@18da =             7fd0</action> <!-- set x/y position -->
            <action>maincpu.mq@7fd0 = 77f4bb3a2323e036</action>
            <action>maincpu.mq@7fd8 = 0000c977f4bc3a23</action>
            <!--
            7fd0 | 36 e0    : ld  (hl),$E0
            7fd2 | 23       : inc hl
            7fd3 | 23       : inc hl
            7fd4 | 3a bb f4 : ld  a,($F4BB)
            7fd7 | 77       : ld  (hl),a
            7fd8 | 23       : inc hl
            7fd9 | 3a bc f4 : ld  a,($F4BC)
            7fdc | 77       : ld  (hl),a
            7fdd | c9       : ret
            -->
        </script>
        <script state="off">
            <action>maincpu.mb@1ace =               00</action>
            <action>maincpu.mw@18da =             190e</action>
            <action>maincpu.mq@7fd0 = 0017191c15190015</action>
            <action>maincpu.mq@7fd8 = 151900150d0f120d</action>
        </script>
    </cheat>

    <cheat desc="sound test mode">
        <comment>reset the game (F3) to enter sound test mode</comment>
        <script state="on">
            <action>maincpu.mw@7f21 =             6e80</action>
            <action>maincpu.mq@6e80 = 093ae00032f10021</action>
            <action>maincpu.mq@6e88 = 2001fef62847b8f0</action>
            <action>maincpu.mq@6e90 = fe34012002fe3501</action>
            <action>maincpu.mq@6e98 = fe0618f03e042008</action>
            <action>maincpu.mq@6ea0 = 787786103e052004</action>
            <action>maincpu.mq@6ea8 = fe06187e032010fe</action>
            <action>maincpu.mq@6eb0 = f00032fe3e052020</action>
            <action>maincpu.mq@6eb8 = 000000000000c918</action>
            <!--
            6e80 | 21 00 f1 : ld  hl,$F100  // sound code address
            6e83 | 32 00 e0 : ld  ($E000),a // watchdog
            6e86 | 3a 09 f0 : ld  a,($F009) // read input
            6e89 | b8       : cp  b
            6e8a | 47       : ld  b,a
            6e8b | 28 f6    : jr  z,$6E83
            6e8d | fe 01    : cp  $01
            6e8f | 20 01    : jr  nz,$6E92
            6e91 | 35       : dec (hl)      // decrease code -01
            6e92 | fe 02    : cp  $02
            6e94 | 20 01    : jr  nz,$6E97
            6e96 | 34       : inc (hl)      // increase code +01
            6e97 | fe 08    : cp  $08
            6e99 | 20 04    : jr  nz,$6E9F
            6e9b | 3e f0    : ld  a,$F0     // decrease code -10
            6e9d | 18 06    : jr  $6EA5
            6e9f | fe 04    : cp  $04
            6ea1 | 20 05    : jr  nz,$6EA8
            6ea3 | 3e 10    : ld  a,$10     // increase code +10
            6ea5 | 86       : add a,(hl)
            6ea6 | 77       : ld  (hl),a
            6ea7 | 78       : ld  a,b
            6ea8 | fe 10    : cp  $10
            6eaa | 20 03    : jr  nz,$6EAF
            6eac | 7e       : ld  a,(hl)    // play sound
            6ead | 18 06    : jr  $6EB5
            6eaf | fe 20    : cp  $20
            6eb1 | 20 05    : jr  nz,$6EB8
            6eb3 | 3e fe    : ld  a,$FE     // stop sound
            6eb5 | 32 00 f0 : ld  ($F000),a // send sound code
            6eb8 | 18 c9    : jr  $6E83
            -->
        </script>
        <script state="run">
            <output format="----- planet probe 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@f100</argument>
            </output>
        </script>
        <script state="off">
            <action>maincpu.mw@7f21 =             7fb8</action>
            <action>maincpu.mq@6e80 = 0000000000000000</action>
            <action>maincpu.mq@6e88 = 0000000000000000</action>
            <action>maincpu.mq@6e90 = 0000000000000000</action>
            <action>maincpu.mq@6e98 = 0000000000000000</action>
            <action>maincpu.mq@6ea0 = 0000000000000000</action>
            <action>maincpu.mq@6ea8 = 0000000000000000</action>
            <action>maincpu.mq@6eb0 = 0000000000000000</action>
            <action>maincpu.mq@6eb8 = 0000000000000000</action>
        </script>
    </cheat>

</mamecheat>

[pprobe] Planet Probe

Posted: Sat Jan 11, 2025 1:21 am
by jman
pprobe.xml

Code: Select all

<!-- Planet Probe (prototype?) -->
<mamecheat version="1">

    <cheat desc="no hit">
        <script state="on">
            <action>maincpu.mb@0324 = 6B</action>
        </script>
        <script state="off">
            <action>maincpu.mb@0324 = 6C</action>
        </script>
    </cheat>

    <cheat desc="rapid fire - shot">
        <script state="on">
            <action>maincpu.mb@18F9 = 04</action>
        </script>
        <script state="off">
            <action>maincpu.mb@18F9 = 28</action>
        </script>
    </cheat>

    <cheat desc="player speed">
        <parameter min="0x01" max="0x05" step="0x01" />
        <script state="change">
            <action>maincpu.mb@1873 = param</action>
        </script>
        <script state="off">
            <action>maincpu.mb@1873 = 01</action>
        </script>
    </cheat>

    <cheat desc="bullet speed - shot">
        <parameter>
            <item value="0x01">01 (slow)</item>
            <item value="0x04">02       </item>
            <item value="0x08">03       </item>
            <item value="0x0c">04       </item>
            <item value="0x10">05 (fast)</item>
        </parameter>
        <script state="change">
            <action>maincpu.mb@1AE6 =      param</action> <!-- speed -->
            <action>maincpu.mb@1AEB = FA - param</action> <!-- range -->
        </script>
        <script state="off">
            <action>maincpu.mb@1AE6 = 05</action>
            <action>maincpu.mb@1AEB = FA</action>
        </script>
    </cheat>

    <cheat desc="fast bomb">
        <script state="on">
            <action>maincpu.mb@1ACE = 1E              </action> <!-- timer -->
            <action>maincpu.mw@18DA = 7FD0            </action> <!-- set x/y position -->
            <action>maincpu.mq@7FD0 = 77F4BB3A2323E036</action>
            <action>maincpu.mq@7FD8 = 0000C977F4BC3A23</action>
            <!--
            7FD0 | 36 E0    : ld   (hl),$E0
            7FD2 | 23       : inc  hl
            7FD3 | 23       : inc  hl
            7FD4 | 3A BB F4 : ld   a,($F4BB)
            7FD7 | 77       : ld   (hl),a
            7FD8 | 23       : inc  hl
            7FD9 | 3A BC F4 : ld   a,($F4BC)
            7FDC | 77       : ld   (hl),a
            7FDD | C9       : ret
            -->
        </script>
        <script state="off">
            <action>maincpu.mb@1ACE = 00              </action>
            <action>maincpu.mw@18DA = 190E            </action>
            <action>maincpu.mq@7FD0 = 0017191C15190015</action>
            <action>maincpu.mq@7FD8 = 151900150D0F120D</action>
        </script>
    </cheat>

    <cheat desc="auto damage">
        <script state="on">
            <action>maincpu.mw@0332 = 6EC0            </action>
            <action>maincpu.mw@034C = 6EC0            </action>
            <action>maincpu.mw@0355 = 6EC0            </action>
            <action>maincpu.mw@0367 = 6EC0            </action>
            <action>maincpu.mq@6EC0 = 30070C7EFDC5E5FD</action>
            <action>maincpu.mq@6EC8 = 1530F0FE0F7EFD1C</action>
            <action>maincpu.mq@6ED0 = FE0E3818FE0E7EFD</action>
            <action>maincpu.mq@6ED8 = FDBE0CCBFD0A30E8</action>
            <action>maincpu.mq@6EE0 = 1019FD0418C60CCB</action>
            <action>maincpu.mq@6EE8 = 00036CC3E1FDC1DA</action>
            <!--
            6EC0 | FD E5       : push iy
            6EC2 | C5          : push bc
            6EC3 | FD 7E 0C    : ld   a,(iy+$0c) // check state
            6EC6 | 07          : rlca
            6EC7 | 30 1C       : jr   nc,$6EE5
            6EC9 | FD 7E 0F    : ld   a,(iy+$0f) // check y position
            6ECC | FE F0       : cp   $F0
            6ECE | 30 15       : jr   nc,$6EE5
            6ED0 | FD 7E 0E    : ld   a,(iy+$0e) // check x position
            6ED3 | FE 18       : cp   $18
            6ED5 | 38 0E       : jr   c,$6EE5
            6ED7 | FE E8       : cp   $E8
            6ED9 | 30 0A       : jr   nc,$6EE5
            6EDB | FD CB 0C BE : res  7,(iy+$0c) // set hit flags
            6EDF | FD CB 0C C6 : set  0,(iy+$0c)
            6EE3 | 18 04       : jr   $6EE9
            6EE5 | FD 19       : add  iy,de
            6EE7 | 10 DA       : djnz $6EC3
            6EE9 | C1          : pop  bc
            6EEA | FD E1       : pop  iy
            6EEC | C3 6C 03    : jp   $036C
            -->
        </script>
        <script state="off">
            <action>maincpu.mw@0332 = 036C            </action>
            <action>maincpu.mw@034C = 036C            </action>
            <action>maincpu.mw@0355 = 036C            </action>
            <action>maincpu.mw@0367 = 036C            </action>
            <action>maincpu.mq@6EC0 = 0000000000000000</action>
            <action>maincpu.mq@6EC8 = 0000000000000000</action>
            <action>maincpu.mq@6ED0 = 0000000000000000</action>
            <action>maincpu.mq@6ED8 = 0000000000000000</action>
            <action>maincpu.mq@6EE0 = 0000000000000000</action>
            <action>maincpu.mq@6EE8 = 0000000000000000</action>
        </script>
    </cheat>

    <cheat desc="sound test mode">
        <comment>reset the game (F3) to enter sound test mode</comment>
        <script state="on">
            <action>maincpu.mw@7F21 = 6E80            </action>
            <action>maincpu.mq@6E80 = 093AE00032F10021</action>
            <action>maincpu.mq@6E88 = 2001FEF62847B8F0</action>
            <action>maincpu.mq@6E90 = FE34012002FE3501</action>
            <action>maincpu.mq@6E98 = FE0618F03E042008</action>
            <action>maincpu.mq@6EA0 = 787786103E052004</action>
            <action>maincpu.mq@6EA8 = FE06187E032010FE</action>
            <action>maincpu.mq@6EB0 = F00032FE3E052020</action>
            <action>maincpu.mq@6EB8 = 000000000000C918</action>
            <!--
            6E80 | 21 00 F1 : ld   hl,$F100  // sound code address
            6E83 | 32 00 E0 : ld   ($E000),a // watchdog
            6E86 | 3A 09 F0 : ld   a,($F009) // read input
            6E89 | B8       : cp   b
            6E8A | 47       : ld   b,a
            6E8B | 28 F6    : jr   z,$6E83
            6E8D | FE 01    : cp   $01
            6E8F | 20 01    : jr   nz,$6E92
            6E91 | 35       : dec  (hl)      // decrease code -01
            6E92 | FE 02    : cp   $02
            6E94 | 20 01    : jr   nz,$6E97
            6E96 | 34       : inc  (hl)      // increase code +01
            6E97 | FE 08    : cp   $08
            6E99 | 20 04    : jr   nz,$6E9F
            6E9B | 3E F0    : ld   a,$F0     // decrease code -10
            6E9D | 18 06    : jr   $6EA5
            6E9F | FE 04    : cp   $04
            6EA1 | 20 05    : jr   nz,$6EA8
            6EA3 | 3E 10    : ld   a,$10     // increase code +10
            6EA5 | 86       : add  a,(hl)
            6EA6 | 77       : ld   (hl),a
            6EA7 | 78       : ld   a,b
            6EA8 | FE 10    : cp   $10
            6EAA | 20 03    : jr   nz,$6EAF
            6EAC | 7E       : ld   a,(hl)    // play sound
            6EAD | 18 06    : jr   $6EB5
            6EAF | FE 20    : cp   $20
            6EB1 | 20 05    : jr   nz,$6EB8
            6EB3 | 3E FE    : ld   a,$FE     // stop sound
            6EB5 | 32 00 F0 : ld   ($F000),a // send sound code
            6EB8 | 18 C9    : jr   $6E83
            -->
        </script>
        <script state="run">
            <output format="----- 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 %02X &gt;&gt;" line="19" align="center"  >
                <argument>maincpu.pb@F100</argument>
            </output>
        </script>
        <script state="off">
            <action>maincpu.mw@7F21 = 7FB8            </action>
            <action>maincpu.mq@6E80 = 0000000000000000</action>
            <action>maincpu.mq@6E88 = 0000000000000000</action>
            <action>maincpu.mq@6E90 = 0000000000000000</action>
            <action>maincpu.mq@6E98 = 0000000000000000</action>
            <action>maincpu.mq@6EA0 = 0000000000000000</action>
            <action>maincpu.mq@6EA8 = 0000000000000000</action>
            <action>maincpu.mq@6EB0 = 0000000000000000</action>
            <action>maincpu.mq@6EB8 = 0000000000000000</action>
        </script>
    </cheat>

</mamecheat>
"auto damage" : Added new. You can damage/kill an enemy without bullet hit.