ReactOS 0.4.15-dev-5666-gc548b97
xboxvmp.h File Reference
#include "ntdef.h"
#include "dderror.h"
#include "devioctl.h"
#include "miniport.h"
#include "ioaccess.h"
#include "video.h"
Include dependency graph for xboxvmp.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  XBOXVMP_DEVICE_EXTENSION
 

Macros

#define PAGE_SIZE   4096
 

Typedefs

typedef struct XBOXVMP_DEVICE_EXTENSIONPXBOXVMP_DEVICE_EXTENSION
 

Functions

VP_STATUS NTAPI XboxVmpFindAdapter (IN PVOID HwDeviceExtension, IN PVOID HwContext, IN PWSTR ArgumentString, IN OUT PVIDEO_PORT_CONFIG_INFO ConfigInfo, OUT PUCHAR Again)
 
BOOLEAN NTAPI XboxVmpInitialize (PVOID HwDeviceExtension)
 
BOOLEAN NTAPI XboxVmpStartIO (PVOID HwDeviceExtension, PVIDEO_REQUEST_PACKET RequestPacket)
 
BOOLEAN NTAPI XboxVmpResetHw (PVOID DeviceExtension, ULONG Columns, ULONG Rows)
 
VP_STATUS NTAPI XboxVmpGetPowerState (PVOID HwDeviceExtension, ULONG HwId, PVIDEO_POWER_MANAGEMENT VideoPowerControl)
 
VP_STATUS NTAPI XboxVmpSetPowerState (PVOID HwDeviceExtension, ULONG HwId, PVIDEO_POWER_MANAGEMENT VideoPowerControl)
 
BOOLEAN FASTCALL XboxVmpSetCurrentMode (PXBOXVMP_DEVICE_EXTENSION DeviceExtension, PVIDEO_MODE RequestedMode, PSTATUS_BLOCK StatusBlock)
 
BOOLEAN FASTCALL XboxVmpResetDevice (PXBOXVMP_DEVICE_EXTENSION DeviceExtension, PSTATUS_BLOCK StatusBlock)
 
BOOLEAN FASTCALL XboxVmpMapVideoMemory (PXBOXVMP_DEVICE_EXTENSION DeviceExtension, PVIDEO_MEMORY RequestedAddress, PVIDEO_MEMORY_INFORMATION MapInformation, PSTATUS_BLOCK StatusBlock)
 
BOOLEAN FASTCALL XboxVmpUnmapVideoMemory (PXBOXVMP_DEVICE_EXTENSION DeviceExtension, PVIDEO_MEMORY VideoMemory, PSTATUS_BLOCK StatusBlock)
 
BOOLEAN FASTCALL XboxVmpQueryNumAvailModes (PXBOXVMP_DEVICE_EXTENSION DeviceExtension, PVIDEO_NUM_MODES Modes, PSTATUS_BLOCK StatusBlock)
 
BOOLEAN FASTCALL XboxVmpQueryAvailModes (PXBOXVMP_DEVICE_EXTENSION DeviceExtension, PVIDEO_MODE_INFORMATION ReturnedModes, PSTATUS_BLOCK StatusBlock)
 
BOOLEAN FASTCALL XboxVmpQueryCurrentMode (PXBOXVMP_DEVICE_EXTENSION DeviceExtension, PVIDEO_MODE_INFORMATION VideoModeInfo, PSTATUS_BLOCK StatusBlock)
 
BOOLEAN FASTCALL XboxVmpSetColorRegisters (PXBOXVMP_DEVICE_EXTENSION DeviceExtension, PVIDEO_CLUT ColorLookUpTable, PSTATUS_BLOCK StatusBlock)
 

Macro Definition Documentation

◆ PAGE_SIZE

#define PAGE_SIZE   4096

Definition at line 19 of file xboxvmp.h.

Typedef Documentation

◆ PXBOXVMP_DEVICE_EXTENSION

Function Documentation

◆ XboxVmpFindAdapter()

VP_STATUS NTAPI XboxVmpFindAdapter ( IN PVOID  HwDeviceExtension,
IN PVOID  HwContext,
IN PWSTR  ArgumentString,
IN OUT PVIDEO_PORT_CONFIG_INFO  ConfigInfo,
OUT PUCHAR  Again 
)

Definition at line 56 of file xboxvmp.c.

62{
63 PXBOXVMP_DEVICE_EXTENSION XboxVmpDeviceExtension;
64 VIDEO_ACCESS_RANGE AccessRanges[3];
66 USHORT VendorId = 0x10DE; /* NVIDIA Corporation */
67 USHORT DeviceId = 0x02A0; /* NV2A XGPU */
68
69 TRACE_(IHVVIDEO, "XboxVmpFindAdapter\n");
70
71 XboxVmpDeviceExtension = (PXBOXVMP_DEVICE_EXTENSION)HwDeviceExtension;
72
73 Status = VideoPortGetAccessRanges(HwDeviceExtension, 0, NULL, 3, AccessRanges,
74 &VendorId, &DeviceId, NULL);
75
76 if (Status == NO_ERROR)
77 {
78 XboxVmpDeviceExtension->PhysControlStart = AccessRanges[0].RangeStart;
79 XboxVmpDeviceExtension->ControlLength = AccessRanges[0].RangeLength;
80 XboxVmpDeviceExtension->PhysFrameBufferStart = AccessRanges[1].RangeStart;
81 }
82
83 return Status;
84}
#define NO_ERROR
Definition: dderror.h:5
#define NULL
Definition: types.h:112
#define TRACE_(x)
Definition: compat.h:76
Status
Definition: gdiplustypes.h:25
unsigned short USHORT
Definition: pedump.c:61
LONG VP_STATUS
Definition: video.h:153
VPAPI VP_STATUS NTAPI VideoPortGetAccessRanges(IN PVOID HwDeviceExtension, IN ULONG NumRequestedResources, IN PIO_RESOURCE_DESCRIPTOR RequestedResources OPTIONAL, IN ULONG NumAccessRanges, OUT PVIDEO_ACCESS_RANGE AccessRanges, IN PVOID VendorId, IN PVOID DeviceId, OUT PULONG Slot)
PHYSICAL_ADDRESS PhysFrameBufferStart
Definition: xboxvmp.h:31
PHYSICAL_ADDRESS PhysControlStart
Definition: xboxvmp.h:28
ULONG RangeLength
Definition: video.h:216
PHYSICAL_ADDRESS RangeStart
Definition: video.h:215
struct XBOXVMP_DEVICE_EXTENSION * PXBOXVMP_DEVICE_EXTENSION

Referenced by DriverEntry().

◆ XboxVmpGetPowerState()

VP_STATUS NTAPI XboxVmpGetPowerState ( PVOID  HwDeviceExtension,
ULONG  HwId,
PVIDEO_POWER_MANAGEMENT  VideoPowerControl 
)

Definition at line 307 of file xboxvmp.c.

311{
312 ERR_(IHVVIDEO, "XboxVmpGetPowerState is not supported\n");
313
315}
#define ERROR_INVALID_FUNCTION
Definition: dderror.h:6
#define ERR_(ch,...)
Definition: debug.h:156

Referenced by DriverEntry().

◆ XboxVmpInitialize()

BOOLEAN NTAPI XboxVmpInitialize ( PVOID  HwDeviceExtension)

Definition at line 95 of file xboxvmp.c.

97{
98 PXBOXVMP_DEVICE_EXTENSION XboxVmpDeviceExtension;
101
102 TRACE_(IHVVIDEO, "XboxVmpInitialize\n");
103
104 XboxVmpDeviceExtension = (PXBOXVMP_DEVICE_EXTENSION)HwDeviceExtension;
105
106 Length = XboxVmpDeviceExtension->ControlLength;
107 XboxVmpDeviceExtension->VirtControlStart = NULL;
108
109 if (VideoPortMapMemory(HwDeviceExtension,
110 XboxVmpDeviceExtension->PhysControlStart,
111 &Length,
112 &inIoSpace,
113 &XboxVmpDeviceExtension->VirtControlStart) != NO_ERROR)
114 {
115 ERR_(IHVVIDEO, "Failed to map control memory\n");
116 return FALSE;
117 }
118
119 INFO_(IHVVIDEO, "Mapped 0x%x bytes of control mem at 0x%x to virt addr 0x%x\n",
120 XboxVmpDeviceExtension->ControlLength,
121 XboxVmpDeviceExtension->PhysControlStart.u.LowPart,
122 XboxVmpDeviceExtension->VirtControlStart);
123
124 return TRUE;
125}
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
unsigned int ULONG
Definition: retypes.h:1
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:102
VPAPI VP_STATUS NTAPI VideoPortMapMemory(IN PVOID HwDeviceExtension, IN PHYSICAL_ADDRESS PhysicalAddress, IN OUT PULONG Length, IN PULONG InIoSpace, IN OUT PVOID *VirtualAddress)
#define VIDEO_MEMORY_SPACE_MEMORY
Definition: video.h:132
#define INFO_(ch,...)
Definition: debug.h:159
struct _LARGE_INTEGER::@2275 u

Referenced by DriverEntry().

◆ XboxVmpMapVideoMemory()

BOOLEAN FASTCALL XboxVmpMapVideoMemory ( PXBOXVMP_DEVICE_EXTENSION  DeviceExtension,
PVIDEO_MEMORY  RequestedAddress,
PVIDEO_MEMORY_INFORMATION  MapInformation,
PSTATUS_BLOCK  StatusBlock 
)

Definition at line 386 of file xboxvmp.c.

391{
394
395 StatusBlock->Information = sizeof(VIDEO_MEMORY_INFORMATION);
396
397 /* Reuse framebuffer that was set up by firmware */
399 /* Framebuffer address offset value is coming from the GPU within
400 * memory mapped I/O address space, so we're comparing only low
401 * 28 bits of the address within actual RAM address space */
402 FrameBuffer.QuadPart &= 0x0FFFFFFF;
403 if (FrameBuffer.QuadPart != 0x3C00000 && FrameBuffer.QuadPart != 0x7C00000)
404 {
405 /* Check framebuffer address (high 4 MB of either 64 or 128 MB RAM) */
406 WARN_(IHVVIDEO, "Non-standard framebuffer address 0x%p\n", FrameBuffer.QuadPart);
407 }
408 /* Verify that framebuffer address is page-aligned */
409 ASSERT(FrameBuffer.QuadPart % PAGE_SIZE == 0);
410
411 /* Return the address back to GPU memory mapped I/O */
412 FrameBuffer.QuadPart += DeviceExtension->PhysFrameBufferStart.QuadPart;
413 MapInformation->VideoRamBase = RequestedAddress->RequestedVirtualAddress;
414 /* FIXME: obtain fb size from firmware somehow (Cromwell reserves high 4 MB of RAM) */
415 MapInformation->VideoRamLength = NV2A_VIDEO_MEMORY_SIZE;
416
418 DeviceExtension,
420 &MapInformation->VideoRamLength,
421 &inIoSpace,
422 &MapInformation->VideoRamBase);
423
424 MapInformation->FrameBufferBase = MapInformation->VideoRamBase;
425 MapInformation->FrameBufferLength = MapInformation->VideoRamLength;
426
427 /* Tell the nVidia controller about the framebuffer */
429
430 INFO_(IHVVIDEO, "Mapped 0x%x bytes of phys mem at 0x%lx to virt addr 0x%p\n",
431 MapInformation->VideoRamLength, FrameBuffer.u.LowPart, MapInformation->VideoRamBase);
432
433 return TRUE;
434}
#define WRITE_REGISTER_ULONG(r, v)
Definition: arm.h:21
#define READ_REGISTER_ULONG(r)
Definition: arm.h:20
#define PAGE_SIZE
Definition: env_spec_w32.h:49
PVOID FrameBuffer
Definition: xboxvideo.c:28
#define ASSERT(a)
Definition: mode.c:44
struct _VIDEO_MEMORY_INFORMATION VIDEO_MEMORY_INFORMATION
#define WARN_(ch,...)
Definition: debug.h:157
ULONG_PTR Information
Definition: video.h:326
PVOID RequestedVirtualAddress
Definition: ntddvdeo.h:275
uint32_t ULONG_PTR
Definition: typedefs.h:65
LONGLONG QuadPart
Definition: typedefs.h:114
#define NV2A_VIDEO_MEMORY_SIZE
Definition: xgpu.h:16
#define NV2A_CRTC_FRAMEBUFFER_START
Definition: xgpu.h:21

Referenced by XboxVmpStartIO().

◆ XboxVmpQueryAvailModes()

BOOLEAN FASTCALL XboxVmpQueryAvailModes ( PXBOXVMP_DEVICE_EXTENSION  DeviceExtension,
PVIDEO_MODE_INFORMATION  ReturnedModes,
PSTATUS_BLOCK  StatusBlock 
)

Definition at line 487 of file xboxvmp.c.

491{
492 return XboxVmpQueryCurrentMode(DeviceExtension, VideoMode, StatusBlock);
493}
BOOLEAN FASTCALL XboxVmpQueryCurrentMode(PXBOXVMP_DEVICE_EXTENSION DeviceExtension, PVIDEO_MODE_INFORMATION VideoMode, PSTATUS_BLOCK StatusBlock)
Definition: xboxvmp.c:534

Referenced by XboxVmpStartIO().

◆ XboxVmpQueryCurrentMode()

BOOLEAN FASTCALL XboxVmpQueryCurrentMode ( PXBOXVMP_DEVICE_EXTENSION  DeviceExtension,
PVIDEO_MODE_INFORMATION  VideoModeInfo,
PSTATUS_BLOCK  StatusBlock 
)

Definition at line 534 of file xboxvmp.c.

538{
540
541 VideoMode->Length = sizeof(VIDEO_MODE_INFORMATION);
542 VideoMode->ModeIndex = 0;
543
544 VideoMode->VisScreenWidth = READ_REGISTER_ULONG((ULONG_PTR)DeviceExtension->VirtControlStart + NV2A_RAMDAC_FP_HVALID_END) + 1;
545 VideoMode->VisScreenHeight = READ_REGISTER_ULONG((ULONG_PTR)DeviceExtension->VirtControlStart + NV2A_RAMDAC_FP_VVALID_END) + 1;
546
547 if (VideoMode->VisScreenWidth <= 1 || VideoMode->VisScreenHeight <= 1)
548 {
549 ERR_(IHVVIDEO, "Cannot obtain current screen resolution!\n");
550 return FALSE;
551 }
552
553 BytesPerPixel = NvGetBytesPerPixel(DeviceExtension, VideoMode->VisScreenWidth);
554 ASSERT(BytesPerPixel >= 1 && BytesPerPixel <= 4);
555
556 VideoMode->ScreenStride = VideoMode->VisScreenWidth * BytesPerPixel;
557 VideoMode->NumberOfPlanes = 1;
558 VideoMode->BitsPerPlane = BytesPerPixel * 8;
559 VideoMode->Frequency = 1;
560 VideoMode->XMillimeter = 0; /* FIXME */
561 VideoMode->YMillimeter = 0; /* FIXME */
562 if (BytesPerPixel >= 3)
563 {
564 VideoMode->NumberRedBits = 8;
565 VideoMode->NumberGreenBits = 8;
566 VideoMode->NumberBlueBits = 8;
567 VideoMode->RedMask = 0xFF0000;
568 VideoMode->GreenMask = 0x00FF00;
569 VideoMode->BlueMask = 0x0000FF;
570 }
571 else
572 {
573 /* FIXME: not implemented */
574 WARN_(IHVVIDEO, "BytesPerPixel %d - not implemented\n", BytesPerPixel);
575 }
576 VideoMode->VideoMemoryBitmapWidth = VideoMode->VisScreenWidth;
577 VideoMode->VideoMemoryBitmapHeight = VideoMode->VisScreenHeight;
580 VideoMode->DriverSpecificAttributeFlags = 0;
581
582 StatusBlock->Information = sizeof(VIDEO_MODE_INFORMATION);
583
584 /* Verify that screen fits framebuffer size */
585 if (VideoMode->VisScreenWidth * VideoMode->VisScreenHeight * (VideoMode->BitsPerPlane / 8) > NV2A_VIDEO_MEMORY_SIZE)
586 {
587 ERR_(IHVVIDEO, "Current screen resolution exceeds video memory bounds!\n");
588 return FALSE;
589 }
590
591 return TRUE;
592}
#define VIDEO_MODE_GRAPHICS
Definition: ntddvdeo.h:295
#define VIDEO_MODE_COLOR
Definition: ntddvdeo.h:294
#define VIDEO_MODE_NO_OFF_SCREEN
Definition: ntddvdeo.h:299
struct _VIDEO_MODE_INFORMATION VIDEO_MODE_INFORMATION
static ULONG BytesPerPixel
Definition: xboxvideo.c:32
UCHAR NvGetBytesPerPixel(PXBOXVMP_DEVICE_EXTENSION DeviceExtension, ULONG ScreenWidth)
Definition: xboxvmp.c:505
#define NV2A_RAMDAC_FP_VVALID_END
Definition: xgpu.h:26
#define NV2A_RAMDAC_FP_HVALID_END
Definition: xgpu.h:25
unsigned char UCHAR
Definition: xmlstorage.h:181

Referenced by XboxVmpQueryAvailModes(), and XboxVmpStartIO().

◆ XboxVmpQueryNumAvailModes()

BOOLEAN FASTCALL XboxVmpQueryNumAvailModes ( PXBOXVMP_DEVICE_EXTENSION  DeviceExtension,
PVIDEO_NUM_MODES  Modes,
PSTATUS_BLOCK  StatusBlock 
)

Definition at line 468 of file xboxvmp.c.

472{
473 Modes->NumModes = 1;
474 Modes->ModeInformationLength = sizeof(VIDEO_MODE_INFORMATION);
475 StatusBlock->Information = sizeof(VIDEO_NUM_MODES);
476 return TRUE;
477}
struct _VIDEO_NUM_MODES VIDEO_NUM_MODES
static const VBE_MODE Modes[VBE_MODE_COUNT]
Definition: vbe.c:189

Referenced by XboxVmpStartIO().

◆ XboxVmpResetDevice()

BOOLEAN FASTCALL XboxVmpResetDevice ( PXBOXVMP_DEVICE_EXTENSION  DeviceExtension,
PSTATUS_BLOCK  StatusBlock 
)

Definition at line 368 of file xboxvmp.c.

371{
372 /* There is nothing to be done here */
373
374 return TRUE;
375}

Referenced by XboxVmpResetHw(), and XboxVmpStartIO().

◆ XboxVmpResetHw()

BOOLEAN NTAPI XboxVmpResetHw ( PVOID  DeviceExtension,
ULONG  Columns,
ULONG  Rows 
)

Definition at line 284 of file xboxvmp.c.

288{
289 TRACE_(IHVVIDEO, "XboxVmpResetHw\n");
290
291 if (!XboxVmpResetDevice((PXBOXVMP_DEVICE_EXTENSION)DeviceExtension, NULL))
292 {
293 return FALSE;
294 }
295
296 return TRUE;
297}
BOOLEAN FASTCALL XboxVmpResetDevice(PXBOXVMP_DEVICE_EXTENSION DeviceExtension, PSTATUS_BLOCK StatusBlock)
Definition: xboxvmp.c:368

Referenced by DriverEntry().

◆ XboxVmpSetColorRegisters()

BOOLEAN FASTCALL XboxVmpSetColorRegisters ( PXBOXVMP_DEVICE_EXTENSION  DeviceExtension,
PVIDEO_CLUT  ColorLookUpTable,
PSTATUS_BLOCK  StatusBlock 
)

◆ XboxVmpSetCurrentMode()

BOOLEAN FASTCALL XboxVmpSetCurrentMode ( PXBOXVMP_DEVICE_EXTENSION  DeviceExtension,
PVIDEO_MODE  RequestedMode,
PSTATUS_BLOCK  StatusBlock 
)

Definition at line 343 of file xboxvmp.c.

347{
348 if (RequestedMode->RequestedMode != 0)
349 {
350 return FALSE;
351 }
352
353 /* Nothing to do, really. We only support a single mode and we're already
354 * in that mode
355 */
356 return TRUE;
357}
ULONG RequestedMode
Definition: ntddvdeo.h:290

