ReactOS 0.4.15-dev-7953-g1f49173
vga.c File Reference
#include "precomp.h"
Include dependency graph for vga.c:

Go to the source code of this file.

Macros

#define SET_PIXELS(_PixelPtr, _PixelMask, _TextColor)
 

Functions

static VOID ReadWriteMode (_In_ UCHAR Mode)
 
VOID PrepareForSetPixel (VOID)
 
VOID DisplayCharacter (_In_ CHAR Character, _In_ ULONG Left, _In_ ULONG Top, _In_ ULONG TextColor, _In_ ULONG BackColor)
 
static VOID SetPaletteEntryRGB (_In_ ULONG Id, _In_ RGBQUAD Rgb)
 
VOID InitPaletteWithTable (_In_ PULONG Table, _In_ ULONG Count)
 
VOID DoScroll (_In_ ULONG Scroll)
 
VOID PreserveRow (_In_ ULONG CurrentTop, _In_ ULONG TopDelta, _In_ BOOLEAN Restore)
 
VOID NTAPI VidCleanUp (VOID)
 
VOID NTAPI VidScreenToBufferBlt (_Out_writes_bytes_(Delta *Height) PUCHAR Buffer, _In_ ULONG Left, _In_ ULONG Top, _In_ ULONG Width, _In_ ULONG Height, _In_ ULONG Delta)
 
VOID NTAPI VidSolidColorFill (_In_ ULONG Left, _In_ ULONG Top, _In_ ULONG Right, _In_ ULONG Bottom, _In_ UCHAR Color)
 

Variables

static UCHAR lMaskTable [8]
 
static UCHAR rMaskTable [8]
 
UCHAR PixelMask [8]
 
static ULONG lookup [16]
 
ULONG_PTR VgaRegisterBase = 0
 
ULONG_PTR VgaBase = 0
 

Macro Definition Documentation

◆ SET_PIXELS

#define SET_PIXELS (   _PixelPtr,
  _PixelMask,
  _TextColor 
)
Value:
do { \
/* Select the bitmask register and write the mask */ \
__outpw(VGA_BASE_IO_PORT + GRAPH_ADDRESS_PORT, ((_PixelMask) << 8) | IND_BIT_MASK); \
/* Dummy read to load latch registers */ \
(VOID)READ_REGISTER_UCHAR((_PixelPtr)); \
/* Set the new color */ \
WRITE_REGISTER_UCHAR((_PixelPtr), (UCHAR)(_TextColor)); \
} while (0);
#define VOID
Definition: acefi.h:82
#define GRAPH_ADDRESS_PORT
Definition: vga.h:81
#define IND_BIT_MASK
Definition: vga.h:114
#define VGA_BASE_IO_PORT
Definition: vga.h:38
NTKERNELAPI UCHAR NTAPI READ_REGISTER_UCHAR(IN PUCHAR Register)
unsigned char UCHAR
Definition: xmlstorage.h:181

Definition at line 102 of file vga.c.

Function Documentation

◆ DisplayCharacter()

VOID DisplayCharacter ( _In_ CHAR  Character,
_In_ ULONG  Left,
_In_ ULONG  Top,
_In_ ULONG  TextColor,
_In_ ULONG  BackColor 
)

Definition at line 113 of file vga.c.

