MCPcopy Create free account
hub / github.com/dborth/fceugx / SystemInit

Function SystemInit

source/system.cpp:149–204  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

147#endif
148
149void SystemInit() {
150 #ifdef USE_VM
151 VM_Init(ARAM_SIZE, MRAM_BACKING); // Setup Virtual Memory with the entire ARAM
152 #endif
153
154 #ifdef HW_RVL
155 L2Enhance();
156
157 u32 ios = IOS_GetVersion();
158
159 if(!SupportedIOS(ios))
160 {
161 s32 preferred = IOS_GetPreferredVersion();
162
163 if(SupportedIOS(preferred))
164 IOS_ReloadIOS(preferred);
165 }
166 #else
167 ipl_set_config(6); // disable Qoob modchip
168 #endif
169
170 USBGeckoOutput();
171 __exception_setreload(8);
172
173 InitVideo(); // Initialize video
174 InitialiseAudio();
175
176 #ifdef HW_RVL
177 // Wii Power/Reset buttons
178 __STM_Close();
179 __STM_Init();
180 __STM_Close();
181 __STM_Init();
182 SYS_SetPowerCallback(ShutdownCB);
183 SYS_SetResetCallback(ResetCB);
184
185 WiiDRC_Init();
186 isWiiVC = WiiDRC_Inited();
187 WPAD_Init();
188 WPAD_SetPowerButtonCallback((WPADShutdownCallback)ShutdownCB);
189 DI_Init();
190 USBStorage_Initialize();
191 #else
192 DVD_Init (); // Initialize DVD subsystem (GameCube only)
193 #endif
194
195 SetupPads();
196 InitDeviceThread();
197 MountAllFAT(); // Initialize libFAT for SD and USB
198
199 #ifdef HW_RVL
200 InitMem2Manager();
201 #endif
202
203 InitFreeType((u8*)font_ttf, font_ttf_size); // Initialize font system
204}
205
206static void ExitCleanup()

Callers 1

mainFunction · 0.85

Calls 13

VM_InitFunction · 0.85
SupportedIOSFunction · 0.85
ipl_set_configFunction · 0.85
USBGeckoOutputFunction · 0.85
InitVideoFunction · 0.85
InitialiseAudioFunction · 0.85
WiiDRC_InitFunction · 0.85
WiiDRC_InitedFunction · 0.85
SetupPadsFunction · 0.85
InitDeviceThreadFunction · 0.85
MountAllFATFunction · 0.85
InitMem2ManagerFunction · 0.85

Tested by

no test coverage detected