• Home
  • Install
  • Cosmos Website
  • Articles
  • Cosmos
  • X#
  • IL2CPU
Show / Hide Table of Contents
  • Cosmos.Core
    • ACPI
    • ACPI.RSDPtr
    • Bootstrap
    • CPU
    • GCImplementation
    • GCTable
    • Global
    • INTs
    • INTs.EFlagsEnum
    • INTs.ExceptionInterruptDelegate
    • INTs.IRQContext
    • INTs.IRQDelegate
    • INTs.MMXContext
    • INTs.TSS
    • IOPort
    • KernelPanics
    • ManagedMemoryBlock
    • MemoryBlock
    • MemoryBlock08
    • MemoryBlock16
    • MemoryBlock32
    • MemoryMapBlock
    • MemoryOperations
    • PIC
    • PIC.Cmd
    • RawMemoryMapBlock
    • VTable
    • VTablesImpl
  • Cosmos.Core.IOGroup
    • ATA
    • PIC
    • PS2Controller
  • Cosmos.Core.Memory
    • Heap
    • HeapLarge
    • HeapMedium
    • HeapSmall
    • ObjectGCStatus
    • RAT
    • RAT.PageType
    • RootSMTBlock
    • SMTBlock
    • SMTPage
  • Cosmos.Core.MemoryGroup
    • AHCI
  • Cosmos.Core.Multiboot
    • Multiboot2
  • Cosmos.Core.Multiboot.Tags
    • AcpiNew
    • AcpiOld
    • BasicMemoryInformation
    • EFI64
    • Framebuffer
    • MB2Tag
    • MemoryMap
  • Cosmos.Core_Asm
    • ArrayClearAsm
    • ArrayGetLengthAsm
    • ArrayImpl
    • ArrayInternalCopyAsm
    • BufferBlockCopyAsm
    • BufferImpl
    • CPUCanReadCPUIDAsm
    • CPUDisableINTsAsm
    • CPUEnableINTsAsm
    • CPUGetEBPValue
    • CPUGetEndOfKernelAsm
    • CPUGetESPValue
    • CPUGetStackStart
    • CPUHaltAsm
    • CPUImpl
    • CPUInitFloatAsm
    • CPUInitSSEAsm
    • CPUReadCPUIDAsm
    • CPUReadModelSpecificRegisterAsm
    • CPUReadTimestampCounterAsm
    • CPUSetESPValue
    • CPUUpdateIDTAsm
    • CPUZeroFillAsm
    • DelegateCtorAsm
    • DelegateGetMulticastInvokeAsm
    • DelegateImpl
    • DelegateInvokeAsm
    • GCImplementationImpl
    • IOPortImpl
    • Multiboot2Impl
    • Multiboot2ImplAsm
    • RuntimeHelpersImpl
  • Cosmos.Core_Asm.MemoryOperations
    • MemoryOperationsCopy128BlocksAsm
    • MemoryOperationsCopy128BytesAsm
    • MemoryOperationsCopy16BytesAsm
    • MemoryOperationsCopy32BytesAsm
    • MemoryOperationsCopy64BytesAsm
    • MemoryOperationsFill16BlocksAsm
  • Cosmos.Debug.Kernel
    • Debugger
    • DebuggerFactory
  • Cosmos.HAL
    • BaudRate
    • Bootstrap
    • CardType
    • ClassID
    • COMPort
    • DataReceivedHandler
    • Device
    • DeviceID
    • Global
    • KeyboardBase
    • KeyboardBase.KeyPressedEventHandler
    • MouseBase
    • MouseBase.MouseChangedEventHandler
    • NetworkDevice
    • PCI
    • PCIBaseAddressBar
    • PCIDevice
    • PCIDevice.Config
    • PCIDevice.DeviceClass
    • PCIDevice.PCIBist
    • PCIDevice.PCICommand
    • PCIDevice.PCIHeaderType
    • PCIDevice.PCIInterruptPIN
    • PCIDeviceBridge
    • PCIDeviceCardbus
    • PCIDeviceNormal
    • PCSpeaker
    • PIT
    • PIT.PITTimer
    • PIT.PITTimer.OnTrigger
    • Power
    • ProgramIF
    • PS2Controller
    • PS2Keyboard
    • PS2Mouse
    • RTC
    • SerialPort
    • SpeakerExtensions
    • SubclassID
    • TextScreen
    • TextScreenBase
    • TextScreenHelpers
    • VendorID
  • Cosmos.HAL.Audio
    • AudioBitDepth
    • AudioBuffer
    • IAudioBufferProvider
    • SampleFormat
  • Cosmos.HAL.BlockDevice
    • AHCI
    • Ata
    • Ata.BusPositionEnum
    • Ata.ControllerIdEnum
    • ATA_PIO
    • ATA_PIO.Cmd
    • ATA_PIO.DvcSelVal
    • ATA_PIO.Ident
    • ATA_PIO.SpecLevel
    • ATA_PIO.Status
    • ATAPI
    • ATAPI.PacketCommands
    • BlockDevice
    • BlockDeviceType
    • EBR
    • EBR.PartInfo
    • GPT
    • GPT.GPartInfo
    • IDE
    • MBR
    • MBR.PartInfo
    • Partition
  • Cosmos.HAL.BlockDevice.Ports
    • SATA
    • SATAPI
    • StoragePort
  • Cosmos.HAL.BlockDevice.Registers
    • AHCISignature
    • ATACommands
    • ATADeviceStatus
    • Base
    • Bases
    • CommandAndStatus
    • CurrentInterfaceSpeedStatus
    • DeviceDetectionStatus
    • FISRegisterD2H
    • FISRegisterH2D
    • FISSize
    • FISType
    • GenericRegisters
    • HBACommandHeader
    • HBACommandTable
    • HBAPRDTEntry
    • InterfacePowerManagementStatus
    • InterruptEnable
    • InterruptStatus
    • PortRegisters
    • PortType
  • Cosmos.HAL.Drivers.Audio
    • AC97
    • AudioDriver
  • Cosmos.HAL.Drivers.Network
    • AMDPCNetII
    • E1000
    • E1000.RXDesc
    • E1000.TXDesc
    • E1000DeviceID
    • RTL8139
  • Cosmos.HAL.Drivers.USB
    • USBHost
  • Cosmos.HAL.Drivers.Video
    • VBEDriver
    • VGADriver
    • VGADriver.ColorDepth
    • VGADriver.ScreenSize
    • VGADriver.TextSize
  • Cosmos.HAL.Drivers.Video.SVGAII
    • Capability
    • FIFO
    • FIFOCommand
    • ID
    • IOPortOffset
    • Register
    • VMWareSVGAII
  • Cosmos.HAL.Network
    • MACAddress
    • NetworkInit
  • Cosmos.System
    • Console
    • ConsoleKeyEx
    • ConsoleKeyExExtensions
    • Durations
    • Global
    • Kernel
    • KeyboardManager
    • KeyEvent
    • KeyEvent.KeyEventType
    • KeyMapping
    • MouseManager
    • MouseState
    • Notes
    • PCSExtensions
    • PCSpeaker
    • Power
    • ScanMapBase
    • VMTools
  • Cosmos.System.Audio
    • AudioManager
    • AudioMixer
    • AudioStream
  • Cosmos.System.Audio.DSP.Processing
    • AudioPostProcessor
    • GainPostProcessor
  • Cosmos.System.Audio.IO
    • AudioBufferReader
    • AudioBufferReadWriteBase
    • AudioBufferWriter
    • MemoryAudioStream
    • SeekableAudioStream
  • Cosmos.System.ExtendedASCII
    • CosmosEncodingProvider
  • Cosmos.System.FileSystem
    • CosmosVFS
    • Disk
    • FileSystem
    • FileSystemFactory
    • ManagedPartition
  • Cosmos.System.FileSystem.FAT
    • FatFileSystemFactory
  • Cosmos.System.FileSystem.FAT.Listing
    • FatDirectoryEntryAttributeConsts
    • FatDirectoryEntryMetadata
    • FatDirectoryEntryMetadata.LongFilenameEntryMetadata
  • Cosmos.System.FileSystem.ISO9660
    • ISO9660FileSystem
    • ISO9660FileSystemFactory
  • Cosmos.System.FileSystem.Listing
    • DirectoryEntry
    • DirectoryEntryTypeEnum
  • Cosmos.System.FileSystem.VFS
    • FileSystemManager
    • VFSBase
    • VFSManager
  • Cosmos.System.Graphics
    • Bitmap
    • Canvas
    • ColorDepth
    • ColorOrder
    • FullScreenCanvas
    • Image
    • ImageFormat
    • Mode
    • SVGAIICanvas
    • VBECanvas
    • VGACanvas
    • VGAScreen
  • Cosmos.System.Graphics.Fonts
    • Font
    • PCScreenFont
    • UnicodeMapping
  • Cosmos.System.Helpers
    • ArrayHelper
  • Cosmos.System.IO
    • ConsoleStream
    • SyncTextReader
  • Cosmos.System.Keyboard
    • KeyEventHelper
  • Cosmos.System.Network
    • EthernetPacket
    • NetworkDebugger
    • NetworkStack
  • Cosmos.System.Network.ARP
    • ARPPacket
  • Cosmos.System.Network.Config
    • DNSConfig
    • IPConfig
    • NetworkConfig
    • NetworkConfiguration
  • Cosmos.System.Network.IPv4
    • Address
    • EndPoint
    • ICMPClient
    • ICMPPacket
    • IPPacket
    • OutgoingBuffer
  • Cosmos.System.Network.IPv4.TCP
    • Flags
    • Status
    • Tcp
    • TCPOption
    • TCPPacket
    • TransmissionControlBlock
  • Cosmos.System.Network.IPv4.UDP
    • UdpClient
    • UDPPacket
  • Cosmos.System.Network.IPv4.UDP.DHCP
    • DHCPClient
    • DHCPOption
    • DHCPPacket
  • Cosmos.System.Network.IPv4.UDP.DNS
    • DNSAnswer
    • DnsClient
    • DNSPacket
    • DNSPacketAnswer
    • DNSPacketAsk
    • DNSQuery
    • ReplyCode
  • Cosmos.System.ScanMaps
    • DEStandardLayout
    • ESStandardLayout
    • FRStandardLayout
    • GBStandardLayout
    • TRStandardLayout
    • US_Dvorak
    • USStandardLayout

