ReactOS  0.4.15-dev-1201-gb2cf5a4
pc98vid.h
Go to the documentation of this file.
1 /*
2  * PROJECT: ReactOS framebuffer driver for NEC PC-98 series
3  * LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
4  * PURPOSE: Miniport driver header file
5  * COPYRIGHT: Copyright 2020 Dmitry Borisov (di.sean@protonmail.com)
6  */
7 
8 #ifndef _PC98VID_PCH_
9 #define _PC98VID_PCH_
10 
11 #include <ntdef.h>
12 #include <dderror.h>
13 #include <devioctl.h>
14 #include <miniport.h>
15 #include <video.h>
16 #include <debug.h>
17 
18 #undef WRITE_PORT_UCHAR
19 #undef READ_PORT_UCHAR
20 #define WRITE_PORT_UCHAR(p, d) VideoPortWritePortUchar(p, d)
21 #define READ_PORT_UCHAR(p) VideoPortReadPortUchar(p)
22 #include <drivers/pc98/video.h>
23 
24 #define MONITOR_HW_ID 0x1033FACE /* Dummy */
25 
26 typedef struct _VIDEOMODE
27 {
38 
39 typedef struct _HW_DEVICE_EXTENSION
40 {
50 
52 NTAPI
54  _In_ PVOID HwDeviceExtension,
56  _In_opt_ PWSTR ArgumentString,
58  _Out_ PUCHAR Again);
59 
60 BOOLEAN
61 NTAPI
63  _In_ PHW_DEVICE_EXTENSION DeviceExtension);
64 
65 BOOLEAN
66 NTAPI
68  _In_ PVOID HwDeviceExtension);
69 
71 NTAPI
73  _In_ PVOID HwDeviceExtension,
74  _In_ PVIDEO_CHILD_ENUM_INFO ChildEnumInfo,
75  _Out_ PVIDEO_CHILD_TYPE VideoChildType,
76  _Out_ PUCHAR pChildDescriptor,
77  _Out_ PULONG UId,
78  _Out_ PULONG pUnused);
79 
80 BOOLEAN
81 NTAPI
83  _In_ PVOID HwDeviceExtension,
84  _Inout_ PVIDEO_REQUEST_PACKET RequestPacket);
85 
86 VOID
89  _In_ PHW_DEVICE_EXTENSION DeviceExtension,
90  _In_ ULONG ModeNumber,
92 
96  _In_ PHW_DEVICE_EXTENSION DeviceExtension,
97  _Out_ PVIDEO_MODE_INFORMATION ModeInformation,
98  _Out_ PSTATUS_BLOCK StatusBlock);
99 
100 VP_STATUS
101 FASTCALL
103  _In_ PHW_DEVICE_EXTENSION DeviceExtension,
105  _Out_ PSTATUS_BLOCK StatusBlock);
106 
107 VP_STATUS
108 FASTCALL
110  _In_ PHW_DEVICE_EXTENSION DeviceExtension,
111  _In_ PVIDEO_MODE RequestedMode);
112 
113 VP_STATUS
114 FASTCALL
116  _In_ PHW_DEVICE_EXTENSION DeviceExtension,
118  _Out_ PSTATUS_BLOCK StatusBlock);
119 
120 VP_STATUS
121 FASTCALL
123  _In_ PHW_DEVICE_EXTENSION DeviceExtension,
124  _In_ PVIDEO_MEMORY RequestedAddress,
125  _Out_ PVIDEO_MEMORY_INFORMATION MapInformation,
126  _Out_ PSTATUS_BLOCK StatusBlock);
127 
128 VP_STATUS
129 FASTCALL
131  _In_ PHW_DEVICE_EXTENSION DeviceExtension,
132  _In_ PVIDEO_MEMORY VideoMemory);
133 
134 VP_STATUS
135 FASTCALL
137 
138 VP_STATUS
139 FASTCALL
141  _In_ PVIDEO_CLUT ColorLookUpTable);
142 
143 VP_STATUS
144 FASTCALL
146  _In_ PHW_DEVICE_EXTENSION DeviceExtension,
147  _In_ PULONG ChildIndex,
148  _Out_ PULONG ChildState,
149  _Out_ PSTATUS_BLOCK StatusBlock);
150 
151 VP_STATUS
152 NTAPI
154  _In_ PVOID HwDeviceExtension,
155  _In_ ULONG HwId,
156  _In_ PVIDEO_POWER_MANAGEMENT VideoPowerControl);
157 
158 VP_STATUS
159 NTAPI
161  _In_ PVOID HwDeviceExtension,
162  _In_ ULONG HwId,
163  _In_ PVIDEO_POWER_MANAGEMENT VideoPowerControl);
164 
165 extern const VIDEOMODE VideoModes[];
166 
167 #endif /* _PC98VID_PCH_ */
UCHAR Clock2
Definition: pc98vid.h:32
SYNCPARAM VideoSyncParameters
Definition: pc98vid.h:36
BOOLEAN NTAPI HasPegcController(_In_ PHW_DEVICE_EXTENSION DeviceExtension)
Definition: hardware.c:70
uint16_t * PWSTR
Definition: typedefs.h:56
unsigned char * PUCHAR
Definition: retypes.h:3
static const VBE_MODE Modes[VBE_MODE_COUNT]
Definition: vbe.c:189
VOID FASTCALL Pc98VidQueryMode(_In_ PHW_DEVICE_EXTENSION DeviceExtension, _In_ ULONG ModeNumber, _Out_ PVIDEO_MODE_INFORMATION VideoMode)
Definition: ioctl.c:30
_Must_inspect_result_ _In_ PVOID _In_ struct _HW_INITIALIZATION_DATA _In_ PVOID HwContext
Definition: srb.h:897
struct _VIDEOMODE * PVIDEOMODE
UCHAR HorizontalScanRate
Definition: pc98vid.h:30
const VIDEOMODE VideoModes[]
Definition: pc98vid.c:21
struct _HW_DEVICE_EXTENSION * PHW_DEVICE_EXTENSION
#define FASTCALL
Definition: nt_native.h:50
#define _In_opt_
Definition: no_sal2.h:213
Definition: vga.h:250
uint32_t ULONG_PTR
Definition: typedefs.h:65
UCHAR Mem
Definition: pc98vid.h:33
ULONG_PTR PegcControlVa
Definition: pc98vid.h:46
VP_STATUS FASTCALL Pc98VidSetCurrentMode(_In_ PHW_DEVICE_EXTENSION DeviceExtension, _In_ PVIDEO_MODE RequestedMode)
Definition: hardware.c:89
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
BOOLEAN NTAPI Pc98VidStartIO(_In_ PVOID HwDeviceExtension, _Inout_ PVIDEO_REQUEST_PACKET RequestPacket)
Definition: ioctl.c:209
PHYSICAL_ADDRESS PegcControl
Definition: pc98vid.h:44
unsigned char BOOLEAN
VP_STATUS FASTCALL Pc98VidQueryAvailModes(_In_ PHW_DEVICE_EXTENSION DeviceExtension, _Out_ PVIDEO_MODE_INFORMATION ModeInformation, _Out_ PSTATUS_BLOCK StatusBlock)
Definition: ioctl.c:61
#define _Out_
Definition: no_sal2.h:323
VP_STATUS NTAPI Pc98VidFindAdapter(_In_ PVOID HwDeviceExtension, _In_opt_ PVOID HwContext, _In_opt_ PWSTR ArgumentString, _Inout_ PVIDEO_PORT_CONFIG_INFO ConfigInfo, _Out_ PUCHAR Again)
Definition: pc98vid.c:57
USHORT HResolution
Definition: pc98vid.h:28
PHYSICAL_ADDRESS FrameBuffer
Definition: pc98vid.h:47
VP_STATUS FASTCALL Pc98VidUnmapVideoMemory(_In_ PHW_DEVICE_EXTENSION DeviceExtension, _In_ PVIDEO_MEMORY VideoMemory)
Definition: ioctl.c:164
ULONG PegcControlLength
Definition: pc98vid.h:45
VP_STATUS NTAPI Pc98VidGetVideoChildDescriptor(_In_ PVOID HwDeviceExtension, _In_ PVIDEO_CHILD_ENUM_INFO ChildEnumInfo, _Out_ PVIDEO_CHILD_TYPE VideoChildType, _Out_ PUCHAR pChildDescriptor, _Out_ PULONG UId, _Out_ PULONG pUnused)
Definition: pc98vid.c:166
#define _Inout_
Definition: no_sal2.h:244
unsigned char UCHAR
Definition: xmlstorage.h:181
VP_STATUS NTAPI Pc98VidGetPowerState(_In_ PVOID HwDeviceExtension, _In_ ULONG HwId, _In_ PVIDEO_POWER_MANAGEMENT VideoPowerControl)
Definition: hardware.c:296
VP_STATUS NTAPI Pc98VidSetPowerState(_In_ PVOID HwDeviceExtension, _In_ ULONG HwId, _In_ PVIDEO_POWER_MANAGEMENT VideoPowerControl)
Definition: hardware.c:324
#define _In_
Definition: no_sal2.h:204
VP_STATUS FASTCALL Pc98VidGetChildState(_In_ PHW_DEVICE_EXTENSION DeviceExtension, _In_ PULONG ChildIndex, _Out_ PULONG ChildState, _Out_ PSTATUS_BLOCK StatusBlock)
Definition: ioctl.c:190
VP_STATUS FASTCALL Pc98VidQueryNumAvailModes(_In_ PHW_DEVICE_EXTENSION DeviceExtension, _Out_ PVIDEO_NUM_MODES Modes, _Out_ PSTATUS_BLOCK StatusBlock)
Definition: ioctl.c:87
unsigned short USHORT
Definition: pedump.c:61
BOOLEAN NTAPI Pc98VidInitialize(_In_ PVOID HwDeviceExtension)
Definition: pc98vid.c:149
struct _HW_DEVICE_EXTENSION HW_DEVICE_EXTENSION
VP_STATUS FASTCALL Pc98VidSetColorRegisters(_In_ PVIDEO_CLUT ColorLookUpTable)
Definition: hardware.c:266
unsigned int * PULONG
Definition: retypes.h:1
SYNCPARAM TextSyncParameters
Definition: pc98vid.h:35
VP_STATUS FASTCALL Pc98VidQueryCurrentMode(_In_ PHW_DEVICE_EXTENSION DeviceExtension, _Out_ PVIDEO_MODE_INFORMATION VideoMode, _Out_ PSTATUS_BLOCK StatusBlock)
Definition: ioctl.c:106
unsigned int ULONG
Definition: retypes.h:1
UCHAR Clock1
Definition: pc98vid.h:31
struct _VIDEOMODE VIDEOMODE
LONG VP_STATUS
Definition: video.h:153
enum _VIDEO_CHILD_TYPE * PVIDEO_CHILD_TYPE
UCHAR RefreshRate
Definition: pc98vid.h:34
VP_STATUS FASTCALL Pc98VidMapVideoMemory(_In_ PHW_DEVICE_EXTENSION DeviceExtension, _In_ PVIDEO_MEMORY RequestedAddress, _Out_ PVIDEO_MEMORY_INFORMATION MapInformation, _Out_ PSTATUS_BLOCK StatusBlock)
Definition: ioctl.c:125
ULONG FrameBufferLength
Definition: pc98vid.h:48
USHORT VResolution
Definition: pc98vid.h:29
VP_STATUS FASTCALL Pc98VidResetDevice(VOID)
Definition: ioctl.c:179