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.
ShimaPong
Posts: 1063 Joined: Wed May 21, 2003 4:19 pm
Location: Japan
Post
by ShimaPong » Fri Jun 02, 2006 4:52 pm
On 0.106u3, you can't choose a file except "cheat.dat". Because "-cheat_file" option always picks up "cheat.dat" only and other filenames are ignored.
For example :
Put cheat.dat, cheat2.dat and cheat3.dat in the same MAME directory.
Start with "mame -cheat_file cheat2.dat;cheat3.dat".
MAME never loads cheat2.dat and cheat3.dat but cheat.dat is loaded instead.
I have already posted the above problem to MAME Testers.
My cheat database is using other filename. So it's very serious issue for me.
ianpatt
Posts: 336 Joined: Sat Sep 22, 2001 1:00 am
Location: San Francisco, CA
Post
by ianpatt » Sat Jun 03, 2006 8:39 pm
Confirmed, fix coming in a few minutes.
ianpatt
Posts: 336 Joined: Sat Sep 22, 2001 1:00 am
Location: San Francisco, CA
Post
by ianpatt » Sat Jun 03, 2006 8:56 pm
Replace the beginning of LoadCheatDatabase (line 8672) with:
Code: Select all
static void LoadCheatDatabase(void)
{
char buf[4096];
const char * inTraverse;
char * outTraverse;
char * mainTraverse;
int first = 1;
char data;
inTraverse = options_get_string("cheat_file", 0);
if(!inTraverse)
inTraverse = "cheat.dat";
outTraverse = buf;
mainTraverse = mainDatabaseName;
buf[0] = 0;
ShimaPong
Posts: 1063 Joined: Wed May 21, 2003 4:19 pm
Location: Japan
Post
by ShimaPong » Mon Jun 05, 2006 5:02 pm
Thanks. I confirmed the modified cheat_file option on recompiled MAME 0.106u3.
Though we need to add #include "options.h" into cheat.c.