public void stopModules() { if (!modulesStarted) { return; } for (DefaultModule defaultModule : DefaultModule.values()) { defaultModule.module.stop(); } modulesStarted = false; }
// Add modules in flash (or on UMD) that aren't loaded by default on this firmwareVersion private void initialiseFlash0PRXMap() { flash0prxMap = new HashMap<String, List<HLEModule>>(); for (DefaultModule defaultModule : DefaultModule.values()) { if (!defaultModule.isLoadedByDefault(firmwareVersion)) { String[] prxNames = defaultModule.getPrxNames(); for (int i = 0; prxNames != null && i < prxNames.length; i++) { addToFlash0PRXMap(prxNames[i], defaultModule.getModule()); } } } }
public void startModules(boolean startFromSyscall) { if (modulesStarted) { return; } this.startFromSyscall = startFromSyscall; for (DefaultModule defaultModule : DefaultModule.values()) { defaultModule.module.start(); } this.startFromSyscall = false; modulesStarted = true; }
/** Install the modules that are loaded by default on the current firmware version. */ private void installDefaultModules() { if (log.isDebugEnabled()) { log.debug(String.format("Loading HLE firmware up to version %d", firmwareVersion)); } for (DefaultModule defaultModule : DefaultModule.values()) { if (defaultModule.isLoadedByDefault(firmwareVersion)) { installModuleWithAnnotations(defaultModule.getModule(), firmwareVersion); } else { // This module is not loaded by default on this firmware version. // Install and Uninstall the module to register the module syscalls // so that the loader can still resolve the imports for this module. installModuleWithAnnotations(defaultModule.getModule(), firmwareVersion); uninstallModuleWithAnnotations(defaultModule.getModule(), firmwareVersion); } } }