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 <section_attribs.h> 13 #include <dderror.h> 14 #include <devioctl.h> 15 #include <miniport.h> 16 #include <video.h> 17 #include <debug.h> 18 19 #undef WRITE_PORT_UCHAR 20 #undef READ_PORT_UCHAR 21 #define WRITE_PORT_UCHAR(p, d) VideoPortWritePortUchar(p, d) 22 #define READ_PORT_UCHAR(p) VideoPortReadPortUchar(p) 23 #include <drivers/pc98/video.h> 24 25 #define MONITOR_HW_ID 0x1033FACE /* Dummy */ 26 27 typedef struct _VIDEOMODE 28 { 29 USHORT HResolution; 30 USHORT VResolution; 31 UCHAR HorizontalScanRate; 32 UCHAR Clock1; 33 UCHAR Clock2; 34 UCHAR Mem; 35 UCHAR RefreshRate; 36 SYNCPARAM TextSyncParameters; 37 SYNCPARAM VideoSyncParameters; 38 } VIDEOMODE, *PVIDEOMODE; 39 40 typedef struct _HW_DEVICE_EXTENSION 41 { 42 UCHAR MonitorCount; 43 UCHAR ModeCount; 44 UCHAR CurrentMode; 45 PHYSICAL_ADDRESS PegcControl; 46 ULONG PegcControlLength; 47 ULONG_PTR PegcControlVa; 48 PHYSICAL_ADDRESS FrameBuffer; 49 ULONG FrameBufferLength; 50 } HW_DEVICE_EXTENSION, *PHW_DEVICE_EXTENSION; 51 52 BOOLEAN 53 NTAPI 54 HasPegcController( 55 _In_ PHW_DEVICE_EXTENSION DeviceExtension); 56 57 BOOLEAN 58 NTAPI 59 Pc98VidStartIO( 60 _In_ PVOID HwDeviceExtension, 61 _Inout_ PVIDEO_REQUEST_PACKET RequestPacket); 62 63 VP_STATUS 64 FASTCALL 65 Pc98VidSetCurrentMode( 66 _In_ PHW_DEVICE_EXTENSION DeviceExtension, 67 _In_ PVIDEO_MODE RequestedMode); 68 69 VP_STATUS 70 FASTCALL 71 Pc98VidSetColorRegisters( 72 _In_ PVIDEO_CLUT ColorLookUpTable); 73 74 VP_STATUS 75 NTAPI 76 Pc98VidGetPowerState( 77 _In_ PVOID HwDeviceExtension, 78 _In_ ULONG HwId, 79 _In_ PVIDEO_POWER_MANAGEMENT VideoPowerControl); 80 81 VP_STATUS 82 NTAPI 83 Pc98VidSetPowerState( 84 _In_ PVOID HwDeviceExtension, 85 _In_ ULONG HwId, 86 _In_ PVIDEO_POWER_MANAGEMENT VideoPowerControl); 87 88 extern const VIDEOMODE VideoModes[]; 89 90 #endif /* _PC98VID_PCH_ */ 91