[ridleofp] Riddle of Pythagoras/Pythagoras no Nazo

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

[ridleofp] Riddle of Pythagoras/Pythagoras no Nazo

Post by jman »

Code: Select all

<cheat desc="keep a ball">
    <script state="on">
        <action>maincpu.md@62ef =         007d00c3</action>
        <action>maincpu.mq@7d00 = 857d19210b7efde5</action>
        <action>maincpu.mq@7d08 = c1fb3a0b77fd7e6f</action>
        <action>maincpu.mq@7d10 = 01c3e10377fd08d6</action>
        <action>maincpu.mq@7d18 = 02030c0302010063</action>
        <action>maincpu.mq@7d20 = 0e0d040d0e0f0001</action>
        <action>maincpu.mq@7d28 = ffffffffffffff0f</action>
        <!--
        7d00 | e5       : push hl
        7d01 | fd 7e 0b : ld   a,(iy+$0b)
        7d04 | 21 17 7d : ld   hl,$7D19
        7d07 | 85       : add  a,l
        7d08 | 6f       : ld   l,a
        7d09 | 7e       : ld   a,(hl)
        7d0a | fd 77 0b : ld   (iy+$0b),a
        7d0d | 3a fb c1 : ld   a,($C1FB)
        7d10 | d6 10    : sub  $08
        7d12 | fd 77 03 : ld   (iy+$03),a
        7d15 | e1       : pop  hl
        7d16 | c3 01 63 : jp   $6301
        7d19 - 7d28     : direction conversion table
         source  destination
          00      00    : up to up?
          01      01    : upper-right to upper-right?
          02      02    : upper-right to upper-right?
          03      03    : upper-right to upper-right?
          04      0c    : left to right
          05      03    : lower-right to upper-right
          06      02    : lower-right to upper-right
          07      01    : lower-right to upper-right
          08      00    : down to up
          09      0f    : lower-left to upper-left
          0a      0e    : lower-left to upper-left
          0b      0d    : lower-left to upper-left
          0c      04    : right to left
          0d      0d    : upper-left to upper-left?
          0e      0e    : upper-left to upper-left?
          0f      0f    : upper-left to upper-left?
        -->
    </script>
    <script state="off">
        <action>maincpu.md@62ef =         000136fd</action>
        <action>maincpu.mq@7d00 = ffffffffffffffff</action>
        <action>maincpu.mq@7d08 = ffffffffffffffff</action>
        <action>maincpu.mq@7d10 = ffffffffffffffff</action>
        <action>maincpu.mq@7d18 = ffffffffffffffff</action>
        <action>maincpu.mq@7d20 = ffffffffffffffff</action>
        <action>maincpu.mq@7d28 = ffffffffffffffff</action>
    </script>
</cheat>

<cheat desc="auto fire">
    <script state="on">
        <action>maincpu.mb@2aa6 = 37</action>
    </script>
    <script state="off">
        <action>maincpu.mb@2aa6 = 39</action>
    </script>
</cheat>

