mirror of https://github.com/PCSX2/pcsx2.git
- Added eeRoundMode and vuRoundMode options to the game database (these options are only applied if patches are enabled)
- Rename game database to "GameIndex.dbf" git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3029 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
8d6532a987
commit
16dfd5c9fc
|
@ -31,10 +31,18 @@
|
||||||
-- 6 = Perfect
|
-- 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 must be specified in blocks.
|
||||||
-- [patches] or [patches = crc] is acceptable.
|
|
||||||
-- The blocks must end with a [/patch] tag.
|
-- The blocks must end with a [/patch] tag.
|
||||||
-- The block tags must be on their own lines.
|
-- The block tags must be on their own lines.
|
||||||
-- pcsx2 only loads the first [patches] block that matches the game.
|
-- pcsx2 only loads the first [patches] block that matches the game.
|
||||||
|
@ -2797,11 +2805,12 @@ Serial = SLUS-20294
|
||||||
Name = Gitaroo Man
|
Name = Gitaroo Man
|
||||||
Region = NTSC-U
|
Region = NTSC-U
|
||||||
Compat = 5
|
Compat = 5
|
||||||
|
eeRoundMode = 1
|
||||||
|
vuRoundMode = 3
|
||||||
[patches = 7130C553]
|
[patches = 7130C553]
|
||||||
|
|
||||||
comment=Skip Videos
|
comment=Skip Videos
|
||||||
roundmode=DOWN,CHOP
|
|
||||||
|
|
||||||
//Skip Videos
|
//Skip Videos
|
||||||
patch=0,EE,0012aa28,word,24020001
|
patch=0,EE,0012aa28,word,24020001
|
||||||
|
|
||||||
|
@ -15477,11 +15486,12 @@ Serial = SLPM-65012
|
||||||
Name = Gitaroo Man
|
Name = Gitaroo Man
|
||||||
Region = NTSC-J
|
Region = NTSC-J
|
||||||
Compat = 5
|
Compat = 5
|
||||||
|
eeRoundMode = 1
|
||||||
|
vuRoundMode = 3
|
||||||
[patches = C1767D64]
|
[patches = C1767D64]
|
||||||
|
|
||||||
comment=patch by parotaku
|
comment=patch by parotaku
|
||||||
roundmode=DOWN,CHOP
|
|
||||||
|
|
||||||
//Skip Videos (sceMpegIsEnd)
|
//Skip Videos (sceMpegIsEnd)
|
||||||
patch=0,EE,0012ea48,word,24020001
|
patch=0,EE,0012ea48,word,24020001
|
||||||
|
|
|
@ -357,7 +357,7 @@ static __forceinline void _reloadElfInfo(wxString elfpath)
|
||||||
if (GameDB->setGame(gameSerial.ToUTF8().data())) { // Game Found
|
if (GameDB->setGame(gameSerial.ToUTF8().data())) { // Game Found
|
||||||
Console.WriteLn ("Game = %s (%s)", GameDB->getString("Name").c_str(), GameDB->getString("Region").c_str());
|
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.month = (u8)curtime.GetMonth(wxDateTime::GMT9) + 1; // WX returns Jan as "0"
|
||||||
cdvd.RTC.year = (u8)(curtime.GetYear(wxDateTime::GMT9) - 2000);
|
cdvd.RTC.year = (u8)(curtime.GetYear(wxDateTime::GMT9) - 2000);
|
||||||
|
|
||||||
GameDB = new DataBase_Loader("DataBase.dbf");
|
GameDB = new DataBase_Loader("GameIndex.dbf");
|
||||||
}
|
}
|
||||||
|
|
||||||
struct Freeze_v10Compat
|
struct Freeze_v10Compat
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
#include "File_Reader.h"
|
#include "File_Reader.h"
|
||||||
|
#include "Patch.h"
|
||||||
|
|
||||||
struct key_pair {
|
struct key_pair {
|
||||||
string key;
|
string key;
|
||||||
|
@ -280,7 +281,7 @@ public:
|
||||||
// Gets a wxString representation of the 'value' for the given key
|
// Gets a wxString representation of the 'value' for the given key
|
||||||
wxString getStringWX(string key) {
|
wxString getStringWX(string key) {
|
||||||
string s = getString(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
|
// 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<DataBase_Loader> GameDB;
|
extern ScopedPtr<DataBase_Loader> GameDB;
|
||||||
|
|
|
@ -128,7 +128,7 @@ public:
|
||||||
}
|
}
|
||||||
wxString getLineWX() {
|
wxString getLineWX() {
|
||||||
ss->getline(buff, sizeof(buff));
|
ss->getline(buff, sizeof(buff));
|
||||||
return wxString(fromAscii(buff));
|
return wxString(fromUTF8(buff));
|
||||||
}
|
}
|
||||||
bool finished() {
|
bool finished() {
|
||||||
return ss->eof() || ss->fail();
|
return ss->eof() || ss->fail();
|
||||||
|
|
|
@ -596,12 +596,12 @@ void __fastcall eeGameStarting()
|
||||||
wxString pString( wxsFormat( L"%d", patches ) );
|
wxString pString( wxsFormat( L"%d", patches ) );
|
||||||
gamePatch = L" [Patches = " + pString + L"]";
|
gamePatch = L" [Patches = " + pString + L"]";
|
||||||
}
|
}
|
||||||
|
loadGameSettings(GameDB);
|
||||||
}
|
}
|
||||||
|
|
||||||
Console.SetTitle(gameName + gameSerial + gameCompat + gamePatch);
|
Console.SetTitle(gameName + gameSerial + gameCompat + gamePatch);
|
||||||
|
|
||||||
GetMTGS().SendGameCRC(ElfCRC);
|
GetMTGS().SendGameCRC(ElfCRC);
|
||||||
|
|
||||||
g_GameStarted = true;
|
g_GameStarted = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue