ReactOS  0.4.15-dev-1201-gb2cf5a4
pc98vid.h File Reference
#include <ntdef.h>
#include <dderror.h>
#include <devioctl.h>
#include <miniport.h>
#include <video.h>
#include <debug.h>
#include <drivers/pc98/video.h>
Include dependency graph for pc98vid.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _VIDEOMODE
 
struct  _HW_DEVICE_EXTENSION
 

Macros

#define WRITE_PORT_UCHAR(p, d)   VideoPortWritePortUchar(p, d)
 
#define READ_PORT_UCHAR(p)   VideoPortReadPortUchar(p)
 
#define MONITOR_HW_ID   0x1033FACE /* Dummy */
 

Typedefs

typedef struct _VIDEOMODE VIDEOMODE
 
typedef struct _VIDEOMODEPVIDEOMODE
 
typedef struct _HW_DEVICE_EXTENSION HW_DEVICE_EXTENSION
 
typedef struct _HW_DEVICE_EXTENSIONPHW_DEVICE_EXTENSION
 

Functions

VP_STATUS NTAPI Pc98VidFindAdapter (_In_ PVOID HwDeviceExtension, _In_opt_ PVOID HwContext, _In_opt_ PWSTR ArgumentString, _Inout_ PVIDEO_PORT_CONFIG_INFO ConfigInfo, _Out_ PUCHAR Again)
 
BOOLEAN NTAPI HasPegcController (_In_ PHW_DEVICE_EXTENSION DeviceExtension)
 
BOOLEAN NTAPI Pc98VidInitialize (_In_ PVOID HwDeviceExtension)
 
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)
 
BOOLEAN NTAPI Pc98VidStartIO (_In_ PVOID HwDeviceExtension, _Inout_ PVIDEO_REQUEST_PACKET RequestPacket)
 
VOID FASTCALL Pc98VidQueryMode (_In_ PHW_DEVICE_EXTENSION DeviceExtension, _In_ ULONG ModeNumber, _Out_ PVIDEO_MODE_INFORMATION VideoMode)
 
VP_STATUS FASTCALL Pc98VidQueryAvailModes (_In_ PHW_DEVICE_EXTENSION DeviceExtension, _Out_ PVIDEO_MODE_INFORMATION ModeInformation, _Out_ PSTATUS_BLOCK StatusBlock)
 
VP_STATUS FASTCALL Pc98VidQueryNumAvailModes (_In_ PHW_DEVICE_EXTENSION DeviceExtension, _Out_ PVIDEO_NUM_MODES Modes, _Out_ PSTATUS_BLOCK StatusBlock)
 
VP_STATUS FASTCALL Pc98VidSetCurrentMode (_In_ PHW_DEVICE_EXTENSION DeviceExtension, _In_ PVIDEO_MODE RequestedMode)
 
VP_STATUS FASTCALL Pc98VidQueryCurrentMode (_In_ PHW_DEVICE_EXTENSION DeviceExtension, _Out_ PVIDEO_MODE_INFORMATION VideoMode, _Out_ PSTATUS_BLOCK StatusBlock)
 
VP_STATUS FASTCALL Pc98VidMapVideoMemory (_In_ PHW_DEVICE_EXTENSION DeviceExtension, _In_ PVIDEO_MEMORY RequestedAddress, _Out_ PVIDEO_MEMORY_INFORMATION MapInformation, _Out_ PSTATUS_BLOCK StatusBlock)
 
VP_STATUS FASTCALL Pc98VidUnmapVideoMemory (_In_ PHW_DEVICE_EXTENSION DeviceExtension, _In_ PVIDEO_MEMORY VideoMemory)
 
VP_STATUS FASTCALL Pc98VidResetDevice (VOID)
 
VP_STATUS FASTCALL Pc98VidSetColorRegisters (_In_ PVIDEO_CLUT ColorLookUpTable)
 
VP_STATUS FASTCALL Pc98VidGetChildState (_In_ PHW_DEVICE_EXTENSION DeviceExtension, _In_ PULONG ChildIndex, _Out_ PULONG ChildState, _Out_ PSTATUS_BLOCK StatusBlock)
 
VP_STATUS NTAPI Pc98VidGetPowerState (_In_ PVOID HwDeviceExtension, _In_ ULONG HwId, _In_ PVIDEO_POWER_MANAGEMENT VideoPowerControl)
 
VP_STATUS NTAPI Pc98VidSetPowerState (_In_ PVOID HwDeviceExtension, _In_ ULONG HwId, _In_ PVIDEO_POWER_MANAGEMENT VideoPowerControl)
 

Variables

const VIDEOMODE VideoModes []
 

Macro Definition Documentation

◆ MONITOR_HW_ID

#define MONITOR_HW_ID   0x1033FACE /* Dummy */

Definition at line 24 of file pc98vid.h.

◆ READ_PORT_UCHAR

#define READ_PORT_UCHAR (   p)    VideoPortReadPortUchar(p)

Definition at line 21 of file pc98vid.h.

◆ WRITE_PORT_UCHAR

#define WRITE_PORT_UCHAR (   p,
  d 
)    VideoPortWritePortUchar(p, d)

Definition at line 20 of file pc98vid.h.

Typedef Documentation

◆ HW_DEVICE_EXTENSION

◆ PHW_DEVICE_EXTENSION

◆ PVIDEOMODE

◆ VIDEOMODE

Function Documentation

◆ HasPegcController()

BOOLEAN NTAPI HasPegcController ( _In_ PHW_DEVICE_EXTENSION  DeviceExtension)

Definition at line 70 of file hardware.c.

72 {
74 
76  return TestMmio(DeviceExtension);
77 
80  Success = GraphGetStatus(GRAPH_STATUS_PEGC) ? TestMmio(DeviceExtension) : FALSE;
83 
84  return Success;
85 }
unsigned char * PUCHAR
Definition: retypes.h:3
#define GRAPH_STATUS_PEGC
Definition: video.h:352
#define GDC2_IO_o_MODE_FLIPFLOP2
Definition: video.h:280
#define GDC2_EGC_FF_PROTECT
Definition: video.h:285
#define FALSE
Definition: types.h:117
unsigned char BOOLEAN
#define GDC2_EGC_FF_UNPROTECT
Definition: video.h:286
#define GDC2_MODE_PEGC_ENABLE
Definition: video.h:288
#define GDC2_MODE_PEGC_DISABLE
Definition: video.h:287
static BOOLEAN TestMmio(_In_ PHW_DEVICE_EXTENSION DeviceExtension)
Definition: hardware.c:38
static BOOLEAN GraphGetStatus(_In_ UCHAR Status)
Definition: hardware.c:26
VPAPI VOID NTAPI VideoPortWritePortUchar(IN PUCHAR Port, IN UCHAR Value)

◆ Pc98VidFindAdapter()

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 at line 57 of file pc98vid.c.

63 {
65  PHW_DEVICE_EXTENSION DeviceExtension = HwDeviceExtension;
66  ULONG inIoSpace = VIDEO_MEMORY_SPACE_MEMORY;
67  static WCHAR AdapterChipType[] = L"Onboard";
68  static WCHAR AdapterDacType[] = L"8 bit";
69  static WCHAR AdapterString[] = L"PEGC";
70 
71  PAGED_CODE();
72 
73  VideoDebugPrint((Trace, "%s()\n", __FUNCTION__));
74 
75  if (ConfigInfo->Length < sizeof(VIDEO_PORT_CONFIG_INFO))
77 
78  Status = VideoPortVerifyAccessRanges(DeviceExtension,
81  if (Status != NO_ERROR)
82  {
83  VideoDebugPrint((Error, "%s() Resource conflict was found\n", __FUNCTION__));
84 
86  }
87 
92 
93  Status = VideoPortMapMemory(DeviceExtension,
94  DeviceExtension->PegcControl,
95  &DeviceExtension->PegcControlLength,
96  &inIoSpace,
97  (PVOID)&DeviceExtension->PegcControlVa);
98  if (Status != NO_ERROR)
99  {
100  VideoDebugPrint((Error, "%s() Failed to map control memory\n", __FUNCTION__));
101 
102  VideoPortVerifyAccessRanges(DeviceExtension, 0, NULL);
103 
104  return ERROR_DEV_NOT_EXIST;
105  }
106 
107  if (!HasPegcController(DeviceExtension))
108  {
109  VideoDebugPrint((Error, "%s() Unsupported hardware\n", __FUNCTION__));
110 
111  VideoPortVerifyAccessRanges(DeviceExtension, 0, NULL);
112  VideoPortUnmapMemory(DeviceExtension,
113  (PVOID)DeviceExtension->PegcControlVa,
114  NULL);
115 
116  return ERROR_DEV_NOT_EXIST;
117  }
118 
119  /* Not VGA-compatible */
120  ConfigInfo->NumEmulatorAccessEntries = 0;
121  ConfigInfo->EmulatorAccessEntries = NULL;
122  ConfigInfo->EmulatorAccessEntriesContext = 0;
123  ConfigInfo->HardwareStateSize = 0;
124  ConfigInfo->VdmPhysicalVideoMemoryAddress.QuadPart = 0;
125  ConfigInfo->VdmPhysicalVideoMemoryLength = 0;
126 
127  VideoPortSetRegistryParameters(DeviceExtension,
128  L"HardwareInformation.ChipType",
129  AdapterChipType,
130  sizeof(AdapterChipType));
131  VideoPortSetRegistryParameters(DeviceExtension,
132  L"HardwareInformation.DacType",
133  AdapterDacType,
134  sizeof(AdapterDacType));
135  VideoPortSetRegistryParameters(DeviceExtension,
136  L"HardwareInformation.MemorySize",
137  &DeviceExtension->FrameBufferLength,
138  sizeof(ULONG));
139  VideoPortSetRegistryParameters(DeviceExtension,
140  L"HardwareInformation.AdapterString",
142  sizeof(AdapterString));
143 
144  return NO_ERROR;
145 }
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
static VIDEO_ACCESS_RANGE LegacyRangeList[]
Definition: pc98vid.c:28
#define NO_ERROR
Definition: dderror.h:5
ULONG_PTR PegcControlVa
Definition: pc98vid.h:46
PHYSICAL_ADDRESS PegcControl
Definition: pc98vid.h:44
smooth NULL
Definition: ftsmooth.c:416
static BOOLEAN HasPegcController(VOID)
Definition: bootvid.c:50
PHYSICAL_ADDRESS FrameBuffer
Definition: pc98vid.h:47
VPAPI VP_STATUS NTAPI VideoPortMapMemory(IN PVOID HwDeviceExtension, IN PHYSICAL_ADDRESS PhysicalAddress, IN OUT PULONG Length, IN PULONG InIoSpace, IN OUT PVOID *VirtualAddress)
__wchar_t WCHAR
Definition: xmlstorage.h:180
ULONG PegcControlLength
Definition: pc98vid.h:45
BOOL Error
Definition: chkdsk.c:66
Status
Definition: gdiplustypes.h:24
static const WCHAR L[]
Definition: oid.c:1250
#define FRAMEBUFFER_RANGE_INDEX
Definition: pc98vid.c:51
static WCHAR AdapterString[]
Definition: vmx_svga.c:17
#define Trace(x)
Definition: inflate.c:42
VPAPI VP_STATUS NTAPI VideoPortUnmapMemory(IN PVOID HwDeviceExtension, IN OUT PVOID VirtualAddress, IN HANDLE ProcessHandle)
#define VideoDebugPrint(x)
Definition: video.h:75
#define CONTROL_RANGE_INDEX
Definition: pc98vid.c:50
#define RTL_NUMBER_OF(x)
Definition: RtlRegistry.c:12
VPAPI VP_STATUS NTAPI VideoPortVerifyAccessRanges(IN PVOID HwDeviceExtension, IN ULONG NumAccessRanges, IN PVIDEO_ACCESS_RANGE AccessRanges)
Definition: resource.c:822
VPAPI VP_STATUS NTAPI VideoPortSetRegistryParameters(IN PVOID HwDeviceExtension, IN PWSTR ValueName, IN PVOID ValueData, IN ULONG ValueLength)
Definition: videoprt.c:925
unsigned int ULONG
Definition: retypes.h:1
LONG VP_STATUS
Definition: video.h:153
#define VIDEO_MEMORY_SPACE_MEMORY
Definition: video.h:132
#define __FUNCTION__
Definition: types.h:112
#define ERROR_DEV_NOT_EXIST
Definition: dderror.h:8
ULONG FrameBufferLength
Definition: pc98vid.h:48
ULONG RangeLength
Definition: video.h:216
PHYSICAL_ADDRESS RangeStart
Definition: video.h:215
#define PAGED_CODE()

Referenced by DriverEntry().

◆ Pc98VidGetChildState()

VP_STATUS FASTCALL Pc98VidGetChildState ( _In_ PHW_DEVICE_EXTENSION  DeviceExtension,
_In_ PULONG  ChildIndex,
_Out_ PULONG  ChildState,
_Out_ PSTATUS_BLOCK  StatusBlock 
)

Definition at line 190 of file ioctl.c.

195 {
196  PAGED_CODE();
197 
198  VideoDebugPrint((Trace, "%s() Child %d\n", __FUNCTION__, *ChildIndex));
199 
200  *ChildState = VIDEO_CHILD_ACTIVE;
201 
202  StatusBlock->Information = sizeof(ULONG);
203 
204  return NO_ERROR;
205 }
#define NO_ERROR
Definition: dderror.h:5
#define Trace(x)
Definition: inflate.c:42
#define VideoDebugPrint(x)
Definition: video.h:75
#define VIDEO_CHILD_ACTIVE
Definition: ntddvdeo.h:538
unsigned int ULONG
Definition: retypes.h:1
#define __FUNCTION__
Definition: types.h:112
#define PAGED_CODE()

Referenced by Pc98VidStartIO().

◆ Pc98VidGetPowerState()

VP_STATUS NTAPI Pc98VidGetPowerState ( _In_ PVOID  HwDeviceExtension,
_In_ ULONG  HwId,
_In_ PVIDEO_POWER_MANAGEMENT  VideoPowerControl 
)

Definition at line 296 of file hardware.c.

300 {
301  PAGED_CODE();
302 
303  VideoDebugPrint((Trace, "%s() Id %lX, State %x\n",
304  __FUNCTION__, HwId, VideoPowerControl->PowerState));
305 
306  if (HwId == MONITOR_HW_ID || HwId == DISPLAY_ADAPTER_HW_ID)
307  {
308  switch (VideoPowerControl->PowerState)
309  {
310  case VideoPowerOn:
311  case VideoPowerStandBy:
312  case VideoPowerSuspend:
313  case VideoPowerOff:
314  case VideoPowerShutdown:
315  return NO_ERROR;
316  }
317  }
318 
320 }
#define DISPLAY_ADAPTER_HW_ID
Definition: video.h:115
#define MONITOR_HW_ID
Definition: pc98vid.h:24
#define NO_ERROR
Definition: dderror.h:5
#define ERROR_DEVICE_REINITIALIZATION_NEEDED
Definition: dderror.h:16
#define Trace(x)
Definition: inflate.c:42
#define VideoDebugPrint(x)
Definition: video.h:75
#define __FUNCTION__
Definition: types.h:112
#define PAGED_CODE()

Referenced by DriverEntry().

◆ Pc98VidGetVideoChildDescriptor()

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 at line 166 of file pc98vid.c.

173 {
174  PHW_DEVICE_EXTENSION DeviceExtension = HwDeviceExtension;
175 
176  UNREFERENCED_PARAMETER(pChildDescriptor);
177 
178  PAGED_CODE();
179 
180  VideoDebugPrint((Trace, "%s() Index %d\n",
181  __FUNCTION__, ChildEnumInfo->ChildIndex));
182 
183  *pUnused = 0;
184 
185  if (ChildEnumInfo->ChildIndex > 0 &&
186  ChildEnumInfo->ChildIndex <= DeviceExtension->MonitorCount)
187  {
188  *VideoChildType = Monitor;
189  *UId = MONITOR_HW_ID;
190 
192  }
193 
194  return ERROR_NO_MORE_DEVICES;
195 }
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317
#define MONITOR_HW_ID
Definition: pc98vid.h:24
#define ERROR_NO_MORE_DEVICES
Definition: dderror.h:18
#define VIDEO_ENUM_MORE_DEVICES
Definition: video.h:139
#define Trace(x)
Definition: inflate.c:42
#define VideoDebugPrint(x)
Definition: video.h:75
Definition: video.h:270
#define __FUNCTION__
Definition: types.h:112
#define PAGED_CODE()

Referenced by DriverEntry().

◆ Pc98VidInitialize()

BOOLEAN NTAPI Pc98VidInitialize ( _In_ PVOID  HwDeviceExtension)

Definition at line 149 of file pc98vid.c.

151 {
152  PHW_DEVICE_EXTENSION DeviceExtension = HwDeviceExtension;
153 
154  PAGED_CODE();
155 
156  VideoDebugPrint((Trace, "%s()\n", __FUNCTION__));
157 
158  DeviceExtension->ModeCount = RTL_NUMBER_OF(VideoModes);
159  DeviceExtension->MonitorCount = 1;
160 
161  return TRUE;
162 }
#define TRUE
Definition: types.h:120
#define Trace(x)
Definition: inflate.c:42
const VIDEOMODE VideoModes[]
Definition: pc98vid.c:21
#define VideoDebugPrint(x)
Definition: video.h:75
#define RTL_NUMBER_OF(x)
Definition: RtlRegistry.c:12
#define __FUNCTION__
Definition: types.h:112
#define PAGED_CODE()

Referenced by DriverEntry().

◆ Pc98VidMapVideoMemory()

VP_STATUS FASTCALL Pc98VidMapVideoMemory ( _In_ PHW_DEVICE_EXTENSION  DeviceExtension,
_In_ PVIDEO_MEMORY  RequestedAddress,
_Out_ PVIDEO_MEMORY_INFORMATION  MapInformation,
_Out_ PSTATUS_BLOCK  StatusBlock 
)

Definition at line 125 of file ioctl.c.

130 {
132  ULONG inIoSpace = VIDEO_MEMORY_SPACE_MEMORY;
133 
134  PAGED_CODE();
135 
136  VideoDebugPrint((Trace, "%s()\n", __FUNCTION__));
137 
138  MapInformation->VideoRamBase = RequestedAddress->RequestedVirtualAddress;
139  MapInformation->VideoRamLength = DeviceExtension->FrameBufferLength;
140 
141  Status = VideoPortMapMemory(DeviceExtension,
142  DeviceExtension->FrameBuffer,
143  &MapInformation->VideoRamLength,
144  &inIoSpace,
145  &MapInformation->VideoRamBase);
146  if (Status != NO_ERROR)
147  {
148  VideoDebugPrint((Error, "%s() Failed to map framebuffer memory\n",
149  __FUNCTION__));
150  }
151  else
152  {
153  MapInformation->FrameBufferBase = MapInformation->VideoRamBase;
154  MapInformation->FrameBufferLength = MapInformation->VideoRamLength;
155 
156  StatusBlock->Information = sizeof(VIDEO_MEMORY_INFORMATION);
157  }
158 
159  return Status;
160 }
#define NO_ERROR
Definition: dderror.h:5
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
BOOL Error
Definition: chkdsk.c:66
Status
Definition: gdiplustypes.h:24
#define Trace(x)
Definition: inflate.c:42
#define VideoDebugPrint(x)
Definition: video.h:75
unsigned int ULONG
Definition: retypes.h:1
LONG VP_STATUS
Definition: video.h:153
#define VIDEO_MEMORY_SPACE_MEMORY
Definition: video.h:132
#define __FUNCTION__
Definition: types.h:112
#define PAGED_CODE()

Referenced by Pc98VidStartIO().

◆ Pc98VidQueryAvailModes()

VP_STATUS FASTCALL Pc98VidQueryAvailModes ( _In_ PHW_DEVICE_EXTENSION  DeviceExtension,
_Out_ PVIDEO_MODE_INFORMATION  ModeInformation,
_Out_ PSTATUS_BLOCK  StatusBlock 
)

Definition at line 61 of file ioctl.c.

65 {
66  UCHAR ModeNumber;
68 
69  PAGED_CODE();
70 
71  VideoDebugPrint((Trace, "%s()\n", __FUNCTION__));
72 
73  for (ModeNumber = 0, VideoMode = ModeInformation;
74  ModeNumber < DeviceExtension->ModeCount;
75  ++ModeNumber, ++VideoMode)
76  {
77  Pc98VidQueryMode(DeviceExtension, ModeNumber, VideoMode);
78  }
79 
80  StatusBlock->Information = sizeof(VIDEO_MODE_INFORMATION) * DeviceExtension->ModeCount;
81 
82  return NO_ERROR;
83 }
#define NO_ERROR
Definition: dderror.h:5
struct _VideoMode VideoMode
VOID FASTCALL Pc98VidQueryMode(_In_ PHW_DEVICE_EXTENSION DeviceExtension, _In_ ULONG ModeNumber, _Out_ PVIDEO_MODE_INFORMATION VideoMode)
Definition: ioctl.c:30
unsigned char UCHAR
Definition: xmlstorage.h:181
#define Trace(x)
Definition: inflate.c:42
#define VideoDebugPrint(x)
Definition: video.h:75
struct _VIDEO_MODE_INFORMATION VIDEO_MODE_INFORMATION
#define __FUNCTION__
Definition: types.h:112
#define PAGED_CODE()

Referenced by Pc98VidStartIO().

◆ Pc98VidQueryCurrentMode()

VP_STATUS FASTCALL Pc98VidQueryCurrentMode ( _In_ PHW_DEVICE_EXTENSION  DeviceExtension,
_Out_ PVIDEO_MODE_INFORMATION  VideoMode,
_Out_ PSTATUS_BLOCK  StatusBlock 
)

Definition at line 106 of file ioctl.c.

110 {
111  PAGED_CODE();
112 
113  VideoDebugPrint((Trace, "%s() Mode %d\n",
114  __FUNCTION__, DeviceExtension->CurrentMode));
115 
116  Pc98VidQueryMode(DeviceExtension, DeviceExtension->CurrentMode, VideoMode);
117 
118  StatusBlock->Information = sizeof(VIDEO_MODE_INFORMATION);
119 
120  return NO_ERROR;
121 }
#define NO_ERROR
Definition: dderror.h:5
VOID FASTCALL Pc98VidQueryMode(_In_ PHW_DEVICE_EXTENSION DeviceExtension, _In_ ULONG ModeNumber, _Out_ PVIDEO_MODE_INFORMATION VideoMode)
Definition: ioctl.c:30
#define Trace(x)
Definition: inflate.c:42
#define VideoDebugPrint(x)
Definition: video.h:75
struct _VIDEO_MODE_INFORMATION VIDEO_MODE_INFORMATION
#define __FUNCTION__
Definition: types.h:112
#define PAGED_CODE()

Referenced by Pc98VidStartIO().

◆ Pc98VidQueryMode()

VOID FASTCALL Pc98VidQueryMode ( _In_ PHW_DEVICE_EXTENSION  DeviceExtension,
_In_ ULONG  ModeNumber,
_Out_ PVIDEO_MODE_INFORMATION  VideoMode 
)

Definition at line 30 of file ioctl.c.

34 {
35  PAGED_CODE();
36 
37  VideoDebugPrint((Trace, "%s() Mode %d\n", __FUNCTION__, ModeNumber));
38 
39  VideoMode->Length = sizeof(VIDEO_MODE_INFORMATION);
40  VideoMode->ModeIndex = ModeNumber;
41  VideoMode->VisScreenWidth = VideoModes[ModeNumber].HResolution;
42  VideoMode->VisScreenHeight = VideoModes[ModeNumber].VResolution;
43  VideoMode->ScreenStride = VideoModes[ModeNumber].HResolution;
44  VideoMode->NumberOfPlanes = 1;
45  VideoMode->BitsPerPlane = 8;
46  VideoMode->Frequency = VideoModes[ModeNumber].RefreshRate;
47  VideoMode->XMillimeter = 320;
48  VideoMode->YMillimeter = 240;
49  VideoMode->NumberRedBits =
50  VideoMode->NumberGreenBits =
51  VideoMode->NumberBlueBits = 8;
52  VideoMode->RedMask =
53  VideoMode->GreenMask =
54  VideoMode->BlueMask = 0;
55  VideoMode->AttributeFlags = VIDEO_MODE_COLOR | VIDEO_MODE_GRAPHICS |
57 }
#define VIDEO_MODE_MANAGED_PALETTE
Definition: ntddvdeo.h:296
static CONST VGA_MODE VideoModes[BIOS_MAX_VIDEO_MODE+1]
Definition: vidbios.c:1941
#define VIDEO_MODE_PALETTE_DRIVEN
Definition: ntddvdeo.h:295
#define Trace(x)
Definition: inflate.c:42
#define VideoDebugPrint(x)
Definition: video.h:75
#define VIDEO_MODE_COLOR
Definition: ntddvdeo.h:293
struct _VIDEO_MODE_INFORMATION VIDEO_MODE_INFORMATION
#define __FUNCTION__
Definition: types.h:112
#define PAGED_CODE()
#define VIDEO_MODE_GRAPHICS
Definition: ntddvdeo.h:294

Referenced by Pc98VidQueryAvailModes(), and Pc98VidQueryCurrentMode().

◆ Pc98VidQueryNumAvailModes()

VP_STATUS FASTCALL Pc98VidQueryNumAvailModes ( _In_ PHW_DEVICE_EXTENSION  DeviceExtension,
_Out_ PVIDEO_NUM_MODES  Modes,
_Out_ PSTATUS_BLOCK  StatusBlock 
)

Definition at line 87 of file ioctl.c.

91 {
92  PAGED_CODE();
93 
94  VideoDebugPrint((Trace, "%s()\n", __FUNCTION__));
95 
96  Modes->NumModes = DeviceExtension->ModeCount;
97  Modes->ModeInformationLength = sizeof(VIDEO_MODE_INFORMATION);
98 
99  StatusBlock->Information = sizeof(VIDEO_NUM_MODES);
100 
101  return NO_ERROR;
102 }
struct _VIDEO_NUM_MODES VIDEO_NUM_MODES
static const VBE_MODE Modes[VBE_MODE_COUNT]
Definition: vbe.c:189
#define NO_ERROR
Definition: dderror.h:5
#define Trace(x)
Definition: inflate.c:42
#define VideoDebugPrint(x)
Definition: video.h:75
struct _VIDEO_MODE_INFORMATION VIDEO_MODE_INFORMATION
#define __FUNCTION__
Definition: types.h:112
#define PAGED_CODE()

Referenced by Pc98VidStartIO().

◆ Pc98VidResetDevice()

VP_STATUS FASTCALL Pc98VidResetDevice ( VOID  )

Definition at line 179 of file ioctl.c.

180 {
181  PAGED_CODE();
182 
183  VideoDebugPrint((Trace, "%s()\n", __FUNCTION__));
184 
185  return NO_ERROR;
186 }
#define NO_ERROR
Definition: dderror.h:5
#define Trace(x)
Definition: inflate.c:42
#define VideoDebugPrint(x)
Definition: video.h:75
#define __FUNCTION__
Definition: types.h:112
#define PAGED_CODE()

Referenced by Pc98VidStartIO().

◆ Pc98VidSetColorRegisters()

VP_STATUS FASTCALL Pc98VidSetColorRegisters ( _In_ PVIDEO_CLUT  ColorLookUpTable)

Definition at line 266 of file hardware.c.

268 {
269  USHORT Entry;
270 
271  PAGED_CODE();
272 
273  VideoDebugPrint((Trace, "%s()\n", __FUNCTION__));
274 
275  if (ColorLookUpTable->NumEntries > PEGC_MAX_COLORS)
277 
278  for (Entry = ColorLookUpTable->FirstEntry;
279  Entry < ColorLookUpTable->FirstEntry + ColorLookUpTable->NumEntries;
280  ++Entry)
281  {
284  ColorLookUpTable->LookupTable[Entry].RgbArray.Red);
286  ColorLookUpTable->LookupTable[Entry].RgbArray.Green);
288  ColorLookUpTable->LookupTable[Entry].RgbArray.Blue);
289  }
290 
291  return NO_ERROR;
292 }
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
#define GDC2_IO_o_RED
Definition: video.h:277
struct _Entry Entry
Definition: kefuncs.h:627
#define GDC2_IO_o_BLUE
Definition: video.h:278
unsigned char * PUCHAR
Definition: retypes.h:3
#define PEGC_MAX_COLORS
Definition: hardware.c:21
#define NO_ERROR
Definition: dderror.h:5
#define GDC2_IO_o_PALETTE_INDEX
Definition: video.h:275
#define GDC2_IO_o_GREEN
Definition: video.h:276
#define Trace(x)
Definition: inflate.c:42
#define VideoDebugPrint(x)
Definition: video.h:75
unsigned short USHORT
Definition: pedump.c:61
#define __FUNCTION__
Definition: types.h:112
VPAPI VOID NTAPI VideoPortWritePortUchar(IN PUCHAR Port, IN UCHAR Value)
base of all file and directory entries
Definition: entries.h:82
#define PAGED_CODE()

Referenced by Pc98VidStartIO().

◆ Pc98VidSetCurrentMode()

VP_STATUS FASTCALL Pc98VidSetCurrentMode ( _In_ PHW_DEVICE_EXTENSION  DeviceExtension,
_In_ PVIDEO_MODE  RequestedMode 
)

Definition at line 89 of file hardware.c.

92 {
93  SYNCPARAM SyncParameters;
94  CSRFORMPARAM CursorParameters;
96  PITCHPARAM PitchParameters;
97  PRAMPARAM RamParameters;
98  ZOOMPARAM ZoomParameters;
99  UCHAR RelayState;
100 
101  PAGED_CODE();
102 
103  VideoDebugPrint((Trace, "%s() Mode %d\n",
104  __FUNCTION__, RequestedMode->RequestedMode));
105 
106  if (RequestedMode->RequestedMode > DeviceExtension->ModeCount)
108 
109  /* Blank screen */
111 
112  /* RESET, without FIFO check */
115 
116  /* Configure chipset */
124  VideoModes[RequestedMode->RequestedMode].Clock1);
126  VideoModes[RequestedMode->RequestedMode].Clock2);
128  VideoModes[RequestedMode->RequestedMode].HorizontalScanRate);
131 
132  /* =========================== MASTER ============================ */
133 
134  /* MASTER */
136 
137  /* SYNC */
138  SyncParameters = VideoModes[RequestedMode->RequestedMode].TextSyncParameters;
142  WRITE_GDC_SYNC((PUCHAR)GDC1_IO_o_PARAM, &SyncParameters);
143 
144  /* CSRFORM */
145  CursorParameters.Show = FALSE;
146  CursorParameters.Blink = FALSE;
147  CursorParameters.BlinkRate = 12;
148  CursorParameters.LinesPerRow = 16;
149  CursorParameters.StartScanLine = 0;
150  CursorParameters.EndScanLine = 15;
152  WRITE_GDC_CSRFORM((PUCHAR)GDC1_IO_o_PARAM, &CursorParameters);
153 
154  /* PITCH */
155  PitchParameters.WordsPerScanline = 80;
157  WRITE_GDC_PITCH((PUCHAR)GDC1_IO_o_PARAM, &PitchParameters);
158 
159  /* PRAM */
160  RamParameters.StartingAddress = 0;
161  RamParameters.Length = 1023;
162  RamParameters.ImageBit = FALSE;
163  RamParameters.WideDisplay = FALSE;
165  WRITE_GDC_PRAM((PUCHAR)GDC1_IO_o_PARAM, &RamParameters);
166 
167  /* ZOOM */
168  ZoomParameters.DisplayZoomFactor = 0;
169  ZoomParameters.WritingZoomFactor = 0;
171  WRITE_GDC_ZOOM((PUCHAR)GDC1_IO_o_PARAM, &ZoomParameters);
172 
173  /* CSRW */
174  CursorPosition.CursorAddress = 0;
175  CursorPosition.DotAddress = 0;
178 
179  /* START */
181 
182  /* ============================ SLAVE ============================ */
183 
184  /* SLAVE */
186 
187  /* SYNC */
188  SyncParameters = VideoModes[RequestedMode->RequestedMode].VideoSyncParameters;
193  WRITE_GDC_SYNC((PUCHAR)GDC2_IO_o_PARAM, &SyncParameters);
194 
195  /* CSRFORM */
196  CursorParameters.Show = FALSE;
197  CursorParameters.Blink = FALSE;
198  CursorParameters.BlinkRate = 0;
199  CursorParameters.LinesPerRow = 1;
200  CursorParameters.StartScanLine = 0;
201  CursorParameters.EndScanLine = 0;
203  WRITE_GDC_CSRFORM((PUCHAR)GDC2_IO_o_PARAM, &CursorParameters);
204 
205  /* PITCH */
206  PitchParameters.WordsPerScanline = 80;
208  WRITE_GDC_PITCH((PUCHAR)GDC2_IO_o_PARAM, &PitchParameters);
209 
210  /* PRAM */
211  RamParameters.StartingAddress = 0;
212  RamParameters.Length = 1023;
213  RamParameters.ImageBit = TRUE;
214  RamParameters.WideDisplay = FALSE;
216  WRITE_GDC_PRAM((PUCHAR)GDC2_IO_o_PARAM, &RamParameters);
217 
218  /* ZOOM */
219  ZoomParameters.DisplayZoomFactor = 0;
220  ZoomParameters.WritingZoomFactor = 0;
222  WRITE_GDC_ZOOM((PUCHAR)GDC2_IO_o_PARAM, &ZoomParameters);
223 
224  /* CSRW */
225  CursorPosition.CursorAddress = 0;
226  CursorPosition.DotAddress = 0;
229 
230  /* Synchronize the master sync source */
231  TextSync();
232  TextSync();
233  TextSync();
234  TextSync();
235 
236  /* START */
238 
239  /* 256 colors, packed pixel */
243  VideoModes[RequestedMode->RequestedMode].Mem);
245  VideoPortWriteRegisterUshort((PUSHORT)(DeviceExtension->PegcControlVa +
247  VideoPortWriteRegisterUshort((PUSHORT)(DeviceExtension->PegcControlVa +
249 
250  /* Select the video source */
253  RelayState |= GRAPH_VID_SRC_INTERNAL | GRAPH_SRC_GDC;
255 
256  /* Unblank screen */
258 
259  DeviceExtension->CurrentMode = RequestedMode->RequestedMode;
260 
261  return NO_ERROR;
262 }
#define GRAPH_RELAY_0
Definition: video.h:365
#define GDC_COMMAND_CSRFORM
Definition: video.h:173
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
#define PEGC_FB_MAP
Definition: video.h:426
#define GDC2_MODE_LINES_400
Definition: video.h:301
#define GRAPH_MODE_DISPLAY_DISABLE
Definition: video.h:253
#define GRAPH_VID_SRC_INTERNAL
Definition: video.h:370
BOOLEAN ImageBit
Definition: video.h:207
USHORT Length
Definition: video.h:206
ULONG StartingAddress
Definition: video.h:205
UCHAR StartScanLine
Definition: video.h:180
#define TRUE
Definition: types.h:120
#define GDC1_IO_o_MODE_FLIPFLOP1
Definition: video.h:238
#define GDC_COMMAND_MASTER
Definition: video.h:200
unsigned char * PUCHAR
Definition: retypes.h:3
#define GRAPH_SRC_GDC
Definition: video.h:373
#define GRAPH_IO_i_RELAY
Definition: video.h:364
#define GDC2_IO_o_VIDEO_PAGE_ACCESS
Definition: video.h:274
#define GDC2_IO_o_VIDEO_PAGE
Definition: video.h:273
#define NO_ERROR
Definition: dderror.h:5
#define GDC_COMMAND_BCTRL_START
Definition: video.h:73
FORCEINLINE VOID WRITE_GDC1_COMMAND(UCHAR Command)
Definition: video.h:326
#define GDC2_IO_o_MODE_FLIPFLOP2
Definition: video.h:280
FORCEINLINE VOID WRITE_GDC_ZOOM(PUCHAR Port, PZOOMPARAM ZoomParameters)
Definition: video.h:133
#define GDC2_MODE_LCD
Definition: video.h:298
#define SYNC_DRAW_DURING_ACTIVE_DISPLAY_TIME_AND_RETRACE_BLANKING
Definition: video.h:87
BOOLEAN WideDisplay
Definition: video.h:208
VPAPI UCHAR NTAPI VideoPortReadPortUchar(IN PUCHAR Port)
#define GDC2_EGC_FF_PROTECT
Definition: video.h:285
static VOID TextSync(VOID)
Definition: hardware.c:59
#define FALSE
Definition: types.h:117
FORCEINLINE VOID WRITE_GDC_PITCH(PUCHAR Port, PPITCHPARAM PitchParameters)
Definition: video.h:146
UCHAR WritingZoomFactor
Definition: video.h:128
#define GDC_COMMAND_PITCH
Definition: video.h:138
FORCEINLINE VOID WRITE_GDC_CSRFORM(PUCHAR Port, PCSRFORMPARAM CursorParameters)
Definition: video.h:186
#define GDC2_MODE_GRCG
Definition: video.h:283
UCHAR DisplayZoomFactor
Definition: video.h:127
UCHAR EndScanLine
Definition: video.h:181
#define SYNC_DISPLAY_MODE_GRAPHICS_AND_CHARACTERS
Definition: video.h:79
static CONST VGA_MODE VideoModes[BIOS_MAX_VIDEO_MODE+1]
Definition: vidbios.c:1941
FORCEINLINE VOID WRITE_GDC2_COMMAND(UCHAR Command)
Definition: video.h:336
#define PEGC_MMIO_MODE
Definition: video.h:420
#define SYNC_DISPLAY_MODE_GRAPHICS
Definition: video.h:80
#define GDC_COMMAND_RESET1
Definition: video.h:68
unsigned char UCHAR
Definition: xmlstorage.h:181
#define GDC2_IO_o_COMMAND
Definition: video.h:272
#define GDC_COMMAND_SLAVE
Definition: video.h:199
VPAPI VOID NTAPI VideoPortWriteRegisterUshort(IN PUSHORT Register, IN USHORT Value)
#define GDC2_EGC_FF_UNPROTECT
Definition: video.h:286
#define GRAPH_MODE_COLORED
Definition: video.h:241
FORCEINLINE VOID WRITE_GDC_SYNC(PUCHAR Port, PSYNCPARAM SyncParameters)
Definition: video.h:105
#define PEGC_MMIO_FRAMEBUFFER
Definition: video.h:424
#define Trace(x)
Definition: inflate.c:42
#define GDC2_MODE_PEGC_ENABLE
Definition: video.h:288
#define SYNC_DRAW_ONLY_DURING_RETRACE_BLANKING
Definition: video.h:88
UCHAR Flags
Definition: video.h:78
#define GDC_COMMAND_SYNC_ON
Definition: video.h:75
#define GRAPH_IO_o_HORIZONTAL_SCAN_RATE
Definition: video.h:360
#define GDC_COMMAND_CSRW
Definition: video.h:151
#define SYNC_VIDEO_FRAMING_NONINTERLACED
Definition: video.h:83
BOOLEAN Show
Definition: video.h:176
FORCEINLINE VOID WRITE_GDC_CSRW(PUCHAR Port, PCSRWPARAM CursorParameters)
Definition: video.h:160
#define VideoDebugPrint(x)
Definition: video.h:75
ULONG WordsPerScanline
Definition: video.h:141
#define PEGC_MODE_PACKED
Definition: video.h:421
UCHAR BlinkRate
Definition: video.h:178
BOOLEAN Blink
Definition: video.h:177
#define GDC1_IO_o_PARAM
Definition: video.h:234
#define GRAPH_RELAY_1
Definition: video.h:366
FORCEINLINE VOID WRITE_GDC_PRAM(PUCHAR Port, PPRAMPARAM RamParameters)
Definition: video.h:213
#define GDC_COMMAND_PRAM
Definition: video.h:202
#define SYNC_STATIC_RAM_NO_REFRESH
Definition: video.h:90
#define GDC2_IO_o_PARAM
Definition: video.h:271
#define __FUNCTION__
Definition: types.h:112
VPAPI VOID NTAPI VideoPortWritePortUchar(IN PUCHAR Port, IN UCHAR Value)
static USHORT CursorPosition
Definition: pc98cons.c:20
#define GDC1_IO_o_COMMAND
Definition: video.h:235
unsigned short * PUSHORT
Definition: retypes.h:2
#define GDC_COMMAND_ZOOM
Definition: video.h:124
#define GRAPH_MODE_DISPLAY_ENABLE
Definition: video.h:254
#define GRAPH_IO_o_RELAY
Definition: video.h:368
#define PAGED_CODE()
UCHAR LinesPerRow
Definition: video.h:179
#define GDC2_MODE_ODD_RLINE_SHOW
Definition: video.h:247
#define GDC2_MODE_COLORS_16
Definition: video.h:282

Referenced by Pc98VidStartIO().

◆ Pc98VidSetPowerState()

VP_STATUS NTAPI Pc98VidSetPowerState ( _In_ PVOID  HwDeviceExtension,
_In_ ULONG  HwId,
_In_ PVIDEO_POWER_MANAGEMENT  VideoPowerControl 
)

Definition at line 324 of file hardware.c.

328 {
329  UCHAR Dpms;
330 
331  PAGED_CODE();
332 
333  VideoDebugPrint((Trace, "%s() Id %lX, State %x\n",
334  __FUNCTION__, HwId, VideoPowerControl->PowerState));
335 
336  if (HwId == MONITOR_HW_ID)
337  {
339 
340  switch (VideoPowerControl->PowerState)
341  {
342  case VideoPowerOn:
343  /* Turn on HS/VS signals */
346 
347  /* Unblank screen */
350  break;
351 
352  case VideoPowerStandBy:
353  /* Disable HS signal */
354  Dpms = (Dpms | GRAPH_DPMS_HSYNC_MASK) & ~GRAPH_DPMS_VSYNC_MASK;
356  break;
357 
358  case VideoPowerSuspend:
359  /* Disable VS signal */
360  Dpms = (Dpms | GRAPH_DPMS_VSYNC_MASK) & ~GRAPH_DPMS_HSYNC_MASK;
362  break;
363 
364  case VideoPowerOff:
365  case VideoPowerShutdown:
366  /* Turn off HS/VS signals */
369 
370  /* Blank screen */
373  break;
374  }
375  }
376 
377  return NO_ERROR;
378 }
#define GRAPH_MODE_DISPLAY_DISABLE
Definition: video.h:253
#define GRAPH_IO_o_DPMS
Definition: video.h:355
#define MONITOR_HW_ID
Definition: pc98vid.h:24
#define GDC1_IO_o_MODE_FLIPFLOP1
Definition: video.h:238
unsigned char * PUCHAR
Definition: retypes.h:3
#define GRAPH_DPMS_HSYNC_MASK
Definition: video.h:356
#define NO_ERROR
Definition: dderror.h:5
VPAPI UCHAR NTAPI VideoPortReadPortUchar(IN PUCHAR Port)
#define GRAPH_DPMS_VSYNC_MASK
Definition: video.h:357
unsigned char UCHAR
Definition: xmlstorage.h:181
#define GRAPH_IO_i_DPMS
Definition: video.h:354
#define Trace(x)
Definition: inflate.c:42
#define VideoDebugPrint(x)
Definition: video.h:75
#define __FUNCTION__
Definition: types.h:112
VPAPI VOID NTAPI VideoPortWritePortUchar(IN PUCHAR Port, IN UCHAR Value)
#define GRAPH_MODE_DISPLAY_ENABLE
Definition: video.h:254
#define PAGED_CODE()

Referenced by DriverEntry().

◆ Pc98VidStartIO()

BOOLEAN NTAPI Pc98VidStartIO ( _In_ PVOID  HwDeviceExtension,
_Inout_ PVIDEO_REQUEST_PACKET  RequestPacket 
)

Definition at line 209 of file ioctl.c.

212 {
214 
215  PAGED_CODE();
216 
217  VideoDebugPrint((Trace, "%s() IOCTL 0x%lX\n",
218  __FUNCTION__, RequestPacket->IoControlCode));
219 
220  switch (RequestPacket->IoControlCode)
221  {
223  {
224  if (RequestPacket->OutputBufferLength < sizeof(VIDEO_NUM_MODES))
225  {
227  break;
228  }
229 
231  (PVIDEO_NUM_MODES)RequestPacket->OutputBuffer,
232  RequestPacket->StatusBlock);
233  break;
234  }
235 
237  {
238  if (RequestPacket->OutputBufferLength < sizeof(VIDEO_MODE_INFORMATION) *
239  ((PHW_DEVICE_EXTENSION)HwDeviceExtension)->ModeCount)
240  {
242  break;
243  }
244 
246  (PVIDEO_MODE_INFORMATION)RequestPacket->OutputBuffer,
247  RequestPacket->StatusBlock);
248  break;
249  }
250 
252  {
253  if (RequestPacket->InputBufferLength < sizeof(VIDEO_MODE))
254  {
256  break;
257  }
258 
260  (PVIDEO_MODE)RequestPacket->InputBuffer);
261  break;
262  }
263 
265  {
266  if (RequestPacket->OutputBufferLength < sizeof(VIDEO_MODE_INFORMATION))
267  {
269  break;
270  }
271 
273  (PVIDEO_MODE_INFORMATION)RequestPacket->OutputBuffer,
274  RequestPacket->StatusBlock);
275  break;
276  }
277 
279  {
280  if (RequestPacket->InputBufferLength < sizeof(VIDEO_MEMORY) ||
281  RequestPacket->OutputBufferLength < sizeof(VIDEO_MEMORY_INFORMATION))
282  {
284  break;
285  }
286 
288  (PVIDEO_MEMORY)RequestPacket->InputBuffer,
289  (PVIDEO_MEMORY_INFORMATION)RequestPacket->OutputBuffer,
290  RequestPacket->StatusBlock);
291  break;
292  }
293 
295  {
296  if (RequestPacket->InputBufferLength < sizeof(VIDEO_MEMORY))
297  {
299  break;
300  }
301 
303  (PVIDEO_MEMORY)RequestPacket->InputBuffer);
304  break;
305  }
306 
308  {
310  break;
311  }
312 
314  {
315  if (RequestPacket->InputBufferLength < sizeof(VIDEO_CLUT))
316  {
318  break;
319  }
320 
321  Status = Pc98VidSetColorRegisters((PVIDEO_CLUT)RequestPacket->InputBuffer);
322  break;
323  }
324 
326  {
327  if (RequestPacket->InputBufferLength < sizeof(ULONG) ||
328  RequestPacket->OutputBufferLength < sizeof(ULONG))
329  {
331  break;
332  }
333 
334  Status = Pc98VidGetChildState((PHW_DEVICE_EXTENSION)HwDeviceExtension,
335  (PULONG)RequestPacket->InputBuffer,
336  (PULONG)RequestPacket->OutputBuffer,
337  RequestPacket->StatusBlock);
338  break;
339  }
340 
341  default:
343  }
344 
345  if (Status != NO_ERROR)
346  VideoDebugPrint((Trace, "%s() Failed 0x%lX\n", __FUNCTION__, Status));
347 
348  RequestPacket->StatusBlock->Status = Status;
349 
350  return TRUE;
351 }
VP_STATUS FASTCALL Pc98VidQueryNumAvailModes(_In_ PHW_DEVICE_EXTENSION DeviceExtension, _Out_ PVIDEO_NUM_MODES Modes, _Out_ PSTATUS_BLOCK StatusBlock)
Definition: ioctl.c:87
VP_STATUS FASTCALL Pc98VidQueryCurrentMode(_In_ PHW_DEVICE_EXTENSION DeviceExtension, _Out_ PVIDEO_MODE_INFORMATION VideoMode, _Out_ PSTATUS_BLOCK StatusBlock)
Definition: ioctl.c:106
VP_STATUS FASTCALL Pc98VidQueryAvailModes(_In_ PHW_DEVICE_EXTENSION DeviceExtension, _Out_ PVIDEO_MODE_INFORMATION ModeInformation, _Out_ PSTATUS_BLOCK StatusBlock)
Definition: ioctl.c:61
#define ERROR_INVALID_FUNCTION
Definition: dderror.h:6
VP_STATUS FASTCALL Pc98VidUnmapVideoMemory(_In_ PHW_DEVICE_EXTENSION DeviceExtension, _In_ PVIDEO_MEMORY VideoMemory)
Definition: ioctl.c:164
#define TRUE
Definition: types.h:120
VP_STATUS FASTCALL Pc98VidGetChildState(_In_ PHW_DEVICE_EXTENSION DeviceExtension, _In_ PULONG ChildIndex, _Out_ PULONG ChildState, _Out_ PSTATUS_BLOCK StatusBlock)
Definition: ioctl.c:190
#define IOCTL_VIDEO_RESET_DEVICE
Definition: ntddvdeo.h:137
#define IOCTL_VIDEO_MAP_VIDEO_MEMORY
Definition: ntddvdeo.h:104
#define NO_ERROR
Definition: dderror.h:5
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
VP_STATUS FASTCALL Pc98VidSetColorRegisters(_In_ PVIDEO_CLUT ColorLookUpTable)
Definition: hardware.c:266
#define IOCTL_VIDEO_QUERY_CURRENT_MODE
Definition: ntddvdeo.h:113
#define IOCTL_VIDEO_SET_CURRENT_MODE
Definition: ntddvdeo.h:152
VP_STATUS FASTCALL Pc98VidSetCurrentMode(_In_ PHW_DEVICE_EXTENSION DeviceExtension, _In_ PVIDEO_MODE RequestedMode)
Definition: hardware.c:89
#define IOCTL_VIDEO_UNMAP_VIDEO_MEMORY
Definition: ntddvdeo.h:179
Status
Definition: gdiplustypes.h:24
#define IOCTL_VIDEO_QUERY_NUM_AVAIL_MODES
Definition: ntddvdeo.h:122
#define Trace(x)
Definition: inflate.c:42
#define IOCTL_VIDEO_QUERY_AVAIL_MODES
Definition: ntddvdeo.h:107
#define VideoDebugPrint(x)
Definition: video.h:75
VP_STATUS FASTCALL Pc98VidResetDevice(VOID)
Definition: ioctl.c:179
unsigned int * PULONG
Definition: retypes.h:1
#define IOCTL_VIDEO_GET_CHILD_STATE
Definition: ntddvdeo.h:95
unsigned int ULONG
Definition: retypes.h:1
LONG VP_STATUS
Definition: video.h:153
#define __FUNCTION__
Definition: types.h:112
#define IOCTL_VIDEO_SET_COLOR_REGISTERS
Definition: ntddvdeo.h:149
#define PAGED_CODE()
#define ERROR_INSUFFICIENT_BUFFER
Definition: dderror.h:10

Referenced by DriverEntry().

◆ Pc98VidUnmapVideoMemory()

VP_STATUS FASTCALL Pc98VidUnmapVideoMemory ( _In_ PHW_DEVICE_EXTENSION  DeviceExtension,
_In_ PVIDEO_MEMORY  VideoMemory 
)

Definition at line 164 of file ioctl.c.

167 {
168  PAGED_CODE();
169 
170  VideoDebugPrint((Trace, "%s()\n", __FUNCTION__));
171 
172  return VideoPortUnmapMemory(DeviceExtension,
173  VideoMemory->RequestedVirtualAddress,
174  NULL);
175 }
smooth NULL
Definition: ftsmooth.c:416
#define Trace(x)
Definition: inflate.c:42
VPAPI VP_STATUS NTAPI VideoPortUnmapMemory(IN PVOID HwDeviceExtension, IN OUT PVOID VirtualAddress, IN HANDLE ProcessHandle)
#define VideoDebugPrint(x)
Definition: video.h:75
#define __FUNCTION__
Definition: types.h:112
#define PAGED_CODE()

Referenced by Pc98VidStartIO().

Variable Documentation

◆ VideoModes

const VIDEOMODE VideoModes[]

Definition at line 21 of file pc98vid.c.

Referenced by Pc98VidInitialize().