Class VGADriver

Inheritance
System.Object
VGADriver
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Cosmos.HAL.Drivers.Video
Assembly: Cosmos.HAL2.dll
Syntax
public class VGADriver

Fields

| Improve this Doc View Source

AttributeController_Index

Attribute controller index port.

Declaration
public const int AttributeController_Index = 960
Field Value
Type Description
System.Int32
| Improve this Doc View Source

AttributeController_Read

Attribute controller read port.

Declaration
public const int AttributeController_Read = 961
Field Value
Type Description
System.Int32
| Improve this Doc View Source

AttributeController_Write

Attribute controller write port.

Declaration
public const int AttributeController_Write = 960
Field Value
Type Description
System.Int32
| Improve this Doc View Source

CGATextMemoryBlock

32KB at 0xB8000

Declaration
public readonly MemoryBlock CGATextMemoryBlock
Field Value
Type Description
MemoryBlock
| Improve this Doc View Source

CRTController_Data

CRT controller data port.

Declaration
public const int CRTController_Data = 981
Field Value
Type Description
System.Int32
| Improve this Doc View Source

CRTController_Index

CRT controller index port.

Declaration
public const int CRTController_Index = 980
Field Value
Type Description
System.Int32
| Improve this Doc View Source

DAC_Data

DAC data port.

