MCPcopy Create free account
hub / github.com/DacoTaco/priiloader / LoadThroughMagicWord

Function LoadThroughMagicWord

tools/LoadPriiloader/source/main.cpp:264–280  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

262}
263
264void LoadThroughMagicWord()
265{
266 //retarded that this is the only way without touching the settings of priiloader or load the dol...
267 printf("magic word is %x\n",*(vu32*)MAGIC_WORD_ADDRESS);
268 *(vu32*)MAGIC_WORD_ADDRESS = 0x4461636f; // "Daco" , causes priiloader to skip autoboot and load the priiloader menu
269 //*(vu32*)MAGIC_WORD_ADDRESS = 0x50756e65; // "Pune" , causes priiloader to skip autoboot and load Sys Menu
270 *(vu32*)MAGIC_WORD_ADDRESS2 = *(vu32*)MAGIC_WORD_ADDRESS;
271 DCFlushRange((void*)MAGIC_WORD_ADDRESS, 4);
272 DCFlushRange((void*)MAGIC_WORD_ADDRESS2, 4);
273 printf("magic word changed to %x\n",*(vu32*)MAGIC_WORD_ADDRESS);
274
275 printf("resetting...\n");
276 sleep(2);
277 VIDEO_ClearFrameBuffer(vmode, xfb, COLOR_BLACK);
278 VIDEO_SetBlack(true);
279 SYS_ResetSystem(SYS_RETURNTOMENU,0,0);
280}
281//---------------------------------------------------------------------------------
282int main(int argc, char **argv) {
283//---------------------------------------------------------------------------------

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected