Inheritance: PspPluginImpl
Beispiel #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="PspConfig"></param>
        /// <param name="Memory"></param>
        public override void InitializeComponent()
        {
            if (sizeof(GpuStateStruct) > sizeof(uint) * 512)
            {
                throw (new InvalidProgramException("GpuStateStruct too big. Maybe x64? . Size: " + sizeof(GpuStateStruct)));
            }

            this.PspConfig            = PspEmulatorContext.PspConfig;
            this.Memory               = PspEmulatorContext.GetInstance <PspMemory>();
            this.GpuImpl              = PspEmulatorContext.GetInstance <GpuImpl>();
            this.DisplayListQueue     = new LinkedList <GpuDisplayList>();
            this.DisplayListFreeQueue = new Queue <GpuDisplayList>();
            for (int n = 0; n < DisplayLists.Length; n++)
            {
                var DisplayList = new GpuDisplayList(Memory, this, n);
                this.DisplayLists[n] = DisplayList;
                //this.DisplayListFreeQueue.Enqueue(DisplayLists[n]);
                EnqueueFreeDisplayList(DisplayLists[n]);
            }
        }
Beispiel #2
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="PspConfig"></param>
        /// <param name="Memory"></param>
        public override void InitializeComponent()
        {
            if (sizeof(GpuStateStruct) > sizeof(uint) * 512)
            {
                throw (new InvalidProgramException("GpuStateStruct too big. Maybe x64? . Size: " + sizeof(GpuStateStruct)));
            }

            this.PspConfig = PspEmulatorContext.PspConfig;
            this.Memory = PspEmulatorContext.GetInstance<PspMemory>();
            this.GpuImpl = PspEmulatorContext.GetInstance<GpuImpl>();
            this.DisplayListQueue = new LinkedList<GpuDisplayList>();
            this.DisplayListFreeQueue = new Queue<GpuDisplayList>();
            for (int n = 0; n < DisplayLists.Length; n++)
            {
                var DisplayList = new GpuDisplayList(Memory, this, n);
                this.DisplayLists[n] = DisplayList;
                //this.DisplayListFreeQueue.Enqueue(DisplayLists[n]);
                EnqueueFreeDisplayList(DisplayLists[n]);
            }
        }