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.cpp58
1 files changed, 58 insertions, 0 deletions
diff --git a/src/core/core.cpp b/src/core/core.cpp
new file mode 100644
index 000000000..540b20f27
--- /dev/null
+++ b/src/core/core.cpp
@@ -0,0 +1,58 @@
1// Copyright 2014 Citra Emulator Project
2// Licensed under GPLv2
3// Refer to the license.txt file included.
4
5#include "log.h"
6#include "core.h"
7#include "mem_map.h"
8#include "hw/hw.h"
9#include "arm/disassembler/arm_disasm.h"
10#include "arm/interpreter/arm_interpreter.h"
11
12namespace Core {
13
14ARM_Disasm* g_disasm = NULL; ///< ARM disassembler
15ARM_Interface* g_app_core = NULL; ///< ARM11 application core
16ARM_Interface* g_sys_core = NULL; ///< ARM11 system (OS) core
17
18/// Run the core CPU loop
19void RunLoop() {
20 // TODO(ShizZy): ImplementMe
21}
22
23/// Step the CPU one instruction
24void SingleStep() {
25 g_app_core->Step();
26 HW::Update();
27}
28
29/// Halt the core
30void Halt(const char *msg) {
31 // TODO(ShizZy): ImplementMe
32}
33
34/// Kill the core
35void Stop() {
36 // TODO(ShizZy): ImplementMe
37}
38
39/// Initialize the core
40int Init() {
41 NOTICE_LOG(MASTER_LOG, "Core initialized OK");
42
43 g_disasm = new ARM_Disasm();
44 g_app_core = new ARM_Interpreter();
45 g_sys_core = new ARM_Interpreter();
46
47 return 0;
48}
49
50void Shutdown() {
51 delete g_disasm;
52 delete g_app_core;
53 delete g_sys_core;
54
55 NOTICE_LOG(MASTER_LOG, "Core shutdown OK");
56}
57
58} // namespace