WIP versions

General information and assistance with dgVoodoo.

WIP versions

Postby Dege » 2017-1-14 @ 19:58

I'd like to have this thread for WIP (Work In Progress) version announcements and discussons.

To start right at once with a new one, I share a new one:

http://dege.fw.hu/temp/dgVoodooWIP28.zip

Don't expect too much, it's mainly for running 3DMark 2001 :D, but I also cite the readme:

-----------
dgVoodoo WIP only version

This version is really just a WIP, it's not even close to a release version.

Compared to 2.53, under the hood there are already tons of changes but there are
also some things/features I didn't even compile into this build because they are simply
not ready, half-baked and so unusable.

At user-level it's basically a 2.53 with some changes:

- I ditched the concept of dgVoodoo 'Setup' and renamed it to Control Panel.
After all, it's a control panel - like nVidia Control Panel or DirectX Cpl
in the DX SDK.

- Fixed some bugs I encountered - really just some, you may not even be aware of them.

- Added support for Q8W8V8U8 texture format
(3DMark 2001 SE, Nature, Pixel shader and Advanced Pixel shader test)

If I know it right, Geforce4 Ti 4800 doesn't support this format, nor
pixel shader version 1.4, so those tests won't run with that card type.

- Lower resource usage is partly included in this version
For the time being, only the usage of GPU accessible system memory.

- C64 output: well, if you are not a former C64 owner and fan, don't even try it,
I'm sure you won't like it at all. As dgVoodoo is my main hobby programming playground
these times I tried some algorhytms as part of it. It's not really a feature,
but the result of some former experimenting and can be funny for some scene demos.

- I may have broken things by changing code - testing is not easy because recently I changed
to a new machine so I have to reinstall most of my games.


-----------

I'd like to answer Daniel's question here:

daniel_u wrote:Hi Dege,
Nice to find out you are still commited to this project.

Will this refactoring bring smething new in terms of features or will help development in others areas?
Can this refactoring provide a more easy developement of features/bug fix for SC 1 & 2 games? :)

Looking forward to the new WIP/version.


Well, yes... I think, I reached the point where I can say that I've worked more on dgVoodoo2 than dgVoodo1.
It's a strange feeling... to think about that. :)

No, it's not about Splinter Cells. Earlier I realized that some games and things can only be fixed if some things
I thought wouldn't be needed is done after all, meaning that the implementation of DX dlls must be more compatible
with the MS ones, better co-operating between the dlls, and so on. I also want to decrease resource usage and open the
way to other new technologies that I will presumably need in real life work, so dgVoodoo is basically a good experimenting
ground for me. :D

I think I'm going to try to fix some bugs and problems reported in the gigathread because refactoring is taking too long and somewhat boring.
Dege
Oldbie
 
Posts: 954
Joined: 2003-9-04 @ 11:06

Re: WIP versions

Postby UCyborg » 2017-1-14 @ 21:46

It seems there is another issue with 3D Mark 2001 SE that is present in old 2.53 version as well. If I choose to run it on secondary monitor, it manages to run only once, so just the first test if you choose Benchmark, trying to run anything afterwards produces:

setFullscreen - creating the device failed : D3DERR_NOTAVAILABLE

This issue appears only if I make the monitor selection in 3D Mark and leave Full Screen Output in control panel at default. If I force the usage of secondary monitor through control panel, it works fine.

PS: How can I activate C64 output mode? I can't find anything in the control panel.
PS2: Nice work regarding resource usage optimizations, it's already apparent from process memory usage.
UCyborg
Member
 
Posts: 112
Joined: 2015-9-04 @ 11:10

Re: WIP versions

Postby Dege » 2017-1-15 @ 10:17

UCyborg wrote:It seems there is another issue with 3D Mark 2001 SE that is present in old 2.53 version as well. If I choose to run it on secondary monitor, it manages to run only once, so just the first test if you choose Benchmark, trying to run anything afterwards produces:

setFullscreen - creating the device failed : D3DERR_NOTAVAILABLE

This issue appears only if I make the monitor selection in 3D Mark and leave Full Screen Output in control panel at default. If I force the usage of secondary monitor through control panel, it works fine.


