Page 1 of 1

[cexplore] Explorer

Posted: Tue Jan 17, 2023 1:05 pm
by jman

Code: Select all

<cheat desc="no hit">
    <script state="run">
        <action>maincpu.pd@106a = fa10792c</action> <!-- bullet (2D scene) -->
        <action>maincpu.pd@13a6 = 8513d52c</action> <!-- enemy (2D scene) -->
        <action>maincpu.pd@46fe = fa47152c</action> <!-- enemy (3D scene) -->
    </script>
    <script state="off">
        <action>maincpu.pd@106a = 010945c5</action>
        <action>maincpu.pd@13a6 = 850284dd</action>
        <action>maincpu.pd@46fe = 9085ffc9</action>
    </script>
</cheat>

<cheat desc="auto fire">
    <script state="run">
        <action>maincpu.pw@0e60 = 00b0</action> <!-- 2D scene -->
        <action>maincpu.pw@4525 = fafa</action> <!-- 3D scene -->
    </script>
    <script state="off">
        <action>maincpu.pw@0e60 = e8b0</action>
        <action>maincpu.pw@4525 = 58a5</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.pw@0534 =             3020</action>
        <action>maincpu.pq@3020 = f011a5e600cd1185</action>
        <action>maincpu.pq@3028 = 01b002a910c6c8f7</action>
        <action>maincpu.pq@3030 = 08a9e801b001a9aa</action>
        <action>maincpu.pq@3038 = 98ca10e9588a06b0</action>
        <action>maincpu.pq@3040 = 1069188a06b004a9</action>
        <action>maincpu.pq@3048 = 06f010a9108698ca</action>
        <action>maincpu.pq@3050 = 148e00c205b020a9</action>
        <action>maincpu.pq@3058 = 0000000030202ce4</action>
        <!--
        3020 | 85 11    : sta $11
        3022 | ad 00 e6 : lda $e600 // read input
        3025 | c5 11    : cmp $11
        3027 | f0 f7    : beq $3020
        3029 | a8       : tay
        302a | a6 10    : ldx $10
        302c | c9 02    : cmp #$02
        302e | d0 01    : bne $3031
        3030 | ca       : dex       // decrease code -01
        3031 | c9 01    : cmp #$01
        3033 | d0 01    : bne $3036
        3035 | e8       : inx       // increase code +01
        3036 | c9 08    : cmp #$08
        3038 | d0 06    : bne $3040
        303a | 8a       : txa       // decrease code -10
        303b | 38       : sec
        303c | e9 10    : sbc #$10
        303e | aa       : tax
        303f | 98       : tya
        3040 | c9 04    : cmp #$04
        3042 | d0 06    : bne $304a
        3044 | 8a       : txa       // increase code +10
        3045 | 18       : clc
        3046 | 69 10    : adc #$10
        3048 | aa       : tax
        3049 | 98       : tya
        304a | 86 10    : stx $10
        304c | c9 10    : cmp #$10
        304e | f0 06    : beq $3056
        3050 | c9 40    : cmp #$20
        3052 | d0 05    : bne $3059
        3054 | a2 00    : ldx #$00  // stop sound
        3056 | 8e 14 e4 : stx $e414 // send sound code
        3059 | 4c a0 26 : jmp $3020
        -->
        <action>audiocpu.pb@0607 = 00</action> <!-- enable sfx stop for code 0x04 -->
        <!-- display -->
        <output format="----- explorer 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.pw@0534 =             2beb</action>
        <action> maincpu.pq@3020 = 0000000000000000</action>
        <action> maincpu.pq@3028 = 0000000000000000</action>
        <action> maincpu.pq@3030 = 0000000000000000</action>
        <action> maincpu.pq@3038 = 0000000000000000</action>
        <action> maincpu.pq@3040 = 0000000000000000</action>
        <action> maincpu.pq@3048 = 0000000000000000</action>
        <action> maincpu.pq@3050 = 0000000000000000</action>
        <action> maincpu.pq@3058 = 0000000000000000</action>
        <action>audiocpu.pb@0607 =               ff</action>
    </script>
</cheat>