Dedicate Wii SD Card & Wii USB Keybaord settings
When they are disabled, you get over 50% speed boost in Wii Menu. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4804 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
345f922549
commit
98ce4c4d8f
|
@ -123,6 +123,8 @@ void SConfig::SaveSettings()
|
|||
ini.Set("Core", sidevicenum, m_SIDevice[i]);
|
||||
}
|
||||
|
||||
ini.Set("Core", "WiiSDCard", m_WiiSDCard);
|
||||
ini.Set("Core", "WiiKeyboard", m_WiiKeyboard);
|
||||
ini.Set("Core", "RunCompareServer", m_LocalCoreStartupParameter.bRunCompareServer);
|
||||
ini.Set("Core", "RunCompareClient", m_LocalCoreStartupParameter.bRunCompareClient);
|
||||
ini.Set("Core", "FrameLimit", m_Framelimit);
|
||||
|
@ -131,7 +133,7 @@ void SConfig::SaveSettings()
|
|||
ini.Set("Core", "GFXPlugin", m_LocalCoreStartupParameter.m_strVideoPlugin);
|
||||
ini.Set("Core", "DSPPlugin", m_LocalCoreStartupParameter.m_strDSPPlugin);
|
||||
ini.Set("Core", "PadPlugin", m_LocalCoreStartupParameter.m_strPadPlugin[0]);
|
||||
ini.Set("Core", "WiiMote1Plugin",m_LocalCoreStartupParameter.m_strWiimotePlugin[0]);
|
||||
ini.Set("Core", "WiiMotePlugin",m_LocalCoreStartupParameter.m_strWiimotePlugin[0]);
|
||||
}
|
||||
|
||||
#if defined(__APPLE__)
|
||||
|
@ -239,6 +241,8 @@ void SConfig::LoadSettings()
|
|||
ini.Get("Core", sidevicenum, (u32*)&m_SIDevice[i], i==0 ? SI_GC_CONTROLLER:SI_NONE);
|
||||
}
|
||||
|
||||
ini.Get("Core", "WiiSDCard", &m_WiiSDCard, false);
|
||||
ini.Get("Core", "WiiKeyboard", &m_WiiKeyboard, false);
|
||||
ini.Get("Core", "RunCompareServer", &m_LocalCoreStartupParameter.bRunCompareServer, false);
|
||||
ini.Get("Core", "RunCompareClient", &m_LocalCoreStartupParameter.bRunCompareClient, false);
|
||||
ini.Get("Core", "TLBHack", &m_LocalCoreStartupParameter.iTLBHack, 0);
|
||||
|
@ -248,7 +252,7 @@ void SConfig::LoadSettings()
|
|||
ini.Get("Core", "GFXPlugin", &m_LocalCoreStartupParameter.m_strVideoPlugin, m_DefaultGFXPlugin.c_str());
|
||||
ini.Get("Core", "DSPPlugin", &m_LocalCoreStartupParameter.m_strDSPPlugin, m_DefaultDSPPlugin.c_str());
|
||||
ini.Get("Core", "PadPlugin", &m_LocalCoreStartupParameter.m_strPadPlugin[0], m_DefaultPADPlugin.c_str());
|
||||
ini.Get("Core", "WiiMote1Plugin", &m_LocalCoreStartupParameter.m_strWiimotePlugin[0], m_DefaultWiiMotePlugin.c_str());
|
||||
ini.Get("Core", "WiiMotePlugin", &m_LocalCoreStartupParameter.m_strWiimotePlugin[0], m_DefaultWiiMotePlugin.c_str());
|
||||
}
|
||||
|
||||
m_SYSCONF = new SysConf();
|
||||
|
|
|
@ -41,6 +41,10 @@ enum INTERFACE_LANGUAGE
|
|||
|
||||
struct SConfig
|
||||
{
|
||||
// Wii Devices
|
||||
bool m_WiiSDCard;
|
||||
bool m_WiiKeyboard;
|
||||
|
||||
// DSP HLE Audio fix
|
||||
bool m_EnableRE0Fix;
|
||||
|
||||
|
|
|
@ -715,7 +715,7 @@ void UpdateParameters()
|
|||
switch (m_DisplayControlRegister.FMT)
|
||||
{
|
||||
case 0: // NTSC
|
||||
case 2: // PAL-M // AyuanX: LineCount doesn't look right for PAL-M
|
||||
case 2: // PAL-M
|
||||
TargetRefreshRate = NTSC_FIELD_RATE;
|
||||
TicksPerFrame = SystemTimers::GetTicksPerSecond() / NTSC_FIELD_RATE;
|
||||
s_lineCount = m_DisplayControlRegister.NIN ? NTSC_LINE_COUNT : (NTSC_LINE_COUNT+1)/2;
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#include "Common.h"
|
||||
#include "../ConfigManager.h"
|
||||
|
||||
#include "SDCardUtil.h"
|
||||
|
||||
|
@ -28,7 +29,7 @@
|
|||
CWII_IPC_HLE_Device_sdio_slot0::CWII_IPC_HLE_Device_sdio_slot0(u32 _DeviceID, const std::string& _rDeviceName)
|
||||
: IWII_IPC_HLE_Device(_DeviceID, _rDeviceName)
|
||||
, m_Card(NULL)
|
||||
, m_Status(CARD_INSERTED)
|
||||
, m_Status(CARD_NOT_EXIST)
|
||||
, m_BlockLength(0)
|
||||
, m_BusWidth(0)
|
||||
{}
|
||||
|
@ -165,6 +166,10 @@ bool CWII_IPC_HLE_Device_sdio_slot0::IOCtl(u32 _CommandAddress)
|
|||
break;
|
||||
|
||||
case IOCTL_GETSTATUS:
|
||||
if (SConfig::GetInstance().m_WiiSDCard)
|
||||
m_Status |= CARD_INSERTED;
|
||||
else
|
||||
m_Status = CARD_NOT_EXIST;
|
||||
INFO_LOG(WII_IPC_SD, "IOCTL_GETSTATUS. Replying that SD card is %s%s",
|
||||
(m_Status & CARD_INSERTED) ? "inserted" : "not exitsting",
|
||||
(m_Status & CARD_INITIALIZED) ? " and initialized" : "");
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#include "../ConfigManager.h"
|
||||
#include "../Core.h" // Local core functions
|
||||
#include "WII_IPC_HLE_Device_usb.h"
|
||||
#include "WII_IPC_HLE_Device_usb_kbd.h"
|
||||
|
@ -29,8 +30,7 @@ CWII_IPC_HLE_Device_usb_kbd::~CWII_IPC_HLE_Device_usb_kbd()
|
|||
|
||||
bool CWII_IPC_HLE_Device_usb_kbd::Open(u32 _CommandAddress, u32 _Mode)
|
||||
{
|
||||
Memory::Write_U32(GetDeviceID(), _CommandAddress+4);
|
||||
|
||||
INFO_LOG(WII_IPC_STM, "CWII_IPC_HLE_Device_usb_kbd: Open");
|
||||
IniFile ini;
|
||||
ini.Load(CONFIG_FILE);
|
||||
ini.Get("USB Keyboard", "Layout", &m_KeyboardLayout, KBD_LAYOUT_QWERTY);
|
||||
|
@ -39,7 +39,8 @@ bool CWII_IPC_HLE_Device_usb_kbd::Open(u32 _CommandAddress, u32 _Mode)
|
|||
m_OldKeyBuffer[i] = false;
|
||||
m_OldModifiers = 0x00;
|
||||
|
||||
m_MessageQueue.push(SMessageData(MSG_KBD_CONNECT, 0, NULL));
|
||||
//m_MessageQueue.push(SMessageData(MSG_KBD_CONNECT, 0, NULL));
|
||||
Memory::Write_U32(m_DeviceID, _CommandAddress+4);
|
||||
m_Active = true;
|
||||
return true;
|
||||
}
|
||||
|
@ -47,6 +48,8 @@ bool CWII_IPC_HLE_Device_usb_kbd::Open(u32 _CommandAddress, u32 _Mode)
|
|||
bool CWII_IPC_HLE_Device_usb_kbd::Close(u32 _CommandAddress, bool _bForce)
|
||||
{
|
||||
INFO_LOG(WII_IPC_STM, "CWII_IPC_HLE_Device_usb_kbd: Close");
|
||||
while (!m_MessageQueue.empty())
|
||||
m_MessageQueue.pop();
|
||||
if (!_bForce)
|
||||
Memory::Write_U32(0, _CommandAddress + 4);
|
||||
m_Active = false;
|
||||
|
@ -55,8 +58,10 @@ bool CWII_IPC_HLE_Device_usb_kbd::Close(u32 _CommandAddress, bool _bForce)
|
|||
|
||||
bool CWII_IPC_HLE_Device_usb_kbd::Write(u32 _CommandAddress)
|
||||
{
|
||||
WARN_LOG(WII_IPC_STM, "Ignoring write to CWII_IPC_HLE_Device_usb_kbd");
|
||||
INFO_LOG(WII_IPC_STM, "Ignoring write to CWII_IPC_HLE_Device_usb_kbd");
|
||||
#if defined(_DEBUG) || defined(DEBUGFAST)
|
||||
DumpCommands(_CommandAddress, 10, LogTypes::WII_IPC_STM, LogTypes::LDEBUG);
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -68,7 +73,7 @@ bool CWII_IPC_HLE_Device_usb_kbd::IOCtl(u32 _CommandAddress)
|
|||
u32 BufferOut = Memory::Read_U32(_CommandAddress + 0x18);
|
||||
u32 BufferOutSize = Memory::Read_U32(_CommandAddress + 0x1C);
|
||||
|
||||
if (!m_MessageQueue.empty())
|
||||
if (SConfig::GetInstance().m_WiiKeyboard && !m_MessageQueue.empty())
|
||||
{
|
||||
*(SMessageData*)Memory::GetPointer(BufferOut) = m_MessageQueue.front();
|
||||
m_MessageQueue.pop();
|
||||
|
@ -93,6 +98,9 @@ bool CWII_IPC_HLE_Device_usb_kbd::IsKeyPressed(int _Key)
|
|||
|
||||
u32 CWII_IPC_HLE_Device_usb_kbd::Update()
|
||||
{
|
||||
if (!SConfig::GetInstance().m_WiiKeyboard || !m_Active)
|
||||
return false;
|
||||
|
||||
u8 Modifiers = 0x00;
|
||||
u8 PressedKeys[6] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
|
||||
bool GotEvent = false;
|
||||
|
|
|
@ -88,6 +88,8 @@ EVT_CHECKBOX(ID_WII_IPL_PGS, CConfigMain::WiiSettingsChanged)
|
|||
EVT_CHECKBOX(ID_WII_IPL_E60, CConfigMain::WiiSettingsChanged)
|
||||
EVT_CHOICE(ID_WII_IPL_AR, CConfigMain::WiiSettingsChanged)
|
||||
EVT_CHOICE(ID_WII_IPL_LNG, CConfigMain::WiiSettingsChanged)
|
||||
EVT_CHECKBOX(ID_WII_SD_CARD, CConfigMain::WiiSettingsChanged)
|
||||
EVT_CHECKBOX(ID_WII_KEYBOARD, CConfigMain::WiiSettingsChanged)
|
||||
|
||||
EVT_LISTBOX(ID_ISOPATHS, CConfigMain::ISOPathsSelectionChanged)
|
||||
EVT_BUTTON(ID_ADDISOPATH, CConfigMain::AddRemoveISOPaths)
|
||||
|
@ -146,7 +148,12 @@ void CConfigMain::UpdateGUI()
|
|||
|
||||
GCSystemLang->Disable();
|
||||
|
||||
WiiPage->Disable();
|
||||
WiiSensBarPos->Disable();
|
||||
WiiScreenSaver->Disable();
|
||||
WiiProgressiveScan->Disable();
|
||||
WiiEuRGB60->Disable();
|
||||
WiiAspectRatio->Disable();
|
||||
WiiSystemLang->Disable();
|
||||
|
||||
PathsPage->Disable();
|
||||
|
||||
|
@ -478,6 +485,15 @@ void CConfigMain::CreateGUIControls()
|
|||
WiiSystemLang = new wxChoice(WiiPage, ID_WII_IPL_LNG, wxDefaultPosition, wxDefaultSize, arrayStringFor_WiiSystemLang, 0, wxDefaultValidator);
|
||||
WiiSystemLang->SetSelection(SConfig::GetInstance().m_SYSCONF->GetData<u8>("IPL.LNG"));
|
||||
|
||||
// Devices
|
||||
sbWiiDeviceSettings = new wxStaticBoxSizer(wxVERTICAL, WiiPage, wxT("Device Settings"));
|
||||
|
||||
WiiSDCard = new wxCheckBox(WiiPage, ID_WII_SD_CARD, wxT("Insert SD Card"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||
WiiSDCard->SetValue(SConfig::GetInstance().m_WiiSDCard);
|
||||
WiiKeyboard = new wxCheckBox(WiiPage, ID_WII_KEYBOARD, wxT("Connect USB Keyboard"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||
WiiKeyboard->SetToolTip(wxT("This could cause slow down in Wii Menu and some games."));
|
||||
WiiKeyboard->SetValue(SConfig::GetInstance().m_WiiKeyboard);
|
||||
|
||||
// Populate sbWiimoteSettings
|
||||
sWii = new wxBoxSizer(wxVERTICAL);
|
||||
sWiimoteSettings = new wxGridBagSizer(0, 0);
|
||||
|
@ -496,6 +512,10 @@ void CConfigMain::CreateGUIControls()
|
|||
sWiiIPLSettings->Add(WiiSystemLang, wxGBPosition(4, 1), wxGBSpan(1, 1), wxALL, 5);
|
||||
sbWiiIPLSettings->Add(sWiiIPLSettings);
|
||||
sWii->Add(sbWiiIPLSettings, 0, wxEXPAND|wxALL, 5);
|
||||
|
||||
sbWiiDeviceSettings->Add(WiiSDCard, 0, wxALL, 5);
|
||||
sbWiiDeviceSettings->Add(WiiKeyboard, 0, wxALL, 5);
|
||||
sWii->Add(sbWiiDeviceSettings, 0, wxEXPAND|wxALL, 5);
|
||||
WiiPage->SetSizer(sWii);
|
||||
sWii->Layout();
|
||||
|
||||
|
@ -859,6 +879,12 @@ void CConfigMain::WiiSettingsChanged(wxCommandEvent& event)
|
|||
case ID_WII_IPL_E60:
|
||||
SConfig::GetInstance().m_SYSCONF->SetData("IPL.E60", WiiEuRGB60->IsChecked());
|
||||
break;
|
||||
case ID_WII_SD_CARD:
|
||||
SConfig::GetInstance().m_WiiSDCard = WiiSDCard->IsChecked();
|
||||
break;
|
||||
case ID_WII_KEYBOARD:
|
||||
SConfig::GetInstance().m_WiiKeyboard = WiiKeyboard->IsChecked();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -87,6 +87,7 @@ private:
|
|||
wxGridBagSizer* sWiimoteSettings;
|
||||
wxStaticBoxSizer* sbWiiIPLSettings;
|
||||
wxGridBagSizer* sWiiIPLSettings;
|
||||
wxStaticBoxSizer* sbWiiDeviceSettings;
|
||||
wxBoxSizer* sPaths;
|
||||
wxStaticBoxSizer* sbISOPaths;
|
||||
wxBoxSizer* sISOButtons;
|
||||
|
@ -121,6 +122,8 @@ private:
|
|||
wxArrayString arrayStringFor_WiiSystemLang;
|
||||
wxStaticText* WiiSystemLangText;
|
||||
wxChoice* WiiSystemLang;
|
||||
wxCheckBox* WiiSDCard;
|
||||
wxCheckBox* WiiKeyboard;
|
||||
|
||||
wxArrayString arrayStringFor_ISOPaths;
|
||||
wxListBox* ISOPaths;
|
||||
|
@ -199,6 +202,8 @@ private:
|
|||
ID_WII_IPL_AR,
|
||||
ID_WII_IPL_LNG_TEXT,
|
||||
ID_WII_IPL_LNG,
|
||||
ID_WII_SD_CARD,
|
||||
ID_WII_KEYBOARD,
|
||||
|
||||
ID_ISOPATHS,
|
||||
ID_ADDISOPATH,
|
||||
|
|
Loading…
Reference in New Issue