summaryrefslogtreecommitdiff
path: root/src/core/core.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/core.h')
-rw-r--r--src/core/core.h28
1 files changed, 17 insertions, 11 deletions
diff --git a/src/core/core.h b/src/core/core.h
index f4326161d..8194db6a2 100644
--- a/src/core/core.h
+++ b/src/core/core.h
@@ -53,17 +53,6 @@ public:
53 }; 53 };
54 54
55 /** 55 /**
56 * Initialize the emulated system.
57 * @param emu_window Pointer to the host-system window used for video output and keyboard input.
58 * @param system_mode The system mode.
59 * @return ResultStatus code, indicating if the operation succeeded.
60 */
61 ResultStatus Init(EmuWindow* emu_window, u32 system_mode);
62
63 /// Start the core
64 void Start();
65
66 /**
67 * Run the core CPU loop 56 * Run the core CPU loop
68 * This function runs the core for the specified number of CPU instructions before trying to update 57 * This function runs the core for the specified number of CPU instructions before trying to update
69 * hardware. This is much faster than SingleStep (and should be equivalent), as the CPU is not 58 * hardware. This is much faster than SingleStep (and should be equivalent), as the CPU is not
@@ -101,6 +90,9 @@ public:
101 return app_core != nullptr; 90 return app_core != nullptr;
102 } 91 }
103 92
93 /// Prepare the core emulation for a reschedule
94 void PrepareReschedule();
95
104 /** 96 /**
105 * Gets a reference to the emulated AppCore CPU. 97 * Gets a reference to the emulated AppCore CPU.
106 * @returns A reference to the emulated AppCore CPU. 98 * @returns A reference to the emulated AppCore CPU.
@@ -110,12 +102,26 @@ public:
110 } 102 }
111 103
112private: 104private:
105 /**
106 * Initialize the emulated system.
107 * @param emu_window Pointer to the host-system window used for video output and keyboard input.
108 * @param system_mode The system mode.
109 * @return ResultStatus code, indicating if the operation succeeded.
110 */
111 ResultStatus Init(EmuWindow* emu_window, u32 system_mode);
112
113 /// Reschedule the core emulation
114 void Reschedule();
115
113 /// AppLoader used to load the current executing application 116 /// AppLoader used to load the current executing application
114 std::unique_ptr<Loader::AppLoader> app_loader; 117 std::unique_ptr<Loader::AppLoader> app_loader;
115 118
116 ///< ARM11 application core 119 ///< ARM11 application core
117 std::unique_ptr<ARM_Interface> app_core; 120 std::unique_ptr<ARM_Interface> app_core;
118 121
122 /// When true, signals that a reschedule should happen
123 bool reschedule_pending{};
124
119 static System s_instance; 125 static System s_instance;
120}; 126};
121 127