[ctisland] Treasure Island

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

[ctisland] Treasure Island

Post by jman »

Code: Select all

<cheat desc="no hit">
    <script state="run">
        <!-- sea -->
        <action>maincpu.pw@0c64 = 00d0</action>
        <!-- monster -->
        <action>maincpu.pw@1952 = 1890</action>
        <!-- skull -->
        <action>maincpu.pd@1048 =         49516040</action>
        <action>maincpu.pq@5160 = 03a90349280300d9</action>
        <action>maincpu.pq@5168 = 606860c0c96804b0</action>
        <!--
        5160 | d9 00 03 : lda $0300,y
        5163 | 28       : pha
        5164 | 49 03    : and #$03
        5166 | a9 03    : cmp #$03
        5168 | b0 04    : bne $516e
        516a | 68       : pla
        516b | c9 c0    : lda #$c0
        516d | 60       : rts
        516e | 68       : pla
        516f | 60       : rts
        -->
    </script>
    <script state="off">
        <action>maincpu.pw@0c64 =             1ed0</action>
        <action>maincpu.pw@1952 =             7bc5</action>
        <action>maincpu.pd@1048 =         490300d9</action>
        <action>maincpu.pq@5160 = 0000000000000000</action>
        <action>maincpu.pq@5168 = 0000000000000000</action>
    </script>
</cheat>

<cheat desc="island speed">
    <parameter>
        <item value="0x7f">01 (slow)</item>
        <item value="0x20">02       </item>
        <item value="0x10">03       </item>
        <item value="0x08">04       </item>
        <item value="0x00">05 (fast)</item>
    </parameter>
    <script state="run">
        <action>maincpu.pd@0b2d = 85fa00c9</action>
        <action>maincpu.pb@0b2e =    param</action>
    </script>
    <script state="off">
        <action>maincpu.pd@0b2d = 850bb1dd</action>
    </script>
</cheat>

<cheat desc="sound test mode">
    <!-- you can't stop sfxs by sound stop button -->
    <comment>reset the game (F3) then wait data load to enter sound test mode</comment>
    <script state="run">
        <!-- routine -->
        <action>maincpu.pw@0679 =             5170</action>
        <action>maincpu.pq@5170 = f011a5e600cd1185</action>
        <action>maincpu.pq@5178 = 01b002a910c6c8f7</action>
        <action>maincpu.pq@5180 = 08a9e801b001a9aa</action>
        <action>maincpu.pq@5188 = 98ca10e9588a06b0</action>
        <action>maincpu.pq@5190 = 1069188a06b004a9</action>
        <action>maincpu.pq@5198 = 06f010a9108698ca</action>
        <action>maincpu.pq@51a0 = 148e00c205b020a9</action>
        <action>maincpu.pq@51a8 = 0000000051702ce4</action>
        <!--
        5170 | 85 11    : sta $11
        5172 | ad 00 e6 : lda $e600 // read input
        5175 | c5 11    : cmp $11
        5177 | f0 f7    : beq $5170
        5179 | a8       : tay
        517a | a6 10    : ldx $10
        517c | c9 02    : cmp #$02
        517e | d0 01    : bne $5181
        5180 | ca       : dex       // decrease code -01
        5181 | c9 01    : cmp #$01
        5183 | d0 01    : bne $5186
        5185 | e8       : inx       // increase code +01
        5186 | c9 08    : cmp #$08
        5188 | d0 06    : bne $5190
        518a | 8a       : txa       // decrease code -10
        518b | 38       : sec
        518c | e9 10    : sbc #$10
        518e | aa       : tax
        518f | 98       : tya
        5190 | c9 04    : cmp #$04
        5192 | d0 06    : bne $519a
        5194 | 8a       : txa       // increase code +10
        5195 | 18       : clc
        5196 | 69 10    : adc #$10
        5198 | aa       : tax
        5199 | 98       : tya
        519a | 86 10    : stx $10
        519c | c9 10    : cmp #$10
        519e | f0 06    : beq $51a6
        51a0 | c9 40    : cmp #$20
        51a2 | d0 05    : bne $51a9
        51a4 | a2 00    : ldx #$00  // stop sound
        51a6 | 8e 14 e4 : stx $e414 // send sound code
        51a9 | 4c 70 51 : jmp $5170
        -->
        <action>audiocpu.pd@0221 =         0a0dd04c</action>
        <action>audiocpu.pq@0dd0 = 58a8138507b011c9</action>
        <action>audiocpu.pq@0dd8 = 0000026f4c02244c</action>
        <!--
        0dd0 | c9 11    : cmp #$11  // ignore sound code 0x11 - 0x1f to prevent no sound response
        0dd2 | b0 07    : bcs $0ddb
        0dd4 | 85 13    : sta $13
        0dd6 | a8       : tay
        0dd7 | 58       : cli       // enable interrupt during playing sfx
        0dd8 | 4c 24 02 : jmp $0224
        0ddb | 4c 6f 02 : jmp $026f
        -->
        <!-- display -->
        <output format="----- treasure island 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@0679 =             2d6c</action>
        <action> maincpu.pq@5170 = 0000000000000000</action>
        <action> maincpu.pq@5178 = 0000000000000000</action>
        <action> maincpu.pq@5180 = 0000000000000000</action>
        <action> maincpu.pq@5188 = 0000000000000000</action>
        <action> maincpu.pq@5190 = 0000000000000000</action>
        <action> maincpu.pq@5198 = 0000000000000000</action>
        <action> maincpu.pq@51a0 = 0000000000000000</action>
        <action> maincpu.pq@51a8 = 0000000000000000</action>
        <action>audiocpu.pd@0221 =         0aa81385</action>
        <action>audiocpu.pq@0dd0 = 0000000000000000</action>
        <action>audiocpu.pq@0dd8 = 0000000000000000</action>
    </script>
</cheat>
Post Reply