From 4ff200eccc8bd7800763635427a6fa5ca8c37b69 Mon Sep 17 00:00:00 2001 From: skidau Date: Mon, 14 Jun 2010 05:38:39 +0000 Subject: [PATCH] Emulated the extra BAT's that the Wii has in the MMU. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5688 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/Core/Src/HW/MemmapFunctions.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Source/Core/Core/Src/HW/MemmapFunctions.cpp b/Source/Core/Core/Src/HW/MemmapFunctions.cpp index b7bc9fb4d9..0888e08d77 100644 --- a/Source/Core/Core/Src/HW/MemmapFunctions.cpp +++ b/Source/Core/Core/Src/HW/MemmapFunctions.cpp @@ -783,7 +783,9 @@ u32 TranslateBlockAddress(u32 addr) u32 result = 0; UReg_MSR& m_MSR = ((UReg_MSR&)PowerPC::ppcState.msr); - for (int i=0; i<4; i++) { + int bats = Core::g_CoreStartupParameter.bWii?8:4; + + for (int i = 0; i < bats; i++) { u32 bl17 = ~(BATU_BL(PowerPC::ppcState.spr[SPR_DBAT0U + i * 2])<<17); u32 addr2 = addr & (bl17 | 0xf001ffff); u32 batu = (m_MSR.PR ? BATU_Vp : BATU_Vs);