Skip to content

Commit

Permalink
Core: Add PowerPCState reference to System.
Browse files Browse the repository at this point in the history
  • Loading branch information
AdmiralCurtiss committed Jan 27, 2023
1 parent 485bba2 commit 51e7980
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Source/Core/Core/System.cpp
Expand Up @@ -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"
Expand All @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
5 changes: 5 additions & 0 deletions Source/Core/Core/System.h
Expand Up @@ -63,6 +63,10 @@ namespace PixelEngine
{
class PixelEngineManager;
};
namespace PowerPC
{
struct PowerPCState;
}
namespace ProcessorInterface
{
class ProcessorInterfaceManager;
Expand Down Expand Up @@ -125,6 +129,7 @@ class System
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;
Expand Down

0 comments on commit 51e7980

Please sign in to comment.