[makaimur] Ghosts'n Goblins/Makai-Mura

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

[makaimur] Ghosts'n Goblins/Makai-Mura

Post by jman »

Code: Select all

<cheat desc="auto fire">
    <script state="on">
        <action>maincpu.mb@8f74 = d6</action>
    </script>
    <script state="off">
        <action>maincpu.mb@8f74 = d4</action>
    </script>
</cheat>

<cheat desc="attack speed up">
    <script state="on">
        <action>maincpu.mb@8f70 = 00</action>
    </script>
    <script state="off">
        <action>maincpu.mb@8f70 = 0e</action>
    </script>
</cheat>

<cheat desc="bullet speed">
    <parameter>
        <item value="0x01">01 (slow)</item>
        <item value="0x04">02       </item>
        <item value="0x08">03       </item>
        <item value="0x0c">04       </item>
        <item value="0x10">05 (fast)</item>
    </parameter>
    <script state="change">
        <action>maincpu.mb@9c6b =  param</action> <!-- lance, torch, axe, cross : right -->
        <action>maincpu.mb@9c6f = -param</action> <!-- lance, torch, axe, cross : left -->
        <action>maincpu.mb@9c77 =  param</action> <!-- knife : right -->
        <action>maincpu.mb@9c7b = -param</action> <!-- knife : left -->
    </script>
    <script state="off">
        <action>maincpu.mb@9c6b = 04</action>
        <action>maincpu.mb@9c6f = fb</action>
        <action>maincpu.mb@9c77 = 05</action>
        <action>maincpu.mb@9c7b = fa</action>
    </script>
</cheat>

<cheat desc="multiple jump">
    <script state="on">
        <!-- in jumping -->
        <action>maincpu.mw@8f22 =             fe70</action>
        <action>maincpu.mq@fe70 = d64c53d44bc52027</action>
        <action>maincpu.mq@fe78 = 126f14cc0440ed0b</action>
        <action>maincpu.mq@fe80 = cc0080ed07d64cc4</action>
        <action>maincpu.mq@fe88 = 03e71e7e93be1212</action>
        <!--
        fe70 | d6 4c    : ldb  $4c
        fe72 | 53       : comb
        fe73 | d4 4b    : andb $4b
        fe75 | c5 20    : bitb #$20
        fe77 | 27 12    : beq  $fe8b
        fe79 | 6f 14    : clr  -c,x
        fe7b | cc 04 40 : ldd  #$0440
        fe7e | ed 0b    : std  $b,x
        fe80 | cc 00 80 : ldd  #$0080
        fe83 | ed 07    : std  7,x
        fe85 | d6 4c    : ldb  $4c
        fe87 | c4 03    : andb #$3
        fe89 | e7 1e    : stb  -2,x
        fe8b | 7e 93 be : jmp  $93be
        -->
        <!-- in falling -->
        <action>maincpu.mw@8fd1 =             fe90</action>
        <action>maincpu.mq@fe90 = d64c53d44bc52027</action>
        <action>maincpu.mq@fe98 = 037e8fd37e9049ff</action>
        <!--
        fe90 | d6 4c    : ldb  $4c
        fe92 | 53       : comb
        fe93 | d4 4b    : andb $4b
        fe95 | c5 20    : bitb #$20
        fe97 | 27 03    : beq  $fe9c
        fe99 | 7e 8f d3 : jmp  $8fd3
        fe9c | 7e 90 49 : jmp  $9049
        -->
    </script>
    <script state="off">
        <action>maincpu.mw@8f22 =             93be</action>
        <action>maincpu.mq@fe70 = ffffffffffffffff</action>
        <action>maincpu.mq@fe78 = ffffffffffffffff</action>
        <action>maincpu.mq@fe80 = ffffffffffffffff</action>
        <action>maincpu.mq@fe88 = ffffffffffffffff</action>
        <action>maincpu.mw@8fd1 =             9049</action>
        <action>maincpu.mq@fe90 = ffffffffffffffff</action>
        <action>maincpu.mq@fe98 = ffffffffffffffff</action>
    </script>
</cheat>
jman
Posts: 843
Joined: Tue Dec 01, 2020 1:24 pm

[makaimur] update

Post by jman »

Random maintenance.

Code: Select all

