예제 #1
0
 protected void InitializeFIFO()
 {
     FIFO_Memory = new MemoryBlock(ReadRegister(Register.MemStart), ReadRegister(Register.MemSize));
     FIFO_Memory[(uint)FIFO.Min]     = 16;
     FIFO_Memory[(uint)FIFO.Max]     = FIFO_Memory.Size;
     FIFO_Memory[(uint)FIFO.NextCmd] = 16;
     FIFO_Memory[(uint)FIFO.Stop]    = 16;
     WriteRegister(Register.ConfigDone, 1);
 }
예제 #2
0
        public override void Initialize()
        {
            device = (PCIDeviceNormal)Cosmos.Core.PCI.GetDevice(0x15AD, 0x0405);
            device.EnableMemory(true);
            uint basePort = device.BaseAddresses[0].BaseAddress();

            IndexPort = new IOPort((ushort)(basePort + (uint)IOPortOffset.Index));
            ValuePort = new IOPort((ushort)(basePort + (uint)IOPortOffset.Value));
            BiosPort  = new IOPort((ushort)(basePort + (uint)IOPortOffset.Bios));
            IRQPort   = new IOPort((ushort)(basePort + (uint)IOPortOffset.IRQ));

            WriteRegister(Register.ID, (uint)ID.V2);
            if (ReadRegister(Register.ID) != (uint)ID.V2)
            {
                return;
            }

            Video_Memory = new MemoryBlock(ReadRegister(Register.FrameBufferStart), ReadRegister(Register.VRamSize));
            InitializeFIFO();
        }
예제 #3
0
 protected void InitializeFIFO()
 {
     FIFO_Memory = new MemoryBlock(ReadRegister(Register.MemStart), ReadRegister(Register.MemSize));
     FIFO_Memory[(uint)FIFO.Min] = (uint)Register.FifoNumRegisters * sizeof(uint);
     FIFO_Memory[(uint)FIFO.Max] = FIFO_Memory.Size;
     FIFO_Memory[(uint)FIFO.NextCmd] = FIFO_Memory[(uint)FIFO.Min];
     FIFO_Memory[(uint)FIFO.Stop] = FIFO_Memory[(uint)FIFO.Min];
     WriteRegister(Register.ConfigDone, 1);
 }
예제 #4
0
        public VMWareSVGAII()
        {
            device = (PCIDeviceNormal)(Cosmos.HAL.PCI.GetDevice(0x15AD, 0x0405));
            device.EnableMemory(true);
            uint basePort = device.BaseAddresses[0].BaseAddress();
            IndexPort = new IOPort((ushort)(basePort + (uint)IOPortOffset.Index));
            ValuePort = new IOPort((ushort)(basePort + (uint)IOPortOffset.Value));
            BiosPort = new IOPort((ushort)(basePort + (uint)IOPortOffset.Bios));
            IRQPort = new IOPort((ushort)(basePort + (uint)IOPortOffset.IRQ));

            WriteRegister(Register.ID, (uint)ID.V2);
            if (ReadRegister(Register.ID) != (uint)ID.V2)
                return;

            Video_Memory = new MemoryBlock(ReadRegister(Register.FrameBufferStart), ReadRegister(Register.VRamSize));
            capabilities = ReadRegister(Register.Capabilities);
            InitializeFIFO();
        }