Patch virtual address translation to support entire extended RAM address space

This commit is contained in:
Mr-Wiseguy 2025-02-08 20:23:25 -05:00
parent 91db87632c
commit da2886e686

12
patches/memory_patches.c Normal file
View file

@ -0,0 +1,12 @@
#include "patches.h"
// @recomp Leave the entire KSEG0 range unmodified when translating to a virtual address. This will allow
// using the entirety of the extended RAM address space for custom assets.
RECOMP_PATCH void* Lib_SegmentedToVirtual(void* ptr) {
if (IS_KSEG0(ptr)) {
return ptr;
}
else {
return SEGMENTED_TO_K0(ptr);
}
}