<cheat desc="bullet speed">
    <parameter>
        <item value="0x0080">01 (slow)</item>
        <item value="0x0480">02       </item>
        <item value="0x0880">03       </item>
        <item value="0x0c80">04       </item>
        <item value="0x1080">05 (fast)</item>
    </parameter>
    <script state="change">
        <action>maincpu.mw@9c6b =  param</action> <!-- lance, torch, axe, cross : right -->
        <action>maincpu.mw@9c6f = -param</action> <!-- lance, torch, axe, cross : left -->
        <action>maincpu.mw@9c77 =  param</action> <!-- knife : right -->
        <action>maincpu.mw@9c7b = -param</action> <!-- knife : left -->
    </script>
    <script state="off">
        <action>maincpu.mw@9c6b = 0430</action>
        <action>maincpu.mw@9c6f = fbd0</action>
        <action>maincpu.mw@9c77 = 05a0</action>
        <action>maincpu.mw@9c7b = fa60</action>
    </script>
</cheat>
"bullet speed" : adjust item value in parameter and change memory size from "byte" to "word".

Code: Select all

<cheat desc="multiple jump">
    <script state="on">
        <action>maincpu.md@8f16 =         bdfe70ce</action>
        <action>maincpu.mq@fe70 = d64c53d44bc52027</action>
        <action>maincpu.mq@fe78 = 15cc0100ed13cc04</action>
        <action>maincpu.mq@fe80 = 40ed0bcc0080ed07</action>
        <action>maincpu.mq@fe88 = d64cc403e71eec13</action>
        <action>maincpu.mq@fe90 = 4839ffffffffffff</action>
        <!--
        fe70 | d6 4c    : LDB  $4C
        fe72 | 53       : COMB
        fe73 | d4 4b    : ANDB $4B
        fe75 | c5 20    : BITB #$20
        fe77 | 27 15    : BEQ  $FE8E
        fe79 | cc 01 00 : LDD  #$0100
        fe7c | ed 13    : STD  -$D,X
        fe7e | cc 04 40 : LDD  #$0440
        fe81 | ed 0b    : STD  $B,X
        fe83 | cc 00 80 : LDD  #$0080
        fe86 | ed 07    : STD  $7,X
        fe88 | d6 4c    : LDB  $4C
        fe8a | c4 03    : ANDB #$03
        fe8c | e7 1e    : STB  -$2,X
        fe8e | ec 13    : LDD  -$D,X
        fe90 | 48       : ASLA
        fe91 | 39       : RTS
        -->
    </script>
    <script state="off">
        <action>maincpu.md@8f16 =         ec1348ce</action>
        <action>maincpu.mq@fe70 = ffffffffffffffff</action>
        <action>maincpu.mq@fe78 = ffffffffffffffff</action>
        <action>maincpu.mq@fe80 = ffffffffffffffff</action>
        <action>maincpu.mq@fe88 = ffffffffffffffff</action>
        <action>maincpu.mq@fe90 = ffffffffffffffff</action>
    </script>
</cheat>
"multiple jump" : clean up. new code reduces size.

Code: Select all

<cheat desc="bullet range">
    <parameter>
        <item value="0x05">01 (short)</item>
        <item value="0x35">02        </item>
        <item value="0x65">03        </item>
        <item value="0x95">04        </item>
        <item value="0xc5">05 (long) </item>
    </parameter>
    <script state="change">
        <action>maincpu.mb@9c45 = param</action> <!-- torch -->
        <action>maincpu.mb@9c46 = param</action> <!-- lance -->
        <action>maincpu.mb@9c47 = param</action> <!-- axe -->
        <action>maincpu.mb@9c48 = param</action> <!-- cross -->
        <action>maincpu.mb@9c49 = param</action> <!-- knife -->
    </script>
    <script state="off">
        <action>maincpu.mb@9c45 = 30</action>
        <action>maincpu.mb@9c46 = c0</action>
        <action>maincpu.mb@9c47 = 30</action>
        <action>maincpu.mb@9c48 = 30</action>
        <action>maincpu.mb@9c49 = c5</action>
    </script>
</cheat>

