Add/Sub type cheat broken ?

If you are having problems finding or using cheats for an Emulator (particularly MAME/MESS) or have found a trick that you wish to share this is the place to do it. But please read the Cheat FAQ first.
Post Reply
stephh
Posts: 601
Joined: Fri Aug 17, 2001 1:00 am
Location: Paris, France

Add/Sub type cheat broken ?

Post by stephh »

Can someone have a look at this post : http://www.mameworld.info/ubbthreads/sh ... art=1&vc=1 ?

First, I want to know if what I'm saying is right (I don't use such cheat type in MY databases) ...

Then, I want to know if the cheats using such type are OK ...

To end with, I want to know if, when you change the values in the "edit" menu, they are saved to cheat.dat file ...

TIA for your help ... Please post your replies under mine on the other forum ...

Image Steph from The Ultimate Patchers Image
ZED ZED
Posts: 101
Joined: Sun Apr 23, 2006 12:57 pm

Post by ZED ZED »

Add/Sub type cheat , can you give a game name that uses such cheats and then I can try them?

And I thought you had a good spec computer now to run most games smoothly? What processor do you have? I have an Athlon 64 3500+
stephh
Posts: 601
Joined: Fri Aug 17, 2001 1:00 am
Location: Paris, France

Post by stephh »

Sorry for the late reply, I didn't notice your post earlier :(
ZED ZED wrote:Add/Sub type cheat , can you give a game name that uses such cheats and then I can try them?
The fact is that don't know which cheats from Pugsy's cheat database use such kind of cheat, and as I said, I don't use them at all in my files ... So you'll have to check in cheat.dat if there are "Select Level/Round" cheats on 2 (or more) lines ...
And I thought you had a good spec computer now to run most games smoothly? What processor do you have? I have an Athlon 64 3500+
Well ... Nobody can run ALL games at full speed ! Anyway, I'm now happy with my "Happy Bonze Box" which allows to do more than expected ...


BTW, Pugsy, I think it's time to update my specs on "my" page ( http://cheat.retrogames.com/jck.htm ) :

. Athlon 64 3000+ at 1.8 GHz
. 512 Mb RAM
. Windows XP Professional 2002
. CD/DVD (can only copy CDs with it)
. 2 * 80 Gb HD
. external HD rack (for my 10 Gb and 8 Gb old HDs)

Also change our ages : I'll soon be 37, JCK is 33, DF will turn 35 and Mac Lak shall now be 31 ... Anyway, I'll try to update this page and mail you a copy when it's done (don't hold on your breath though - you know what I mean) ...

Image Steph from The Ultimate Patchers Image
ZED ZED
Posts: 101
Joined: Sun Apr 23, 2006 12:57 pm

Post by ZED ZED »

So you'll have to check in cheat.dat if there are "Select Level/Round" cheats on 2 (or more) lines ...
Right, I've tested this on two games, both work 100%. 'Marvel Land' I was using last week, and was frequently using it in an attempt to complete the game. It worked perfectly all the while I was applying it.

Next test was 'Sonic the HedgeHog'. Again, took me to whichever level I desired, like a Genie in a lamp granting me wishes (such are the power of these cheats) :D

So no problems here. Maybe it's a problem with that particular game he was playing?

And I cheer you on getting a new machine, at last! Happy gaming :D
stephh
Posts: 601
Joined: Fri Aug 17, 2001 1:00 am
Location: Paris, France

Post by stephh »

ZED ZED wrote:
So you'll have to check in cheat.dat if there are "Select Level/Round" cheats on 2 (or more) lines ...
Right, I've tested this on two games, both work 100%. 'Marvel Land' I was using last week, and was frequently using it in an attempt to complete the game. It worked perfectly all the while I was applying it.
AFAIK, the cheat Pugsy posted in the other section doesn't use "add/sub" type cheat ...
Next test was 'Sonic the HedgeHog'. Again, took me to whichever level I desired, like a Genie in a lamp granting me wishes (such are the power of these cheats) :D
Again, this is a "list" type cheat, not a "add/sub" type cheat ...
So no problems here. Maybe it's a problem with that particular game he was playing?
I thought I had found a game which used a "add/sub" type cheat ('sonicbom'), but in fact it uses the "copy previous" type (which is IMO better - many other games shall use this) ... So I just can't remember when the "add/sub" type was needed !

