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
35 /* FIXME: NDK not compatible with miniport drivers */
36 #define SystemBasicInformation 0
37 typedef struct _SYSTEM_BASIC_INFORMATION
40 ULONG TimerResolution
;
42 ULONG NumberOfPhysicalPages
;
43 ULONG LowestPhysicalPageNumber
;
44 ULONG HighestPhysicalPageNumber
;
45 ULONG AllocationGranularity
;
46 ULONG MinimumUserModeAddress
;
47 ULONG MaximumUserModeAddress
;
48 KAFFINITY ActiveProcessorsAffinityMask
;
49 CCHAR NumberOfProcessors
;
50 } SYSTEM_BASIC_INFORMATION
, *PSYSTEM_BASIC_INFORMATION
;
54 ZwQuerySystemInformation(
55 IN ULONG SystemInformationClass
,
56 OUT PVOID SystemInformation
,
58 OUT PULONG ResultLength
63 PHYSICAL_ADDRESS PhysControlStart
;
65 PVOID VirtControlStart
;
66 PHYSICAL_ADDRESS PhysFrameBufferStart
;
67 } XBOXVMP_DEVICE_EXTENSION
, *PXBOXVMP_DEVICE_EXTENSION
;
71 IN PVOID HwDeviceExtension
,
73 IN PWSTR ArgumentString
,
74 IN OUT PVIDEO_PORT_CONFIG_INFO ConfigInfo
,
78 XboxVmpInitialize(PVOID HwDeviceExtension
);
82 PVOID HwDeviceExtension
,
83 PVIDEO_REQUEST_PACKET RequestPacket
);
87 PVOID DeviceExtension
,
93 PVOID HwDeviceExtension
,
95 PVIDEO_POWER_MANAGEMENT VideoPowerControl
);
99 PVOID HwDeviceExtension
,
101 PVIDEO_POWER_MANAGEMENT VideoPowerControl
);
104 XboxVmpSetCurrentMode(
105 PXBOXVMP_DEVICE_EXTENSION DeviceExtension
,
106 PVIDEO_MODE RequestedMode
,
107 PSTATUS_BLOCK StatusBlock
);
111 PXBOXVMP_DEVICE_EXTENSION DeviceExtension
,
112 PSTATUS_BLOCK StatusBlock
);
115 XboxVmpMapVideoMemory(
116 PXBOXVMP_DEVICE_EXTENSION DeviceExtension
,
117 PVIDEO_MEMORY RequestedAddress
,
118 PVIDEO_MEMORY_INFORMATION MapInformation
,
119 PSTATUS_BLOCK StatusBlock
);
122 XboxVmpUnmapVideoMemory(
123 PXBOXVMP_DEVICE_EXTENSION DeviceExtension
,
124 PVIDEO_MEMORY VideoMemory
,
125 PSTATUS_BLOCK StatusBlock
);
128 XboxVmpQueryNumAvailModes(
129 PXBOXVMP_DEVICE_EXTENSION DeviceExtension
,
130 PVIDEO_NUM_MODES Modes
,
131 PSTATUS_BLOCK StatusBlock
);
134 XboxVmpQueryAvailModes(
135 PXBOXVMP_DEVICE_EXTENSION DeviceExtension
,
136 PVIDEO_MODE_INFORMATION ReturnedModes
,
137 PSTATUS_BLOCK StatusBlock
);
140 XboxVmpQueryCurrentMode(
141 PXBOXVMP_DEVICE_EXTENSION DeviceExtension
,
142 PVIDEO_MODE_INFORMATION VideoModeInfo
,
143 PSTATUS_BLOCK StatusBlock
);
146 XboxVmpSetColorRegisters(
147 PXBOXVMP_DEVICE_EXTENSION DeviceExtension
,
148 PVIDEO_CLUT ColorLookUpTable
,
149 PSTATUS_BLOCK StatusBlock
);