[rastan+] Built-in flags

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
stephh
Posts: 601
Joined: Fri Aug 17, 2001 1:00 am
Location: Paris, France

[rastan+] Built-in flags

Post by stephh »

There are 2 flags in RAM that were used by coders to test the game, and they left the code for them (even if they are originally filled by an address in ROM area which "blanks" them) !

The first one gives you infinite energy ... I'm not convinced it is useful as we already have such cheat, but it's for documentation purpose ...

But the second one gives you better invulnerability than your ROM cheat as you can only die if you fall into water (but you can walk on fire) ...

Here are the codes :

Code: Select all

:rastan:00900000:10C040:00000040:FFFFFFFF:Invincibility (flag)
:rastan:00900000:10C044:00000080:FFFFFFFF:Infinite Energy (flag)

Code: Select all

:rastanu:00900000:10C040:00000040:FFFFFFFF:Invincibility (flag)
:rastanu:00900000:10C044:00000080:FFFFFFFF:Infinite Energy (flag)

Code: Select all

:rastanu2:00900000:10C040:00000040:FFFFFFFF:Invincibility (flag)
:rastanu2:00900000:10C044:00000080:FFFFFFFF:Infinite Energy (flag)

Code: Select all

:rastsag1:00900000:10C040:00000040:FFFFFFFF:Invincibility (flag)
:rastsag1:00900000:10C044:00000080:FFFFFFFF:Infinite Energy (flag)

Code: Select all

:rastsaga:00900000:10C040:00000040:FFFFFFFF:Invincibility (flag)
:rastsaga:00900000:10C044:00000080:FFFFFFFF:Infinite Energy (flag)
Notice the "Restore Previous Value" type bit (for RAM cheats !) which is far better to easily toggle the cheat ON/OFF ... BTW, flags cheats in your database for other games could also use this useful feature of the cheat engine (especially when you map the cheat to a key) ...

Last thing to know is that the ROM area where this flags come from is the same as the one to allow you to select the starting level ! Here are my notes from the rastan.c driver I've submitted to MAME Devs :

Code: Select all

  - There was sort of debug address at 0x05ff9e.w ('rastan' and 'rastanu') or 0x05fffc ('rastanu2' and 'rastsag*') in ROM area :
      * bits 0 to 2 determine the level (0 to 5)
      * bits 3 and 5 determine where you start at the level !
          . OFF & OFF : part 1
          . OFF & ON  : part 2
          . ON  & OFF : part 3 (boss)
          . ON  & ON  : IMPOSSIBLE !
      * bit 4 doesn't seem to have any effect
      * bit 6 is the invulnerability flag (stored at 0x10c040.w = $40,A5)
        surprisingly, it doesn't work when you fall in the water
      * bit 7 is the infinite energy flag (stored at 0x10c044.w = $44,A5)
    Be aware that the bits are active low !
I hope that this helps ... Please let me know if you intend to add such things ...

Image Steph from The Ultimate Patchers Image
Vec2017
Posts: 38
Joined: Mon May 06, 2002 5:20 am

Post by Vec2017 »

Even if it doesn't get in stephh, thank you - I've personally been hoping for an improvement on invincibility for this one for years.

I know where the rest of my evening is going to go :)
User avatar
Pugsy
Posts: 3686
Joined: Fri Aug 17, 2001 12:59 am
Location: North Wales, UK.
Has thanked: 1 time
Been thanked: 19 times
Contact:

Post by Pugsy »

There are 2 flags in RAM that were used by coders to test the game, and they left the code for them (even if they are originally filled by an address in ROM area which "blanks" them) !
Nice find
The first one gives you infinite energy ... I'm not convinced it is useful as we already have such cheat, but it's for documentation purpose ...
Yes, I see no reason to change the existing cheat - standard energy is always easier to understand.
But the second one gives you better invulnerability than your ROM cheat as you can only die if you fall into water (but you can walk on fire) ...
Not my ROM cheat, though it was a nicely done cheat..yours is better so I've replaced the existing ROM invincibility. I might have a look at finding ROM walk on water or a megajump cheat if I get a chance. Though I do have one issue, surely if it's a flag cheat it should have a flag based mask rather than FFFFFFFF?

Code: Select all

:rastan:00900000:10C040:00000040:00000040:Invincibility
Pugsy

Servicing your cheating needs since 1985 8)

Grab the latest cheat collection:
MAME 0.264 XML cheat collection (3 APRIL 2024) from http://www.mamecheat.co.uk or direct from:-
https://mega.nz/file/SxsQUJoT#jBdz6GLm_ ... QzFGSMms2c (ZIP Archive 3.8 MB)
stephh
Posts: 601
Joined: Fri Aug 17, 2001 1:00 am
Location: Paris, France

Post by stephh »

Pugsy wrote:Though I do have one issue, surely if it's a flag cheat it should have a flag based mask rather than FFFFFFFF?

Code: Select all

:rastan:00900000:10C040:00000040:00000040:Invincibility
The fact is that the code only looks for a value != 0 ... So you can use a flag mask or a "solid" cheat, noone cares ...

BTW, I'll check your database and see which cheats can be "flagged" as well with the "Restore Previous Value" type bit (provided you don't activate them when you are already invincible - i.e. to be used before game starts) ...

Image Steph from The Ultimate Patchers Image
Post Reply