gamecube compatibility for mini

This commit is contained in:
Sven Peter 2009-04-03 18:04:55 +02:00 committed by bushing
parent 753c97a90a
commit 13bcec0a91

11
main.c
View File

@ -209,6 +209,12 @@ void *_main(void *base)
gecko_puts("Mounting SD...\n"); gecko_puts("Mounting SD...\n");
fres = f_mount(0, &fatfs); fres = f_mount(0, &fatfs);
if (read32(0x0d800190) & 2) {
gecko_puts("GameCube compatibility mode detected...\n");
boot2_run(1, 0x101);
goto shutdown;
}
if(fres != FR_OK) { if(fres != FR_OK) {
gecko_printf("Error %d while trying to mount SD\n", fres); gecko_printf("Error %d while trying to mount SD\n", fres);
panic2(0, PANIC_MOUNT); panic2(0, PANIC_MOUNT);
@ -223,13 +229,12 @@ void *_main(void *base)
} }
gecko_puts("Going into IPC mainloop...\n"); gecko_puts("Going into IPC mainloop...\n");
boot2_run(0x10001,0x48415858);
#if 0
ipc_process_slow(); ipc_process_slow();
gecko_puts("IPC mainloop done!\n"); gecko_puts("IPC mainloop done!\n");
#endif
gecko_puts("Shutting down IPC...\n"); gecko_puts("Shutting down IPC...\n");
ipc_shutdown(); ipc_shutdown();
shutdown:
gecko_puts("Shutting down interrupts...\n"); gecko_puts("Shutting down interrupts...\n");
irq_shutdown(); irq_shutdown();
gecko_puts("Shutting down caches and MMU...\n"); gecko_puts("Shutting down caches and MMU...\n");