119{
120 PUCHAR FontChar, PixelPtr;
122 UCHAR Shift;
123
125
126 /* Calculate shift */
127 Shift = Left & 7;
128
129 /* Get the font and pixel pointer */
130 FontChar = GetFontPtr(Character);
131 PixelPtr = (PUCHAR)(VgaBase + (Left >> 3) + (Top * (SCREEN_WIDTH / 8)));
132
133 /* Loop all pixel rows */
134 for (Height = BOOTCHAR_HEIGHT; Height > 0; --Height)
135 {
136 SET_PIXELS(PixelPtr, *FontChar >> Shift, TextColor);
137 PixelPtr += (SCREEN_WIDTH / 8);
138 FontChar += FONT_PTR_DELTA;
139 }
140
141 /* Check if we need to update neighbor bytes */
142 if (Shift)
143 {
144 /* Calculate shift for 2nd byte */
145 Shift = 8 - Shift;
146
147 /* Get the font and pixel pointer (2nd byte) */
148 FontChar = GetFontPtr(Character);
149 PixelPtr = (PUCHAR)(VgaBase + (Left >> 3) + (Top * (SCREEN_WIDTH / 8)) + 1);
150
151 /* Loop all pixel rows */
152 for (Height = BOOTCHAR_HEIGHT; Height > 0; --Height)
153 {
154 SET_PIXELS(PixelPtr, *FontChar << Shift, TextColor);
155 PixelPtr += (SCREEN_WIDTH / 8);
156 FontChar += FONT_PTR_DELTA;
157 }
158 }
159
160 /* Check if the background color is transparent */
161 if (BackColor >= BV_COLOR_NONE)
162 {
163 /* We are done */
164 return;
165 }
166
167 /* Calculate shift */
168 Shift = Left & 7;
169
170 /* Get the font and pixel pointer */
171 FontChar = GetFontPtr(Character);
172 PixelPtr = (PUCHAR)(VgaBase + (Left >> 3) + (Top * (SCREEN_WIDTH / 8)));
173
174 /* Loop all pixel rows */
175 for (Height = BOOTCHAR_HEIGHT; Height > 0; --Height)
176 {
177 SET_PIXELS(PixelPtr, ~*FontChar >> Shift, BackColor);
178 PixelPtr += (SCREEN_WIDTH / 8);
179 FontChar += FONT_PTR_DELTA;
180 }
181
182 /* Check if we need to update neighbor bytes */
183 if (Shift)
184 {
185 /* Calculate shift for 2nd byte */
186 Shift = 8 - Shift;
187
188 /* Get the font and pixel pointer (2nd byte) */
189 FontChar = GetFontPtr(Character);
190 PixelPtr = (PUCHAR)(VgaBase + (Left >> 3) + (Top * (SCREEN_WIDTH / 8)) + 1);
191
192 /* Loop all pixel rows */
193 for (Height = BOOTCHAR_HEIGHT; Height > 0; --Height)
194 {
195 SET_PIXELS(PixelPtr, ~*FontChar << Shift, BackColor);
196 PixelPtr += (SCREEN_WIDTH / 8);
197 FontChar += FONT_PTR_DELTA;
198 }
199 }
200}
static LPHIST_ENTRY Top
Definition: history.c:53
VOID PrepareForSetPixel(VOID)
Definition: vga.c:90
ULONG_PTR VgaBase
Definition: vga.c:69
#define SET_PIXELS(_PixelPtr, _PixelMask, _TextColor)
Definition: vga.c:102
#define GetFontPtr(_Char)
Definition: precomp.h:83
#define FONT_PTR_DELTA
Definition: precomp.h:84
#define BOOTCHAR_HEIGHT
Definition: precomp.h:36
#define SCREEN_WIDTH
Definition: pc98video.c:27
#define BV_COLOR_NONE
Definition: display.h:31
unsigned char * PUCHAR
Definition: typedefs.h:53
uint32_t ULONG
Definition: typedefs.h:59
_In_ HFONT _Out_ PUINT Height
Definition: font.h:88
_In_ ULONG Shift
Definition: rtlfuncs.h:2681

◆ DoScroll()

VOID DoScroll ( _In_ ULONG  Scroll)

Definition at line 231 of file vga.c.

