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: 1316 Joined: Tue Dec 01, 2020 1:24 pm
Been thanked: 9 times
Post
by jman » Sun Feb 14, 2021 7:24 am
Code: Select all
<cheat desc="no hit">
<script state="on">
<action>maincpu.md@16b5 = 3a1632c3</action> <!-- background -->
<action>maincpu.mb@2157 = 59</action> <!-- police -->
</script>
<script state="off">
<action>maincpu.md@16b5 = 3a400e32</action>
<action>maincpu.mb@2157 = 9a</action>
</script>
</cheat>
The above code has problem. Starting position at next scene is wrong (character out of screen).
I check this code from scene 1 to 6 (because next scene after 6 is not 7 but 1) so that other problems may happen in later scene.
Last edited by
jman on Sat Oct 23, 2021 9:01 am, edited 2 times in total.
jman
Posts: 1316 Joined: Tue Dec 01, 2020 1:24 pm
Been thanked: 9 times
Post
by jman » Thu Jun 10, 2021 12:19 pm
Code: Select all
<cheat desc="sound test mode">
<comment>reset the game (F3) to enter sound test mode</comment>
<script state="on">
<action>maincpu.mw@07bb = 3f20</action>
<action>maincpu.mq@3f20 = 150021fa0132083e</action>
<action>maincpu.mq@3f28 = 6fbd40083a410022</action>
<action>maincpu.mq@3f30 = fe250120dffef628</action>
<action>maincpu.mq@3f38 = 0420f7fe240120ef</action>
<action>maincpu.mq@3f40 = 0000e2182ab9cd7c</action>
<!--
07ba | cd 20 3f : call $3f20
3f20 | 3e 08 : ld a,$08
3f22 | 32 01 fa : ld ($fa01),a // enable sound
3f25 | 21 00 15 : ld hl,$1500 // initialize sound and input values
3f28 | 22 00 41 : ld ($4100),hl
3f2b | 3a 08 40 : ld a,($4008) // read input
3f2e | bd : cp l
3f2f | 6f : ld l,a
3f30 | 28 f6 : jr z,$3f28
3f32 | fe df : cp $df
3f34 | 20 01 : jr z,$3f37
3f36 | 25 : dec h // pressed left - code decremnet
3f37 | fe ef : cp $ef
3f39 | 20 01 : jr z,$3f3c
3f3b | 24 : inc h // pressed right - code increment
3f3c | fe f7 : cp $f7
3f3e | 20 04 : jr z,$3f44
3f40 | 7c : ld a,h // pressed button1 - play sound
3f41 | cd b9 2a : call $2ab9
3f44 | 18 e2 : jr $3f28
-->
</script>
<script state="run">
<output format="----- namennayo sound test mode -----" line="10" align="center" />
<output format="left : code decrement" line="11" align="center" />
<output format="right : code increment" line="12" align="center" />
<output format="button 1 : play sound" line="13" align="center" />
<output format="----------------------------" line="14" align="center" />
<output format="<< sound code %2.2X >>" line="16" align="center">
<argument>maincpu.pb@4101</argument>
</output>
</script>
<script state="off">
<action>maincpu.mw@07bb = 07f9</action>
<action>maincpu.mq@3f20 = 0000000000000000</action>
<action>maincpu.mq@3f28 = 0000000000000000</action>
<action>maincpu.mq@3f30 = 0000000000000000</action>
<action>maincpu.mq@3f38 = 0000000000000000</action>
<action>maincpu.mq@3f40 = 0000000000000000</action>
</script>
</cheat>
I don't know how to stop music via sound code.
However, this game seems to have "short" music (0x15, 0x16 and 0x17) only.
So you need to wait for music stop if you want to listen others.
jman
Posts: 1316 Joined: Tue Dec 01, 2020 1:24 pm
Been thanked: 9 times
Post
by jman » Sat Jul 01, 2023 11:51 am
Code: Select all
<!-- Namennayo (Japan) -->
<mamecheat version="1">
<cheat desc="no hit">
<script state="on">
<action>maincpu.md@16b5 = 3a1632c3</action> <!-- background -->
<action>maincpu.mb@2157 = 59</action> <!-- police -->
<!-- fix out of screen at next level -->
<action>maincpu.md@13e5 = d63f20cd</action> <!-- x-position -->
<action>maincpu.md@13ef = dd3f29cd</action> <!-- y-position -->
<action>maincpu.mq@3f20 = 0077dd503e0220a7</action>
<action>maincpu.mq@3f28 = 77dd503e0220a7c9</action>
<action>maincpu.mq@3f30 = 000000000000c903</action>
<!--
3f20 | a7 : and a // x-position
3f21 | 20 02 : jr nz,$3F25
3f23 | 3e 50 : ld a,$50
3f25 | dd 77 00 : ld (ix+$00),a
3f28 | c9 : ret
3f29 | a7 : and a // y-position
3f2a | 20 02 : jr nz,$3F2E
3f2c | 3e 50 : ld a,$50
3f2e | dd 77 03 : ld (ix+$03),a
3f31 | c9 : ret
-->
</script>
<script state="off">
<action>maincpu.md@16b5 = 3a400e32</action>
<action>maincpu.mb@2157 = 9a</action>
<action>maincpu.md@13e5 = d60077dd</action>
<action>maincpu.md@13ef = dd0377dd</action>
<action>maincpu.mq@3f20 = 0000000000000000</action>
<action>maincpu.mq@3f28 = 0000000000000000</action>
<action>maincpu.mq@3f30 = 0000000000000000</action>
</script>
</cheat>
<cheat desc="sound test mode">
<comment>reset the game (F3) to enter sound test mode</comment>
<script state="on">
<action>maincpu.mw@07bb = 3f20</action>
<action>maincpu.mq@3f40 = 410021fa0132083e</action>
<action>maincpu.mq@3f48 = 3a4f80e62ff9013a</action>
<action>maincpu.mq@3f50 = b1070750e62ff902</action>
<action>maincpu.mq@3f58 = b138e62ff9003a4f</action>
<action>maincpu.mq@3f60 = 012020fee42847b8</action>
<action>maincpu.mq@3f68 = 01fe34012010fe35</action>
<action>maincpu.mq@3f70 = 40fe0618f03e0420</action>
<action>maincpu.mq@3f78 = fe787786103e0520</action>
<action>maincpu.mq@3f80 = 80fe05187e032008</action>
<action>maincpu.mq@3f88 = b8182ab9cdaf0420</action>
<!--
3f40 | 3e 08 : ld a,$08 // enable sound
3f42 | 32 01 fa : ld ($FA01),a
3f45 | 21 00 41 : ld hl,$4100 // sound code address
3f48 | 3a 01 f9 : ld a,($F901) // read start button
3f4b | 2f : cpl
3f4c | e6 80 : and $80
3f4e | 4f : ld c,a
3f4f | 3a 02 f9 : ld a,($F902) // read up/down
3f52 | 2f : cpl
3f53 | e6 50 : and $50
3f55 | 07 : rlca
3f56 | 07 : rlca
3f57 | b1 : or c
3f58 | 4f : ld c,a
3f59 | 3a 00 f9 : ld a,($F900) // read left/right/button 1
3f5c | 2f : cpl
3f5d | e6 38 : and $38
3f5f | b1 : or c
3f60 | b8 : cp b
3f61 | 47 : ld b,a
3f62 | 28 e4 : jr z,$3F48
3f64 | fe 20 : cp $20
3f66 | 20 01 : jr nz,$3F69
3f68 | 35 : dec (hl) // decrease code -01
3f69 | fe 10 : cp $10
3f6b | 20 01 : jr nz,$3F6E
3f6d | 34 : inc (hl) // increase code +01
3f6e | fe 01 : cp $01
3f70 | 20 04 : jr nz,$3F76
3f72 | 3e f0 : ld a,$F0 // decrease code -10
3f74 | 18 06 : jr $3F7C
3f76 | fe 40 : cp $40
3f78 | 20 05 : jr nz,$3F7F
3f7a | 3e 10 : ld a,$10 // increase code +10
3f7c | 86 : add a,(hl)
3f7d | 77 : ld (hl),a
3f7e | 78 : ld a,b
3f7f | fe 08 : cp $08
3f81 | 20 03 : jr nz,$3F86
3f83 | 7e : ld a,(hl) // play sound
3f84 | 18 05 : jr $3F8B
3f86 | fe 80 : cp $80
3f88 | 20 04 : jr nz,$3F8E
3f8a | af : xor a // stop sound
3f8b | cd b9 2a : call $2AB9 // send sound code
3f8e | 18 b8 : jr $3F48
-->
<action>audiocpu.mb@00e0 = fb</action> <!-- enable interrupt in playing sound -->
<action>audiocpu.md@00ce = 221520cd</action> <!-- reset audiocpu when accepts sound code 0x00 -->
<action>audiocpu.mq@1520 = 0000c3c0a7000021</action>
<!--
1520 | 21 00 00 : ld hl,$0000
1523 | a7 : and a
1524 | c0 : ret nz
1525 | c3 00 00 : jp $0000
-->
</script>
<script state="run">
<output format="----- namennayo 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="start : 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@4100</argument>
</output>
</script>
<script state="off">
<action> maincpu.mw@07bb = 07f9</action>
<action> maincpu.mq@3f40 = 0000000000000000</action>
<action> maincpu.mq@3f48 = 0000000000000000</action>
<action> maincpu.mq@3f50 = 0000000000000000</action>
<action> maincpu.mq@3f58 = 0000000000000000</action>
<action> maincpu.mq@3f60 = 0000000000000000</action>
<action> maincpu.mq@3f68 = 0000000000000000</action>
<action> maincpu.mq@3f70 = 0000000000000000</action>
<action> maincpu.mq@3f78 = 0000000000000000</action>
<action> maincpu.mq@3f80 = 0000000000000000</action>
<action> maincpu.mq@3f88 = 0000000000000000</action>
<action>audiocpu.mb@00e0 = f3</action>
<action>audiocpu.md@00ce = 22000021</action>
<action>audiocpu.mq@1520 = ffffffffffffffff</action>
</script>
</cheat>
</mamecheat>
"no hit" : fix out of screen at starting next level.
"sound test mode" : enable "sound stop" by start button.
jman
Posts: 1316 Joined: Tue Dec 01, 2020 1:24 pm
Been thanked: 9 times
Post
by jman » Sat Dec 14, 2024 8:21 am
namenayo.xml
Code: Select all
<!-- Namennayo (Japan) -->
<mamecheat version="1">
<cheat desc="no hit">
<script state="on">
<action>maincpu.md@16B5 = 3A1632C3</action> <!-- background -->
<action>maincpu.mb@2157 = 59 </action> <!-- police -->
<!-- fix out of screen at next level start -->
<action>maincpu.md@13E5 = D63F20CD </action> <!-- x-position -->
<action>maincpu.md@13EF = DD3F29CD </action> <!-- y-position -->
<action>maincpu.mq@3F20 = 0077DD503E0220A7</action>
<action>maincpu.mq@3F28 = 77DD503E0220A7C9</action>
<action>maincpu.mq@3F30 = 000000000000C903</action>
<!--
3F20 | A7 : and a // x position
3F21 | 20 02 : jr nz,$3F25
3F23 | 3E 50 : ld a,$50
3F25 | DD 77 00 : ld (ix+$00),a
3F28 | C9 : ret
3F29 | A7 : and a // y position
3F2A | 20 02 : jr nz,$3F2E
3F2C | 3E 50 : ld a,$50
3F2E | DD 77 03 : ld (ix+$03),a
3F31 | C9 : ret
-->
</script>
<script state="off">
<action>maincpu.md@16B5 = 3A400E32 </action>
<action>maincpu.mb@2157 = 9A </action>
<action>maincpu.md@13E5 = D60077DD </action>
<action>maincpu.md@13EF = DD0377DD </action>
<action>maincpu.mq@3F20 = 0000000000000000</action>
<action>maincpu.mq@3F28 = 0000000000000000</action>
<action>maincpu.mq@3F30 = 0000000000000000</action>
</script>
</cheat>
<cheat desc="no slip">
<script state="on">
<action>maincpu.mb@166E = 00</action>
</script>
<script state="off">
<action>maincpu.mb@166E = 01</action>
</script>
</cheat>
<cheat desc="easy scene finish">
<comment>press start button to finish current scene</comment>
<script state="on">
<action>maincpu.md@0C2D = A73F90CD </action>
<action>maincpu.mq@3F90 = 57CB400B3AF90121</action>
<action>maincpu.mq@3F98 = 76CB02187ECB0420</action>
<action>maincpu.mq@3FA0 = 00C9023EC0401D3A</action>
<!--
3F90 | 21 01 F9 : ld hl,$F901
3F93 | 3A 0B 40 : ld a,($400B) // check player
3F96 | CB 57 : bit 2,a
3F98 | 20 04 : jr nz,$3F9E
3F9A | CB 7E : bit 7,(hl) // check 1P start button
3F9C | 18 02 : jr $3FA0
3F9E | CB 76 : bit 6,(hl) // check 2P start button
3FA0 | 3A 1D 40 : ld a,($401D)
3FA3 | C0 : ret nz
3FA4 | 3E 02 : ld a,$02
3FA6 | C9 : ret
-->
</script>
<script state="off">
<action>maincpu.md@0C2D = A7401D3A </action>
<action>maincpu.mq@3F90 = 0000000000000000</action>
<action>maincpu.mq@3F98 = 0000000000000000</action>
<action>maincpu.mq@3FA0 = 0000000000000000</action>
</script>
</cheat>
<cheat desc="sound test mode">
<comment>reset the game (F3) to enter sound test mode</comment>
<script state="on">
<action>maincpu.mw@07BB = 3F40 </action>
<action>maincpu.mq@3F40 = 410021FA0132083E</action>
<action>maincpu.mq@3F48 = 3A4F80E62FF9013A</action>
<action>maincpu.mq@3F50 = B1070750E62FF902</action>
<action>maincpu.mq@3F58 = B138E62FF9003A4F</action>
<action>maincpu.mq@3F60 = 012020FEE42847B8</action>
<action>maincpu.mq@3F68 = 01FE34012010FE35</action>
<action>maincpu.mq@3F70 = 40FE0618F03E0420</action>
<action>maincpu.mq@3F78 = FE787786103E0520</action>
<action>maincpu.mq@3F80 = 80FE05187E032008</action>
<action>maincpu.mq@3F88 = B8182AB9CDAF0420</action>
<!--
3F40 | 3E 08 : ld a,$08 // enable sound
3F42 | 32 01 FA : ld ($FA01),a
3F45 | 21 00 41 : ld hl,$4100 // sound code address
3F48 | 3A 01 F9 : ld a,($F901) // read start button
3F4B | 2F : cpl
3F4C | E6 80 : and $80
3F4E | 4F : ld c,a
3F4F | 3A 02 F9 : ld a,($F902) // read up/down
3F52 | 2F : cpl
3F53 | E6 50 : and $50
3F55 | 07 : rlca
3F56 | 07 : rlca
3F57 | B1 : or c
3F58 | 4F : ld c,a
3F59 | 3A 00 F9 : ld a,($F900) // read left/right/button 1
3F5C | 2F : cpl
3F5D | E6 38 : and $38
3F5F | B1 : or c
3F60 | B8 : cp b
3F61 | 47 : ld b,a
3F62 | 28 E4 : jr z,$3F48
3F64 | FE 20 : cp $20
3F66 | 20 01 : jr nz,$3F69
3F68 | 35 : dec (hl) // decrease code -01
3F69 | FE 10 : cp $10
3F6B | 20 01 : jr nz,$3F6E
3F6D | 34 : inc (hl) // increase code +01
3F6E | FE 01 : cp $01
3F70 | 20 04 : jr nz,$3F76
3F72 | 3E F0 : ld a,$F0 // decrease code -10
3F74 | 18 06 : jr $3F7C
3F76 | FE 40 : cp $40
3F78 | 20 05 : jr nz,$3F7F
3F7A | 3E 10 : ld a,$10 // increase code +10
3F7C | 86 : add a,(hl)
3F7D | 77 : ld (hl),a
3F7E | 78 : ld a,b
3F7F | FE 08 : cp $08
3F81 | 20 03 : jr nz,$3F86
3F83 | 7E : ld a,(hl) // play sound
3F84 | 18 05 : jr $3F8B
3F86 | FE 80 : cp $80
3F88 | 20 04 : jr nz,$3F8E
3F8A | AF : xor a // stop sound
3F8B | CD B9 2A : call $2AB9 // send sound code
3F8E | 18 B8 : jr $3F48
-->
<action>audiocpu.mb@00E0 = FB </action> <!-- enable interrupt in playing sound -->
<action>audiocpu.md@00CE = 221520CD </action> <!-- reset audiocpu when accepts sound code 0x00 -->
<action>audiocpu.mq@1520 = FFFFE9C0A7000021</action>
<!--
1520 | 21 00 00 : ld hl,$0000
1523 | A7 : and a
1524 | C0 : ret nz
1525 | E9 : jp (hl)
-->
</script>
<script state="run">
<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="start : stop sound" line="16" align="center" />
<output format="----------------------------" line="17" align="center" />
<output format="<< sound code %02X >>" line="19" align="center" >
<argument>maincpu.pb@4100</argument>
</output>
</script>
<script state="off">
<action> maincpu.mw@07BB = 07F9 </action>
<action> maincpu.mq@3F40 = 0000000000000000</action>
<action> maincpu.mq@3F48 = 0000000000000000</action>
<action> maincpu.mq@3F50 = 0000000000000000</action>
<action> maincpu.mq@3F58 = 0000000000000000</action>
<action> maincpu.mq@3F60 = 0000000000000000</action>
<action> maincpu.mq@3F68 = 0000000000000000</action>
<action> maincpu.mq@3F70 = 0000000000000000</action>
<action> maincpu.mq@3F78 = 0000000000000000</action>
<action> maincpu.mq@3F80 = 0000000000000000</action>
<action> maincpu.mq@3F88 = 0000000000000000</action>
<action>audiocpu.mb@00E0 = F3 </action>
<action>audiocpu.md@00CE = 22000021 </action>
<action>audiocpu.mq@1520 = FFFFFFFFFFFFFFFF</action>
</script>
</cheat>
</mamecheat>
"no slip" : Added new. This code works on slip zone.
"easy scene finish" : Added new. You can finish current scene when you press start button (player 1 : 1P start button, player 2 : 2P start button).