QEMU 3Dfx Glide Pass-Through (WHPX/KVM works!!!)

Schedules and announcements about program releases.

Re: QEMU 3Dfx Glide Pass-Through (WHPX/KVM works!!!)

Postby kjliew » 2019-1-13 @ 23:31

robertmo wrote:geting this soon after starting (without boot image while qemu looks for boot disk)
or with a simple "dir" when booted to dos with no autoexec.bat
or lots of other cases at the exact same moment generally at the very beginning of different types of boot of windows
qemu-system-x86_64.exe: WHPX: Failed to emulate MMIO access with EmulatorReturnStatus: 2
qemu-system-x86_64.exe: WHPX: Failed to exec a virtual processor

I got the same error on my Intel Core-i3 laptop, too. Apparently, my AMD FX-8300 desktop is fine and works with DOS4GW games such as Tomb Raider 1, Redguard and Extreme Assault. I always have the feeling that AMD-V is more matured than Intel VT.

robertmo wrote:as for a previous problem I finally got glide working in qemu window using:
SDL support yes (1.2.15)
GTK support no
GTK GL support no

SDL2 should work, too. The culprit is GTK, but I thought GTK libraries are rarely installed on Windows. If you do have them installed on your MSYS2, then it is your problem. You should just configure QEMU with --disable-gtk or invoke QEMU with -display sdl to stay away from GTK code path.
kjliew
Member
 
Posts: 287
Joined: 2004-1-08 @ 03:03

Re: QEMU 3Dfx Glide Pass-Through (WHPX/KVM works!!!)

Postby robertmo » 2019-1-14 @ 10:37

sdl2 works too.

Environment = QEmu
fixes fullscreen mode
(it looks what it does is setting:
WindowedAttributes = borderless
for fullscreen mode, that fixes fullscreen too, but you are not able to drag the window ;) )

ScaleWidth,
is needed if you want to control window resolution cause dgvoodoo sets the same res for both window and fullscreen.
ScaleWidth is just rescaling final picture, so best to set width matching dgvoodoo resolution if you want to use window.

you also have to start in a window and switch to fullscreen with ctrl-alt-f
User avatar
robertmo
l33t
 
Posts: 4454
Joined: 2003-6-18 @ 10:35

Re: QEMU 3Dfx Glide Pass-Through (WHPX/KVM works!!!)

Postby kjliew » 2019-1-14 @ 23:58

robertmo wrote:Environment = QEmu
fixes fullscreen mode
(it looks what it does is setting:
WindowedAttributes = borderless
for fullscreen mode, that fixes fullscreen too, but you are not able to drag the window ;) )

Here's the historical discussion about the dgVoodoo2 Environment option for QEmu.
viewtopic.php?f=59&t=60762&start=20#p686445

Usually, I don't care much for fullscreen rendering. I personally consider playing games in windowed has more fun than in fullscreen. If it is working, then good for you. I think this is the side-effect of Direct3D-based wrappers being able to stretch the rendering context into client area on-the-fly. Both dgVoodoo2 and psVoodoo are capable of this, but not OpenGL-based wrappers such as OpenGlide.

I don't think ScaleWidth is required. When you switched QEMU into fullscreen (Ctrl-Alt-F) *after* Glide rendering started, the wrapper would simply stretch the rendering context to fit into the fullscreen client area. The wrappers only receive Glide resolution to render (usually this is 640x480 for games that don't support anything else) QEMU decides the client area for rendering context to fit within. Without ScaleWidth, QEMU will make the client area the same as Glide resolution, otherwise the client area will be scaled to the width from ScaleWidth. Apparently, this does not work if you switched QEMU into fullscreen *before* Glide rendering started. Direct3D-based wrappers stretching into fullscreen client area does not maintain aspect ratio, so unless you are still using 4:3 display (which most Glide games are 4:3 native), the image will be distorted on 16:9 display.

In summary, windowed mode rules :cool: !
kjliew
Member
 
Posts: 287
Joined: 2004-1-08 @ 03:03

Re: QEMU 3Dfx Glide Pass-Through (WHPX/KVM works!!!)

Postby robertmo » 2019-1-15 @ 04:14

all you say is true

but without ScaleWidth qemu window is always in it's native resolution (640x480) if the game doesn't allow resolution change. You can enlarge it by dragging borders with a mouse but that does not preserve aspect ratio.