233{
234 ULONG Top, RowSize;
235 PUCHAR OldPosition, NewPosition;
236
237 /* Clear the 4 planes */
239
240 /* Set the bitmask to 0xFF for all 4 planes */
242
243 /* Set Mode 1 */
244 ReadWriteMode(1);
245
246 RowSize = (VidpScrollRegion[2] - VidpScrollRegion[0] + 1) / 8;
247
248 /* Calculate the position in memory for the row */
249 OldPosition = (PUCHAR)(VgaBase + (VidpScrollRegion[1] + Scroll) * (SCREEN_WIDTH / 8) + VidpScrollRegion[0] / 8);
250 NewPosition = (PUCHAR)(VgaBase + VidpScrollRegion[1] * (SCREEN_WIDTH / 8) + VidpScrollRegion[0] / 8);
251
252 /* Start loop */
253 for (Top = VidpScrollRegion[1]; Top <= VidpScrollRegion[3]; ++Top)
254 {
255#if defined(_M_IX86) || defined(_M_AMD64)
256 __movsb(NewPosition, OldPosition, RowSize);
257#else
258 ULONG i;
259
260 /* Scroll the row */
261 for (i = 0; i < RowSize; ++i)
262 WRITE_REGISTER_UCHAR(NewPosition + i, READ_REGISTER_UCHAR(OldPosition + i));
263#endif
264 OldPosition += (SCREEN_WIDTH / 8);
265 NewPosition += (SCREEN_WIDTH / 8);
266 }
267}
ULONG VidpScrollRegion[4]
Definition: common.c:19
static VOID ReadWriteMode(_In_ UCHAR Mode)
Definition: vga.c:74
#define SEQ_ADDRESS_PORT
Definition: vga.h:69
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
PPC_QUAL void __movsb(unsigned char *Destination, const unsigned char *Source, unsigned long Count)
Definition: intrin_ppc.h:323
#define __outpw(Port, Value)
Definition: pc.h:25
NTKERNELAPI VOID NTAPI WRITE_REGISTER_UCHAR(IN PUCHAR Register, IN UCHAR Value)

◆ InitPaletteWithTable()

VOID InitPaletteWithTable ( _In_ PULONG  Table,
_In_ ULONG  Count 
)

Definition at line 217 of file vga.c.

220{
221 ULONG i;
223
224 for (i = 0; i < Count; i++, Entry++)
225 {
227 }
228}
static VOID SetPaletteEntryRGB(_In_ ULONG Id, _In_ RGBQUAD Rgb)
Definition: vga.c:203
ASMGENDATA Table[]
Definition: genincdata.c:61
int Count
Definition: noreturn.cpp:7
base of all file and directory entries
Definition: entries.h:83
uint32_t * PULONG
Definition: typedefs.h:59

◆ PrepareForSetPixel()

VOID PrepareForSetPixel ( VOID  )

Definition at line 90 of file vga.c.

91{
92 /* Switch to mode 10 */
93 ReadWriteMode(10);
94
95 /* Clear the 4 planes (we're already in unchained mode here) */
97
98 /* Select the color don't care register */
100}

Referenced by DisplayCharacter(), and VidSolidColorFill().

◆ PreserveRow()

VOID PreserveRow ( _In_ ULONG  CurrentTop,
_In_ ULONG  TopDelta,
_In_ BOOLEAN  Restore 
)

Definition at line 270 of file vga.c.

