ReactOS 0.4.17-dev-1281-g065abb3
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)
 
static VOID PrepareForCopyArea (VOID)
 
static VOID PrepareForReadPixels (VOID)
 
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_reads_(Count) const ULONG *Table, _In_ ULONG Count)
 
VOID DoScroll (_In_ ULONG Scroll)
 
VOID PreserveRow (_In_ ULONG CurrentTop, _In_ ULONG Height, _In_ BOOLEAN Restore)
 
VOID NTAPI VidCleanUp (VOID)
 
VOID NTAPI VidScreenToBufferBlt (_Out_writes_bytes_all_(Height *Stride) PUCHAR Buffer, _In_ ULONG Left, _In_ ULONG Top, _In_ ULONG Width, _In_ ULONG Height, _In_ ULONG Stride)
 
VOID NTAPI VidSolidColorFill (_In_ ULONG Left, _In_ ULONG Top, _In_ ULONG Right, _In_ ULONG Bottom, _In_ UCHAR Color)
 

Variables

static const UCHAR lMaskTable [8]
 
static const UCHAR rMaskTable [8]
 
const UCHAR PixelMask [8]
 
static const ULONG ReverseAndUnpackMonochromePixels [16]
 
VGA_GRAPHICS_CONTROLLER_STATE VgaGCState = VGA_GC_STATE_UNINITIALIZED
 
ULONG_PTR VgaRegisterBase = 0
 
ULONG_PTR VgaBase = 0
 

Macro Definition Documentation

◆ SET_PIXELS

#define SET_PIXELS (   _PixelPtr,
  _PixelMask,
  _TextColor 
)
Value:
do { \
/* Select the pixels to modify in VGA memory */ \
__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
unsigned char UCHAR
Definition: typedefs.h:53
NTKERNELAPI UCHAR NTAPI READ_REGISTER_UCHAR(IN PUCHAR Register)

Definition at line 132 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 143 of file vga.c.

149{
150 const UCHAR* FontChar;
151 PUCHAR PixelPosition, PixelPtr;
153 ULONG Shift;
154
156
157 /* Calculate shift */
158 Shift = Left & 7;
159
160 /* Get the font and pixel pointer */
161 FontChar = GetFontPtr(Character);
162 PixelPosition = (PUCHAR)(VgaBase + (Left / 8) + (Top * (SCREEN_WIDTH / 8)));
163 PixelPtr = PixelPosition;
164
165 /* Loop all pixel rows */
166 for (Height = BOOTCHAR_HEIGHT; Height > 0; --Height)
167 {
168 SET_PIXELS(PixelPtr, *FontChar >> Shift, TextColor);
169 PixelPtr += (SCREEN_WIDTH / 8);
170 FontChar += FONT_PTR_DELTA;
171 }
172
173 /* Check if we need to update neighbor bytes */
174 if (Shift)
175 {
176 /* Calculate shift for 2nd byte */
177 Shift = 8 - Shift;
178
179 /* Get the font and pixel pointer (2nd byte) */
180 FontChar = GetFontPtr(Character);
181 PixelPtr = PixelPosition + 1;
182
183 /* Loop all pixel rows */
184 for (Height = BOOTCHAR_HEIGHT; Height > 0; --Height)
185 {
186 SET_PIXELS(PixelPtr, *FontChar << Shift, TextColor);
187 PixelPtr += (SCREEN_WIDTH / 8);
188 FontChar += FONT_PTR_DELTA;
189 }
190 }
191
192 /* Check if the background color is transparent */
193 if (BackColor >= BV_COLOR_NONE)
194 {
195 /* We are done */
196 return;
197 }
198
199 /* Calculate shift */
200 Shift = Left & 7;
201
202 /* Get the font and pixel pointer */
203 FontChar = GetFontPtr(Character);
204 PixelPtr = PixelPosition;
205
206 /* Loop all pixel rows */
207 for (Height = BOOTCHAR_HEIGHT; Height > 0; --Height)
208 {
209 SET_PIXELS(PixelPtr, (UCHAR)~*FontChar >> Shift, BackColor);
210 PixelPtr += (SCREEN_WIDTH / 8);
211 FontChar += FONT_PTR_DELTA;
212 }
213
214 /* Check if we need to update neighbor bytes */
215 if (Shift)
216 {
217 /* Calculate shift for 2nd byte */
218 Shift = 8 - Shift;
219
220 /* Get the font and pixel pointer (2nd byte) */
221 FontChar = GetFontPtr(Character);
222 PixelPtr = PixelPosition + 1;
223
224 /* Loop all pixel rows */
225 for (Height = BOOTCHAR_HEIGHT; Height > 0; --Height)
226 {
227 SET_PIXELS(PixelPtr, (UCHAR)~*FontChar << Shift, BackColor);
228 PixelPtr += (SCREEN_WIDTH / 8);
229 FontChar += FONT_PTR_DELTA;
230 }
231 }
232}
#define PrepareForSetPixel()
Definition: arm.h:21
static LPHIST_ENTRY Top
Definition: history.c:53
_Check_return_ _In_ D3DDDI_VIDEO_PRESENT_TARGET_ID _In_ PDXGKARG_SYSTEM_DISPLAY_ENABLE_FLAGS _Out_ UINT _Out_ UINT * Height
Definition: dispmprt.h:1445
ULONG_PTR VgaBase
Definition: vga.c:70
#define SET_PIXELS(_PixelPtr, _PixelMask, _TextColor)
Definition: vga.c:132
#define GetFontPtr(_Char)
Definition: precomp.h:102
#define FONT_PTR_DELTA
Definition: precomp.h:103
#define BOOTCHAR_HEIGHT
Definition: precomp.h:26
#define SCREEN_WIDTH
Definition: pc98video.c:24
#define BV_COLOR_NONE
Definition: display.h:31
unsigned char * PUCHAR
Definition: typedefs.h:53
uint32_t ULONG
Definition: typedefs.h:59
_In_ ULONG Shift
Definition: rtlfuncs.h:2705

◆ DoScroll()

VOID DoScroll ( _In_ ULONG  Scroll)

Definition at line 263 of file vga.c.

265{
266 ULONG Top, RowSize;
267 PUCHAR OldPosition, NewPosition;
268
270
271 RowSize = (VidpScrollRegion.Right - VidpScrollRegion.Left + 1) / 8;
272
273 OldPosition = (PUCHAR)(VgaBase + (VidpScrollRegion.Top + Scroll) * (SCREEN_WIDTH / 8) + VidpScrollRegion.Left / 8);
274 NewPosition = (PUCHAR)(VgaBase + VidpScrollRegion.Top * (SCREEN_WIDTH / 8) + VidpScrollRegion.Left / 8);
275
277 {
278#if defined(_M_IX86) || defined(_M_AMD64)
279 __movsb(NewPosition, OldPosition, RowSize);
280#else
281 ULONG i;
282
283 /* Scroll the row */
284 for (i = 0; i < RowSize; ++i)
285 WRITE_REGISTER_UCHAR(NewPosition + i, READ_REGISTER_UCHAR(OldPosition + i));
286#endif
287 OldPosition += (SCREEN_WIDTH / 8);
288 NewPosition += (SCREEN_WIDTH / 8);
289 }
290}
URECT VidpScrollRegion
Definition: console.c:17
static VOID PrepareForCopyArea(VOID)
Definition: vga.c:88
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
ULONG Right
Definition: precomp.h:71
ULONG Top
Definition: precomp.h:70
ULONG Bottom
Definition: precomp.h:72
ULONG Left
Definition: precomp.h:69
NTKERNELAPI VOID NTAPI WRITE_REGISTER_UCHAR(IN PUCHAR Register, IN UCHAR Value)

◆ InitPaletteWithTable()

VOID InitPaletteWithTable ( _In_reads_(Count) const ULONG *  Table,
_In_ ULONG  Count 
)

Definition at line 249 of file vga.c.

252{
253 const ULONG* Entry = Table;
254 ULONG i;
255
256 for (i = 0; i < Count; i++, Entry++)
257 {
259 }
260}
PLIST_ENTRY Entry
Definition: devhcd.cpp:1262
static VOID SetPaletteEntryRGB(_In_ ULONG Id, _In_ RGBQUAD Rgb)
Definition: vga.c:235
ASMGENDATA Table[]
Definition: genincdata.c:61
USHORT Count
Definition: userreq.cpp:200

◆ PrepareForCopyArea()

static VOID PrepareForCopyArea ( VOID  )
static

Definition at line 88 of file vga.c.

89{
91 return;
93
94 /* Enable all memory planes */
96
97 /* Set the bit mask to access all pixels in byte */
99
100 /* Select read mode 0 and write mode 1 */
101 ReadWriteMode(1);
102}
static VOID ReadWriteMode(_In_ UCHAR Mode)
Definition: vga.c:75
VGA_GRAPHICS_CONTROLLER_STATE VgaGCState
Definition: vga.c:68
#define SEQ_ADDRESS_PORT
Definition: vga.h:69
#define IND_MAP_MASK
Definition: vga.h:116
#define __outpw(Port, Value)
Definition: pc.h:36
@ VGA_GC_STATE_COPY_PIXELS
Definition: pc.h:17

Referenced by DoScroll(), and PreserveRow().

◆ PrepareForReadPixels()

static VOID PrepareForReadPixels ( VOID  )
static

Definition at line 105 of file vga.c.

106{
108 return;
110
111 /* Select read mode 0 */
112 ReadWriteMode(0);
113}
@ VGA_GC_STATE_READ_PIXELS
Definition: pc.h:15

Referenced by VidScreenToBufferBlt().

◆ PrepareForSetPixel()

VOID PrepareForSetPixel ( VOID  )

Definition at line 116 of file vga.c.

117{
119 return;
121
122 /* Select read mode 1 and write mode 2 */
123 ReadWriteMode(0xA);
124
125 /* Enable all memory planes */
127
128 /* Clear the color don't care register, so read mode 1 reads always return 0xFF */
130}
@ VGA_GC_STATE_WRITE_PIXELS
Definition: pc.h:16

◆ PreserveRow()

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

Definition at line 293 of file vga.c.

297{
298 PUCHAR OldPosition, NewPosition;
299 ULONG Count;
300
302
303 if (Restore)
304 {
305 /* Restore the row by copying back the contents saved off-screen */
306 OldPosition = (PUCHAR)(VgaBase + SCREEN_HEIGHT * (SCREEN_WIDTH / 8));
307 NewPosition = (PUCHAR)(VgaBase + CurrentTop * (SCREEN_WIDTH / 8));
308 }
309 else
310 {
311 /* Preserve the row by saving its contents off-screen */
312 OldPosition = (PUCHAR)(VgaBase + CurrentTop * (SCREEN_WIDTH / 8));
313 NewPosition = (PUCHAR)(VgaBase + SCREEN_HEIGHT * (SCREEN_WIDTH / 8));
314 }
315
316 Count = Height * (SCREEN_WIDTH / 8);
317#if defined(_M_IX86) || defined(_M_AMD64)
318 __movsb(NewPosition, OldPosition, Count);
319#else
320 while (Count--)
321 {
322 WRITE_REGISTER_UCHAR(NewPosition++, READ_REGISTER_UCHAR(OldPosition++));
323 }
324#endif
325}
#define SCREEN_HEIGHT
Definition: pc98video.c:25

◆ ReadWriteMode()

static VOID ReadWriteMode ( _In_ UCHAR  Mode)
static

Definition at line 75 of file vga.c.

77{
79
81
83 Value = (Value & ~0x0B) | Mode;
85}
#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:27
#define __outpb(Port, Value)
Definition: pc.h:33
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
Definition: wdfregistry.h:413

Referenced by PitReadData(), PitWriteCommand(), PitWriteData(), PrepareForCopyArea(), PrepareForReadPixels(), and PrepareForSetPixel().

◆ SetPaletteEntryRGB()

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

Definition at line 235 of file vga.c.

238{
239 /* Set the palette index */
241
242 /* Set RGB colors */
246}
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:92
#define GetGValue(quad)
Definition: precomp.h:91
#define GetRValue(quad)
Definition: precomp.h:90

Referenced by InitPaletteWithTable().

◆ VidCleanUp()

VOID NTAPI VidCleanUp ( VOID  )

Definition at line 331 of file vga.c.

332{
334
335 /* Restore the bit mask to its original state */
338}
#define BIT_MASK_DEFAULT
Definition: vga.h:167
@ VGA_GC_STATE_UNINITIALIZED
Definition: pc.h:14

◆ VidScreenToBufferBlt()

VOID NTAPI VidScreenToBufferBlt ( _Out_writes_bytes_all_(Height *Stride) PUCHAR  Buffer,
_In_ ULONG  Left,
_In_ ULONG  Top,
_In_ ULONG  Width,
_In_ ULONG  Height,
_In_ ULONG  Stride 
)

Definition at line 342 of file vga.c.

349{
350 ULONG LineStart, LineEnd, LineWidth;
351 ULONG LeftShift, RightShift;
352 PUCHAR PixelPtr;
353 ULONG Plane, X, Y;
354
355 if (Height == 0)
356 return;
357
358 /* Clear the destination buffer */
359 RtlZeroMemory(Buffer, Height * Stride);
360
361 /* Calculate the start/final and number of horizontal 8-pixel blocks to copy.
362 * The VGA bootvid only copies whole 8-pixel blocks by design. */
363 LineStart = Left / 8;
364 LineEnd = (Left + Width - 1) / 8;
365 if (LineStart > LineEnd)
366 return;
367 LineWidth = (LineEnd - LineStart) + 1;
368
369 /* This check helps the compiler to compile the inner loop as a do-while loop */
370 if (LineWidth == 0)
371 return;
372
373 /* Calculate the 8-bit left and right shifts */
374 LeftShift = Left & 7;
375 RightShift = 8 - LeftShift;
376
377 /* Calculate the starting pixel block pointer */
378 PixelPtr = (PUCHAR)(VgaBase + Top * (SCREEN_WIDTH / 8) + (Left / 8));
379
381
382 /* Loop through the pixels for each plane */
383 for (Plane = 0; Plane < 4; ++Plane)
384 {
385 PUCHAR PixelPosition = PixelPtr;
387
388 /* Select the current plane to read the pixels */
390
391 for (Y = 0; Y < Height; ++Y)
392 {
394 PUCHAR NextPosition;
395 UCHAR CurrPixels;
396
397 CurrPixels = READ_REGISTER_UCHAR(PixelPosition);
398 NextPosition = PixelPosition;
399
400 for (X = 0; X < LineWidth; ++X)
401 {
402 UCHAR NextPixels, Px;
404
405 NextPixels = READ_REGISTER_UCHAR(++NextPosition);
406
407 /* Store 8 pixels at once */
408 Px = CurrPixels << LeftShift;
409 Px |= NextPixels >> RightShift;
411 Result |= ReverseAndUnpackMonochromePixels[Px & 0x0F] << 16;
412
413 *Destination++ |= Result << Plane;
414
415 CurrPixels = NextPixels;
416 }
417
418 PixelPosition += (SCREEN_WIDTH / 8);
419 OutputBuffer += Stride;
420 }
421 }
422}
Definition: bufpool.h:45
_Check_return_ _In_ D3DDDI_VIDEO_PRESENT_TARGET_ID _In_ PDXGKARG_SYSTEM_DISPLAY_ENABLE_FLAGS _Out_ UINT * Width
Definition: dispmprt.h:1444
#define Y(I)
static VOID PrepareForReadPixels(VOID)
Definition: vga.c:105
static const ULONG ReverseAndUnpackMonochromePixels[16]
Definition: vga.c:48
#define IND_READ_MAP
Definition: vga.h:111
#define X(b, s)
_In_ PUNICODE_STRING _Inout_ PUNICODE_STRING Destination
Definition: rtlfuncs.h:3051
uint32_t * PULONG
Definition: typedefs.h:59
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR OutputBuffer
Definition: wdfiotarget.h:863
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO
Definition: wsk.h:409

◆ VidSolidColorFill()

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

Definition at line 426 of file vga.c.

432{
433 ULONG rMask, lMask;
434 ULONG LeftOffset, RightOffset, Distance;
436 ULONG i, j;
437
438 /* Get the left and right masks, shifts, and delta */
439 LeftOffset = Left >> 3;
440 lMask = (lMaskTable[Left & 0x7] << 8) | IND_BIT_MASK;
441 RightOffset = Right >> 3;
442 rMask = (rMaskTable[Right & 0x7] << 8) | IND_BIT_MASK;
443 Distance = RightOffset - LeftOffset;
444
445 /* If there is no distance, then combine the right and left masks */
446 if (!Distance) lMask &= rMask;
447
449
450 /* Calculate pixel position for the read */
451 Offset = (PUCHAR)(VgaBase + (Top * (SCREEN_WIDTH / 8)) + LeftOffset);
452
453 /* Select the bitmask register and write the mask */
455
456 /* Check if the top coord is below the bottom one */
457 if (Top <= Bottom)
458 {
459 /* Start looping each line */
460 for (i = (Bottom - Top) + 1; i > 0; --i)
461 {
462 /* Read the previous value and add our color */
464
465 /* Move to the next line */
466 Offset += (SCREEN_WIDTH / 8);
467 }
468 }
469
470 /* Check if we have a delta */
471 if (Distance > 0)
472 {
473 /* Calculate new pixel position */
474 Offset = (PUCHAR)(VgaBase + (Top * (SCREEN_WIDTH / 8)) + RightOffset);
475 Distance--;
476
477 /* Select the bitmask register and write the mask */
479
480 /* Check if the top coord is below the bottom one */
481 if (Top <= Bottom)
482 {
483 /* Start looping each line */
484 for (i = (Bottom - Top) + 1; i > 0; --i)
485 {
486 /* Read the previous value and add our color */
488
489 /* Move to the next line */
490 Offset += (SCREEN_WIDTH / 8);
491 }
492 }
493
494 /* Check if we still have a delta */
495 if (Distance > 0)
496 {
497 /* Calculate new pixel position */
498 Offset = (PUCHAR)(VgaBase + (Top * (SCREEN_WIDTH / 8)) + LeftOffset + 1);
499
500 /* Set the bit mask to access all pixels in byte */
502
503 /* Check if the top coord is below the bottom one */
504 if (Top <= Bottom)
505 {
506 /* Start looping each line */
507 for (i = (Bottom - Top) + 1; i > 0; --i)
508 {
509 /* Loop the shift delta */
510 for (j = Distance; j > 0; Offset++, --j)
511 {
512 /* Write the color */
514 }
515
516 /* Update position in memory */
517 Offset += ((SCREEN_WIDTH / 8) - Distance);
518 }
519 }
520 }
521 }
522}
static LPHIST_ENTRY Bottom
Definition: history.c:54
static const UCHAR rMaskTable[8]
Definition: vga.c:26
static const 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

const 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().

◆ PixelMask

const 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 DisplayCharacter(), and SetPixel().

◆ ReverseAndUnpackMonochromePixels

const ULONG ReverseAndUnpackMonochromePixels[16]
static
Initial value:
=
{
0x0000,
0x0100,
0x1000,
0x1100,
0x0001,
0x0101,
0x1001,
0x1101,
0x0010,
0x0110,
0x1010,
0x1110,
0x0011,
0x0111,
0x1011,
0x1111,
}

Definition at line 48 of file vga.c.

Referenced by VidScreenToBufferBlt().

◆ rMaskTable

const 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

◆ VgaGCState

◆ VgaRegisterBase

ULONG_PTR VgaRegisterBase = 0

Definition at line 69 of file vga.c.

Referenced by VgaInterpretCmdStream(), and VidInitialize().