From the cheat.txt file :
Add - If the cheat is in the active list it is poked to add a value till a limit is reached, the limit will not be exceeded!
Unfortunately, this doesn't help much to know in which case(s) we were supposed to use the "add/sub" type :( Pugsy, Ian, Paul, where the hell are you ?

And I cheer you on getting a new machine, at last! Happy gaming :D
Well ... My 2 hard drives are full (not only with MAME stuff :wink: ), but I don't have so much free time to play the games as I spend most of it in looking at the games assembly code to fix some drivers and/or find new cheats ... But I'm really happy the way it is now (as this means I now have a job) !

Image Steph from The Ultimate Patchers Image
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:

Post by Pugsy »

/me looks sheepish......


I've done so many cheats it seems that I'd forgot I'm probably the only one who has used the Add/Subtract cheat type...oops. I'd used it in 'cycle' cheats along with a force range cheat. I think it's now possible to achieve the same effect with a list cheat but the add/subtract should still work and I'd like to keep it.

Here's an example from cheat.dat:-

Code: Select all

:4in1boot:00000009:105799:00000001:00000008:Cycle Current Shape Now! PL1:Assign this to an activation key for the best effect, then just press that key as many times as you want to cycle through the objects one by one. NOTE: Colour will not be correct though
:4in1boot:00010011:105799:00000000:00000006:Cycle Current Shape Now! PL1 (2/2):Uses force range and an +1 cheat for ease of use
:4in1boot:00000009:1059D7:00000001:00000008:Cycle Next Shape Now! PL1:Assign this to an activation key for the best effect, then just press that key as many times as you want to cycle through the objects one by one. NOTE: Colour will be incorrect though
:4in1boot:00010011:1059D7:00000000:00000006:Cycle Next Shape Now! PL1 (2/2):Uses force range and an +1 cheat for ease of use
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)
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:

Post by Pugsy »

BTW, you now have a faster PC than mine....I'm stuck with a 32 bit Athlon XP2500 overclocked to 3200. Though it does have 1 gig of RAM, 2 dvd writers and about 620 gigs worth of HD storage. It's in a very nice antec silent case though....so I guess I've not quite got the ghetto PC yet :)
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)
User avatar
wayder
Posts: 15
Joined: Thu Jan 03, 2002 1:00 am
Location: Japan
Contact:

Post by wayder »

A lot of add/sub cheats are used with my "Select Weapon" Cheat (Activation key Cheat)

"Select Weapon" Cheat adds or subtracts the numerical value when the activation key is pushed and changes weapons.

It doesn't operate since version 0.111u1 though the add/sub cheat had operated before version 0.111.
User avatar
RedBeam
Posts: 191
Joined: Tue Oct 24, 2006 10:26 am
Location: Italy (Sardegna)

Post by RedBeam »

why add/subtract doesn't work?

It's absolutely simple!!!
Look at the procedure;

Code: Select all

		case kOperation_AddSubtract:
		{
			INT32	temp, bound;

			/* ----- if extend data field is invalid, direct return ----- */
			//if(action->flags & kActionFlag_IgnoreMask)
				return;

			temp = ReadData(action);

			/* ----- OperationParameter field stores add/subtract ----- */
			if(TEST_FIELD(action->type, OperationParameter))
			{
				/* ----- subtract ----- */
				bound = action->extendData + action->data;

				if(temp > bound)
					temp -= action->data;
			}
			else
			{
				/* ----- add ----- */
				bound = action->extendData - action->data;

				if(temp < bound)
					temp += action->data;
			}

			WriteData(action, temp);
		}
		break;
Somebody commented out if(action->flags & kActionFlag_IgnoreMask) but left unchanged return.
So everytime you want to use this feature, you encounter return (and you exit from that function), that's why this never works!!!
A possible replacement;

Code: Select all

			/* ----- if extend data field is invalid, direct return ----- 
			(commented out feature)
			
			if(action->flags & kActionFlag_IgnoreMask)
				return;							 */
But originarily the check existed so it's better uncomment the if.

//if(action->flags & change to if(action->flags &

(edit)
The CPS2 smasher

Image

My troopers are skilled, but I'm supreme!!!

(Modest, huh? ;) )
Post Reply