8afe0d645b42aac6fa6eebb8c8fba3b7047d653e
[reactos.git] / reactos / drivers / video / miniport / xboxvmp / xboxvmp.h
1 /*
2 * ReactOS Xbox miniport video driver
3 * Copyright (C) 2004 Gé van Geldorp
4 *
5 * Based on VBE miniport video driver
6 * Copyright (C) 2004 Filip Navara
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License along
19 * with this program; if not, write to the Free Software Foundation, Inc.,
20 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21 */
22
23 #pragma once
24
25 /* INCLUDES *******************************************************************/
26
27 #include "ntdef.h"
28 #define PAGE_SIZE 4096
29 #include "dderror.h"
30 #include "devioctl.h"
31 #include "miniport.h"
32 #include "video.h"
33
34 /* FIXME: NDK not compatible with miniport drivers */
35 #define SystemBasicInformation 0
36 typedef struct _SYSTEM_BASIC_INFORMATION
37 {
38 ULONG Reserved;
39 ULONG TimerResolution;
40 ULONG PageSize;
41 ULONG NumberOfPhysicalPages;
42 ULONG LowestPhysicalPageNumber;
43 ULONG HighestPhysicalPageNumber;
44 ULONG AllocationGranularity;
45 ULONG MinimumUserModeAddress;
46 ULONG MaximumUserModeAddress;
47 KAFFINITY ActiveProcessorsAffinityMask;
48 CCHAR NumberOfProcessors;
49 } SYSTEM_BASIC_INFORMATION, *PSYSTEM_BASIC_INFORMATION;
50
51 LONG
52 __stdcall
53 ZwQuerySystemInformation(
54 IN ULONG SystemInformationClass,
55 OUT PVOID SystemInformation,
56 IN ULONG Length,
57 OUT PULONG ResultLength
58 );
59
60 typedef struct
61 {
62 PHYSICAL_ADDRESS PhysControlStart;
63 ULONG ControlLength;
64 PVOID VirtControlStart;
65 PHYSICAL_ADDRESS PhysFrameBufferStart;
66 } XBOXVMP_DEVICE_EXTENSION, *PXBOXVMP_DEVICE_EXTENSION;
67
68 VP_STATUS NTAPI
69 XboxVmpFindAdapter(
70 IN PVOID HwDeviceExtension,
71 IN PVOID HwContext,
72 IN PWSTR ArgumentString,
73 IN OUT PVIDEO_PORT_CONFIG_INFO ConfigInfo,
74 OUT PUCHAR Again);
75
76 BOOLEAN NTAPI
77 XboxVmpInitialize(PVOID HwDeviceExtension);
78
79 BOOLEAN NTAPI
80 XboxVmpStartIO(
81 PVOID HwDeviceExtension,
82 PVIDEO_REQUEST_PACKET RequestPacket);
83
84 BOOLEAN NTAPI
85 XboxVmpResetHw(
86 PVOID DeviceExtension,
87 ULONG Columns,
88 ULONG Rows);
89
90 VP_STATUS NTAPI
91 XboxVmpGetPowerState(
92 PVOID HwDeviceExtension,
93 ULONG HwId,
94 PVIDEO_POWER_MANAGEMENT VideoPowerControl);
95
96 VP_STATUS NTAPI
97 XboxVmpSetPowerState(
98 PVOID HwDeviceExtension,
99 ULONG HwId,
100 PVIDEO_POWER_MANAGEMENT VideoPowerControl);
101
102 BOOLEAN FASTCALL
103 XboxVmpSetCurrentMode(
104 PXBOXVMP_DEVICE_EXTENSION DeviceExtension,
105 PVIDEO_MODE RequestedMode,
106 PSTATUS_BLOCK StatusBlock);
107
108 BOOLEAN FASTCALL
109 XboxVmpResetDevice(
110 PXBOXVMP_DEVICE_EXTENSION DeviceExtension,
111 PSTATUS_BLOCK StatusBlock);
112
113 BOOLEAN FASTCALL
114 XboxVmpMapVideoMemory(
115 PXBOXVMP_DEVICE_EXTENSION DeviceExtension,
116 PVIDEO_MEMORY RequestedAddress,
117 PVIDEO_MEMORY_INFORMATION MapInformation,
118 PSTATUS_BLOCK StatusBlock);
119
120 BOOLEAN FASTCALL
121 XboxVmpUnmapVideoMemory(
122 PXBOXVMP_DEVICE_EXTENSION DeviceExtension,
123 PVIDEO_MEMORY VideoMemory,
124 PSTATUS_BLOCK StatusBlock);
125
126 BOOLEAN FASTCALL
127 XboxVmpQueryNumAvailModes(
128 PXBOXVMP_DEVICE_EXTENSION DeviceExtension,
129 PVIDEO_NUM_MODES Modes,
130 PSTATUS_BLOCK StatusBlock);
131
132 BOOLEAN FASTCALL
133 XboxVmpQueryAvailModes(
134 PXBOXVMP_DEVICE_EXTENSION DeviceExtension,
135 PVIDEO_MODE_INFORMATION ReturnedModes,
136 PSTATUS_BLOCK StatusBlock);
137
138 BOOLEAN FASTCALL
139 XboxVmpQueryCurrentMode(
140 PXBOXVMP_DEVICE_EXTENSION DeviceExtension,
141 PVIDEO_MODE_INFORMATION VideoModeInfo,
142 PSTATUS_BLOCK StatusBlock);
143
144 BOOLEAN FASTCALL
145 XboxVmpSetColorRegisters(
146 PXBOXVMP_DEVICE_EXTENSION DeviceExtension,
147 PVIDEO_CLUT ColorLookUpTable,
148 PSTATUS_BLOCK StatusBlock);
149
150 /* EOF */