public int sceIoAddDrv(PspIoDrv *PspIoDrv) { var Name = Memory.ReadStringz(PspIoDrv->name, Encoding.UTF8); HleIoManager.SetDriver(Name + ":", new GuestHleIoDriver(InjectContext, PspIoDrv)); return(0); }
void IInjectInitialize.Initialize() { var iso = IsoLoader.GetIso("../../../pspautotests/input/iotest.iso"); var umd = new HleIoDriverIso(iso); HleIoManager.SetDriver("disc:", umd); HleIoManager.Chdir("disc0:/PSP_GAME/USRDIR"); BootBinFileHandle = IoFileMgrForUser.sceIoOpen("disc0:/PSP_GAME/SYSDIR/BOOT.BIN", HleIoFlags.Read, SceMode.All); }
void RegisterDevices() { var memoryStickRootFolder = ApplicationPaths.MemoryStickRootFolder; //Console.Error.WriteLine(MemoryStickRootFolder); //Console.ReadKey(); try { Directory.CreateDirectory(memoryStickRootFolder); } catch (Exception e) { Console.WriteLine(e); } /* */ MemoryStickMountable = new HleIoDriverMountable(); MemoryStickMountable.Mount("/", new HleIoDriverLocalFileSystem(memoryStickRootFolder)); var memoryStick = new HleIoDriverMemoryStick(PspMemory, HleCallbackManager, MemoryStickMountable); //var MemoryStick = new HleIoDriverMemoryStick(new HleIoDriverLocalFileSystem(VirtualDirectory).AsReadonlyHleIoDriver()); // http://forums.ps2dev.org/viewtopic.php?t=5680 HleIoManager.SetDriver("host:", memoryStick); HleIoManager.SetDriver("ms:", memoryStick); HleIoManager.SetDriver("fatms:", memoryStick); HleIoManager.SetDriver("fatmsOem:", memoryStick); HleIoManager.SetDriver("mscmhc:", memoryStick); HleIoManager.SetDriver("msstor:", new ReadonlyHleIoDriver(memoryStick)); HleIoManager.SetDriver("msstor0p:", new ReadonlyHleIoDriver(memoryStick)); HleIoManager.SetDriver("disc:", memoryStick); HleIoManager.SetDriver("umd:", memoryStick); HleIoManager.SetDriver("emulator:", HleIoDriverEmulator); HleIoManager.SetDriver("kemulator:", HleIoDriverEmulator); HleIoManager.SetDriver("flash:", new HleIoDriverZip(new ZipArchive(ResourceArchive.GetFlash0ZipFileStream()))); }