3DFX emulation

Discussion of development and patch submission.
tk421
Posts: 29
Joined: Sat 18 Jun, 2016 6:57 am

Re: 3DFX emulation

Post by tk421 » Fri 25 Aug, 2017 9:42 pm

Thank you for your input. With these changes I felt it was prudent to get some new information, and I am glad to know that little has changed. I was aiming for a quad core i7, but I just wanted to make sure that I should not in fact be considering a six or eight core CPU. It is not an easy decision.

I am looking forward to testing these new features, which I hope will be soon.

Thank you.

User avatar
leilei
Posts: 548
Joined: Fri 25 Apr, 2014 4:47 pm

Re: 3DFX emulation

Post by leilei » Sun 11 Mar, 2018 9:48 am

As much as i'd hate to bump old threads, i've recently failed an attempt to up the taps of the bilinear filter to 128 hoping for just enough precision to be appropriate for the color depth and the lightmap blending (which is currently reminiscent of the 4-bit precision of a PowerVR PCX2's alpha texture rendering over a 32-tap bilinear)

It amusingly made the reverse. This is after replacing some 0xf's with 0x7fs, some >>8's to a >>14, some 16's with a 128. I'm not even sure 128 is the right amount of taps anyway
Attachments
3dfxfil2.jpg
3dfxfil2.jpg (106.77 KiB) Viewed 1360 times

Solarstrike
Posts: 8
Joined: Sun 15 Oct, 2017 7:46 am

Re: 3DFX emulation

Post by Solarstrike » Sat 17 Mar, 2018 1:00 am

Wait, what game is that?

User avatar
omarsis81
Posts: 617
Joined: Thu 17 Dec, 2015 6:20 pm

Re: 3DFX emulation

Post by omarsis81 » Sat 17 Mar, 2018 2:26 am

Solarstrike wrote:
Sat 17 Mar, 2018 1:00 am
Wait, what game is that?
Looks like Half-Life

Solarstrike
Posts: 8
Joined: Sun 15 Oct, 2017 7:46 am

Re: 3DFX emulation

Post by Solarstrike » Sat 17 Mar, 2018 3:48 pm

omarsis81 wrote:
Sat 17 Mar, 2018 2:26 am
Looks like Half-Life
Doy, why didn't I think about that?

But anyyays, question time - what's the latest game you've tested so far with PCem?

User avatar
omarsis81
Posts: 617
Joined: Thu 17 Dec, 2015 6:20 pm

Re: 3DFX emulation

Post by omarsis81 » Sat 17 Mar, 2018 6:31 pm

Solarstrike wrote:
Sat 17 Mar, 2018 3:48 pm
omarsis81 wrote:
Sat 17 Mar, 2018 2:26 am
Looks like Half-Life
Doy, why didn't I think about that?

But anyyays, question time - what's the latest game you've tested so far with PCem?
For me was Hitman: Codename 47 (2000) - It has good framerate, however there are random crashes not related to PCem (it seems it works best with nVidia cards) - look here viewtopic.php?f=3&t=640

Solarstrike
Posts: 8
Joined: Sun 15 Oct, 2017 7:46 am

Re: 3DFX emulation

Post by Solarstrike » Sat 17 Mar, 2018 10:42 pm

omarsis81 wrote:
Sat 17 Mar, 2018 6:31 pm
For me was Hitman: Codename 47 (2000) - It has good framerate, however there are random crashes not related to PCem (it seems it works best with nVidia cards) - look here viewtopic.php?f=3&t=640
Meanwhile I've tried as late as Return to Castle Wolfenstein (seems to work OK with average frames but has some CPU bottlenecking going on), Red Faction (same things, but framerate is surprisingly decent), Max Payne (far too slow for a P233MMX), and even stuff like Jedi Outcast (can't modify any settings, runs a little slow but not too bad), GTA 3 (doesn't launch at all), SimCity 4 (crashes PCem), and even as far out as 2004 with Sonic Heroes (way too low a framerate even if minimized settings)!

User avatar
leilei
Posts: 548
Joined: Fri 25 Apr, 2014 4:47 pm

Re: 3DFX emulation

Post by leilei » Sat 17 Mar, 2018 11:06 pm

In early Voodoo2 testing I tried Unreal Tournament 2004 out of morbid curiosity. It works as expected (A Voodoo3 could run this a little better but that will still have major errors - this is a DX8.1 game that wants vertex shaders and as much multitexture combine as possible, and is beyond fixing anyway which is why I didn't report it as a bug here. I don't even have the space on my real V2 rig to play Schrodinger's Bug)

FWIW UT2003 will refuse to run because it's really strict on supported video cards. UT2004 is more lax. I prioritized on testing games released within 3dfx's lifetime for proper reports however....
Attachments
pcemut265.jpg
pcemut265.jpg (57.15 KiB) Viewed 1171 times

Solarstrike
Posts: 8
Joined: Sun 15 Oct, 2017 7:46 am

Re: 3DFX emulation

Post by Solarstrike » Sun 18 Mar, 2018 12:03 am

That's pretty funny. :P

User avatar
leilei
Posts: 548
Joined: Fri 25 Apr, 2014 4:47 pm

Re: 3DFX emulation

Post by leilei » Mon 16 Apr, 2018 12:36 pm

On the double-sized blending dither argument I've noticed MAME's voodoo code does emulate it, at least for War Final Assault. Little clip of a flamethrower producing the overdraw necessary, sized up 300%
bigdither.png
bigdither.png (34.51 KiB) Viewed 656 times

MAME doesn't have the radial LOD bias or the screen filter though (and probably no mip dither either).

User avatar
leilei
Posts: 548
Joined: Fri 25 Apr, 2014 4:47 pm

Re: 3DFX emulation

Post by leilei » Thu 10 May, 2018 12:47 pm

Here's a naive attempt at recreating the double-sized dither, which apparently only should apply to the 4x4 dithered triangles when they are blending (2x2 dithering, mostly seen under 3dfx's Direct3D HAL, and UnrealEngine should not be affected by this patch at all). It's a slow implementation for the interpreter only for now.


POST-ATTACHMENT EDIT:

hmm. On real hardware does the 4x4 dithering matrix get quantized down by the vertex color to the point that the 'big 2x2 table' is visible? Am I going to need a [256][64][4][4]?

EDIT PART 2:

I'm wrong on that. I do believe the 4x4 gets reduced in way or another though.

EDIT PART 3:

Reading the V3 spec (8.24) clued me in what really goes on - it's using the 4x4 dither matrix to subtract the destination blend color. The double-sized dithering I perceived all along are just two 4x4s clashing. I'll have a less naive patch soon.


EDIT PART 4:
Discussion of dither subtraction (which is what this "big 2x2" is) moved to the thread of the patch.

Post Reply