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

            glcontext = CoreComm.RequestGLContext(3, 0, true);
            CoreComm.ActivateGLContext(glcontext);

            logcallback = new PPSSPPDll.LogCB(LogCallbackFunc);

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

            LogFlush();
            if (!good)
            {
                throw new Exception("PPSSPP Init failed!");
            }

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

            attachedcore = this;
        }
Beispiel #2
0
        public Yabause(CoreComm CoreComm, DiscSystem.Disc CD, object syncSettings)
        {
            ServiceProvider = new BasicServiceProvider(this);
            byte[] bios = CoreComm.CoreFileProvider.GetFirmware("SAT", "J", true, "Saturn BIOS is required.");
            CoreComm.RomStatusDetails = string.Format("Disk partial hash:{0}", new DiscSystem.DiscHasher(CD).OldHash());
            this.CoreComm             = CoreComm;
            this.CD          = CD;
            DiscSectorReader = new DiscSystem.DiscSectorReader(CD);

            SyncSettings = (SaturnSyncSettings)syncSettings ?? new SaturnSyncSettings();

            if (this.SyncSettings.UseGL && glContext == null)
            {
                glContext = CoreComm.RequestGLContext(2, 0, false);
            }

            ResetCounters();

            ActivateGL();
            Init(bios);

            InputCallbackH = new LibYabause.InputCallback(() => InputCallbacks.Call());
            LibYabause.libyabause_setinputcallback(InputCallbackH);
            ConnectTracer();
            DriveLightEnabled = true;

            DeactivateGL();
        }
Beispiel #3
0
        public Yabause(CoreComm CoreComm, DiscSystem.Disc CD, object SyncSettings)
        {
            byte[] bios = CoreComm.CoreFileProvider.GetFirmware("SAT", "J", true, "Saturn BIOS is required.");
            CoreComm.RomStatusDetails = string.Format("Disk partial hash:{0}", CD.GetHash());
            this.CoreComm             = CoreComm;
            this.CD = CD;

            this.SyncSettings = (SaturnSyncSettings)SyncSettings ?? new SaturnSyncSettings();

            if (this.SyncSettings.UseGL && glContext == null)
            {
                glContext = CoreComm.RequestGLContext();
            }


            ResetCounters();

            ActivateGL();
            Init(bios);

            InputCallbackH = new LibYabause.InputCallback(() => CoreComm.InputCallback.Call());
            LibYabause.libyabause_setinputcallback(InputCallbackH);
            CoreComm.UsesDriveLed = true;

            DeactivateGL();
        }