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.

157 lines
3.5 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 PixelShaderManager;
class SoundStream;
2022-09-14 01:11:04 +02:00
struct Sram;
class VertexShaderManager;
namespace AudioInterface
{
2023-03-08 23:26:31 +01:00
class AudioInterfaceManager;
};
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;
};
namespace Fifo
{
class FifoManager;
}
namespace GPFifo
{
class GPFifoManager;
}
2023-03-07 02:11:39 +01:00
namespace HSP
{
class HSPManager;
}
2023-01-12 14:21:29 +13:00
namespace IOS::HLE::USB
{
class SkylanderPortal;
};
namespace Memory
{
class MemoryManager;
};
namespace MemoryInterface
{
2023-03-10 21:27:35 +01:00
class MemoryInterfaceManager;
};
namespace PixelEngine
{
class PixelEngineManager;
};
2023-01-11 06:01:50 +01:00
namespace PowerPC
{
struct PowerPCState;
}
namespace ProcessorInterface
{
class ProcessorInterfaceManager;
}
namespace SerialInterface
{
class SerialInterfaceState;
};
namespace VideoInterface
{
2023-03-10 22:14:54 +01:00
class VideoInterfaceManager;
};
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; }
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);
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;
GeometryShaderManager& GetGeometryShaderManager() const;
GPFifo::GPFifoManager& GetGPFifo() const;
2023-03-07 02:11:39 +01:00
HSP::HSPManager& GetHSP() const;
2023-01-12 14:21:29 +13:00
IOS::HLE::USB::SkylanderPortal& GetSkylanderPortal() const;
Memory::MemoryManager& GetMemory() const;
2023-03-10 21:27:35 +01:00
MemoryInterface::MemoryInterfaceManager& GetMemoryInterface() const;
PixelEngine::PixelEngineManager& GetPixelEngine() const;
PixelShaderManager& GetPixelShaderManager() const;
2023-01-11 06:01:50 +01:00
PowerPC::PowerPCState& GetPPCState() const;
ProcessorInterface::ProcessorInterfaceManager& GetProcessorInterface() const;
SerialInterface::SerialInterfaceState& GetSerialInterfaceState() const;
2022-09-14 01:11:04 +02:00
Sram& GetSRAM() const;
VertexShaderManager& GetVertexShaderManager() const;
2023-03-10 22:14:54 +01:00
VideoInterface::VideoInterfaceManager& GetVideoInterface() 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;
2020-12-19 22:32:55 -05:00
};
} // namespace Core