-
Notifications
You must be signed in to change notification settings - Fork 393
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VMware SVGA/SVGA II and VBoxVGA emulation #3405
Comments
VirtualBox VBoxVGA emulation may help achieve the same goals? Open source, 2D and 3D acceleration in guest, 3D pass-through for execution on the host (OpenGL and D3D8/9 via translation to OpenGL?) Besides the Guest Additions 2D/3D drivers for Win2K/XP/Vista, there is video miniport driver made by OS2museum for Win9x and WinNT+ Virtualbox 6.1.x drops support for 3D mode in Win2K/XP/Vista (although 6.1.0_RC1 driver maybe works in Vista), so it it would be good if DOSbox-X is made able of host-executed OpenGL/Direct3D. |
the difference between the VMware SVGA cards is that SVGA II has 3D acceleration, but only for XP and later. These do not provide acceleration for Windows 98 afaik. |
Per the link above - SVGA II is not for Win98, correct. It works with WinME (due to WDM?). But it's not written if 3D acceleration will ALSO work in WinME or only from WinXP onwards? |
Despite the links above, I don't remember any VMware version ever shipping a 3D acceleration driver for any Windows 9x/ME guest. If they ever shipped one, I have not found it. |
For 3D to be enabled in VMware for XP onwards it has to be running VMware Tools with the drivers. The VMware Tools do not have drivers for 3D accel on older Windows. |
Can the VMware XP driver be backported to WinME? Like KernelEx... Also, as Virtualbox sources are available - can VboxVGA (with 3D acceleration for XP) hardware emulation and driver be integrated into DOSbox-X? |
No, because the drivers for Me and XP are made completely different. KernelEx for 98/Me doesnt mean you can install such drivers there.
John to answer that... |
There is now a VirtualBox video driver for Windows 95/98/ME And here is the source code So in theory, if DOSBox-X implemented this, it would be a cool alternative. The author also seems to be working on Win3.x, 2.x and even 1.0 drivers. And he also has a WinNT 3.1-7.0 driver with source code https://www.os2museum.com/wp/nt-video-miniport-uhd/ |
It seems QEMU has equivalent functionality to the above: https://github.com/kjliew/qemu-3dfx/wiki/QEMU-3D-APIs-Pass-Through |
I might be able to implement VirtualBox VBoxVGA. A while back I wrote a simple framebuffer driver for the Linux kernel that was able to set up almost any mode desired in both Bochs and VirtualBox, though that code has apparently bitrotted because the Linux kernel has deprecated fbdev for DRM/KMS and the multi-monitor support I had working no longer works in VirtualBox. I know the base API somewhat, so I might be able to do something. Bochs VBE extensions are accessible through some fixed I/O ports. VBoxVGA last I checked implements the same but extends it with a PCI device for the VGA card and "OMAPI" extensions that become a sort of memory-mapped I/O with the virtual machine host. Meaning that you set up structures in memory and point the virtual machine host at them and the host interacts with them to do what you need it to do. I have some familiarity with the API in other words. Not sure what the other VBox display types use to interact and VirtualBox seems to prefer you no longer use VBoxVGA. The last I checked with VirtualBox Guest Additions, they only seemed to work with Windows XP and higher, and Windows 2000 if you applied all the service packs. Glad to hear someone made drivers for Windows 9x/ME! |
This is because they have replaced VBoxVGA with vmsvga (vmware's version). My guess is this was done because (a) the older approach they used for 3D acceleration (ChromiumGL) was more difficult to secure, and (b) because by using vmsvga they reuse (open source) VMware guest drivers where available, like on Linux. Under Windows, where there are no OSS VMware guest drivers, the default is now "VBoxSVGA" which is still vmsvga (rather than VBoxVGA) except with the PCI IDs changed, so that the VMware proprietary drivers won't load. VirtualBox ships its own open-source 3D vmsvga/VBoxSVGA drivers for every Windows version starting from Vista. XP is still only using VBoxVGA which means that VBoxVGA support will likely stay in VirtualBox for years to come (and without 3D). The os2museum's drivers are all based on VBoxVGA, not vmsvga. So you'll get arbitrary guest resolutions, but no acceleration (2D or 3D) whatsoever. Which means that depending on how much 2D acceleration support was implemented from the s3 cards, this may actually be slightly slower than the s3 driver... not noticeable for a VM, but maybe noticeable under emulation. That said, arbitrary guest resolution for 9x/3.x is very nice to have...
This also doesn't get anywhere closer to D3D acceleration. The probably easiest way to get to D3D acceleration on 9x is to "simply" forward OpenGL calls from the guest to the host and then to replace the 9x D3D libraries with WineD3D, even if this may lead to compatibility issues. This is what VirtualBox used to do before 6.1 (aka ChromiumGL), this is what https://github.com/kjliew/qemu-3dfx seems to be doing (alongside its patched qemu which does passthrough of OpenGL calls in a different way). In fact, what about 3Dfx cards? I'm not very familiar with these, but from what I can tell, DOSBox-X can already emulate a Voodoo. Can't you use the official Voodoo drivers to get some D3D support (seems that up to D3D 6.x at least) ?
To recap:
|
VirtualBox also has multi-monitor support - maybe part of the VGA+Hercules setup can be extended towards that? |
To be honest, I was interested in this topic (i.e. is there a virtual graphics card that would allow you to run drivers for old GeForce or Radeon cards), but there is nothing like that. I know that QEMU has a VirGL virtual graphics card, the concept of which is based on Mesa3D, but the drivers for it are only for Linux, there are no such drivers for Windows (writing a paravirtualized device for Windows is not that easy, after all, Windows is closed source like not looking) |
@MrPepka VirtualBox is (mostly) open source and supports host-accelerated 3D on Windows host. You can find many similar links in Virtualbox documentation and forums. From the changelogs and online help I gather:
Both QEMU and host-3D patched QEMU-3dfx work on Windows hosts. From what others wrote above - it seems all ingredients are present and open source... only a skilled cook is needed to combine them? |
Yes, you can. But DOSBox also suffers severe deficiencies in CPU/FPU emulation. Such won't matter for DOS games but they amplify when moving into Windows games. In fact, DOSBox HLE approach in emulation takes many shortcuts that make it very fast for DOS games with superb audio emulation. And in many occasions, *significantly better & faster* than "the other camp" "freaking fast" 3Dfx re-compiler for Windows games that can live with those deficiencies. It does not make a whole lot of sense for any features aiming at improving Windows games without addressing those deficiencies in CPU/FPU emulation.
And... make sure that skilled cook won't turn to the DARK side.🤣 |
I was referring to this part in the first post: |
You can forget about that. Any reasonably modern video card from either AMD or NVidia is not going to be backward compatible with a card meant for use with Win9x. A whole lot of research and software emulation would be required, as you would need to fully emulate the legacy video card. The only other option for something like this would require:
This, in theory, would allow you to get video from a legacy ATi, Matrox or NVidia video card. But it would first require someone to actually write PCI pass-through support for DOSBox-X. There have been a few requests over the years for USB pass-through, and that also has (so far) not been done. |
For NVIDIA cards, the Nouveau drivers could not help us? Maybe some of the features from NVIDIA cards could be emulated based on them? Or maybe there are some other modified drivers for NVIDIA GeForce and ATI Radeon cards that we could use to emulate drivers for these cards (or whole cards if possible)? |
For emulating NVidia cards specifically, yes, the Nouveau drivers could help to understand how drivers interact with a Riva TNT or TNT2 card. But I'm sure quite a bit more time and research would be needed using a real adapter. |
Two recent developments, closely related to the above: So, there are the following drivers
Would be great if DOSbox-X gets support for that. |
Here is an interesting VirtualBox Virtual Machine. Someone was able to get 3d acceleration in Windows 98 on VirtualBox with VMSVGA adapter. I do not know where he got that driver, but in system it is said as "VMWare SVGA-II PCI Adapter". You can download vm from links in the description. I checked that on VirtualBox 7.10 under Linux Mint 21, and it worked, DX7, DX8 and DX9. He created a base configuration for "unknown linux" with 3d accelerated VMSVGA adapter. https://www.youtube.com/watch?v=qEoIUiZ0pY8 Hope this information can be of any help. |
ReactOS: https://github.com/reactos/reactos/tree/master/win32ss/drivers/miniport/vmx_svga |
This ReactOS miniport driver seems to be for "VMWARE SVGA-II", so theoretically it can have 3D host acceleration? But I'm not sure that's implemented already inside it. |
This one has so-far not been released in source or binary form:
|
Another Virtio-vgpu driver, Win10: https://github.com/tenclass/mvisor-win-vgpu-driver |
@JHRobotics shares his thoughts at JHRobotics/softgpu#22 (comment) - SoftGPU current implementation relies on high CPU performance in the guest, so it may be too slow in emulators (vs hypervisors, #1089). Still worth to try. Also, another implementation can be written, which shifts the computation to the host and which guest driver uses minimal resources. He'll try to contribute some code (per my understanding, after DOSBox implementation begins to take shape), is here somebody who wants to work on that? |
I don’t understand why no one wants to develop a driver with 3D support in Windows XP for virtualbox and vmware? My childhood was in the 2000s. |
I have a theory that as long as any software/app is 9x compatible, even if it is created for Windows 2000/XP, it will work best in 9x. I think so, because 9x is built on the DOS kernel, which makes 9x software/apps essentially DOS programs. Windows 2000/XP is, as many of us know, built on the NT kernel. DOS is from 1981, and NT is from 1993, which makes NT newer, and NT, as many of us know, stands for New Technology. Granted, these programs run in Windows 2000/XP, as that's what they were designed for, but they also work in 9x, even pure DOS games are NT compatible, and the gaming experience there is far from perfect, as I recall. The point is, I think that general things that are compatible to the DOS kernel are 100% compatible there, because the DOS generation is older. |
VMware already did an XPDM 3D driver since version 6.5, although development were stalled since version 14. You can still get the driver, and best of all the Workstation version is now free for personal use. Although if your device supports PCIe passthrough, you can use a period-correct GPU (e.g. GeForce 7800 GTX, Radeon HD 6850, or even those old Voodoo cards) to play older games without issues caused by modern GPU drivers. |
Code of Conduct & Contributing Guidelines
Have you checked that no other similar feature request(s) already exists?
Is your feature request related to a problem? Please describe.
No response
What you want
Running up to mid-2000s 3D games under Win98/ME by utilizing the host GPU (#1146).
Describe alternatives you've considered
Multi-core software GPU emulation (#2435), 86box (supports multi-core), Wine, VirtualBox/VMware
Additional context
Resource-demanding games running under Win9x/ME:
The last GPUs having Win9x/ME drivers:
Is it feasible to emulate a Geforce/Radeon 'surface' (doing passthrough to host GPU) good enough for running their original drivers? Are there open-source implementations of the drivers that can be modified or some other patches/mods for Win9x that can help? If not - what else can go beyond the present SVGA/VBE/Voodoo?
The VMware GPU appears to have DX8 hardware acceleration under Win9x [1], may help for the mouse integration as well (#3384) and may be useful for Win3.x as well.
Ideally to be later extended to a virtual DirectX9.0c/OpenGL2.1 Win9x device (pass-through to host to GPU for execution) with the characteristics similar to Geforce 6/Radeon X850 (e.g. "DOSbox-X Guest additions" with multi-monitor, etc.) - maybe emulate (or lift code from, if open source) Virtualbox/VMware GPU pass-through device - and modify the driver from their Guest additions/Tools. Or leverage MESA or WINE/WINED3D - like VirtualBox is using parts of WINE for their GPU pass-through.
For the software emulation (whether single core or multi-core):
The text was updated successfully, but these errors were encountered: