- Create another branch for networking fixes
[reactos.git] / 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 #ifndef XBOXVMP_H
24 #define XBOXVMP_H
25
26 /* INCLUDES *******************************************************************/
27
28 #ifdef _MSC_VER
29 #pragma message ("INVESTIGATE ME")
30 #endif
31
32 #if 0 //#ifdef _MSC_VER
33 #include "devioctl.h"
34 #define PAGE_SIZE 4096
35 #else
36 #include <ntddk.h>
37 #endif
38
39 #include "dderror.h"
40 #include "miniport.h"
41 #include "ntddvdeo.h"
42 #include "video.h"
43
44 /* FIXME: NDK not compatible with miniport drivers */
45 #define SystemBasicInformation 0
46 typedef struct _SYSTEM_BASIC_INFORMATION
47 {
48 ULONG Reserved;
49 ULONG TimerResolution;
50 ULONG PageSize;
51 ULONG NumberOfPhysicalPages;
52 ULONG LowestPhysicalPageNumber;
53 ULONG HighestPhysicalPageNumber;
54 ULONG AllocationGranularity;
55 ULONG MinimumUserModeAddress;
56 ULONG MaximumUserModeAddress;
57 KAFFINITY ActiveProcessorsAffinityMask;
58 CCHAR NumberOfProcessors;
59 } SYSTEM_BASIC_INFORMATION, *PSYSTEM_BASIC_INFORMATION;
60
61 LONG
62 __stdcall
63 ZwQuerySystemInformation(
64 IN ULONG SystemInformationClass,
65 OUT PVOID SystemInformation,
66 IN ULONG Length,
67 OUT PULONG ResultLength
68 );
69
70 typedef struct
71 {
72 PHYSICAL_ADDRESS PhysControlStart;
73 ULONG ControlLength;
74 PVOID VirtControlStart;
75 PHYSICAL_ADDRESS PhysFrameBufferStart;
76 } XBOXVMP_DEVICE_EXTENSION, *PXBOXVMP_DEVICE_EXTENSION;
77
78 VP_STATUS NTAPI
79 XboxVmpFindAdapter(
80 IN PVOID HwDeviceExtension,
81 IN PVOID HwContext,
82 IN PWSTR ArgumentString,
83 IN OUT PVIDEO_PORT_CONFIG_INFO ConfigInfo,
84 OUT PUCHAR Again);
85
86 BOOLEAN NTAPI
87 XboxVmpInitialize(PVOID HwDeviceExtension);
88
89 BOOLEAN NTAPI
90 XboxVmpStartIO(
91 PVOID HwDeviceExtension,
92 PVIDEO_REQUEST_PACKET RequestPacket);
93
94 BOOLEAN NTAPI
95 XboxVmpResetHw(
96 PVOID DeviceExtension,
97 ULONG Columns,
98 ULONG Rows);
99
100 VP_STATUS NTAPI
101 XboxVmpGetPowerState(
102 PVOID HwDeviceExtension,
103 ULONG HwId,
104 PVIDEO_POWER_MANAGEMENT VideoPowerControl);
105
106 VP_STATUS NTAPI
107 XboxVmpSetPowerState(
108 PVOID HwDeviceExtension,
109 ULONG HwId,
110 PVIDEO_POWER_MANAGEMENT VideoPowerControl);
111
112 BOOLEAN FASTCALL
113 XboxVmpSetCurrentMode(
114 PXBOXVMP_DEVICE_EXTENSION DeviceExtension,
115 PVIDEO_MODE RequestedMode,
116 PSTATUS_BLOCK StatusBlock);
117
118 BOOLEAN FASTCALL
119 XboxVmpResetDevice(
120 PXBOXVMP_DEVICE_EXTENSION DeviceExtension,
121 PSTATUS_BLOCK StatusBlock);
122
123 BOOLEAN FASTCALL
124 XboxVmpMapVideoMemory(
125 PXBOXVMP_DEVICE_EXTENSION DeviceExtension,
126 PVIDEO_MEMORY RequestedAddress,
127 PVIDEO_MEMORY_INFORMATION MapInformation,
128 PSTATUS_BLOCK StatusBlock);
129
130 BOOLEAN FASTCALL
131 XboxVmpUnmapVideoMemory(
132 PXBOXVMP_DEVICE_EXTENSION DeviceExtension,
133 PVIDEO_MEMORY VideoMemory,
134 PSTATUS_BLOCK StatusBlock);
135
136 BOOLEAN FASTCALL
137 XboxVmpQueryNumAvailModes(
138 PXBOXVMP_DEVICE_EXTENSION DeviceExtension,
139 PVIDEO_NUM_MODES Modes,
140 PSTATUS_BLOCK StatusBlock);
141
142 BOOLEAN FASTCALL
143 XboxVmpQueryAvailModes(
144 PXBOXVMP_DEVICE_EXTENSION DeviceExtension,
145 PVIDEO_MODE_INFORMATION ReturnedModes,
146 PSTATUS_BLOCK StatusBlock);
147
148 BOOLEAN FASTCALL
149 XboxVmpQueryCurrentMode(
150 PXBOXVMP_DEVICE_EXTENSION DeviceExtension,
151 PVIDEO_MODE_INFORMATION VideoModeInfo,
152 PSTATUS_BLOCK StatusBlock);
153
154 BOOLEAN FASTCALL
155 XboxVmpSetColorRegisters(
156 PXBOXVMP_DEVICE_EXTENSION DeviceExtension,
157 PVIDEO_CLUT ColorLookUpTable,
158 PSTATUS_BLOCK StatusBlock);
159
160 #endif /* XBOXVMP_H */
161
162 /* EOF */