Hacks can now be disabled via command line (-dh).

This commit is contained in:
jbo_85
2005-10-16 13:51:35 +00:00
parent fc35032a9d
commit 0e73c23b71
2 changed files with 12 additions and 7 deletions

View File

@@ -1440,6 +1440,7 @@ extern unsigned char opexec358cphb;
extern unsigned char DSP1Type; extern unsigned char DSP1Type;
extern unsigned int ewj2hack; extern unsigned int ewj2hack;
extern unsigned char cycpl; extern unsigned char cycpl;
unsigned char HacksDisable;
void headerhack() void headerhack()
{ {
@@ -1450,12 +1451,12 @@ void headerhack()
ClearScreenSkip = 0; ClearScreenSkip = 0;
ENVDisable = 0; ENVDisable = 0;
if (curromspace < Lo) if ((curromspace < Lo) || (HacksDisable && !DSP1Type))
{ {
return; return;
} }
//These next fiew look like RAM init hacks, should be looked into //These next few look like RAM init hacks, should be looked into
//Should be Super Famista (J), uses non-standard characters //Should be Super Famista (J), uses non-standard characters
if (!strncmp((RomData+Lo),"\x0bd\x0b0\x0ca\x0df\x0b0\x0cc\x0a7\x0d0\x0bd\x0c0 " ,16)) if (!strncmp((RomData+Lo),"\x0bd\x0b0\x0ca\x0df\x0b0\x0cc\x0a7\x0d0\x0bd\x0c0 " ,16))
@@ -1675,8 +1676,6 @@ void headerhack()
opexec268cph = 80; opexec268cph = 80;
opexec358cph = 80; opexec358cph = 80;
} }
return;
} }
extern unsigned char per2exec; extern unsigned char per2exec;

View File

@@ -48,7 +48,7 @@ extern unsigned char Palette0, pl1contrl, pl2contrl, MMXSupport, Force8b, ForceP
SnowOn, Triplebufen, SPC700sh, OffBy1Line, DSPDisable, frameskip, SnowOn, Triplebufen, SPC700sh, OffBy1Line, DSPDisable, frameskip,
gammalevel, guioff, romtype, per2exec, scanlines, soundon, spcon, gammalevel, guioff, romtype, per2exec, scanlines, soundon, spcon,
showallext, autoloadstate, smallscreenon, autoloadmovie, ZMVZClose, showallext, autoloadstate, smallscreenon, autoloadmovie, ZMVZClose,
ZMVRawDump; ZMVRawDump, HacksDisable;
extern char *STCart2, fname; extern char *STCart2, fname;
@@ -88,6 +88,7 @@ static void display_help()
put_line(" -d Start with debugger enabled"); put_line(" -d Start with debugger enabled");
#endif #endif
put_line(" -dd Disable sound DSP emulation"); put_line(" -dd Disable sound DSP emulation");
put_line(" -dh Disable hacks");
#ifdef __MSDOS__ #ifdef __MSDOS__
put_line(" -e Skip enter key press at the beginning"); put_line(" -e Skip enter key press at the beginning");
#endif #endif
@@ -475,6 +476,11 @@ static void handle_params(int argc, char *argv[])
DSPDisable = 1; DSPDisable = 1;
} }
else if (tolower(argv[i][1]) == 'd' && tolower(argv[i][2]) == 'h') //Disable hacks
{
HacksDisable = 1;
}
#ifdef __WIN32__ #ifdef __WIN32__
else if (tolower(argv[i][1]) == 'k' && tolower(argv[i][2]) == 's') //Enable KitchenSync else if (tolower(argv[i][1]) == 'k' && tolower(argv[i][2]) == 's') //Enable KitchenSync
{ {