274{
275 PUCHAR Position1, Position2;
276 ULONG Count;
277
278 /* Clear the 4 planes */
280
281 /* Set the bitmask to 0xFF for all 4 planes */
283
284 /* Set Mode 1 */
285 ReadWriteMode(1);
286
287 /* Calculate the position in memory for the row */
288 if (Restore)
289 {
290 /* Restore the row by copying back the contents saved off-screen */
291 Position1 = (PUCHAR)(VgaBase + CurrentTop * (SCREEN_WIDTH / 8));
292 Position2 = (PUCHAR)(VgaBase + SCREEN_HEIGHT * (SCREEN_WIDTH / 8));
293 }
294 else
295 {
296 /* Preserve the row by saving its contents off-screen */
297 Position1 = (PUCHAR)(VgaBase + SCREEN_HEIGHT * (SCREEN_WIDTH / 8));
298 Position2 = (PUCHAR)(VgaBase + CurrentTop * (SCREEN_WIDTH / 8));
299 }
300
301 /* Set the count and loop every pixel */
302 Count = TopDelta * (SCREEN_WIDTH / 8);
303#if defined(_M_IX86) || defined(_M_AMD64)
304 __movsb(Position1, Position2, Count);
305#else
306 while (Count--)
307 {
308 /* Write the data back on the other position */
309 WRITE_REGISTER_UCHAR(Position1, READ_REGISTER_UCHAR(Position2));
310
311 /* Increase both positions */
312 Position1++;
313 Position2++;
314 }
315#endif
316}
#define SCREEN_HEIGHT
Definition: pc98video.c:28

◆ ReadWriteMode()

static VOID ReadWriteMode ( _In_ UCHAR  Mode)
static

Definition at line 74 of file vga.c.

76{
78
79 /* Switch to graphics mode register */
81
82 /* Get the current register value, minus the current mode */
84
85 /* Set the new mode */
87}
#define GRAPH_DATA_PORT
Definition: vga.h:82
#define IND_GRAPH_MODE
Definition: vga.h:112
_In_ ULONG Mode
Definition: hubbusif.h:303
#define __inpb(Port)
Definition: pc.h:16
#define __outpb(Port, Value)
Definition: pc.h:22
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
Definition: wdfregistry.h:413

Referenced by DoScroll(), PitReadData(), PitWriteCommand(), PitWriteData(), PrepareForSetPixel(), PreserveRow(), and VidScreenToBufferBlt().

◆ SetPaletteEntryRGB()

static VOID SetPaletteEntryRGB ( _In_ ULONG  Id,
_In_ RGBQUAD  Rgb 
)
static

Definition at line 203 of file vga.c.

206{
207 /* Set the palette index */
209
210 /* Set RGB colors */
214}
DWORD Id
#define DAC_DATA_REG_PORT
Definition: vga.h:77
#define DAC_ADDRESS_WRITE_PORT
Definition: vga.h:76
#define GetBValue(quad)
Definition: precomp.h:75
#define GetGValue(quad)
Definition: precomp.h:74
#define GetRValue(quad)
Definition: precomp.h:73

Referenced by InitPaletteWithTable().

◆ VidCleanUp()

VOID NTAPI VidCleanUp ( VOID  )

Definition at line 322 of file vga.c.

323{
324 /* Select bit mask register and clear it */
327}
#define BIT_MASK_DEFAULT
Definition: vga.h:167

◆ VidScreenToBufferBlt()

VOID NTAPI VidScreenToBufferBlt ( _Out_writes_bytes_(Delta *Height) PUCHAR  Buffer,
_In_ ULONG  Left,
_In_ ULONG  Top,
_In_ ULONG  Width,
_In_ ULONG  Height,
_In_ ULONG  Delta 
)

Definition at line 331 of file vga.c.

