[wboy] Infinite jump / moon jump

This FORUM is ONLY for posting requests for M.A.M.E. arcade cheats. The actual cheats should be posted in the M.A.M.E. "Arcade" Cheats forum. For cheat requests a 'please' would do no harm...
Post Reply
daninthemix
Posts: 3
Joined: Sun May 19, 2024 10:17 am
Has thanked: 2 times

[wboy] Infinite jump / moon jump

Post by daninthemix »

Hello,

I am requesting moon jump / infinite jump for Wonder boy.

Thanks
jman
Posts: 903
Joined: Tue Dec 01, 2020 1:24 pm
Been thanked: 4 times

Re: [wboy] Infinite jump / moon jump

Post by jman »

Multiple jump. Tap jump button to moon jump.

wboy.xml

Code: Select all

    <cheat desc="multiple jump">
        <script state="on">
            <action>maincpu.od@29A1 = 00FFFFCD        </action> <!-- jump -->
            <action>maincpu.md@29A1 = FFBFE0FF        </action>
            <action>maincpu.od@2A25 = 00FFFFCD        </action> <!-- fall down -->
            <action>maincpu.md@2A25 = FFBFE0FF        </action>
            <action>maincpu.mq@BFE0 = CB08286ECBC08421</action>
            <action>maincpu.mq@BFE8 = DDC9E1031F36DDAE</action>
            <action>maincpu.mq@BFF0 = FFFFFFFFC97E1FCB</action>
            <!--
            BFE0 | 21 84 C0    : ld   hl,$C084     // check jump button
            BFE3 | CB 6E       : bit  5,(hl)
            BFE5 | 28 08       : jr   z,$BFEF
            BFE7 | CB AE       : res  5,(hl)
            BFE9 | DD 36 1F 03 : ld   (ix+$1f),$03 // set jump flag
            BFED | E1          : pop  hl
            BFEE | C9          : ret
            BFEF | DD CB 1F 7E : bit  7,(ix+$1f)
            BFF3 | C9          : ret
            -->
        </script>
        <script state="off">
            <action>maincpu.od@29A1 = 2E5BCBDD        </action>
            <action>maincpu.md@29A1 = 7E1F9B99        </action>
            <action>maincpu.od@2A25 = 3B4FCBDD        </action>
            <action>maincpu.md@2A25 = 7E1FCF8D        </action>
            <action>maincpu.mq@BFE0 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@BFE8 = FFFFFFFFFFFFFFFF</action>
            <action>maincpu.mq@BFF0 = FFFFFFFFFFFFFFFF</action>
        </script>
    </cheat>
It's WIP code because I put custom routine into "bank" rom area so that the game will crash if bank changes.
Please tell me if this code has bug.
These users thanked the author jman for the post:
daninthemix
Rating: 33.33%
 
daninthemix
Posts: 3
Joined: Sun May 19, 2024 10:17 am
Has thanked: 2 times

Re: [wboy] Infinite jump / moon jump

Post by daninthemix »

Thanks - but this code appears to cause the game to reset when I hit jump.
jman
Posts: 903
Joined: Tue Dec 01, 2020 1:24 pm
Been thanked: 4 times

Re: [wboy] Infinite jump / moon jump

Post by jman »

daninthemix wrote: but this code appears to cause the game to reset when I hit jump.
That's curious. The game reset doesn't happen on my MAME for now.

But it sounds like wrong bank switching. Try another code.

Code: Select all

    <cheat desc="multiple jump">
        <script state="on">
            <action>maincpu.od@29A1 = 00FFFFCD</action>
            <action>maincpu.md@29A1 = FFC780FF</action>
            <action>maincpu.od@2A25 = 00FFFFCD</action>
            <action>maincpu.md@2A25 = FFC780FF</action>
        </script>
        <script state="run">
            <action>maincpu.pq@C780 = CB08286ECBC08421</action>
            <action>maincpu.pq@C788 = DDC9E1031F36DDAE</action>
            <action>maincpu.pq@C790 = 00000000C97E1FCB</action>
            <!--
            C780 | 21 84 C0    : ld   hl,$C084
            C783 | CB 6E       : bit  5,(hl)       // check jump button
            C785 | 28 08       : jr   z,$C78F
            C787 | CB AE       : res  5,(hl)
            C789 | DD 36 1F 03 : ld   (ix+$1f),$03 // set jump flag
            C78D | E1          : pop  hl
            C78E | C9          : ret
            C78F | DD CB 1F 7E : bit  7,(ix+$1f)
            C793 | C9          : ret
            -->
        </script>
        <script state="off">
            <action>maincpu.od@29A1 = 2E5BCBDD        </action>
            <action>maincpu.md@29A1 = 7E1F9B99        </action>
            <action>maincpu.od@2A25 = 3B4FCBDD        </action>
            <action>maincpu.md@2A25 = 7E1FCF8D        </action>
            <action>maincpu.pq@C780 = 0000000000000000</action>
            <action>maincpu.pq@C788 = 0000000000000000</action>
            <action>maincpu.pq@C790 = 0000000000000000</action>
        </script>
    </cheat>
Custom routine is put into RAM instead of bank ROM. But some bugs may happen if other routines access this area.

Also daninthemix needs to check the following items.
  • Check game you play. The above codes are for wboy ONLY. I don't guarantee other sets.
  • Check MAME you use. I confirm the above codes for "official" MAME "0.265". I don't quarantee other clone MAME or lower version too.
These users thanked the author jman for the post:
daninthemix
Rating: 33.33%
 
daninthemix
Posts: 3
Joined: Sun May 19, 2024 10:17 am
Has thanked: 2 times

Re: [wboy] Infinite jump / moon jump

Post by daninthemix »

Works perfectly - thankyou.

Reason I was having issues before is I was loading save states. Sorry about that!
Post Reply