2012-12-19 09:30:18 +00:00
|
|
|
/****************************************************************************
|
|
|
|
* *
|
2015-11-10 05:21:49 +00:00
|
|
|
* Project64 - A Nintendo 64 emulator. *
|
2012-12-19 09:30:18 +00:00
|
|
|
* http://www.pj64-emu.com/ *
|
|
|
|
* Copyright (C) 2012 Project64. All rights reserved. *
|
|
|
|
* *
|
|
|
|
* License: *
|
|
|
|
* GNU/GPLv2 http://www.gnu.org/licenses/gpl-2.0.html *
|
|
|
|
* *
|
|
|
|
****************************************************************************/
|
2010-06-07 02:23:58 +00:00
|
|
|
#include "stdafx.h"
|
2015-09-07 19:47:44 +00:00
|
|
|
|
2015-12-04 06:49:31 +00:00
|
|
|
#include "SettingsPage.h"
|
|
|
|
#include "SettingsPage-Game-Recompiler.h"
|
2008-09-18 03:15:49 +00:00
|
|
|
|
2015-11-07 01:11:25 +00:00
|
|
|
CGameRecompilePage::CGameRecompilePage(HWND hParent, const RECT & rcDispay)
|
2008-09-18 03:15:49 +00:00
|
|
|
{
|
2015-12-23 19:59:14 +00:00
|
|
|
if (!Create(hParent, rcDispay))
|
|
|
|
{
|
|
|
|
return;
|
|
|
|
}
|
2008-11-14 20:51:06 +00:00
|
|
|
|
2015-12-23 19:59:14 +00:00
|
|
|
//Set the text for all gui Items
|
2015-12-23 20:04:36 +00:00
|
|
|
SetDlgItemTextW(m_hWnd, IDC_CPU_TYPE_TEXT, wGS(ROM_CPU_STYLE).c_str());
|
|
|
|
SetDlgItemTextW(m_hWnd, IDC_FUNCFIND_TEXT, wGS(ROM_FUNC_FIND).c_str());
|
2015-03-20 18:36:29 +00:00
|
|
|
|
2015-12-23 20:04:36 +00:00
|
|
|
SetDlgItemTextW(m_hWnd, IDC_ROM_REGCACHE, wGS(ROM_REG_CACHE).c_str());
|
|
|
|
SetDlgItemTextW(m_hWnd, IDC_BLOCK_LINKING, wGS(ADVANCE_ABL).c_str());
|
|
|
|
SetDlgItemTextW(m_hWnd, IDC_ROM_FASTSP, wGS(ROM_FAST_SP).c_str());
|
2015-03-17 02:56:53 +00:00
|
|
|
|
2015-12-23 20:04:36 +00:00
|
|
|
SetDlgItemTextW(m_hWnd, IDC_SMM_FRAME, wGS(ADVANCE_SMCM).c_str());
|
|
|
|
SetDlgItemTextW(m_hWnd, IDC_SMM_CACHE, wGS(ADVANCE_SMM_CACHE).c_str());
|
|
|
|
SetDlgItemTextW(m_hWnd, IDC_SMM_DMA, wGS(ADVANCE_SMM_PIDMA).c_str());
|
|
|
|
SetDlgItemTextW(m_hWnd, IDC_SMM_VALIDATE, wGS(ADVANCE_SMM_VALIDATE).c_str());
|
|
|
|
SetDlgItemTextW(m_hWnd, IDC_SMM_TLB, wGS(ADVANCE_SMM_TLB).c_str());
|
|
|
|
SetDlgItemTextW(m_hWnd, IDC_SMM_PROTECT, wGS(ADVANCE_SMM_PROTECT).c_str());
|
2015-03-17 02:56:53 +00:00
|
|
|
|
2015-12-23 19:59:14 +00:00
|
|
|
m_SelfModGroup.Attach(GetDlgItem(IDC_SMM_FRAME));
|
2008-11-14 20:51:06 +00:00
|
|
|
|
2015-12-23 19:59:14 +00:00
|
|
|
AddModCheckBox(GetDlgItem(IDC_ROM_REGCACHE), Game_RegCache);
|
|
|
|
AddModCheckBox(GetDlgItem(IDC_BLOCK_LINKING), Game_BlockLinking);
|
|
|
|
AddModCheckBox(GetDlgItem(IDC_SMM_CACHE), Game_SMM_Cache);
|
|
|
|
AddModCheckBox(GetDlgItem(IDC_SMM_DMA), Game_SMM_PIDMA);
|
|
|
|
AddModCheckBox(GetDlgItem(IDC_SMM_VALIDATE), Game_SMM_ValidFunc);
|
|
|
|
AddModCheckBox(GetDlgItem(IDC_SMM_TLB), Game_SMM_TLB);
|
|
|
|
AddModCheckBox(GetDlgItem(IDC_SMM_PROTECT), Game_SMM_Protect);
|
|
|
|
::ShowWindow(GetDlgItem(IDC_SMM_STORE), SW_HIDE);
|
|
|
|
//AddModCheckBox(GetDlgItem(IDC_SMM_STORE),Game_SMM_StoreInstruc);
|
|
|
|
AddModCheckBox(GetDlgItem(IDC_ROM_FASTSP), Game_FastSP);
|
2008-11-14 20:51:06 +00:00
|
|
|
|
2015-12-23 19:59:14 +00:00
|
|
|
CModifiedComboBox * ComboBox;
|
|
|
|
ComboBox = AddModComboBox(GetDlgItem(IDC_CPU_TYPE), Game_CpuType);
|
|
|
|
if (ComboBox)
|
|
|
|
{
|
2015-12-23 20:04:36 +00:00
|
|
|
ComboBox->AddItemW(wGS(CORE_RECOMPILER).c_str(), CPU_Recompiler);
|
|
|
|
ComboBox->AddItemW(wGS(CORE_INTERPTER).c_str(), CPU_Interpreter);
|
2015-12-23 19:59:14 +00:00
|
|
|
if (g_Settings->LoadBool(Debugger_Enabled))
|
|
|
|
{
|
2015-12-23 20:04:36 +00:00
|
|
|
ComboBox->AddItemW(wGS(CORE_SYNC).c_str(), CPU_SyncCores);
|
2015-12-23 19:59:14 +00:00
|
|
|
}
|
|
|
|
}
|
2008-11-14 20:51:06 +00:00
|
|
|
|
2015-12-23 19:59:14 +00:00
|
|
|
ComboBox = AddModComboBox(GetDlgItem(IDC_FUNCFIND), Game_FuncLookupMode);
|
|
|
|
if (ComboBox)
|
|
|
|
{
|
2015-12-23 20:04:36 +00:00
|
|
|
ComboBox->AddItemW(wGS(FLM_PLOOKUP).c_str(), FuncFind_PhysicalLookup);
|
|
|
|
ComboBox->AddItemW(wGS(FLM_VLOOKUP).c_str(), FuncFind_VirtualLookup);
|
|
|
|
//ComboBox->AddItem(wGS(FLM_CHANGEMEM).c_str(), FuncFind_ChangeMemory);
|
2015-12-23 19:59:14 +00:00
|
|
|
}
|
|
|
|
UpdatePageSettings();
|
2008-09-18 03:15:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void CGameRecompilePage::ShowPage()
|
|
|
|
{
|
2015-12-23 19:59:14 +00:00
|
|
|
ShowWindow(SW_SHOW);
|
2008-09-18 03:15:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void CGameRecompilePage::HidePage()
|
|
|
|
{
|
2015-12-23 19:59:14 +00:00
|
|
|
ShowWindow(SW_HIDE);
|
2008-11-14 20:51:06 +00:00
|
|
|
}
|
|
|
|
|
2015-11-07 01:11:25 +00:00
|
|
|
void CGameRecompilePage::ApplySettings(bool UpdateScreen)
|
2008-11-14 20:51:06 +00:00
|
|
|
{
|
2015-12-23 19:59:14 +00:00
|
|
|
CSettingsPageImpl<CGameRecompilePage>::ApplySettings(UpdateScreen);
|
2008-11-14 20:51:06 +00:00
|
|
|
}
|
|
|
|
|
2015-11-07 01:11:25 +00:00
|
|
|
bool CGameRecompilePage::EnableReset(void)
|
2008-11-14 20:51:06 +00:00
|
|
|
{
|
2015-12-23 19:59:14 +00:00
|
|
|
if (CSettingsPageImpl<CGameRecompilePage>::EnableReset()) { return true; }
|
|
|
|
return false;
|
2008-11-14 20:51:06 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void CGameRecompilePage::ResetPage()
|
|
|
|
{
|
2015-12-23 19:59:14 +00:00
|
|
|
CSettingsPageImpl<CGameRecompilePage>::ResetPage();
|
|
|
|
}
|