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="<< sound code %2.2X >>" 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>