<cheat desc="ball speed">
    <parameter>
        <item value="0x0080">01 (slow)</item>
        <item value="0x0280">02       </item>
        <item value="0x0480">03       </item>
        <item value="0x0680">04       </item>
        <item value="0x0880">05 (fast)</item>
    </parameter>
    <script state="on">
        <action>maincpu.mw@6389 = 7d30</action>
        <action>maincpu.mw@63b9 = 7d30</action>
        <action>maincpu.mq@7d30 = 0011c8b37a6626cd</action>
        <action>maincpu.mq@7d38 = ffffffffffffc900</action>
        <!--
        7d30 | cd 26 66 : call $6626
        7d33 | 7a       : ld   a,d
        7d34 | b3       : or   e
        7d35 | c8       : ret  z
        7d36 | 11 xx xx : ld   de,$xxxx
        7d39 | c9       : ret
        -->
    </script>
    <script state="change">
        <action>maincpu.mw@7d37 = param</action>
    </script>
    <script state="off">
        <action>maincpu.mw@6389 = 6626</action>
        <action>maincpu.mw@63b9 = 6626</action>
        <action>maincpu.mq@7d30 = ffffffffffffffff</action>
        <action>maincpu.mq@7d38 = ffffffffffffffff</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@77ad =             ff3e</action> <!-- sound stop when pressed coin input -->
        <action>maincpu.mw@00cd =             7d40</action>
        <action>maincpu.mq@7d40 = 022077cbe0db000e</action>
        <action>maincpu.mq@7d48 = 76cbec3921f3c1cb</action>
        <action>maincpu.mq@7d50 = 66cbc9cbb6cb0428</action>
        <action>maincpu.mq@7d58 = 79fbd1cba6cb0428</action>
        <action>maincpu.mq@7d60 = fec10021dc2847b8</action>
        <action>maincpu.mq@7d68 = 012004fe35012002</action>
        <action>maincpu.mq@7d70 = 00327e042001fe34</action>
        <action>maincpu.mq@7d78 = ffffffffffc518f8</action>
        <!--
        7d40 | 0e 00    : ld  c,$00
        7d42 | db e0    : in  a,($E0)   // read start button
        7d44 | cb 77    : bit 6,a
        7d46 | 20 02    : jr  nz,$7D4A
        7d48 | cb c1    : set 0,c
        7d4a | f3       : di
        7d4b | 21 39 ec : ld  hl,$EC39
        7d4e | cb 76    : bit 6,(hl)    // read button 1
        7d50 | 28 04    : jr  z,$7D56
        7d52 | cb b6    : res 6,(hl)
        7d54 | cb c9    : set 1,c
        7d56 | cb 66    : bit 4,(hl)    // read button 2
        7d58 | 28 04    : jr  z,$7D5E
        7d5a | cb a6    : res 4,(hl)
        7d5c | cb d1    : set 2,c
        7d5e | fb       : ei
        7d5f | 79       : ld  a,c
        7d60 | b8       : cp  b
        7d61 | 47       : ld  b,a
        7d62 | 28 dc    : jr  z,$7D40
        7d64 | 21 00 c1 : ld  hl,$C100
        7d67 | fe 02    : cp  $02
        7d69 | 20 01    : jr  nz,$7D6C
        7d6b | 35       : dec (hl)      // decrease code -01
        7d6c | fe 04    : cp  $04
        7d6e | 20 01    : jr  nz,$7D71
        7d70 | 34       : inc (hl)      // increase code +01
        7d71 | fe 01    : cp  $01
        7d73 | 20 04    : jr  nz,$7D79
        7d75 | 7e       : ld  a,(hl)    // play sound
        7d76 | 32 00 f8 : ld  ($F800),a
        7d79 | 18 c5    : jr  $7D40
        -->
    </script>
    <script state="run">
        <output format="----- riddle of pythagoras sound test mode -----" line="10" align="center" />
        <output format="button 1 : decrease code"                         line="11" align="center" />
        <output format="button 2 : increase code"                         line="12" align="center" />
        <output format="start : play sound"                               line="13" align="center" />
        <output format="coin : stop sound"                                line="14" align="center" />
        <output format="----------------------------"                     line="15" align="center" />
        <output format="&lt;&lt; sound code %2.2X &gt;&gt;"               line="17" align="center">
            <argument>maincpu.pb@c100</argument>
        </output>
    </script>
    <script state="off">
        <action>maincpu.mw@77ad =             7e19</action>
        <action>maincpu.mw@00cd =             14a5</action>
        <action>maincpu.mq@7d40 = ffffffffffffffff</action>
        <action>maincpu.mq@7d48 = ffffffffffffffff</action>
        <action>maincpu.mq@7d50 = ffffffffffffffff</action>
        <action>maincpu.mq@7d58 = ffffffffffffffff</action>
        <action>maincpu.mq@7d60 = ffffffffffffffff</action>
        <action>maincpu.mq@7d68 = ffffffffffffffff</action>
        <action>maincpu.mq@7d70 = ffffffffffffffff</action>
        <action>maincpu.mq@7d78 = ffffffffffffffff</action>
    </script>
</cheat>
In "sound test mode", I fail to handle paddle input to choose sound code so that use button 1 and 2 instead of left and right.
Post Reply