Core: Add PowerPCState reference to System.

This commit is contained in:
Admiral H. Curtiss 2023-01-11 06:01:50 +01:00
parent 485bba238e
commit 51e7980d95
No known key found for this signature in database
GPG Key ID: F051B4C4044F33FB
2 changed files with 13 additions and 1 deletions

View File

@ -20,6 +20,7 @@
#include "Core/HW/SI/SI.h"
#include "Core/HW/Sram.h"
#include "Core/HW/VideoInterface.h"
#include "Core/PowerPC/PowerPC.h"
#include "IOS/USB/Emulated/Skylander.h"
#include "VideoCommon/CommandProcessor.h"
#include "VideoCommon/Fifo.h"
@ -32,7 +33,7 @@ namespace Core
{
struct System::Impl
{
explicit Impl(System& system) : m_gp_fifo(system) {}
explicit Impl(System& system) : m_gp_fifo(system), m_ppc_state(PowerPC::ppcState) {}
std::unique_ptr<SoundStream> m_sound_stream;
bool m_sound_stream_running = false;
@ -53,6 +54,7 @@ struct System::Impl
MemoryInterface::MemoryInterfaceState m_memory_interface_state;
PixelEngine::PixelEngineManager m_pixel_engine;
PixelShaderManager m_pixel_shader_manager;
PowerPC::PowerPCState& m_ppc_state;
ProcessorInterface::ProcessorInterfaceManager m_processor_interface;
SerialInterface::SerialInterfaceState m_serial_interface_state;
Sram m_sram;
@ -178,6 +180,11 @@ PixelShaderManager& System::GetPixelShaderManager() const
return m_impl->m_pixel_shader_manager;
}
PowerPC::PowerPCState& System::GetPPCState() const
{
return m_impl->m_ppc_state;
}
ProcessorInterface::ProcessorInterfaceManager& System::GetProcessorInterface() const
{
return m_impl->m_processor_interface;

View File

@ -63,6 +63,10 @@ namespace PixelEngine
{
class PixelEngineManager;
};
namespace PowerPC
{
struct PowerPCState;
}
namespace ProcessorInterface
{
class ProcessorInterfaceManager;
@ -125,6 +129,7 @@ public:
MemoryInterface::MemoryInterfaceState& GetMemoryInterfaceState() const;
PixelEngine::PixelEngineManager& GetPixelEngine() const;
PixelShaderManager& GetPixelShaderManager() const;
PowerPC::PowerPCState& GetPPCState() const;
ProcessorInterface::ProcessorInterfaceManager& GetProcessorInterface() const;
SerialInterface::SerialInterfaceState& GetSerialInterfaceState() const;
Sram& GetSRAM() const;