3DFX emulation

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

Re: 3DFX emulation

Post by tk421 »

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: 1039
Joined: Fri 25 Apr, 2014 4:47 pm

Re: 3DFX emulation

Post by leilei »

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 16313 times
Solarstrike
Posts: 8
Joined: Sun 15 Oct, 2017 7:46 am

Re: 3DFX emulation

Post by Solarstrike »

Wait, what game is that?
User avatar
omarsis81
Posts: 945
Joined: Thu 17 Dec, 2015 6:20 pm

Re: 3DFX emulation

Post by omarsis81 »

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 »

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: 945
Joined: Thu 17 Dec, 2015 6:20 pm

Re: 3DFX emulation

Post by omarsis81 »

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 »

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: 1039
Joined: Fri 25 Apr, 2014 4:47 pm

Re: 3DFX emulation

Post by leilei »

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 16124 times
Solarstrike
Posts: 8
Joined: Sun 15 Oct, 2017 7:46 am

Re: 3DFX emulation

Post by Solarstrike »

That's pretty funny. :P
User avatar
leilei
Posts: 1039
Joined: Fri 25 Apr, 2014 4:47 pm

Re: 3DFX emulation

Post by leilei »

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 15609 times

MAME doesn't have the radial LOD bias or the screen filter though (and probably no mip dither either).
User avatar
leilei
Posts: 1039
Joined: Fri 25 Apr, 2014 4:47 pm

Re: 3DFX emulation

Post by leilei »

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.
User avatar
kode54
Posts: 8
Joined: Thu 16 Aug, 2018 7:32 am

Re: 3DFX emulation

Post by kode54 »

Is this the place to post bug reports or possible misconfiguration issues? I'm having trouble getting Final Reality to work with the Voodoo 2 emulation, SLI enabled or disabled. It produces images like this past the 5px triangle overload screen, which is the only thing it renders correctly, albeit slowly.

Image
Image
Image
Image
Image
Image
Image

For sanity, here's my configuration:

Code: Select all

gameblaster = 0
gus = 0
ssi2001 = 0
voodoo = 1
model = 430vx
cpu_manufacturer = 0
cpu = 0
cpu_use_dynarec = 1
cpu_waitstates = 0
gfxcard = virge375
video_speed = 5
sndcard = sbawe32
cpu_speed = 0
has_fpu = 0
disc_a = 
disc_b = 
hdd_controller = ide
mem_size = 262144
cdrom_drive = 200
cdrom_channel = 1
cdrom_path = /home/chris/.pcem/cdr/fr101.iso
zip_channel = -1
hdc_sectors = 63
hdc_heads = 16
hdc_cylinders = 16383
hdc_fn = /home/chris/.pcem/hdd/win98.img
hdd_sectors = 0
hdd_heads = 0
hdd_cylinders = 0
hdd_fn = 
hde_sectors = 0
hde_heads = 0
hde_cylinders = 0
hde_fn = 
hdf_sectors = 0
hdf_heads = 0
hdf_cylinders = 0
hdf_fn = 
hdg_sectors = 0
hdg_heads = 0
hdg_cylinders = 0
hdg_fn = 
hdh_sectors = 0
hdh_heads = 0
hdh_cylinders = 0
hdh_fn = 
hdi_sectors = 0
hdi_heads = 0
hdi_cylinders = 0
hdi_fn = 
drive_a_type = 7
drive_b_type = 7
bpb_disable = 0
cd_speed = 24
joystick_type = 5
mouse_type = 3
enable_sync = 1
netcard = rtl8029as
lpt1_device = none
vid_resize = 0
video_fullscreen_scale = 0
video_fullscreen_first = 1

[3DFX Voodoo Graphics]
type = 2
framebuffer_memory = 4
texture_memory = 4
bilinear = 1
dacfilter = 0
render_threads = 2
sli = 1
recompiler = 1

[Sound Blaster AWE32]
addr = 544
emu_addr = 1568
onboard_ram = 28672
opl_emu = 1

[Joysticks]
joystick_0_nr = 1
joystick_0_axis_0 = 0
joystick_0_axis_1 = 1
joystick_0_button_0 = 0
joystick_0_button_1 = 1
joystick_0_button_2 = 2
joystick_0_button_3 = 3
joystick_0_button_4 = 4
joystick_0_button_5 = 5
joystick_0_button_6 = 6
joystick_0_button_7 = 7
joystick_0_button_8 = 8
joystick_0_button_9 = 9
joystick_1_nr = 0
joystick_2_nr = 0
joystick_3_nr = 0

[SDL2]
screenshot_format = png
screenshot_flash = 1
custom_width = 640
custom_height = 480
fullscreen = 0
fullscreen_mode = 0
scale = 1
scale_mode = 1
vsync = 1
focus_dim = 0
alternative_update_lock = 0
render_driver = auto

[GL3]
input_scale = 1.000000
input_stretch = 0
shader_refresh_rate = 0.000000

[GL3 Shaders]
shaders = 0
Running v14 on Ubuntu 18.04.1, running Cinnamon 3.6.7, and the NVidia proprietary drivers v390.48. In the emulator, I'm running Windows 98 SE, and using the latest Voodoo 2 reference drivers from the 3Dfx archive.

E: It appears to be an artifact with the 64 bit code generator.
Post Reply