https://git.reactos.org/?p=reactos.git;a=commitdiff;h=61c77d1f87118b2758855…
commit 61c77d1f87118b27588554ff14ccb69a7910608b
Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
AuthorDate: Wed Jun 28 15:37:55 2023 +0200
Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
CommitDate: Wed Jun 28 17:21:58 2023 +0200
[XBOXVMP] Real OG XBOX NVidia GPU exposes 3 access ranges, so retrieve them.
CORE-19011
Fix a "bug" I introduced in commit 61012eb54.
VideoPortGetAccessRanges() expects the caller to specify at least the
total number of ranges the hardware exposes, otherwise it fails with
ERROR_MORE_DATA. (Tested also with the help of Windows' videoprt.sys.)
On real original XBOX there are three:
```
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation NV2A [XGPU] [10de:02a0]
(rev a1)
Subsystem: Unknown [0000:0000]
Flags: bus master, 66MHz, medium devsel, latency 0, IRQ 03
Memory at fd000000 (32-bit, non-prefetchable) [size=16M]
Memory at f0000000 (32-bit, prefetchable) [size=128M]
Memory at 00000000 (32-bit, prefetchable) [size=512K]
```
Thanks to Stanislav and Daniel for tests on the real XBOX.
---
win32ss/drivers/miniport/xboxvmp/xboxvmp.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/win32ss/drivers/miniport/xboxvmp/xboxvmp.c
b/win32ss/drivers/miniport/xboxvmp/xboxvmp.c
index 5cf76e08b12..0c9e1f67ee8 100644
--- a/win32ss/drivers/miniport/xboxvmp/xboxvmp.c
+++ b/win32ss/drivers/miniport/xboxvmp/xboxvmp.c
@@ -62,7 +62,8 @@ XboxVmpFindAdapter(
{
PXBOXVMP_DEVICE_EXTENSION XboxVmpDeviceExtension;
VP_STATUS Status;
- VIDEO_ACCESS_RANGE AccessRanges[2];
+ /* 3 access ranges: for MMIO, VRAM, and Indirect memory access IO ports */
+ VIDEO_ACCESS_RANGE AccessRanges[3];
USHORT VendorId = 0x10DE; /* NVIDIA Corporation */
USHORT DeviceId = 0x02A0; /* NV2A XGPU */
ULONG Slot = 0;