338{
339 ULONG Plane;
340 ULONG XDistance;
341 ULONG LeftDelta, RightDelta;
342 ULONG PixelOffset;
343 PUCHAR PixelPosition;
344 PUCHAR k, i;
345 PULONG m;
346 UCHAR Value, Value2;
347 UCHAR a;
348 ULONG b;
349 ULONG x, y;
350
351 /* Calculate total distance to copy on X */
352 XDistance = Left + Width - 1;
353
354 /* Calculate the 8-byte left and right deltas */
355 LeftDelta = Left & 7;
356 RightDelta = 8 - LeftDelta;
357
358 /* Clear the destination buffer */
360
361 /* Calculate the pixel offset and convert the X distance into byte form */
362 PixelOffset = Top * (SCREEN_WIDTH / 8) + (Left >> 3);
363 XDistance >>= 3;
364
365 /* Loop the 4 planes */
366 for (Plane = 0; Plane < 4; ++Plane)
367 {
368 /* Set the current pixel position and reset buffer loop variable */
369 PixelPosition = (PUCHAR)(VgaBase + PixelOffset);
370 i = Buffer;
371
372 /* Set Mode 0 */
373 ReadWriteMode(0);
374
375 /* Set the current plane */
377
378 /* Start the outer Y height loop */
379 for (y = Height; y > 0; --y)
380 {
381 /* Read the current value */
382 m = (PULONG)i;
383 Value = READ_REGISTER_UCHAR(PixelPosition);
384
385 /* Set Pixel Position loop variable */
386 k = PixelPosition + 1;
387
388 /* Check if we're still within bounds */
389 if (Left <= XDistance)
390 {
391 /* Start the X inner loop */
392 for (x = (XDistance - Left) + 1; x > 0; --x)
393 {
394 /* Read the current value */
395 Value2 = READ_REGISTER_UCHAR(k);
396
397 /* Increase pixel position */
398 k++;
399
400 /* Do the blt */
401 a = Value2 >> (UCHAR)RightDelta;
402 a |= Value << (UCHAR)LeftDelta;
403 b = lookup[a & 0xF];
404 a >>= 4;
405 b <<= 16;
406 b |= lookup[a];
407
408 /* Save new value to buffer */
409 *m |= (b << Plane);
410
411 /* Move to next destination location */
412 m++;
413
414 /* Write new value */
415 Value = Value2;
416 }
417 }
418
419 /* Update pixel position */
420 PixelPosition += (SCREEN_WIDTH / 8);
421 i += Delta;
422 }
423 }
424}
Definition: bufpool.h:45
static ULONG lookup[16]
Definition: vga.c:48
#define IND_READ_MAP
Definition: vga.h:111
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
GLboolean GLboolean GLboolean GLboolean a
Definition: glext.h:6204
const GLfloat * m
Definition: glext.h:10848
#define a
Definition: ke_i.h:78
#define b
Definition: ke_i.h:79
int k
Definition: mpi.c:3369
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
_In_ HFONT _Out_ PUINT _Out_ PUINT Width
Definition: font.h:89
static ULONG Delta
Definition: xboxvideo.c:33

◆ VidSolidColorFill()

VOID NTAPI VidSolidColorFill ( _In_ ULONG  Left,
_In_ ULONG  Top,
_In_ ULONG  Right,
_In_ ULONG  Bottom,
_In_ UCHAR  Color 
)

Definition at line 428 of file vga.c.

