diff options
author | bunnei <bunneidev@gmail.com> | 2014-07-23 04:59:26 +0200 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2014-08-06 05:57:53 +0200 |
commit | ec14ffe1cda04cd098ce07f3d3ad96c253e91eed (patch) | |
tree | fe459fc75a4ba62ed1a730e8a4ccbdffa2846dca /src/core/core.cpp | |
parent | MemMap: Fixed typo with GetPointer to VRAM address. (diff) | |
download | yuzu-ec14ffe1cda04cd098ce07f3d3ad96c253e91eed.tar yuzu-ec14ffe1cda04cd098ce07f3d3ad96c253e91eed.tar.gz yuzu-ec14ffe1cda04cd098ce07f3d3ad96c253e91eed.tar.bz2 yuzu-ec14ffe1cda04cd098ce07f3d3ad96c253e91eed.tar.lz yuzu-ec14ffe1cda04cd098ce07f3d3ad96c253e91eed.tar.xz yuzu-ec14ffe1cda04cd098ce07f3d3ad96c253e91eed.tar.zst yuzu-ec14ffe1cda04cd098ce07f3d3ad96c253e91eed.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/core.cpp | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/src/core/core.cpp b/src/core/core.cpp index 7dc0809d0..fc9909377 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp @@ -26,21 +26,25 @@ ARM_Interface* g_sys_core = nullptr; ///< ARM11 system (OS) core /// Run the core CPU loop void RunLoop() { for (;;){ - g_app_core->Run(GPU::kFrameTicks); + // This function loops for 100 instructions in the CPU before trying to update hardware. + // This is a little bit faster than SingleStep, and should be pretty much equivalent. The + // number of instructions chosen is fairly arbitrary, however a large number will more + // drastically affect the frequency of GSP interrupts and likely break things. The point of + // this is to just loop in the CPU for more than 1 instruction to reduce overhead and make + // it a little bit faster... + g_app_core->Run(100); HW::Update(); - Kernel::Reschedule(); + if (HLE::g_reschedule) { + Kernel::Reschedule(); + } } } /// Step the CPU one instruction void SingleStep() { g_app_core->Step(); - - // Update and reschedule after approx. 1 frame - u64 current_ticks = Core::g_app_core->GetTicks(); - if ((current_ticks - g_last_ticks) >= GPU::kFrameTicks || HLE::g_reschedule) { - g_last_ticks = current_ticks; - HW::Update(); + HW::Update(); + if (HLE::g_reschedule) { Kernel::Reschedule(); } } |