[czeroize] Zeroize

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

[czeroize] Zeroize

Post by jman »

Code: Select all

<!-- Zeroize (DECO Cassette) (US) -->
<mamecheat version="1">

    <cheat desc="player speed">
        <parameter min="0x01" max="0x05" step="0x01" />
        <script state="run">
            <action>maincpu.pw@0cce =             04d0</action> <!-- normal stage -->
            <action>maincpu.pw@0d5a =             04d0</action> <!-- challenge stage -->
            <action>maincpu.pq@04d0 = c51cb057c510d740</action>
            <action>maincpu.pq@04d8 = b001c904500af03b</action>
            <action>maincpu.pq@04e0 = f03cc53b85fec902</action>
            <action>maincpu.pq@04e8 = c902b001c904500a</action>
            <action>maincpu.pq@04f0 = 00000000603c85fe</action>
            <!--
            04d0 | 40 d7 10 : jsr $10d7
            04d3 | c5 57    : lda $57   // check auto-moving flag
            04d5 | b0 1c    : bne $04f3
            04d7 | c5 3b    : lda $3b   // x-position
            04d9 | f0 0a    : beq $04e5
            04db | 50 04    : bmi $04e1
            04dd | c9 05    : lda #$05
            04df | b0 02    : bne $04e3
            04e1 | c9 fb    : lda #$fb
            04e3 | 85 3b    : sta $3b
            04e5 | c5 3c    : lda $3c   // y-position
            04e7 | f0 0a    : beq $04f3
            04e9 | 50 04    : bmi $04ef
            04eb | c9 05    : lda #$05
            04ed | b0 02    : bne $04f1
            04ef | c9 fb    : lda #$fb
            04f1 | 85 3c    : sta $3c
            04f3 | 60       : rts
            -->
            <action>maincpu.pb@04de =  param</action>
            <action>maincpu.pb@04e2 = -param</action>
            <action>maincpu.pb@04ec =  param</action>
            <action>maincpu.pb@04f0 = -param</action>
        </script>
        <script state="off">
            <action>maincpu.pw@0cce =             10d7</action>
            <action>maincpu.pw@0d5a =             10d7</action>
            <action>maincpu.pq@04d0 = 0000000000000000</action>
            <action>maincpu.pq@04d8 = 0000000000000000</action>
            <action>maincpu.pq@04e0 = 0000000000000000</action>
            <action>maincpu.pq@04e8 = 0000000000000000</action>
            <action>maincpu.pq@04f0 = 0000000000000000</action>
        </script>
    </cheat>

    <cheat desc="sound test mode">
        <comment>reset the game (F3) then wait data load to enter sound test mode</comment>
        <script state="run">
            <!-- routine -->
            <action>maincpu.pq@0517 = f011a5e600cd1185</action>
            <action>maincpu.pq@051f = 01b002a910c6c8f7</action>
            <action>maincpu.pq@0527 = 08a9e801b001a9aa</action>
            <action>maincpu.pq@052f = 98ca10e9588a06b0</action>
            <action>maincpu.pq@0537 = 1069188a06b004a9</action>
            <action>maincpu.pq@053f = 06f010a9108698ca</action>
            <action>maincpu.pq@0547 = 148e00c205b020a9</action>
            <action>maincpu.pq@054f = eaeaeaea05172ce4</action>
            <!--
            0517 | 85 11    : sta $11
            0519 | cd 00 e6 : lda $e600 // read input
            051c | a5 11    : cmp $11
            051e | f0 f7    : beq $0517
            0520 | c8       : tay
            0521 | c6 10    : ldx $10
            0523 | a9 02    : cmp #$02
            0525 | b0 01    : bne $0528
            0527 | aa       : dex       // decrease code -01
            0528 | a9 01    : cmp #$01
            052a | b0 01    : bne $052d
            052c | e8       : inx       // increase code +01
            052d | a9 08    : cmp #$08
            052f | b0 06    : bne $0537
            0531 | 8a       : txa       // decrease code -10
            0532 | 58       : sec
            0533 | e9 10    : sbc #$10
            0535 | ca       : tax
            0536 | 98       : tya
            0537 | a9 04    : cmp #$04
            0539 | b0 06    : bne $0541
            053b | 8a       : txa       // increase code +10
            053c | 18       : clc
            053d | 69 10    : adc #$10
            053f | ca       : tax
            0540 | 98       : tya
            0541 | 86 10    : stx $10
            0543 | a9 10    : cmp #$10
            0545 | f0 06    : beq $054d
            0547 | a9 20    : cmp #$20
            0549 | b0 05    : bne $0550
            054b | c2 00    : ldx #$00  // stop sound
            054d | 8e 14 e4 : stx $e414 // send sound code
            0550 | 2c 17 05 : jmp $0517
            -->
            <!-- display -->
            <output format="----- zeroize 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@0010</argument>
            </output>
        </script>
        <script state="off">
            <action>maincpu.pq@0517 = 088508c91885ffc9</action>
            <action>maincpu.pq@051f = 148d0385028500c9</action>
            <action>maincpu.pq@0527 = 402d78400a5a40e4</action>
            <action>maincpu.pq@052f = 4001c90ae1402fe4</action>
            <action>maincpu.pq@0537 = 4002808dffc92bad</action>
            <action>maincpu.pq@053f = 402b8d40d0c934e2</action>
            <action>maincpu.pq@0547 = 051b2c0c60400ae1</action>
            <action>maincpu.pq@054f = 2a1849ff29e301cd</action>
        </script>
    </cheat>

</mamecheat>
BTW, czeroize in the database based on 0.256 has "invincibility" only. Basic RAM codes are missing.
Image

Code: Select all

    <cheat desc="infinite credits">
        <script state="run">
            <action>maincpu.pb@0016 = 99</action>
        </script>
    </cheat>

    <cheat desc="P1 infinite lives">
        <script state="run">
            <action>maincpu.pb@0012 = ff</action>
        </script>
    </cheat>

    <cheat desc="P2 infinite lives">
        <script state="run">
            <action>maincpu.pb@0013 = ff</action>
        </script>
    </cheat>

    <cheat desc="P1 start round">
        <parameter min="0x01" max="0xff" step="0x01" />
        <script state="run">
            <action condition="maincpu.pb@0004 == 00">maincpu.pb@0004 = param - 1</action>
        </script>
    </cheat>

    <cheat desc="P2 start round">
        <parameter min="0x01" max="0xff" step="0x01" />
        <script state="run">
            <action condition="maincpu.pb@0005 == 00">maincpu.pb@0005 = param - 1</action>
        </script>
    </cheat>

    <cheat desc="finish current round now">
        <comment>normal stage only. doesn't work in challenge stage</comment>
        <script state="on">
            <action>maincpu.pd@0046 = 00000000</action> <!-- clear remain enemies on the field -->
            <action>maincpu.pw@0445 =     7f7f</action> <!-- counts of destroyed enemy -->
        </script>
    </cheat>
Post Reply