summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorDolphin Bot <dolphin-emu-bot@users.noreply.github.com>2015-01-24 05:55:35 +0100
committerDolphin Bot <dolphin-emu-bot@users.noreply.github.com>2015-01-24 05:55:35 +0100
commit4e9497cdb85ecbd088ca06fb501496aa0c8240a7 (patch)
tree6ab6c3d99028d08c12abcaf774872a0eea2e2830 /Source/Core
parent088b6b2ec361ae3b2eb36aca61489ef8581472cf (diff)
parentfe28d1476a671145697dd056b2d7b03257e45d8c (diff)
Merge pull request #1057 from phire/IsMMIOAddress2
Further improvements to IsMMIOAddress (Includes tests!)
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/Core/HW/MMIO.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/Source/Core/Core/HW/MMIO.h b/Source/Core/Core/HW/MMIO.h
index 10bba4a6c8..0a4a1a5d04 100644
--- a/Source/Core/Core/HW/MMIO.h
+++ b/Source/Core/Core/HW/MMIO.h
@@ -9,6 +9,7 @@
#include <type_traits>
#include "Common/Common.h"
+#include "Core/ConfigManager.h"
#include "Core/HW/MMIOHandlers.h"
namespace MMIO
@@ -40,8 +41,18 @@ const u32 NUM_MMIOS = NUM_BLOCKS * BLOCK_SIZE;
// interface.
inline bool IsMMIOAddress(u32 address)
{
- return ((address & 0xFE7F0000) == 0xCC000000) &&
- ((address & 0x0000FFFF) != 0x00008000);
+ if (address == 0xCC008000)
+ return false; // WG Pipe
+ if ((address & 0xFFFF0000) == 0xCC000000)
+ return true; // GameCube MMIOs
+
+ if(SConfig::GetInstance().m_LocalCoreStartupParameter.bWii)
+ {
+ return ((address & 0xFFFF0000) == 0xCD000000) || // Wii MMIOs
+ ((address & 0xFFFF0000) == 0xCD800000); // Mirror of Wii MMIOs
+ }
+
+ return false;
}
// Compute the internal unique ID for a given MMIO address. This ID is computed