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.
jman
Posts: 1119 Joined: Tue Dec 01, 2020 1:24 pm
Been thanked: 8 times
Post
by jman » Thu Feb 17, 2022 12:35 pm
ctower will be added on 0.241.
Code: Select all
<cheat desc="no hit">
<script state="run">
<action>maincpu.pb@1057 = 60</action> <!-- objects -->
<action>maincpu.pb@112e = 60</action> <!-- window (both arms) -->
<action>maincpu.pb@4b27 = 60</action> <!-- kong -->
<action>maincpu.pb@4bf0 = 60</action> <!-- fire -->
</script>
<script state="off">
<action>maincpu.pb@1057 = a9</action>
<action>maincpu.pb@112e = a9</action>
<action>maincpu.pb@4b27 = a9</action>
<action>maincpu.pb@4bf0 = a9</action>
</script>
</cheat>
<cheat desc="sound test mode">
<comment>reset the game (F3) to enter sound test mode</comment>
<script state="run">
<action>maincpu.pw@3e29 = 5000</action>
<action>maincpu.pq@5000 = f011e4e600ce1186</action>
<action>maincpu.pq@5008 = e010a602b020e0f7</action>
<action>maincpu.pq@5010 = b040e010e602b010</action>
<action>maincpu.pq@5018 = 80e050242c10c505</action>
<action>maincpu.pq@5020 = 2ce4148d00c905b0</action>
<action>maincpu.pq@5028 = 0000000000005000</action>
<!--
5000 | 86 11 : stx $11
5002 | ce 00 e6 : ldx $e600 // read input
5005 | e4 11 : cpx $11
5007 | f0 f7 : beq $5000
5009 | e0 20 : cpx #$20
500b | b0 02 : bne $500f
500d | a6 10 : dec $10 // decrease code
500f | e0 10 : cpx #$10
5011 | b0 02 : bne $5015
5013 | e6 10 : inc $10 // increase code
5015 | e0 40 : cpx #$40
5017 | b0 05 : bne $501e
5019 | c5 10 : lda $10 // play sound
501b | 2c 50 24 : jmp $5024
501e | e0 80 : cpx #$80
5020 | b0 05 : bne $5027
5022 | c9 00 : lda #$00 // stop sound
5024 | 8d 14 e4 : sta $e414 // send sound code
5027 | 2c 00 50 : jmp $5000
-->
<output format="----- the tower sound test mode -----" line="10" align="center" />
<output format="left/left : decrease code" line="11" align="center" />
<output format="left/right : increase code" line="12" align="center" />
<output format="left/up : play sound" line="13" align="center" />
<output format="left/down : stop sound" line="14" align="center" />
<output format="----------------------------" line="15" align="center" />
<output format="<< sound code %2.2X >>" line="17" align="center">
<argument>maincpu.pb@0010</argument>
</output>
</script>
<script state="off">
<action>maincpu.pw@3e29 = 1b59</action>
<action>maincpu.pq@5000 = 0000000000000000</action>
<action>maincpu.pq@5008 = 0000000000000000</action>
<action>maincpu.pq@5010 = 0000000000000000</action>
<action>maincpu.pq@5018 = 0000000000000000</action>
<action>maincpu.pq@5020 = 0000000000000000</action>
<action>maincpu.pq@5028 = 0000000000000000</action>
</script>
</cheat>
Start music (0x41) and clear music (0x42) don't stop when you press "stop sound" (down key on left stick) though.
jman
Posts: 1119 Joined: Tue Dec 01, 2020 1:24 pm
Been thanked: 8 times
Post
by jman » Sat Jan 07, 2023 12:14 am
Code: Select all
<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@3e29 = 5000</action>
<action>maincpu.pq@5000 = f011a5e600cd1185</action>
<action>maincpu.pq@5008 = 01b020a910c6c8f7</action>
<action>maincpu.pq@5010 = 80a9e801b010a9aa</action>
<action>maincpu.pq@5018 = 98ca10e9588a06b0</action>
<action>maincpu.pq@5020 = 1069188a06b040a9</action>
<action>maincpu.pq@5028 = 06f004a9108698ca</action>
<action>maincpu.pq@5030 = 148e00c205b008a9</action>
<action>maincpu.pq@5038 = 0000000050002ce4</action>
<!--
5000 | 85 11 : sta $11
5002 | ad 00 e6 : lda $e600 // read input
5005 | c5 11 : cmp $11
5007 | f0 f7 : beq $5000
5009 | a8 : tay
500a | a6 10 : ldx $10
500c | c9 40 : cmp #$20
500e | d0 01 : bne $5011
5010 | ca : dex // decrease code -01
5011 | c9 10 : cmp #$10
5013 | d0 01 : bne $5016
5015 | e8 : inx // increase code +01
5016 | c9 80 : cmp #$80
5018 | d0 06 : bne $5020
501a | 8a : txa // decrease code -10
501b | 38 : sec
501c | e9 10 : sbc #$10
501e | aa : tax
501f | 98 : tya
5020 | c9 20 : cmp #$40
5022 | d0 06 : bne $502a
5024 | 8a : txa // increase code +10
5025 | 18 : clc
5026 | 69 10 : adc #$10
5028 | aa : tax
5029 | 98 : tya
502a | 86 10 : stx $10
502c | c9 04 : cmp #$04
502e | f0 06 : beq $5036
5030 | c9 08 : cmp #$08
5032 | d0 05 : bne $5039
5034 | a2 00 : ldx #$00 // stop sound
5036 | 8e 14 e4 : stx $e414 // send sound code
5039 | 4c 00 50 : jmp $5000
-->
<action>audiocpu.pb@0c98 = 58</action> <!-- enable interrupt in playing music to stop sound -->
<!-- display -->
<output format="----- the tower sound test mode -----" line="10" align="center" />
<output format="left/left : decrease code -01" line="11" align="center" />
<output format="left/right : increase code +01" line="12" align="center" />
<output format="left/down : decrease code -10" line="13" align="center" />
<output format="left/up : increase code +10" line="14" align="center" />
<output format="right/up : play sound" line="15" align="center" />
<output format="right/down : 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@0010</argument>
</output>
</script>
<script state="off">
<action> maincpu.pw@3e29 = 1b59</action>
<action> maincpu.pq@5000 = 0000000000000000</action>
<action> maincpu.pq@5008 = 0000000000000000</action>
<action> maincpu.pq@5010 = 0000000000000000</action>
<action> maincpu.pq@5018 = 0000000000000000</action>
<action> maincpu.pq@5020 = 0000000000000000</action>
<action> maincpu.pq@5028 = 0000000000000000</action>
<action> maincpu.pq@5030 = 0000000000000000</action>
<action> maincpu.pq@5038 = 0000000000000000</action>
<action>audiocpu.pb@0c98 = 78</action>
</script>
</cheat>
"sound test mode" : rewrite routine. add up/down key (code ±10). fix music (code 0x41 and 0x42) stop problem.
jman
Posts: 1119 Joined: Tue Dec 01, 2020 1:24 pm
Been thanked: 8 times
Post
by jman » Sun Aug 04, 2024 5:14 am
Small clean up.
ctower.xml
Code: Select all
<!-- The Tower (DECO Cassette) (Europe?) -->
<mamecheat version="1">
<cheat desc="no hit">
<script state="run">
<action>maincpu.pb@1057 = 60</action> <!-- objects -->
<action>maincpu.pb@112E = 60</action> <!-- window (both arms) -->
<action>maincpu.pb@4B27 = 60</action> <!-- kong -->
<action>maincpu.pb@4BF0 = 60</action> <!-- fire -->
</script>
<script state="off">
<action>maincpu.pb@1057 = A9</action>
<action>maincpu.pb@112E = A9</action>
<action>maincpu.pb@4B27 = A9</action>
<action>maincpu.pb@4BF0 = A9</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@3E29 = 5000 </action>
<action>maincpu.pq@5000 = F081A4E600CC8184</action>
<action>maincpu.pq@5008 = AA01B020A080C6F7</action>
<action>maincpu.pq@5010 = B080A0E801B010A0</action>
<action>maincpu.pq@5018 = 40A0CA10E9588A05</action>
<action>maincpu.pq@5020 = 86CA1069188A05B0</action>
<action>maincpu.pq@5028 = B008A006F004A080</action>
<action>maincpu.pq@5030 = 002CE4148E00C205</action>
<action>maincpu.pq@5038 = 0000000000000050</action>
<!--
5000 | 84 81 : sty $81
5002 | AC 00 E6 : ldy $e600 // read input
5005 | C4 81 : cpy $81
5007 | F0 F7 : beq $5000
5009 | A6 80 : ldx $80
500B | C0 20 : cpy #$20
500D | D0 01 : bne $5010
500F | CA : dex // decrease code -01
5010 | C0 10 : cpy #$10
5012 | D0 01 : bne $5015
5014 | E8 : inx // increase code +01
5015 | C0 80 : cpy #$80
5017 | D0 05 : bne $501e
5019 | 8A : txa // decrease code -10
501A | 38 : sec
501B | E9 10 : sbc #$10
501D | AA : tax
501E | C0 40 : cpy #$40
5020 | D0 05 : bne $5027
5022 | 8A : txa // increase code +10
5023 | 18 : clc
5024 | 69 10 : adc #$10
5026 | AA : tax
5027 | 86 80 : stx $80
5029 | C0 04 : cpy #$04
502B | F0 06 : beq $5033 // play sound
502D | C0 08 : cpy #$08
502F | D0 05 : bne $5036
5031 | A2 00 : ldx #$00 // stop sound
5033 | 8E 14 E4 : stx $e414 // send sound code
5036 | 4C 00 50 : jmp $5000
-->
<action>audiocpu.pb@0C98 = 58</action> <!-- enable interrupt to stop sound in playing music -->
<!-- display -->
<output format="----- sound test mode -----" line="10" align="center" />
<output format="left/left : decrease code -01" line="11" align="center" />
<output format="left/right : increase code +01" line="12" align="center" />
<output format="left/down : decrease code -10" line="13" align="center" />
<output format="left/up : increase code +10" line="14" align="center" />
<output format="right/up : play sound" line="15" align="center" />
<output format="right/down : stop sound" line="16" align="center" />
<output format="----------------------------" line="17" align="center" />
<output format="<< sound code %02X >>" line="19" align="center" >
<argument>maincpu.pb@0080</argument>
</output>
</script>
<script state="off">
<action> maincpu.pw@3E29 = 1B59 </action>
<action> maincpu.pq@5000 = 0000000000000000</action>
<action> maincpu.pq@5008 = 0000000000000000</action>
<action> maincpu.pq@5010 = 0000000000000000</action>
<action> maincpu.pq@5018 = 0000000000000000</action>
<action> maincpu.pq@5020 = 0000000000000000</action>
<action> maincpu.pq@5028 = 0000000000000000</action>
<action> maincpu.pq@5030 = 0000000000000000</action>
<action> maincpu.pq@5038 = 0000000000000000</action>
<action>audiocpu.pb@0C98 = 78 </action>
</script>
</cheat>
</mamecheat>
"sound test mode" : Rewritten routine.