mirror of https://github.com/PCSX2/pcsx2.git
* Removed a completely unnecessary use of xSmartJump in the SLT instruction generation
* Reduced the amount of console log spamming when hitting F4/Tab/etc. git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3398 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
688674bed9
commit
5a7508d43c
|
@ -149,12 +149,7 @@ int InitPatches(const wxString& crc, const Game_Data& game)
|
|||
}
|
||||
}
|
||||
|
||||
if (patchFound) {
|
||||
Console.WriteLn(Color_Green, "Patch found in the Database!");
|
||||
TrimPatches(patch);
|
||||
Console.WriteLn(Color_Green, "Patches Loaded: %d", patchnumber);
|
||||
}
|
||||
else Console.WriteLn(Color_Gray, "No patch for this game in the Database.");
|
||||
if (patchFound) TrimPatches(patch);
|
||||
|
||||
return patchnumber;
|
||||
}
|
||||
|
|
|
@ -190,7 +190,7 @@ void AppCoreThread::OnResumeReady()
|
|||
// Load Game Settings found in database
|
||||
// (game fixes, round modes, clamp modes, etc...)
|
||||
// Returns number of gamefixes set
|
||||
static int loadGameSettings(Pcsx2Config& dest, const Game_Data& game) {
|
||||
static int loadGameSettings(Pcsx2Config& dest, const Game_Data& game, bool verbose = true) {
|
||||
if( !game.IsOk() ) return 0;
|
||||
|
||||
int gf = 0;
|
||||
|
@ -200,7 +200,7 @@ static int loadGameSettings(Pcsx2Config& dest, const Game_Data& game) {
|
|||
SSE_RoundMode eeRM = (SSE_RoundMode)game.getInt("eeRoundMode");
|
||||
if (EnumIsValid(eeRM))
|
||||
{
|
||||
Console.WriteLn("(GameDB) Changing EE/FPU roundmode to %d [%s]", eeRM, EnumToString(eeRM));
|
||||
if(verbose) Console.WriteLn("(GameDB) Changing EE/FPU roundmode to %d [%s]", eeRM, EnumToString(eeRM));
|
||||
dest.Cpu.sseMXCSR.SetRoundMode(eeRM);
|
||||
++gf;
|
||||
}
|
||||
|
@ -211,7 +211,7 @@ static int loadGameSettings(Pcsx2Config& dest, const Game_Data& game) {
|
|||
SSE_RoundMode vuRM = (SSE_RoundMode)game.getInt("vuRoundMode");
|
||||
if (EnumIsValid(vuRM))
|
||||
{
|
||||
Console.WriteLn("(GameDB) Changing VU0/VU1 roundmode to %d [%s]", vuRM, EnumToString(vuRM));
|
||||
if(verbose) Console.WriteLn("(GameDB) Changing VU0/VU1 roundmode to %d [%s]", vuRM, EnumToString(vuRM));
|
||||
dest.Cpu.sseVUMXCSR.SetRoundMode(vuRM);
|
||||
++gf;
|
||||
}
|
||||
|
@ -219,7 +219,7 @@ static int loadGameSettings(Pcsx2Config& dest, const Game_Data& game) {
|
|||
|
||||
if (game.keyExists("eeClampMode")) {
|
||||
int clampMode = game.getInt("eeClampMode");
|
||||
Console.WriteLn("(GameDB) Changing EE/FPU clamp mode [mode=%d]", clampMode);
|
||||
if(verbose) Console.WriteLn("(GameDB) Changing EE/FPU clamp mode [mode=%d]", clampMode);
|
||||
dest.Recompiler.fpuOverflow = (clampMode >= 1);
|
||||
dest.Recompiler.fpuExtraOverflow = (clampMode >= 2);
|
||||
dest.Recompiler.fpuFullMode = (clampMode >= 3);
|
||||
|
@ -228,7 +228,7 @@ static int loadGameSettings(Pcsx2Config& dest, const Game_Data& game) {
|
|||
|
||||
if (game.keyExists("vuClampMode")) {
|
||||
int clampMode = game.getInt("vuClampMode");
|
||||
Console.WriteLn("(GameDB) Changing VU0/VU1 clamp mode [mode=%d]", clampMode);
|
||||
if(verbose) Console.WriteLn("(GameDB) Changing VU0/VU1 clamp mode [mode=%d]", clampMode);
|
||||
dest.Recompiler.vuOverflow = (clampMode >= 1);
|
||||
dest.Recompiler.vuExtraOverflow = (clampMode >= 2);
|
||||
dest.Recompiler.vuSignOverflow = (clampMode >= 3);
|
||||
|
@ -244,7 +244,7 @@ static int loadGameSettings(Pcsx2Config& dest, const Game_Data& game) {
|
|||
{
|
||||
bool enableIt = game.getBool(key);
|
||||
dest.Gamefixes.Set(id, enableIt);
|
||||
Console.WriteLn(L"(GameDB) %s Gamefix: " + key, enableIt ? L"Enabled" : L"Disabled" );
|
||||
if(verbose) Console.WriteLn(L"(GameDB) %s Gamefix: " + key, enableIt ? L"Enabled" : L"Disabled" );
|
||||
gf++;
|
||||
}
|
||||
}
|
||||
|
@ -254,6 +254,11 @@ static int loadGameSettings(Pcsx2Config& dest, const Game_Data& game) {
|
|||
|
||||
void AppCoreThread::ApplySettings( const Pcsx2Config& src )
|
||||
{
|
||||
// Used to track the current game serial/id, and used to disable verbose logging of
|
||||
// applied patches if the game info hasn't changed. (avoids spam when suspending/resuming
|
||||
// or using TAB or other things).
|
||||
static wxString curGameKey;
|
||||
|
||||
// 'fixup' is the EmuConfig we're going to upload to the emulator, which very well may
|
||||
// differ from the user-configured EmuConfig settings. So we make a copy here and then
|
||||
// we apply the commandline overrides and database gamefixes, and then upload 'fixup'
|
||||
|
@ -289,10 +294,13 @@ void AppCoreThread::ApplySettings( const Pcsx2Config& src )
|
|||
if (ElfCRC) gameCRC.Printf( L"%8.8x", ElfCRC );
|
||||
if (!DiscSerial.IsEmpty()) gameSerial = L" [" + DiscSerial + L"]";
|
||||
|
||||
const wxString newGameKey( SysGetDiscID() );
|
||||
const bool verbose( newGameKey != curGameKey );
|
||||
|
||||
if (IGameDatabase* GameDB = AppHost_GetGameDatabase() )
|
||||
{
|
||||
Game_Data game;
|
||||
if (GameDB->findGame(game, SysGetDiscID())) {
|
||||
if (GameDB->findGame(game, curGameKey)) {
|
||||
int compat = game.getInt("Compat");
|
||||
gameName = game.getString("Name");
|
||||
gameName += L" (" + game.getString("Region") + L")";
|
||||
|
@ -302,8 +310,9 @@ void AppCoreThread::ApplySettings( const Pcsx2Config& src )
|
|||
if (EmuConfig.EnablePatches) {
|
||||
if (int patches = InitPatches(gameCRC, game)) {
|
||||
gamePatch.Printf(L" [%d Patches]", patches);
|
||||
if (verbose) Console.WriteLn(Color_Green, "(GameDB) Patches Loaded: %d", patches);
|
||||
}
|
||||
if (int fixes = loadGameSettings(fixup, game)) {
|
||||
if (int fixes = loadGameSettings(fixup, game, verbose)) {
|
||||
gameFixes.Printf(L" [%d Fixes]", fixes);
|
||||
}
|
||||
}
|
||||
|
@ -315,6 +324,8 @@ void AppCoreThread::ApplySettings( const Pcsx2Config& src )
|
|||
}
|
||||
}
|
||||
|
||||
curGameKey = newGameKey;
|
||||
|
||||
Console.SetTitle(gameName+gameSerial+gameCompat+gameFixes+gamePatch+gameCheats);
|
||||
|
||||
// Re-entry guard protects against cases where code wants to manually set core settings
|
||||
|
|
|
@ -587,19 +587,19 @@ void recSLTs_const(int info, int sign, int st)
|
|||
GPR_reg64 cval = g_cpuConstRegs[st ? _Rt_ : _Rs_];
|
||||
|
||||
xMOV(eax, 1);
|
||||
{
|
||||
|
||||
xCMP(ptr32[&cpuRegs.GPR.r[st ? _Rs_ : _Rt_].UL[1]], cval.UL[1]);
|
||||
xSmartJump pass1(st ? (sign ? Jcc_Less : Jcc_Below) : (sign ? Jcc_Greater : Jcc_Above));
|
||||
xForwardJump<u8> fail(st ? (sign ? Jcc_Greater : Jcc_Above) : (sign ? Jcc_Less : Jcc_Below));
|
||||
xForwardJump8 pass1(st ? (sign ? Jcc_Less : Jcc_Below) : (sign ? Jcc_Greater : Jcc_Above));
|
||||
xForwardJump8 fail(st ? (sign ? Jcc_Greater : Jcc_Above) : (sign ? Jcc_Less : Jcc_Below));
|
||||
{
|
||||
xCMP(ptr32[&cpuRegs.GPR.r[st ? _Rs_ : _Rt_].UL[0]], cval.UL[0]);
|
||||
xForwardJump<u8> pass2(st ? Jcc_Below : Jcc_Above);
|
||||
xForwardJump8 pass2(st ? Jcc_Below : Jcc_Above);
|
||||
|
||||
fail.SetTarget();
|
||||
xMOV(eax, 0);
|
||||
pass2.SetTarget();
|
||||
}
|
||||
}
|
||||
pass1.SetTarget();
|
||||
|
||||
xMOV(ptr32[&cpuRegs.GPR.r[_Rd_].UL[0]], eax);
|
||||
xMOV(ptr32[&cpuRegs.GPR.r[_Rd_].UL[1]], 0);
|
||||
|
@ -610,21 +610,21 @@ void recSLTs_(int info, int sign)
|
|||
pxAssert( !(info & PROCESS_EE_XMM) );
|
||||
|
||||
xMOV(eax, 1);
|
||||
{
|
||||
|
||||
xMOV(edx, ptr32[&cpuRegs.GPR.r[_Rs_].UL[1]]);
|
||||
xCMP(edx, ptr32[&cpuRegs.GPR.r[_Rt_].UL[1]]);
|
||||
xSmartJump pass1(sign ? Jcc_Less : Jcc_Below);
|
||||
xForwardJump<u8> fail(sign ? Jcc_Greater : Jcc_Above);
|
||||
xForwardJump8 pass1(sign ? Jcc_Less : Jcc_Below);
|
||||
xForwardJump8 fail(sign ? Jcc_Greater : Jcc_Above);
|
||||
{
|
||||
xMOV(edx, ptr32[&cpuRegs.GPR.r[_Rs_].UL[0]]);
|
||||
xCMP(edx, ptr32[&cpuRegs.GPR.r[_Rt_].UL[0]]);
|
||||
xForwardJump<u8> pass2(Jcc_Below);
|
||||
xForwardJump8 pass2(Jcc_Below);
|
||||
|
||||
fail.SetTarget();
|
||||
xMOV(eax, 0);
|
||||
pass2.SetTarget();
|
||||
}
|
||||
}
|
||||
pass1.SetTarget();
|
||||
|
||||
xMOV(ptr32[&cpuRegs.GPR.r[_Rd_].UL[0]], eax);
|
||||
xMOV(ptr32[&cpuRegs.GPR.r[_Rd_].UL[1]], 0);
|
||||
|
|
Loading…
Reference in New Issue