diff options
Diffstat (limited to 'src/core/core.h')
| -rw-r--r-- | src/core/core.h | 46 |
1 files changed, 28 insertions, 18 deletions
diff --git a/src/core/core.h b/src/core/core.h index fb5cda2f5..93afc9303 100644 --- a/src/core/core.h +++ b/src/core/core.h @@ -61,6 +61,8 @@ namespace Glue { class ARPManager; } +class ServerManager; + namespace SM { class ServiceManager; } // namespace SM @@ -144,7 +146,7 @@ public: /** * Initializes the system - * This function will initialize core functionaility used for system emulation + * This function will initialize core functionality used for system emulation */ void Initialize(); @@ -170,7 +172,7 @@ public: */ void InvalidateCpuInstructionCaches(); - void InvalidateCpuInstructionCacheRange(VAddr addr, std::size_t size); + void InvalidateCpuInstructionCacheRange(u64 addr, std::size_t size); /// Shutdown the main emulated process. void ShutdownMainProcess(); @@ -184,8 +186,11 @@ public: /// Forcibly detach the debugger if it is running. void DetachDebugger(); - std::unique_lock<std::mutex> StallProcesses(); - void UnstallProcesses(); + std::unique_lock<std::mutex> StallApplication(); + void UnstallApplication(); + + void SetNVDECActive(bool is_nvdec_active); + [[nodiscard]] bool GetNVDECActive(); /** * Initialize the debugger. @@ -220,6 +225,8 @@ public: /// Prepare the core emulation for a reschedule void PrepareReschedule(u32 core_index); + [[nodiscard]] size_t GetCurrentHostThreadID() const; + /// Gets and resets core performance statistics [[nodiscard]] PerfStatsResults GetAndResetPerfStats(); @@ -254,10 +261,10 @@ public: [[nodiscard]] const ExclusiveMonitor& Monitor() const; /// Gets a mutable reference to the system memory instance. - [[nodiscard]] Core::Memory::Memory& Memory(); + [[nodiscard]] Core::Memory::Memory& ApplicationMemory(); /// Gets a constant reference to the system memory instance. - [[nodiscard]] const Core::Memory::Memory& Memory() const; + [[nodiscard]] const Core::Memory::Memory& ApplicationMemory() const; /// Gets a mutable reference to the GPU interface [[nodiscard]] Tegra::GPU& GPU(); @@ -295,11 +302,11 @@ public: /// Gets the manager for the guest device memory [[nodiscard]] const Core::DeviceMemory& DeviceMemory() const; - /// Provides a pointer to the current process - [[nodiscard]] Kernel::KProcess* CurrentProcess(); + /// Provides a pointer to the application process + [[nodiscard]] Kernel::KProcess* ApplicationProcess(); - /// Provides a constant pointer to the current process. - [[nodiscard]] const Kernel::KProcess* CurrentProcess() const; + /// Provides a constant pointer to the application process. + [[nodiscard]] const Kernel::KProcess* ApplicationProcess() const; /// Provides a reference to the core timing instance. [[nodiscard]] Timing::CoreTiming& CoreTiming(); @@ -331,7 +338,7 @@ public: /// Provides a constant reference to the speed limiter [[nodiscard]] const Core::SpeedLimiter& SpeedLimiter() const; - [[nodiscard]] u64 GetCurrentProcessProgramID() const; + [[nodiscard]] u64 GetApplicationProcessProgramID() const; /// Gets the name of the current game [[nodiscard]] Loader::ResultStatus GetGameName(std::string& out) const; @@ -351,7 +358,7 @@ public: [[nodiscard]] FileSys::VirtualFilesystem GetFilesystem() const; void RegisterCheatList(const std::vector<Memory::CheatEntry>& list, - const std::array<u8, 0x20>& build_id, VAddr main_region_begin, + const std::array<u8, 0x20>& build_id, u64 main_region_begin, u64 main_region_size); void SetAppletFrontendSet(Service::AM::Applets::AppletFrontendSet&& set); @@ -396,8 +403,8 @@ public: void SetExitLock(bool locked); [[nodiscard]] bool GetExitLock() const; - void SetCurrentProcessBuildID(const CurrentBuildProcessID& id); - [[nodiscard]] const CurrentBuildProcessID& GetCurrentProcessBuildID() const; + void SetApplicationProcessBuildID(const CurrentBuildProcessID& id); + [[nodiscard]] const CurrentBuildProcessID& GetApplicationProcessBuildID() const; /// Register a host thread as an emulated CPU Core. void RegisterCoreThread(std::size_t id); @@ -405,11 +412,11 @@ public: /// Register a host thread as an auxiliary thread. void RegisterHostThread(); - /// Enter Dynarmic Microprofile - void EnterDynarmicProfile(); + /// Enter CPU Microprofile + void EnterCPUProfile(); - /// Exit Dynarmic Microprofile - void ExitDynarmicProfile(); + /// Exit CPU Microprofile + void ExitCPUProfile(); /// Tells if system is running on multicore. [[nodiscard]] bool IsMulticore() const; @@ -417,6 +424,9 @@ public: /// Tells if the system debugger is enabled. [[nodiscard]] bool DebuggerEnabled() const; + /// Runs a server instance until shutdown. + void RunServer(std::unique_ptr<Service::ServerManager>&& server_manager); + /// Type used for the frontend to designate a callback for System to re-launch the application /// using a specified program index. using ExecuteProgramCallback = std::function<void(std::size_t)>; |
