diff --git a/src/CxbxKrnl/EmuKrnlRtl.cpp b/src/CxbxKrnl/EmuKrnlRtl.cpp index 7e6da090a..7fff90bfd 100644 --- a/src/CxbxKrnl/EmuKrnlRtl.cpp +++ b/src/CxbxKrnl/EmuKrnlRtl.cpp @@ -496,3 +496,23 @@ XBSYSAPI EXPORTNUM(308) xboxkrnl::NTSTATUS NTAPI xboxkrnl::RtlUnicodeStringToAns RETURN(ret); } +// Prevent errors compiling RtlZeroMemory (TODO : How should we really do this?) +#undef RtlZeroMemory + +// ****************************************************************** +// * 0x0140 - RtlZeroMemory +// ****************************************************************** +XBSYSAPI EXPORTNUM(320) xboxkrnl::VOID NTAPI xboxkrnl::RtlZeroMemory +( + IN VOID UNALIGNED *Destination, + IN SIZE_T Length +) +{ + LOG_FUNC_BEGIN + LOG_FUNC_ARG(Destination) + LOG_FUNC_ARG(Length) + LOG_FUNC_END; + + memset(Destination, 0, Length); // Don't bother with NtDll::RtlZeroMemory +} + diff --git a/src/CxbxKrnl/KernelThunk.cpp b/src/CxbxKrnl/KernelThunk.cpp index 221615a02..460d82684 100644 --- a/src/CxbxKrnl/KernelThunk.cpp +++ b/src/CxbxKrnl/KernelThunk.cpp @@ -385,7 +385,7 @@ extern "C" CXBXKRNL_API uint32 CxbxKrnl_KernelThunkTable[379] = (uint32)PANIC(0x013D), // 0x013D (317) RtlUpperString (uint32)PANIC(0x013E), // 0x013E (318) RtlUshortByteSwap (uint32)PANIC(0x013F), // 0x013F (319) RtlWalkFrameChain - (uint32)PANIC(0x0140), // 0x0140 (320) RtlZeroMemory + (uint32)FUNC(&xboxkrnl::RtlZeroMemory), // 0x0140 (320) (uint32)VARIABLE(&xboxkrnl::XboxEEPROMKey), // 0x0141 (321) (uint32)VARIABLE(&xboxkrnl::XboxHardwareInfo), // 0x0142 (322) (uint32)VARIABLE(&xboxkrnl::XboxHDKey), // 0x0143 (323)