Inheritance: CSPspEmu.Core.PspEmulatorComponent, IDisposable
Ejemplo n.º 1
0
		public void SetUp()
		{
			PspConfig = new PspConfig();
			PspConfig.HleModulesDll = Assembly.GetExecutingAssembly();
			PspEmulatorContext = new PspEmulatorContext(PspConfig);
			PspEmulatorContext.SetInstanceType<PspMemory, LazyPspMemory>();
			PspEmulatorContext.SetInstanceType<GpuImpl, GpuImplNull>();
			PspEmulatorContext.SetInstanceType<PspAudioImpl, AudioImplNull>();
			Memory = PspEmulatorContext.GetInstance<PspMemory>();
			ThreadManager = PspEmulatorContext.GetInstance<HleThreadManager>();

			Processor = PspEmulatorContext.GetInstance<CpuProcessor>();
			MipsAssembler = new MipsAssembler(new PspMemoryStream(Memory));
		}
Ejemplo n.º 2
0
            public void Init(HleThreadManager ThreadManager, PspMemory PspMemory, HleMemoryManager MemoryManager)
            {
                var BlockType = Attributes.HasFlag(MsgPipeAttributes.UseHighAddress)
                    ? MemoryPartition.Anchor.High
                    : MemoryPartition.Anchor.Low
                ;

                this.ThreadManager = ThreadManager;
                this.PspMemory = PspMemory;
                this.PoolPartition = MemoryManager.GetPartition(PartitionId).Allocate(
                    Size,
                    BlockType,
                    Alignment: 16,
                    Name: "<MsgPipe> : " + Name
                );
            }
Ejemplo n.º 3
0
        public HleThread(PspEmulatorContext PspEmulatorContext, CpuThreadState CpuThreadState)
        {
            this.HleInterruptManager = PspEmulatorContext.GetInstance<HleInterruptManager>();
            this.HleThreadManager = PspEmulatorContext.GetInstance<HleThreadManager>();
            this.MethodCache = CpuThreadState.CpuProcessor.MethodCache;
            this.PspConfig = CpuThreadState.CpuProcessor.PspConfig;

            if (this.PspConfig.UseCoRoutines)
            {
                this.Coroutine = HleThreadManager.Processor.CoroutinePool.CreateCoroutine(this.Name, MainLoop);
            }
            else
            {
                this.GreenThread = new GreenThread();
                GreenThread.InitAndStartStopped(MainLoop);
            }

            this.CpuThreadState = CpuThreadState;
        }
Ejemplo n.º 4
0
		public int sceKernelResumeDispatchThread(HleThreadManager.SCE_KERNEL_DISPATCHTHREAD_STATE State)
		{
			ThreadManager.DispatchingThreads = State;
			return 0;
		}