[gberet] Skip RAM/ROM checks

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
User avatar
megaman_exe
Posts: 36
Joined: Mon Nov 05, 2007 2:12 am

[gberet] Skip RAM/ROM checks

Post by megaman_exe » Tue Sep 19, 2017 9:10 pm

Code: Select all

	<cheat desc="Skip RAM/ROM Check">
		<script state="on">
			<action>temp0=maincpu.mb@E5</action>
			<action>temp1=maincpu.mb@E8</action>
		</script>
		<script state="run">
			<action>maincpu.mb@E5=0</action>
			<action>maincpu.mb@E8=0</action>
		</script>
		<script state="off">
			<action>maincpu.mb@E5=temp0</action>
			<action>maincpu.mb@E8=temp1</action>
		</script>
	</cheat>
As always, you must actually enable it, reset and you'll see it working. (Unless a "preenable" attribute on the cheat tag is implemented in the near future)
Please let me know if anything is wrong.

User avatar
Pugsy
Posts: 3258
Joined: Fri Aug 17, 2001 12:59 am
Location: North Wales, UK.
Contact:

Re: [gberet] Skip RAM/ROM checks

Post by Pugsy » Sun Jan 27, 2019 10:47 pm

Mmm, well it does work........

But,
you cannot NOP out two 3 byte jump instructions with two single NOPs....It may work but it's simple wrong and bad practice.

The standard method is to either NOP out all the bytes in the instructions, jump past it or replace it with a new instructions that will do no harm.

So for example replacing it with 3A instead of 00, it will write to the A register which in this case doesn't matter as the A register is overwritten by the instruction after the two JMPs

so this would be more correct:-

Code: Select all

  <cheat desc="Skip RAM/ROM Check">
    <script state="on">
      <action>temp0=maincpu.mb@00E5</action>
      <action>temp1=maincpu.mb@00E8</action>
    </script>
    <script state="run">
      <action>maincpu.mb@00E5=3A</action>
      <action>maincpu.mb@00E8=3A</action>
    </script>
    <script state="off">
      <action>maincpu.mb@00E5=temp0</action>
      <action>maincpu.mb@00E8=temp1</action>
    </script>
  </cheat>
Though I don't know if you even need to write to 00E5 to start with, maincpu.mb@00E8=3A would possibly suffice. Going to leave this for now.
Pugsy

Servicing your cheating needs since 1985 ;-)

Grab the latest cheat collection:
MAME 0.206 XML cheat collection 08 FEBRUARY 2018) from http://www.mamecheat.co.uk or direct from:-
http://www.mediafire.com/file/ybw7c4xyd ... at0206.zip (ZIP Archive 1931 KB)

Post Reply