Fix XGetSectionHandle

HACK: return from HalReturnToFirmware if routine is 4.

Dashboards  1.00.4034.01 and 1.00.4817.01 now launch, but display an error.
This commit is contained in:
Luke Usher 2016-08-20 17:00:29 +01:00
parent de0c650d8d
commit 8e652b8c9d
2 changed files with 6 additions and 3 deletions

View File

@ -1796,7 +1796,10 @@ XBSYSAPI EXPORTNUM(49) VOID DECLSPEC_NORETURN xboxkrnl::HalReturnToFirmware
");\n",
GetCurrentThreadId(), Routine);
CxbxKrnlCleanup("Xbe has rebooted : HalReturnToFirmware(%d)", Routine);
// Prevent the dashboard from rebooting due to unimplemented crypto routines
if ((uint32_t)Routine != 4) {
CxbxKrnlCleanup("Xbe has rebooted : HalReturnToFirmware(%d)", Routine);
}
EmuSwapFS(); // Xbox FS
}
@ -4811,7 +4814,7 @@ XBSYSAPI EXPORTNUM(337) VOID NTAPI xboxkrnl::XcSHAFinal(UCHAR *pbSHAContext, UCH
{
pbDigest[v] = 0;
}
EmuSwapFS(); // Xbox FS
return;

View File

@ -1135,7 +1135,7 @@ HANDLE WINAPI XTL::EmuXGetSectionHandleA
// Iterate thrugh sections
for (int i = 0; i < CxbxKrnl_Exe->m_Header.m_sections; i++) {
if (!strncmp(pSectionName, CxbxKrnl_Exe->m_SectionHeader[i].m_name, 8)) {
pRet = (void*)CxbxKrnl_Exe->m_SectionHeader[i].m_virtual_addr;
pRet = (void*)(CxbxKrnl_Exe->m_SectionHeader[i].m_virtual_addr + CxbxKrnl_XbeHeader->dwBaseAddr);
break;
}
}