Exemple #1
0
        public PSP(CoreComm comm, string isopath)
        {
            ServiceProvider = new BasicServiceProvider(this);
            if (attachedcore != null)
            {
                attachedcore.Dispose();
                attachedcore = null;
            }
            CoreComm = comm;

            logcallback = new PPSSPPDll.LogCB(LogCallbackFunc);

            bool good = PPSSPPDll.init(isopath, logcallback);

            LogFlush();
            if (!good)
            {
                throw new Exception("PPSSPP Init failed!");
            }
            vidhandle = GCHandle.Alloc(screenbuffer, GCHandleType.Pinned);
            PPSSPPDll.setvidbuff(vidhandle.AddrOfPinnedObject());

            CoreComm.VsyncDen         = 1;
            CoreComm.VsyncNum         = 60;
            CoreComm.RomStatusDetails = "It puts the scythe in the chicken or it gets the abyss again!";

            attachedcore = this;
        }
Exemple #2
0
 public void Dispose()
 {
     if (!disposed)
     {
         vidhandle.Free();
         PPSSPPDll.setvidbuff(IntPtr.Zero);
         PPSSPPDll.die();
         logcallback = null;
         disposed    = true;
         LogFlush();
         Console.WriteLine("PSP Core Disposed.");
     }
 }