From a42fb80f6aabece4c596018f514f4015390374fd Mon Sep 17 00:00:00 2001 From: skidau Date: Thu, 29 Jan 2015 22:34:10 +1100 Subject: [PATCH] Added a hash key finder. Fixed the memcard and AGP path parsing in Windows (the code is expecting '/' to be used as the DIR_SEP). --- Source/Core/Core/HW/EXI_DeviceAGP.cpp | 12 +++++++++++- Source/Core/DolphinWX/ConfigMain.cpp | 1 + 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/Source/Core/Core/HW/EXI_DeviceAGP.cpp b/Source/Core/Core/HW/EXI_DeviceAGP.cpp index 667c344482..056ee5f1dc 100644 --- a/Source/Core/Core/HW/EXI_DeviceAGP.cpp +++ b/Source/Core/Core/HW/EXI_DeviceAGP.cpp @@ -111,11 +111,21 @@ void CEXIAgp::LoadHash() { if (!m_rom_hash_loaded && m_rom_size > 0) { + u32 hash_addr = 0; + + // Find where the hash is in memory + for (u32 h = 0; h < Memory::REALRAM_SIZE; h += 4) + { + if (Memory::ReadUnchecked_U32(h) == 0x005ebce2) + hash_addr = h; + } + for (int i = 0; i < 0x100; i++) { // Load the ROM hash expected by the AGP - m_hash_array[i] = Memory::ReadUnchecked_U8(0x0017e908 + i); + m_hash_array[i] = Memory::ReadUnchecked_U8(hash_addr + i); } + // Verify the hash if (m_hash_array[HASH_SIZE - 1] == 0x35) { diff --git a/Source/Core/DolphinWX/ConfigMain.cpp b/Source/Core/DolphinWX/ConfigMain.cpp index 9a642a9a74..c052559fd4 100644 --- a/Source/Core/DolphinWX/ConfigMain.cpp +++ b/Source/Core/DolphinWX/ConfigMain.cpp @@ -1076,6 +1076,7 @@ void CConfigMain::ChooseSlotPath(bool isSlotA, TEXIDevices device_type) filename = "./" + filename; } } + std::replace(filename.begin(), filename.end(), '\\', '/'); #endif // also check that the path isn't used for the other memcard...