diff --git a/bin/DataBase.dbf b/bin/GameIndex.dbf similarity index 96% rename from bin/DataBase.dbf rename to bin/GameIndex.dbf index 9e27e84c8b..63a7d5c4c9 100644 --- a/bin/DataBase.dbf +++ b/bin/GameIndex.dbf @@ -31,10 +31,18 @@ -- 6 = Perfect --------------------------------------------- --- Patches +-- Round Modes (eeRoundMode = n and vuRoundMode = n) +--------------------------------------------- +-- The rounding modes are numerically based. +-- 0 = Nearest +-- 1 = Negative Infinity +-- 2 = Positive Infinity +-- 3 = Chop (Zero) + +--------------------------------------------- +-- Patches ([patches] or [patches = crc]) --------------------------------------------- -- Patches must be specified in blocks. --- [patches] or [patches = crc] is acceptable. -- The blocks must end with a [/patch] tag. -- The block tags must be on their own lines. -- pcsx2 only loads the first [patches] block that matches the game. @@ -2797,11 +2805,12 @@ Serial = SLUS-20294 Name = Gitaroo Man Region = NTSC-U Compat = 5 +eeRoundMode = 1 +vuRoundMode = 3 [patches = 7130C553] comment=Skip Videos - roundmode=DOWN,CHOP - + //Skip Videos patch=0,EE,0012aa28,word,24020001 @@ -15477,11 +15486,12 @@ Serial = SLPM-65012 Name = Gitaroo Man Region = NTSC-J Compat = 5 +eeRoundMode = 1 +vuRoundMode = 3 [patches = C1767D64] comment=patch by parotaku - roundmode=DOWN,CHOP - + //Skip Videos (sceMpegIsEnd) patch=0,EE,0012ea48,word,24020001 diff --git a/pcsx2/CDVD/CDVD.cpp b/pcsx2/CDVD/CDVD.cpp index d3ea4f4be5..10daaa337d 100644 --- a/pcsx2/CDVD/CDVD.cpp +++ b/pcsx2/CDVD/CDVD.cpp @@ -357,7 +357,7 @@ static __forceinline void _reloadElfInfo(wxString elfpath) if (GameDB->setGame(gameSerial.ToUTF8().data())) { // Game Found Console.WriteLn ("Game = %s (%s)", GameDB->getString("Name").c_str(), GameDB->getString("Region").c_str()); } - else Console.Warning("Game not found in database [%s]", gameSerial.ToAscii().data()); + else Console.Warning(L"Game not found in database [%s]", gameSerial.c_str()); } } @@ -546,7 +546,7 @@ void cdvdReset() cdvd.RTC.month = (u8)curtime.GetMonth(wxDateTime::GMT9) + 1; // WX returns Jan as "0" cdvd.RTC.year = (u8)(curtime.GetYear(wxDateTime::GMT9) - 2000); - GameDB = new DataBase_Loader("DataBase.dbf"); + GameDB = new DataBase_Loader("GameIndex.dbf"); } struct Freeze_v10Compat diff --git a/pcsx2/DataBase_Loader.h b/pcsx2/DataBase_Loader.h index 46bf29036c..dae52b014b 100644 --- a/pcsx2/DataBase_Loader.h +++ b/pcsx2/DataBase_Loader.h @@ -15,6 +15,7 @@ #pragma once #include "File_Reader.h" +#include "Patch.h" struct key_pair { string key; @@ -280,7 +281,7 @@ public: // Gets a wxString representation of the 'value' for the given key wxString getStringWX(string key) { string s = getString(key); - return wxString(fromAscii(s.c_str())); + return wxString(fromUTF8(s.c_str())); } // Gets a double representation of the 'value' for the given key @@ -372,4 +373,20 @@ static wxString compatToStringWX(int compat) { } } +static void loadGameSettings(DataBase_Loader* gameDB) { + if (gameDB && gameDB->gameLoaded()) { + SSE_MXCSR eeMX = EmuConfig.Cpu.sseMXCSR; + SSE_MXCSR vuMX = EmuConfig.Cpu.sseVUMXCSR; + int eeRM = eeMX.GetRoundMode(); + int vuRM = vuMX.GetRoundMode(); + bool rm = 0; + if (gameDB->keyExists("eeRoundMode")) { eeRM = gameDB->getInt("eeRoundMode"); rm=1; } + if (gameDB->keyExists("vuRoundMode")) { vuRM = gameDB->getInt("vuRoundMode"); rm=1; } + if (rm && eeRM<4 && vuRM<4) { + Console.WriteLn("Game DataBase: Changing roundmodes!"); + SetRoundMode((SSE_RoundMode)eeRM, (SSE_RoundMode)vuRM); + } + } +} + extern ScopedPtr GameDB; diff --git a/pcsx2/File_Reader.h b/pcsx2/File_Reader.h index 5c21c0697c..1d0f9b0849 100644 --- a/pcsx2/File_Reader.h +++ b/pcsx2/File_Reader.h @@ -128,7 +128,7 @@ public: } wxString getLineWX() { ss->getline(buff, sizeof(buff)); - return wxString(fromAscii(buff)); + return wxString(fromUTF8(buff)); } bool finished() { return ss->eof() || ss->fail(); diff --git a/pcsx2/R5900.cpp b/pcsx2/R5900.cpp index b3d212b53d..5612139150 100644 --- a/pcsx2/R5900.cpp +++ b/pcsx2/R5900.cpp @@ -596,12 +596,12 @@ void __fastcall eeGameStarting() wxString pString( wxsFormat( L"%d", patches ) ); gamePatch = L" [Patches = " + pString + L"]"; } + loadGameSettings(GameDB); } Console.SetTitle(gameName + gameSerial + gameCompat + gamePatch); GetMTGS().SendGameCRC(ElfCRC); - g_GameStarted = true; }