void Init() { bool wii = SConfig::GetInstance().m_LocalCoreStartupParameter.bWii; bMMU = SConfig::GetInstance().m_LocalCoreStartupParameter.bMMU; #ifndef _ARCH_32 // The fake VMEM hack's address space is above the memory space that we allocate on 32bit targets // Disable it entirely on 32bit targets. bFakeVMEM = !bMMU; #endif u32 flags = 0; if (wii) flags |= MV_WII_ONLY; if (bFakeVMEM) flags |= MV_FAKE_VMEM; base = MemoryMap_Setup(views, num_views, flags, &g_arena); mmio_mapping = new MMIO::Mapping(); if (wii) InitMMIOWii(mmio_mapping); else InitMMIO(mmio_mapping); INFO_LOG(MEMMAP, "Memory system initialized. RAM at %p", m_pRAM); m_IsInitialized = true; }
static void InitMMIOWii(MMIO::Mapping* mmio) { InitMMIO(mmio); WII_IPCInterface::RegisterMMIO(mmio, 0xCD000000); DVDInterface::RegisterMMIO(mmio, 0xCD006000); SerialInterface::RegisterMMIO(mmio, 0xCD006400); ExpansionInterface::RegisterMMIO(mmio, 0xCD006800); AudioInterface::RegisterMMIO(mmio, 0xCD006C00); }
void Init() { bool wii = SConfig::GetInstance().m_LocalCoreStartupParameter.bWii; bFakeVMEM = SConfig::GetInstance().m_LocalCoreStartupParameter.bTLBHack == true; bMMU = SConfig::GetInstance().m_LocalCoreStartupParameter.bMMU; u32 flags = 0; if (wii) flags |= MV_WII_ONLY; if (bFakeVMEM) flags |= MV_FAKE_VMEM; base = MemoryMap_Setup(views, num_views, flags, &g_arena); mmio_mapping = new MMIO::Mapping(); if (wii) InitMMIOWii(mmio_mapping); else InitMMIO(mmio_mapping); INFO_LOG(MEMMAP, "Memory system initialized. RAM at %p (mirrors at 0 @ %p, 0x80000000 @ %p , 0xC0000000 @ %p)", m_pRAM, m_pPhysicalRAM, m_pVirtualCachedRAM, m_pVirtualUncachedRAM); m_IsInitialized = true; }