Referenced by XboxVmpStartIO().

◆ XboxVmpSetPowerState()

VP_STATUS NTAPI XboxVmpSetPowerState ( PVOID  HwDeviceExtension,
ULONG  HwId,
PVIDEO_POWER_MANAGEMENT  VideoPowerControl 
)

Definition at line 325 of file xboxvmp.c.

329{
330 ERR_(IHVVIDEO, "XboxVmpSetPowerState not supported\n");
331
333}

Referenced by DriverEntry().

◆ XboxVmpStartIO()

BOOLEAN NTAPI XboxVmpStartIO ( PVOID  HwDeviceExtension,
PVIDEO_REQUEST_PACKET  RequestPacket 
)

Definition at line 135 of file xboxvmp.c.

138{
140
142
143 switch (RequestPacket->IoControlCode)
144 {
146 {
147 TRACE_(IHVVIDEO, "XboxVmpStartIO IOCTL_VIDEO_SET_CURRENT_MODE\n");
148
149 if (RequestPacket->InputBufferLength < sizeof(VIDEO_MODE))
150 {
152 return TRUE;
153 }
154
156 (PXBOXVMP_DEVICE_EXTENSION)HwDeviceExtension,
157 (PVIDEO_MODE)RequestPacket->InputBuffer,
158 RequestPacket->StatusBlock);
159 break;
160 }
161
163 {
164 TRACE_(IHVVIDEO, "XboxVmpStartIO IOCTL_VIDEO_RESET_DEVICE\n");
165
167 (PXBOXVMP_DEVICE_EXTENSION)HwDeviceExtension,
168 RequestPacket->StatusBlock);
169 break;
170 }
171
173 {
174 TRACE_(IHVVIDEO, "XboxVmpStartIO IOCTL_VIDEO_MAP_VIDEO_MEMORY\n");
175
176 if (RequestPacket->OutputBufferLength < sizeof(VIDEO_MEMORY_INFORMATION) ||
177 RequestPacket->InputBufferLength < sizeof(VIDEO_MEMORY))
178 {
180 return TRUE;
181 }
182
184 (PXBOXVMP_DEVICE_EXTENSION)HwDeviceExtension,
185 (PVIDEO_MEMORY)RequestPacket->InputBuffer,
187 RequestPacket->StatusBlock);
188 break;
189 }
190
192 {
193 TRACE_(IHVVIDEO, "XboxVmpStartIO IOCTL_VIDEO_UNMAP_VIDEO_MEMORY\n");
194
195 if (RequestPacket->InputBufferLength < sizeof(VIDEO_MEMORY))
196 {
198 return TRUE;
199 }
200
202 (PXBOXVMP_DEVICE_EXTENSION)HwDeviceExtension,
203 (PVIDEO_MEMORY)RequestPacket->InputBuffer,
204 RequestPacket->StatusBlock);
205 break;
206 }
207
209 {
210 TRACE_(IHVVIDEO, "XboxVmpStartIO IOCTL_VIDEO_QUERY_NUM_AVAIL_MODES\n");
211
212 if (RequestPacket->OutputBufferLength < sizeof(VIDEO_NUM_MODES))
213 {
215 return TRUE;
216 }
217
219 (PXBOXVMP_DEVICE_EXTENSION)HwDeviceExtension,
220 (PVIDEO_NUM_MODES)RequestPacket->OutputBuffer,
221 RequestPacket->StatusBlock);
222 break;
223 }
224
226 {
227 TRACE_(IHVVIDEO, "XboxVmpStartIO IOCTL_VIDEO_QUERY_AVAIL_MODES\n");
228
229 if (RequestPacket->OutputBufferLength < sizeof(VIDEO_MODE_INFORMATION))
230 {
232 return TRUE;
233 }
234
236 (PXBOXVMP_DEVICE_EXTENSION)HwDeviceExtension,
238 RequestPacket->StatusBlock);
239 break;
240 }
241
243 {
244 TRACE_(IHVVIDEO, "XboxVmpStartIO IOCTL_VIDEO_QUERY_CURRENT_MODE\n");
245
246 if (RequestPacket->OutputBufferLength < sizeof(VIDEO_MODE_INFORMATION))
247 {
249 return TRUE;
250 }
251
253 (PXBOXVMP_DEVICE_EXTENSION)HwDeviceExtension,
255 RequestPacket->StatusBlock);
256 break;
257 }
258
259 default:
260 {
261 WARN_(IHVVIDEO, "XboxVmpStartIO 0x%x not implemented\n", RequestPacket->IoControlCode);
262
263 RequestPacket->StatusBlock->Status = ERROR_INVALID_FUNCTION;
264 return FALSE;
265 }
266 }
267
268 if (Result)
269 {
270 RequestPacket->StatusBlock->Status = NO_ERROR;
271 }
272
273 return TRUE;
274}
unsigned char BOOLEAN
#define ERROR_INSUFFICIENT_BUFFER
Definition: dderror.h:10
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
#define IOCTL_VIDEO_MAP_VIDEO_MEMORY
Definition: ntddvdeo.h:104
#define IOCTL_VIDEO_UNMAP_VIDEO_MEMORY
Definition: ntddvdeo.h:179
#define IOCTL_VIDEO_QUERY_CURRENT_MODE
Definition: ntddvdeo.h:113
#define IOCTL_VIDEO_SET_CURRENT_MODE
Definition: ntddvdeo.h:152
#define IOCTL_VIDEO_RESET_DEVICE
Definition: ntddvdeo.h:137
#define IOCTL_VIDEO_QUERY_AVAIL_MODES
Definition: ntddvdeo.h:107
#define IOCTL_VIDEO_QUERY_NUM_AVAIL_MODES
Definition: ntddvdeo.h:122
VP_STATUS Status
Definition: video.h:323
ULONG InputBufferLength
Definition: video.h:333
PSTATUS_BLOCK StatusBlock
Definition: video.h:331
ULONG OutputBufferLength
Definition: video.h:335
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO
Definition: wsk.h:426
BOOLEAN FASTCALL XboxVmpQueryAvailModes(PXBOXVMP_DEVICE_EXTENSION DeviceExtension, PVIDEO_MODE_INFORMATION VideoMode, PSTATUS_BLOCK StatusBlock)
Definition: xboxvmp.c:487
BOOLEAN FASTCALL XboxVmpMapVideoMemory(PXBOXVMP_DEVICE_EXTENSION DeviceExtension, PVIDEO_MEMORY RequestedAddress, PVIDEO_MEMORY_INFORMATION MapInformation, PSTATUS_BLOCK StatusBlock)
Definition: xboxvmp.c:386
BOOLEAN FASTCALL XboxVmpUnmapVideoMemory(PXBOXVMP_DEVICE_EXTENSION DeviceExtension, PVIDEO_MEMORY VideoMemory, PSTATUS_BLOCK StatusBlock)
Definition: xboxvmp.c:445
BOOLEAN FASTCALL XboxVmpSetCurrentMode(PXBOXVMP_DEVICE_EXTENSION DeviceExtension, PVIDEO_MODE RequestedMode, PSTATUS_BLOCK StatusBlock)
Definition: xboxvmp.c:343
BOOLEAN FASTCALL XboxVmpQueryNumAvailModes(PXBOXVMP_DEVICE_EXTENSION DeviceExtension, PVIDEO_NUM_MODES Modes, PSTATUS_BLOCK StatusBlock)
Definition: xboxvmp.c:468

Referenced by DriverEntry().

◆ XboxVmpUnmapVideoMemory()

BOOLEAN FASTCALL XboxVmpUnmapVideoMemory ( PXBOXVMP_DEVICE_EXTENSION  DeviceExtension,
PVIDEO_MEMORY  VideoMemory,
PSTATUS_BLOCK  StatusBlock 
)

Definition at line 445 of file xboxvmp.c.

449{
451 DeviceExtension,
452 VideoMemory->RequestedVirtualAddress,
453 NULL);
454
455 return TRUE;
456}
VPAPI VP_STATUS NTAPI VideoPortUnmapMemory(IN PVOID HwDeviceExtension, IN OUT PVOID VirtualAddress, IN HANDLE ProcessHandle)

Referenced by XboxVmpStartIO().