ReactOS  0.4.13-dev-249-gcba1a2f
vgamp.c
Go to the documentation of this file.
1 /*
2  * VGA.C - a generic VGA miniport driver
3  *
4  */
5 
6 // ------------------------------------------------------- Includes
7 
8 #include "vgamp.h"
9 
10 #include <dderror.h>
11 #include <devioctl.h>
12 
13 // ------------------------------------------------------- Public Interface
14 
15 // DriverEntry
16 //
17 // DESCRIPTION:
18 // This function initializes the driver.
19 //
20 // RUN LEVEL:
21 // PASSIVE_LEVEL
22 //
23 // ARGUMENTS:
24 // IN PVOID Context1 Context parameter to pass to VidPortInitialize
25 // IN PVOID Context2 Context parameter to pass to VidPortInitialize
26 // RETURNS:
27 // ULONG
28 
32 {
34 
35  VideoPortZeroMemory(&InitData, sizeof InitData);
36 
37  InitData.HwInitDataSize = sizeof(InitData);
38  /* FIXME: Fill in InitData members */
39  InitData.StartingDeviceNumber = 0;
40 
41  /* Export driver entry points... */
42  InitData.HwFindAdapter = VGAFindAdapter;
43  InitData.HwInitialize = VGAInitialize;
44  InitData.HwStartIO = VGAStartIO;
45  /* InitData.HwInterrupt = VGAInterrupt; */
46  InitData.HwResetHw = VGAResetHw;
47  /* InitData.HwTimer = VGATimer; */
48 
49  return VideoPortInitialize(Context1, Context2, &InitData, NULL);
50 }
51 
52 // VGAFindAdapter
53 //
54 // DESCRIPTION:
55 // This routine is called by the videoport driver to find and allocate
56 // the adapter for a given bus. The miniport driver needs to do the
57 // following in this routine:
58 // - Determine if the adapter is present
59 // - Claim any necessary memory/IO resources for the adapter
60 // - Map resources into system memory for the adapter
61 // - fill in relevant information in the VIDEO_PORT_CONFIG_INFO buffer
62 // - update registry settings for adapter specifics.
63 // - Set 'Again' based on whether the function should be called again
64 // another adapter on the same bus.
65 //
66 // RUN LEVEL:
67 // PASSIVE_LEVEL
68 //
69 // ARGUMENTS:
70 // PVOID DeviceExtension
71 // PVOID Context
72 // PWSTR ArgumentString
73 // PVIDEO_PORT_CONFIG_INFO ConfigInfo
74 // PUCHAR Again
75 // RETURNS:
76 // VP_STATUS
77 
79 VGAFindAdapter(PVOID DeviceExtension,
80  PVOID Context,
81  PWSTR ArgumentString,
82  PVIDEO_PORT_CONFIG_INFO ConfigInfo,
83  PUCHAR Again)
84 {
85  /* FIXME: Determine if the adapter is present */
86  *Again = FALSE;
87 
88  return NO_ERROR;
89 
90  /* FIXME: Claim any necessary memory/IO resources for the adapter */
91  /* FIXME: Map resources into system memory for the adapter */
92  /* FIXME: Fill in relevant information in the VIDEO_PORT_CONFIG_INFO buffer */
93  /* FIXME: Update registry settings for adapter specifics. */
94 // return NO_ERROR;
95 }
96 
97 // VGAInitialize
98 //
99 // DESCRIPTION:
100 // Perform initialization tasks, but leave the adapter in the same
101 // user visible state
102 //
103 // RUN LEVEL:
104 // PASSIVE_LEVEL
105 //
106 // ARGUMENTS:
107 // PVOID DeviceExtension
108 // RETURNS:
109 // BOOLEAN Success or failure
111 VGAInitialize(PVOID DeviceExtension)
112 {
113  return TRUE;
114 }
115 
116 // VGAStartIO
117 //
118 // DESCRIPTION:
119 // This function gets called in responce to GDI EngDeviceIoControl
120 // calls. Device requests are passed in VRPs.
121 // Required VRPs:
122 // IOCTL_VIDEO_QUERY_NUM_AVAIL_MODES
123 // IOCTL_VIDEO_QUERY_AVAIL_MODES
124 // IOCTL_VIDEO_QUERY_CURRENT_MODE
125 // IOCTL_VIDEO_SET_CURRENT_MODE
126 // IOCTL_VIDEO_RESET_DEVICE
127 // IOCTL_VIDEO_MAP_VIDEO_MEMORY
128 // IOCTL_VIDEO_UNMAP_VIDEO_MEMORY
129 // IOCTL_VIDEO_SHARE_VIDEO_MEMORY
130 // IOCTL_VIDEO_UNSHARE_VIDEO_MEMORY
131 // Optional VRPs:
132 // IOCTL_VIDEO_GET_PUBLIC_ACCESS_RANGES
133 // IOCTL_VIDEO_FREE_PUBLIC_ACCESS_RANGES
134 // IOCTL_VIDEO_GET_POWER_MANAGEMENT
135 // IOCTL_VIDEO_SET_POWER_MANAGEMENT
136 // IOCTL_QUERY_COLOR_CAPABILITIES
137 // IOCTL_VIDEO_SET_COLOR_REGISTERS (required if the device has a palette)
138 // IOCTL_VIDEO_DISABLE_POINTER
139 // IOCTL_VIDEO_ENABLE_POINTER
140 // IOCTL_VIDEO_QUERY_POINTER_CAPABILITIES
141 // IOCTL_VIDEO_QUERY_POINTER_ATTR
142 // IOCTL_VIDEO_SET_POINTER_ATTR
143 // IOCTL_VIDEO_QUERY_POINTER_POSITION
144 // IOCTL_VIDEO_SET_POINTER_POSITION
145 // IOCTL_VIDEO_SAVE_HARDWARE_STATE
146 // IOCTL_VIDEO_RESTORE_HARDWARE_STATE
147 // IOCTL_VIDEO_DISABLE_CURSOR
148 // IOCTL_VIDEO_ENABLE_CURSOR
149 // IOCTL_VIDEO_QUERY_CURSOR_ATTR
150 // IOCTL_VIDEO_SET_CURSOR_ATTR
151 // IOCTL_VIDEO_QUERY_CURSOR_POSITION
152 // IOCTL_VIDEO_SET_CURSOR_POSITION
153 // IOCTL_VIDEO_GET_BANK_SELECT_CODE
154 // IOCTL_VIDEO_SET_PALETTE_REGISTERS
155 // IOCTL_VIDEO_LOAD_AND_SET_FONT
156 //
157 // RUN LEVEL:
158 // PASSIVE_LEVEL
159 //
160 // ARGUMENTS:
161 // PVOID DeviceExtension
162 // PVIDEO_REQUEST_PACKET RequestPacket
163 // RETURNS:
164 // BOOLEAN This function must return TRUE, and complete the work or
165 // set an error status in the VRP.
166 
168 VGAStartIO(PVOID DeviceExtension,
169  PVIDEO_REQUEST_PACKET RequestPacket)
170 {
171  BOOLEAN Result;
172 
173  RequestPacket->StatusBlock->Status = ERROR_INVALID_FUNCTION;
174 
175  switch (RequestPacket->IoControlCode)
176  {
178  if (RequestPacket->OutputBufferLength < sizeof(VIDEO_MEMORY_INFORMATION) ||
179  RequestPacket->InputBufferLength < sizeof(VIDEO_MEMORY))
180  {
181  RequestPacket->StatusBlock->Status = ERROR_INSUFFICIENT_BUFFER;
182  return TRUE;
183  }
184  Result = VGAMapVideoMemory(DeviceExtension,
185  (PVIDEO_MEMORY) RequestPacket->InputBuffer,
187  RequestPacket->OutputBuffer,
188  RequestPacket->StatusBlock);
189  break;
190 
192  if (RequestPacket->OutputBufferLength < sizeof(VIDEO_MODE_INFORMATION))
193  {
194  RequestPacket->StatusBlock->Status = ERROR_INSUFFICIENT_BUFFER;
195  return TRUE;
196  }
198  RequestPacket->StatusBlock);
199  break;
200 
202  if (RequestPacket->OutputBufferLength < sizeof(VIDEO_MODE_INFORMATION))
203  {
204  RequestPacket->StatusBlock->Status = ERROR_INSUFFICIENT_BUFFER;
205  return TRUE;
206  }
208  RequestPacket->StatusBlock);
209  break;
210 
212  if (RequestPacket->OutputBufferLength < sizeof(VIDEO_NUM_MODES))
213  {
214  RequestPacket->StatusBlock->Status = ERROR_INSUFFICIENT_BUFFER;
215  return TRUE;
216  }
218  RequestPacket->StatusBlock);
219  break;
220 
222  VGAResetDevice(RequestPacket->StatusBlock);
223  Result = TRUE;
224  break;
225 
227  if (RequestPacket->InputBufferLength < sizeof(VIDEO_CLUT) ||
228  RequestPacket->InputBufferLength <
229  (((PVIDEO_CLUT)RequestPacket->InputBuffer)->NumEntries * sizeof(ULONG)) +
230  FIELD_OFFSET(VIDEO_CLUT, LookupTable))
231  {
232  RequestPacket->StatusBlock->Status = ERROR_INSUFFICIENT_BUFFER;
233  return TRUE;
234  }
236  RequestPacket->StatusBlock);
237  break;
238 
240  if (RequestPacket->InputBufferLength < sizeof(VIDEO_MODE))
241  {
242  RequestPacket->StatusBlock->Status = ERROR_INSUFFICIENT_BUFFER;
243  return TRUE;
244  }
245  Result = VGASetCurrentMode((PVIDEO_MODE) RequestPacket->InputBuffer,
246  RequestPacket->StatusBlock);
247  break;
248 
250  if (RequestPacket->OutputBufferLength < sizeof(VIDEO_MEMORY_INFORMATION) ||
251  RequestPacket->InputBufferLength < sizeof(VIDEO_SHARE_MEMORY))
252  {
253  RequestPacket->StatusBlock->Status = ERROR_INSUFFICIENT_BUFFER;
254  return TRUE;
255  }
257  (PVIDEO_MEMORY_INFORMATION) RequestPacket->OutputBuffer,
258  RequestPacket->StatusBlock);
259  break;
260 
262  if (RequestPacket->InputBufferLength < sizeof(VIDEO_MEMORY))
263  {
264  RequestPacket->StatusBlock->Status = ERROR_INSUFFICIENT_BUFFER;
265  return TRUE;
266  }
267  Result = VGAUnmapVideoMemory(DeviceExtension,
268  (PVIDEO_MEMORY) RequestPacket->InputBuffer,
269  RequestPacket->StatusBlock);
270  break;
271 
273  if (RequestPacket->InputBufferLength < sizeof(VIDEO_MEMORY))
274  {
275  RequestPacket->StatusBlock->Status = ERROR_INSUFFICIENT_BUFFER;
276  return TRUE;
277  }
279  RequestPacket->StatusBlock);
280  break;
283  RequestPacket->StatusBlock);
284  break;
285 
286 #if 0
291 
293  VGAFreePublicAccessRanges((PVIDEO_PUBLIC_ACCESS_RANGES)
294  RequestPacket->InputBuffer,
295  RequestPacket->StatusBlock);
296  break;
297 
307 
309  VGAQueryPublicAccessRanges((PVIDEO_PUBLIC_ACCESS_RANGES)
310  RequestPacket->OutputBuffer,
311  RequestPacket->StatusBlock);
312  break;
313 
321 
322 #endif
323 
324  default:
325  RequestPacket->StatusBlock->Status = ERROR_INVALID_FUNCTION;
326  return FALSE;
327  }
328 
329  if (Result)
330  RequestPacket->StatusBlock->Status = NO_ERROR;
331 
332  return TRUE;
333 }
334 
335 #if 0
336 // VGAInterrupt
337 //
338 // DESCRIPTION:
339 // This function will be called upon receipt of a adapter generated
340 // interrupt when enabled.
341 //
342 // RUN LEVEL:
343 // IRQL
344 //
345 // ARGUMENTS:
346 // PVOID DeviceExtension
347 // RETURNS:
348 // BOOLEAN TRUE if the interrupt was handled by the routine
349 
350 static BOOLEAN NTAPI
351 VGAInterrupt(PVOID DeviceExtension)
352 {
353  return(TRUE);
354 }
355 #endif
356 
357 // VGAResetHw
358 //
359 // DESCRIPTION:
360 // This function is called to reset the hardware to a known state
361 // if calling a BIOS int 10 reset will not achieve this result.
362 //
363 // RUN LEVEL:
364 // PASSIVE_LEVEL
365 //
366 // ARGUMENTS:
367 // PVOID DeviceExtension
368 // ULONG Columns Columns and Rows specify the mode parameters
369 // ULONG Rows to reset to.
370 // RETURNS:
371 // BOOLEAN TRUE if no further action is necessary, FALSE if the system
372 // needs to still do a BIOS int 10 reset.
373 
375 VGAResetHw(PVOID DeviceExtension,
376  ULONG Columns,
377  ULONG Rows)
378 {
379  /* We don't anything to the vga that int10 can't cope with. */
380  return(FALSE);
381 }
382 
383 #if 0
384 // VGATimer
385 //
386 // DESCRIPTION:
387 // This function will be called once a second when enabled
388 //
389 // RUN LEVEL:
390 // PASSIVE_LEVEL
391 //
392 // ARGUMENTS:
393 // PVOID DeviceExtension
394 // RETURNS:
395 // VOID
396 
397 static VOID NTAPI
398 VGATimer(PVOID DeviceExtension)
399 {
400 }
401 
402 #endif
403 
405  IN PVIDEO_MEMORY RequestedAddress,
406  OUT PVIDEO_MEMORY_INFORMATION MapInformation,
407  OUT PSTATUS_BLOCK StatusBlock)
408 {
410  PVOID ReturnedAddress;
411  ULONG IoSpace;
412  PHYSICAL_ADDRESS FrameBufferBase;
413  ReturnedAddress = RequestedAddress->RequestedVirtualAddress;
414  ReturnedLength = 256 * 1024;
415  FrameBufferBase.QuadPart = 0xA0000;
416  IoSpace = VIDEO_MEMORY_SPACE_MEMORY;
417  StatusBlock->Status = VideoPortMapMemory(DeviceExtension,
418  FrameBufferBase,
420  &IoSpace,
421  &ReturnedAddress);
422  if (StatusBlock->Status != 0)
423  {
424  StatusBlock->Information = 0;
425  return TRUE;
426  }
427  MapInformation->VideoRamBase = MapInformation->FrameBufferBase =
428  ReturnedAddress;
429  MapInformation->VideoRamLength = MapInformation->FrameBufferLength =
431  StatusBlock->Information = sizeof(VIDEO_MEMORY_INFORMATION);
432  return TRUE;
433 }
434 
436  OUT PSTATUS_BLOCK StatusBlock)
437 {
438  /* Only one mode exists in VGA (640x480), so use VGAQueryCurrentMode */
439  return VGAQueryCurrentMode(ReturnedModes, StatusBlock);
440 }
441 
443  OUT PSTATUS_BLOCK StatusBlock)
444 {
445  CurrentMode->Length = sizeof(VIDEO_MODE_INFORMATION);
446  CurrentMode->ModeIndex = 2;
447  CurrentMode->VisScreenWidth = 640;
448  CurrentMode->VisScreenHeight = 480;
449  CurrentMode->ScreenStride = 80;
450  CurrentMode->NumberOfPlanes = 4;
451  CurrentMode->BitsPerPlane = 1;
452  CurrentMode->Frequency = 60;
453  CurrentMode->XMillimeter = 320;
454  CurrentMode->YMillimeter = 240;
455  CurrentMode->NumberRedBits =
456  CurrentMode->NumberGreenBits =
457  CurrentMode->NumberBlueBits = 6;
458  CurrentMode->RedMask =
459  CurrentMode->GreenMask =
460  CurrentMode->BlueMask = 0;
461  CurrentMode->VideoMemoryBitmapWidth = 640;
462  CurrentMode->VideoMemoryBitmapHeight = 480;
463  CurrentMode->AttributeFlags = VIDEO_MODE_GRAPHICS | VIDEO_MODE_COLOR |
465  CurrentMode->DriverSpecificAttributeFlags = 0;
466 
467  StatusBlock->Information = sizeof(VIDEO_MODE_INFORMATION);
468  return TRUE;
469 }
470 
472  OUT PSTATUS_BLOCK StatusBlock)
473 {
474  NumberOfModes->NumModes = 1;
475  NumberOfModes->ModeInformationLength = sizeof(VIDEO_MODE_INFORMATION);
476  StatusBlock->Information = sizeof(VIDEO_NUM_MODES);
477  return TRUE;
478 }
479 
481  OUT PSTATUS_BLOCK StatusBlock)
482 {
483  ;
484 
485 /*
486  We don't need the following code because the palette registers are set correctly on VGA initialization.
487  Still, we may include\test this is in the future.
488 
489  int i, j = 2;
490  char tmp, v;
491 
492  tmp = VideoPortReadPortUchar(0x03da);
493  v = VideoPortReadPortUchar(0x03c0);
494 
495  // Set the first 16 palette registers to map to the first 16 palette colors
496  for (i=PaletteRegisters[1]; i<PaletteRegisters[0]; i++)
497  {
498  tmp = VideoPortReadPortUchar(0x03da);
499  VideoPortWritePortUchar(0x03c0, i);
500  VideoPortWritePortUchar(0x03c0, PaletteRegisters[j++]);
501  }
502 
503  tmp = VideoPortReadPortUchar(0x03da);
504  VideoPortWritePortUchar(0x03d0, v | 0x20);
505 */
506  return TRUE;
507 }
508 
510  OUT PSTATUS_BLOCK StatusBlock)
511 {
512  int i;
513 
514  for (i=ColorLookUpTable->FirstEntry; i<ColorLookUpTable->NumEntries; i++)
515  {
516  VideoPortWritePortUchar((PUCHAR)0x03c8, i);
517  VideoPortWritePortUchar((PUCHAR)0x03c9, ColorLookUpTable->LookupTable[i].RgbArray.Red);
518  VideoPortWritePortUchar((PUCHAR)0x03c9, ColorLookUpTable->LookupTable[i].RgbArray.Green);
519  VideoPortWritePortUchar((PUCHAR)0x03c9, ColorLookUpTable->LookupTable[i].RgbArray.Blue);
520  }
521 
522  return TRUE;
523 }
524 
526  OUT PSTATUS_BLOCK StatusBlock)
527 {
528  if(RequestedMode->RequestedMode == 12)
529  {
530  InitVGAMode();
531  return TRUE;
532  } else {
533  VideoPortDebugPrint(Warn, "Unrecognised mode for VGASetCurrentMode\n");
534  return FALSE;
535  }
536 }
537 
539  OUT PVIDEO_MEMORY_INFORMATION ReturnedMemory,
540  OUT PSTATUS_BLOCK StatusBlock)
541 {
543 
544  StatusBlock->Status = ERROR_INVALID_FUNCTION;
545  return FALSE;
546 }
547 
549  IN PVIDEO_MEMORY MemoryToUnmap,
550  OUT PSTATUS_BLOCK StatusBlock)
551 {
552  if (VideoPortUnmapMemory(DeviceExtension,
553  MemoryToUnmap->RequestedVirtualAddress,
554  0) == NO_ERROR)
555  return TRUE;
556  else
557  return FALSE;
558 }
559 
561  OUT PSTATUS_BLOCK StatusBlock)
562 {
564 
565  StatusBlock->Status = ERROR_INVALID_FUNCTION;
566  return FALSE;
567 }
#define IOCTL_VIDEO_QUERY_COLOR_CAPABILITIES
Definition: ntddvdeo.h:110
#define IN
Definition: typedefs.h:38
#define IOCTL_VIDEO_QUERY_POINTER_POSITION
Definition: ntddvdeo.h:131
#define TRUE
Definition: types.h:120
struct _VIDEO_NUM_MODES VIDEO_NUM_MODES
#define IOCTL_VIDEO_QUERY_POINTER_ATTR
Definition: ntddvdeo.h:125
#define IOCTL_VIDEO_SET_POINTER_ATTR
Definition: ntddvdeo.h:164
#define IOCTL_VIDEO_UNSHARE_VIDEO_MEMORY
Definition: ntddvdeo.h:182
BOOLEAN VGASetPaletteRegisters(IN PUSHORT PaletteRegisters, OUT PSTATUS_BLOCK StatusBlock)
Definition: vgamp.c:480
#define IOCTL_VIDEO_QUERY_POINTER_CAPABILITIES
Definition: ntddvdeo.h:128
#define ERROR_INVALID_FUNCTION
Definition: dderror.h:6
uint16_t * PWSTR
Definition: typedefs.h:54
unsigned char * PUCHAR
Definition: retypes.h:3
#define IOCTL_VIDEO_DISABLE_CURSOR
Definition: ntddvdeo.h:77
#define IOCTL_VIDEO_GET_POWER_MANAGEMENT
Definition: ntddvdeo.h:98
#define IOCTL_VIDEO_RESET_DEVICE
Definition: ntddvdeo.h:137
#define IOCTL_VIDEO_MAP_VIDEO_MEMORY
Definition: ntddvdeo.h:104
BOOLEAN VGAQueryNumAvailModes(OUT PVIDEO_NUM_MODES NumberOfModes, OUT PSTATUS_BLOCK StatusBlock)
Definition: vgamp.c:471
VPAPI ULONG NTAPI VideoPortInitialize(IN PVOID Argument1, IN PVOID Argument2, IN PVIDEO_HW_INITIALIZATION_DATA HwInitializationData, IN PVOID HwContext)
Definition: videoprt.c:455
ULONG InputBufferLength
Definition: video.h:333
#define NO_ERROR
Definition: dderror.h:5
#define IOCTL_VIDEO_GET_BANK_SELECT_CODE
Definition: ntddvdeo.h:92
#define IOCTL_VIDEO_DISABLE_POINTER
Definition: ntddvdeo.h:80
#define IOCTL_VIDEO_FREE_PUBLIC_ACCESS_RANGES
Definition: ntddvdeo.h:89
VOID InitVGAMode(VOID)
Definition: initvga.c:110
VPAPI VOID NTAPI VideoPortZeroMemory(IN PVOID Destination, IN ULONG Length)
BOOLEAN VGASetCurrentMode(IN PVIDEO_MODE RequestedMode, OUT PSTATUS_BLOCK StatusBlock)
Definition: vgamp.c:525
PVIDEO_HW_START_IO HwStartIO
Definition: video.h:669
#define IOCTL_VIDEO_QUERY_CURRENT_MODE
Definition: ntddvdeo.h:113
#define VIDEO_MODE_NO_OFF_SCREEN
Definition: ntddvdeo.h:298
#define IOCTL_VIDEO_SET_CURRENT_MODE
Definition: ntddvdeo.h:152
BOOLEAN VGAUnshareVideoMemory(IN PVIDEO_MEMORY MemoryToUnshare, OUT PSTATUS_BLOCK StatusBlock)
Definition: vgamp.c:560
BOOLEAN NTAPI VGAStartIO(PVOID DeviceExtension, PVIDEO_REQUEST_PACKET RequestPacket)
Definition: vgamp.c:168
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
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
#define IOCTL_VIDEO_SET_PALETTE_REGISTERS
Definition: ntddvdeo.h:161
#define IOCTL_VIDEO_SET_CURSOR_POSITION
Definition: ntddvdeo.h:158
unsigned char BOOLEAN
smooth NULL
Definition: ftsmooth.c:416
_In_ ULONG Rows
Definition: haltypes.h:7
_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:426
BOOLEAN VGAUnmapVideoMemory(IN PVOID DeviceExtension, IN PVIDEO_MEMORY MemoryToUnmap, OUT PSTATUS_BLOCK StatusBlock)
Definition: vgamp.c:548
#define IOCTL_VIDEO_QUERY_CURSOR_ATTR
Definition: ntddvdeo.h:116
BOOLEAN NTAPI VGAResetHw(PVOID DeviceExtension, ULONG Columns, ULONG Rows)
Definition: vgamp.c:375
PVIDEO_HW_INITIALIZE HwInitialize
Definition: video.h:667
ULONG OutputBufferLength
Definition: video.h:335
#define IOCTL_VIDEO_SET_POWER_MANAGEMENT
Definition: ntddvdeo.h:170
#define IOCTL_VIDEO_SET_CURSOR_ATTR
Definition: ntddvdeo.h:155
#define IOCTL_VIDEO_UNMAP_VIDEO_MEMORY
Definition: ntddvdeo.h:179
#define IOCTL_VIDEO_ENABLE_CURSOR
Definition: ntddvdeo.h:83
#define IOCTL_VIDEO_QUERY_CURSOR_POSITION
Definition: ntddvdeo.h:119
BOOLEAN VGAQueryAvailModes(OUT PVIDEO_MODE_INFORMATION ReturnedModes, OUT PSTATUS_BLOCK StatusBlock)
Definition: vgamp.c:435
VPAPI VP_STATUS NTAPI VideoPortMapMemory(IN PVOID HwDeviceExtension, IN PHYSICAL_ADDRESS PhysicalAddress, IN OUT PULONG Length, IN PULONG InIoSpace, IN OUT PVOID *VirtualAddress)
struct _VIDEO_MEMORY_INFORMATION VIDEO_MEMORY_INFORMATION
PVIDEO_HW_FIND_ADAPTER HwFindAdapter
Definition: video.h:666
Definition: video.h:581
VOID VGAResetDevice(OUT PSTATUS_BLOCK StatusBlock)
Definition: initvga.c:117
VP_STATUS NTAPI VGAFindAdapter(PVOID DeviceExtension, PVOID Context, PWSTR ArgumentString, PVIDEO_PORT_CONFIG_INFO ConfigInfo, PUCHAR Again)
Definition: vgamp.c:79
VP_STATUS Status
Definition: video.h:323
BOOLEAN VGAShareVideoMemory(IN PVIDEO_SHARE_MEMORY RequestedMemory, OUT PVIDEO_MEMORY_INFORMATION ReturnedMemory, OUT PSTATUS_BLOCK StatusBlock)
Definition: vgamp.c:538
#define IOCTL_VIDEO_LOAD_AND_SET_FONT
Definition: ntddvdeo.h:101
PVIDEO_HW_RESET_HW HwResetHw
Definition: video.h:672
_In_ ULONG _In_ BATTERY_QUERY_INFORMATION_LEVEL _In_ LONG _In_ ULONG _Out_ PULONG ReturnedLength
Definition: batclass.h:187
#define IOCTL_VIDEO_QUERY_NUM_AVAIL_MODES
Definition: ntddvdeo.h:122
#define IOCTL_VIDEO_QUERY_AVAIL_MODES
Definition: ntddvdeo.h:107
VPAPI VP_STATUS NTAPI VideoPortUnmapMemory(IN PVOID HwDeviceExtension, IN OUT PVOID VirtualAddress, IN HANDLE ProcessHandle)
BOOLEAN VGAMapVideoMemory(IN PVOID DeviceExtension, IN PVIDEO_MEMORY RequestedAddress, OUT PVIDEO_MEMORY_INFORMATION MapInformation, OUT PSTATUS_BLOCK StatusBlock)
Definition: vgamp.c:404
#define IOCTL_VIDEO_SHARE_VIDEO_MEMORY
Definition: ntddvdeo.h:173
_In_ PNET_PNP_EVENT _In_ PTDI_PNP_CONTEXT _In_ PTDI_PNP_CONTEXT Context2
Definition: tdikrnl.h:1094
static const COLUMN_LIST Columns[]
Definition: listview.c:19
#define VIDEO_MODE_COLOR
Definition: ntddvdeo.h:293
PSTATUS_BLOCK StatusBlock
Definition: video.h:331
_In_ PNET_PNP_EVENT _In_ PTDI_PNP_CONTEXT Context1
Definition: tdikrnl.h:1094
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:254
#define IOCTL_VIDEO_ENABLE_POINTER
Definition: ntddvdeo.h:86
#define IOCTL_VIDEO_QUERY_PUBLIC_ACCESS_RANGES
Definition: ntddvdeo.h:134
#define OUT
Definition: typedefs.h:39
BOOLEAN VGAQueryCurrentMode(OUT PVIDEO_MODE_INFORMATION CurrentMode, OUT PSTATUS_BLOCK StatusBlock)
Definition: vgamp.c:442
unsigned int ULONG
Definition: retypes.h:1
ULONG NTAPI DriverEntry(IN PVOID Context1, IN PVOID Context2)
Definition: vgamp.c:30
#define UNIMPLEMENTED
Definition: debug.h:114
LONG VP_STATUS
Definition: video.h:153
#define IOCTL_VIDEO_RESTORE_HARDWARE_STATE
Definition: ntddvdeo.h:140
#define VIDEO_MEMORY_SPACE_MEMORY
Definition: video.h:132
struct _VIDEO_MODE_INFORMATION VIDEO_MODE_INFORMATION
VPAPI VOID NTAPI VideoPortWritePortUchar(IN PUCHAR Port, IN UCHAR Value)
VPAPI VOID __cdecl VideoPortDebugPrint(IN VIDEO_DEBUG_LEVEL DebugPrintLevel, IN PSTR DebugMessage, IN ...)
unsigned short * PUSHORT
Definition: retypes.h:2
#define IOCTL_VIDEO_SAVE_HARDWARE_STATE
Definition: ntddvdeo.h:143
BOOLEAN NTAPI VGAInitialize(PVOID DeviceExtension)
Definition: vgamp.c:111
BOOLEAN VGASetColorRegisters(IN PVIDEO_CLUT ColorLookUpTable, OUT PSTATUS_BLOCK StatusBlock)
Definition: vgamp.c:509
#define IOCTL_VIDEO_SET_POINTER_POSITION
Definition: ntddvdeo.h:167
LONGLONG QuadPart
Definition: typedefs.h:112
#define IOCTL_VIDEO_SET_COLOR_REGISTERS
Definition: ntddvdeo.h:149
#define ERROR_INSUFFICIENT_BUFFER
Definition: dderror.h:10
#define VIDEO_MODE_GRAPHICS
Definition: ntddvdeo.h:294