Fixed channel loading from the System Menu. Also gave the menu a speed up by increasing the IPC_HLE_PERIOD.
After launching a channel, the wiimote has to be disconnected and reconnected for it to work. The same also has to be done when returning back to the menu. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6202 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
5c4c8ec07a
commit
4ec8f97154
|
@ -173,8 +173,10 @@ void AudioDMACallback(u64 userdata, int cyclesLate)
|
||||||
void IPC_HLE_UpdateCallback(u64 userdata, int cyclesLate)
|
void IPC_HLE_UpdateCallback(u64 userdata, int cyclesLate)
|
||||||
{
|
{
|
||||||
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bWii)
|
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bWii)
|
||||||
|
{
|
||||||
WII_IPC_HLE_Interface::Update();
|
WII_IPC_HLE_Interface::Update();
|
||||||
CoreTiming::ScheduleEvent(IPC_HLE_PERIOD - cyclesLate, et_IPC_HLE);
|
CoreTiming::ScheduleEvent(IPC_HLE_PERIOD - cyclesLate, et_IPC_HLE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void VICallback(u64 userdata, int cyclesLate)
|
void VICallback(u64 userdata, int cyclesLate)
|
||||||
|
@ -255,12 +257,12 @@ void Init()
|
||||||
DSP_PERIOD = (int)(GetTicksPerSecond() * 0.003f);
|
DSP_PERIOD = (int)(GetTicksPerSecond() * 0.003f);
|
||||||
|
|
||||||
// AyuanX: TO BE TWEAKED
|
// AyuanX: TO BE TWEAKED
|
||||||
// Now the 15000 is a pure assumption
|
// Now the 1500 is a pure assumption
|
||||||
// We need to figure out the real frequency though
|
// We need to figure out the real frequency though
|
||||||
// PS: When this period is tweaked, the FreqDividerMote
|
// PS: When this period is tweaked, the FreqDividerMote
|
||||||
// in WII_IPC_HLE_Device_usb.cpp should also be tweaked accordingly
|
// in WII_IPC_HLE_Device_usb.cpp should also be tweaked accordingly
|
||||||
// to guarantee WiiMote updates at a fixed 100Hz
|
// to guarantee WiiMote updates at a fixed 100Hz
|
||||||
IPC_HLE_PERIOD = GetTicksPerSecond() / 15000;
|
IPC_HLE_PERIOD = GetTicksPerSecond() / 1500;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -137,6 +137,7 @@ void SetDefaultContentFile(const std::string& _rFilename)
|
||||||
if (pDevice)
|
if (pDevice)
|
||||||
pDevice->LoadWAD(_rFilename);
|
pDevice->LoadWAD(_rFilename);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ES_DIVerify(u8 *_pTMD, u32 _sz)
|
void ES_DIVerify(u8 *_pTMD, u32 _sz)
|
||||||
{
|
{
|
||||||
CWII_IPC_HLE_Device_es* pDevice = (CWII_IPC_HLE_Device_es*)AccessDeviceByID(GetDeviceIDByName(std::string("/dev/es")));
|
CWII_IPC_HLE_Device_es* pDevice = (CWII_IPC_HLE_Device_es*)AccessDeviceByID(GetDeviceIDByName(std::string("/dev/es")));
|
||||||
|
@ -448,14 +449,6 @@ void Update()
|
||||||
|
|
||||||
UpdateDevices();
|
UpdateDevices();
|
||||||
|
|
||||||
if (reply_queue.size())
|
|
||||||
{
|
|
||||||
WII_IPCInterface::GenerateReply(reply_queue.front());
|
|
||||||
INFO_LOG(WII_IPC_HLE, "<<-- Reply to IPC Request @ 0x%08x", reply_queue.front());
|
|
||||||
reply_queue.pop();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (request_queue.size())
|
if (request_queue.size())
|
||||||
{
|
{
|
||||||
WII_IPCInterface::GenerateAck(request_queue.front());
|
WII_IPCInterface::GenerateAck(request_queue.front());
|
||||||
|
@ -464,9 +457,16 @@ void Update()
|
||||||
ExecuteCommand(request_queue.front());
|
ExecuteCommand(request_queue.front());
|
||||||
request_queue.pop();
|
request_queue.pop();
|
||||||
|
|
||||||
#if MAX_LOGLEVEL >= DEBUG_LEVEL
|
#if MAX_LOGLEVEL >= DEBUG_LEVEL
|
||||||
Dolphin_Debugger::PrintCallstack(LogTypes::WII_IPC_HLE, LogTypes::LDEBUG);
|
Dolphin_Debugger::PrintCallstack(LogTypes::WII_IPC_HLE, LogTypes::LDEBUG);
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
if (reply_queue.size())
|
||||||
|
{
|
||||||
|
WII_IPCInterface::GenerateReply(reply_queue.front());
|
||||||
|
INFO_LOG(WII_IPC_HLE, "<<-- Reply to IPC Request @ 0x%08x", reply_queue.front());
|
||||||
|
reply_queue.pop();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -437,13 +437,6 @@ bool CWII_IPC_HLE_Device_es::IOCtlV(u32 _CommandAddress)
|
||||||
_dbg_assert_msg_(WII_IPC_ES, Buffer.NumberPayloadBuffer == 1, "IOCTL_ES_GETVIEWCNT no out buffer");
|
_dbg_assert_msg_(WII_IPC_ES, Buffer.NumberPayloadBuffer == 1, "IOCTL_ES_GETVIEWCNT no out buffer");
|
||||||
|
|
||||||
u64 TitleID = Memory::Read_U64(Buffer.InBuffer[0].m_Address);
|
u64 TitleID = Memory::Read_U64(Buffer.InBuffer[0].m_Address);
|
||||||
if (TitleID != TITLEID_SYSMENU && (u32)(TitleID >> 32) == 0x00000001 && m_TitleID == TITLEID_SYSMENU)
|
|
||||||
{
|
|
||||||
// TODO: Check if any titles other than 1-2 call this for a ios tik
|
|
||||||
ERROR_LOG(WII_IPC_ES, "IOCTL_ES_GETVIEWCNT tik for IOS %x requested, returning System Menu tik", TitleID & 0xFFFFFFFF);
|
|
||||||
TitleID = TITLEID_SYSMENU;
|
|
||||||
}
|
|
||||||
|
|
||||||
std::string TicketFilename = Common::CreateTicketFileName(TitleID);
|
std::string TicketFilename = Common::CreateTicketFileName(TitleID);
|
||||||
|
|
||||||
u32 ViewCount = 0;
|
u32 ViewCount = 0;
|
||||||
|
@ -482,13 +475,6 @@ bool CWII_IPC_HLE_Device_es::IOCtlV(u32 _CommandAddress)
|
||||||
u64 TitleID = Memory::Read_U64(Buffer.InBuffer[0].m_Address);
|
u64 TitleID = Memory::Read_U64(Buffer.InBuffer[0].m_Address);
|
||||||
u32 maxViews = Memory::Read_U32(Buffer.InBuffer[1].m_Address);
|
u32 maxViews = Memory::Read_U32(Buffer.InBuffer[1].m_Address);
|
||||||
|
|
||||||
if (TitleID != TITLEID_SYSMENU && (u32)(TitleID >> 32) == 0x00000001 && m_TitleID == TITLEID_SYSMENU)
|
|
||||||
{
|
|
||||||
// TODO: Check if any titles other than 1-2 call this for a ios tik
|
|
||||||
ERROR_LOG(WII_IPC_ES, "IOCTL_ES_GETVIEWS tik for IOS %x requested, returning System Menu tik", TitleID & 0xFFFFFFFF);
|
|
||||||
TitleID = TITLEID_SYSMENU;
|
|
||||||
}
|
|
||||||
|
|
||||||
std::string TicketFilename = Common::CreateTicketFileName(TitleID);
|
std::string TicketFilename = Common::CreateTicketFileName(TitleID);
|
||||||
if (File::Exists(TicketFilename.c_str()))
|
if (File::Exists(TicketFilename.c_str()))
|
||||||
{
|
{
|
||||||
|
|
|
@ -427,14 +427,14 @@ u32 CWII_IPC_HLE_Device_usb_oh1_57e_305::Update()
|
||||||
|
|
||||||
// The Real Wiimote sends report at a fixed frequency of 100Hz
|
// The Real Wiimote sends report at a fixed frequency of 100Hz
|
||||||
// So let's make it also 100Hz here
|
// So let's make it also 100Hz here
|
||||||
// Calculation: 15000Hz (IPC_HLE) / 100Hz (WiiMote) = 150
|
// Calculation: 1500Hz (IPC_HLE) / 100Hz (WiiMote) = 15
|
||||||
if (m_ACLEndpoint.IsValid())
|
if (m_ACLEndpoint.IsValid())
|
||||||
{
|
{
|
||||||
if (++m_WiimoteUpdate_Freq > 150)
|
if (++m_WiimoteUpdate_Freq > 15)
|
||||||
m_WiimoteUpdate_Freq = 0;
|
m_WiimoteUpdate_Freq = 0;
|
||||||
for (unsigned int i = 0; i < m_WiiMotes.size(); i++)
|
for (unsigned int i = 0; i < m_WiiMotes.size(); i++)
|
||||||
{
|
{
|
||||||
if (m_WiiMotes[i].IsConnected() && m_WiimoteUpdate_Freq == 150 / (i + 1))
|
if (m_WiiMotes[i].IsConnected() && m_WiimoteUpdate_Freq == 15 / (i + 1))
|
||||||
{
|
{
|
||||||
#if defined(HAVE_WX) && HAVE_WX
|
#if defined(HAVE_WX) && HAVE_WX
|
||||||
NetPlay_WiimoteUpdate(i);
|
NetPlay_WiimoteUpdate(i);
|
||||||
|
|
Loading…
Reference in New Issue