HW: Move VideoInterface variables to Core::System.

This commit is contained in:
Admiral H. Curtiss 2022-10-04 02:24:01 +02:00
parent 052c7395fb
commit 9c944d5734
No known key found for this signature in database
GPG Key ID: F051B4C4044F33FB
4 changed files with 400 additions and 303 deletions

File diff suppressed because it is too large Load Diff

View File

@ -3,6 +3,8 @@
#pragma once
#include <memory>
#include "Common/CommonTypes.h"
class PointerWrap;
@ -13,6 +15,23 @@ class Mapping;
namespace VideoInterface
{
class VideoInterfaceState
{
public:
VideoInterfaceState();
VideoInterfaceState(const VideoInterfaceState&) = delete;
VideoInterfaceState(VideoInterfaceState&&) = delete;
VideoInterfaceState& operator=(const VideoInterfaceState&) = delete;
VideoInterfaceState& operator=(VideoInterfaceState&&) = delete;
~VideoInterfaceState();
struct Data;
Data& GetData() { return *m_data; }
private:
std::unique_ptr<Data> m_data;
};
// VI Internal Hardware Addresses
enum
{

View File

@ -12,6 +12,7 @@
#include "Core/HW/DVD/DVDInterface.h"
#include "Core/HW/DVD/DVDThread.h"
#include "Core/HW/Sram.h"
#include "Core/HW/VideoInterface.h"
namespace Core
{
@ -26,6 +27,7 @@ struct System::Impl
DVDInterface::DVDInterfaceState m_dvd_interface_state;
DVDThread::DVDThreadState m_dvd_thread_state;
Sram m_sram;
VideoInterface::VideoInterfaceState m_video_interface_state;
};
System::System() : m_impl{std::make_unique<Impl>()}
@ -95,4 +97,9 @@ Sram& System::GetSRAM() const
{
return m_impl->m_sram;
}
VideoInterface::VideoInterfaceState& System::GetVideoInterfaceState() const
{
return m_impl->m_video_interface_state;
}
} // namespace Core

View File

@ -24,6 +24,10 @@ namespace DVDThread
{
class DVDThreadState;
}
namespace VideoInterface
{
class VideoInterfaceState;
};
namespace Core
{
@ -64,6 +68,7 @@ public:
DVDInterface::DVDInterfaceState& GetDVDInterfaceState() const;
DVDThread::DVDThreadState& GetDVDThreadState() const;
Sram& GetSRAM() const;
VideoInterface::VideoInterfaceState& GetVideoInterfaceState() const;
private:
System();