I forgot about that. But thanks, it's a really good catch.
Currently I have my secondary monitor attached to the Intel HD 530 and it didn't even work for me on that one, the demo window couldn't be set into fullscreen state. Anyway, I fixed it, device index was not initialized properly inside dgVoodoo DX8. :blush:

UCyborg wrote:PS: How can I activate C64 output mode? I can't find anything in the control panel.
PS2: Nice work regarding resource usage optimizations, it's already apparent from process memory usage.

It's available as a new scaling mode.
I'm working on more heavy optimizing of resource usage. My only fear is that it will affects the performance (causes lags here and there).
We'll see, if things get wrong, I'll switch it off.

BTW, yesterday I debugged 3DMark 99 and it suffers from DllMain plague too (probably all versions suffer from that...).
Could you patch it the same way as did with MP1/2 and 3DMark2001?
Dege
Oldbie
 
Posts: 954
Joined: 2003-9-04 @ 11:06

Re: WIP versions

Postby UCyborg » 2017-1-15 @ 22:12

Dege wrote:It's available as a new scaling mode.

Thanks! Didn't look there, was pretty sure there was supposed to be some extra checkbox somewhere.

Dege wrote:BTW, yesterday I debugged 3DMark 99 and it suffers from DllMain plague too (probably all versions suffer from that...).
Could you patch it the same way as did with MP1/2 and 3DMark2001?

Will definitely look into it. I see all versions up to 3D Mark 2001 SE use MAX-FX engine. Interestingly, they got it right with 3D Mark 2000, just the splash screen doesn't appear with dgVoodoo for some reason.

Those splash screens in old 3D Marks have strange effects on the desktop, you can see it eg. by pointing at any opened window element that would be otherwise highlighted, but it isn't. The effect is limited to the monitor on which the splash screen resides.

As for 3D Mark 99, first impressions, it needs FileVersionInfoLie shim from Compatibility Administrator (or just Windows 98 compatibility mode which applies tons of redundant fixes) because of some broken check for DirectX 6.1. And the best part of said check, it temporarily switches resolution to 640x480 during startup. How annoying!

Another thing worth mentioning regarding both 2000 and 1999 3D Marks, they don't run in real fullscreen mode under native Direct3D on Windows 8+ unless the fix described in post #66 here is applied. D3D8 games have the same issue, this maximized windowed mode is enforced for ALL games since Windows 10, Ultimate ASI Loader has a fix for that, specifically the piece of code starting here. Though some applications supposedly need to run in maximized windowed mode to work properly, according to this. Just search for "maximized".
UCyborg
Member
 
Posts: 112
Joined: 2015-9-04 @ 11:10

Re: WIP versions

Postby UCyborg » 2017-1-16 @ 03:54

3D Mark 99 Max patch done, updated the thread: viewtopic.php?f=8&t=51587

I also needed to apply HeapValidateFrees shim via Compatibility Administrator, otherwise it would crash in one of internal heap functions inside ntdll.dll right before the scores show up.

It seems that resolution switch at startup is related to splash screen.

Fast video memory access must be enabled, otherwise some tests are laggy and it also crashes at various points.

The About dialog isn't displayed correctly, must have something to do with mixing 3D stuff with regular window stuff I presume, the same problem occurs in 3D Mark 2000.
UCyborg
Member
 
Posts: 112
Joined: 2015-9-04 @ 11:10

Re: WIP versions

Postby JJXB » 2017-1-16 @ 15:38

WIP28 seemed to break Virtua Fighter 2 somehow but it didn't break Codename Outbreak and 007 Nightfire
And that VIC-II mode is interesting to say the least. i wouldn't use it for normal play but I can appreciate it
JJXB
Newbie
 
Posts: 40
Joined: 2015-11-23 @ 17:53

Re: WIP versions

Postby Dege » 2017-1-17 @ 09:06

UCyborg wrote:3D Mark 99 Max patch done, updated the thread: viewtopic.php?f=8&t=51587

I also needed to apply HeapValidateFrees shim via Compatibility Administrator, otherwise it would crash in one of internal heap functions inside ntdll.dll right before the scores show up.

It seems that resolution switch at startup is related to splash screen.

Fast video memory access must be enabled, otherwise some tests are laggy and it also crashes at various points.

The About dialog isn't displayed correctly, must have something to do with mixing 3D stuff with regular window stuff I presume, the same problem occurs in 3D Mark 2000.


