[grdians]+ One Hit Kills fix + P2 Infinite Lives Fix+ add MAX HIGH SCORE+ infinite energy/power display fix

This forum is for posting M.A.M.E. arcade cheats. Requests will be fulfilled here....but please keep the requests to the requests forum.
Post Reply
wanli xing
Posts: 1
Joined: Sun Apr 04, 2021 3:40 am

[grdians]+ One Hit Kills fix + P2 Infinite Lives Fix+ add MAX HIGH SCORE+ infinite energy/power display fix

Post by wanli xing »

fix a bug in one hit kills cheat, where P1 player will be also instant killed by enemy after activate this

Code: Select all

<cheat desc="One Hit Kills">
    <script state="run">
      <action>maincpu.rq@009FD0=4EF9001F90004E71</action>
      <action>maincpu.rq@1F9000=B3FC002030006600</action>
      <action>maincpu.rw@1F9008=0012</action>
      <action>maincpu.rd@1F900A=91690142</action>
       <action>maincpu.rd@1F900E=6A000024</action>  <!--  fix a bug where P1 will be one-shot killed -->
       <action>maincpu.rq@1F9012=4EF900009FD84E71</action> 
      <action>maincpu.rq@1F901A=B3FC002032006600</action>
      <action>maincpu.rw@1F9022=000A</action>
      <action>maincpu.rd@1F9024=91690142</action>
      <action>maincpu.rd@1F9028=6A00000A</action>
      <action>maincpu.rq@1F902C=4EF900009FD84E71</action>
      <action>maincpu.rq@1F9034=4EF900009FE04E71</action>
    </script>
    <script state="off">
      <action>maincpu.rq@009FD0=916901426A00000A</action>
      <action>maincpu.rq@1F9000=0000000000000000</action>
      <action>maincpu.rq@1F9008=0000000000000000</action>
      <action>maincpu.rq@1F9010=0000000000000000</action>
      <action>maincpu.rq@1F9018=0000000000000000</action>
      <action>maincpu.rq@1F9020=0000000000000000</action>
      <action>maincpu.rq@1F9028=0000000000000000</action>
      <action>maincpu.rq@1F9030=0000000000000000</action>
      <action>maincpu.rq@1F9038=0000000000000000</action>
      <action>maincpu.rq@1F9040=0000000000000000</action>
    </script>
  </cheat>

fix a bug in P2 infinite Lives cheat, where it is not working because the memory location is wrong

Code: Select all

  <cheat desc="P2 Infinite Lives">
    <script state="run">
      <action>maincpu.pb@2016A9=0A</action> <!-- fix a bug here: p2 lives are actually saved in 2016A9 memory location-->
    </script>
  </cheat>
I added the new cheat to change P1 or P2 score to the maxium (999999)

Code: Select all

<cheat desc="P2 MAX HIGH SCORE Add">
    <script state="run">
      <action>maincpu.pd@2016A2=0098967F</action>
    </script>
  </cheat>

  <cheat desc="P1 MAX HIGH SCORE Add">
    <script state="run">
      <action>maincpu.pd@201622=0098967F</action>
    </script>
  </cheat>
I fix a display bug for P1/P2 infinite Energy/Pow cheat, where after activation, the player's Hp Bar or Power Bar is exceeding the reasonable length.

Code: Select all

  <cheat desc="P1 Infinite Energy">
    <script state="run">
      <action>maincpu.pd@203142=01400140</action><!-- display hp/pow bar correctly: 0140 0140 , first 4 digit is current hp, last 4 digit is the max hp-->
    </script>
  </cheat>

  <cheat desc="P1 Infinite Power">
    <script state="run">
      <action>maincpu.pd@203146=01400140</action>
    </script>
  </cheat>


  <cheat desc="P2 Infinite Energy">
    <script state="run">
      <action>maincpu.pd@203342=01400140</action>
    </script>
  </cheat>

  <cheat desc="P2 Infinite Power">
    <script state="run">
      <action>maincpu.pd@203346=01400140</action>
    </script>
  </cheat>
