Skip to content
Permalink
Browse files
Merge pull request #11646 from AdmiralCurtiss/si-class
HW/SerialInterface: Refactor to class.
  • Loading branch information
lioncash committed Mar 13, 2023
2 parents a6b2655 + bf2f901 commit 137b9d1
Show file tree
Hide file tree
Showing 28 changed files with 539 additions and 526 deletions.
@@ -42,7 +42,7 @@ void Init(const Sram* override_sram)
// Init the whole Hardware
system.GetAudioInterface().Init();
system.GetVideoInterface().Init();
SerialInterface::Init();
system.GetSerialInterface().Init();
system.GetProcessorInterface().Init();
system.GetExpansionInterface().Init(override_sram); // Needs to be initialized before Memory
system.GetHSP().Init();
@@ -79,7 +79,7 @@ void Shutdown()
system.GetMemory().Shutdown();
system.GetHSP().Shutdown();
system.GetExpansionInterface().Shutdown();
SerialInterface::Shutdown();
system.GetSerialInterface().Shutdown();
system.GetAudioInterface().Shutdown();

State::Shutdown();
@@ -95,7 +95,7 @@ void DoState(PointerWrap& p)
p.DoMarker("MemoryInterface");
system.GetVideoInterface().DoState(p);
p.DoMarker("VideoInterface");
SerialInterface::DoState(p);
system.GetSerialInterface().DoState(p);
p.DoMarker("SerialInterface");
system.GetProcessorInterface().DoState(p);
p.DoMarker("ProcessorInterface");
@@ -56,14 +56,14 @@ void MemoryManager::InitMMIO(bool is_wii)
system.GetMemoryInterface().RegisterMMIO(m_mmio_mapping.get(), 0x0C004000);
system.GetDSP().RegisterMMIO(m_mmio_mapping.get(), 0x0C005000);
system.GetDVDInterface().RegisterMMIO(m_mmio_mapping.get(), 0x0C006000, false);
SerialInterface::RegisterMMIO(m_mmio_mapping.get(), 0x0C006400);
system.GetSerialInterface().RegisterMMIO(m_mmio_mapping.get(), 0x0C006400);
system.GetExpansionInterface().RegisterMMIO(m_mmio_mapping.get(), 0x0C006800);
system.GetAudioInterface().RegisterMMIO(m_mmio_mapping.get(), 0x0C006C00);
if (is_wii)
{
IOS::RegisterMMIO(m_mmio_mapping.get(), 0x0D000000);
system.GetDVDInterface().RegisterMMIO(m_mmio_mapping.get(), 0x0D006000, true);
SerialInterface::RegisterMMIO(m_mmio_mapping.get(), 0x0D006400);
system.GetSerialInterface().RegisterMMIO(m_mmio_mapping.get(), 0x0D006400);
system.GetExpansionInterface().RegisterMMIO(m_mmio_mapping.get(), 0x0D006800);
system.GetAudioInterface().RegisterMMIO(m_mmio_mapping.get(), 0x0D006C00);
}

0 comments on commit 137b9d1

Please sign in to comment.