ReactOS 0.4.17-dev-1321-g5c122a9
vga.c
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS Boot Video Driver for VGA-compatible cards
3 * LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
4 * PURPOSE: VGA helper functions
5 * COPYRIGHT: Copyright 2007 Alex Ionescu <alex.ionescu@reactos.org>
6 * Copyright 2013 Timo Kreuzer <timo.kreuzer@reactos.org>
7 * Copyright 2019 Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
8 * Copyright 2020 Stanislav Motylkov <x86corez@gmail.com>
9 */
10
11#include "precomp.h"
12
13/* GLOBALS *******************************************************************/
14
15static const UCHAR lMaskTable[8] =
16{
17 (1 << 8) - (1 << 0),
18 (1 << 7) - (1 << 0),
19 (1 << 6) - (1 << 0),
20 (1 << 5) - (1 << 0),
21 (1 << 4) - (1 << 0),
22 (1 << 3) - (1 << 0),
23 (1 << 2) - (1 << 0),
24 (1 << 1) - (1 << 0)
25};
26static const UCHAR rMaskTable[8] =
27{
28 (1 << 7),
29 (1 << 7) + (1 << 6),
30 (1 << 7) + (1 << 6) + (1 << 5),
31 (1 << 7) + (1 << 6) + (1 << 5) + (1 << 4),
32 (1 << 7) + (1 << 6) + (1 << 5) + (1 << 4) + (1 << 3),
33 (1 << 7) + (1 << 6) + (1 << 5) + (1 << 4) + (1 << 3) + (1 << 2),
34 (1 << 7) + (1 << 6) + (1 << 5) + (1 << 4) + (1 << 3) + (1 << 2) + (1 << 1),
35 (1 << 7) + (1 << 6) + (1 << 5) + (1 << 4) + (1 << 3) + (1 << 2) + (1 << 1) + (1 << 0),
36};
37const UCHAR PixelMask[8] =
38{
39 (1 << 7),
40 (1 << 6),
41 (1 << 5),
42 (1 << 4),
43 (1 << 3),
44 (1 << 2),
45 (1 << 1),
46 (1 << 0),
47};
49{
50 0x0000,
51 0x0100,
52 0x1000,
53 0x1100,
54 0x0001,
55 0x0101,
56 0x1001,
57 0x1101,
58 0x0010,
59 0x0110,
60 0x1010,
61 0x1110,
62 0x0011,
63 0x0111,
64 0x1011,
65 0x1111,
66};
67
71
72/* PRIVATE FUNCTIONS *********************************************************/
73
74static VOID
77{
79
81
83 Value = (Value & ~0x0B) | Mode;
85}
86
87static VOID
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}
103
104static VOID
106{
108 return;
110
111 /* Select read mode 0 */
112 ReadWriteMode(0);
113}
114
115VOID
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}
131
132#define SET_PIXELS(_PixelPtr, _PixelMask, _TextColor) \
133do { \
134 /* Select the pixels to modify in VGA memory */ \
135 __outpw(VGA_BASE_IO_PORT + GRAPH_ADDRESS_PORT, ((_PixelMask) << 8) | IND_BIT_MASK); \
136 /* Dummy read to load latch registers */ \
137 (VOID)READ_REGISTER_UCHAR((_PixelPtr)); \
138 /* Set the new color */ \
139 WRITE_REGISTER_UCHAR((_PixelPtr), (UCHAR)(_TextColor)); \
140} while (0);
141
142VOID
144 _In_ CHAR Character,
145 _In_ ULONG Left,
146 _In_ ULONG Top,
147 _In_ ULONG TextColor,
148 _In_ ULONG BackColor)
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}
233
234static VOID
236 _In_ ULONG Id,
237 _In_ RGBQUAD Rgb)
238{
239 /* Set the palette index */
241
242 /* Set RGB colors */
246}
247
248VOID
250 _In_reads_(Count) const ULONG* Table,
252{
253 const ULONG* Entry = Table;
254 ULONG i;
255
256 for (i = 0; i < Count; i++, Entry++)
257 {
259 }
260}
261
262VOID
264 _In_ ULONG Scroll)
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}
291
292VOID
294 _In_ ULONG CurrentTop,
296 _In_ BOOLEAN Restore)
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}
326
327/* PUBLIC FUNCTIONS **********************************************************/
328
329VOID
330NTAPI
332{
334
335 /* Restore the bit mask to its original state */
338}
339
340VOID
341NTAPI
344 _In_ ULONG Left,
345 _In_ ULONG Top,
348 _In_ ULONG Stride)
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}
423
424VOID
425NTAPI
427 _In_ ULONG Left,
428 _In_ ULONG Top,
429 _In_ ULONG Right,
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}
DWORD Id
unsigned char BOOLEAN
Definition: actypes.h:127
#define PrepareForSetPixel()
Definition: arm.h:21
static LPHIST_ENTRY Bottom
Definition: history.c:54
static LPHIST_ENTRY Top
Definition: history.c:53
Definition: bufpool.h:45
PLIST_ENTRY Entry
Definition: devhcd.cpp:1262
_Check_return_ _In_ D3DDDI_VIDEO_PRESENT_TARGET_ID _In_ PDXGKARG_SYSTEM_DISPLAY_ENABLE_FLAGS _Out_ UINT _Out_ UINT * Height
Definition: dispmprt.h:1445
_Check_return_ _In_ D3DDDI_VIDEO_PRESENT_TARGET_ID _In_ PDXGKARG_SYSTEM_DISPLAY_ENABLE_FLAGS _Out_ UINT * Width
Definition: dispmprt.h:1444
#define Y(I)
URECT VidpScrollRegion
Definition: console.c:17
static VOID ReadWriteMode(_In_ UCHAR Mode)
Definition: vga.c:75
static VOID PrepareForCopyArea(VOID)
Definition: vga.c:88
static const UCHAR rMaskTable[8]
Definition: vga.c:26
ULONG_PTR VgaRegisterBase
Definition: vga.c:69
static VOID PrepareForReadPixels(VOID)
Definition: vga.c:105
VOID NTAPI VidSolidColorFill(_In_ ULONG Left, _In_ ULONG Top, _In_ ULONG Right, _In_ ULONG Bottom, _In_ UCHAR Color)
Definition: vga.c:426
static const ULONG ReverseAndUnpackMonochromePixels[16]
Definition: vga.c:48
VOID NTAPI VidCleanUp(VOID)
Definition: vga.c:331
VOID PreserveRow(_In_ ULONG CurrentTop, _In_ ULONG Height, _In_ BOOLEAN Restore)
Definition: vga.c:293
static const UCHAR lMaskTable[8]
Definition: vga.c:15
ULONG_PTR VgaBase
Definition: vga.c:70
#define SET_PIXELS(_PixelPtr, _PixelMask, _TextColor)
Definition: vga.c:132
VOID InitPaletteWithTable(_In_reads_(Count) const ULONG *Table, _In_ ULONG Count)
Definition: vga.c:249
const UCHAR PixelMask[8]
Definition: vga.c:37
VOID DisplayCharacter(_In_ CHAR Character, _In_ ULONG Left, _In_ ULONG Top, _In_ ULONG TextColor, _In_ ULONG BackColor)
Definition: vga.c:143
VOID DoScroll(_In_ ULONG Scroll)
Definition: vga.c:263
VGA_GRAPHICS_CONTROLLER_STATE VgaGCState
Definition: vga.c:68
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: vga.c:342
static VOID SetPaletteEntryRGB(_In_ ULONG Id, _In_ RGBQUAD Rgb)
Definition: vga.c:235
#define DAC_DATA_REG_PORT
Definition: vga.h:77
#define DAC_ADDRESS_WRITE_PORT
Definition: vga.h:76
#define SEQ_ADDRESS_PORT
Definition: vga.h:69
#define GRAPH_ADDRESS_PORT
Definition: vga.h:81
#define GRAPH_DATA_PORT
Definition: vga.h:82
#define IND_GRAPH_MODE
Definition: vga.h:112
#define BIT_MASK_DEFAULT
Definition: vga.h:167
#define IND_MAP_MASK
Definition: vga.h:116
#define IND_BIT_MASK
Definition: vga.h:114
#define IND_READ_MAP
Definition: vga.h:111
#define VGA_BASE_IO_PORT
Definition: vga.h:38
#define GetBValue(quad)
Definition: precomp.h:92
#define GetFontPtr(_Char)
Definition: precomp.h:102
#define GetGValue(quad)
Definition: precomp.h:91
ULONG RGBQUAD
Definition: precomp.h:49
#define GetRValue(quad)
Definition: precomp.h:90
#define FONT_PTR_DELTA
Definition: precomp.h:103
#define BOOTCHAR_HEIGHT
Definition: precomp.h:26
ASMGENDATA Table[]
Definition: genincdata.c:61
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
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
#define X(b, s)
_In_ ULONG Mode
Definition: hubbusif.h:303
PPC_QUAL void __movsb(unsigned char *Destination, const unsigned char *Source, unsigned long Count)
Definition: intrin_ppc.h:323
_In_ PUNICODE_STRING _Inout_ PUNICODE_STRING Destination
Definition: rtlfuncs.h:3051
#define _In_reads_(s)
Definition: no_sal2.h:168
#define _In_
Definition: no_sal2.h:158
#define _Out_writes_bytes_all_(s)
Definition: no_sal2.h:194
_In_ ULONG _In_ ULONG Offset
Definition: ntddpcm.h:101
#define SCREEN_WIDTH
Definition: pc98video.c:24
#define SCREEN_HEIGHT
Definition: pc98video.c:25
#define __inpb(Port)
Definition: pc.h:27
#define __outpw(Port, Value)
Definition: pc.h:36
VGA_GRAPHICS_CONTROLLER_STATE
Definition: pc.h:13
@ VGA_GC_STATE_UNINITIALIZED
Definition: pc.h:14
@ VGA_GC_STATE_COPY_PIXELS
Definition: pc.h:17
@ VGA_GC_STATE_READ_PIXELS
Definition: pc.h:15
@ VGA_GC_STATE_WRITE_PIXELS
Definition: pc.h:16
#define __outpb(Port, Value)
Definition: pc.h:33
unsigned short USHORT
Definition: pedump.c:61
char CHAR
Definition: pedump.c:57
#define BV_COLOR_NONE
Definition: display.h:31
#define Shift
Definition: exp.c:31
ULONG Right
Definition: precomp.h:71
ULONG Top
Definition: precomp.h:70
ULONG Bottom
Definition: precomp.h:72
ULONG Left
Definition: precomp.h:69
uint32_t * PULONG
Definition: typedefs.h:59
unsigned char UCHAR
Definition: typedefs.h:53
#define NTAPI
Definition: typedefs.h:36
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
uint32_t ULONG_PTR
Definition: typedefs.h:65
unsigned char * PUCHAR
Definition: typedefs.h:53
uint32_t ULONG
Definition: typedefs.h:59
USHORT Count
Definition: userreq.cpp:200
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR OutputBuffer
Definition: wdfiotarget.h:863
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
Definition: wdfregistry.h:413
_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
NTKERNELAPI VOID NTAPI WRITE_REGISTER_UCHAR(IN PUCHAR Register, IN UCHAR Value)
NTKERNELAPI UCHAR NTAPI READ_REGISTER_UCHAR(IN PUCHAR Register)