[cmanhat] Manhattan

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: 1315
Joined: Tue Dec 01, 2020 1:24 pm
Been thanked: 9 times

[cmanhat] Manhattan

Post by jman »

Code: Select all

<cheat desc="no hit">
    <script state="run">
        <action>maincpu.pw@1e9b = fa60</action>
    </script>
    <script state="off">
        <action>maincpu.pw@1e9b = a0c5</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.pd@065a =         fa4bc02c</action>
        <action>maincpu.pq@4bc0 = f081a5e600cd8185</action>
        <action>maincpu.pq@4bc8 = 01b002a980c6c8f7</action>
        <action>maincpu.pq@4bd0 = 08a9e801b001a9aa</action>
        <action>maincpu.pq@4bd8 = 98ca10e9588a06b0</action>
        <action>maincpu.pq@4be0 = 1069188a06b004a9</action>
        <action>maincpu.pq@4be8 = 06f010a9808698ca</action>
        <action>maincpu.pq@4bf0 = 148e00c205b020a9</action>
        <action>maincpu.pq@4bf8 = 000000004bc02ce4</action>
        <!--
        4bc0 | 85 11    : sta $11
        4bc2 | ad 00 e6 : lda $e600 // read input
        4bc5 | c5 11    : cmp $11
        4bc7 | f0 f7    : beq $46c0
        4bc9 | a8       : tay
        4bca | a6 10    : ldx $10
        4bcc | c9 02    : cmp #$02
        4bce | d0 01    : bne $46d1
        4bd0 | ca       : dex       // decrease code -01
        4bd1 | c9 01    : cmp #$01
        4bd3 | d0 01    : bne $46d6
        4bd5 | e8       : inx       // increase code +01
        4bd6 | c9 08    : cmp #$08
        4bd8 | d0 06    : bne $46e0
        4bda | 8a       : txa       // decrease code -10
        4bdb | 38       : sec
        4bdc | e9 10    : sbc #$10
        4bde | aa       : tax
        4bdf | 98       : tya
        4be0 | c9 04    : cmp #$04
        4be2 | d0 06    : bne $46ea
        4be4 | 8a       : txa       // increase code +10
        4be5 | 18       : clc
        4be6 | 69 10    : adc #$10
        4be8 | aa       : tax
        4be9 | 98       : tya
        4bea | 86 10    : stx $10
        4bec | c9 10    : cmp #$10
        4bee | f0 06    : beq $46f6
        4bf0 | c9 40    : cmp #$20
        4bf2 | d0 05    : bne $46f9
        4bf4 | a2 00    : ldx #$00  // stop sound
        4bf6 | 8e 14 e4 : stx $e414 // send sound code
        4bf9 | 4c a0 26 : jmp $46c0
        -->
        <action>audiocpu.pb@0bd1 = 58</action> <!-- enable interrupt in playing music (0x41-0x42) to stop sound -->
        <!-- display -->
        <output format="----- manhattan 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@0080</argument>
        </output>
    </script>
    <script state="off">
        <action> maincpu.pd@065a =         4e85ffc9</action>
        <action> maincpu.pq@4bc0 = 0000000000000000</action>
        <action> maincpu.pq@4bc8 = 0000000000000000</action>
        <action> maincpu.pq@4bd0 = 0000000000000000</action>
        <action> maincpu.pq@4bd8 = 0000000000000000</action>
        <action> maincpu.pq@4be0 = 0000000000000000</action>
        <action> maincpu.pq@4be8 = 0000000000000000</action>
        <action> maincpu.pq@4bf0 = 0000000000000000</action>
        <action> maincpu.pq@4bf8 = 0000000000000000</action>
        <action>audiocpu.pb@0bd1 =               78</action>
    </script>
</cheat>
jman

my wip cheat database back-up (06/01/2025 ver.)
https://u3.getuploader.com/...../download/58
downloadpass : jman2020
jman
Posts: 1315
Joined: Tue Dec 01, 2020 1:24 pm
Been thanked: 9 times

