WIP Again

This forum is for making announcements about updated cheat files (for any emulator), updated web pages and of course about improvements to the MAME/MESS cheat engine.
stephh
Posts: 601
Joined: Fri Aug 17, 2001 1:00 am
Location: Paris, France

Re: updated code

Post by stephh »

ianpatt wrote: Version 0.9999 release...

After testing this under MacOS, unless there are more bugs or there is something crucial that I missed, I'm going to submit this version (making it the 1.0 release.)
Can you tell me WHY the cheat databases are now considered as binary files with MAME while they are text files with DMAME ?

I have the source files, and I know that Aaron needs to "merge" some code, but I must admit I don't understand why he decided that they should be binary files :(

And now 2 little things ...

1) In function 'static void LoadCheatDatabase(void)', you have this line :

Code: Select all

strcpy(mainDatabaseName, "cheat.dat");
But I don't see ANY initialisation of mainDatabaseName ! So where is support for multiple cheat databases ?

Also note that, at least with command-line versions, you have a 'cheatfile' variable that is initialised via the command line, so if I have such line in my mame.cfg file

Code: Select all

cheatfile = CHEAT.DAT;WIPCHEAT.DAT;CHEAT_UK.DAT
the cheat.dat file will be loaded TWICE which might be a nightmare for games with many cheats (eg: 'bublbobl' and I don't speak about 'ddsom' !) ...

2) Something related to previous problem ...

In 'static void SaveCheat(CheatEntry * entry)' function, you have this line :

Code: Select all

	theFile = osd_fopen(NULL, mainDatabaseName, OSD_FILETYPE_CHEAT, 1);
It CAN'T be the same file as the one you loaded the cheats from, or if you follow my example, it would create a CHEAT.DAT;WIPCHEAT.DAT;CHEAT_UK.DAT file which might be problematic under PURE DOS !

I hope that you understood what I meant ...

Steph from The Ultimate Patchers

Visit Image The Ultimate Patchers' site Image
User avatar
ianpatt
Posts: 336
Joined: Sat Sep 22, 2001 1:00 am
Location: San Francisco, CA

Re: updated code

Post by ianpatt »

stephh wrote:Can you tell me WHY the cheat databases are now considered as binary files with MAME while they are text files with DMAME ?

I have the source files, and I know that Aaron needs to "merge" some code, but I must admit I don't understand why he decided that they should be binary files :(
I'm not sure either. I'm more concerned about the fact that write access no longer is set to append mode, so the old cheat engine writes from the beginning of the file, overwriting the first lines of the cheat database. This is fixed in the new version (by seeking to the end of the file after opening) but there isn't anything that can be done about this bug in 0.59 now.
stephh wrote:multiple database issues
Added support for multiple databases. Previously you could only have one database, called "cheat.dat"; even if you specified more in the mame.cfg it would ignore them. I just forgot to implement this.
stephh
Posts: 601
Joined: Fri Aug 17, 2001 1:00 am
Location: Paris, France

Re: updated code

Post by stephh »

ianpatt wrote: I'm not sure either. I'm more concerned about the fact that write access no longer is set to append mode, so the old cheat engine writes from the beginning of the file, overwriting the first lines of the cheat database. This is fixed in the new version (by seeking to the end of the file after opening) but there isn't anything that can be done about this bug in 0.59 now.
This is surprising as you have these lines in MAME 0.59 source files :

Code: Select all

	/* seek to the end */
	osd_fseek(theFile, 0, SEEK_END);
They are in 'void cheat_save(int cheat_num)' and 'static void SaveWatch(int idx)' functions ...

So what is exactly your problem ?

Also note that in DMAME, the file is still opened in "append mode" for the moment ...
ianpatt wrote: Added support for multiple databases. Previously you could only have one database, called "cheat.dat"; even if you specified more in the mame.cfg it would ignore them. I just forgot to implement this.
OK ! I stay tuned for the new source files ...