So if you want to use a larger window with proper aspect ratio you have to use ScaleWidth,1024 for example. And set 1024x768 in dege's wrapper settings too.
User avatar
robertmo
l33t
 
Posts: 4454
Joined: 2003-6-18 @ 10:35

Re: QEMU 3Dfx Glide Pass-Through (WHPX/KVM works!!!)

Postby kjliew » 2019-1-15 @ 04:56

robertmo wrote:And set 1024x768 in dege's wrapper settings too.

I believe this is not required. I think dgVoodoo2 explicit fullscreen and enforced resolution do not work with "Environment = QEmu" option, but you got to check with Dege on his implementation. QEMU tends to crash and misbehave when wrappers tried to modify the display context. ScaleWidth alone from QEMU should be enough to run 640x480 Glide games in 1024x768 windowed. However, it would not maintain the resolution to prevent image distortion if you toggled QEMU into fullscreen mode.
kjliew
Member
 
Posts: 287
Joined: 2004-1-08 @ 03:03

Re: QEMU 3Dfx Glide Pass-Through (WHPX/KVM works!!!)

Postby robertmo » 2019-1-15 @ 05:46

>I believe this is not required. I think dgVoodoo2 explicit fullscreen and enforced resolution do not work with >"Environment = QEmu" option, but you got to check with Dege on his implementation.
I tested and it works. "Environment = QEmu" removes window border in fullscreen mode (and does some "big pixels" stretching if you don't specify resolution in dgvoodoo settings).

>QEMU tends to crash and misbehave when wrappers tried to modify the display context.
was ok for me with dgvoodoo, but wasn't testing much

>ScaleWidth alone from QEMU should be enough to run 640x480 Glide games in 1024x768 windowed.
1024x768 window will have "big pixels" effect. It is a setting for having lower resolution in a bigger window so this possibility is actually logical. dgvoodoo in fullscreen ignores scalewidth setting.
User avatar
robertmo
l33t
 
Posts: 4454
Joined: 2003-6-18 @ 10:35

Re: QEMU 3Dfx Glide Pass-Through (WHPX/KVM works!!!)

Postby kjliew » 2019-1-15 @ 06:09

Can you please share your dgvoodoo.conf?

I understand the "big pixel" stretching/effect but I thought that was inevitable if the game was only supporting 640x480, even if dgVoodoo2 was forced to rendered at higher resolution. Perhaps there is difference in technique used in stretching when dgVoodoo2 was rendering higher resolution versus that it was simply stretching the output. I am surprised that dgVoodoo2 would be able to change the display resolution without crashing QEMU while rendering within QEMU SDL display context.
kjliew
Member
 
Posts: 287
Joined: 2004-1-08 @ 03:03

Re: QEMU 3Dfx Glide Pass-Through (WHPX/KVM works!!!)

Postby kjliew » 2019-1-15 @ 06:21

Nevermind, I got it. Thanks for your tips. Yes, having dgVoodoo2 forced to the same resolution as ScaleWidth would produce better image than simply using ScaleWidth. This is interesting, I guess dgVoodoo2 must have better scaling algorithm than simply stretching the output to fit into client area. Perhaps, it would automatically employ the best anti-aliasing method supported by the driver during resolution scaling.
kjliew
Member
 
Posts: 287
Joined: 2004-1-08 @ 03:03

Re: QEMU 3Dfx Glide Pass-Through (WHPX/KVM works!!!)

Postby robertmo » 2019-1-15 @ 06:40

wrapper is a 3d card emulator that also uses virtualisation to speed up the emulation so it can do whatever you want.
Add/change many gfx effects. Even use new high resolution textures.
User avatar
robertmo
l33t
 
Posts: 4454
Joined: 2003-6-18 @ 10:35

Re: QEMU 3Dfx Glide Pass-Through (WHPX/KVM works!!!)

Postby kjliew » 2019-1-16 @ 08:10

Patch updated in 1st post. No change to guest wrappers.

Minor bug fixes for shared memory LFB mode.
kjliew
Member
 
Posts: 287
Joined: 2004-1-08 @ 03:03

Previous

Return to Release Announcements

Who is online

Users browsing this forum: No registered users and 3 guests