summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorcomex <comexk@gmail.com>2013-09-13 16:26:39 -0400
committercomex <comexk@gmail.com>2013-09-13 18:14:56 -0400
commite62bc44f15edfc21819994cd8908698f678d6b30 (patch)
tree2c2a7fad6c080e1115c306b75ccce48a0d5fbcbc /Source/Core
parente6cd3b328376bb3ec71e4f4571991e5d4dec1397 (diff)
Use d01f1bad for the gameid check in RunCodeHandler rather than the actual ID.
This avoids conflict with the icache hack. codehandleronly.s does not actually use the gameid, so it shouldn't matter.
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/Core/Src/GeckoCode.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/Source/Core/Core/Src/GeckoCode.cpp b/Source/Core/Core/Src/GeckoCode.cpp
index 252e758746..f8359e1bc5 100644
--- a/Source/Core/Core/Src/GeckoCode.cpp
+++ b/Source/Core/Core/Src/GeckoCode.cpp
@@ -154,8 +154,9 @@ bool InstallCodeHandler()
// Turn off Pause on start
Memory::Write_U32(0, 0x80002774);
- // Write the Game ID into the location expected by WiiRD
- Memory::WriteBigEData(Memory::GetPointer(0x80000000), 0x80001800, 6);
+ // Write a magic value to 'gameid' (codehandleronly does not actually read this).
+ // For the purpose of this, see HLEGeckoCodehandler.
+ Memory::Write_U32(0xd01f1bad, 0x80001800);
// Create GCT in memory
Memory::Write_U32(0x00d0c0de, codelist_location);
@@ -279,10 +280,7 @@ void RunCodeHandler()
{
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bEnableCheats && active_codes.size() > 0)
{
- u8 *gameId = Memory::GetPointer(0x80000000);
- u8 *wiirdId = Memory::GetPointer(0x80001800);
-
- if (!code_handler_installed || memcmp(gameId, wiirdId, 6))
+ if (!code_handler_installed || Memory::Read_U32(0x80001800) - 0xd01f1bad > 5)
code_handler_installed = InstallCodeHandler();
if (code_handler_installed)