BTW, have you implemented yet the watches stuff I asked you ?

Steph from The Ultimate Patchers

Visit Image The Ultimate Patchers' site Image
User avatar
ianpatt
Posts: 336
Joined: Sat Sep 22, 2001 1:00 am
Location: San Francisco, CA

Re: updated code

Post by ianpatt »

stephh wrote:This is surprising as you have these lines in MAME 0.59 source files :

Code: Select all

	/* seek to the end */
	osd_fseek(theFile, 0, SEEK_END);
They are in 'void cheat_save(int cheat_num)' and 'static void SaveWatch(int idx)' functions ...

So what is exactly your problem ?
Hmm... never mind then. I didn't add those lines, or if I did I don't remember doing it. No problem then.
stephh wrote:BTW, have you implemented yet the watches stuff I asked you ?
Partially. Byte skip is implemented, as is reading from the extend data field. It's documented at the top of the file. The only thing left is generic watches (watching relative addresses, etc.)

New source/binary:
source
binary
sum
Posts: 153
Joined: Wed Sep 26, 2001 1:00 am
Location: Hong Kong
Contact:

Re: updated code

Post by sum »

ianpatt New source/binary:
source
MameW binary
Mame32 binary
Mame32 Source:
http://www.mame.net/zips/compile/mingw_for_mame.zip
http://www.mame.net/zips/mame059s.zip
http://www.fileplanet.com/dl/dl.asp?/cl ... 32v59s.zip
C:\Mingw\mame\htmlhelp\include\htmlhelp.h -> C:\Mingw\include\htmlhelp.h
C:\Mingw\mame\htmlhelp\lib\htmlhelp.lib -> C:\Mingw\lib\htmlhelp.lib
http://cheatfinder.hoops.ne.jp/~ian/cheat_new.zip
make WINUI=1 SUFFIX=32
kelvSYC
Posts: 1121
Joined: Thu Sep 27, 2001 1:00 am
Location: Calgary, AB, Canada

Post by kelvSYC »

Something seems to be broken and I can't seem to recompile. Says that IPT_UI_EDIT_CHEAT is not defined. Any ideas?
kelvSYC's Guide to the Cheat Engine - http://members.shaw.ca/kelvsyc/cheatguide.html

The New Move List Cheat Collection - http://mamecheat.co.uk/forums/viewtopic.php?p=6469

Underscore Command - What better game is there?
kelvSYC
Posts: 1121
Joined: Thu Sep 27, 2001 1:00 am
Location: Calgary, AB, Canada

Post by kelvSYC »

Commenting out the aforementioned culprit line (where I said that IPT_EDIT_CHEAT is not defined on one occasion in inptport.c and four in cheat.c), at least relative addresses work in MacMAME.
kelvSYC's Guide to the Cheat Engine - http://members.shaw.ca/kelvsyc/cheatguide.html

The New Move List Cheat Collection - http://mamecheat.co.uk/forums/viewtopic.php?p=6469

Underscore Command - What better game is there?
kelvSYC
Posts: 1121
Joined: Thu Sep 27, 2001 1:00 am
Location: Calgary, AB, Canada

Post by kelvSYC »

At sum's urging I've put a copy of MacMAME v.58 (binary only) at http://cheatfinder.hoops.ne.jp/~ian/MacMAME.sit.hqx
kelvSYC's Guide to the Cheat Engine - http://members.shaw.ca/kelvsyc/cheatguide.html

The New Move List Cheat Collection - http://mamecheat.co.uk/forums/viewtopic.php?p=6469

Underscore Command - What better game is there?
User avatar
ianpatt
Posts: 336
Joined: Sat Sep 22, 2001 1:00 am
Location: San Francisco, CA

Post by ianpatt »

kelvSYC wrote:Something seems to be broken and I can't seem to recompile. Says that IPT_UI_EDIT_CHEAT is not defined. Any ideas?
Replace the inptport.c/h with the new files in the zip. Then, if you still get errors, do a clean compile (including the precompiled headers.)
Tourniquet
Posts: 163
Joined: Wed Sep 19, 2001 1:00 am
Location: UK
Contact:

