summaryrefslogtreecommitdiffstats
path: root/src/core/core.cpp
diff options
context:
space:
mode:
authorbunnei <ericbunnie@gmail.com>2014-05-30 02:30:17 +0200
committerbunnei <ericbunnie@gmail.com>2014-05-30 02:30:17 +0200
commit9839f3b6cd9ea0d62730edee7db027dde86f6239 (patch)
tree663380c3a8d222f08e0a47dad88a259d6b48fa0a /src/core/core.cpp
parentsvc: changed unimplemented SVC log messages from "debug" messages to "error" messages (diff)
downloadyuzu-9839f3b6cd9ea0d62730edee7db027dde86f6239.tar
yuzu-9839f3b6cd9ea0d62730edee7db027dde86f6239.tar.gz
yuzu-9839f3b6cd9ea0d62730edee7db027dde86f6239.tar.bz2
yuzu-9839f3b6cd9ea0d62730edee7db027dde86f6239.tar.lz
yuzu-9839f3b6cd9ea0d62730edee7db027dde86f6239.tar.xz
yuzu-9839f3b6cd9ea0d62730edee7db027dde86f6239.tar.zst
yuzu-9839f3b6cd9ea0d62730edee7db027dde86f6239.zip
Diffstat (limited to '')
-rw-r--r--src/core/core.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/core/core.cpp b/src/core/core.cpp
index f88bcd704..070f92ed5 100644
--- a/src/core/core.cpp
+++ b/src/core/core.cpp
@@ -9,6 +9,7 @@
#include "core/core.h"
#include "core/mem_map.h"
#include "core/hw/hw.h"
+#include "core/hw/lcd.h"
#include "core/arm/disassembler/arm_disasm.h"
#include "core/arm/interpreter/arm_interpreter.h"
@@ -23,7 +24,7 @@ ARM_Interface* g_sys_core = NULL; ///< ARM11 system (OS) core
/// Run the core CPU loop
void RunLoop() {
for (;;){
- g_app_core->Run(100);
+ g_app_core->Run(LCD::kFrameTicks / 2);
HW::Update();
Kernel::Reschedule();
}
@@ -31,9 +32,17 @@ void RunLoop() {
/// Step the CPU one instruction
void SingleStep() {
+ static int ticks = 0;
+
g_app_core->Step();
- HW::Update();
- Kernel::Reschedule();
+
+ if (ticks >= LCD::kFrameTicks / 2) {
+ HW::Update();
+ Kernel::Reschedule();
+ ticks = 0;
+ } else {
+ ticks++;
+ }
}
/// Halt the core