[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: 39
Joined: Mon Nov 05, 2007 2:12 am

[gberet] Skip RAM/ROM checks

Post by megaman_exe »

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: 3638
Joined: Fri Aug 17, 2001 12:59 am
Location: North Wales, UK.
Has thanked: 1 time
Been thanked: 12 times
Contact:

Re: [gberet] Skip RAM/ROM checks

Post by Pugsy »

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 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)
Post Reply