<cheat desc="short hit mark">
    <script state="on">
        <action>maincpu.mb@9bf7 = 01</action> <!-- object -->
        <action>maincpu.mb@9c11 = 01</action> <!-- enemy -->
        <action>maincpu.mb@9d05 = 01</action> <!-- knife/cross -->
    </script>
    <script state="off">
        <action>maincpu.mb@9bf7 = 0f</action>
        <action>maincpu.mb@9c11 = 08</action>
        <action>maincpu.mb@9d05 = 0f</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@6874 =             1212</action> <!-- disable next sequence at boot -->
        <action>maincpu.md@6150 =         7efea012</action>
        <action>maincpu.mq@fea0 = 1cef978196469181</action>
        <action>maincpu.mq@fea8 = 27f8d68081022601</action>
        <action>maincpu.mq@feb0 = 5a810126015c8104</action>
        <action>maincpu.mq@feb8 = 2602c01081082602</action>
        <action>maincpu.mq@fec0 = cb10d78081102602</action>
        <action>maincpu.mq@fec8 = 200681202605c63f</action>
        <action>maincpu.mq@fed0 = f73a0020cdffffff</action>
        <!--
        fea0 | 1c ef    : ANDCC #$EF  // enable interrupt
        fea2 | 97 81    : STA   $81
        fea4 | 96 46    : LDA   $46   // read input
        fea6 | 91 81    : CMPA  $81
        fea8 | 27 f8    : BEQ   $FEA2
        feaa | d6 80    : LDB   $80
        feac | 81 02    : CMPA  #$02
        feae | 26 01    : BNE   $FEB1
        feb0 | 5a       : DECB        // decrease code -01
        feb1 | 81 01    : CMPA  #$01
        feb3 | 26 01    : BNE   $FEB6
        feb5 | 5c       : INCB        // increase code +01
        feb6 | 81 04    : CMPA  #$04
        feb8 | 26 02    : BNE   $FEBC
        feba | c0 10    : SUBB  #$10  // decrease code -10
        febc | 81 08    : CMPA  #$08
        febe | 26 02    : BNE   $FEC2
        fec0 | cb 10    : ADDB  #$10  // increase code +10
        fec2 | d7 80    : STB   $80
        fec4 | 81 10    : CMPA  #$10
        fec6 | 26 02    : BNE   $FECA
        fec8 | 20 06    : BRA   $FED0 // play sound
        feca | 81 20    : CMPA  #$20
        fecc | 26 05    : BNE   $FED3
        fece | c6 3f    : LDB   #$3F  // stop sound
        fed0 | f7 3a 00 : STB   $3A00 // send sound code
        fed3 | 20 cd    : BRA   $FEA2
        -->
        <!-- stop sfx and music at the same time -->
        <action>audiocpu.mw@3c1c =             56d0</action>
        <action>audiocpu.mq@56d0 = bacd02c3cd02cccd</action>
        <action>audiocpu.mq@56d8 = c902b1cd01a0cd02</action>
        <!--
        56d0 | cd cc 02 : call $02CC
        56d3 | cd c3 02 : call $02C3
        56d6 | cd ba 02 : call $02BA
        56d9 | cd a0 01 : call $01A0
        56dc | cd b1 02 : call $02B1
        56df | c9       : ret
        -->
    </script>
    <script state="run">
        <output format="----- makaimura 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="&lt;&lt; sound code %2.2X &gt;&gt;"     line="19" align="center"  >
            <argument>maincpu.pb@0080</argument>
        </output>
    </script>
    <script state="off">
        <action> maincpu.mw@6874 =             0c05</action>
        <action> maincpu.md@6150 =         1cef201f</action>
        <action> maincpu.mq@fea0 = ffffffffffffffff</action>
        <action> maincpu.mq@fea8 = ffffffffffffffff</action>
        <action> maincpu.mq@feb0 = ffffffffffffffff</action>
        <action> maincpu.mq@feb8 = ffffffffffffffff</action>
        <action> maincpu.mq@fec0 = ffffffffffffffff</action>
        <action> maincpu.mq@fec8 = ffffffffffffffff</action>
        <action> maincpu.mq@fed0 = ffffffffffffffff</action>
        <action>audiocpu.mw@3c1c =             02b1</action>
        <action>audiocpu.mq@56d0 = ffffffffffffffff</action>
        <action>audiocpu.mq@56d8 = ffffffffffffffff</action>
    </script>
</cheat>
"bullet range", "short hit mark", "sound test mode" : add new.

BTW "skip ram/rom checks" in official database based on 0.221 has problems.

Code: Select all

<cheat desc="Skip RAM/ROM Checks"> <comment>Also allows a quicker start-up, if enabled during the bootup sequence enable and then reset. It's better to use together with Pre-Enable</comment>
  <script state="on">
    <action>temp0 =maincpu.mw@6000</action>
  </script>
  <script state="run">
    <action>maincpu.mw@6000=207B</action>
  </script>
  <script state="off">
    <action>maincpu.mw@6000=temp0 </action>
  </script>
</cheat>
This code jumps to strange address with invalid opcode then crashes the game. And I don't find any ram/rom check routine at boot. Also comment is old because "pre-enable" no longer supports in current cheat engine.

Code: Select all

<cheat desc="quick boot">
    <script state="on">
        <action>maincpu.mb@688b = 01</action>
    </script>
    <script state="off">
        <action>maincpu.mb@688b = b4</action>
    </script>
</cheat>
I don't know original code poster's intention. But the above code may have the same effect.
Post Reply