[cmanhat] Manhattan

Post by jman »

Small clean up.

cmanhat.xml

Code: Select all

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

    <cheat desc="no hit">
        <script state="run">
            <action>maincpu.pw@1E9B = FA60</action>
        </script>
        <script state="off">
            <action>maincpu.pw@1E9B = A0C5</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.pd@065A = FA4BC02C        </action>
            <action>maincpu.pq@4BC0 = F081A4E600CC8184</action>
            <action>maincpu.pq@4BC8 = AA01B002A080C6F7</action>
            <action>maincpu.pq@4BD0 = B008A0E801B001A0</action>
            <action>maincpu.pq@4BD8 = 04A0CA10E9588A05</action>
            <action>maincpu.pq@4BE0 = 86CA1069188A05B0</action>
            <action>maincpu.pq@4BE8 = B020A006F010A080</action>
            <action>maincpu.pq@4BF0 = C02CE4148E00C205</action>
            <action>maincpu.pq@4BF8 = 000000000000004B</action>
            <!--
            4BC0 | 84 81    : sty $81
            4BC2 | AC 00 E6 : ldy $e600 // read input
            4BC5 | C4 81    : cpy $81
            4BC7 | F0 F7    : beq $4bc0
            4BC9 | A6 80    : ldx $80
            4BCB | C0 02    : cpy #$02
            4BCD | D0 01    : bne $4bd0
            4BCF | CA       : dex       // decrease code -01
            4BD0 | C0 01    : cpy #$01
            4BD2 | D0 01    : bne $4bd5
            4BD4 | E8       : inx       // increase code +01
            4BD5 | C0 08    : cpy #$08
            4BD7 | D0 05    : bne $4bde
            4BD9 | 8A       : txa       // decrease code -10
            4BDA | 58       : sec
            4BDB | E9 10    : sbc #$10
            4BDD | AA       : tax
            4BDE | C0 04    : cpy #$04
            4BE0 | D0 05    : bne $4be7
            4BE2 | 8A       : txa       // increase code +10
            4BE3 | 18       : clc
            4BE4 | 69 10    : adc #$10
            4BE6 | AA       : tax
            4BE7 | 86 80    : stx $80
            4BE9 | C0 10    : cpy #$10
            4BEB | F0 06    : beq $4bf3 // play sound
            4BED | C0 20    : cpy #$20
            4BEF | D0 05    : bne $4bf6
            4BF1 | A2 00    : ldx #$00  // stop sound
            4BF3 | 8E 14 E4 : stx $e414 // send sound code
            4BF6 | 4C C0 4B : jmp $4bc0
            -->
            <action>audiocpu.pb@0BD1 = 58</action> <!-- enable interrupt to stop sound in playing music -->
            <!-- display -->
            <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@0080</argument>
            </output>
        </script>
        <script state="off">
            <action> maincpu.pd@065A = 4E85FFC9        </action>
            <action> maincpu.pq@4BC0 = 0000000000000000</action>
            <action> maincpu.pq@4BC8 = 0000000000000000</action>
            <action> maincpu.pq@4BD0 = 0000000000000000</action>
            <action> maincpu.pq@4BD8 = 0000000000000000</action>
            <action> maincpu.pq@4BE0 = 0000000000000000</action>
            <action> maincpu.pq@4BE8 = 0000000000000000</action>
            <action> maincpu.pq@4BF0 = 0000000000000000</action>
            <action> maincpu.pq@4BF8 = 0000000000000000</action>
            <action>audiocpu.pb@0BD1 = 78              </action>
        </script>
    </cheat>

</mamecheat>
"sound test mode" : Rewritten routine.
jman

my wip cheat database back-up (06/01/2025 ver.)
https://u3.getuploader.com/...../download/58
downloadpass : jman2020
Post Reply