[terracre+] Faster Ship

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

[terracre+] Faster Ship

Post by megaman_exe »

I made this ROM codes but I coudn't parametrize the speed so the user chooses how fast the ship goes. I've put two speeds the user can choose. The cheats are made so the previous value is restored and to replace the proper instructions with a "write if match" operation (I've no expertise with asm 68000 but I know some asm 6502 for NES games and for those games, the code in a certain memory address can change so it's not advisable to just replace a value in a given address because you can corrupt another code being loaded in that area, the so called "mappers" do that in NES). I was afraid something similar could happen in this game so that's why I used "write if match".

The codes work for both players

Code: Select all

; [ Terra Cresta (YM2203) ]
:terracra:A0880000:008568:00000054:00000052:Faster Ship
:terracra:A0890000:008590:00000057:00000053:Faster Ship (2/4)
:terracra:A0890000:0085B6:00000057:00000053:Faster Ship (3/4)
:terracra:A0890000:0085A8:00000054:00000052:Faster Ship (4/4)

:terracra:A0880000:008568:00000058:00000052:Fastest Ship
:terracra:A0890000:008590:0000005D:00000053:Fastest Ship (2/4)
:terracra:A0890000:0085B6:0000005D:00000053:Fastest Ship (3/4)
:terracra:A0890000:0085A8:00000058:00000052:Fastest Ship (4/4)

; [ Terra Cresta (YM3526 set 2) ]
:terracrb:A0880000:008568:00000054:00000052:Faster Ship
:terracrb:A0890000:008590:00000057:00000053:Faster Ship (2/4)
:terracrb:A0890000:0085B6:00000057:00000053:Faster Ship (3/4)
:terracrb:A0890000:0085A8:00000054:00000052:Faster Ship (4/4)

:terracrb:A0880000:008568:00000058:00000052:Fastest Ship
:terracrb:A0890000:008590:0000005D:00000053:Fastest Ship (2/4)
:terracrb:A0890000:0085B6:0000005D:00000053:Fastest Ship (3/4)
:terracrb:A0890000:0085A8:00000058:00000052:Fastest Ship (4/4)

; [ Terra Cresta (YM3526 set 1) ]
:terracre:A0880000:008568:00000054:00000052:Faster Ship
:terracre:A0890000:008590:00000057:00000053:Faster Ship (2/4)
:terracre:A0890000:0085B6:00000057:00000053:Faster Ship (3/4)
:terracre:A0890000:0085A8:00000054:00000052:Faster Ship (4/4)

:terracre:A0880000:008568:00000058:00000052:Fastest Ship
:terracre:A0890000:008590:0000005D:00000053:Fastest Ship (2/4)
:terracre:A0890000:0085B6:0000005D:00000053:Fastest Ship (3/4)
:terracre:A0890000:0085A8:00000058:00000052:Fastest Ship (4/4)
[/color]

Greets! ;)
User avatar
Pugsy
Posts: 3675
Joined: Fri Aug 17, 2001 12:59 am
Location: North Wales, UK.
Has thanked: 1 time
Been thanked: 16 times
Contact:

Re: [terracre+] Faster Ship

Post by Pugsy »

Nice work - generally you don't need to worry about paging (mapping) on the 68000 as the address space is plenty big enough.


Movement speed is actually quite easy to do with RAM cheats in the XML format. All you have to do is check if the X or Y position has changed since the last frame and if it has changed by the standard value then just poke it with a bigger value to move faster.

Here's a XML RAM cheat I've just knocked up that should demonstrate it:-

Code: Select all

  <cheat desc="Select Movement Speed"> <!-- This can be used as a lose template to make similar cheats for most games - THEN DELETE THIS COMMENT -->
    <parameter> <!-- update this parameter section with the speeds and associated values (in this example - 1 = normal,  2 = 2x normal, 3 = 3x normal - THEN DELETE THIS COMMENT -->
      <item value="0x01">Normal</item>
      <item value="0x02">Faster</item>
      <item value="0x03">Fastest</item>
    </parameter>
    <script state="on"> <!-- update this "on script" section with the X + Y movement addresses, standard X+Y inc/dec and the X+Y boundary values for all - THEN DELETE THIS COMMENT -->
      <action>temp0=2067E</action> <!-- Left + Right (X) address -->
      <action>temp1=20680</action> <!-- Up + Down (Y) address -->
      <action>temp2=2</action> <!-- Normal Increment or Decrement when sprite moves Left + Right (X) -->
      <action>temp3=1</action> <!-- Normal Increment or Decrement when sprite moves Up + Down (Y) -->
      <action>temp4=0x098</action> <!-- X Boundary Position 1 (Minimum value of X), Optional if boundary checks not required -->
      <action>temp5=0x168</action> <!-- X Boundary Position 2 (Maximum value of X), Optional if boundary checks not required -->
      <action>temp6=0x088</action> <!-- Y Boundary Position 1 (Minimum value of Y), Optional if boundary checks not required -->
      <action>temp7=0x158</action> <!-- Y Boundary Position 2 (Maximum value of Y), Optional if boundary checks not required -->
    </script>
    <script state="run"> <!-- update this "run script" if cpu isn't maincpu and you are not poking a word (w of pw) - THEN DELETE THIS COMMENT -->
      <action condition="maincpu.pw@temp0==temp8+temp2">maincpu.pw@temp0=temp8+(temp2*param)</action>
      <action condition="maincpu.pw@temp0==temp8-temp2">maincpu.pw@temp0=temp8-(temp2*param)</action>
      <action condition="maincpu.pw@temp1==temp9+temp3">maincpu.pw@temp1=temp9+(temp3*param)</action>
      <action condition="maincpu.pw@temp1==temp9-temp3">maincpu.pw@temp1=temp9-(temp3*param)</action>
      <action condition="maincpu.pw@temp0 LT temp4    ">maincpu.pw@temp0=temp4</action> <!-- Enforce minimum value of X, Optional if boundary checks not required -->
      <action condition="maincpu.pw@temp0 GT temp5    ">maincpu.pw@temp0=temp5</action> <!-- Enforce maximum value of X, Optional if boundary checks not required -->
      <action condition="maincpu.pw@temp1 LT temp6    ">maincpu.pw@temp1=temp6</action> <!-- Enforce minimum value of Y, Optional if boundary checks not required -->
      <action condition="maincpu.pw@temp1 GT temp7    ">maincpu.pw@temp1=temp7</action> <!-- Enforce maximum value of Y, Optional if boundary checks not required -->
      <action>temp8=maincpu.pw@temp0</action>
      <action>temp9=maincpu.pw@temp1</action>    
    </script>
  </cheat>

The above cheat is made in such a way that it can be modified easily to produce the same cheat for other games which have constant player sprite speeds, just find the X and Y addresses and then the normal step size for each address and the min and max values of each address...simples
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)
Post Reply