[ATTN Ian] CRC alias in MESS

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
kelvSYC
Posts: 1121
Joined: Thu Sep 27, 2001 1:00 am
Location: Calgary, AB, Canada

[ATTN Ian] CRC alias in MESS

Post by kelvSYC »

Often times, it is frustrating to find MESS cheats because of the fact that you have to find and memorize obscure 8-character strings that is the CRC.

My proposal is that perhaps there should be some form of (up to 8 characters) alias, in a similar fashion to MAME, to designate each game, for each system, and a method to tell which CRC goes with what alias.

eg. aa5f14d2 is the CRC for the Game Boy game "Street Fighter Alpha (U) [C][!]" (name taken from GoodGBX). I propose a system where you can use something a little easier to remember in place of the CRC, like "sfau", so cheats that go

Code: Select all

:gameboy:AA5F14D2: //rest of cheat
can be rewritten as something like

Code: Select all

:gameboy:sfau: //rest of cheat
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 »

It sounds like a good idea... but implementing it would require some large architectural changes + much more special-case code for MESS. There is an ugly way to do this, but that's not going to happen either.
kelvSYC
Posts: 1121
Joined: Thu Sep 27, 2001 1:00 am
Location: Calgary, AB, Canada

Post by kelvSYC »

... and I'm assuming that "ugly way" is a new standard for ROM nomenclature?
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 »

The ugly way involves hacking the current CRC support code in the cheat engine to use strings.

The main problem with adding this is that I would need to add a dynamic-length string to the cheat structure which would be #ifdefed out for non-MESS builds. This isn't fun. Add to that my usual complaints about MESS (needing to make a project for it in Visual SlickEdit and VC++.)

I'll add this to the "todo" list in case I can think of a better way later. Realisticly, I'll probably will end up adding this, but not right now.

For when I do add this: how should the database connecting crcs to names work? Something like:

(inside a file named [systemname].nam)

Code: Select all

AA5F14D2=sfau
F68AB4FF=iidx8
Unless you have a good way of autogenerating these lists, I'm not sure that this would save any time. You would also need to distribute the *.nam files with the cheat database(s). Clarifications welcome.

I give this post the "fragmented train of thought" award of the day. That means that I need to go to sleep.
stephh
Posts: 601
Joined: Fri Aug 17, 2001 1:00 am
Location: Paris, France

Post by stephh »

ianpatt wrote: The ugly way involves hacking the current CRC support code in the cheat engine to use strings.

The main problem with adding this is that I would need to add a dynamic-length string to the cheat structure which would be #ifdefed out for non-MESS builds. This isn't fun. Add to that my usual complaints about MESS (needing to make a project for it in Visual SlickEdit and VC++.)

I'll add this to the "todo" list in case I can think of a better way later. Realisticly, I'll probably will end up adding this, but not right now.

For when I do add this: how should the database connecting crcs to names work? Something like:

(inside a file named [systemname].nam)

Code: Select all

AA5F14D2=sfau
F68AB4FF=iidx8
Unless you have a good way of autogenerating these lists, I'm not sure that this would save any time. You would also need to distribute the *.nam files with the cheat database(s). Clarifications welcome.
I haven't used MESS for about 2 years (and I probably will do that again due to the fact that the DOS port isn't updated anymore), but here is what I remember about this :

There are files (*.crc) in the crc subdirectory which gives the CRC and the LONG name, and there are some functions (eg: MatchCRC) in MESS that parse these files ... And IIRC Cowering told that the Good tools could generate these files ...

So, assuming that the long name is unique, and that there is NO ':' in it, you could have this format for the cheat line :

Code: Select all

:[ drivername ]:[ full name ]:[ type ]:[ address ]:[ data ]:[ extended data ]:[ name ]:[ description ]
There are however some things to know and some restrictions :

- how would you identify games that have no *.crc file (eg: 'sfzch' or the C64 games) ?
- you'll need to duplicate the cheats for games which use multiple images ("(n/m)" in the long name, for some games on the CPC 6128 for example)

I hope that you understand what I mean ...
I give this post the "fragmented train of thought" award of the day. That means that I need to go to sleep.
Ian, once you've read this, don't forget to also read my "bug report" about your latest changes on the "Announcement" board ...