Post by Tourniquet »

Reload cheat database?
Minor Bug: Doing a search on bits and then pressing 'w' to watch results in a weird char for the width as you create a single bit watch ;)
Major Bug: Turning off memory areas that contain results then viewing results causes crash.

There is no way to evaluate eg:

CurrentValue = [PreviousValue OR FirstValue] [+ OR -] Value
(as with the previous Timer cheat).

Maybe add "Greater than by Value" and "Less than by Value", not entirely clean but best I can come up with :lol:
Bugfinder
Posts: 168
Joined: Tue Sep 25, 2001 1:00 am
Location: Rio de Janeiro, Brasil

Observation about new cheat engine

Post by Bugfinder »

There's an arcade shooter game called Underscore Command, its zipfile is named _command.zip - will it be a problem?

The message saying "cheat xx was activated" only appears when the cheat was activated right from its menu, not when you press an activation key or when auto enabling at startup. And I prefer it that way, really - if you intend to have that message displayed in these situations as well, I'd then ask you to have another _command to disable it. In cabinets it's very annoying to have that message every time being displayed.

PS: Thanks for your work, Ian! Really appreciated - by the way that Underscore Command is a joke :-)
kelvSYC
Posts: 1121
Joined: Thu Sep 27, 2001 1:00 am
Location: Calgary, AB, Canada

Post by kelvSYC »

Old-style slow-and-sure cheat finding seems to be broken. Sometimes the cheat engine does not eliminate some of the results that it normally would with this method of search.

Also, there is no way to restore previous results, and when viewing results, the second and third columns are always identical (isn't one supposed to be current value and one last searched value?)
kelvSYC's Guide to the Cheat Engine - http://members.shaw.ca/kelvsyc/cheatguide.html

The New Move List Cheat Collection - http://mamecheat.co.uk/forums/viewtopic.php?p=6469

Underscore Command - What better game is there?
User avatar
ianpatt
Posts: 336
Joined: Sat Sep 22, 2001 1:00 am
Location: San Francisco, CA

Post by ianpatt »

Tourniquet wrote:Reload cheat database?
Minor Bug: Doing a search on bits and then pressing 'w' to watch results in a weird char for the width as you create a single bit watch ;)
Major Bug: Turning off memory areas that contain results then viewing results causes crash.
Both fixed.
Tourniquet wrote:There is no way to evaluate eg:

CurrentValue = [PreviousValue OR FirstValue] [+ OR -] Value
(as with the previous Timer cheat).

Maybe add "Greater than by Value" and "Less than by Value", not entirely clean but best I can come up with :lol:
Added. I'm calling it "Increased By" and "Decreased By."
User avatar
ianpatt
Posts: 336
Joined: Sat Sep 22, 2001 1:00 am
Location: San Francisco, CA

Re: Observation about new cheat engine

Post by ianpatt »

Bugfinder wrote:There's an arcade shooter game called Underscore Command, its zipfile is named _command.zip - will it be a problem
Underscore Command sounds like a good name for a game... I've heard that the programmers gave it this name because it ran on very primitive graphics hardware which could only display horizontal and vertical lines!
Bugfinder wrote:The message saying "cheat xx was activated" only appears when the cheat was activated right from its menu, not when you press an activation key or when auto enabling at startup. And I prefer it that way, really - if you intend to have that message displayed in these situations as well, I'd then ask you to have another _command to disable it. In cabinets it's very annoying to have that message every time being displayed.
I don't plan on adding the message box anywhere else. (if it's activated from anywhere else the user probably knows what they are doing)
User avatar
ianpatt
Posts: 336
Joined: Sat Sep 22, 2001 1:00 am
Location: San Francisco, CA

Post by ianpatt »

kelvSYC wrote:Old-style slow-and-sure cheat finding seems to be broken. Sometimes the cheat engine does not eliminate some of the results that it normally would with this method of search.
Can you provide some specific examples? I'm having trouble reproducing this.
kelvSYC wrote:Also, there is no way to restore previous results
Added.
kelvSYC wrote:when viewing results, the second and third columns are always identical (isn't one supposed to be current value and one last searched value?)
Check it again, the third column _does_ show the current value and the second shows the value after the last search.
kelvSYC
Posts: 1121
Joined: Thu Sep 27, 2001 1:00 am
Location: Calgary, AB, Canada

Post by kelvSYC »

Well, I found out with Super Puzzle Fighter II Turbo that it was broken. I put the cursor on the select screen over Ryu, started the search. Moved to Chun-Li, continued search equal (I was trying to find a way to customize the gem pattern, and Ryu and Chun-Li had the same lower-left corner color), moved to Sakura, searched not equal I expected the results to be down to a few, but lo and behold, only ten addresses were eliminated.

When I checked my results, I found that there were 4000-some pages to my result list, and that in the few that I looked at, all three columns of values were full of zeroes. That's how I found out that old-style S&S was broken. Just to make sure, I did a search with Ken (equal) and Felicia (not equal) under the cursor as well, and the searches only eliminated one or two addresses.

Why the last two columns were the same, and hence, broken? Again, using spf2xj, I gave up my S&S search and tried to do an old-style bit-by-bit search (since I thought that there were only four colors, and thus, a whole line of counter gem pattern can fit on 2 bytes). Again, I started with Ryu, then moved to Chun-Li (equal), Sakura (NE), and back to Chun-Li (NE). I was down to eight results, all eight being values which changed constantly. OK, my search failed, but I did notice that even when I paused the game seconds apart (and all eight values changed), I checked back on my results without doing another search and the second and third columns were always the same. Then the assumption that the two columns were broken was made.
kelvSYC's Guide to the Cheat Engine - http://members.shaw.ca/kelvsyc/cheatguide.html

The New Move List Cheat Collection - http://mamecheat.co.uk/forums/viewtopic.php?p=6469

Underscore Command - What better game is there?
User avatar
ianpatt
Posts: 336
Joined: Sat Sep 22, 2001 1:00 am
Location: San Francisco, CA

Post by ianpatt »

kelvSYC wrote:old-style slow search doesn't work
Baka. I was using the option for the bit-based search as the option for the slow search.

Replace this line (under case kMenu_Slow: in DoSearchMenuClassic)

Code: Select all

search->comparison =	kOldStatusComparisonTable[search->oldOptions.status];
with

Code: Select all

search->comparison =	kOldStatusComparisonTable[search->oldOptions.slow];
New version soon, just need to test some more.
User avatar
ianpatt
Posts: 336
Joined: Sat Sep 22, 2001 1:00 am
Location: San Francisco, CA

new stuff

Post by ianpatt »

New source/binary uploaded:
source
binary

This (should) have all the fixes/feature requests made since the last update, so I'm not going to list what's new.

Actually, there is one important thing. Since the final version will default to the classic search dialog, this version does also. Add this to your cheat.dat to use the new one. I'm making the old one the default because it seems easier to use for people inexperienced with how to use the cheat engine.

Code: Select all

:_command:00000002
sum
Posts: 153
Joined: Wed Sep 26, 2001 1:00 am
Location: Hong Kong
Contact:

Re: new stuff

Post by sum »

ianpatt wrote:New source/binary uploaded:
source
binary
The Winzip said the cheat_new_bin.zip file has probrem :(
User avatar
ianpatt
Posts: 336
Joined: Sat Sep 22, 2001 1:00 am
Location: San Francisco, CA

Re: new stuff

Post by ianpatt »

sum wrote:The Winzip said the cheat_new_bin.zip file has probrem
OK, reuploading. Will be up in ~3 minutes.
Locked