77
88typedef void *(*EGG_Heap_alloc_t) (u32 size, s32 align, void *heap);
99typedef void (*EGG_Heap_free_t) (void *buffer, void *heap);
10- typedef void *(*memcpy_t ) (void *dest, const void *src, size_t count);
1110typedef void (*flush_cache_t ) (void *buffer, size_t size);
1211
1312struct loaderFunctionsEx {
1413 loaderFunctions base;
1514 EGG_Heap_alloc_t EGG_Heap_alloc;
1615 EGG_Heap_free_t EGG_Heap_free;
17- memcpy_t memcpy;
1816 flush_cache_t __flush_cache;
1917 void **mHeap_g_gameHeaps ;
2018 void **mHeap_g_archiveHeap ;
@@ -50,11 +48,11 @@ const loaderFunctionsEx functions_p = {
5048 (DVDReadPrio_t) 0x801CAC60 ,
5149 (DVDClose_t) 0x801CAB40 ,
5250 (sprintf_t ) 0x802E1ACC ,
51+ (memcpy_t ) 0x80004364 ,
5352 allocAdapter,
5453 freeAdapter},
5554 (EGG_Heap_alloc_t) 0x802B8E00 ,
5655 (EGG_Heap_free_t) 0x802B90B0 ,
57- (memcpy_t ) 0x80004364 ,
5856 (flush_cache_t ) 0x80004330 ,
5957 (void **) 0x80377F48 ,
6058 (void **) 0x8042A72C ,
@@ -69,11 +67,11 @@ const loaderFunctionsEx functions_e = {
6967 (DVDReadPrio_t) 0x801CAB20 ,
7068 (DVDClose_t) 0x801CAA00 ,
7169 (sprintf_t ) 0x802E17DC ,
70+ (memcpy_t ) 0x80004364 ,
7271 allocAdapter,
7372 freeAdapter},
7473 (EGG_Heap_alloc_t) 0x802B8CC0 ,
7574 (EGG_Heap_free_t) 0x802B8F70 ,
76- (memcpy_t ) 0x80004364 ,
7775 (flush_cache_t ) 0x80004330 ,
7876 (void **) 0x80377C48 ,
7977 (void **) 0x8042A44C ,
@@ -89,11 +87,11 @@ const loaderFunctionsEx functions_j = {
8987 (DVDReadPrio_t) 0x801CA930 ,
9088 (DVDClose_t) 0x801CA810 ,
9189 (sprintf_t ) 0x802E15EC ,
90+ (memcpy_t ) 0x80004364 ,
9291 allocAdapter,
9392 freeAdapter},
9493 (EGG_Heap_alloc_t) 0x802B8AD0 ,
9594 (EGG_Heap_free_t) 0x802B8D80 ,
96- (memcpy_t ) 0x80004364 ,
9795 (flush_cache_t ) 0x80004330 ,
9896 (void **) 0x803779C8 ,
9997 (void **) 0x8042A16C ,
@@ -108,11 +106,11 @@ const loaderFunctionsEx functions_k = {
108106 (DVDReadPrio_t) 0x801CB060 ,
109107 (DVDClose_t) 0x801CAF40 ,
110108 (sprintf_t ) 0x802E1D1C ,
109+ (memcpy_t ) 0x80004364 ,
111110 allocAdapter,
112111 freeAdapter},
113112 (EGG_Heap_alloc_t) 0x802B9200 ,
114113 (EGG_Heap_free_t) 0x802B94B0 ,
115- (memcpy_t ) 0x80004364 ,
116114 (flush_cache_t ) 0x80004330 ,
117115 (void **) 0x80384948 ,
118116 (void **) 0x804370EC ,
@@ -127,11 +125,11 @@ const loaderFunctionsEx functions_w = {
127125 (DVDReadPrio_t) 0x801CB060 ,
128126 (DVDClose_t) 0x801CAF40 ,
129127 (sprintf_t ) 0x802E1D1C ,
128+ (memcpy_t ) 0x80004364 ,
130129 allocAdapter,
131130 freeAdapter},
132131 (EGG_Heap_alloc_t) 0x802B9200 ,
133132 (EGG_Heap_free_t) 0x802B94B0 ,
134- (memcpy_t ) 0x80004364 ,
135133 (flush_cache_t ) 0x80004330 ,
136134 (void **) 0x80382D48 ,
137135 (void **) 0x804354EC ,
@@ -147,11 +145,11 @@ const loaderFunctionsEx functions_c = {
147145 (DVDReadPrio_t) 0x801CCE80 ,
148146 (DVDClose_t) 0x801CCD60 ,
149147 (sprintf_t ) 0x802E4DF8 ,
148+ (memcpy_t ) 0x80004364 ,
150149 allocAdapter,
151150 freeAdapter},
152151 (EGG_Heap_alloc_t) 0x802BB360 ,
153152 (EGG_Heap_free_t) 0x802BB610 ,
154- (memcpy_t ) 0x80004364 ,
155153 (flush_cache_t ) 0x80004330 ,
156154 (void **) 0x8037D4C8 ,
157155 (void **) 0x8042FCCC ,
@@ -254,7 +252,7 @@ void loadIntoNSMBW() {
254252
255253 // modify myBackGround_PhaseMethod to load rels earlier & load the kamek binary
256254 u32 temp[20 ];
257- sFuncs ->memcpy (&temp, sFuncs ->myBackGround_PhaseMethod , 0x50 );
255+ sFuncs ->base . memcpy (&temp, sFuncs ->myBackGround_PhaseMethod , 0x50 );
258256
259257 // set rel loading functions as the first entries in the table
260258 sFuncs ->myBackGround_PhaseMethod [0 ] = temp[15 ];
@@ -265,7 +263,7 @@ void loadIntoNSMBW() {
265263 sFuncs ->myBackGround_PhaseMethod [3 ] = (u32 )&loadBinary;
266264
267265 // set all the other functions
268- sFuncs ->memcpy (&sFuncs ->myBackGround_PhaseMethod [4 ], &temp, 0x3C );
266+ sFuncs ->base . memcpy (&sFuncs ->myBackGround_PhaseMethod [4 ], &temp, 0x3C );
269267 sFuncs ->myBackGround_PhaseMethod [19 ] = temp[18 ];
270268 sFuncs ->myBackGround_PhaseMethod [20 ] = temp[19 ];
271269
0 commit comments