Steph from The Ultimate Patchers

Visit Image The Ultimate Patchers' site Image
kelvSYC
Posts: 1121
Joined: Thu Sep 27, 2001 1:00 am
Location: Calgary, AB, Canada

Post by kelvSYC »

But wouldn't the full name be perhaps too long? That's why I suggested some short name.
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 »

stephh wrote:Ian, once you've read this, don't forget to also read my "bug report" about your latest changes on the "Announcement" board ...
Thanks for the reminder. (fixed.)

I'd rather not use a variable-length string that could potentially contain anything in the ASCII character set as an identifier. Also, I know that often CRCs are assigned different names in different versions of the goodtools, which would create problems.
stephh
Posts: 601
Joined: Fri Aug 17, 2001 1:00 am
Location: Paris, France

Post by stephh »

ianpatt wrote: I'd rather not use a variable-length string that could potentially contain anything in the ASCII character set as an identifier. Also, I know that often CRCs are assigned different names in different versions of the goodtools, which would create problems.
What do you mean ? I thought that the CRC was UNIQUE (at least for the games of the same system) ! If not, how could you recgonize the different games ?

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

Post by ianpatt »

stephh wrote:
ianpatt wrote:I'd rather not use a variable-length string that could potentially contain anything in the ASCII character set as an identifier. Also, I know that often CRCs are assigned different names in different versions of the goodtools, which would create problems.
What do you mean ? I thought that the CRC was UNIQUE (at least for the games of the same system) ! If not, how could you recgonize the different games ?
The same dump of a game will often be assigned a slightly different name in a newer version of the goodtools database. For example, after a dump is confirmed good, the "[!]" suffix is added. Mistakes are also made in romanization of Japanese titles, which are corrected later, etc.
stephh
Posts: 601
Joined: Fri Aug 17, 2001 1:00 am
Location: Paris, France

Post by stephh »

ianpatt wrote: The same dump of a game will often be assigned a slightly different name in a newer version of the goodtools database. For example, after a dump is confirmed good, the "[!]" suffix is added. Mistakes are also made in romanization of Japanese titles, which are corrected later, etc.
OK ! But first, I think that MESS *.crc files match the latest Good tools when a new MESS release is out ... But as I agree that you couldn't be sure of the name game, I had implemented the CRC stuff which should NOT change from a version to another ...

I know that there is ABSOLUTELY NO evidence to guess the full name with the CRC, but if you have a better proposition (which doesn't imply MANY changes between MESS releases), please let me know ...

Steph from The Ultimate Patchers

Visit Image The Ultimate Patchers' site Image
kelvSYC
Posts: 1121
Joined: Thu Sep 27, 2001 1:00 am
Location: Calgary, AB, Canada

Post by kelvSYC »

ianpatt wrote: I'd rather not use a variable-length string that could potentially contain anything in the ASCII character set as an identifier.
How about a fixed-length string? Say, force all short names to be exactly 8 characters long...
ianpatt wrote: Also, I know that often CRCs are assigned different names in different versions of the goodtools, which would create problems.
But with the "short-name" file, which would associate a CRC with a shortname, we could change the CRC but keep the same shortname, right? Or am I being horribly dense?
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:How about a fixed-length string? Say, force all short names to be exactly 8 characters long...
That would be better.
kelvSYC wrote:But with the "short-name" file, which would associate a CRC with a shortname, we could change the CRC but keep the same shortname, right? Or am I being horribly dense?
Yes, but my main point was that it takes work to maintain a list like that, and if short names are used the list can't just be copied from goodx.
kelvSYC
Posts: 1121
Joined: Thu Sep 27, 2001 1:00 am
Location: Calgary, AB, Canada

Post by kelvSYC »

Well, that's two strikes.

Also, the MESS gameboy.crc file in my 9-30-2002 CVS source is generated from GoodGBX 1.01, and not GoodGBX 1.02 (which I believe was released before MESS v.61).

Another thought: since the cheat files in MESS are segregated by system, does it seem redundant to include the system in the cheat every time? Of course, it does present some complications (MacMESS, for one, doesn't support multiple cheat files, unlike the official MESS build)...
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?
Post Reply