Files
dolphin/Source/Core/Core/System.h
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

212 lines
5.0 KiB
C++
Raw Normal View History

2020-12-19 22:32:55 -05:00
// Copyright 2020 Dolphin Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
2020-12-19 22:32:55 -05:00
#pragma once
#include <memory>
class GeometryShaderManager;
class Interpreter;
class JitInterface;
class PixelShaderManager;
class SoundStream;
2022-09-14 01:11:04 +02:00
struct Sram;
class VertexShaderManager;
class XFStateManager;
namespace AudioInterface
{
2023-03-08 23:26:31 +01:00
class AudioInterfaceManager;
2024-08-18 15:08:44 +02:00
}
2023-03-07 04:02:48 +01:00
namespace CPU
{
class CPUManager;
}
namespace CommandProcessor
{
class CommandProcessorManager;
}
namespace CoreTiming
{
2022-11-26 09:29:46 +01:00
class CoreTimingManager;
}
2022-10-02 05:13:55 +02:00
namespace DSP
{
2023-03-09 02:36:43 +01:00
class DSPManager;
2022-10-02 05:13:55 +02:00
}
namespace DVD
{
class DVDInterface;
class DVDThread;
2023-03-10 18:59:12 +01:00
} // namespace DVD
namespace ExpansionInterface
{
class ExpansionInterfaceManager;
2024-08-18 15:08:44 +02:00
}
namespace Fifo
{
class FifoManager;
}
2024-01-05 09:31:59 +01:00
class FifoPlayer;
2024-01-12 13:35:47 +01:00
class FifoRecorder;
namespace GPFifo
{
class GPFifoManager;
}
namespace IOS::HLE
{
class EmulationKernel;
}
2023-03-07 02:11:39 +01:00
namespace HSP
{
class HSPManager;
}
namespace IOS
{
class WiiIPC;
}
2023-01-12 14:21:29 +13:00
namespace IOS::HLE::USB
{
class SkylanderPortal;
2023-01-25 10:51:02 +13:00
class InfinityBase;
2024-08-18 15:08:44 +02:00
} // namespace IOS::HLE::USB
namespace Memory
{
class MemoryManager;
2024-08-18 15:08:44 +02:00
}
namespace MemoryInterface
{
2023-03-10 21:27:35 +01:00
class MemoryInterfaceManager;
2024-08-18 15:08:44 +02:00
}
namespace Movie
{
class MovieManager;
}
namespace PixelEngine
{
class PixelEngineManager;
2024-08-18 15:08:44 +02:00
}
2023-01-11 06:01:50 +01:00
namespace PowerPC
{
class MMU;
2023-03-28 20:26:52 +02:00
class PowerPCManager;
2023-01-11 06:01:50 +01:00
struct PowerPCState;
} // namespace PowerPC
class PPCSymbolDB;
namespace ProcessorInterface
{
class ProcessorInterfaceManager;
}
namespace SerialInterface
{
2023-03-12 14:20:32 +01:00
class SerialInterfaceManager;
2024-08-18 15:08:44 +02:00
}
namespace SystemTimers
{
class SystemTimersManager;
}
2023-03-20 01:22:09 -05:00
namespace VideoCommon
{
class CustomAssetLoader;
}
namespace VideoInterface
{
2023-03-10 22:14:54 +01:00
class VideoInterfaceManager;
2024-08-18 15:08:44 +02:00
}
2020-12-19 22:32:55 -05:00
namespace Core
{
// Central class that encapsulates the running system.
class System
{
public:
~System();
System(const System&) = delete;
System& operator=(const System&) = delete;
System(System&&) = delete;
System& operator=(System&&) = delete;
// Intermediate instance accessor until global state is eliminated.
static System& GetInstance()
{
static System instance;
return instance;
}
void Initialize();
bool IsDualCoreMode() const { return m_separate_cpu_and_gpu_threads; }
bool IsMMUMode() const { return m_mmu_enabled; }
2022-04-17 00:15:12 -07:00
bool IsPauseOnPanicMode() const { return m_pause_on_panic_enabled; }
2024-01-30 03:45:17 +01:00
bool IsMIOS() const { return m_is_mios; }
2024-01-31 02:56:56 +01:00
bool IsWii() const { return m_is_wii; }
bool IsBranchWatchIgnoreApploader() { return m_branch_watch_ignore_apploader; }
2024-01-30 03:45:17 +01:00
void SetIsMIOS(bool is_mios) { m_is_mios = is_mios; }
2024-01-31 02:56:56 +01:00
void SetIsWii(bool is_wii) { m_is_wii = is_wii; }
void SetIsBranchWatchIgnoreApploader(bool enable) { m_branch_watch_ignore_apploader = enable; }
SoundStream* GetSoundStream() const;
void SetSoundStream(std::unique_ptr<SoundStream> sound_stream);
bool IsSoundStreamRunning() const;
void SetSoundStreamRunning(bool running);
bool IsAudioDumpStarted() const;
void SetAudioDumpStarted(bool started);
IOS::HLE::EmulationKernel* GetIOS() const;
void SetIOS(std::unique_ptr<IOS::HLE::EmulationKernel> ios);
2023-03-08 23:26:31 +01:00
AudioInterface::AudioInterfaceManager& GetAudioInterface() const;
2023-03-07 04:02:48 +01:00
CPU::CPUManager& GetCPU() const;
2022-11-26 09:29:46 +01:00
CoreTiming::CoreTimingManager& GetCoreTiming() const;
CommandProcessor::CommandProcessorManager& GetCommandProcessor() const;
2023-03-09 02:36:43 +01:00
DSP::DSPManager& GetDSP() const;
DVD::DVDInterface& GetDVDInterface() const;
DVD::DVDThread& GetDVDThread() const;
ExpansionInterface::ExpansionInterfaceManager& GetExpansionInterface() const;
Fifo::FifoManager& GetFifo() const;
2024-01-05 09:31:59 +01:00
FifoPlayer& GetFifoPlayer() const;
2024-01-12 13:35:47 +01:00
FifoRecorder& GetFifoRecorder() const;
GeometryShaderManager& GetGeometryShaderManager() const;
GPFifo::GPFifoManager& GetGPFifo() const;
2023-03-07 02:11:39 +01:00
HSP::HSPManager& GetHSP() const;
Interpreter& GetInterpreter() const;
JitInterface& GetJitInterface() const;
2023-01-12 14:21:29 +13:00
IOS::HLE::USB::SkylanderPortal& GetSkylanderPortal() const;
2023-01-25 10:51:02 +13:00
IOS::HLE::USB::InfinityBase& GetInfinityBase() const;
IOS::WiiIPC& GetWiiIPC() const;
Memory::MemoryManager& GetMemory() const;
2023-03-10 21:27:35 +01:00
MemoryInterface::MemoryInterfaceManager& GetMemoryInterface() const;
PowerPC::MMU& GetMMU() const;
Movie::MovieManager& GetMovie() const;
PixelEngine::PixelEngineManager& GetPixelEngine() const;
PixelShaderManager& GetPixelShaderManager() const;
2023-03-28 20:26:52 +02:00
PowerPC::PowerPCManager& GetPowerPC() const;
2023-01-11 06:01:50 +01:00
PowerPC::PowerPCState& GetPPCState() const;
PPCSymbolDB& GetPPCSymbolDB() const;
ProcessorInterface::ProcessorInterfaceManager& GetProcessorInterface() const;
2023-03-12 14:20:32 +01:00
SerialInterface::SerialInterfaceManager& GetSerialInterface() const;
2022-09-14 01:11:04 +02:00
Sram& GetSRAM() const;
SystemTimers::SystemTimersManager& GetSystemTimers() const;
VertexShaderManager& GetVertexShaderManager() const;
XFStateManager& GetXFStateManager() const;
2023-03-10 22:14:54 +01:00
VideoInterface::VideoInterfaceManager& GetVideoInterface() const;
2023-03-20 01:22:09 -05:00
VideoCommon::CustomAssetLoader& GetCustomAssetLoader() const;
2020-12-19 22:32:55 -05:00
private:
System();
struct Impl;
std::unique_ptr<Impl> m_impl;
bool m_separate_cpu_and_gpu_threads = false;
bool m_mmu_enabled = false;
2022-04-17 00:15:12 -07:00
bool m_pause_on_panic_enabled = false;
2024-01-30 03:45:17 +01:00
bool m_is_mios = false;
2024-01-31 02:56:56 +01:00
bool m_is_wii = false;
bool m_branch_watch_ignore_apploader = false;
2020-12-19 22:32:55 -05:00
};
} // namespace Core