ReactOS 0.4.15-dev-7788-g1ad9096
modeset.c
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS VGA Miniport Driver
3 * LICENSE: Microsoft NT4 DDK Sample Code License
4 * FILE: win32ss/drivers/miniport/vga_new/modeset.c
5 * PURPOSE: Handles switching to Standard VGA Modes for compatible cards
6 * PROGRAMMERS: Copyright (c) 1992 Microsoft Corporation
7 * ReactOS Portable Systems Group
8 */
9
10#include "vga.h"
11
15 PHW_DEVICE_EXTENSION HwDeviceExtension,
16 PUSHORT pusCmdStream
17 );
18
22 PHW_DEVICE_EXTENSION HwDeviceExtension,
24 ULONG ModeSize,
25// eVb: 2.1 [SET MODE] - Add new output parameter for framebuffer update functionality
26 PULONG PhysPtrChange
27// eVb: 2.1 [END]
28 );
29
33 PHW_DEVICE_EXTENSION HwDeviceExtension,
34 PVIDEO_MODE_INFORMATION ModeInformation,
35 ULONG ModeInformationSize,
36 PULONG_PTR OutputSize
37 );
38
42 PHW_DEVICE_EXTENSION HwDeviceExtension,
43 PVIDEO_NUM_MODES NumModes,
44 ULONG NumModesSize,
45 PULONG_PTR OutputSize
46 );
47
51 PHW_DEVICE_EXTENSION HwDeviceExtension,
52 PVIDEO_MODE_INFORMATION ModeInformation,
53 ULONG ModeInformationSize,
54 PULONG_PTR OutputSize
55 );
56
57VOID
60 PHW_DEVICE_EXTENSION HwDeviceExtension
61 );
62
63#if defined(ALLOC_PRAGMA)
64#pragma alloc_text(PAGE,VgaInterpretCmdStream)
65#pragma alloc_text(PAGE,VgaSetMode)
66#pragma alloc_text(PAGE,VgaQueryAvailableModes)
67#pragma alloc_text(PAGE,VgaQueryNumberOfAvailableModes)
68#pragma alloc_text(PAGE,VgaZeroVideoMemory)
69#endif
70
71//---------------------------------------------------------------------------
75 PHW_DEVICE_EXTENSION HwDeviceExtension,
76 PUSHORT pusCmdStream
77 )
78
79/*++
80
81Routine Description:
82
83 Interprets the appropriate command array to set up VGA registers for the
84 requested mode. Typically used to set the VGA into a particular mode by
85 programming all of the registers
86
87Arguments:
88
89 HwDeviceExtension - Pointer to the miniport driver's device extension.
90
91 pusCmdStream - array of commands to be interpreted.
92
93Return Value:
94
95 The status of the operation (can only fail on a bad command); TRUE for
96 success, FALSE for failure.
97
98--*/
99
100{
101 ULONG ulCmd;
102 ULONG_PTR ulPort;
103 UCHAR jValue;
104 USHORT usValue;
105 ULONG culCount;
106 ULONG ulIndex;
107 ULONG_PTR ulBase;
108
109 if (pusCmdStream == NULL) {
110
111 VideoDebugPrint((1, "VgaInterpretCmdStream - Invalid pusCmdStream\n"));
112 return TRUE;
113 }
114
115 ulBase = (ULONG_PTR)HwDeviceExtension->IOAddress;
116
117 //
118 // Now set the adapter to the desired mode.
119 //
120
121 while ((ulCmd = *pusCmdStream++) != EOD) {
122
123 //
124 // Determine major command type
125 //
126
127 switch (ulCmd & 0xF0) {
128
129 //
130 // Basic input/output command
131 //
132
133 case INOUT:
134
135 //
136 // Determine type of inout instruction
137 //
138
139 if (!(ulCmd & IO)) {
140
141 //
142 // Out instruction. Single or multiple outs?
143 //
144
145 if (!(ulCmd & MULTI)) {
146
147 //
148 // Single out. Byte or word out?
149 //
150
151 if (!(ulCmd & BW)) {
152
153 //
154 // Single byte out
155 //
156
157 ulPort = *pusCmdStream++;
158 jValue = (UCHAR) *pusCmdStream++;
159 VideoPortWritePortUchar((PUCHAR)(ulBase+ulPort),
160 jValue);
161
162 } else {
163
164 //
165 // Single word out
166 //
167
168 ulPort = *pusCmdStream++;
169 usValue = *pusCmdStream++;
170 VideoPortWritePortUshort((PUSHORT)(ulBase+ulPort),
171 usValue);
172
173 }
174
175 } else {
176
177 //
178 // Output a string of values
179 // Byte or word outs?
180 //
181
182 if (!(ulCmd & BW)) {
183
184 //
185 // String byte outs. Do in a loop; can't use
186 // VideoPortWritePortBufferUchar because the data
187 // is in USHORT form
188 //
189
190 ulPort = ulBase + *pusCmdStream++;
191 culCount = *pusCmdStream++;
192
193 while (culCount--) {
194 jValue = (UCHAR) *pusCmdStream++;
196 jValue);
197
198 }
199
200 } else {
201
202 //
203 // String word outs
204 //
205
206 ulPort = *pusCmdStream++;
207 culCount = *pusCmdStream++;
209 (ulBase + ulPort), pusCmdStream, culCount);
210 pusCmdStream += culCount;
211
212 }
213 }
214
215 } else {
216
217 // In instruction
218 //
219 // Currently, string in instructions aren't supported; all
220 // in instructions are handled as single-byte ins
221 //
222 // Byte or word in?
223 //
224
225 if (!(ulCmd & BW)) {
226 //
227 // Single byte in
228 //
229
230 ulPort = *pusCmdStream++;
231 jValue = VideoPortReadPortUchar((PUCHAR)ulBase+ulPort);
232
233 } else {
234
235 //
236 // Single word in
237 //
238
239 ulPort = *pusCmdStream++;
241 (ulBase+ulPort));
242
243 }
244
245 }
246
247 break;
248
249 //
250 // Higher-level input/output commands
251 //
252
253 case METAOUT:
254
255 //
256 // Determine type of metaout command, based on minor
257 // command field
258 //
259 switch (ulCmd & 0x0F) {
260
261 //
262 // Indexed outs
263 //
264
265 case INDXOUT:
266
267 ulPort = ulBase + *pusCmdStream++;
268 culCount = *pusCmdStream++;
269 ulIndex = *pusCmdStream++;
270
271 while (culCount--) {
272
273 usValue = (USHORT) (ulIndex +
274 (((ULONG)(*pusCmdStream++)) << 8));
275 VideoPortWritePortUshort((PUSHORT)ulPort, usValue);
276
277 ulIndex++;
278
279 }
280
281 break;
282
283 //
284 // Masked out (read, AND, XOR, write)
285 //
286
287 case MASKOUT:
288
289 ulPort = *pusCmdStream++;
290 jValue = VideoPortReadPortUchar((PUCHAR)ulBase+ulPort);
291 jValue &= *pusCmdStream++;
292 jValue ^= *pusCmdStream++;
293 VideoPortWritePortUchar((PUCHAR)ulBase + ulPort,
294 jValue);
295 break;
296
297 //
298 // Attribute Controller out
299 //
300
301 case ATCOUT:
302
303 ulPort = ulBase + *pusCmdStream++;
304 culCount = *pusCmdStream++;
305 ulIndex = *pusCmdStream++;
306
307 while (culCount--) {
308
309 // Write Attribute Controller index
311 (UCHAR)ulIndex);
312
313 // Write Attribute Controller data
314 jValue = (UCHAR) *pusCmdStream++;
315 VideoPortWritePortUchar((PUCHAR)ulPort, jValue);
316
317 ulIndex++;
318
319 }
320
321 break;
322
323 //
324 // None of the above; error
325 //
326 default:
327
328 return FALSE;
329
330 }
331
332
333 break;
334
335 //
336 // NOP
337 //
338
339 case NCMD:
340
341 break;
342
343 //
344 // Unknown command; error
345 //
346
347 default:
348
349 return FALSE;
350
351 }
352
353 }
354
355 return TRUE;
356
357} // end VgaInterpretCmdStream()
358
360NTAPI
362 PHW_DEVICE_EXTENSION HwDeviceExtension,
364 ULONG ModeSize,
365// eVb: 2.2 [SET MODE] - Add new output parameter for framebuffer update functionality
366 PULONG PhysPtrChange
367// eVb: 2.2 [END]
368 )
369
370/*++
371
372Routine Description:
373
374 This routine sets the vga into the requested mode.
375
376Arguments:
377
378 HwDeviceExtension - Pointer to the miniport driver's device extension.
379
380 Mode - Pointer to the structure containing the information about the
381 font to be set.
382
383 ModeSize - Length of the input buffer supplied by the user.
384
385Return Value:
386
387 ERROR_INSUFFICIENT_BUFFER if the input buffer was not large enough
388 for the input data.
389
390 ERROR_INVALID_PARAMETER if the mode number is invalid.
391
392 NO_ERROR if the operation completed successfully.
393
394--*/
395
396{
397 PVIDEOMODE pRequestedMode;
399 ULONG RequestedModeNum;
400// eVb: 2.3 [SET MODE] - Add new output parameter for framebuffer update functionality
401 *PhysPtrChange = FALSE;
402// eVb: 2.3 [END]
403 //
404 // Check if the size of the data in the input buffer is large enough.
405 //
406
407 if (ModeSize < sizeof(VIDEO_MODE))
408 {
410 }
411
412 //
413 // Extract the clear memory, and map linear bits.
414 //
415
416 RequestedModeNum = Mode->RequestedMode &
418
419
420 if (!(Mode->RequestedMode & VIDEO_MODE_NO_ZERO_MEMORY))
421 {
422#if defined(_X86_)
423 VgaZeroVideoMemory(HwDeviceExtension);
424#endif
425 }
426
427 //
428 // Check to see if we are requesting a valid mode
429 //
430// eVb: 2.4 [CIRRUS] - Remove Cirrus-specific check for valid mode
431 if ( (RequestedModeNum >= NumVideoModes) )
432// eVb: 2.4 [END]
433 {
434 VideoDebugPrint((0, "Invalide Mode Number = %d!\n", RequestedModeNum));
435
437 }
438
439 VideoDebugPrint((2, "Attempting to set mode %d\n",
440 RequestedModeNum));
441// eVb: 2.5 [VBE] - Use dynamic VBE mode list instead of hard-coded VGA list
442 pRequestedMode = &VgaModeList[RequestedModeNum];
443// eVb: 2.5 [END]
444 VideoDebugPrint((2, "Info on Requested Mode:\n"
445 "\tResolution: %dx%d\n",
446 pRequestedMode->hres,
447 pRequestedMode->vres ));
448
449 //
450 // VESA BIOS mode switch
451 //
452// eVb: 2.6 [VBE] - VBE Mode Switch Support
453 status = VbeSetMode(HwDeviceExtension, pRequestedMode, PhysPtrChange);
455 {
456 //
457 // VGA mode switch
458 //
459
460 if (!pRequestedMode->CmdStream) return ERROR_INVALID_FUNCTION;
461 if (!VgaInterpretCmdStream(HwDeviceExtension, pRequestedMode->CmdStream)) return ERROR_INVALID_FUNCTION;
462 goto Cleanup;
463 }
464 else if (status != NO_ERROR) return status;
465// eVb: 2.6 [END]
466// eVb: 2.7 [MODE-X] - Windows VGA Miniport Supports Mode-X, we should too
467 //
468 // ModeX check
469 //
470
471 if (pRequestedMode->hres == 320)
472 {
473 VideoDebugPrint((0, "ModeX not support!!!\n"));
475 }
476// eVb: 2.7 [END]
477 //
478 // Text mode check
479 //
480
481 if (!(pRequestedMode->fbType & VIDEO_MODE_GRAPHICS))
482 {
483// eVb: 2.8 [TODO] - This code path is not implemented yet
484 VideoDebugPrint((0, "Text-mode not support!!!\n"));
486// eVb: 2.8 [END]
487 }
488
489Cleanup:
490 //
491 // Update the location of the physical frame buffer within video memory.
492 //
493// eVb: 2.9 [VBE] - Linear and banked support is unified in VGA, unlike Cirrus
494 HwDeviceExtension->PhysicalVideoMemoryBase.LowPart = pRequestedMode->PhysBase;
495 HwDeviceExtension->PhysicalVideoMemoryLength = pRequestedMode->PhysSize;
496
497 HwDeviceExtension->PhysicalFrameLength =
498 pRequestedMode->FrameBufferSize;
499
500 HwDeviceExtension->PhysicalFrameOffset.LowPart =
501 pRequestedMode->FrameBufferBase;
502// eVb: 2.9 [END]
503
504 //
505 // Store the new mode value.
506 //
507
508 HwDeviceExtension->CurrentMode = pRequestedMode;
509 HwDeviceExtension->ModeIndex = Mode->RequestedMode;
510
511 return NO_ERROR;
512
513} //end VgaSetMode()
514
516NTAPI
518 PHW_DEVICE_EXTENSION HwDeviceExtension,
519 PVIDEO_MODE_INFORMATION ModeInformation,
520 ULONG ModeInformationSize,
521 PULONG_PTR OutputSize
522 )
523
524/*++
525
526Routine Description:
527
528 This routine returns the list of all available available modes on the
529 card.
530
531Arguments:
532
533 HwDeviceExtension - Pointer to the miniport driver's device extension.
534
535 ModeInformation - Pointer to the output buffer supplied by the user.
536 This is where the list of all valid modes is stored.
537
538 ModeInformationSize - Length of the output buffer supplied by the user.
539
540 OutputSize - Pointer to a buffer in which to return the actual size of
541 the data in the buffer. If the buffer was not large enough, this
542 contains the minimum required buffer size.
543
544Return Value:
545
546 ERROR_INSUFFICIENT_BUFFER if the output buffer was not large enough
547 for the data being returned.
548
549 NO_ERROR if the operation completed successfully.
550
551--*/
552
553{
554 PVIDEO_MODE_INFORMATION videoModes = ModeInformation;
555 ULONG i;
556
557 //
558 // Find out the size of the data to be put in the buffer and return
559 // that in the status information (whether or not the information is
560 // there). If the buffer passed in is not large enough return an
561 // appropriate error code.
562 //
563
564 if (ModeInformationSize < (*OutputSize =
565// eVb: 2.10 [VBE] - We store VBE/VGA mode count in this global, not in DevExt like Cirrus
567// eVb: 2.10 [END]
568 sizeof(VIDEO_MODE_INFORMATION)) ) {
569
571
572 }
573
574 //
575 // For each mode supported by the card, store the mode characteristics
576 // in the output buffer.
577 //
578
579 for (i = 0; i < NumVideoModes; i++)
580 {
581 videoModes->Length = sizeof(VIDEO_MODE_INFORMATION);
582 videoModes->ModeIndex = i;
583// eVb: 2.11 [VBE] - Use dynamic VBE mode list instead of hard-coded VGA list
584 videoModes->VisScreenWidth = VgaModeList[i].hres;
585 videoModes->ScreenStride = VgaModeList[i].wbytes;
586 videoModes->VisScreenHeight = VgaModeList[i].vres;
587 videoModes->NumberOfPlanes = VgaModeList[i].numPlanes;
588 videoModes->BitsPerPlane = VgaModeList[i].bitsPerPlane;
589 videoModes->Frequency = VgaModeList[i].Frequency;
590 videoModes->XMillimeter = 320; // temporary hardcoded constant
591 videoModes->YMillimeter = 240; // temporary hardcoded constant
592 videoModes->AttributeFlags = VgaModeList[i].fbType;
593// eVb: 2.11 [END]
594
595 if ((VgaModeList[i].bitsPerPlane == 32) ||
596 (VgaModeList[i].bitsPerPlane == 24))
597 {
598
599 videoModes->NumberRedBits = 8;
600 videoModes->NumberGreenBits = 8;
601 videoModes->NumberBlueBits = 8;
602 videoModes->RedMask = 0xff0000;
603 videoModes->GreenMask = 0x00ff00;
604 videoModes->BlueMask = 0x0000ff;
605
606 }
607 else if (VgaModeList[i].bitsPerPlane == 16)
608 {
609
610 videoModes->NumberRedBits = 6;
611 videoModes->NumberGreenBits = 6;
612 videoModes->NumberBlueBits = 6;
613 videoModes->RedMask = 0x1F << 11;
614 videoModes->GreenMask = 0x3F << 5;
615 videoModes->BlueMask = 0x1F;
616
617 }
618// eVb: 2.12 [VGA] - Add support for 15bpp modes, which Cirrus doesn't support
619 else if (VgaModeList[i].bitsPerPlane == 15)
620 {
621
622 videoModes->NumberRedBits = 6;
623 videoModes->NumberGreenBits = 6;
624 videoModes->NumberBlueBits = 6;
625 videoModes->RedMask = 0x3E << 9;
626 videoModes->GreenMask = 0x1F << 5;
627 videoModes->BlueMask = 0x1F;
628 }
629// eVb: 2.12 [END]
630 else
631 {
632
633 videoModes->NumberRedBits = 6;
634 videoModes->NumberGreenBits = 6;
635 videoModes->NumberBlueBits = 6;
636 videoModes->RedMask = 0;
637 videoModes->GreenMask = 0;
638 videoModes->BlueMask = 0;
639 }
640
641// eVb: 2.13 [VGA] - All modes are palette managed/driven, unlike Cirrus
644// eVb: 2.13 [END]
645 videoModes++;
646
647 }
648
649 return NO_ERROR;
650
651} // end VgaGetAvailableModes()
652
654NTAPI
656 PHW_DEVICE_EXTENSION HwDeviceExtension,
657 PVIDEO_NUM_MODES NumModes,
658 ULONG NumModesSize,
659 PULONG_PTR OutputSize
660 )
661
662/*++
663
664Routine Description:
665
666 This routine returns the number of available modes for this particular
667 video card.
668
669Arguments:
670
671 HwDeviceExtension - Pointer to the miniport driver's device extension.
672
673 NumModes - Pointer to the output buffer supplied by the user. This is
674 where the number of modes is stored.
675
676 NumModesSize - Length of the output buffer supplied by the user.
677
678 OutputSize - Pointer to a buffer in which to return the actual size of
679 the data in the buffer.
680
681Return Value:
682
683 ERROR_INSUFFICIENT_BUFFER if the output buffer was not large enough
684 for the data being returned.
685
686 NO_ERROR if the operation completed successfully.
687
688--*/
689
690{
691 //
692 // Find out the size of the data to be put in the the buffer and return
693 // that in the status information (whether or not the information is
694 // there). If the buffer passed in is not large enough return an
695 // appropriate error code.
696 //
697
698 if (NumModesSize < (*OutputSize = sizeof(VIDEO_NUM_MODES)) ) {
699
701
702 }
703
704 //
705 // Store the number of modes into the buffer.
706 //
707
708// eVb: 2.14 [VBE] - We store VBE/VGA mode count in this global, not in DevExt like Cirrus
709 NumModes->NumModes = NumVideoModes;
710// eVb: 2.14 [END]
712
713 return NO_ERROR;
714
715} // end VgaGetNumberOfAvailableModes()
716
718NTAPI
720 PHW_DEVICE_EXTENSION HwDeviceExtension,
721 PVIDEO_MODE_INFORMATION ModeInformation,
722 ULONG ModeInformationSize,
723 PULONG_PTR OutputSize
724 )
725
726/*++
727
728Routine Description:
729
730 This routine returns a description of the current video mode.
731
732Arguments:
733
734 HwDeviceExtension - Pointer to the miniport driver's device extension.
735
736 ModeInformation - Pointer to the output buffer supplied by the user.
737 This is where the current mode information is stored.
738
739 ModeInformationSize - Length of the output buffer supplied by the user.
740
741 OutputSize - Pointer to a buffer in which to return the actual size of
742 the data in the buffer. If the buffer was not large enough, this
743 contains the minimum required buffer size.
744
745Return Value:
746
747 ERROR_INSUFFICIENT_BUFFER if the output buffer was not large enough
748 for the data being returned.
749
750 NO_ERROR if the operation completed successfully.
751
752--*/
753
754{
755 //
756 // check if a mode has been set
757 //
758
759 if (HwDeviceExtension->CurrentMode == NULL ) {
760
762
763 }
764
765 //
766 // Find out the size of the data to be put in the the buffer and return
767 // that in the status information (whether or not the information is
768 // there). If the buffer passed in is not large enough return an
769 // appropriate error code.
770 //
771
772 if (ModeInformationSize < (*OutputSize = sizeof(VIDEO_MODE_INFORMATION))) {
773
775
776 }
777
778 //
779 // Store the characteristics of the current mode into the buffer.
780 //
781
782 ModeInformation->Length = sizeof(VIDEO_MODE_INFORMATION);
783 ModeInformation->ModeIndex = HwDeviceExtension->ModeIndex;
784 ModeInformation->VisScreenWidth = HwDeviceExtension->CurrentMode->hres;
785 ModeInformation->ScreenStride = HwDeviceExtension->CurrentMode->wbytes;
786 ModeInformation->VisScreenHeight = HwDeviceExtension->CurrentMode->vres;
787 ModeInformation->NumberOfPlanes = HwDeviceExtension->CurrentMode->numPlanes;
788 ModeInformation->BitsPerPlane = HwDeviceExtension->CurrentMode->bitsPerPlane;
789 ModeInformation->Frequency = HwDeviceExtension->CurrentMode->Frequency;
790 ModeInformation->XMillimeter = 320; // temporary hardcoded constant
791 ModeInformation->YMillimeter = 240; // temporary hardcoded constant
792
793 ModeInformation->AttributeFlags = HwDeviceExtension->CurrentMode->fbType;
794
795 if ((ModeInformation->BitsPerPlane == 32) ||
796 (ModeInformation->BitsPerPlane == 24))
797 {
798
799 ModeInformation->NumberRedBits = 8;
800 ModeInformation->NumberGreenBits = 8;
801 ModeInformation->NumberBlueBits = 8;
802 ModeInformation->RedMask = 0xff0000;
803 ModeInformation->GreenMask = 0x00ff00;
804 ModeInformation->BlueMask = 0x0000ff;
805
806 }
807 else if (ModeInformation->BitsPerPlane == 16)
808 {
809
810 ModeInformation->NumberRedBits = 6;
811 ModeInformation->NumberGreenBits = 6;
812 ModeInformation->NumberBlueBits = 6;
813 ModeInformation->RedMask = 0x1F << 11;
814 ModeInformation->GreenMask = 0x3F << 5;
815 ModeInformation->BlueMask = 0x1F;
816
817 }
818// eVb: 2.12 [VGA] - Add support for 15bpp modes, which Cirrus doesn't support
819 else if (ModeInformation->BitsPerPlane == 15)
820 {
821
822 ModeInformation->NumberRedBits = 6;
823 ModeInformation->NumberGreenBits = 6;
824 ModeInformation->NumberBlueBits = 6;
825 ModeInformation->RedMask = 0x3E << 9;
826 ModeInformation->GreenMask = 0x1F << 5;
827 ModeInformation->BlueMask = 0x1F;
828 }
829// eVb: 2.12 [END]
830 else
831 {
832
833 ModeInformation->NumberRedBits = 6;
834 ModeInformation->NumberGreenBits = 6;
835 ModeInformation->NumberBlueBits = 6;
836 ModeInformation->RedMask = 0;
837 ModeInformation->GreenMask = 0;
838 ModeInformation->BlueMask = 0;
839 }
840
841// eVb: 2.13 [VGA] - All modes are palette managed/driven, unlike Cirrus
842 ModeInformation->AttributeFlags |= VIDEO_MODE_PALETTE_DRIVEN |
844// eVb: 2.13 [END]
845
846 return NO_ERROR;
847
848} // end VgaQueryCurrentMode()
849
850VOID
851NTAPI
853 PHW_DEVICE_EXTENSION HwDeviceExtension
854 )
855
856/*++
857
858Routine Description:
859
860 This routine zeros the first 256K on the VGA.
861
862Arguments:
863
864 HwDeviceExtension - Pointer to the miniport driver's device extension.
865
866
867Return Value:
868
869 None.
870
871--*/
872{
873 UCHAR temp;
874
875 //
876 // Map font buffer at A0000
877 //
878
879 VgaInterpretCmdStream(HwDeviceExtension, EnableA000Data);
880
881 //
882 // Enable all planes.
883 //
884
887
888 temp = VideoPortReadPortUchar(HwDeviceExtension->IOAddress +
889 SEQ_DATA_PORT) | (UCHAR)0x0F;
890
892 temp);
893
894 VideoPortZeroDeviceMemory(HwDeviceExtension->VideoMemoryAddress, 0xFFFF);
895
896 VgaInterpretCmdStream(HwDeviceExtension, DisableA000Color);
897
898}
while(CdLookupNextInitialFileDirent(IrpContext, Fcb, FileContext))
#define NO_ERROR
Definition: dderror.h:5
#define ERROR_INSUFFICIENT_BUFFER
Definition: dderror.h:10
#define ERROR_INVALID_FUNCTION
Definition: dderror.h:6
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
static const WCHAR Cleanup[]
Definition: register.c:80
#define ATCOUT
Definition: cmdcnst.h:76
#define NCMD
Definition: cmdcnst.h:63
#define INOUT
Definition: cmdcnst.h:61
#define INDXOUT
Definition: cmdcnst.h:75
#define BW
Definition: cmdcnst.h:70
#define MASKOUT
Definition: cmdcnst.h:77
#define EOD
Definition: cmdcnst.h:60
#define METAOUT
Definition: cmdcnst.h:62
#define MULTI
Definition: cmdcnst.h:69
#define IO
Definition: cmdcnst.h:71
#define SEQ_ADDRESS_PORT
Definition: vga.h:69
#define IND_MAP_MASK
Definition: vga.h:116
#define SEQ_DATA_PORT
Definition: vga.h:70
#define ULONG_PTR
Definition: config.h:101
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
_In_ ULONG Mode
Definition: hubbusif.h:303
VP_STATUS NTAPI VgaQueryAvailableModes(PHW_DEVICE_EXTENSION HwDeviceExtension, PVIDEO_MODE_INFORMATION ModeInformation, ULONG ModeInformationSize, PULONG_PTR OutputSize)
Definition: modeset.c:517
VP_STATUS NTAPI VgaQueryNumberOfAvailableModes(PHW_DEVICE_EXTENSION HwDeviceExtension, PVIDEO_NUM_MODES NumModes, ULONG NumModesSize, PULONG_PTR OutputSize)
Definition: modeset.c:655
VP_STATUS NTAPI VgaSetMode(PHW_DEVICE_EXTENSION HwDeviceExtension, PVIDEO_MODE Mode, ULONG ModeSize, PULONG PhysPtrChange)
Definition: modeset.c:361
VP_STATUS NTAPI VgaQueryCurrentMode(PHW_DEVICE_EXTENSION HwDeviceExtension, PVIDEO_MODE_INFORMATION ModeInformation, ULONG ModeInformationSize, PULONG_PTR OutputSize)
Definition: modeset.c:719
VOID NTAPI VgaZeroVideoMemory(PHW_DEVICE_EXTENSION HwDeviceExtension)
Definition: modeset.c:852
VP_STATUS NTAPI VgaInterpretCmdStream(PHW_DEVICE_EXTENSION HwDeviceExtension, PUSHORT pusCmdStream)
Definition: modeset.c:74
#define VIDEO_MODE_GRAPHICS
Definition: ntddvdeo.h:364
#define VIDEO_MODE_PALETTE_DRIVEN
Definition: ntddvdeo.h:365
#define VIDEO_MODE_MANAGED_PALETTE
Definition: ntddvdeo.h:366
#define VIDEO_MODE_NO_ZERO_MEMORY
Definition: ntddvdeo.h:356
#define VIDEO_MODE_MAP_MEM_LINEAR
Definition: ntddvdeo.h:355
struct _VIDEO_MODE_INFORMATION VIDEO_MODE_INFORMATION
unsigned short USHORT
Definition: pedump.c:61
static calc_node_t temp
Definition: rpn_ieee.c:38
VPAPI VOID NTAPI VideoPortZeroDeviceMemory(IN PVOID Destination, IN ULONG Length)
LONG VP_STATUS
Definition: video.h:153
VPAPI UCHAR NTAPI VideoPortReadPortUchar(IN PUCHAR Port)
VPAPI USHORT NTAPI VideoPortReadPortUshort(IN PUSHORT Port)
VPAPI VOID NTAPI VideoPortWritePortBufferUshort(IN PUSHORT Port, IN PUSHORT Buffer, IN ULONG Count)
VPAPI VOID NTAPI VideoPortWritePortUchar(IN PUCHAR Port, IN UCHAR Value)
#define VideoDebugPrint(x)
Definition: video.h:75
VPAPI VOID NTAPI VideoPortWritePortUshort(IN PUSHORT Port, IN USHORT Value)
PUCHAR IOAddress
Definition: vga.h:400
PHYSICAL_ADDRESS PhysicalFrameOffset
Definition: vga.h:395
ULONG ModeIndex
Definition: vga.h:402
PUCHAR VideoMemoryAddress
Definition: vga.h:401
ULONG PhysicalFrameLength
Definition: vga.h:397
PHYSICAL_ADDRESS PhysicalVideoMemoryBase
Definition: vga.h:394
ULONG PhysicalVideoMemoryLength
Definition: vga.h:396
ULONG ModeInformationLength
Definition: ntddvdeo.h:398
Definition: ps.c:97
uint32_t * PULONG_PTR
Definition: typedefs.h:65
uint32_t * PULONG
Definition: typedefs.h:59
#define NTAPI
Definition: typedefs.h:36
uint16_t * PUSHORT
Definition: typedefs.h:56
uint32_t ULONG_PTR
Definition: typedefs.h:65
unsigned char * PUCHAR
Definition: typedefs.h:53
uint32_t ULONG
Definition: typedefs.h:59
ULONG LowPart
Definition: typedefs.h:106
VP_STATUS NTAPI VbeSetMode(IN PHW_DEVICE_EXTENSION VgaDeviceExtension, IN PVIDEOMODE VgaMode, OUT PULONG PhysPtrChange)
Definition: vbemodes.c:88
ULONG NumVideoModes
Definition: vgadata.c:433
USHORT EnableA000Data[]
Definition: vgadata.c:447
PVIDEOMODE VgaModeList
Definition: vgadata.c:434
USHORT DisableA000Color[]
Definition: vgadata.c:473
unsigned char UCHAR
Definition: xmlstorage.h:181