diff options
| author | Dolphin Bot <dolphin-emu-bot@users.noreply.github.com> | 2015-01-24 05:55:35 +0100 |
|---|---|---|
| committer | Dolphin Bot <dolphin-emu-bot@users.noreply.github.com> | 2015-01-24 05:55:35 +0100 |
| commit | 4e9497cdb85ecbd088ca06fb501496aa0c8240a7 (patch) | |
| tree | 6ab6c3d99028d08c12abcaf774872a0eea2e2830 /Source/UnitTests/Core | |
| parent | 088b6b2ec361ae3b2eb36aca61489ef8581472cf (diff) | |
| parent | fe28d1476a671145697dd056b2d7b03257e45d8c (diff) | |
Merge pull request #1057 from phire/IsMMIOAddress2
Further improvements to IsMMIOAddress (Includes tests!)
Diffstat (limited to 'Source/UnitTests/Core')
| -rw-r--r-- | Source/UnitTests/Core/MMIOTest.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Source/UnitTests/Core/MMIOTest.cpp b/Source/UnitTests/Core/MMIOTest.cpp index f9173ce0c4..bb7f1c4714 100644 --- a/Source/UnitTests/Core/MMIOTest.cpp +++ b/Source/UnitTests/Core/MMIOTest.cpp @@ -25,11 +25,24 @@ TEST(UniqueID, UniqueEnough) TEST(IsMMIOAddress, SpecialAddresses) { + SConfig::Init(); + SConfig::GetInstance().m_LocalCoreStartupParameter.bWii = true; + // WG Pipe address, should not be handled by MMIO. EXPECT_FALSE(MMIO::IsMMIOAddress(0xCC008000)); // Memory zone used by games using the "MMU Speedhack". EXPECT_FALSE(MMIO::IsMMIOAddress(0xE0000000)); + + // Uncached mirror of MEM1, shouldn't be handled by MMIO + EXPECT_FALSE(MMIO::IsMMIOAddress(0xC0000000)); + + // And lets check some valid addresses too + EXPECT_TRUE(MMIO::IsMMIOAddress(0xCC0000E0)); // Gamecube MMIOs + EXPECT_TRUE(MMIO::IsMMIOAddress(0xCD00008C)); // Wii MMIOs + EXPECT_TRUE(MMIO::IsMMIOAddress(0xCD800F10)); // Mirror of Wii MMIOs + + SConfig::Shutdown(); } class MappingTest : public testing::Test |
