[namenayo] Namennayo

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

[namenayo] Namennayo

Post by jman »

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

[namenayo] sound test mode

Post by jman »

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="&lt;&lt; sound code %2.2X &gt;&gt;"    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: 843
Joined: Tue Dec 01, 2020 1:24 pm

[namenayo] Namennayo (update)

Post by jman »

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="&lt;&lt; sound code %2.2X &gt;&gt;"    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.
Post Reply