X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=KernelLand%2FModules%2FDisplay%2FVESA%2Fcommon.h;h=94fd8e2da7c2be51033950d94792a0cb3a39437c;hb=4e407e69bd660e9a32644281733192193ee6e8c8;hp=eeaddd56766ee31f8c83924cd70d177ba73de652;hpb=51ab5f489bc356940c95cc936fd0508e8f07ea97;p=tpg%2Facess2.git diff --git a/KernelLand/Modules/Display/VESA/common.h b/KernelLand/Modules/Display/VESA/common.h index eeaddd56..94fd8e2d 100644 --- a/KernelLand/Modules/Display/VESA/common.h +++ b/KernelLand/Modules/Display/VESA/common.h @@ -1,15 +1,28 @@ /** + * Acess2 Kernel VBE Driver + * - By John Hodge (thePowersGang) + * + * common.h + * - Driver-internal definitions */ #ifndef _COMMON_H_ #define _COMMON_H_ -// === TYPES === -typedef struct sFarPtr -{ - Uint16 ofs; - Uint16 seg; -} tFarPtr; +#include "vbe.h" + +/** + * \name Mode Flags + * \{ + */ +#define FLAG_LFB 0x01 //!< Framebuffer is a linear framebufer +#define FLAG_POPULATED 0x02 //!< Mode information is populated +#define FLAG_VALID 0x04 //!< Mode is valid (usable) +#define FLAG_GRAPHICS 0x08 //!< Graphics mode +/** + * \} + */ +// === TYPES === typedef struct sVesa_Mode { Uint16 code; @@ -19,41 +32,4 @@ typedef struct sVesa_Mode Uint32 fbSize; Uint32 framebuffer; } tVesa_Mode; - -typedef struct sVesa_CallModeInfo -{ - Uint16 attributes; - Uint8 winA,winB; - Uint16 granularity; - Uint16 winsize; - Uint16 segmentA, segmentB; - tFarPtr realFctPtr; - Uint16 pitch; // Bytes per scanline - - Uint16 Xres, Yres; - Uint8 Wchar, Ychar, planes, bpp, banks; - Uint8 memory_model, bank_size, image_pages; - Uint8 reserved0; - - Uint8 red_mask, red_position; - Uint8 green_mask, green_position; - Uint8 blue_mask, blue_position; - Uint8 rsv_mask, rsv_position; - Uint8 directcolor_attributes; - - Uint32 physbase; // Your LFB address ;) - Uint32 reserved1; - Sint16 reserved2; -} tVesa_CallModeInfo; - -typedef struct sVesa_CallInfo -{ - char signature[4]; // == "VESA" - Uint16 Version; // == 0x0300 for Vesa 3.0 - tFarPtr OEMString; // isa vbeFarPtr - Uint8 Capabilities[4]; - tFarPtr VideoModes; // isa vbeParPtr - Uint16 TotalMemory; // as # of 64KB blocks -} tVesa_CallInfo; - #endif