s32 STM_ShutdownToIdle() { int res; _viReg[1] = 0; if(__stm_initialized==0) { #ifdef DEBUG_STM printf("STM notinited\n"); #endif return STM_ENOTINIT; } switch(SYS_GetHollywoodRevision()) { case 0: case 1: case 2: __stm_immbufin[0] = 0xFCA08280; default: __stm_immbufin[0] = 0xFCE082C0; } res= IOS_Ioctl(__stm_imm_fd,IOCTL_STM_IDLE,__stm_immbufin,0x20,__stm_immbufout,0x20); if(res<0) { #ifdef DEBUG_STM printf("STM IDLE failed: %d\n",res); #endif } return res; }
{ // Exit after 10 seconds if there is an error __exception_setreload(10); CheckForGecko(); DCInvalidateRange(loader_stub, 0x1800); memcpy(loader_stub, (void*)0x80001800, 0x1800); DCFlushRange(loader_stub, 0x1800); if( !IsWiiU() ) { gprintf("Nintendont Loader\r\n"); gprintf("Built : %s %s\r\n", __DATE__, __TIME__ ); gprintf("Version : %d.%d\r\n", NIN_VERSION>>16, NIN_VERSION&0xFFFF ); } u32 currev = *(vu32*)0x80003140; HollywoodRevision = SYS_GetHollywoodRevision(); //RAMInit overwrites this RAMInit(); STM_RegisterEventHandler(HandleSTMEvent); Initialise(); FPAD_Init(); PrintInfo(); PrintFormat( MENU_POS_X + 44 * 5, MENU_POS_Y + 20*1, "Home: Exit"); PrintFormat( MENU_POS_X + 44 * 5, MENU_POS_Y + 20*2, "A : Select"); if( *(vu32*)(0xCd800064) != -1 ) { ClearScreen();