summaryrefslogtreecommitdiff
path: root/src/core/core.h
diff options
context:
space:
mode:
authorGravatar Fernando Sahmkow2020-02-24 22:04:12 -0400
committerGravatar Fernando Sahmkow2020-06-27 11:35:06 -0400
commite31425df3877636c098ec7426ebd2067920715cb (patch)
tree5c0fc518a4ebb8413c491b43a9fdd99450c7bd80 /src/core/core.h
parentMerge pull request #3396 from FernandoS27/prometheus-1 (diff)
downloadyuzu-e31425df3877636c098ec7426ebd2067920715cb.tar.gz
yuzu-e31425df3877636c098ec7426ebd2067920715cb.tar.xz
yuzu-e31425df3877636c098ec7426ebd2067920715cb.zip
General: Recover Prometheus project from harddrive failure
This commit: Implements CPU Interrupts, Replaces Cycle Timing for Host Timing, Reworks the Kernel's Scheduler, Introduce Idle State and Suspended State, Recreates the bootmanager, Initializes Multicore system.
Diffstat (limited to 'src/core/core.h')
-rw-r--r--src/core/core.h34
1 files changed, 14 insertions, 20 deletions
diff --git a/src/core/core.h b/src/core/core.h
index acc53d6a1..7f170fc54 100644
--- a/src/core/core.h
+++ b/src/core/core.h
@@ -90,7 +90,7 @@ class InterruptManager;
90namespace Core { 90namespace Core {
91 91
92class ARM_Interface; 92class ARM_Interface;
93class CoreManager; 93class CpuManager;
94class DeviceMemory; 94class DeviceMemory;
95class ExclusiveMonitor; 95class ExclusiveMonitor;
96class FrameLimiter; 96class FrameLimiter;
@@ -136,16 +136,18 @@ public:
136 }; 136 };
137 137
138 /** 138 /**
139 * Run the core CPU loop 139 * Run the OS and Application
140 * This function runs the core for the specified number of CPU instructions before trying to 140 * This function will start emulation and run the competent devices
141 * update hardware. This is much faster than SingleStep (and should be equivalent), as the CPU 141 */
142 * is not required to do a full dispatch with each instruction. NOTE: the number of instructions 142 ResultStatus Run();
143 * requested is not guaranteed to run, as this will be interrupted preemptively if a hardware 143
144 * update is requested (e.g. on a thread switch). 144 /**
145 * @param tight_loop If false, the CPU single-steps. 145 * Pause the OS and Application
146 * @return Result status, indicating whether or not the operation succeeded. 146 * This function will pause emulation and stop the competent devices
147 */ 147 */
148 ResultStatus RunLoop(bool tight_loop = true); 148 ResultStatus Pause();
149
150
149 151
150 /** 152 /**
151 * Step the CPU one instruction 153 * Step the CPU one instruction
@@ -215,11 +217,9 @@ public:
215 /// Gets a const reference to an ARM interface from the CPU core with the specified index 217 /// Gets a const reference to an ARM interface from the CPU core with the specified index
216 const ARM_Interface& ArmInterface(std::size_t core_index) const; 218 const ARM_Interface& ArmInterface(std::size_t core_index) const;
217 219
218 /// Gets a CPU interface to the CPU core with the specified index 220 CpuManager& GetCpuManager();
219 CoreManager& GetCoreManager(std::size_t core_index);
220 221
221 /// Gets a CPU interface to the CPU core with the specified index 222 const CpuManager& GetCpuManager() const;
222 const CoreManager& GetCoreManager(std::size_t core_index) const;
223 223
224 /// Gets a reference to the exclusive monitor 224 /// Gets a reference to the exclusive monitor
225 ExclusiveMonitor& Monitor(); 225 ExclusiveMonitor& Monitor();
@@ -373,12 +373,6 @@ public:
373private: 373private:
374 System(); 374 System();
375 375
376 /// Returns the currently running CPU core
377 CoreManager& CurrentCoreManager();
378
379 /// Returns the currently running CPU core
380 const CoreManager& CurrentCoreManager() const;
381
382 /** 376 /**
383 * Initialize the emulated system. 377 * Initialize the emulated system.
384 * @param emu_window Reference to the host-system window used for video output and keyboard 378 * @param emu_window Reference to the host-system window used for video output and keyboard