winport: add "Fast Fetch-Execute" to the menu, since r2844 brought some emulation glitches.

This commit is contained in:
gocha 2009-09-08 15:48:13 +00:00
parent b7a55e65e8
commit 6769ec30ac
4 changed files with 14 additions and 4 deletions

View File

@ -495,6 +495,7 @@ armcpu_flagIrq( armcpu_t *armcpu) {
}
bool fastFetchExecute = true;
template<int PROCNUM>
u32 armcpu_exec()
{
@ -521,7 +522,7 @@ u32 armcpu_exec()
cFetch = armcpu_prefetch(&ARMPROC);
if (ARMPROC.stalled) {
return std::max(cFetch, cExecute);
return fastFetchExecute ? std::max(cFetch, cExecute) : (cFetch + cExecute);
}
#endif
@ -553,7 +554,7 @@ u32 armcpu_exec()
#else
cFetch = armcpu_prefetch<PROCNUM>();
#endif
return std::max(cFetch, cExecute);
return fastFetchExecute ? std::max(cFetch, cExecute) : (cFetch + cExecute);
}
if(PROCNUM==0)
@ -569,7 +570,7 @@ u32 armcpu_exec()
#else
cFetch = armcpu_prefetch<PROCNUM>();
#endif
return std::max(cFetch, cExecute);
return fastFetchExecute ? std::max(cFetch, cExecute) : (cFetch + cExecute);
}
//these templates needed to be instantiated manually

View File

@ -219,6 +219,8 @@ static bool lostFocusPause = true;
static bool lastPauseFromLostFocus = false;
static bool FrameLimit = true;
extern bool fastFetchExecute; // from armcpu.cpp
std::vector<HWND> LuaScriptHWnds;
LRESULT CALLBACK LuaScriptProc(HWND, UINT, WPARAM, LPARAM);
@ -3050,6 +3052,8 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM
//Gray the recent ROM menu item if there are no recent ROMs
DesEnableMenuItem(mainMenu, ID_FILE_RECENTROM, RecentRoms.size()>0);
DesEnableMenuItem(mainMenu, IDC_FASTFETCHEXECUTE, movieMode == MOVIEMODE_INACTIVE);
//Updated Checked menu items
//Pause
@ -3121,8 +3125,8 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM
MainWindow->checkMenu(IDC_STATEREWINDING, staterewindingenabled == 1 );
//Language selection
MainWindow->checkMenu(IDC_BACKGROUNDPAUSE, lostFocusPause);
MainWindow->checkMenu(IDC_FASTFETCHEXECUTE, fastFetchExecute);
//Save type
const int savelist[] = {IDC_SAVETYPE1,IDC_SAVETYPE2,IDC_SAVETYPE3,IDC_SAVETYPE4,IDC_SAVETYPE5,IDC_SAVETYPE6,IDC_SAVETYPE7};
@ -4096,6 +4100,10 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM
WritePrivateProfileInt("Focus", "BackgroundPause", (int)lostFocusPause, IniName);
return 0;
case IDC_FASTFETCHEXECUTE:
fastFetchExecute = !fastFetchExecute;
return 0;
case IDC_SAVETYPE1: backup_setManualBackupType(0); return 0;
case IDC_SAVETYPE2: backup_setManualBackupType(1); return 0;
case IDC_SAVETYPE3: backup_setManualBackupType(2); return 0;

View File

@ -812,6 +812,7 @@
#define IDC_HKCOMBO 60077
#define IDD_KEYCUSTOM 60078
#define IDM_HOTKEY_CONFIG 60079
#define IDC_FASTFETCHEXECUTE 60080
// Next default values for new objects
//

Binary file not shown.