mirror of
https://github.com/Zelda64Recomp/Zelda64Recomp.git
synced 2025-12-24 00:42:39 +00:00
Patch virtual address translation to support entire extended RAM address space (#533)
This commit is contained in:
parent
3863c954c2
commit
0554a8aeb7
1 changed files with 12 additions and 0 deletions
12
patches/memory_patches.c
Normal file
12
patches/memory_patches.c
Normal 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);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue