mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 18:35:41 +00:00
[XBOXVMP] Add Xbox video miniport driver
Also make XboxVmp driver compatible with Video Port driver, specify vendor id and device id explicitly in VideoPortGetAccessRanges() call CORE-16317
This commit is contained in:
parent
a02b3da183
commit
8c36145087
5 changed files with 32 additions and 4 deletions
|
@ -282,11 +282,13 @@ vbe_1600x1200x8 = "VESA Display (1600x1200x8)",,VBE,1600,1200,8
|
||||||
vbe_1600x1200x16 = "VESA Display (1600x1200x16)",,VBE,1600,1200,16
|
vbe_1600x1200x16 = "VESA Display (1600x1200x16)",,VBE,1600,1200,16
|
||||||
vbe_1600x1200x24 = "VESA Display (1600x1200x24)",,VBE,1600,1200,24
|
vbe_1600x1200x24 = "VESA Display (1600x1200x24)",,VBE,1600,1200,24
|
||||||
vbe_1600x1200x32 = "VESA Display (1600x1200x32)",,VBE,1600,1200,32
|
vbe_1600x1200x32 = "VESA Display (1600x1200x32)",,VBE,1600,1200,32
|
||||||
|
xbox = "Original Xbox NV2A Framebuffer (640x480x32)",,XboxVmp,640,480,32
|
||||||
|
|
||||||
[Map.Display]
|
[Map.Display]
|
||||||
;<id> = <pnp id string>
|
;<id> = <pnp id string>
|
||||||
vga = "VGA Display"
|
vga = "VGA Display"
|
||||||
vbe = "VBE Display"
|
vbe = "VBE Display"
|
||||||
|
xboxvmp = "NV2A Framebuffer"
|
||||||
|
|
||||||
[Keyboard]
|
[Keyboard]
|
||||||
Default = "XT-, AT- or extended keyboard (83-105 keys)"
|
Default = "XT-, AT- or extended keyboard (83-105 keys)"
|
||||||
|
|
|
@ -40,6 +40,7 @@ CopyFiles = VGA.Miniport_CopyFiles.NT, VGA.Display_CopyFiles.NT
|
||||||
[VGA.Miniport_CopyFiles.NT]
|
[VGA.Miniport_CopyFiles.NT]
|
||||||
vgamp.sys
|
vgamp.sys
|
||||||
vbemp.sys
|
vbemp.sys
|
||||||
|
xboxvmp.sys
|
||||||
|
|
||||||
[VGA.Display_CopyFiles.NT]
|
[VGA.Display_CopyFiles.NT]
|
||||||
vgaddi.dll
|
vgaddi.dll
|
||||||
|
@ -49,6 +50,7 @@ framebuf.dll
|
||||||
AddService = , 0x00000002
|
AddService = , 0x00000002
|
||||||
;AddService = VGA, , VGA_Service_Inst
|
;AddService = VGA, , VGA_Service_Inst
|
||||||
;AddService = VBE, 0x00000003, VBE_Service_Inst ; SPSVCINST_TAGTOFRONT + SPSVCINST_ASSOCSERVICE
|
;AddService = VBE, 0x00000003, VBE_Service_Inst ; SPSVCINST_TAGTOFRONT + SPSVCINST_ASSOCSERVICE
|
||||||
|
;AddService = XboxVmp, 0x00000003, XBOX_Service_Inst
|
||||||
|
|
||||||
[VGA_Service_Inst]
|
[VGA_Service_Inst]
|
||||||
ServiceType = 1
|
ServiceType = 1
|
||||||
|
@ -64,6 +66,13 @@ ErrorControl = 0
|
||||||
ServiceBinary = %12%\vbemp.sys
|
ServiceBinary = %12%\vbemp.sys
|
||||||
LoadOrderGroup = Video Save
|
LoadOrderGroup = Video Save
|
||||||
|
|
||||||
|
[XBOX_Service_Inst]
|
||||||
|
ServiceType = 1
|
||||||
|
StartType = 1
|
||||||
|
ErrorControl = 0
|
||||||
|
ServiceBinary = %12%\xboxvmp.sys
|
||||||
|
LoadOrderGroup = Video Save
|
||||||
|
|
||||||
;-------------------------------- STRINGS -------------------------------
|
;-------------------------------- STRINGS -------------------------------
|
||||||
|
|
||||||
[Strings]
|
[Strings]
|
||||||
|
|
|
@ -2,3 +2,5 @@
|
||||||
add_library(xboxvmp MODULE xboxvmp.c xboxvmp.rc)
|
add_library(xboxvmp MODULE xboxvmp.c xboxvmp.rc)
|
||||||
set_module_type(xboxvmp kernelmodedriver)
|
set_module_type(xboxvmp kernelmodedriver)
|
||||||
add_importlibs(xboxvmp ntoskrnl videoprt)
|
add_importlibs(xboxvmp ntoskrnl videoprt)
|
||||||
|
add_cd_file(TARGET xboxvmp DESTINATION reactos/system32/drivers FOR all)
|
||||||
|
add_registry_inf(xboxvmp_reg.inf)
|
||||||
|
|
|
@ -71,19 +71,21 @@ XboxVmpFindAdapter(
|
||||||
PXBOXVMP_DEVICE_EXTENSION XboxVmpDeviceExtension;
|
PXBOXVMP_DEVICE_EXTENSION XboxVmpDeviceExtension;
|
||||||
VIDEO_ACCESS_RANGE AccessRanges[3];
|
VIDEO_ACCESS_RANGE AccessRanges[3];
|
||||||
VP_STATUS Status;
|
VP_STATUS Status;
|
||||||
|
USHORT VendorId = 0x10DE; /* NVIDIA Corporation */
|
||||||
|
USHORT DeviceId = 0x02A0; /* NV2A XGPU */
|
||||||
|
|
||||||
VideoPortDebugPrint(Trace, "XboxVmpFindAdapter\n");
|
VideoPortDebugPrint(Trace, "XboxVmpFindAdapter\n");
|
||||||
|
|
||||||
XboxVmpDeviceExtension = (PXBOXVMP_DEVICE_EXTENSION) HwDeviceExtension;
|
XboxVmpDeviceExtension = (PXBOXVMP_DEVICE_EXTENSION) HwDeviceExtension;
|
||||||
Status = VideoPortGetAccessRanges(HwDeviceExtension, 0, NULL, 3, AccessRanges,
|
Status = VideoPortGetAccessRanges(HwDeviceExtension, 0, NULL, 3, AccessRanges,
|
||||||
NULL, NULL, NULL);
|
&VendorId, &DeviceId, NULL);
|
||||||
|
|
||||||
if (NO_ERROR == Status)
|
if (Status == NO_ERROR)
|
||||||
{
|
{
|
||||||
XboxVmpDeviceExtension->PhysControlStart = AccessRanges[0].RangeStart;
|
XboxVmpDeviceExtension->PhysControlStart = AccessRanges[0].RangeStart;
|
||||||
XboxVmpDeviceExtension->ControlLength = AccessRanges[0].RangeLength;
|
XboxVmpDeviceExtension->ControlLength = AccessRanges[0].RangeLength;
|
||||||
XboxVmpDeviceExtension->PhysFrameBufferStart = AccessRanges[1].RangeStart;
|
XboxVmpDeviceExtension->PhysFrameBufferStart = AccessRanges[1].RangeStart;
|
||||||
}
|
}
|
||||||
|
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
13
win32ss/drivers/miniport/xboxvmp/xboxvmp_reg.inf
Normal file
13
win32ss/drivers/miniport/xboxvmp/xboxvmp_reg.inf
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
; Xbox Nvidia driver
|
||||||
|
[AddReg]
|
||||||
|
HKLM,"SYSTEM\CurrentControlSet\Services\XboxVmp","ErrorControl",0x00010001,0x00000000
|
||||||
|
HKLM,"SYSTEM\CurrentControlSet\Services\XboxVmp","Group",0x00000000,"Video Save"
|
||||||
|
HKLM,"SYSTEM\CurrentControlSet\Services\XboxVmp","ImagePath",0x00020000,"system32\drivers\xboxvmp.sys"
|
||||||
|
HKLM,"SYSTEM\CurrentControlSet\Services\XboxVmp","Start",0x00010001,0x00000004
|
||||||
|
HKLM,"SYSTEM\CurrentControlSet\Services\XboxVmp","Type",0x00010001,0x00000001
|
||||||
|
HKLM,"SYSTEM\CurrentControlSet\Enum\PCI\VEN_10DE&DEV_02A0&SUBSYS_00000000&REV_A1\0000","Service",0x00000000,"XboxVmp"
|
||||||
|
|
||||||
|
HKLM,"SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Services\XboxVmp\Device0","InstalledDisplayDrivers",0x00010000,"framebuf"
|
||||||
|
|
||||||
|
; This is not true but it allows to use 3rd party drivers while having the XboxVmp driver installed
|
||||||
|
HKLM,"SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Services\XboxVmp\Device0","VgaCompatible",0x00010001,1
|
Loading…
Add table
Add a link
Reference in a new issue