mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-28 16:49:58 -06:00
Move CoreTiming::downcount to PowerPC::ppcState.
This isn't technically the correct place to have the downcount variable, but it is similar to what PPSSPP does to gain a bit of extra speed on ARM. We access this variable quite a bit, with each exit in a block it is subtracted from. On ARM this required four instructions to load and store the value, while now it only requires two. This gives an average of 1FPS gain to most games. Examples: Crazy Taxi: 54FPS -> 55FPS Luigi's Mansion: 20FPS -> 21FPS Wind Waker(Save Screen): 27FPS -> 28FPS This seems to average a 6mhz to 16mhz CPU core emulation improvement in the few games I've tested.
This commit is contained in:
@ -74,7 +74,7 @@ bool FifoPlayer::Play()
|
||||
{
|
||||
m_CurrentFrame = m_FrameRangeStart;
|
||||
|
||||
CoreTiming::downcount = 0;
|
||||
PowerPC::ppcState.downcount = 0;
|
||||
CoreTiming::Advance();
|
||||
}
|
||||
else
|
||||
@ -301,7 +301,7 @@ void FifoPlayer::WriteFifo(u8 *data, u32 start, u32 end)
|
||||
u32 cyclesUsed = elapsedCycles - m_ElapsedCycles;
|
||||
m_ElapsedCycles = elapsedCycles;
|
||||
|
||||
CoreTiming::downcount -= cyclesUsed;
|
||||
PowerPC::ppcState.downcount -= cyclesUsed;
|
||||
CoreTiming::Advance();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user