From Pugsy:

> 
> Currently MESS supports single system cheat xmls
> 
> eg ALL cheats for any SNES game must be in snes.xml, this means that
> there will be a lot of cheats
> that are not applicable to the  game being played.
> 
> This change reverts MESS to a close approximation of how it used to
> handle cheats. It will get the
> crc32 of the image and load only the appropriate cheats to go with that
> image/game by loading
> crc32.xml (eg. DEADBEEF.xml).
> 
> 
> These changes are within  ifdef MESS structures so should have no
> affect on MAME, and my testing has
> not encountered any problems.
> 
> Diff File attached
This commit is contained in:
Aaron Giles 2009-08-19 16:45:49 +00:00
parent c3b50fe048
commit 4176a014ac

View File

@ -82,6 +82,10 @@
#include <ctype.h>
#ifdef MESS
#include "cheatms.h"
#endif
/***************************************************************************
@ -374,8 +378,18 @@ void cheat_init(running_machine *machine)
cheatinfo = auto_alloc_clear(machine, cheat_private);
machine->cheat_data = cheatinfo;
/* load the cheat file */
/* load the cheat file, MESS will load a crc32.xml ( eg. 01234567.xml )
and MAME will load gamename.xml */
#ifdef MESS
{
char mess_cheat_filename[9];
cheat_mess_init(machine);
sprintf(mess_cheat_filename, "%08X", this_game_crc);
cheatinfo->cheatlist = cheat_list_load(machine, mess_cheat_filename);
}
#else
cheatinfo->cheatlist = cheat_list_load(machine, machine->basename);
#endif
/* temporary: save the file back out as output.xml for comparison */
if (cheatinfo->cheatlist != NULL)