Thanks!!
For some reason though it runs for me only in Win98 compat mode, dumping 'you need DX6 at least' message otherwise. (on Win10)
Indeed, some of the tests (like Fill rate) has poor performance (~25fps) because 3DMark uploads textures through DirectDrawSurface::GetDC/ReleaseDC at each frame (but I guess that's the point of the test :) ).
Those are not fast calls through dgVoodoo.

JJXB wrote:WIP28 seemed to break Virtua Fighter 2 somehow but it didn't break Codename Outbreak and 007 Nightfire
And that VIC-II mode is interesting to say the least. i wouldn't use it for normal play but I can appreciate it

VF2 needs 8 or 16 bit dektop compat mode. Doesn't WIP28 run with that as for VF2?
The only issue I encountered was blank options screen (Alt-M alias ScreenMode menuitem) when the resolutions was forced.
Because

Myloch wrote:More technicolor problems (weird palette swappings) during fade in - fade out and low performance problems with old directdraw game Kujira Monogatari when using force resolution

Paletted things and forced resolution currently has some issues through dgVoodoo.
Dege
Oldbie
 
Posts: 954
Joined: 2003-9-04 @ 11:06

Re: WIP versions

Postby JJXB » 2017-1-17 @ 15:50

Dege wrote:
JJXB wrote:WIP28 seemed to break Virtua Fighter 2 somehow but it didn't break Codename Outbreak and 007 Nightfire
And that VIC-II mode is interesting to say the least. i wouldn't use it for normal play but I can appreciate it

VF2 needs 8 or 16 bit dektop compat mode. Doesn't WIP28 run with that as for VF2?
The only issue I encountered was blank options screen (Alt-M alias ScreenMode menuitem) when the resolutions was forced.

Just recorded a video on the behaviour VF2 keeps on exhibiting (seems to do it with 2.53 now as well for some strange reason but it only started exhibiting when i changed it over to WIP28 and even then back to 2.53).
Video
this was off a fresh VF2 install (without a second monitor in) and shows various combos of with and without:
16bit color compat
xp sp2 compat
dgv passthrough
window options in the DX tab

i did have trouble with dual monitors before on 2.53 but unhooking the external monitor fixed that previously.
only posting it in here because this current issue started with WIP28
JJXB
Newbie
 
Posts: 40
Joined: 2015-11-23 @ 17:53

Re: WIP versions

Postby UCyborg » 2017-1-17 @ 21:25

Dege wrote:Thanks!!
For some reason though it runs for me only in Win98 compat mode, dumping 'you need DX6 at least' message otherwise. (on Win10)
Indeed, some of the tests (like Fill rate) has poor performance (~25fps) because 3DMark uploads textures through DirectDrawSurface::GetDC/ReleaseDC at each frame (but I guess that's the point of the test :) ).
Those are not fast calls through dgVoodoo.

You can google for Windows 10 ADK, select only Compatibility Administrator in installer unless you actually need something else, then you can use that program to apply only required fixes. Mine looks like this:

CompatAdmin3DMark.png

FileVersionInfoLie is the one that gets rid of the error you mentioned. You don't need DXPrimaryEmulation for dgVoodoo though, it's just there so it can run in real fullscreen via native Direct3D. Here's a quick tutorial, it's written specifically for applying DXPrimaryEmulation fix correctly to get real fullscreen, but it should be pretty self explanatory from it how the program works, especially since you don't need to specify any parameters for other fixes. -DisableMaxWindowedMode is actually an undocumented parameter.

It's generally better to use this program instead of compatibility modes since it gives more control, not all fixes can be applied via compatibility modes plus you avoid forcing the program/game to use the fixes it doesn't need. It also runs faster this way than with full-blown Win98 compatibility mode.
UCyborg
Member
 
Posts: 112
Joined: 2015-9-04 @ 11:10

Re: WIP versions

Postby UCyborg » 2017-1-23 @ 23:47

If you let dgVoodoo control fullscreen/windowed state, the game is switched back to windowed mode whenever it loses focus. Is this intentional or a bug?
UCyborg
Member
 
Posts: 112
Joined: 2015-9-04 @ 11:10

Re: WIP versions

Postby Dege » 2017-1-24 @ 20:53

It's comes from the behavior of DGXI. If it detects any other window over the rendering one then it forces switching that back to windowed mode.

When fullscreen/windowed state is up to the app then dgVoodoo minimizes/maximizes the window on purpose when losing/gainig focus, to emulate the standard DX<=9 behavior.
Nothing is done otherwise, what happens is up to DXGI. If you have 2 monitors and changes to an app that is not on the monitor on which the fullscreened app is running then it won't be pushed back to windowed mode.
Dege
Oldbie
 
Posts: 954
Joined: 2003-9-04 @ 11:06

Re: WIP versions

Postby UCyborg » 2017-1-24 @ 22:27

I always thought DX11 programs behave oddly when trying to switch away. Thanks for clarifying that. With OpenGL, it's still the norm to minimize the window whenever it loses focus. It's up to the programmer though unless you use eg. SDL2 library which does it automatically by default unless disabled by environment variable.

So when Disable Alt-Enter to toggle screen state is unchecked and the other one is checked, you don't do anything in response to lost focus event, but DXGI decides to switch window to windowed mode? What would happen if you minimized it? Would switching back to it afterwards restore it in fullscreen state? Because that's how it works when both checkboxes under DirectX->Behavior are checked and I was wondering if it could work the same way if you just want to have an extra alt+enter shortcut in the game that doesn't handle it.
UCyborg
Member
 
Posts: 112
Joined: 2015-9-04 @ 11:10

Re: WIP versions

Postby Dege » 2017-1-29 @ 14:31

I still had little time and still couldn't do all things I wanted but some new fixes are cumulated so I share it:

http://dege.fw.hu/temp/dgVoodooWIP29.zip

- Unexpected way of texture compression is implemented (DX7, Soulbringer)

- Bugs fixed, like one in DX8 device handling, unexpected forced windowed mode (Soulbringer movies),
vertex shader (missing fog in CM Rally)

- Bugs caused by pending refactoring process in handling shadow textures are fixed
(AMD driver crashed for me with forced multisampling in Splinter Cell 1)

Also, handling depth buffers had some bugs at FL 10.0 (even in 2.53), I made it up and
cleared what limitations it has:

* Buffers with forced MSAA can only be rendering targets; they cannot be used as
** depth textures
** source of copy operations (Blt in DDraw)
** locked for CPU-access (Lock in DDraw/ LockRect in D3D8)

* Faces of 3D-rendered cube-depth buffers cannot be
** source of copy operations (Blt in DDraw)
** locked for CPU-access (Lock in DDraw/ LockRect in D3D8)

- Some DX5 incompatibilities are fixed (crash and texture handling with Space Bunnies Must Die)

- D3D3 fog fixing

(OK, I know D3D3 in fact is D3D2, but I name it D3D3 consistently to as I always did)
Dege
Oldbie
 
Posts: 954
Joined: 2003-9-04 @ 11:06

Re: WIP versions

Postby Dege » 2017-1-29 @ 14:31

PS: I didn't forget about SC1! Will do some reverse engineering later.
Dege
Oldbie
 
Posts: 954
Joined: 2003-9-04 @ 11:06

Re: WIP versions

Postby CoolGamer » 2017-1-29 @ 15:18

Hi Dege,

Thanks for the new WIP29 version. Is it possible to add an "FPS Counter display" as an option to control panel? Also, do you have any plans to implement directx 9 support? I am asking because "Beyond Good and Evil", a classic Directx9 game, is having graphical glitches/compatibility issues on modern hardware. That game will benefit a lot from dgVooodo2 if you add directx9 support.

Thanks
CoolGamer
Newbie
 
Posts: 66
Joined: 2017-1-14 @ 17:22

Re: WIP versions

Postby ZellSF » 2017-1-29 @ 15:34

CoolGamer wrote:Hi Dege,

Thanks for the new WIP29 version. Is it possible to add an "FPS Counter display" as an option to control panel? Also, do you have any plans to implement directx 9 support? I am asking because "Beyond Good and Evil", a classic Directx9 game, is having graphical glitches/compatibility issues on modern hardware. That game will benefit a lot from dgVooodo2 if you add directx9 support.

Thanks

You should be able to get Beyond Good and Evil working with the manual compatibility settings available in its configuration program. Turning off HW vertex processing seems to be the most commonly needed fix. Obviously at the cost of performance, but nothing modern hardware can't make up for (the game can run at max 60 FPS anyway).
ZellSF
Oldbie
 
Posts: 893
Joined: 2006-1-01 @ 18:19

Re: WIP versions

Postby Dege » 2017-1-30 @ 13:07

CoolGamer wrote:Hi Dege,

Thanks for the new WIP29 version. Is it possible to add an "FPS Counter display" as an option to control panel? Also, do you have any plans to implement directx 9 support? I am asking because "Beyond Good and Evil", a classic Directx9 game, is having graphical glitches/compatibility issues on modern hardware. That game will benefit a lot from dgVooodo2 if you add directx9 support.

Thanks


Hi,

I never planned an FPS counter because it can be solved easily by external software, but it doesn't seem to be so hard after all. Except the options related to that: where to place it (which corner), how frequent it should update the counter, etc. A lot of options to load the control panel with.
DX9 is an interesting question, I don't really know how useful it would be. DX9 is an API with long life, having different feature levels (9.1, 9.2, 9.3), even on Win XP, of which 9.1 could be implemented (basically the same features as now thorugh DX8) with relatively little work.
I don't know how many games exist out there having problems and running at DX9.1 level.
Dege
Oldbie
 
Posts: 954
Joined: 2003-9-04 @ 11:06

Re: WIP versions

Postby JJXB » 2017-1-30 @ 14:22

as far as the fps counter, maybe have it as a separate tab in the cpl to make the options easy to position (i'd test if put in but i use MSI afterburner so it's not gonna affect me as much as others)?
and initial DX9 support would be interesting too imo and i'd be down to test dx9.1 supporting games if there was a list of them (knowing me i probably have a few but don't know it yet). I'd test with splinter cell chaos theory first though since it's development time and it's dx9 support does seem like it'd fit the bill.
JJXB
Newbie
 
Posts: 40
Joined: 2015-11-23 @ 17:53

Re: WIP versions

Postby VirtuaIceMan » 2017-1-31 @ 00:29

Dege wrote:- Bugs fixed, like one in DX8 device handling, unexpected forced windowed mode (Soulbringer movies), vertex shader (missing fog in CM Rally)


I tried McRae, the fog is now present! I did notice that if you use ATI Radeon 8500 instead of GeForce4/default Direct3D then the edges of trees/fences etc will show a black key around them, which I think looks better than the ropey/"bitty" look when you don't use ATI Radeon 8500 setting.

I'm not sure which is actually correct on period era hardware though; perhaps the edges should fade to transparent, I can't remember!

p.s. the fix DOESN'T fix Shadows Of The Empire fog, that's table fog I think, which is probably more pain!
My PC spec: Win8.1, i7-4970K (not overclocked) MSI Nvidia GeForce GTX 980, Creative Soundblaster ZXr, 16GB RAM, Asus Z97-A motherboard, NZXT 410 case, ROG Swift GSYNC monitor
User avatar
VirtuaIceMan
Oldbie
 
Posts: 843
Joined: 2003-12-22 @ 00:57

Re: WIP versions

Postby Dege » 2017-1-31 @ 05:55

VirtuaIceMan wrote:
Dege wrote:- Bugs fixed, like one in DX8 device handling, unexpected forced windowed mode (Soulbringer movies), vertex shader (missing fog in CM Rally)


I tried McRae, the fog is now present! I did notice that if you use ATI Radeon 8500 instead of GeForce4/default Direct3D then the edges of trees/fences etc will show a black key around them, which I think looks better than the ropey/"bitty" look when you don't use ATI Radeon 8500 setting.

I'm not sure which is actually correct on period era hardware though; perhaps the edges should fade to transparent, I can't remember!


nVidia and ATI colorkeying is distincted in dgVoodoo, that's why they look different.
The virtual card has nVidia style colorkeying.

VirtuaIceMan wrote:p.s. the fix DOESN'T fix Shadows Of The Empire fog, that's table fog I think, which is probably more pain!


Are you using gog/steam version?
I'm playing the original and have the fog

Image
Dege
Oldbie
 
Posts: 954
Joined: 2003-9-04 @ 11:06

Next

Return to dgVoodoo General

Who is online

Users browsing this forum: LoneKiller and 1 guest