Stuck an IPC HLE Update call in WII_IPCInterface::Write32.

While hacky, this seems to fix various problems without increasing IPC HLE freq to infinity.
Thanks to Aristar for helping test.
Increase IPC command reply delay to 1/100th of a second. (fixes DKCR hanging)
This commit is contained in:
Jordan Woyak 2013-02-04 16:00:11 -06:00
parent 03d9cca2fe
commit 2ad30958d6
3 changed files with 6 additions and 3 deletions

View File

@ -248,10 +248,11 @@ void Init()
DSP_PERIOD = (int)(GetTicksPerSecond() * 0.003f);
// AyuanX: TO BE TWEAKED
// Now the 1500 is (was) a pure assumption
// Now the 1500 is a pure assumption
// We need to figure out the real frequency though
const int freq = 8000;
// FYI, WII_IPC_HLE_Interface::Update is also called in WII_IPCInterface::Write32
const int freq = 1500;
const int fields = SConfig::GetInstance().m_LocalCoreStartupParameter.
bVBeam ? 2 : 1;
IPC_HLE_PERIOD = GetTicksPerSecond() / (freq * fields);

View File

@ -221,6 +221,7 @@ void Write32(const u32 _Value, const u32 _Address)
break;
}
WII_IPC_HLE_Interface::Update();
UpdateInterrupts();
}

View File

@ -515,7 +515,8 @@ void ExecuteCommand(u32 _Address)
if (CmdSuccess)
{
// Generate a reply to the IPC command
EnqReply(_Address, SystemTimers::GetTicksPerSecond() / 150);
// TODO: should probably figure out which commands need delayed replies and which don't
EnqReply(_Address, SystemTimers::GetTicksPerSecond() / 100);
}
else
{