User avatar
Pugsy
Posts: 3638
Joined: Fri Aug 17, 2001 12:59 am
Location: North Wales, UK.
Has thanked: 1 time
Been thanked: 12 times
Contact:

Re: [grdians]+ One Hit Kills fix + P2 Infinite Lives Fix+ add MAX HIGH SCORE+ infinite energy/power display fix

Post by Pugsy »

Thanks, I've updated the lives address.

Cant see the difference with the one hit kills cheat you posted apart from an addition of a comment.

The cheat collection has never included max score cheats.

Do the power/energy values cause an issue?
Pugsy

Servicing your cheating needs since 1985 8)

Grab the latest cheat collection:
MAME 0.259 XML cheat collection (6 OCTOBER 2023) from http://www.mamecheat.co.uk or direct from:-
https://mega.nz/file/q4dHGZ6K#i-EUiqIjH ... KMz7hnbTfw (ZIP Archive 3.76MB)
jman
Posts: 843
Joined: Tue Dec 01, 2020 1:24 pm

Re: [grdians]+ One Hit Kills fix + P2 Infinite Lives Fix+ add MAX HIGH SCORE+ infinite energy/power display fix

Post by jman »

I research "one hit kills" code. I can't confirm "P1 character is instant killed by enemy" though.
And I don't know the difference between "fixed" code by wanli xing and original code in the package based on 0.245.
But...

Code: Select all

1F9000  cmpa.l  #$203000, A1                                B3FC 0020 3000
1F9006  bne     $1f901a                                     6600 0012
1F900A  sub.w   D0, ($142,A1)                               9169 0142
1F900E  bpl     $1f9034                                     6A00 0024
1F9012  jmp     $9fd8.l                                     4EF9 0000 9FD8
1F9018  nop                                                 4E71
1F901A  cmpa.l  #$203200, A1                                B3FC 0020 3200
1F9020  bne     $1f902c                                     6600 000A
1F9024  sub.w   D0, ($142,A1)                               9169 0142
1F9028  bpl     $1f9034                                     6A00 000A
1F902C  jmp     $9fd8.l                                     4EF9 0000 9FD8
1F9032  nop                                                 4E71
1F9034  jmp     $9fe0.l                                     4EF9 0000 9FE0
This is redundant codes. I don't understand why "sub.w D0,($142,A1)" and "jmp $9fd8.l" are coded twice and insert "nop".
So I try rewriting. I succeed in reducing from 12 codes to 5 codes.

Code: Select all

<cheat desc="one hit kills">
    <script state="on">
        <action>maincpu.mq@009f86 = 4eb9001f9000c4e9</action>
        <action>maincpu.mq@1f9000 = b3fc00203000670c</action>
        <action>maincpu.mq@1f9008 = b3fc002032006704</action>
        <action>maincpu.mq@1f9010 = 4269014274003429</action>
        <action>maincpu.mq@1f9018 = 01544e7500000000</action>
        <!--
        1f9000 | b3fc 0020 3000 : cmpa.l #$203000,A1
        1f9006 | 670c           : beq    $1f9014
        1f9008 | b3fc 0020 3200 : cmpa.l #$203200,A1
        1f900e | 6704           : beq    $1f9014
        1f9010 | 4269 0142      : clr.w  ($142,A1)
        1f9014 | 7400           : moveq  #$0,D2
        1f9016 | 3429 0154      : move.w ($154,A1),D2
        1f901a | 4e75           : rts
        -->
    </script>
    <script state="off">
        <action>maincpu.mq@009f86 = 740034290154c4e9</action>
        <action>maincpu.mq@1f9000 = 0000000000000000</action>
        <action>maincpu.mq@1f9008 = 0000000000000000</action>
        <action>maincpu.mq@1f9010 = 0000000000000000</action>
        <action>maincpu.mq@1f9018 = 0000000000000000</action>
    </script>
</cheat>
Post Reply