[castfant] Astro Fantasia

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

[castfant] Astro Fantasia

Post by jman »

Code: Select all

<cheat desc="no hit">
    <script state="run">
        <action>maincpu.pw@1ab5 = 6058</action> <!-- enemy -->
        <action>maincpu.pw@2e0b = 6058</action> <!-- bullet -->
        <action>maincpu.pw@3a78 = 6058</action> <!-- boss -->
    </script>
    <script state="off">
        <action>maincpu.pw@1ab5 = 33a5</action>
        <action>maincpu.pw@2e0b = 33a5</action>
        <action>maincpu.pw@3a78 = 33a5</action>
    </script>
</cheat>

<cheat desc="auto fire">
    <script state="run">
        <action>maincpu.pw@2a30 = 5b45</action>
    </script>
    <script state="off">
        <action>maincpu.pw@2a30 = 5c25</action>
    </script>
</cheat>

<cheat desc="player speed">
    <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="run">
        <action>maincpu.pb@2956 =  param</action> <!-- right -->
        <action>maincpu.pb@2957 = -param</action> <!-- left -->
        <action>maincpu.pb@295a = -param</action> <!-- up -->
        <action>maincpu.pb@295b =  param</action> <!-- down -->
    </script>
    <script state="off">
        <action>maincpu.pb@2956 = 04</action>
        <action>maincpu.pb@2957 = fc</action>
        <action>maincpu.pb@295a = ff</action>
        <action>maincpu.pb@295b = 01</action>
    </script>
</cheat>

<cheat desc="bullet speed">
    <parameter min="0x01" max="0x05" step="0x01" />
    <script state="run">
        <action>maincpu.pw@073f =             54b0</action>
        <action>maincpu.pw@344e =             54b0</action>
        <action>maincpu.pq@54b0 = ca682a90402800c9</action>
        <action>maincpu.pq@54b8 = 00000060f6b08aaa</action>
        <action>maincpu.pb@54b1 =            param</action>
        <!--
        54b0 | a9 xx    : lda #$xx
        54b2 | 48       : pha
        54b3 | 20 90 4a : jsr $2a90
        54b6 | 68       : pla
        54b7 | aa       : tax
        54b8 | ca       : dex
        54b9 | 8a       : txa
        54ba | d0 f6    : bne $54b2
        54bc | 60       : rts
        -->
    </script>
    <script state="off">
        <action>maincpu.pw@073f =             2a90</action>
        <action>maincpu.pw@344e =             2a90</action>
        <action>maincpu.pq@54b0 = 0000000000000000</action>
        <action>maincpu.pq@54b8 = 0000000000000000</action>
    </script>
</cheat>

<cheat desc="energy speed">
    <parameter>
        <item value="0xff">01 (slow)</item>
        <item value="0xc0">02       </item>
        <item value="0x80">03       </item>
        <item value="0x40">04       </item>
        <item value="0x01">05 (fast)</item>
    </parameter>
    <script state="run">
        <action>maincpu.pb@0cb2 = param</action>
    </script>
    <script state="off">
        <action>maincpu.pb@0cb2 = 88</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@051d =             54c0</action>
        <action>maincpu.pq@54c0 = f011a5e600cd1185</action>
        <action>maincpu.pq@54c8 = 01b002a910c6c8f7</action>
        <action>maincpu.pq@54d0 = 08a9e801b001a9aa</action>
        <action>maincpu.pq@54d8 = 98ca10e9588a06b0</action>
        <action>maincpu.pq@54e0 = 1069188a06b004a9</action>
        <action>maincpu.pq@54e8 = 06f010a9108698ca</action>
        <action>maincpu.pq@54f0 = 148e00c205b020a9</action>
        <action>maincpu.pq@54f8 = 0000000054c02ce4</action>
        <!--
        54c0 | 85 11    : sta $11
        54c2 | ad 00 e6 : lda $e600 // read input
        54c5 | c5 11    : cmp $11
        54c7 | f0 f7    : beq $54c0
        54c9 | a8       : tay
        54ca | a6 10    : ldx $10
        54cc | c9 02    : cmp #$02
        54ce | d0 01    : bne $54d1
        54d0 | ca       : dex       // decrease code -01
        54d1 | c9 01    : cmp #$01
        54d3 | d0 01    : bne $54d6
        54d5 | e8       : inx       // increase code +01
        54d6 | c9 08    : cmp #$08
        54d8 | d0 06    : bne $54e0
        54da | 8a       : txa       // decrease code -10
        54db | 38       : sec
        54dc | e9 10    : sbc #$10
        54de | aa       : tax
        54df | 98       : tya
        54e0 | c9 04    : cmp #$04
        54e2 | d0 06    : bne $54ea
        54e4 | 8a       : txa       // increase code +10
        54e5 | 18       : clc
        54e6 | 69 10    : adc #$10
        54e8 | aa       : tax
        54e9 | 98       : tya
        54ea | 86 10    : stx $10
        54ec | c9 10    : cmp #$10
        54ee | f0 06    : beq $54f6
        54f0 | c9 40    : cmp #$20
        54f2 | d0 05    : bne $54f9
        54f4 | a2 00    : ldx #$00  // stop sound
        54f6 | 8e 14 e4 : stx $e414 // send sound code
        54f9 | 4c c0 54 : jmp $54c0
        -->
        <action>audiocpu.pb@0baf = 58</action> <!-- enable interrupt in playing music to stop sound -->
        <!-- display -->
        <output format="----- astro fantasia 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@051d =             0a07</action>
        <action> maincpu.pq@54c0 = 0000000000000000</action>
        <action> maincpu.pq@54c8 = 0000000000000000</action>
        <action> maincpu.pq@54d0 = 0000000000000000</action>
        <action> maincpu.pq@54d8 = 0000000000000000</action>
        <action> maincpu.pq@54e0 = 0000000000000000</action>
        <action> maincpu.pq@54e8 = 0000000000000000</action>
        <action> maincpu.pq@54f0 = 0000000000000000</action>
        <action> maincpu.pq@54f8 = 0000000000000000</action>
        <action>audiocpu.pb@0baf =               78</action>
    </script>
</cheat>
Post Reply