mirror of https://github.com/PCSX2/pcsx2.git
New speed hack mainly targeting 3D geometry.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@984 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
fca65ba2ef
commit
4d2adcae9f
|
@ -137,6 +137,7 @@ public:
|
|||
int Patch;
|
||||
int CustomFps;
|
||||
int Hacks;
|
||||
int VUCycleHack;
|
||||
int GameFixes;
|
||||
int CustomFrameSkip;
|
||||
int CustomConsecutiveFrames;
|
||||
|
|
|
@ -101,6 +101,9 @@ int LoadConfig()
|
|||
#endif
|
||||
GetValuel("Options", Config.Options);
|
||||
GetValuel("Hacks", Config.Hacks);
|
||||
GetValuel("VUCycleHack", Config.VUCycleHack);
|
||||
if (Config.VUCycleHack < 0 || Config.VUCycleHack > 4)
|
||||
Config.VUCycleHack = 0;
|
||||
GetValuel("Fixes", Config.GameFixes);
|
||||
|
||||
GetValuel("CustomFps", Config.CustomFps);
|
||||
|
@ -163,6 +166,7 @@ void SaveConfig()
|
|||
SetValuel("Options", Config.Options);
|
||||
|
||||
SetValuel("Hacks", Config.Hacks);
|
||||
SetValuel("VUCycleHack", Config.VUCycleHack);
|
||||
SetValuel("Fixes", Config.GameFixes);
|
||||
|
||||
SetValuel("Patch", Config.Patch);
|
||||
|
|
|
@ -19,6 +19,23 @@
|
|||
|
||||
#include "win32.h"
|
||||
|
||||
static _TCHAR *VUCycleHackLevels[] = {
|
||||
_T("Speedup for 3D games.\nCurrently off"),
|
||||
_T("Slight speedup for 3D geometry, should work with most games."),
|
||||
_T("Moderate speedup for 3D geometry, should work with most games with minor problems."),
|
||||
_T("Large speedup for 3D geometry, may break many games and make others skip frames."),
|
||||
_T("Very large speedup for 3D geometry, will break games in interesting ways."),
|
||||
};
|
||||
|
||||
static void CheckVUCycleHack(HWND hDlg, int &vucyclehack)
|
||||
{
|
||||
if (vucyclehack < 0 || vucyclehack > 4) {
|
||||
vucyclehack = 0;
|
||||
SendDlgItemMessage(hDlg, IDC_VUCYCLE, TBM_SETPOS, TRUE, vucyclehack);
|
||||
}
|
||||
SetDlgItemText(hDlg, IDC_VUCYCLEDESC, VUCycleHackLevels[vucyclehack]);
|
||||
}
|
||||
|
||||
BOOL APIENTRY HacksProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch (message) {
|
||||
|
@ -31,8 +48,26 @@ BOOL APIENTRY HacksProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
|||
if(CHECK_INTC_STAT_HACK) CheckDlgButton(hDlg, IDC_INTCSTATHACK, TRUE);
|
||||
if(CHECK_ESCAPE_HACK) CheckDlgButton(hDlg, IDC_ESCHACK, TRUE);
|
||||
|
||||
SendDlgItemMessage(hDlg, IDC_VUCYCLE, TBM_SETRANGE, TRUE, MAKELONG(0, 4));
|
||||
CheckVUCycleHack(hDlg, Config.VUCycleHack);
|
||||
SendDlgItemMessage(hDlg, IDC_VUCYCLE, TBM_SETPOS, TRUE, Config.VUCycleHack);
|
||||
|
||||
return TRUE;
|
||||
|
||||
case WM_HSCROLL: {
|
||||
HWND slider = (HWND)lParam;
|
||||
int curpos = HIWORD(wParam);
|
||||
switch (LOWORD(wParam)) {
|
||||
case TB_THUMBTRACK:
|
||||
case TB_THUMBPOSITION:
|
||||
break;
|
||||
default:
|
||||
curpos = SendMessage(slider, TBM_GETPOS, 0, 0);
|
||||
}
|
||||
CheckVUCycleHack(hDlg, curpos);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
case WM_COMMAND:
|
||||
switch (LOWORD(wParam))
|
||||
{
|
||||
|
@ -53,12 +88,16 @@ BOOL APIENTRY HacksProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
|||
newhacks |= IsDlgButtonChecked(hDlg, IDC_INTCSTATHACK) << 5;
|
||||
newhacks |= IsDlgButtonChecked(hDlg, IDC_ESCHACK) << 10;
|
||||
|
||||
int newvucyclehack = SendDlgItemMessage(hDlg, IDC_VUCYCLE, TBM_GETPOS, 0, 0);
|
||||
CheckVUCycleHack(hDlg, newvucyclehack);
|
||||
|
||||
EndDialog(hDlg, TRUE);
|
||||
|
||||
if( newhacks != Config.Hacks )
|
||||
if( newhacks != Config.Hacks || newvucyclehack != Config.VUCycleHack)
|
||||
{
|
||||
SysRestorableReset();
|
||||
Config.Hacks = newhacks;
|
||||
Config.VUCycleHack = newvucyclehack;
|
||||
SaveConfig();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -223,6 +223,9 @@ void IniFile::DoConfig( PcsxConfig& Conf )
|
|||
Entry( "eeOptions", Conf.eeOptions, DEFAULT_eeOptions );
|
||||
Entry( "vuOptions", Conf.vuOptions, DEFAULT_vuOptions );
|
||||
Entry( "SpeedHacks", Conf.Hacks );
|
||||
Entry( "VUCycleHack", Conf.VUCycleHack, 0 );
|
||||
if (Conf.VUCycleHack < 0 || Conf.VUCycleHack > 4)
|
||||
Conf.VUCycleHack = 0;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -371,6 +371,9 @@ BEGIN
|
|||
LTEXT "Moderate speedup and works well with most games.",IDC_STATIC,25,90,129,19
|
||||
CONTROL "INTC Sync Hack (experimental)",IDC_INTCSTATHACK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,174,43,127,10
|
||||
LTEXT "Huge speedup in many games, and a pretty high compatibility rate (some games still work better with EE sync hacks).",IDC_STATIC,186,55,140,28
|
||||
CONTROL "",IDC_VUCYCLE,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,174,176,36,15
|
||||
LTEXT "This space intentionally left blank",IDC_VUCYCLEDESC,186,194,142,30
|
||||
LTEXT "VU Cycle Stealing (experimental)",IDC_STATIC,210,180,105,8
|
||||
END
|
||||
|
||||
|
||||
|
@ -393,6 +396,8 @@ BEGIN
|
|||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 328
|
||||
VERTGUIDE, 13
|
||||
VERTGUIDE, 174
|
||||
VERTGUIDE, 186
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 256
|
||||
END
|
||||
|
|
|
@ -272,6 +272,9 @@
|
|||
#define IDC_MCD_LABEL2 1325
|
||||
#define IDC_INTCSTATHACK 1326
|
||||
#define IDC_EE_CHECK3 1327
|
||||
#define IDC_SLIDER1 1327
|
||||
#define IDC_VUCYCLE 1327
|
||||
#define IDC_VUCYCLEDESC 1328
|
||||
#define IDC_CPULOG 1500
|
||||
#define IDC_MEMLOG 1501
|
||||
#define IDC_HWLOG 1502
|
||||
|
@ -405,7 +408,7 @@
|
|||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 141
|
||||
#define _APS_NEXT_COMMAND_VALUE 40018
|
||||
#define _APS_NEXT_CONTROL_VALUE 1326
|
||||
#define _APS_NEXT_CONTROL_VALUE 1329
|
||||
#define _APS_NEXT_SYMED_VALUE 104
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -2294,6 +2294,7 @@ void SuperVUCleanupProgram(u32 startpc, int vuindex)
|
|||
|
||||
VU = vuindex ? &VU1 : &VU0;
|
||||
VU->cycle += s_TotalVUCycles;
|
||||
cpuRegs.cycle += s_TotalVUCycles * Config.VUCycleHack;
|
||||
if( (int)s_writeQ > 0 ) VU->VI[REG_Q] = VU->q;
|
||||
if( (int)s_writeP > 0 ) {
|
||||
assert(VU == &VU1);
|
||||
|
|
Loading…
Reference in New Issue