vga-logic-processor-examples/vesa.h

58 lines
1.0 KiB
C

#ifndef __VESA_H__
#define __VESA_H__
#include <sys/types.h>
#pragma pack(push,1)
struct VbeInfo {
char VbeSignature[4];
uint16_t VbeVersion;
uint32_t OemStringPtr;
uint32_t Capabilities;
uint16_t VideoModeOffset;
uint16_t VideoModeSegment;
uint16_t TotalMemory;
int OemSoftwareRev;
char far *OemVendorNamePtr;
char far *OemProductNamePtr;
char far *OenProductRevPtr;
char Reserved[222];
char OemData[256];
};
struct VbeModeInfo {
uint16_t ModeAttributes;
uint8_t WinAAttributes;
uint8_t WinBAttributes;
uint16_t WinGranularity;
uint16_t WinSize;
uint16_t WinASegment;
uint16_t WinBSegment;
void *WindowFunction;
uint16_t BytesPerScanLine;
uint16_t XResolution;
uint16_t YResolution;
uint8_t XCharSize;
uint8_t YCharSize;
uint8_t NumberOfPlanes;
uint8_t BitsPerPixel;
uint8_t NumberOfBanks;
uint8_t MemoryModel;
uint8_t BankSize;
uint8_t NumberOfImagePages;
char more[500];
};
struct VESAColor {
uint8_t blue;
uint8_t green;
uint8_t red;
uint8_t _a;
};
#pragma pack(pop)
#endif