mirror of https://github.com/PCSX2/pcsx2.git
microVU is now selectable as a GUI option from the CPU dialog box.
microVU speedhacks are also available in the speedhacks dialog. All the GUI stuff took me a few hours, so hopefully I didn't bug anything. Note to users: Please remember that microVU is a W.I.P. and will have bugs; but it also fixes some games Super VU has problems with. So have fun testing. git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1273 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
3e12966919
commit
58c45c42ca
|
@ -44,21 +44,23 @@ extern SessionOverrideFlags g_Session;
|
||||||
//////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////
|
||||||
// Pcsx2 User Configuration Options!
|
// Pcsx2 User Configuration Options!
|
||||||
|
|
||||||
//#define PCSX2_MICROVU // Use Micro VU recs instead of Zero VU Recs
|
#define PCSX2_GSMULTITHREAD 0x0001 // Use Multi-Threaded GS
|
||||||
//#define PCSX2_MICROVU_ // Fully enable Micro VU recs (temporary option for now)
|
#define PCSX2_EEREC 0x0010
|
||||||
#define PCSX2_GSMULTITHREAD 1 // uses multi-threaded gs
|
#define PCSX2_VU0REC 0x0020
|
||||||
#define PCSX2_EEREC 0x10
|
#define PCSX2_VU1REC 0x0040
|
||||||
#define PCSX2_VU0REC 0x20
|
#define PCSX2_FRAMELIMIT_MASK 0x0c00
|
||||||
#define PCSX2_VU1REC 0x40
|
#define PCSX2_FRAMELIMIT_NORMAL 0x0000
|
||||||
#define PCSX2_FRAMELIMIT_MASK 0xc00
|
#define PCSX2_FRAMELIMIT_LIMIT 0x0400
|
||||||
#define PCSX2_FRAMELIMIT_NORMAL 0x000
|
#define PCSX2_FRAMELIMIT_SKIP 0x0800
|
||||||
#define PCSX2_FRAMELIMIT_LIMIT 0x400
|
#define PCSX2_MICROVU0 0x1000 // Use Micro VU0 recs instead of Zero VU0 Recs
|
||||||
#define PCSX2_FRAMELIMIT_SKIP 0x800
|
#define PCSX2_MICROVU1 0x2000 // Use Micro VU1 recs instead of Zero VU1 Recs
|
||||||
|
|
||||||
#define CHECK_FRAMELIMIT (Config.Options&PCSX2_FRAMELIMIT_MASK)
|
#define CHECK_FRAMELIMIT (Config.Options&PCSX2_FRAMELIMIT_MASK)
|
||||||
|
|
||||||
//------------ CPU Options!!! ---------------
|
//------------ CPU Options!!! ---------------
|
||||||
#define CHECK_MULTIGS (Config.Options&PCSX2_GSMULTITHREAD)
|
#define CHECK_MULTIGS (Config.Options&PCSX2_GSMULTITHREAD)
|
||||||
|
#define CHECK_MICROVU0 (Config.Options&PCSX2_MICROVU0)
|
||||||
|
#define CHECK_MICROVU1 (Config.Options&PCSX2_MICROVU1)
|
||||||
#define CHECK_EEREC (!g_Session.ForceDisableEErec && Config.Options&PCSX2_EEREC)
|
#define CHECK_EEREC (!g_Session.ForceDisableEErec && Config.Options&PCSX2_EEREC)
|
||||||
#define CHECK_VU0REC (!g_Session.ForceDisableVU0rec && Config.Options&PCSX2_VU0REC)
|
#define CHECK_VU0REC (!g_Session.ForceDisableVU0rec && Config.Options&PCSX2_VU0REC)
|
||||||
#define CHECK_VU1REC (!g_Session.ForceDisableVU1rec && (Config.Options&PCSX2_VU1REC))
|
#define CHECK_VU1REC (!g_Session.ForceDisableVU1rec && (Config.Options&PCSX2_VU1REC))
|
||||||
|
@ -163,12 +165,15 @@ public:
|
||||||
int Patch;
|
int Patch;
|
||||||
int CustomFps;
|
int CustomFps;
|
||||||
struct Hacks_t {
|
struct Hacks_t {
|
||||||
int EECycleRate;
|
int EECycleRate;
|
||||||
bool IOPCycleDouble;
|
bool IOPCycleDouble;
|
||||||
bool WaitCycleExt;
|
bool WaitCycleExt;
|
||||||
bool INTCSTATSlow;
|
bool INTCSTATSlow;
|
||||||
int VUCycleSteal;
|
|
||||||
bool IdleLoopFF;
|
bool IdleLoopFF;
|
||||||
|
int VUCycleSteal;
|
||||||
|
bool vuFlagHack1;
|
||||||
|
bool vuFlagHack2;
|
||||||
|
bool vuMinMax;
|
||||||
bool ESCExits; // this is a hack!?
|
bool ESCExits; // this is a hack!?
|
||||||
} Hacks;
|
} Hacks;
|
||||||
int GameFixes;
|
int GameFixes;
|
||||||
|
|
|
@ -446,11 +446,9 @@ __forceinline bool rcntUpdate_vSync()
|
||||||
|
|
||||||
// Accumulate hsync rounding errors:
|
// Accumulate hsync rounding errors:
|
||||||
hsyncCounter.sCycle += vSyncInfo.hSyncError;
|
hsyncCounter.sCycle += vSyncInfo.hSyncError;
|
||||||
|
|
||||||
#ifdef PCSX2_MICROVU
|
if (CHECK_MICROVU0) vsyncVUrec(0);
|
||||||
extern void mVUvsyncUpdate();
|
if (CHECK_MICROVU1) vsyncVUrec(1);
|
||||||
mVUvsyncUpdate();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
# ifdef VSYNC_DEBUG
|
# ifdef VSYNC_DEBUG
|
||||||
vblankinc++;
|
vblankinc++;
|
||||||
|
|
|
@ -104,12 +104,15 @@ int LoadConfig()
|
||||||
GetValuel("EECycleRate", Config.Hacks.EECycleRate);
|
GetValuel("EECycleRate", Config.Hacks.EECycleRate);
|
||||||
if (Config.Hacks.EECycleRate > 2)
|
if (Config.Hacks.EECycleRate > 2)
|
||||||
Config.Hacks.EECycleRate = 2;
|
Config.Hacks.EECycleRate = 2;
|
||||||
GetValuel("IOPCycleDouble", Config.Hacks.IOPCycleDouble);
|
GetValuel("IOPCycleDouble", Config.Hacks.IOPCycleDouble);
|
||||||
GetValuel("WaitCycleExt", Config.Hacks.WaitCycleExt);
|
GetValuel("WaitCycleExt", Config.Hacks.WaitCycleExt);
|
||||||
GetValuel("INTCSTATSlow", Config.Hacks.INTCSTATSlow);
|
GetValuel("INTCSTATSlow", Config.Hacks.INTCSTATSlow);
|
||||||
GetValuel("VUCycleSteal", Config.Hacks.VUCycleSteal);
|
GetValuel("VUCycleSteal", Config.Hacks.VUCycleSteal);
|
||||||
GetValuel("IdleLoopFF", Config.Hacks.IdleLoopFF);
|
GetValuel("vuFlagHack1", Config.Hacks.vuFlagHack1);
|
||||||
GetValuel("ESCExits", Config.Hacks.ESCExits);
|
GetValuel("vuFlagHack2", Config.Hacks.vuFlagHack2);
|
||||||
|
GetValuel("vuMinMax", Config.Hacks.vuMinMax);
|
||||||
|
GetValuel("IdleLoopFF", Config.Hacks.IdleLoopFF);
|
||||||
|
GetValuel("ESCExits", Config.Hacks.ESCExits);
|
||||||
|
|
||||||
if (Config.Hacks.VUCycleSteal < 0 || Config.Hacks.VUCycleSteal > 4)
|
if (Config.Hacks.VUCycleSteal < 0 || Config.Hacks.VUCycleSteal > 4)
|
||||||
Config.Hacks.VUCycleSteal = 0;
|
Config.Hacks.VUCycleSteal = 0;
|
||||||
|
|
|
@ -72,6 +72,16 @@ void vuMicroMemReset();
|
||||||
// the CHECK_VU0REC / CHECK_VU1REC config options.
|
// the CHECK_VU0REC / CHECK_VU1REC config options.
|
||||||
void vuMicroCpuReset();
|
void vuMicroCpuReset();
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////
|
||||||
|
// microVU Rec Stuff
|
||||||
|
//
|
||||||
|
extern void initVUrec(VURegs* vuRegs, const int vuIndex);
|
||||||
|
extern void closeVUrec(const int vuIndex);
|
||||||
|
extern void resetVUrec(const int vuIndex);
|
||||||
|
extern void clearVUrec(u32 addr, u32 size, const int vuIndex);
|
||||||
|
extern void runVUrec(u32 startPC, u32 cycles, const int vuIndex);
|
||||||
|
extern void vsyncVUrec(const int vuIndex);
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////
|
||||||
// Everything else does stuff on a per-VU basis.
|
// Everything else does stuff on a per-VU basis.
|
||||||
//
|
//
|
||||||
|
|
|
@ -52,15 +52,14 @@ BOOL CALLBACK CpuDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
Static_SetText(GetDlgItem(hW, IDC_CPUSPEEDNAME), _("CPU Speed"));
|
Static_SetText(GetDlgItem(hW, IDC_CPUSPEEDNAME), _("CPU Speed"));
|
||||||
Static_SetText(GetDlgItem(hW, IDC_FEATURESNAME), _("Features"));
|
Static_SetText(GetDlgItem(hW, IDC_FEATURESNAME), _("Features"));
|
||||||
Static_SetText(GetDlgItem(hW, IDC_CPU_EEREC), _("EERec - EE/IOP recompiler (need MMX/SSE)"));
|
Static_SetText(GetDlgItem(hW, IDC_CPU_EEREC), _("EERec - EE/IOP recompiler (need MMX/SSE)"));
|
||||||
Static_SetText(GetDlgItem(hW, IDC_CPU_VUGROUP), _("VU Recompilers - All options are set by default"));
|
Static_SetText(GetDlgItem(hW, IDC_CPU_VUGROUP), _("VU Recompilers"));
|
||||||
Static_SetText(GetDlgItem(hW, IDC_CPU_VU0REC), _("VU0rec - enable recompiler for VU0 unit"));
|
Static_SetText(GetDlgItem(hW, IDC_CPU_VU0REC), _("VU0rec - Enable recompiler for VU0 unit."));
|
||||||
Static_SetText(GetDlgItem(hW, IDC_CPU_VU1REC), _("VU1rec - enable recompiler for VU1 unit"));
|
Static_SetText(GetDlgItem(hW, IDC_CPU_VU1REC), _("VU1rec - Enable recompiler for VU1 unit."));
|
||||||
Static_SetText(GetDlgItem(hW, IDC_CPU_GSMULTI), _("Multi threaded GS mode (MTGS)\n(faster on dual core/HT procs, requires pcsx2 restart)"));
|
Static_SetText(GetDlgItem(hW, IDC_CPU_GSMULTI), _("Multi threaded GS mode (MTGS)\n(faster on dual core/HT procs, requires pcsx2 restart)"));
|
||||||
Static_SetText(GetDlgItem(hW, IDC_FRAMELIMIT), _("Frame Limiting (F4 key switches the mode in-game!)"));
|
Static_SetText(GetDlgItem(hW, IDC_FRAMELIMIT), _("Frame Limiting (F4 key switches the mode in-game!)"));
|
||||||
Static_SetText(GetDlgItem(hW, IDC_CPU_FL_NORMAL), _("Normal - All frames are rendered as fast as possible."));
|
Static_SetText(GetDlgItem(hW, IDC_CPU_FL_NORMAL), _("Normal - All frames are rendered as fast as possible."));
|
||||||
Static_SetText(GetDlgItem(hW, IDC_CPU_FL_LIMIT), _("Limit - Force frames to normal speeds if too fast."));
|
Static_SetText(GetDlgItem(hW, IDC_CPU_FL_LIMIT), _("Limit - Force frames to normal speeds if too fast."));
|
||||||
Static_SetText(GetDlgItem(hW, IDC_CPU_FL_SKIP), _("Frame Skip - In order to achieve normal speeds,\nsome frames are skipped (fast).\nFps displayed counts skipped frames too."));
|
Static_SetText(GetDlgItem(hW, IDC_CPU_FL_SKIP), _("Frame Skip - In order to achieve normal speeds,\nsome frames are skipped (fast).\nFps displayed counts skipped frames too."));
|
||||||
Static_SetText(GetDlgItem(hW, IDC_CPU_FL_SKIPVU), _("VU Skip - Same as 'Frame Skip', but tries to skip more.\nArtifacts might be present, but will be faster."));
|
|
||||||
Static_SetText(GetDlgItem(hW, IDC_CUSTOM_FPS), _("Custom FPS Limit (0=auto):"));
|
Static_SetText(GetDlgItem(hW, IDC_CUSTOM_FPS), _("Custom FPS Limit (0=auto):"));
|
||||||
Static_SetText(GetDlgItem(hW, IDC_FRAMESKIP_LABEL1), _("Skip Frames when slower than:\n(See Note 1)"));
|
Static_SetText(GetDlgItem(hW, IDC_FRAMESKIP_LABEL1), _("Skip Frames when slower than:\n(See Note 1)"));
|
||||||
Static_SetText(GetDlgItem(hW, IDC_FRAMESKIP_LABEL2), _("Consecutive Frames before skipping:\n(See Note 2)"));
|
Static_SetText(GetDlgItem(hW, IDC_FRAMESKIP_LABEL2), _("Consecutive Frames before skipping:\n(See Note 2)"));
|
||||||
|
@ -86,13 +85,15 @@ BOOL CALLBACK CpuDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
// if(cpucaps.hasAMD64BitArchitecture) strcat(features,",x86-64");
|
// if(cpucaps.hasAMD64BitArchitecture) strcat(features,",x86-64");
|
||||||
SetDlgItemText(hW, IDC_FEATURESINPUT, features);
|
SetDlgItemText(hW, IDC_FEATURESINPUT, features);
|
||||||
|
|
||||||
CheckDlgButton(hW, IDC_CPU_EEREC, !!(Config.Options&PCSX2_EEREC));
|
CheckDlgButton(hW, IDC_CPU_EEREC, !!(Config.Options&PCSX2_EEREC));
|
||||||
CheckDlgButton(hW, IDC_CPU_VU0REC, !!(Config.Options&PCSX2_VU0REC));
|
CheckDlgButton(hW, IDC_CPU_VU0REC, !!(Config.Options&PCSX2_VU0REC));
|
||||||
CheckDlgButton(hW, IDC_CPU_VU1REC, !!(Config.Options&PCSX2_VU1REC));
|
CheckDlgButton(hW, IDC_CPU_VU1REC, !!(Config.Options&PCSX2_VU1REC));
|
||||||
|
CheckDlgButton(hW, IDC_CPU_MVU0, !!(Config.Options&PCSX2_MICROVU0));
|
||||||
|
CheckDlgButton(hW, IDC_CPU_MVU1, !!(Config.Options&PCSX2_MICROVU1));
|
||||||
|
|
||||||
EnableDlgItem( hW, IDC_CPU_EEREC, !g_Session.ForceDisableEErec );
|
EnableDlgItem( hW, IDC_CPU_EEREC, !g_Session.ForceDisableEErec );
|
||||||
EnableDlgItem( hW, IDC_CPU_VU0REC, !g_Session.ForceDisableVU0rec );
|
EnableDlgItem( hW, IDC_CPU_VU0REC, !g_Session.ForceDisableVU0rec );
|
||||||
EnableDlgItem( hW, IDC_CPU_VU1REC, !g_Session.ForceDisableVU1rec );
|
EnableDlgItem( hW, IDC_CPU_VU1REC, !g_Session.ForceDisableVU1rec );
|
||||||
|
|
||||||
CheckDlgButton(hW, IDC_CPU_GSMULTI, !!CHECK_MULTIGS);
|
CheckDlgButton(hW, IDC_CPU_GSMULTI, !!CHECK_MULTIGS);
|
||||||
|
|
||||||
|
@ -124,16 +125,19 @@ BOOL CALLBACK CpuDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
case IDOK:
|
case IDOK:
|
||||||
newopts = 0;
|
newopts = 0;
|
||||||
|
|
||||||
if( SendDlgItemMessage(hW,IDC_CPU_EEREC,BM_GETCHECK,0,0) ) newopts |= PCSX2_EEREC;
|
if( SendDlgItemMessage(hW,IDC_CPU_EEREC,BM_GETCHECK,0,0) ) newopts |= PCSX2_EEREC;
|
||||||
|
|
||||||
if( SendDlgItemMessage(hW,IDC_CPU_VU0REC,BM_GETCHECK,0,0) ) newopts |= PCSX2_VU0REC;
|
if( SendDlgItemMessage(hW,IDC_CPU_VU0REC,BM_GETCHECK,0,0) ) newopts |= PCSX2_VU0REC;
|
||||||
if( SendDlgItemMessage(hW,IDC_CPU_VU1REC,BM_GETCHECK,0,0) ) newopts |= PCSX2_VU1REC;
|
if( SendDlgItemMessage(hW,IDC_CPU_VU1REC,BM_GETCHECK,0,0) ) newopts |= PCSX2_VU1REC;
|
||||||
|
|
||||||
|
if( SendDlgItemMessage(hW,IDC_CPU_MVU0,BM_GETCHECK,0,0) ) newopts |= PCSX2_MICROVU0;
|
||||||
|
if( SendDlgItemMessage(hW,IDC_CPU_MVU1,BM_GETCHECK,0,0) ) newopts |= PCSX2_MICROVU1;
|
||||||
|
|
||||||
if( SendDlgItemMessage(hW,IDC_CPU_GSMULTI,BM_GETCHECK,0,0) ) newopts |= PCSX2_GSMULTITHREAD;
|
if( SendDlgItemMessage(hW,IDC_CPU_GSMULTI,BM_GETCHECK,0,0) ) newopts |= PCSX2_GSMULTITHREAD;
|
||||||
|
|
||||||
if( SendDlgItemMessage(hW,IDC_CPU_FL_NORMAL,BM_GETCHECK,0,0) ) newopts |= PCSX2_FRAMELIMIT_NORMAL;
|
if( SendDlgItemMessage(hW,IDC_CPU_FL_NORMAL,BM_GETCHECK,0,0) ) newopts |= PCSX2_FRAMELIMIT_NORMAL;
|
||||||
else if( SendDlgItemMessage(hW,IDC_CPU_FL_LIMIT,BM_GETCHECK,0,0) ) newopts |= PCSX2_FRAMELIMIT_LIMIT;
|
else if( SendDlgItemMessage(hW,IDC_CPU_FL_LIMIT,BM_GETCHECK,0,0) ) newopts |= PCSX2_FRAMELIMIT_LIMIT;
|
||||||
else if( SendDlgItemMessage(hW,IDC_CPU_FL_SKIP,BM_GETCHECK,0,0) ) newopts |= PCSX2_FRAMELIMIT_SKIP;
|
else if( SendDlgItemMessage(hW,IDC_CPU_FL_SKIP,BM_GETCHECK,0,0) ) newopts |= PCSX2_FRAMELIMIT_SKIP;
|
||||||
|
|
||||||
GetDlgItemText(hW, IDC_CUSTOMFPS, cfps, 20);
|
GetDlgItemText(hW, IDC_CUSTOMFPS, cfps, 20);
|
||||||
Config.CustomFps = atoi(cfps);
|
Config.CustomFps = atoi(cfps);
|
||||||
|
|
|
@ -48,6 +48,9 @@ BOOL APIENTRY HacksProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
if(Config.Hacks.INTCSTATSlow) CheckDlgButton(hDlg, IDC_INTCSTATHACK, TRUE);
|
if(Config.Hacks.INTCSTATSlow) CheckDlgButton(hDlg, IDC_INTCSTATHACK, TRUE);
|
||||||
if(Config.Hacks.IdleLoopFF) CheckDlgButton(hDlg, IDC_IDLELOOPFF, TRUE);
|
if(Config.Hacks.IdleLoopFF) CheckDlgButton(hDlg, IDC_IDLELOOPFF, TRUE);
|
||||||
if(Config.Hacks.ESCExits) CheckDlgButton(hDlg, IDC_ESCHACK, TRUE);
|
if(Config.Hacks.ESCExits) CheckDlgButton(hDlg, IDC_ESCHACK, TRUE);
|
||||||
|
if(Config.Hacks.vuFlagHack1) CheckDlgButton(hDlg, IDC_VUHACK1, TRUE);
|
||||||
|
if(Config.Hacks.vuFlagHack2) CheckDlgButton(hDlg, IDC_VUHACK2, TRUE);
|
||||||
|
if(Config.Hacks.vuMinMax) CheckDlgButton(hDlg, IDC_VUHACK3, TRUE);
|
||||||
|
|
||||||
SendDlgItemMessage(hDlg, IDC_VUCYCLE, TBM_SETRANGE, TRUE, MAKELONG(0, 4));
|
SendDlgItemMessage(hDlg, IDC_VUCYCLE, TBM_SETRANGE, TRUE, MAKELONG(0, 4));
|
||||||
CheckVUCycleHack(hDlg, Config.Hacks.VUCycleSteal);
|
CheckVUCycleHack(hDlg, Config.Hacks.VUCycleSteal);
|
||||||
|
@ -87,11 +90,14 @@ BOOL APIENTRY HacksProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
}
|
}
|
||||||
|
|
||||||
newhacks.IOPCycleDouble = !!IsDlgButtonChecked(hDlg, IDC_IOPSYNC);
|
newhacks.IOPCycleDouble = !!IsDlgButtonChecked(hDlg, IDC_IOPSYNC);
|
||||||
newhacks.WaitCycleExt = !!IsDlgButtonChecked(hDlg, IDC_WAITCYCLES);
|
newhacks.WaitCycleExt = !!IsDlgButtonChecked(hDlg, IDC_WAITCYCLES);
|
||||||
newhacks.INTCSTATSlow = !!IsDlgButtonChecked(hDlg, IDC_INTCSTATHACK);
|
newhacks.INTCSTATSlow = !!IsDlgButtonChecked(hDlg, IDC_INTCSTATHACK);
|
||||||
newhacks.ESCExits = !!IsDlgButtonChecked(hDlg, IDC_ESCHACK);
|
newhacks.ESCExits = !!IsDlgButtonChecked(hDlg, IDC_ESCHACK);
|
||||||
newhacks.IdleLoopFF = !!IsDlgButtonChecked(hDlg, IDC_IDLELOOPFF);
|
newhacks.vuFlagHack1 = !!IsDlgButtonChecked(hDlg, IDC_VUHACK1);
|
||||||
newhacks.VUCycleSteal = SendDlgItemMessage(hDlg, IDC_VUCYCLE, TBM_GETPOS, 0, 0);
|
newhacks.vuFlagHack2 = !!IsDlgButtonChecked(hDlg, IDC_VUHACK2);
|
||||||
|
newhacks.vuMinMax = !!IsDlgButtonChecked(hDlg, IDC_VUHACK3);
|
||||||
|
newhacks.IdleLoopFF = !!IsDlgButtonChecked(hDlg, IDC_IDLELOOPFF);
|
||||||
|
newhacks.VUCycleSteal = SendDlgItemMessage(hDlg, IDC_VUCYCLE, TBM_GETPOS, 0, 0);
|
||||||
CheckVUCycleHack(hDlg, newhacks.VUCycleSteal);
|
CheckVUCycleHack(hDlg, newhacks.VUCycleSteal);
|
||||||
|
|
||||||
EndDialog(hDlg, TRUE);
|
EndDialog(hDlg, TRUE);
|
||||||
|
|
|
@ -227,11 +227,14 @@ void IniFile::DoConfig( PcsxConfig& Conf )
|
||||||
Entry("EECycleRate", Config.Hacks.EECycleRate);
|
Entry("EECycleRate", Config.Hacks.EECycleRate);
|
||||||
if (Config.Hacks.EECycleRate > 2)
|
if (Config.Hacks.EECycleRate > 2)
|
||||||
Config.Hacks.EECycleRate = 2;
|
Config.Hacks.EECycleRate = 2;
|
||||||
Entry("IOPCycleDouble", Config.Hacks.IOPCycleDouble);
|
Entry("IOPCycleDouble", Config.Hacks.IOPCycleDouble);
|
||||||
Entry("WaitCycleExt", Config.Hacks.WaitCycleExt);
|
Entry("WaitCycleExt", Config.Hacks.WaitCycleExt);
|
||||||
Entry("INTCSTATSlow", Config.Hacks.INTCSTATSlow);
|
Entry("INTCSTATSlow", Config.Hacks.INTCSTATSlow);
|
||||||
Entry("VUCycleSteal", Config.Hacks.VUCycleSteal);
|
Entry("VUCycleSteal", Config.Hacks.VUCycleSteal);
|
||||||
Entry("IdleLoopFF", Config.Hacks.IdleLoopFF);
|
Entry("vuFlagHack1", Config.Hacks.vuFlagHack1);
|
||||||
|
Entry("vuFlagHack2", Config.Hacks.vuFlagHack2);
|
||||||
|
Entry("vuMinMax", Config.Hacks.vuMinMax);
|
||||||
|
Entry("IdleLoopFF", Config.Hacks.IdleLoopFF);
|
||||||
if (Conf.Hacks.VUCycleSteal < 0 || Conf.Hacks.VUCycleSteal > 4)
|
if (Conf.Hacks.VUCycleSteal < 0 || Conf.Hacks.VUCycleSteal > 4)
|
||||||
Conf.Hacks.VUCycleSteal = 0;
|
Conf.Hacks.VUCycleSteal = 0;
|
||||||
Entry("ESCExits", Config.Hacks.ESCExits);
|
Entry("ESCExits", Config.Hacks.ESCExits);
|
||||||
|
|
|
@ -344,7 +344,7 @@ BEGIN
|
||||||
CTEXT "Pcsx2 Official Website and Forums",IDC_LINK_WEBSITE,79,151,273,10,SS_NOPREFIX | SS_NOTIFY
|
CTEXT "Pcsx2 Official Website and Forums",IDC_LINK_WEBSITE,79,151,273,10,SS_NOPREFIX | SS_NOTIFY
|
||||||
END
|
END
|
||||||
|
|
||||||
IDD_HACKS DIALOGEX 0, 0, 335, 263
|
IDD_HACKS DIALOGEX 0, 0, 543, 229
|
||||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||||
CAPTION "PCSX2 Speed Hacks"
|
CAPTION "PCSX2 Speed Hacks"
|
||||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||||
|
@ -352,29 +352,37 @@ BEGIN
|
||||||
CONTROL "Default Cycle Rate",IDC_EESYNC_DEFAULT,"Button",BS_AUTORADIOBUTTON,13,44,87,10
|
CONTROL "Default Cycle Rate",IDC_EESYNC_DEFAULT,"Button",BS_AUTORADIOBUTTON,13,44,87,10
|
||||||
CONTROL "Use x1.5 Cycle Rate",IDC_EESYNC1,"Button",BS_AUTORADIOBUTTON,13,79,87,10
|
CONTROL "Use x1.5 Cycle Rate",IDC_EESYNC1,"Button",BS_AUTORADIOBUTTON,13,79,87,10
|
||||||
CONTROL "Use x2 Cycle Rate",IDC_EESYNC2,"Button",BS_AUTORADIOBUTTON,13,113,83,10
|
CONTROL "Use x2 Cycle Rate",IDC_EESYNC2,"Button",BS_AUTORADIOBUTTON,13,113,83,10
|
||||||
CONTROL "Enable IOP x2 Cycle Rate",IDC_IOPSYNC,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,174,88,98,10
|
CONTROL "Enable IOP x2 Cycle Rate",IDC_IOPSYNC,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,187,88,98,10
|
||||||
CONTROL "WaitCycles Sync Hack",IDC_WAITCYCLES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,174,127,90,10
|
CONTROL "WaitCycles Sync Hack",IDC_WAITCYCLES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,187,127,90,10
|
||||||
CONTROL "Escape Hack - Use Esc key to fully exit PCSX2.",IDC_ESCHACK,
|
CONTROL "Esc Hack - Use Esc key to fully exit PCSX2.",IDC_ESCHACK,
|
||||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,238,180,10
|
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,197,152,10
|
||||||
DEFPUSHBUTTON "OK",IDOK,217,242,50,14
|
DEFPUSHBUTTON "OK",IDOK,424,208,50,14
|
||||||
PUSHBUTTON "Cancel",IDCANCEL,278,242,50,14
|
PUSHBUTTON "Cancel",IDCANCEL,486,208,50,14
|
||||||
CTEXT "These hacks will speed up emulation but reduce emulation compatibility or cause visual errors. If you have problems, disable all these and try again!",IDC_HACKDESC,18,7,286,19
|
CTEXT "These hacks will speed up emulation but reduce emulation compatibility or cause visual errors.\nIf you have problems, disable all these and try again!",IDC_HACKDESC,7,7,529,19
|
||||||
GROUPBOX "EmotionEngine (EE) Sync Hacks",IDC_STATIC,7,31,159,143
|
GROUPBOX "EmotionEngine (EE) Sync Hacks",IDC_STATIC,7,26,162,148
|
||||||
GROUPBOX "Miscellaneous",IDC_STATIC,7,223,194,33
|
GROUPBOX "Miscellaneous",IDC_STATIC,7,184,162,33
|
||||||
LTEXT "Important: the X2 sync hack *will* cause choppy/skippy audio on many FMV movies.",IDC_STATIC,13,149,137,22
|
LTEXT "Important: the X2 sync hack *will* cause choppy/skippy audio on many FMV movies.",IDC_STATIC,13,146,137,25
|
||||||
LTEXT "Big speedup! Works well with many games.",IDC_STATIC,25,124,125,19
|
LTEXT "Big speedup! Works well with many games.",IDC_STATIC,25,124,125,19
|
||||||
LTEXT "Most compatible option - recommended for everyone with high-end machines.",IDC_STATIC,25,55,136,19
|
LTEXT "Most compatible option - recommended for everyone with high-end machines.",IDC_STATIC,25,55,136,19
|
||||||
LTEXT "Small speedup and works well with most games.",IDC_STATIC,186,100,134,22
|
LTEXT "Small speedup and works well with most games.",IDC_STATIC,200,100,134,22
|
||||||
LTEXT "Small speedup. Works well with most games, but may cause certain games to crash or freeze up during bootup or stage changes.",IDC_STATIC,186,139,141,39
|
LTEXT "Small speedup. Works well with most games, but may cause certain games to crash or freeze up during bootup or stage changes.",IDC_STATIC,200,139,141,39
|
||||||
LTEXT "Moderate speedup and works well with most games.",IDC_STATIC,25,90,129,19
|
LTEXT "Moderate speedup and works well with most games.",IDC_STATIC,25,90,129,19
|
||||||
CONTROL "INTC Sync Hack",IDC_INTCSTATHACK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,174,43,127,10
|
CONTROL "INTC Sync Hack",IDC_INTCSTATHACK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,187,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
|
LTEXT "Huge speedup in many games, and a pretty high compatibility rate (some games still work better with EE sync hacks).",IDC_STATIC,200,55,140,28
|
||||||
CONTROL "",IDC_VUCYCLE,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,13,178,36,15
|
CONTROL "",IDC_VUCYCLE,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,372,152,36,15
|
||||||
LTEXT "This space intentionally left blank",IDC_VUCYCLEDESC,25,196,142,24
|
LTEXT "This space intentionally left blank",IDC_VUCYCLEDESC,383,171,142,26
|
||||||
LTEXT "VU Cycle Stealing (experimental)",IDC_STATIC,49,183,105,8
|
LTEXT "VU Cycle Stealing (experimental)",IDC_STATIC,408,157,105,8
|
||||||
CONTROL "Idle Loop Fast-Forward (experimental)",IDC_IDLELOOPFF,
|
CONTROL "Idle Loop Fast-Forward (experimental)",IDC_IDLELOOPFF,
|
||||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,174,179,139,10
|
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,187,179,139,10
|
||||||
LTEXT "Speedup for a few games, including FFX with no known side effects. More later.",IDC_STATIC,186,193,142,26
|
LTEXT "Speedup for a few games, including FFX with no known side effects.",IDC_STATIC,200,193,144,23
|
||||||
|
GROUPBOX "EmotionEngine (EE) Misc Hacks",IDC_STATIC,177,26,179,192
|
||||||
|
GROUPBOX "Vertex Unit (VU) Hacks",IDC_STATIC,363,26,173,173
|
||||||
|
CONTROL "Flag Hack 1 (microVU only)",IDC_VUHACK1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,372,42,155,12
|
||||||
|
CONTROL "Flag Hack 2 (microVU only)",IDC_VUHACK2,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,372,79,154,12
|
||||||
|
LTEXT "Big Speedup and moderately compatible. May cause SPS and Infinite loop problems.",IDC_STATIC,386,56,142,19
|
||||||
|
LTEXT "Big Speedup and moderately compatible. SuperVU does something similar by default.",IDC_STATIC,385,92,144,20
|
||||||
|
CONTROL "Min / Max Hack (microVU only)",IDC_VUHACK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,372,115,156,12
|
||||||
|
LTEXT "Small Speedup. May cause SPS, hanging, and missing geometry.",IDC_STATIC,386,130,143,19
|
||||||
END
|
END
|
||||||
|
|
||||||
|
|
||||||
|
@ -395,12 +403,15 @@ BEGIN
|
||||||
IDD_HACKS, DIALOG
|
IDD_HACKS, DIALOG
|
||||||
BEGIN
|
BEGIN
|
||||||
LEFTMARGIN, 7
|
LEFTMARGIN, 7
|
||||||
RIGHTMARGIN, 328
|
RIGHTMARGIN, 536
|
||||||
VERTGUIDE, 13
|
VERTGUIDE, 13
|
||||||
VERTGUIDE, 174
|
VERTGUIDE, 177
|
||||||
VERTGUIDE, 186
|
VERTGUIDE, 187
|
||||||
|
VERTGUIDE, 200
|
||||||
|
VERTGUIDE, 372
|
||||||
TOPMARGIN, 7
|
TOPMARGIN, 7
|
||||||
BOTTOMMARGIN, 256
|
BOTTOMMARGIN, 222
|
||||||
|
HORZGUIDE, 26
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
#endif // APSTUDIO_INVOKED
|
#endif // APSTUDIO_INVOKED
|
||||||
|
@ -834,12 +845,12 @@ FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||||
BEGIN
|
BEGIN
|
||||||
CONTROL "EERec - EE/IOP recompiler (need MMX/SSE/SSE2)",IDC_CPU_EEREC,
|
CONTROL "EERec - EE/IOP recompiler (need MMX/SSE/SSE2)",IDC_CPU_EEREC,
|
||||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,100,265,18
|
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,100,265,18
|
||||||
CONTROL "VU0rec - enable recompiler for VU0 unit",IDC_CPU_VU0REC,
|
CONTROL "VU0rec - Enable recompiler for VU0 unit.",IDC_CPU_VU0REC,
|
||||||
"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,14,127,219,18
|
"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,14,127,219,18
|
||||||
CONTROL "VU1rec - enable recompiler for VU1 unit",IDC_CPU_VU1REC,
|
CONTROL "VU1rec - Enable recompiler for VU1 unit.",IDC_CPU_VU1REC,
|
||||||
"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,14,143,214,18
|
"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,14,143,214,18
|
||||||
CONTROL "Multi threaded GS mode (MTGS)\n (faster on dual core/HT procs, requires pcsx2 restart)",IDC_CPU_GSMULTI,
|
CONTROL "Multi threaded GS mode (MTGS)\n (faster on dual core/HT procs, requires pcsx2 restart)",IDC_CPU_GSMULTI,
|
||||||
"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,7,166,231,30
|
"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,7,232,231,30
|
||||||
CONTROL "Normal - All frames are rendered as fast as possible.",IDC_CPU_FL_NORMAL,
|
CONTROL "Normal - All frames are rendered as fast as possible.",IDC_CPU_FL_NORMAL,
|
||||||
"Button",BS_AUTORADIOBUTTON | BS_MULTILINE | WS_GROUP,309,17,221,17
|
"Button",BS_AUTORADIOBUTTON | BS_MULTILINE | WS_GROUP,309,17,221,17
|
||||||
CONTROL "Limit - Force frames to normal speeds if too fast.\n (You can set a custom FPS limit below.)",IDC_CPU_FL_LIMIT,
|
CONTROL "Limit - Force frames to normal speeds if too fast.\n (You can set a custom FPS limit below.)",IDC_CPU_FL_LIMIT,
|
||||||
|
@ -855,7 +866,7 @@ BEGIN
|
||||||
LTEXT "",IDC_FAMILYINPUT,112,41,124,8
|
LTEXT "",IDC_FAMILYINPUT,112,41,124,8
|
||||||
LTEXT "",IDC_FEATURESINPUT,111,79,124,8
|
LTEXT "",IDC_FEATURESINPUT,111,79,124,8
|
||||||
LTEXT "",IDC_CPUSPEEDINPUT,111,61,124,8
|
LTEXT "",IDC_CPUSPEEDINPUT,111,61,124,8
|
||||||
GROUPBOX "VU Recompilers - All options are set by default",IDC_CPU_VUGROUP,7,119,265,46
|
GROUPBOX "VU Recompilers",IDC_CPU_VUGROUP,7,119,265,108
|
||||||
LTEXT "Features",IDC_FEATURESNAME,12,78,88,8
|
LTEXT "Features",IDC_FEATURESNAME,12,78,88,8
|
||||||
GROUPBOX "",IDC_STATIC,7,7,265,90
|
GROUPBOX "",IDC_STATIC,7,7,265,90
|
||||||
LTEXT "Custom FPS Limit (0=auto):",IDC_CUSTOM_FPS,327,103,124,12
|
LTEXT "Custom FPS Limit (0=auto):",IDC_CUSTOM_FPS,327,103,124,12
|
||||||
|
@ -871,6 +882,11 @@ BEGIN
|
||||||
EDITTEXT IDC_CUSTOM_CONSECUTIVE_SKIP,456,157,53,13,ES_AUTOHSCROLL | ES_NUMBER
|
EDITTEXT IDC_CUSTOM_CONSECUTIVE_SKIP,456,157,53,13,ES_AUTOHSCROLL | ES_NUMBER
|
||||||
LTEXT "Consecutive Frames to skip:\n(See Note 3)",IDC_FRAMESKIP_LABEL5,327,157,121,17
|
LTEXT "Consecutive Frames to skip:\n(See Note 3)",IDC_FRAMESKIP_LABEL5,327,157,121,17
|
||||||
LTEXT "*Note 3: Will skip this number of frames before\n rendering the next sequence of frames. (0=default)\n (e.g. If set to 2, will skip 2 consecutive frames whenever its time\n to skip.)",IDC_FRAMESKIP_LABEL6,318,234,217,32
|
LTEXT "*Note 3: Will skip this number of frames before\n rendering the next sequence of frames. (0=default)\n (e.g. If set to 2, will skip 2 consecutive frames whenever its time\n to skip.)",IDC_FRAMESKIP_LABEL6,318,234,217,32
|
||||||
|
GROUPBOX "Use microVU?",IDC_CPU_VUGROUP2,14,167,235,47
|
||||||
|
CONTROL "microVU0 - Use microVU rec for VU0 recompilation.",IDC_CPU_MVU0,
|
||||||
|
"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,24,180,215,13
|
||||||
|
CONTROL "microVU1 - Use microVU rec for VU1 recompilation.",IDC_CPU_MVU1,
|
||||||
|
"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,24,195,215,13
|
||||||
END
|
END
|
||||||
|
|
||||||
|
|
||||||
|
@ -894,6 +910,7 @@ BEGIN
|
||||||
BEGIN
|
BEGIN
|
||||||
LEFTMARGIN, 7
|
LEFTMARGIN, 7
|
||||||
RIGHTMARGIN, 558
|
RIGHTMARGIN, 558
|
||||||
|
VERTGUIDE, 24
|
||||||
TOPMARGIN, 7
|
TOPMARGIN, 7
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
|
|
|
@ -176,8 +176,8 @@
|
||||||
#define IDC_CPU_FL_NORMAL 1265
|
#define IDC_CPU_FL_NORMAL 1265
|
||||||
#define IDC_CPU_FL_LIMIT 1266
|
#define IDC_CPU_FL_LIMIT 1266
|
||||||
#define IDC_CPU_FL_SKIP 1267
|
#define IDC_CPU_FL_SKIP 1267
|
||||||
#define IDC_CPU_FL_SKIPVU 1268
|
|
||||||
#define IDC_CPU_VUGROUP 1269
|
#define IDC_CPU_VUGROUP 1269
|
||||||
|
#define IDC_CPU_VUGROUP2 1270
|
||||||
#define IDC_GROUPS 1272
|
#define IDC_GROUPS 1272
|
||||||
#define IDC_PATCHES 1273
|
#define IDC_PATCHES 1273
|
||||||
#define IDC_CUSTOMFPS 1275
|
#define IDC_CUSTOMFPS 1275
|
||||||
|
@ -275,7 +275,13 @@
|
||||||
#define IDC_SLIDER1 1327
|
#define IDC_SLIDER1 1327
|
||||||
#define IDC_VUCYCLE 1327
|
#define IDC_VUCYCLE 1327
|
||||||
#define IDC_VUCYCLEDESC 1328
|
#define IDC_VUCYCLEDESC 1328
|
||||||
|
#define IDC_VUHACK1 1329
|
||||||
#define IDC_IDLELOOPFF 1330
|
#define IDC_IDLELOOPFF 1330
|
||||||
|
#define IDC_VUHACK2 1331
|
||||||
|
#define IDC_INTCSTATHACK4 1332
|
||||||
|
#define IDC_VUHACK3 1332
|
||||||
|
#define IDC_CPU_MVU0 1335
|
||||||
|
#define IDC_CPU_MVU1 1336
|
||||||
#define IDC_CPULOG 1500
|
#define IDC_CPULOG 1500
|
||||||
#define IDC_MEMLOG 1501
|
#define IDC_MEMLOG 1501
|
||||||
#define IDC_HWLOG 1502
|
#define IDC_HWLOG 1502
|
||||||
|
|
|
@ -23,81 +23,42 @@
|
||||||
#include "VUmicro.h"
|
#include "VUmicro.h"
|
||||||
#include "iVUzerorec.h"
|
#include "iVUzerorec.h"
|
||||||
|
|
||||||
#ifndef PCSX2_MICROVU_
|
#define useMVU0 CHECK_MICROVU0
|
||||||
namespace VU0micro
|
|
||||||
{
|
|
||||||
void recAlloc()
|
|
||||||
{
|
|
||||||
SuperVUAlloc(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
void __fastcall recClear(u32 Addr, u32 Size)
|
|
||||||
{
|
|
||||||
SuperVUClear(Addr, Size, 0); // Size should be a multiple of 8 bytes!
|
|
||||||
}
|
|
||||||
|
|
||||||
void recShutdown()
|
|
||||||
{
|
|
||||||
SuperVUDestroy( 0 );
|
|
||||||
}
|
|
||||||
|
|
||||||
static void recReset()
|
|
||||||
{
|
|
||||||
SuperVUReset(0);
|
|
||||||
|
|
||||||
// this shouldn't be needed, but shouldn't hurt anything either.
|
|
||||||
x86FpuState = FPU_STATE;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void recStep()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
static void recExecuteBlock()
|
|
||||||
{
|
|
||||||
if((VU0.VI[REG_VPU_STAT].UL & 1) == 0)
|
|
||||||
return;
|
|
||||||
|
|
||||||
FreezeXMMRegs(1);
|
|
||||||
SuperVUExecuteProgram(VU0.VI[ REG_TPC ].UL & 0xfff, 0);
|
|
||||||
FreezeXMMRegs(0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
|
|
||||||
extern void initVUrec(VURegs* vuRegs, const int vuIndex);
|
|
||||||
extern void closeVUrec(const int vuIndex);
|
|
||||||
extern void resetVUrec(const int vuIndex);
|
|
||||||
extern void clearVUrec(u32 addr, u32 size, const int vuIndex);
|
|
||||||
extern void runVUrec(u32 startPC, u32 cycles, const int vuIndex);
|
|
||||||
|
|
||||||
namespace VU0micro
|
namespace VU0micro
|
||||||
{
|
{
|
||||||
void recAlloc() { initVUrec(&VU0, 0); }
|
void recAlloc() { initVUrec(&VU0, 0); SuperVUAlloc(0); }
|
||||||
void __fastcall recClear(u32 Addr, u32 Size) { clearVUrec(Addr, Size, 0); }
|
void recShutdown() { closeVUrec(0); SuperVUDestroy(0); }
|
||||||
void recShutdown() { closeVUrec(0); }
|
|
||||||
static void recReset() { resetVUrec(0); x86FpuState = FPU_STATE; }
|
void __fastcall recClear(u32 Addr, u32 Size) {
|
||||||
static void recStep() {}
|
if (useMVU0) clearVUrec(Addr, Size, 0);
|
||||||
static void recExecuteBlock()
|
else SuperVUClear(Addr, Size, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void recReset() {
|
||||||
|
if (useMVU0) resetVUrec(0);
|
||||||
|
else SuperVUReset(0);
|
||||||
|
x86FpuState = FPU_STATE;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void recStep() {}
|
||||||
|
static void recExecuteBlock()
|
||||||
{
|
{
|
||||||
if ((VU0.VI[REG_VPU_STAT].UL & 1) == 0) return;
|
if ((VU0.VI[REG_VPU_STAT].UL & 1) == 0) return;
|
||||||
|
|
||||||
FreezeXMMRegs(1);
|
FreezeXMMRegs(1);
|
||||||
//FreezeMMXRegs(1);
|
if (useMVU0) runVUrec(VU0.VI[REG_TPC].UL, 50000, 0);
|
||||||
runVUrec(VU0.VI[REG_TPC].UL, 50000, 0);
|
else SuperVUExecuteProgram(VU0.VI[REG_TPC].UL & 0xfff, 0);
|
||||||
//FreezeMMXRegs(0);
|
|
||||||
FreezeXMMRegs(0);
|
FreezeXMMRegs(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
using namespace VU0micro;
|
using namespace VU0micro;
|
||||||
|
|
||||||
const VUmicroCpu recVU0 =
|
const VUmicroCpu recVU0 =
|
||||||
{
|
{
|
||||||
recReset
|
recReset
|
||||||
, recStep
|
, recStep
|
||||||
, recExecuteBlock
|
, recExecuteBlock
|
||||||
, recClear
|
, recClear
|
||||||
};
|
};
|
||||||
|
|
|
@ -26,9 +26,7 @@
|
||||||
#include "VUmicro.h"
|
#include "VUmicro.h"
|
||||||
#include "iVUzerorec.h"
|
#include "iVUzerorec.h"
|
||||||
|
|
||||||
#ifdef _DEBUG
|
#define useMVU1 CHECK_MICROVU1
|
||||||
extern u32 vudump;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
int mVUdebugNow = 0;
|
int mVUdebugNow = 0;
|
||||||
|
|
||||||
|
@ -45,11 +43,8 @@ void VUtestPause() {
|
||||||
runAmount++;
|
runAmount++;
|
||||||
if (runAmount < 654) return;
|
if (runAmount < 654) return;
|
||||||
|
|
||||||
#ifndef PCSX2_MICROVU_
|
if (useMVU1) SysPrintf("Micro VU - Pass %d\n", runAmount);
|
||||||
SysPrintf("Super VU - Pass %d\n", runAmount);
|
else SysPrintf("Super VU - Pass %d\n", runAmount);
|
||||||
#else
|
|
||||||
SysPrintf("Micro VU - Pass %d\n", runAmount);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
for (int i = 0; i < 32; i++) {
|
for (int i = 0; i < 32; i++) {
|
||||||
SysPrintf("VF%02d = {%f, %f, %f, %f}\n", i, VU1.VF[i].F[0], VU1.VF[i].F[1], VU1.VF[i].F[2], VU1.VF[i].F[3]);
|
SysPrintf("VF%02d = {%f, %f, %f, %f}\n", i, VU1.VF[i].F[0], VU1.VF[i].F[1], VU1.VF[i].F[2], VU1.VF[i].F[3]);
|
||||||
|
@ -88,17 +83,15 @@ void VUtestPause() {
|
||||||
void VUtestPause() {}
|
void VUtestPause() {}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef _DEBUG
|
||||||
|
extern u32 vudump;
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef DEBUG_COMPARE2
|
#ifdef DEBUG_COMPARE2
|
||||||
|
|
||||||
#ifndef DEBUG_COMPARE
|
#ifndef DEBUG_COMPARE
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
extern void initVUrec(VURegs* vuRegs, const int vuIndex);
|
|
||||||
extern void closeVUrec(const int vuIndex);
|
|
||||||
extern void resetVUrec(const int vuIndex);
|
|
||||||
extern void clearVUrec(u32 addr, u32 size, const int vuIndex);
|
|
||||||
extern void runVUrec(u32 startPC, u32 cycles, const int vuIndex);
|
|
||||||
|
|
||||||
PCSX2_ALIGNED16(u8 backVUregs[sizeof(VURegs)]);
|
PCSX2_ALIGNED16(u8 backVUregs[sizeof(VURegs)]);
|
||||||
PCSX2_ALIGNED16(u8 cmpVUregs [sizeof(VURegs)]);
|
PCSX2_ALIGNED16(u8 cmpVUregs [sizeof(VURegs)]);
|
||||||
|
@ -253,21 +246,24 @@ namespace VU1micro
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
#ifdef PCSX2_MICROVU_
|
|
||||||
|
|
||||||
extern void initVUrec(VURegs* vuRegs, const int vuIndex);
|
|
||||||
extern void closeVUrec(const int vuIndex);
|
|
||||||
extern void resetVUrec(const int vuIndex);
|
|
||||||
extern void clearVUrec(u32 addr, u32 size, const int vuIndex);
|
|
||||||
extern void runVUrec(u32 startPC, u32 cycles, const int vuIndex);
|
|
||||||
|
|
||||||
namespace VU1micro
|
namespace VU1micro
|
||||||
{
|
{
|
||||||
void recAlloc() { initVUrec(&VU1, 1); }
|
void recAlloc() { initVUrec(&VU1, 1); SuperVUAlloc(1); }
|
||||||
void __fastcall recClear(u32 Addr, u32 Size) { clearVUrec(Addr, Size, 1); }
|
void recShutdown() { closeVUrec(1); SuperVUDestroy(1); }
|
||||||
void recShutdown() { closeVUrec(1); }
|
|
||||||
static void recReset() { resetVUrec(1); x86FpuState = FPU_STATE; }
|
void __fastcall recClear(u32 Addr, u32 Size) {
|
||||||
static void recStep() {}
|
if (useMVU1) clearVUrec(Addr, Size, 1);
|
||||||
|
else SuperVUClear(Addr, Size, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void recReset() {
|
||||||
|
if (useMVU1) resetVUrec(1);
|
||||||
|
else SuperVUReset(1);
|
||||||
|
x86FpuState = FPU_STATE;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void recStep() {}
|
||||||
static void recExecuteBlock() {
|
static void recExecuteBlock() {
|
||||||
|
|
||||||
if ((VU0.VI[REG_VPU_STAT].UL & 0x100) == 0) return;
|
if ((VU0.VI[REG_VPU_STAT].UL & 0x100) == 0) return;
|
||||||
|
@ -278,42 +274,19 @@ namespace VU1micro
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
FreezeXMMRegs(1);
|
FreezeXMMRegs(1);
|
||||||
//FreezeMMXRegs(1);
|
if (useMVU1) runVUrec(VU1.VI[REG_TPC].UL, 3000000, 1);
|
||||||
runVUrec(VU1.VI[REG_TPC].UL, 3000000 /*0x7fffffff*/, 1);
|
else {
|
||||||
//FreezeMMXRegs(0);
|
if (VU1.VI[REG_TPC].UL >= VU1.maxmicro) {
|
||||||
|
Console::Error("VU1 memory overflow!!: %x", params VU1.VI[REG_TPC].UL);
|
||||||
|
}
|
||||||
|
do { // while loop needed since not always will return finished
|
||||||
|
SuperVUExecuteProgram(VU1.VI[REG_TPC].UL & 0x3fff, 1);
|
||||||
|
} while( VU0.VI[REG_VPU_STAT].UL&0x100 );
|
||||||
|
}
|
||||||
FreezeXMMRegs(0);
|
FreezeXMMRegs(0);
|
||||||
|
|
||||||
VUtestPause();
|
VUtestPause();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
|
|
||||||
namespace VU1micro
|
|
||||||
{
|
|
||||||
void recAlloc() { SuperVUAlloc(1); }
|
|
||||||
void __fastcall recClear(u32 Addr, u32 Size) { SuperVUClear(Addr, Size, 1); }
|
|
||||||
void recShutdown() { SuperVUDestroy(1); }
|
|
||||||
static void recReset() { SuperVUReset(1); x86FpuState = FPU_STATE; }
|
|
||||||
static void recStep() {}
|
|
||||||
|
|
||||||
static void recExecuteBlock(void)
|
|
||||||
{
|
|
||||||
if((VU0.VI[REG_VPU_STAT].UL & 0x100) == 0) return;
|
|
||||||
if (VU1.VI[REG_TPC].UL >= VU1.maxmicro) { Console::Error("VU1 memory overflow!!: %x", params VU1.VI[REG_TPC].UL); }
|
|
||||||
assert((VU1.VI[ REG_TPC ].UL&7) == 0);
|
|
||||||
|
|
||||||
#ifdef DEBUG_COMPARE
|
|
||||||
SysPrintf("(%08d) StartPC = 0x%04x\n", runAmount, VU1.VI[REG_TPC].UL);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
FreezeXMMRegs(1);
|
|
||||||
do { // while loop needed since not always will return finished
|
|
||||||
SuperVUExecuteProgram(VU1.VI[ REG_TPC ].UL & 0x3fff, 1);
|
|
||||||
} while( VU0.VI[ REG_VPU_STAT ].UL&0x100 );
|
|
||||||
FreezeXMMRegs(0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
using namespace VU1micro;
|
using namespace VU1micro;
|
||||||
|
|
|
@ -20,7 +20,6 @@
|
||||||
|
|
||||||
#include "PrecompiledHeader.h"
|
#include "PrecompiledHeader.h"
|
||||||
#include "microVU.h"
|
#include "microVU.h"
|
||||||
#ifdef PCSX2_MICROVU
|
|
||||||
|
|
||||||
//------------------------------------------------------------------
|
//------------------------------------------------------------------
|
||||||
// Micro VU - Global Variables
|
// Micro VU - Global Variables
|
||||||
|
@ -193,7 +192,7 @@ microVUt(int) mVUfindLeastUsedProg() {
|
||||||
// frame-based decrementing system in combination with a program-execution-based incrementing
|
// frame-based decrementing system in combination with a program-execution-based incrementing
|
||||||
// system. In english: if last_used >= 2 it means the program has been used for the current
|
// system. In english: if last_used >= 2 it means the program has been used for the current
|
||||||
// or prev frame. if it's 0, the program hasn't been used for a while.
|
// or prev frame. if it's 0, the program hasn't been used for a while.
|
||||||
microVUt(void) __mVUvsyncUpdate() {
|
microVUt(void) mVUvsyncUpdate() {
|
||||||
|
|
||||||
microVU* mVU = mVUx;
|
microVU* mVU = mVUx;
|
||||||
if (mVU->prog.total < mVU->prog.max) return;
|
if (mVU->prog.total < mVU->prog.max) return;
|
||||||
|
@ -283,9 +282,7 @@ void runVUrec(u32 startPC, u32 cycles, const int vuIndex) {
|
||||||
else startVU1(startPC, cycles);
|
else startVU1(startPC, cycles);
|
||||||
}
|
}
|
||||||
|
|
||||||
void mVUvsyncUpdate() {
|
void vsyncVUrec(const int vuIndex) {
|
||||||
__mVUvsyncUpdate<0>();
|
if (!vuIndex) mVUvsyncUpdate<0>();
|
||||||
__mVUvsyncUpdate<1>();
|
else mVUvsyncUpdate<1>();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // PCSX2_MICROVU
|
|
||||||
|
|
|
@ -17,7 +17,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
#ifdef PCSX2_MICROVU
|
|
||||||
|
|
||||||
//------------------------------------------------------------------
|
//------------------------------------------------------------------
|
||||||
// Micro VU - Pass 2 Functions
|
// Micro VU - Pass 2 Functions
|
||||||
|
@ -769,5 +768,3 @@ microVUt(void) mVUallocVIb(int GPRreg, int _reg_) {
|
||||||
if (!_reg_ && (_fxf_ < 3)) { XOR32RtoR(GPRreg, GPRreg); } \
|
if (!_reg_ && (_fxf_ < 3)) { XOR32RtoR(GPRreg, GPRreg); } \
|
||||||
else { MOV32MtoR(GPRreg, (uptr)&mVU->regs->VF[_reg_].UL[0]); } \
|
else { MOV32MtoR(GPRreg, (uptr)&mVU->regs->VF[_reg_].UL[0]); } \
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif //PCSX2_MICROVU
|
|
||||||
|
|
|
@ -17,7 +17,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
#ifdef PCSX2_MICROVU
|
|
||||||
|
|
||||||
//------------------------------------------------------------------
|
//------------------------------------------------------------------
|
||||||
// Micro VU - Pass 1 Functions
|
// Micro VU - Pass 1 Functions
|
||||||
|
@ -384,5 +383,3 @@ microVUt(void) mVUanalyzeBranch2(int Is, int It) {
|
||||||
if (mVUregs.VI[Is] || mVUregs.VI[It] || mVUstall) { analyzeVIreg1(Is); analyzeVIreg1(It); }
|
if (mVUregs.VI[Is] || mVUregs.VI[It] || mVUstall) { analyzeVIreg1(Is); analyzeVIreg1(It); }
|
||||||
else { analyzeBranchVI(Is, _memReadIs); analyzeBranchVI(It, _memReadIt);}
|
else { analyzeBranchVI(Is, _memReadIs); analyzeBranchVI(It, _memReadIt);}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif //PCSX2_MICROVU
|
|
||||||
|
|
|
@ -17,7 +17,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
#ifdef PCSX2_MICROVU
|
|
||||||
|
|
||||||
//------------------------------------------------------------------
|
//------------------------------------------------------------------
|
||||||
// Helper Macros
|
// Helper Macros
|
||||||
|
@ -389,4 +388,3 @@ eBitTemination:
|
||||||
void* __fastcall mVUcompileVU0(u32 startPC, uptr pState) { return mVUcompile<0>(startPC, pState); }
|
void* __fastcall mVUcompileVU0(u32 startPC, uptr pState) { return mVUcompile<0>(startPC, pState); }
|
||||||
void* __fastcall mVUcompileVU1(u32 startPC, uptr pState) { return mVUcompile<1>(startPC, pState); }
|
void* __fastcall mVUcompileVU1(u32 startPC, uptr pState) { return mVUcompile<1>(startPC, pState); }
|
||||||
|
|
||||||
#endif //PCSX2_MICROVU
|
|
||||||
|
|
|
@ -17,7 +17,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
#ifdef PCSX2_MICROVU
|
|
||||||
|
|
||||||
//------------------------------------------------------------------
|
//------------------------------------------------------------------
|
||||||
// Dispatcher Functions
|
// Dispatcher Functions
|
||||||
|
@ -149,4 +148,3 @@ void* __fastcall mVUexecuteVU1(u32 startPC, u32 cycles) { return mVUexecute<1>(s
|
||||||
void __fastcall mVUcleanUpVU0() { mVUcleanUp<0>(); }
|
void __fastcall mVUcleanUpVU0() { mVUcleanUp<0>(); }
|
||||||
void __fastcall mVUcleanUpVU1() { mVUcleanUp<1>(); }
|
void __fastcall mVUcleanUpVU1() { mVUcleanUp<1>(); }
|
||||||
|
|
||||||
#endif //PCSX2_MICROVU
|
|
||||||
|
|
|
@ -17,7 +17,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
#ifdef PCSX2_MICROVU
|
|
||||||
|
|
||||||
// Sets FDIV Flags at the proper time
|
// Sets FDIV Flags at the proper time
|
||||||
microVUt(void) mVUdivSet() {
|
microVUt(void) mVUdivSet() {
|
||||||
|
@ -231,4 +230,3 @@ microVUt(void) mVUsetFlagInfo() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif //PCSX2_MICROVU
|
|
||||||
|
|
|
@ -17,7 +17,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
#ifdef PCSX2_MICROVU
|
|
||||||
|
|
||||||
// writes text directly to the microVU.txt, no newlines appended.
|
// writes text directly to the microVU.txt, no newlines appended.
|
||||||
microVUx(void) __mVULog(const char* fmt, ...) {
|
microVUx(void) __mVULog(const char* fmt, ...) {
|
||||||
|
@ -124,5 +123,3 @@ microVUt(void) __mVUdumpProgram(int progIndex) {
|
||||||
iPC = bPC;
|
iPC = bPC;
|
||||||
setCode();
|
setCode();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif //PCSX2_MICROVU
|
|
||||||
|
|
|
@ -17,7 +17,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
#ifdef PCSX2_MICROVU
|
|
||||||
|
|
||||||
//------------------------------------------------------------------
|
//------------------------------------------------------------------
|
||||||
// Micro VU Micromode Lower instructions
|
// Micro VU Micromode Lower instructions
|
||||||
|
@ -1258,4 +1257,3 @@ microVUf(void) mVU_JALR() {
|
||||||
pass3 { mVUlog("JALR vi%02d, [vi%02d]", _Ft_, _Fs_); }
|
pass3 { mVUlog("JALR vi%02d, [vi%02d]", _Ft_, _Fs_); }
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif //PCSX2_MICROVU
|
|
||||||
|
|
|
@ -290,10 +290,10 @@ declareAllVariables
|
||||||
#define mVUdumpProg 0&&
|
#define mVUdumpProg 0&&
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Speed Hacks (Set to 1 to turn On)
|
// Speed Hacks
|
||||||
#define CHECK_VU_FLAGHACK 0 // Status Flag Speed Hack (Can cause Infinite loops, SPS, etc...)
|
#define CHECK_VU_FLAGHACK1 (u32)Config.Hacks.vuFlagHack1 // (Can cause Infinite loops, SPS, etc...)
|
||||||
#define CHECK_VU_FLAGHACK2 0 // Status Flag Speed Hack (Can cause Infinite loops, SPS, etc...)
|
#define CHECK_VU_FLAGHACK2 (u32)Config.Hacks.vuFlagHack2 // (Can cause Infinite loops, SPS, etc...)
|
||||||
#define CHECK_VU_MINMAXHACK 0 // Min/Max Speed Hack (Can cause SPS, Black Screens, etc...)
|
#define CHECK_VU_MINMAXHACK (u32)Config.Hacks.vuMinMax // (Can cause SPS, Black Screens, etc...)
|
||||||
|
|
||||||
// Cache Limit Check
|
// Cache Limit Check
|
||||||
#define mVUcacheCheck(ptr, start, limit) { \
|
#define mVUcacheCheck(ptr, start, limit) { \
|
||||||
|
|
|
@ -17,7 +17,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
#ifdef PCSX2_MICROVU
|
|
||||||
|
|
||||||
//------------------------------------------------------------------
|
//------------------------------------------------------------------
|
||||||
// Micro VU - Clamp Functions
|
// Micro VU - Clamp Functions
|
||||||
|
@ -300,7 +299,7 @@ microVUt(void) mVUrestoreRegs() {
|
||||||
|
|
||||||
// Reads entire microProgram and finds out if Status Flag is Used
|
// Reads entire microProgram and finds out if Status Flag is Used
|
||||||
microVUt(void) mVUcheckSflag(int progIndex) {
|
microVUt(void) mVUcheckSflag(int progIndex) {
|
||||||
if (CHECK_VU_FLAGHACK) {
|
if (CHECK_VU_FLAGHACK1) {
|
||||||
microVU* mVU = mVUx;
|
microVU* mVU = mVUx;
|
||||||
int bFlagInfo = mVUflagInfo;
|
int bFlagInfo = mVUflagInfo;
|
||||||
int bCode = mVU->code;
|
int bCode = mVU->code;
|
||||||
|
@ -370,5 +369,3 @@ void SSE_MIN2SS_XMM_to_XMM(x86SSERegType to, x86SSERegType from) {
|
||||||
if (CHECK_VU_MINMAXHACK) { SSE_MINSS_XMM_to_XMM(to, from); }
|
if (CHECK_VU_MINMAXHACK) { SSE_MINSS_XMM_to_XMM(to, from); }
|
||||||
else { MIN_MAX_SS(to, from, 1); }
|
else { MIN_MAX_SS(to, from, 1); }
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif //PCSX2_MICROVU
|
|
||||||
|
|
|
@ -17,7 +17,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
#ifdef PCSX2_MICROVU
|
|
||||||
|
|
||||||
//------------------------------------------------------------------
|
//------------------------------------------------------------------
|
||||||
// Declarations
|
// Declarations
|
||||||
|
@ -265,4 +264,3 @@ microVUf(void) mVUunknown() {
|
||||||
pass3 { mVUlog("Unknown", mVUgetCode); }
|
pass3 { mVUlog("Unknown", mVUgetCode); }
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif //PCSX2_MICROVU
|
|
||||||
|
|
|
@ -17,7 +17,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
#ifdef PCSX2_MICROVU
|
|
||||||
|
|
||||||
//------------------------------------------------------------------
|
//------------------------------------------------------------------
|
||||||
// mVUupdateFlags() - Updates status/mac flags
|
// mVUupdateFlags() - Updates status/mac flags
|
||||||
|
@ -643,4 +642,4 @@ microVUf(void) mVU_CLIP() {
|
||||||
}
|
}
|
||||||
pass3 { mVUlog("CLIP"); mVUlogCLIP(); }
|
pass3 { mVUlog("CLIP"); mVUlogCLIP(); }
|
||||||
}
|
}
|
||||||
#endif //PCSX2_MICROVU
|
|
||||||
|
|
Loading…
Reference in New Issue