mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-20 22:11:16 +00:00
libu64 (#2267)
* libu64 * logutils.o -> debug.o in spec * stackcheck.c is part of libu64 * review * add paragraph about Overlay_Load calling an external function * audio code*
This commit is contained in:
parent
012c192f00
commit
5b27899b9f
16 changed files with 97 additions and 29 deletions
17
src/libu64/loadfragment2_gc.c
Normal file
17
src/libu64/loadfragment2_gc.c
Normal file
|
@ -0,0 +1,17 @@
|
|||
#include "global.h"
|
||||
|
||||
void* Overlay_AllocateAndLoad(uintptr_t vromStart, uintptr_t vromEnd, void* vramStart, void* vramEnd) {
|
||||
void* allocatedRamAddr = SYSTEM_ARENA_MALLOC_R((intptr_t)vramEnd - (intptr_t)vramStart, "../loadfragment2.c", 31);
|
||||
|
||||
if (gOverlayLogSeverity >= 3) {
|
||||
PRINTF("OVL:SPEC(%08x-%08x) REAL(%08x-%08x) OFFSET(%08x)\n", vramStart, vramEnd, allocatedRamAddr,
|
||||
((uintptr_t)vramEnd - (uintptr_t)vramStart) + (uintptr_t)allocatedRamAddr,
|
||||
(uintptr_t)vramStart - (uintptr_t)allocatedRamAddr);
|
||||
}
|
||||
|
||||
if (allocatedRamAddr != NULL) {
|
||||
Overlay_Load(vromStart, vromEnd, vramStart, vramEnd, allocatedRamAddr);
|
||||
}
|
||||
|
||||
return allocatedRamAddr;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue