2 * ReactOS Xbox miniport video driver
3 * Copyright (C) 2004 Gé van Geldorp
5 * Based on VBE miniport video driver
6 * Copyright (C) 2004 Filip Navara
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.
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.
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.
25 /* INCLUDES *******************************************************************/
28 #define PAGE_SIZE 4096
34 /* FIXME: NDK not compatible with miniport drivers */
35 #define SystemBasicInformation 0
36 typedef struct _SYSTEM_BASIC_INFORMATION
39 ULONG TimerResolution
;
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
;
53 ZwQuerySystemInformation(
54 IN ULONG SystemInformationClass
,
55 OUT PVOID SystemInformation
,
57 OUT PULONG ResultLength
62 PHYSICAL_ADDRESS PhysControlStart
;
64 PVOID VirtControlStart
;
65 PHYSICAL_ADDRESS PhysFrameBufferStart
;
66 } XBOXVMP_DEVICE_EXTENSION
, *PXBOXVMP_DEVICE_EXTENSION
;
70 IN PVOID HwDeviceExtension
,
72 IN PWSTR ArgumentString
,
73 IN OUT PVIDEO_PORT_CONFIG_INFO ConfigInfo
,
77 XboxVmpInitialize(PVOID HwDeviceExtension
);
81 PVOID HwDeviceExtension
,
82 PVIDEO_REQUEST_PACKET RequestPacket
);
86 PVOID DeviceExtension
,
92 PVOID HwDeviceExtension
,
94 PVIDEO_POWER_MANAGEMENT VideoPowerControl
);
98 PVOID HwDeviceExtension
,
100 PVIDEO_POWER_MANAGEMENT VideoPowerControl
);
103 XboxVmpSetCurrentMode(
104 PXBOXVMP_DEVICE_EXTENSION DeviceExtension
,
105 PVIDEO_MODE RequestedMode
,
106 PSTATUS_BLOCK StatusBlock
);
110 PXBOXVMP_DEVICE_EXTENSION DeviceExtension
,
111 PSTATUS_BLOCK StatusBlock
);
114 XboxVmpMapVideoMemory(
115 PXBOXVMP_DEVICE_EXTENSION DeviceExtension
,
116 PVIDEO_MEMORY RequestedAddress
,
117 PVIDEO_MEMORY_INFORMATION MapInformation
,
118 PSTATUS_BLOCK StatusBlock
);
121 XboxVmpUnmapVideoMemory(
122 PXBOXVMP_DEVICE_EXTENSION DeviceExtension
,
123 PVIDEO_MEMORY VideoMemory
,
124 PSTATUS_BLOCK StatusBlock
);
127 XboxVmpQueryNumAvailModes(
128 PXBOXVMP_DEVICE_EXTENSION DeviceExtension
,
129 PVIDEO_NUM_MODES Modes
,
130 PSTATUS_BLOCK StatusBlock
);
133 XboxVmpQueryAvailModes(
134 PXBOXVMP_DEVICE_EXTENSION DeviceExtension
,
135 PVIDEO_MODE_INFORMATION ReturnedModes
,
136 PSTATUS_BLOCK StatusBlock
);
139 XboxVmpQueryCurrentMode(
140 PXBOXVMP_DEVICE_EXTENSION DeviceExtension
,
141 PVIDEO_MODE_INFORMATION VideoModeInfo
,
142 PSTATUS_BLOCK StatusBlock
);
145 XboxVmpSetColorRegisters(
146 PXBOXVMP_DEVICE_EXTENSION DeviceExtension
,
147 PVIDEO_CLUT ColorLookUpTable
,
148 PSTATUS_BLOCK StatusBlock
);