#include <stdarg.h>
#include <windef.h>
#include <wingdi.h>
#include <winddi.h>
#include <devioctl.h>
#include <ntddvdeo.h>
#include "debug.h"
Go to the source code of this file.
◆ ALLOC_TAG
◆ DLL_NAME
◆ DRIVER_EXTRA_SIZE
◆ MAX_CLUT_SIZE
◆ STANDARD_DEBUG_PREFIX
#define STANDARD_DEBUG_PREFIX "FRAMEBUF: " |
◆ PDEV
◆ PPDEV
◆ bInit256ColorPalette()
Definition at line 193 of file palette.c.
194{
197 ULONG ulReturnedDataLength;
200
202 {
203
204
205
206
210
211
212
213
214
215 cColors = 256;
217
218 while(cColors--)
219 {
220 pScreenClutData[cColors].
Red = ppdev->
pPal[cColors].
peRed >>
226 pScreenClutData[cColors].
Unused = 0;
227 }
228
229
230
231
232
233 if (EngDeviceIoControl(ppdev->
hDriver,
235 pScreenClut,
238 0,
239 &ulReturnedDataLength))
240 {
241 DISPDBG((0,
"Failed bEnablePalette"));
243 }
244 }
245
246 DISPDBG((5,
"Passed bEnablePalette"));
247
249}
#define IOCTL_VIDEO_SET_COLOR_REGISTERS
struct VIDEO_CLUT * PVIDEO_CLUT
struct _VIDEO_CLUTDATA * PVIDEO_CLUTDATA
union VIDEO_CLUT::@3144 LookupTable[1]
Referenced by DrvEnableSurface().
◆ bInitPaletteInfo()
Definition at line 50 of file palette.c.
51{
54
56}
BOOL NTAPI bInitDefaultPalette(PPDEV ppdev, DEVINFO *pDevInfo)
Referenced by DrvEnablePDEV().
◆ bInitPDEV()
◆ bInitPointer()
Definition at line 400 of file pointer.c.
401{
402 DWORD returnedDataLength;
403
406
407
408
409
410
411 if (EngDeviceIoControl(ppdev->
hDriver,
414 0,
417 &returnedDataLength))
418 {
420 }
421
422
423
424
425
426
429 {
431 }
432
433
434
435
436
437
438
439
440
441
442
443
444
446 {
448 }
449 else
450 {
452 }
453
455}
#define VIDEO_MODE_MONO_POINTER
#define IOCTL_VIDEO_QUERY_POINTER_CAPABILITIES
#define VIDEO_MODE_ASYNC_POINTER
#define VIDEO_MODE_COLOR_POINTER
VIDEO_POINTER_CAPABILITIES PointerCapabilities
DWORD cjPointerAttributes
PVIDEO_POINTER_ATTRIBUTES pPointerAttributes
Referenced by DrvEnablePDEV().
◆ bInitSURF()
Definition at line 43 of file screen.c.
44{
45 DWORD returnedDataLength;
46 DWORD MaxWidth, MaxHeight;
49
50 ULONG RemappingNeeded = 0;
51
52
53
54
55
56 if (EngDeviceIoControl(ppdev->
hDriver,
60
61 &RemappingNeeded,
63
64 &returnedDataLength))
65 {
66 RIP(
"DISP bInitSURF failed IOCTL_SET_MODE\n");
68 }
69
70
71
72
73
74
75 if (bFirst || RemappingNeeded)
76 {
77
79
80 if (EngDeviceIoControl(ppdev->
hDriver,
82 &videoMemory,
84 &videoMemoryInformation,
86 &returnedDataLength))
87 {
88 RIP(
"DISP bInitSURF failed IOCTL_VIDEO_MAP\n");
90 }
91
93
96 {
97 RIP(
"VideoRamBase does not correspond to FrameBufferBase\n");
98 }
99
100
101
102
103
105
107
108 DISPDBG((1,
"Frame buffer memory is not accessible.\n"));
110 }
111
113
114
115
116
117
119
120
121
123
124
125
126
127
128
129
130
132 {
134 }
135 else
136 {
138 }
139
142 ((
sizeof(
UCHAR) * MaxWidth * MaxHeight) * 2);
143
146
148
149 DISPDBG((0,
"bInitPointer EngAllocMem failed\n"));
151 }
152
160 }
161
163}
#define IOCTL_VIDEO_MAP_VIDEO_MEMORY
#define IOCTL_VIDEO_SET_CURRENT_MODE
struct _VIDEO_POINTER_ATTRIBUTES VIDEO_POINTER_ATTRIBUTES
struct _VIDEO_POINTER_ATTRIBUTES * PVIDEO_POINTER_ATTRIBUTES
void * EngAllocMem(int zero, unsigned long size, int tag=0)
PVOID RequestedVirtualAddress
Referenced by DrvAssertMode(), and DrvEnableSurface().
◆ getAvailableModes()
Definition at line 507 of file screen.c.
511{
515
516
517
518
519
520 if (EngDeviceIoControl(
hDriver,
523 0,
524 &modes,
526 &ulTemp))
527 {
528 DISPDBG((0,
"getAvailableModes failed VIDEO_QUERY_NUM_AVAIL_MODES\n"));
529 return 0;
530 }
531
533
534
535
536
537
541
542 if (*modeInformation ==
NULL)
543 {
544 DISPDBG((0,
"getAvailableModes failed EngAllocMem\n"));
545
546 return 0;
547 }
548
549
550
551
552
553 if (EngDeviceIoControl(
hDriver,
556 0,
557 *modeInformation,
559 &ulTemp))
560 {
561
562 DISPDBG((0,
"getAvailableModes failed VIDEO_QUERY_AVAIL_MODES\n"));
563
565 *modeInformation =
NULL;
566
567 return 0;
568 }
569
570
571
572
573
574
575
577 pVideoTemp = *modeInformation;
578
579
580
581
582
583
584 while (ulTemp--)
585 {
588
590
595 {
597 }
598
601 }
602
604
605}
#define VIDEO_MODE_GRAPHICS
struct _VIDEO_MODE_INFORMATION * PVIDEO_MODE_INFORMATION
#define VIDEO_MODE_BANKED
#define IOCTL_VIDEO_QUERY_AVAIL_MODES
#define IOCTL_VIDEO_QUERY_NUM_AVAIL_MODES
ULONG ModeInformationLength
_In_ LPWSTR _In_ ULONG _In_ ULONG _In_ ULONG _Out_ DEVINFO _In_ HDEV _In_ LPWSTR _In_ HANDLE hDriver
Referenced by DrvGetModes().
◆ vDisablePalette()
Definition at line 65 of file palette.c.
66{
67
68
70 {
73 }
74
77}
ENGAPI BOOL APIENTRY EngDeletePalette(_In_ _Post_ptr_invalid_ HPALETTE hpal)
Referenced by DrvDisablePDEV().
◆ vDisableSURF()
Definition at line 172 of file screen.c.
173{
174 DWORD returnedDataLength;
176
178
181 &videoMemory,
184 0,
185 &returnedDataLength))
186 {
187 RIP(
"DISP vDisableSURF failed IOCTL_VIDEO_UNMAP\n");
188 }
189}
#define IOCTL_VIDEO_UNMAP_VIDEO_MEMORY
Referenced by DrvDisableSurface().