[bwings] B-Wings Invincibility 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
SevenFalcons
Posts: 2
Joined: Mon Sep 18, 2023 2:43 am

[bwings] B-Wings Invincibility Fix

Post by SevenFalcons »

I have no clue where to post this but currently B-Wings does not display the Invincibility cheat due to an Unknown Symbol error.

i've fixed it by simply replacing

Code: Select all

sub.mb@A078
with

Code: Select all

subcpu.mb@A078
on those three lines.
jman
Posts: 1318
Joined: Tue Dec 01, 2020 1:24 pm
Been thanked: 10 times

Re: [bwings] B-Wings Invincibility Fix

Post by jman »

Confirmed. Regression is https://git.redump.net/mame/commit/?id= ... 6af322b4ac. Version is 0.264 or later.

bwings.xml

Code: Select all

  <cheat desc="Invincibility">
    <script state="on">
      <action>temp0 = maincpu.mb@D722</action>
      <action>temp1 = subcpu.mb@A078</action>
    </script>
    <script state="run">
      <action>maincpu.mb@D722 = 39</action> <!-- background -->
      <action>subcpu.mb@A078 = 20</action> <!-- objects -->
    </script>
    <script state="off">
      <action>maincpu.mb@D722 = temp0</action>
      <action>subcpu.mb@A078 = temp1</action>
    </script>
  </cheat>
bwingso.xml

Code: Select all

  <cheat desc="Invincibility">
    <script state="on">
      <action>temp0 = maincpu.mb@D77C</action>
      <action>temp1 = subcpu.mb@A078</action>
    </script>
    <script state="run">
      <action>maincpu.mb@D77C = 39</action> <!-- background -->
      <action>subcpu.mb@A078 = 20</action> <!-- objects -->
    </script>
    <script state="off">
      <action>maincpu.mb@D77C = temp0</action>
      <action>subcpu.mb@A078 = temp1</action>
    </script>
  </cheat>
bwingsa.xml

Code: Select all

  <cheat desc="Invincibility">
    <script state="on">
      <action>temp0 = maincpu.mb@D77D</action>
      <action>temp1 = subcpu.mb@A078</action>
    </script>
    <script state="run">
      <action>maincpu.mb@D77D = 39</action> <!-- background -->
      <action>subcpu.mb@A078 = 20</action> <!-- objects -->
    </script>
    <script state="off">
      <action>maincpu.mb@D77D = temp0</action>
      <action>subcpu.mb@A078 =temp1</action>
    </script>
  </cheat>
And merged "Always Falling" and "Always Rising" because these codes are the same address with different value.
But you can't rise when you press button 2 after code OFF in case of "Always Falling" (Original code bug?).

Code: Select all

  <cheat desc="Player State">
    <parameter>
      <item value="0xFD">Always Falling</item>
      <item value="0x00">Always Rising</item>
    </parameter>
    <script state="run">
      <action>maincpu.pb@0036 = param</action>
    </script>
  </cheat>
Improved "Rapid Fire" with "Assign Binary And" (&=). You need to use "&amp;=" instead of "&=" in xml because "&" character is specified.

Code: Select all

  <cheat desc="Rapid Fire">
    <script state="run">
      <action>maincpu.pb@0023 &amp;= ~10</action>
    </script>
  </cheat>
This code means that cheat system always "clear" bit 4 at $23. Also you can "set" bit with "|=" (Assign Binary Or).
jman

my wip cheat database back-up (06/01/2025 ver.)
https://u3.getuploader.com/...../download/58
downloadpass : jman2020
Post Reply