1
0
Fork 0

Changed stuff, made identifier a nop

This commit is contained in:
JoshuaMKW 2020-08-27 01:50:12 -05:00
parent 5f97fa0404
commit 0f9281e420
2 changed files with 19 additions and 4 deletions

View file

@ -268,11 +268,11 @@ class CodeHandler:
self._rawData.seek(0) self._rawData.seek(0)
sample = self._rawData.read(4) sample = self._rawData.read(4)
if sample == b'\x00\xDE\xDE\xDE': if sample == b'\x60\x00\x00\x00':
return self._rawData.tell() - 4 return self._rawData.tell() - 4
while sample: while sample:
if sample == b'\x00\xDE\xDE\xDE': if sample == b'\x60\x00\x00\x00':
return self._rawData.tell() - 4 return self._rawData.tell() - 4
sample = self._rawData.read(4) sample = self._rawData.read(4)

View file

@ -198,6 +198,21 @@ namespace Memory {
} }
} }
static void storeAddr(void* addr)
{
dcbst(addr);
icbi(addr);
}
static void storeRange(u8* addr, s32 size)
{
size += 31 + (((u32)addr & 31) > 0);
for (u32 i = 0; i < (size >> 5); ++i) {
storeAddr((void*)(addr + (i << 5)));
}
}
} }
namespace Direct { namespace Direct {
@ -330,7 +345,7 @@ static void initMods()
} }
/*Get codehandler hook resources*/ /*Get codehandler hook resources*/
auto fillInField = Memory::Search::single<u32>((u32*)sDisc.sMetaData.mOSArenaHi, (u32*)(sDisc.sMetaData.mOSArenaHi + 0x600), 0x00DEDEDE); auto fillInField = Memory::Search::single<u32>((u32*)sDisc.sMetaData.mOSArenaHi, (u32*)(sDisc.sMetaData.mOSArenaHi + 0x600), 0x60000000);
auto returnAddress = extractBranchAddr((u32*)gpModInfo.codehandlerHook); auto returnAddress = extractBranchAddr((u32*)gpModInfo.codehandlerHook);
auto ppc = *gpModInfo.codehandlerHook; auto ppc = *gpModInfo.codehandlerHook;