Declaration
public const int DAC_Data = 969
Field Value
Type Description
System.Int32
| Improve this Doc View Source

DACIndex_Read

DAC index read port.

Declaration
public const int DACIndex_Read = 967
Field Value
Type Description
System.Int32
| Improve this Doc View Source

DACIndex_Write

DAC index write port.

Declaration
public const int DACIndex_Write = 968
Field Value
Type Description
System.Int32
| Improve this Doc View Source

GraphicsController_Data

Graphics controller data port.

Declaration
public const int GraphicsController_Data = 975
Field Value
Type Description
System.Int32
| Improve this Doc View Source

GraphicsController_Index

Graphics controller index port.

Declaration
public const int GraphicsController_Index = 974
Field Value
Type Description
System.Int32
| Improve this Doc View Source

Instat_Read

Instant read port.

Declaration
public const int Instat_Read = 986
Field Value
Type Description
System.Int32
| Improve this Doc View Source

MiscellaneousOutput_Write

Miscellaneous output write port.

Declaration
public const int MiscellaneousOutput_Write = 962
Field Value
Type Description
System.Int32
| Improve this Doc View Source

MonochromeTextMemoryBlock

32KB at 0xB0000

Declaration
public readonly MemoryBlock MonochromeTextMemoryBlock
Field Value
Type Description
MemoryBlock
| Improve this Doc View Source

Sequencer_Data

Sequencer data port.

Declaration
public const int Sequencer_Data = 965
Field Value
Type Description
System.Int32
| Improve this Doc View Source

Sequencer_Index

Sequencer index port.

Declaration
public const int Sequencer_Index = 964
Field Value
Type Description
System.Int32
| Improve this Doc View Source

VGAMemoryBlock

128KB at 0xA0000

Declaration
public readonly MemoryBlock VGAMemoryBlock
Field Value
Type Description
MemoryBlock

Properties

| Improve this Doc View Source

Colors

Get and set colors.

Declaration
public int Colors { get; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

PixelHeight

Get and set pixel height.

Declaration
public int PixelHeight { get; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

PixelWidth

Get and set pixel width.

Declaration
public int PixelWidth { get; }
Property Value
Type Description
System.Int32

Methods

| Improve this Doc View Source

DrawFilledRectangle(Int32, Int32, Int32, Int32, UInt32)

Draw Filled Rectangle

Declaration
public void DrawFilledRectangle(int aX, int aY, int aW, int aH, uint aColor)
Parameters
Type Name Description
System.Int32 aX

X Position.

System.Int32 aY

Y Position.

System.Int32 aW

Rectangle width

System.Int32 aH

Rectangle height

System.UInt32 aColor

Rectangle color.

Exceptions
Type Condition
System.Exception

Thrown when Textmode enabled.

| Improve this Doc View Source

GetClosestColorInPalette(Color)

Declaration
public uint GetClosestColorInPalette(Color aColor)
Parameters
Type Name Description
System.Drawing.Color aColor
Returns
Type Description
System.UInt32
| Improve this Doc View Source

GetPaletteEntry(Int32)

Declaration
public Color GetPaletteEntry(int aIndex)
Parameters
Type Name Description
System.Int32 aIndex
Returns
Type Description
System.Drawing.Color
| Improve this Doc View Source

GetPixel(UInt32, UInt32)

Declaration
public uint GetPixel(uint aX, uint aY)
Parameters
Type Name Description
System.UInt32 aX
System.UInt32 aY
Returns
Type Description
System.UInt32
| Improve this Doc View Source

GetPixel320x200x8(UInt32, UInt32)

Declaration
public uint GetPixel320x200x8(uint aX, uint aY)
Parameters
Type Name Description
System.UInt32 aX
System.UInt32 aY
Returns
Type Description
System.UInt32
| Improve this Doc View Source

GetPixel640x480x4(UInt32, UInt32)

Declaration
public uint GetPixel640x480x4(uint aX, uint aY)
Parameters
Type Name Description
System.UInt32 aX
System.UInt32 aY
Returns
Type Description
System.UInt32
| Improve this Doc View Source

GetPixel720x480x4(UInt32, UInt32)

Declaration
public uint GetPixel720x480x4(uint aX, uint aY)
Parameters
Type Name Description
System.UInt32 aX
System.UInt32 aY
Returns
Type Description
System.UInt32
| Improve this Doc View Source

ReadPalette()

Declaration
public void ReadPalette()
| Improve this Doc View Source

SetGraphicsMode(VGADriver.ScreenSize, VGADriver.ColorDepth)

Set graphics mode.

Declaration
public void SetGraphicsMode(VGADriver.ScreenSize aSize, VGADriver.ColorDepth aDepth)
Parameters
Type Name Description
VGADriver.ScreenSize aSize

A screen size.

VGADriver.ColorDepth aDepth

A color depth.

Exceptions
Type Condition
System.Exception

Thrown when aDepth not supported for the aSize / unknown screen size.

| Improve this Doc View Source

SetPaletteEntry(Int32, Byte, Byte, Byte)

Set palette entry.

Declaration
public void SetPaletteEntry(int aIndex, byte aR, byte aG, byte aB)
Parameters
Type Name Description
System.Int32 aIndex

Index.

System.Byte aR

Red.

System.Byte aG

Green.

System.Byte aB

Blue.

| Improve this Doc View Source

SetPaletteEntry(Int32, Color)

Declaration
public void SetPaletteEntry(int aIndex, Color aColor)
Parameters
Type Name Description
System.Int32 aIndex
System.Drawing.Color aColor
| Improve this Doc View Source

SetPixel(UInt32, UInt32, Color)

The closest color in the palette will be found to be drawn This is quite slow, so whenever possible use the index of the color

Declaration
public void SetPixel(uint aX, uint aY, Color aColor)
Parameters
Type Name Description
System.UInt32 aX
System.UInt32 aY
System.Drawing.Color aColor
| Improve this Doc View Source

SetPixel(UInt32, UInt32, UInt32)

Declaration
public void SetPixel(uint aX, uint aY, uint aColor)
Parameters
Type Name Description
System.UInt32 aX
System.UInt32 aY
System.UInt32 aColor

The index of the color in the palette

| Improve this Doc View Source

SetPixel320x200x8(UInt32, UInt32, UInt32)

Declaration
public void SetPixel320x200x8(uint aX, uint aY, uint aC)
Parameters
Type Name Description
System.UInt32 aX
System.UInt32 aY
System.UInt32 aC
| Improve this Doc View Source

SetPixel640x480x4(UInt32, UInt32, UInt32)

Declaration
public void SetPixel640x480x4(uint aX, uint aY, uint aC)
Parameters
Type Name Description
System.UInt32 aX
System.UInt32 aY
System.UInt32 aC
| Improve this Doc View Source

SetPixel720x480x4(UInt32, UInt32, UInt32)

Declaration
public void SetPixel720x480x4(uint aX, uint aY, uint aC)
Parameters
Type Name Description
System.UInt32 aX
System.UInt32 aY
System.UInt32 aC
| Improve this Doc View Source

SetTextMode(VGADriver.TextSize)

Set text size.

Declaration
public void SetTextMode(VGADriver.TextSize aSize)
Parameters
Type Name Description
VGADriver.TextSize aSize

A size to set.

Exceptions
Type Condition
System.Exception

Thrown when text size invalid / unable to determine memory segment.

| Improve this Doc View Source

WriteFont(Byte[], Byte)

Write font.

Declaration
public void WriteFont(byte[] aFont, byte aFontHeight)
Parameters
Type Name Description
System.Byte[] aFont
System.Byte aFontHeight
Exceptions
Type Condition
System.Exception

Thrown when unable to determine memory segment.

  • Improve this Doc
  • View Source
☀
☾
In This Article
Back to top
☀
☾