434{
435 ULONG rMask, lMask;
436 ULONG LeftOffset, RightOffset, Distance;
438 ULONG i, j;
439
440 /* Get the left and right masks, shifts, and delta */
441 LeftOffset = Left >> 3;
442 lMask = (lMaskTable[Left & 0x7] << 8) | IND_BIT_MASK;
443 RightOffset = Right >> 3;
444 rMask = (rMaskTable[Right & 0x7] << 8) | IND_BIT_MASK;
445 Distance = RightOffset - LeftOffset;
446
447 /* If there is no distance, then combine the right and left masks */
448 if (!Distance) lMask &= rMask;
449
451
452 /* Calculate pixel position for the read */
453 Offset = (PUCHAR)(VgaBase + (Top * (SCREEN_WIDTH / 8)) + LeftOffset);
454
455 /* Select the bitmask register and write the mask */
457
458 /* Check if the top coord is below the bottom one */
459 if (Top <= Bottom)
460 {
461 /* Start looping each line */
462 for (i = (Bottom - Top) + 1; i > 0; --i)
463 {
464 /* Read the previous value and add our color */
466
467 /* Move to the next line */
468 Offset += (SCREEN_WIDTH / 8);
469 }
470 }
471
472 /* Check if we have a delta */
473 if (Distance > 0)
474 {
475 /* Calculate new pixel position */
476 Offset = (PUCHAR)(VgaBase + (Top * (SCREEN_WIDTH / 8)) + RightOffset);
477 Distance--;
478
479 /* Select the bitmask register and write the mask */
481
482 /* Check if the top coord is below the bottom one */
483 if (Top <= Bottom)
484 {
485 /* Start looping each line */
486 for (i = (Bottom - Top) + 1; i > 0; --i)
487 {
488 /* Read the previous value and add our color */
490
491 /* Move to the next line */
492 Offset += (SCREEN_WIDTH / 8);
493 }
494 }
495
496 /* Check if we still have a delta */
497 if (Distance > 0)
498 {
499 /* Calculate new pixel position */
500 Offset = (PUCHAR)(VgaBase + (Top * (SCREEN_WIDTH / 8)) + LeftOffset + 1);
501
502 /* Set the bitmask to 0xFF for all 4 planes */
504
505 /* Check if the top coord is below the bottom one */
506 if (Top <= Bottom)
507 {
508 /* Start looping each line */
509 for (i = (Bottom - Top) + 1; i > 0; --i)
510 {
511 /* Loop the shift delta */
512 for (j = Distance; j > 0; Offset++, --j)
513 {
514 /* Write the color */
516 }
517
518 /* Update position in memory */
519 Offset += ((SCREEN_WIDTH / 8) - Distance);
520 }
521 }
522 }
523 }
524}
static LPHIST_ENTRY Bottom
Definition: history.c:54
static UCHAR rMaskTable[8]
Definition: vga.c:26
static UCHAR lMaskTable[8]
Definition: vga.c:15
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
Definition: glfuncs.h:250
_In_ ULONG _In_ ULONG Offset
Definition: ntddpcm.h:101
unsigned short USHORT
Definition: pedump.c:61

Variable Documentation

◆ lMaskTable

UCHAR lMaskTable[8]
static
Initial value:
=
{
(1 << 8) - (1 << 0),
(1 << 7) - (1 << 0),
(1 << 6) - (1 << 0),
(1 << 5) - (1 << 0),
(1 << 4) - (1 << 0),
(1 << 3) - (1 << 0),
(1 << 2) - (1 << 0),
(1 << 1) - (1 << 0)
}

Definition at line 15 of file vga.c.

Referenced by VidSolidColorFill().

◆ lookup

◆ PixelMask

UCHAR PixelMask[8]
Initial value:
=
{
(1 << 7),
(1 << 6),
(1 << 5),
(1 << 4),
(1 << 3),
(1 << 2),
(1 << 1),
(1 << 0),
}

Definition at line 37 of file vga.c.

Referenced by ConsoleEfiGopIsPixelFormatSupported(), DisplayCharacter(), and SetPixel().

◆ rMaskTable

UCHAR rMaskTable[8]
static
Initial value:
=
{
(1 << 7),
(1 << 7) + (1 << 6),
(1 << 7) + (1 << 6) + (1 << 5),
(1 << 7) + (1 << 6) + (1 << 5) + (1 << 4),
(1 << 7) + (1 << 6) + (1 << 5) + (1 << 4) + (1 << 3),
(1 << 7) + (1 << 6) + (1 << 5) + (1 << 4) + (1 << 3) + (1 << 2),
(1 << 7) + (1 << 6) + (1 << 5) + (1 << 4) + (1 << 3) + (1 << 2) + (1 << 1),
(1 << 7) + (1 << 6) + (1 << 5) + (1 << 4) + (1 << 3) + (1 << 2) + (1 << 1) + (1 << 0),
}

Definition at line 26 of file vga.c.

Referenced by VidSolidColorFill().

◆ VgaBase

◆ VgaRegisterBase

ULONG_PTR VgaRegisterBase = 0

Definition at line 68 of file vga.c.

Referenced by VgaInterpretCmdStream(), and VidInitialize().