Cheat File Checker RELEASE

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
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:

Cheat File Checker RELEASE

Post by Pugsy »

I've been working on this on and off for the last 11 months (off the last 6 months). I've been using it since August for release file checks and found it quite reliable and it's a lot better than the previous cheat file checker.

I will release the source for it in due course at the moment it's not pretty and contains quite a few nasty hacks. There's still plenty of functionality to be added...I just need to work out what exactly and how to implement it ;)

The number of people who would want to use this I could count on the fingers of one hand, so for what it's worth:-

http://cheat.retrogames.com/cheatchk011.zip

Code: Select all

Quick Doc
=========

MAME Cheat Database Checker V0.11 (27 July 2007)
Programmed by Pugsy

This is a basic commandline cheat file checker it's very much still a Work-In-Progess so at the moment it's a binary only release.


To run it copy the cheatchk.exe into it's own directory and copy over mame.exe and cheat.dat (filenames must match).
Then either double click it on run it direct from the commandline.

Things it does/checks:-
- Imports all the shortname/longname info direct from the MAME.EXE
- Reports mismatches between shortname and longname
- Reports games in MAME with no cheat file entries
- Reports any HEX fields that have non-hex characters in them or are not in uppercase
- Reports any type,value,mask fields that have NOT got exactly 8 characters
- Reports any type fields containing 60xxxxx or 62xxxxxx that do not contain all 0s in the other HEX fields
- Reports any mask fields that contain 000000FF,0000FFFF & 00FFFFFF which should be FFFFFFFF
- Warns about any suspect incorrectly zeroed address/mask fields
- Reports any character >7f anywhere in the cheat file (this check has been added to stop the SDLMAME issue reoccuring)

NOTE it will only check cheats upto '## END OF MAIN CHEATS' in the cheat file, so to use it with your own cheat file make
    sure that '## END OF MAIN CHEATS' exists and all the cheats you want to check are BEFORE it.
Last edited by Pugsy on Sat Jul 28, 2007 7:48 pm, edited 1 time in total.
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 »

- Warns about any suspect incorrectly zeroed address/mask fields.
Do not report any of these - this function is a recent addition/fix to the cheat checker and so the last cheat file release wasn't fully checked. The next cheat file release has already had those cheats either fixed/removed or non-displaying comments added for the valid zero address cheats.


Suffice to say, if you run the current cheat file along with the latest MAME release you will find things to be fixed/added. There's no need to report any of these as I will have fixed them already.


Forgot to mention the cheat longname should be in the form "; [ This is the longname of the game ] and it obviously only supports the new cheat format.
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 »

I think this release pretty much sorts out the last 2 things I wanted:-

Code: Select all

- Reports all games with cheat blocks where the address field is not the same length for all cheats (reports in the the form :shortname:)
- Reports all games with cheat blocks where the address field has got leading zeros (reports in the the form :shortname:)
- Reports some simple stats to the screen and echos to the file

Again for what it's worth here's the latest release:-

http://cheat.retrogames.com/cheatchk014.zip

It's not perfect but I think it checks everything that MacLak's old checkcdb did and its not limited by the number of games in MAME or the cheat file size and of course it checks new format cheats. It's also a LOT faster than checkcdb and a MASSIVE LOT faster than Slade's cheat checking utility which although limited had been a quite useful bridge in the meantime.



Again, this version will report a lot of issues with the last cheat file, please don't report any of them as I've already fixed them all.


NOTE: I forgot to change the text in the program so it still reports as being V0.11.
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)
stephh
Posts: 601
Joined: Fri Aug 17, 2001 1:00 am
Location: Paris, France

Post by stephh »

This looks interesting ... I'll check it once I'm back in France (next week), but I have some few questions :

- Is the original cheat file unchanged ? What's the name of the file with the modifications and the list of games with no cheats ?
- Is 'longname' the same as the one in MAME, or is there a way to have it all uppercase ?
- What happens if there is no '## END OF MAIN CHEATS' line ? Can't it stop at the end of the cheat file ?

Now a small suggestion : could it be possible to check that BCD values (mostly used with "select score" cheats) only use digits 0 to 9 ?

I hope that you'll release the source file(s) so I can try to add support for all format (provided it's coded in C language) ...

Anyway, great job again ! Expect me to make some tests to try to make it "crash" ;)

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 »

stephh wrote:This looks interesting ... I'll check it once I'm back in France (next week), but I have some few questions :

- Is the original cheat file unchanged ? What's the name of the file with the modifications and the list of games with no cheats ?
Yes the original cheat file is only opened for reading, it writes out the results to two files - cheatscanresults.txt & cheatscanwarnings.txt. Most of the warnings file at the moment is just for cheats which contain a zero address or a zero mask when it can't work out from the cheat type if it's valid or not. I've got the next cheat file down to just a few zero addresses.
- Is 'longname' the same as the one in MAME, or is there a way to have it all uppercase ?
Yes it's the same as the MAME output. I'm sure it wouldn't be to hard to lash a special compile up using TOUPPER on the longname.
- What happens if there is no '## END OF MAIN CHEATS' line ? Can't it stop at the end of the cheat file ?
Actually it only checks for '## E' ... it also checks for the end of file too - it's just that with my own cheat file I have a load of stuff right at the end that I didn't want to get reports about it and it is possible that it could crash the program when it finds things like ; [ longname ] with no cheats after it. ## E is handy in such circumstances as you can use it effectively as a sort of BP so that it only checks parts of the cheat file at a time.
Now a small suggestion : could it be possible to check that BCD values (mostly used with "select score" cheats) only use digits 0 to 9 ?
Yes, that should be a simple add I think, too keep things simple I'm adding new features so that they scan through the cheat file by themselves so that I don't break anything else in adding them. Surprisingly the full cheat file doesn't take that long to parse (measured in milliseconds).
I hope that you'll release the source file(s) so I can try to add support for all format (provided it's coded in C language) ...
I will release the source when I've had my 'fun' with it :) And yes it's all written in C....adding old cheat format is non-starter though without being a complete rewrite. If you convert you cheat file into the new format I'm sure I can make the simple changes required to make it work with your cheat file.
Anyway, great job again ! Expect me to make some tests to try to make it "crash" ;)
Doubtless it will crash, it really depends on how bad your cheat file is :)
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 »

Quickly added a BCD test and seems to work as it found this:-

Code: Select all

:toprollr:00001D01:606A:000000FE:FFFFFFFF:Select Starting Round:Set after you've inserted a credit
Anything else you can think of?
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 »

For Stephh, to do uppercase longnames run the cheatchk program with -UP on the commandline.

http://cheat.retrogames.com/cheatchk016.zip

Code: Select all

- Reports BCD Select cheats that use digits 0 to 9 in their value fields
- Run it with the -UP commandline parameter for Ultimate Patcher's cheat file compatability (all longnames are imported from MAME as UPPERCASE)
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
RedBeam
Posts: 191
Joined: Tue Oct 24, 2006 10:26 am
Location: Italy (Sardegna)

Post by RedBeam »

Oh Pugsy! Finally you have done a checking utility, after all that garbage ;) Good luck. I am busy and I cannot help but I can suggest to make it opensource so anyone can fixit in any time... Okay???
The CPS2 smasher

Image

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

(Modest, huh? ;) )
Post Reply