summaryrefslogtreecommitdiff
path: root/src/core/core.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/core.cpp')
-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 @@
9#include "core/core.h" 9#include "core/core.h"
10#include "core/mem_map.h" 10#include "core/mem_map.h"
11#include "core/hw/hw.h" 11#include "core/hw/hw.h"
12#include "core/hw/lcd.h"
12#include "core/arm/disassembler/arm_disasm.h" 13#include "core/arm/disassembler/arm_disasm.h"
13#include "core/arm/interpreter/arm_interpreter.h" 14#include "core/arm/interpreter/arm_interpreter.h"
14 15
@@ -23,7 +24,7 @@ ARM_Interface* g_sys_core = NULL; ///< ARM11 system (OS) core
23/// Run the core CPU loop 24/// Run the core CPU loop
24void RunLoop() { 25void RunLoop() {
25 for (;;){ 26 for (;;){
26 g_app_core->Run(100); 27 g_app_core->Run(LCD::kFrameTicks / 2);
27 HW::Update(); 28 HW::Update();
28 Kernel::Reschedule(); 29 Kernel::Reschedule();
29 } 30 }
@@ -31,9 +32,17 @@ void RunLoop() {
31 32
32/// Step the CPU one instruction 33/// Step the CPU one instruction
33void SingleStep() { 34void SingleStep() {
35 static int ticks = 0;
36
34 g_app_core->Step(); 37 g_app_core->Step();
35 HW::Update(); 38
36 Kernel::Reschedule(); 39 if (ticks >= LCD::kFrameTicks / 2) {
40 HW::Update();
41 Kernel::Reschedule();
42 ticks = 0;
43 } else {
44 ticks++;
45 }
37} 46}
38 47
39/// Halt the core 48/// Halt the core