summaryrefslogtreecommitdiffstats
path: root/src/core/core.h
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2016-12-16 06:37:38 +0100
committerbunnei <bunneidev@gmail.com>2016-12-22 05:48:13 +0100
commit4fc8b8229ed1d9ea9d20faee7059c898265db6cf (patch)
tree45095e416393473fe9721c60edd9a220b2e44dd4 /src/core/core.h
parentcore: Consolidate core and system state, remove system module & cleanups. (diff)
downloadyuzu-4fc8b8229ed1d9ea9d20faee7059c898265db6cf.tar
yuzu-4fc8b8229ed1d9ea9d20faee7059c898265db6cf.tar.gz
yuzu-4fc8b8229ed1d9ea9d20faee7059c898265db6cf.tar.bz2
yuzu-4fc8b8229ed1d9ea9d20faee7059c898265db6cf.tar.lz
yuzu-4fc8b8229ed1d9ea9d20faee7059c898265db6cf.tar.xz
yuzu-4fc8b8229ed1d9ea9d20faee7059c898265db6cf.tar.zst
yuzu-4fc8b8229ed1d9ea9d20faee7059c898265db6cf.zip
Diffstat (limited to '')
-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:
};
/**
- * Initialize the emulated system.
- * @param emu_window Pointer to the host-system window used for video output and keyboard input.
- * @param system_mode The system mode.
- * @return ResultStatus code, indicating if the operation succeeded.
- */
- ResultStatus Init(EmuWindow* emu_window, u32 system_mode);
-
- /// Start the core
- void Start();
-
- /**
* Run the core CPU loop
* This function runs the core for the specified number of CPU instructions before trying to update
* hardware. This is much faster than SingleStep (and should be equivalent), as the CPU is not
@@ -101,6 +90,9 @@ public:
return app_core != nullptr;
}
+ /// Prepare the core emulation for a reschedule
+ void PrepareReschedule();
+
/**
* Gets a reference to the emulated AppCore CPU.
* @returns A reference to the emulated AppCore CPU.
@@ -110,12 +102,26 @@ public:
}
private:
+ /**
+ * Initialize the emulated system.
+ * @param emu_window Pointer to the host-system window used for video output and keyboard input.
+ * @param system_mode The system mode.
+ * @return ResultStatus code, indicating if the operation succeeded.
+ */
+ ResultStatus Init(EmuWindow* emu_window, u32 system_mode);
+
+ /// Reschedule the core emulation
+ void Reschedule();
+
/// AppLoader used to load the current executing application
std::unique_ptr<Loader::AppLoader> app_loader;
///< ARM11 application core
std::unique_ptr<ARM_Interface> app_core;
+ /// When true, signals that a reschedule should happen
+ bool reschedule_pending{};
+
static System s_instance;
};