Exemplo n.º 1
0
        public override void InitializeComponent()
        {
            this.IsRunning     = true;
            this.CpuProcessor  = PspEmulatorContext.GetInstance <CpuProcessor>();
            this.GpuProcessor  = PspEmulatorContext.GetInstance <GpuProcessor>();
            this.PspAudio      = PspEmulatorContext.GetInstance <PspAudio>();
            this.PspConfig     = PspEmulatorContext.PspConfig;
            this.PspRtc        = PspEmulatorContext.GetInstance <PspRtc>();
            this.PspDisplay    = PspEmulatorContext.GetInstance <PspDisplay>();
            this.PspController = PspEmulatorContext.GetInstance <PspController>();

            this.MipsEmiter = new MipsEmiter();
            this.Kirk       = new Kirk();
            this.Kirk.kirk_init();

            this.HleOutputHandler = PspEmulatorContext.GetInstance <HleOutputHandler>();

            // @TODO FIX! New Instances!?
            this.ThreadManager       = PspEmulatorContext.GetInstance <HleThreadManager>();
            this.SemaphoreManager    = PspEmulatorContext.GetInstance <HleSemaphoreManager>();
            this.EventFlagManager    = PspEmulatorContext.GetInstance <HleEventFlagManager>();
            this.MemoryManager       = new HleMemoryManager(this.CpuProcessor.Memory);
            this.ModuleManager       = PspEmulatorContext.GetInstance <HleModuleManager>();
            this.CallbackManager     = PspEmulatorContext.GetInstance <HleCallbackManager>();
            this.HleIoManager        = PspEmulatorContext.GetInstance <HleIoManager>();
            this.HleRegistryManager  = PspEmulatorContext.GetInstance <HleRegistryManager>();
            this.HleInterruptManager = PspEmulatorContext.GetInstance <HleInterruptManager>();
        }
Exemplo 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);
            }