/// <summary> /// Add a NID loaded from a module. /// </summary> /// <param name="module"> the loaded module </param> /// <param name="moduleName"> the module name </param> /// <param name="nid"> the nid </param> /// <param name="address"> the address of the nid </param> /// <param name="variableExport"> coming from a function or variable export </param> public virtual void addModuleNid(SceModule module, string moduleName, int nid, int address, bool variableExport) { address &= Memory.addressMask; NIDInfo info = getNIDInfoByNid(moduleName, nid); if (info != null) { // Only modules from flash0 are allowed to overwrite NIDs from syscalls if (string.ReferenceEquals(module.pspfilename, null) || !module.pspfilename.StartsWith("flash0:", StringComparison.Ordinal)) { return; } if (log.InfoEnabled) { Console.WriteLine(string.Format("NID {0}[0x{1:X8}] at address 0x{2:X8} from module '{3}' overwriting an HLE syscall", info.Name, nid, address, moduleName)); } info.overwrite(address); addressMap[address] = info; } else { info = new NIDInfo(nid, address, moduleName, variableExport); addNIDInfo(info); } }
public virtual void addModule(SceModule module) { moduleCount++; moduleNumToModule[moduleCount] = module; moduleUidToModule[module.modid] = module; moduleNameToModule[module.modname] = module; }
private void addFunctionNid(int moduleAddress, SceModule module, string name) { int nid = HLEModuleManager.Instance.getNIDFromFunctionName(name); if (nid != 0) { int address = module.text_addr + moduleAddress; LoadCoreForKernelModule.addFunctionNid(address, nid); } }
public virtual int sceKernelSearchModuleByName(PspString name) { SceModule module = Managers.modules.getModuleByName(name.String); if (module == null) { return(SceKernelErrors.ERROR_KERNEL_UNKNOWN_MODULE); } return(module.modid); }
public virtual void initNewPsp(bool fromSyscall) { moduleLoaded = false; HLEModuleManager.Instance.stopModules(); NIDMapper.Instance.unloadAll(); RuntimeContext.reset(); if (!fromSyscall) { // Do not reset the profiler if we have been called from sceKernelLoadExec Profiler.reset(); GEProfiler.reset(); // Do not reset the clock if we have been called from sceKernelLoadExec Clock.reset(); } Processor.reset(); Scheduler.reset(); Memory mem = Memory.Instance; if (!fromSyscall) { // Clear all memory, including VRAM. mem.Initialise(); } else { // Clear all memory excepted VRAM. // E.g. screen is not cleared when executing syscall sceKernelLoadExec(). mem.memset(MemoryMap.START_SCRATCHPAD, (sbyte)0, MemoryMap.SIZE_SCRATCHPAD); mem.memset(MemoryMap.START_RAM, (sbyte)0, MemoryMap.SIZE_RAM); } Battery.initialize(); Wlan.initialize(); SceModule.ResetAllocator(); SceUidManager.reset(); HLEUidObjectMapping.reset(); ProOnlineNetworkAdapter.init(); if (State.fileLogger != null) { State.fileLogger.resetLogging(); } MemorySections.Instance.reset(); HLEModuleManager.Instance.init(); Managers.reset(); Modules.SysMemUserForUserModule.start(); Modules.SysMemUserForUserModule.FirmwareVersion = firmwareVersion; Modules.ThreadManForUserModule.start(); }
public virtual void removeModule(int uid) { if (moduleCount > 0) { moduleCount--; } SceModule sceModule = moduleUidToModule.Remove(uid); if (sceModule != null) { moduleNameToModule.Remove(sceModule.modname); } }
public virtual int sceUsbStop(PspString driverName, int size, TPointer args) { usbStarted = false; SceModule module = loadedModules.Remove(driverName.String); if (module != null) { HLEModuleManager moduleManager = HLEModuleManager.Instance; moduleManager.UnloadFlash0Module(module); } notifyCallback(); return(0); }
public virtual int sceUsbStart(string driverName, int size, TPointer args) { usbStarted = true; HLEModuleManager moduleManager = HLEModuleManager.Instance; if (moduleManager.hasFlash0Module(driverName)) { Console.WriteLine(string.Format("Loading HLE module '{0}'", driverName)); int sceModuleId = moduleManager.LoadFlash0Module(driverName); SceModule module = Managers.modules.getModuleByUID(sceModuleId); loadedModules[driverName] = module; } notifyCallback(); return(0); }
/// <summary> /// SceKernelModuleInfo contains a subset of the data in SceModule </summary> public virtual void copy(SceModule sceModule) { nsegment = unchecked ((sbyte)(sceModule.nsegment & 0xFF)); segmentaddr[0] = sceModule.segmentaddr[0]; segmentaddr[1] = sceModule.segmentaddr[1]; segmentaddr[2] = sceModule.segmentaddr[2]; segmentaddr[3] = sceModule.segmentaddr[3]; segmentsize[0] = sceModule.segmentsize[0]; segmentsize[1] = sceModule.segmentsize[1]; segmentsize[2] = sceModule.segmentsize[2]; segmentsize[3] = sceModule.segmentsize[3]; entry_addr = sceModule.entry_addr; gp_value = sceModule.gp_value; text_addr = sceModule.text_addr; text_size = sceModule.text_size; data_size = sceModule.data_size; bss_size = sceModule.bss_size; attribute = sceModule.attribute; version[0] = sceModule.version[0]; version[1] = sceModule.version[1]; name = sceModule.modname; }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET: //ORIGINAL LINE: public pspsharp.HLE.kernel.types.SceModule load(String pspfilename, ByteBuffer f, bool fromSyscall) throws java.io.IOException, GeneralJpcspException public virtual SceModule load(string pspfilename, ByteBuffer f, bool fromSyscall) { initNewPsp(fromSyscall); HLEModuleManager.Instance.loadAvailableFlash0Modules(fromSyscall); int loadAddress = LoadAddress; module = Loader.Instance.LoadModule(pspfilename, f, loadAddress, USER_PARTITION_ID, USER_PARTITION_ID, false, true, fromSyscall); if ((module.fileFormat & Loader.FORMAT_ELF) != Loader.FORMAT_ELF) { throw new GeneralJpcspException("File format not supported!"); } if (isBootModuleBad(module.modname)) { JpcspDialogManager.showError(null, java.util.ResourceBundle.getBundle("pspsharp/languages/pspsharp").getString("Emulator.strPrometheusLoader.text")); } moduleLoaded = true; initCpu(fromSyscall); // Delete breakpoints and reset to PC if (State.debugger != null) { State.debugger.resetDebugger(); } // Update instruction counter dialog with the new app if (instructionCounter != null) { instructionCounter.Module = module; } return(module); }
public virtual int sceKernelLoadExecNpDrm(PspString fileName, TPointer optionAddr) { // Flush system memory to mimic a real PSP reset. Modules.SysMemUserForUserModule.reset(); if (optionAddr.NotNull) { int optSize = optionAddr.getValue32(0); // Size of the option struct. int argSize = optionAddr.getValue32(4); // Number of args (strings). int argAddr = optionAddr.getValue32(8); // Pointer to a list of strings. int keyAddr = optionAddr.getValue32(12); // Pointer to an encryption key (may not be used). //if (log.DebugEnabled) { Console.WriteLine(string.Format("sceKernelLoadExecNpDrm (params: optSize={0:D}, argSize={1:D}, argAddr=0x{2:X8}, keyAddr=0x{3:X8})", optSize, argSize, argAddr, keyAddr)); } } // SPRX modules can't be decrypted yet. if (!DisableDLCStatus) { Console.WriteLine(string.Format("sceKernelLoadModuleNpDrm detected encrypted DLC module: {0}", fileName.String)); return(SceKernelErrors.ERROR_NPDRM_INVALID_PERM); } int result; try { SeekableDataInput moduleInput = Modules.IoFileMgrForUserModule.getFile(fileName.String, IoFileMgrForUser.PSP_O_RDONLY); if (moduleInput != null) { sbyte[] moduleBytes = new sbyte[(int)moduleInput.Length()]; moduleInput.readFully(moduleBytes); moduleInput.Dispose(); ByteBuffer moduleBuffer = ByteBuffer.wrap(moduleBytes); SceModule module = Emulator.Instance.load(fileName.String, moduleBuffer, true); Emulator.Clock.resume(); if ((module.fileFormat & Loader.FORMAT_ELF) == Loader.FORMAT_ELF) { result = 0; } else { Console.WriteLine("sceKernelLoadExecNpDrm - failed, target is not an ELF"); result = SceKernelErrors.ERROR_KERNEL_ILLEGAL_LOADEXEC_FILENAME; } } else { result = SceKernelErrors.ERROR_KERNEL_PROHIBIT_LOADEXEC_DEVICE; } } catch (GeneralJpcspException e) { Console.WriteLine("sceKernelLoadExecNpDrm", e); result = SceKernelErrors.ERROR_KERNEL_PROHIBIT_LOADEXEC_DEVICE; } catch (IOException e) { Console.WriteLine(string.Format("sceKernelLoadExecNpDrm - Error while loading module '{0}'", fileName), e); result = SceKernelErrors.ERROR_KERNEL_PROHIBIT_LOADEXEC_DEVICE; } return(result); }
public virtual int hleKernelLoadExec(ByteBuffer moduleBuffer, int argSize, int argAddr, string moduleFileName, UmdIsoReader iso) { sbyte[] arguments = null; if (argSize > 0) { // Save the memory content for the arguments because // the memory would be overwritten by the loading of the new module. arguments = new sbyte[argSize]; IMemoryReader memoryReader = MemoryReader.getMemoryReader(argAddr, argSize, 1); for (int i = 0; i < argSize; i++) { arguments[i] = (sbyte)memoryReader.readNext(); } } // Flush system memory to mimic a real PSP reset. Modules.SysMemUserForUserModule.reset(); try { if (moduleBuffer != null) { SceModule module = Emulator.Instance.load(moduleFileName, moduleBuffer, true); Emulator.Clock.resume(); // After a sceKernelLoadExec, host0: is relative to the directory where // the loaded file (prx) was located. // E.g.: // after // sceKernelLoadExec("disc0:/PSP_GAME/USRDIR/A.PRX") // the following file access // sceIoOpen("host0:B") // is actually referencing the file // disc0:/PSP_GAME/USRDIR/B if (!string.ReferenceEquals(moduleFileName, null)) { int pathIndex = moduleFileName.LastIndexOf("/", StringComparison.Ordinal); if (pathIndex >= 0) { Modules.IoFileMgrForUserModule.Host0Path = moduleFileName.Substring(0, pathIndex + 1); } } if ((module.fileFormat & Loader.FORMAT_ELF) != Loader.FORMAT_ELF) { Console.WriteLine("sceKernelLoadExec - failed, target is not an ELF"); throw new SceKernelErrorException(ERROR_KERNEL_ILLEGAL_LOADEXEC_FILENAME); } // Set the given arguments to the root thread. // Do not pass the file name as first parameter (tested on PSP). SceKernelThreadInfo rootThread = Modules.ThreadManForUserModule.getRootThread(module); Modules.ThreadManForUserModule.hleKernelSetThreadArguments(rootThread, arguments, argSize); // The memory model (32MB / 64MB) could have been changed, update the RuntimeContext RuntimeContext.updateMemory(); if (iso != null) { Modules.IoFileMgrForUserModule.IsoReader = iso; Modules.sceUmdUserModule.IsoReader = iso; } } } catch (GeneralJpcspException e) { Console.WriteLine("General Error", e); Emulator.PauseEmu(); } catch (IOException e) { Console.WriteLine(string.Format("sceKernelLoadExec - Error while loading module '{0}'", moduleFileName), e); return(ERROR_KERNEL_PROHIBIT_LOADEXEC_DEVICE); } return(0); }
public virtual int sceKernelLoadModuleToBlock(PspString path, int blockId, TPointer32 separatedBlockId, int unknown2, TPointer optionAddr) { SceKernelLMOption lmOption = null; if (optionAddr.NotNull) { lmOption = new SceKernelLMOption(); lmOption.read(optionAddr); if (log.InfoEnabled) { Console.WriteLine(string.Format("sceKernelLoadModuleToBlock options: {0}", lmOption)); } } SysMemInfo sysMemInfo = Modules.SysMemUserForUserModule.getSysMemInfo(blockId); if (sysMemInfo == null) { return(-1); } //if (log.DebugEnabled) { Console.WriteLine(string.Format("sceKernelLoadModuleToBlock sysMemInfo={0}", sysMemInfo)); } modulesWithMemoryAllocated.Add(path.String); // If we cannot load the module file, return the same blockId separatedBlockId.setValue(blockId); StringBuilder localFileName = new StringBuilder(); IVirtualFileSystem vfs = Modules.IoFileMgrForUserModule.getVirtualFileSystem(path.String, localFileName); if (vfs != null) { IVirtualFile vFile = vfs.ioOpen(localFileName.ToString(), IoFileMgrForUser.PSP_O_RDONLY, 0); if (vFile != null) { sbyte[] bytes = new sbyte[(int)vFile.Length()]; int Length = vFile.ioRead(bytes, 0, bytes.Length); ByteBuffer moduleBuffer = ByteBuffer.wrap(bytes, 0, Length); SceModule module = Modules.ModuleMgrForUserModule.getModuleInfo(path.String, moduleBuffer, sysMemInfo.partitionid, sysMemInfo.partitionid); if (module != null) { int size = Modules.ModuleMgrForUserModule.getModuleRequiredMemorySize(module); //if (log.DebugEnabled) { Console.WriteLine(string.Format("sceKernelLoadModuleToBlock module requiring 0x{0:X} bytes", size)); } // Aligned on 256 bytes boundary size = Utilities.alignUp(size, 0xFF); SysMemInfo separatedSysMemInfo = Modules.SysMemUserForUserModule.separateMemoryBlock(sysMemInfo, size); // This is the new blockId after calling sceKernelSeparateMemoryBlock separatedBlockId.setValue(separatedSysMemInfo.uid); //if (log.DebugEnabled) { Console.WriteLine(string.Format("sceKernelLoadModuleToBlock separatedSysMemInfo={0}", separatedSysMemInfo)); } } } } LoadModuleContext loadModuleContext = new LoadModuleContext(); loadModuleContext.fileName = path.String; loadModuleContext.lmOption = lmOption; loadModuleContext.needModuleInfo = true; loadModuleContext.allocMem = false; loadModuleContext.baseAddr = sysMemInfo.addr; loadModuleContext.basePartition = sysMemInfo.partitionid; return(Modules.ModuleMgrForUserModule.hleKernelLoadModule(loadModuleContext)); }
public virtual bool loadAndRun() { if (!enableReboot) { return(false); } Memory mem = Memory.Instance; StringBuilder localFileName = new StringBuilder(); IVirtualFileSystem vfs = Modules.IoFileMgrForUserModule.getVirtualFileSystem(rebootFileName, localFileName); if (vfs == null) { return(false); } IVirtualFile vFile = vfs.ioOpen(localFileName.ToString(), IoFileMgrForUser.PSP_O_RDONLY, 0); if (vFile == null) { return(false); } int rebootFileLength = (int)vFile.Length(); if (rebootFileLength <= 0) { return(false); } SceModule rebootModule = new SceModule(true); rebootModule.modname = Name; rebootModule.pspfilename = rebootFileName; rebootModule.baseAddress = rebootBaseAddress; rebootModule.text_addr = rebootBaseAddress; rebootModule.text_size = rebootFileLength; rebootModule.data_size = 0; rebootModule.bss_size = 0x26B80; const bool fromSyscall = false; Emulator.Instance.initNewPsp(fromSyscall); Emulator.Instance.ModuleLoaded = true; HLEModuleManager.Instance.startModules(fromSyscall); Modules.ThreadManForUserModule.Initialise(rebootModule, rebootModule.baseAddress, 0, rebootModule.pspfilename, -1, 0, fromSyscall); int rebootMemSize = rebootModule.text_size + rebootModule.data_size + rebootModule.bss_size; SysMemInfo rebootMemInfo = Modules.SysMemUserForUserModule.malloc(VSHELL_PARTITION_ID, "reboot", PSP_SMEM_Addr, rebootMemSize, rebootModule.text_addr); if (rebootMemInfo == null) { return(false); } TPointer rebootBinAddr = new TPointer(mem, rebootBaseAddress); int readLength = vFile.ioRead(rebootBinAddr, rebootFileLength); vFile.ioClose(); if (readLength != rebootFileLength) { return(false); } markMMIO(); addFunctionNames(rebootModule); SysMemInfo rebootParamInfo = Modules.SysMemUserForUserModule.malloc(VSHELL_PARTITION_ID, "reboot-parameters", PSP_SMEM_Addr, 0x10000, rebootParamAddress); TPointer sceLoadCoreBootInfoAddr = new TPointer(mem, rebootParamInfo.addr); SceLoadCoreBootInfo sceLoadCoreBootInfo = new SceLoadCoreBootInfo(); sceLoadCoreBootInfoAddr.clear(0x1000 + 0x1C000 + 0x380); TPointer startAddr = new TPointer(sceLoadCoreBootInfoAddr, 0x1000); TPointer sceKernelLoadExecVSHParamAddr = new TPointer(startAddr, 0x1C000); TPointer loadModeStringAddr = new TPointer(sceKernelLoadExecVSHParamAddr, 48); loadModeStringAddr.StringZ = "vsh"; SceKernelLoadExecVSHParam sceKernelLoadExecVSHParam = new SceKernelLoadExecVSHParam(); sceKernelLoadExecVSHParamAddr.setValue32(48); sceKernelLoadExecVSHParam.flags = 0x10000; sceKernelLoadExecVSHParam.keyAddr = loadModeStringAddr; sceKernelLoadExecVSHParam.write(sceKernelLoadExecVSHParamAddr); sceLoadCoreBootInfo.memBase = MemoryMap.START_KERNEL; sceLoadCoreBootInfo.memSize = MemoryMap.SIZE_RAM; sceLoadCoreBootInfo.startAddr = startAddr; sceLoadCoreBootInfo.endAddr = new TPointer(sceKernelLoadExecVSHParamAddr, 0x380); sceLoadCoreBootInfo.modProtId = -1; sceLoadCoreBootInfo.modArgProtId = -1; sceLoadCoreBootInfo.model = Model.Model; sceLoadCoreBootInfo.dipswLo = Modules.KDebugForKernelModule.sceKernelDipswLow32(); sceLoadCoreBootInfo.dipswHi = Modules.KDebugForKernelModule.sceKernelDipswHigh32(); sceLoadCoreBootInfo.unknown72 = MemoryMap.END_USERSPACE | unchecked ((int)0x80000000); // Must be larger than 0x89000000 + size of pspbtcnf.bin file sceLoadCoreBootInfo.cpTime = Modules.KDebugForKernelModule.sceKernelDipswCpTime(); sceLoadCoreBootInfo.write(sceLoadCoreBootInfoAddr); SceKernelThreadInfo rootThread = Modules.ThreadManForUserModule.getRootThread(null); if (rootThread != null) { rootThread.cpuContext._a0 = sceLoadCoreBootInfoAddr.Address; rootThread.cpuContext._a1 = sceKernelLoadExecVSHParamAddr.Address; rootThread.cpuContext._a2 = SCE_INIT_APITYPE_KERNEL_REBOOT; rootThread.cpuContext._a3 = Modules.SysMemForKernelModule.sceKernelGetInitialRandomValue(); } // This will set the Log4j MDC values for the root thread Emulator.Scheduler.addAction(new SetLog4jMDC()); //if (log.DebugEnabled) { Console.WriteLine(string.Format("sceReboot arg0={0}, arg1={1}", sceLoadCoreBootInfoAddr, sceKernelLoadExecVSHParamAddr)); } return(true); }
private void addFunctionNames(SceModule rebootModule) { // These function names are taken from uOFW (https://github.com/uofw/uofw) LoadCoreForKernelModule.addFunctionName("sceInit", 0x0080, "sceInit.patchGames"); LoadCoreForKernelModule.addFunctionName("sceInit", 0x0218, "sceInit.InitCBInit"); LoadCoreForKernelModule.addFunctionName("sceInit", 0x02E0, "sceInit.ExitInit"); LoadCoreForKernelModule.addFunctionName("sceInit", 0x03F4, "sceInit.ExitCheck"); LoadCoreForKernelModule.addFunctionName("sceInit", 0x0438, "sceInit.PowerUnlock"); LoadCoreForKernelModule.addFunctionName("sceInit", 0x048C, "sceInit.invoke_init_callback"); LoadCoreForKernelModule.addFunctionName("sceInit", 0x05F0, "sceInit.sub_05F0"); LoadCoreForKernelModule.addFunctionName("sceInit", 0x06A8, "sceInit.CleanupPhase1"); LoadCoreForKernelModule.addFunctionName("sceInit", 0x0790, "sceInit.CleanupPhase2"); LoadCoreForKernelModule.addFunctionName("sceInit", 0x08F8, "sceInit.ProtectHandling"); LoadCoreForKernelModule.addFunctionName("sceInit", 0x0CFC, "sceInit.sub_0CFC_IsModuleInUserPartition"); LoadCoreForKernelModule.addFunctionName("sceInit", 0x0D4C, "sceInit.ClearFreeBlock"); LoadCoreForKernelModule.addFunctionName("sceInit", 0x0DD0, "sceInit.sub_0DD0_IsApplicationTypeGame"); LoadCoreForKernelModule.addFunctionName("sceInit", 0x1038, "sceInit.LoadModuleBufferAnchorInBtcnf"); LoadCoreForKernelModule.addFunctionName("sceInit", 0x1240, "sceInit.InitThreadEntry"); LoadCoreForKernelModule.addFunctionName("sceLoaderCore", 0x56B8, "sceLoaderCore.PspUncompress"); LoadCoreForKernelModule.addFunctionName("sceGE_Manager", 0x0258, "sceGE_Manager.sceGeInit"); LoadCoreForKernelModule.addFunctionName("sceMeCodecWrapper", 0x1C04, "sceMeCodecWrapper.decrypt"); LoadCoreForKernelModule.addFunctionName("sceAudio_Driver", 0x0000, "sceAudio_Driver.updateAudioBuf"); LoadCoreForKernelModule.addFunctionName("sceAudio_Driver", 0x137C, "sceAudio_Driver.audioOutput"); LoadCoreForKernelModule.addFunctionName("sceAudio_Driver", 0x0530, "sceAudio_Driver.audioOutputDmaCb"); LoadCoreForKernelModule.addFunctionName("sceAudio_Driver", 0x01EC, "sceAudio_Driver.dmaUpdate"); LoadCoreForKernelModule.addFunctionName("sceAudio_Driver", 0x1970, "sceAudio_Driver.audioIntrHandler"); LoadCoreForKernelModule.addFunctionName("sceAudio_Driver", 0x02B8, "sceAudio_Driver.audioMixerThread"); LoadCoreForKernelModule.addFunctionName("sceSYSCON_Driver", 0x0A10, "sceSYSCON_Driver._sceSysconGpioIntr"); LoadCoreForKernelModule.addFunctionName("sceSYSCON_Driver", 0x2434, "sceSYSCON_Driver._sceSysconPacketEnd"); LoadCoreForKernelModule.addFunctionName("sceDisplay_Service", 0x04EC, "sceDisplay_Service.sceDisplayInit"); LoadCoreForKernelModule.addFunctionName("scePower_Service", 0x0000, "scePower_Service.scePowerInit"); LoadCoreForKernelModule.addFunctionName("sceHP_Remote_Driver", 0x0704, "sceHP_Remote_Driver.sceHpRemoteThreadEntry"); LoadCoreForKernelModule.addFunctionName("sceLowIO_Driver", 0x9C7C, "sceNandTransferDataToNandBuf"); // Mapping of subroutines defined in // https://github.com/uofw/uofw/blob/master/src/reboot/unk.c // and https://github.com/uofw/uofw/blob/master/src/reboot/nand.c addFunctionNid(0x0000EFCC, rebootModule, "sceNandInit2"); addFunctionNid(0x0000F0C4, rebootModule, "sceNandIsReady"); addFunctionNid(0x0000F0D4, rebootModule, "sceNandSetWriteProtect"); addFunctionNid(0x0000F144, rebootModule, "sceNandLock"); addFunctionNid(0x0000F198, rebootModule, "sceNandReset"); addFunctionNid(0x0000F234, rebootModule, "sceNandReadId"); addFunctionNid(0x0000F28C, rebootModule, "sceNandReadAccess"); addFunctionNid(0x0000F458, rebootModule, "sceNandWriteAccess"); addFunctionNid(0x0000F640, rebootModule, "sceNandEraseBlock"); addFunctionNid(0x0000F72C, rebootModule, "sceNandReadExtraOnly"); addFunctionNid(0x0000F8A8, rebootModule, "sceNandReadStatus"); addFunctionNid(0x0000F8DC, rebootModule, "sceNandSetScramble"); addFunctionNid(0x0000F8EC, rebootModule, "sceNandReadPages"); addFunctionNid(0x0000F930, rebootModule, "sceNandWritePages"); addFunctionNid(0x0000F958, rebootModule, "sceNandReadPagesRawExtra"); addFunctionNid(0x0000F974, rebootModule, "sceNandWritePagesRawExtra"); addFunctionNid(0x0000F998, rebootModule, "sceNandReadPagesRawAll"); addFunctionNid(0x0000F9D0, rebootModule, "sceNandTransferDataToNandBuf"); addFunctionNid(0x0000FC40, rebootModule, "sceNandIntrHandler"); addFunctionNid(0x0000FF60, rebootModule, "sceNandTransferDataFromNandBuf"); addFunctionNid(0x000103C8, rebootModule, "sceNandWriteBlockWithVerify"); addFunctionNid(0x0001047C, rebootModule, "sceNandReadBlockWithRetry"); addFunctionNid(0x00010500, rebootModule, "sceNandVerifyBlockWithRetry"); addFunctionNid(0x00010650, rebootModule, "sceNandEraseBlockWithRetry"); addFunctionNid(0x000106C4, rebootModule, "sceNandIsBadBlock"); addFunctionNid(0x00010750, rebootModule, "sceNandDoMarkAsBadBlock"); addFunctionNid(0x000109DC, rebootModule, "sceNandDetectChipMakersBBM"); addFunctionNid(0x00010D1C, rebootModule, "sceNandGetPageSize"); addFunctionNid(0x00010D28, rebootModule, "sceNandGetPagesPerBlock"); addFunctionNid(0x00010D34, rebootModule, "sceNandGetTotalBlocks"); }