3DFX emulation

Discussion of development and patch submission.
szadycbr
Posts: 185
Joined: Mon 21 Nov, 2016 6:23 pm

Re: 3DFX emulation

Postby szadycbr » Sun 05 Mar, 2017 9:42 am

Thank you Sarah. i can switch to DDraw, it does not make any noticeable difference. Thanks.
User avatar
ender
Posts: 51
Joined: Tue 14 Oct, 2014 12:51 pm

Re: 3DFX emulation

Postby ender » Sun 05 Mar, 2017 10:37 am

I'd much rather see a statusbar with icons for HDDs and floppy drives, and have those blink (kinda like what VMWare Workstation has).
szadycbr
Posts: 185
Joined: Mon 21 Nov, 2016 6:23 pm

Re: 3DFX emulation

Postby szadycbr » Sun 05 Mar, 2017 11:40 am

it could be just tiny spec in corner, or bar alike in winuae. truly it does not bother me as long as it is there.
it also could use keyboard diodes, like winuae does , in winuae you can assign fdd, power etc. to capslock, numlock and scrollLock.
amiga has capslock key, so does Pc ,maybe it could be done. but tiny spec in corner like 1/6 of the current size is also very much fine.
User avatar
gen_angry
Posts: 48
Joined: Sat 25 Feb, 2017 6:48 am

Re: 3DFX emulation

Postby gen_angry » Sun 05 Mar, 2017 12:27 pm

ender wrote:I'd much rather see a statusbar with icons for HDDs and floppy drives, and have those blink (kinda like what VMWare Workstation has).


I would echo this request, or at least add an option to disable it.

Not really a fan of the blinking white block on the screen myself.
EluanCM
Posts: 28
Joined: Tue 27 Oct, 2015 2:07 pm
Contact:

Re: 3DFX emulation

Postby EluanCM » Sun 05 Mar, 2017 7:08 pm

A lateral bar for most status indicators would be nice, since we now use wide screens and all computers that PCem emulates use 4:3 graphics
User avatar
leilei
Posts: 432
Joined: Fri 25 Apr, 2014 4:47 pm

Re: 3DFX emulation

Postby leilei » Wed 08 Mar, 2017 1:35 am

Random reference pic from a really really old complaint from the late Seumas McNally about Voodoo's alpha dithering, showing the colors having the 4x4 ordered dither on the texture while the alpha channel gets that double-sized 2x2 dither

Currently PCem uses the 4x4 dither on both, rendering it quite Voodoo3-esque (though V3 used a 2x2 dither on blending still, just not double-sized unless specified to smooth on 3dfx tools)
Attachments
3DFXtank0020.png
3DFXtank0020.png (74.21 KiB) Viewed 2404 times
SarahWalker
Site Admin
Posts: 1327
Joined: Thu 24 Apr, 2014 4:18 pm

Re: 3DFX emulation

Postby SarahWalker » Wed 08 Mar, 2017 5:51 pm

Ah! I hadn't twigged that the 2x2 dither is double sized. Should be an easy fix to make...
SarahWalker
Site Admin
Posts: 1327
Joined: Thu 24 Apr, 2014 4:18 pm

Re: 3DFX emulation

Postby SarahWalker » Wed 08 Mar, 2017 6:03 pm

Actually, hang on - I got PCem's dither patterns from testing on real hardware. I've just dug out my test images for 2x2 dither and it is _not_ double sized! What am I missing here?
User avatar
leilei
Posts: 432
Joined: Fri 25 Apr, 2014 4:47 pm

Re: 3DFX emulation

Postby leilei » Wed 08 Mar, 2017 10:33 pm

I skipped V1 and went straight for V2 so on a real V1 I don't know. This double-sized 2x2 also appears in my 8x overdrawn 0.125/0.125/0.125 additive blob comparison image with real V2 hardware with 98 dates on the chips (don't know if the pattern is revised on the post-STB V2 1000s or other vendors)

I'll try to nab a screen of the fillrate test in 3dmark2001, they're usually pattern exposing
User avatar
omarsis81
Posts: 544
Joined: Thu 17 Dec, 2015 6:20 pm

Re: 3DFX emulation

Postby omarsis81 » Wed 08 Mar, 2017 11:07 pm

I have a real V1 if you need to test something...
User avatar
leilei
Posts: 432
Joined: Fri 25 Apr, 2014 4:47 pm

Re: 3DFX emulation

Postby leilei » Thu 09 Mar, 2017 5:06 am

I just fired up 3dmark2001 on the real V2 at the fillrate test and indeed I do see non-doubled 2x2 dither. Perhaps this choice to double or not is in the driver code itself and i'm not aware of any keys/switches that can change this on V2. I certainly can't find non-doubled 2x2 in Glide/GL stuff, just Direct3D. (that tank game and white blob were through 3dfxvgl) Maybe there's a bit involved somewhere (_grDitherMode?)
small3dm01v2dither.png
small3dm01v2dither.png (43.62 KiB) Viewed 2289 times


Going back to the white additive blobs here to show where the two dither tables are possiobly used on real V2. The doubled 2x2 comes in on color subtraction maybe
addblobs.png
addblobs.png (21.6 KiB) Viewed 2267 times


(also avp v2 dx7 bug is real behavior, d3d/sstv2_vsync hanging is real behavior, outrage dx7 trail bug is real behavior)
seth
Posts: 5
Joined: Tue 14 Mar, 2017 12:13 pm

Re: 3DFX emulation

Postby seth » Wed 15 Mar, 2017 1:16 am

Hey Guys, thank you for this amazing emulator! I already played a bunch of games and most of them run very well. =)

Today I tried to start Gunmetal (https://en.wikipedia.org/wiki/Gunmetal_(video_game)), but it just shows the game for a second before it then decides to crash immediately.

3dfx Voodoo2 V3.02.02
DirectX 7.0a
Windows 98SE

System: i7 2600k 4GHz, GTX 1060, 16GB DDR3 Ram

settings.jpg
settings.jpg (198.49 KiB) Viewed 2082 times
start.jpg
start.jpg (67.82 KiB) Viewed 2082 times
r2.jpg
r2.jpg (111.56 KiB) Viewed 2082 times
User avatar
leilei
Posts: 432
Joined: Fri 25 Apr, 2014 4:47 pm

Re: 3DFX emulation

Postby leilei » Wed 15 Mar, 2017 8:32 am

I get worse. The dos version I tried (GUN.EXE) doesn't display the 3d at all and only displays the 2d parts with this logged

Code: Select all

Swap buffer 00000001 1 0FC7055C
Swap buffer 00000001 1 0FC7055C
Bad CMDFIFO packet ffffffff 001e54a0
Bad CMDFIFO packet ffffffff 001e54a4
Bad CMDFIFO packet ffffffff 001e54a8
Bad CMDFIFO packet ffffffff 001e54ac
Bad CMDFIFO packet ffffffff 001e54b0
Bad CMDFIFO packet ffffffff 001e54b4
Bad CMDFIFO packet ffffffff 001e54b8
Bad CMDFIFO packet ffffffff 001e54bc
Bad CMDFIFO packet ffffffff 001e54c0
Bad CMDFIFO packet ffffffff 001e54c4
Bad CMDFIFO packet ffffffff 001e54c8
Bad CMDFIFO packet ffffffff 001e54cc
Bad CMDFIFO packet ffffffff 001e54d0
Bad CMDFIFO packet ffffffff 001e54d4
Bad CMDFIFO packet ffffffff 001e54d8
Bad CMDFIFO packet ffffffff 001e54dc
Bad CMDFIFO packet ffffffff 001e54e0
Bad CMDFIFO packet ffffffff 001e54e4
Bad CMDFIFO packet ffffffff 001e54e8
Bad CMDFIFO packet ffffffff 001e7260
Bad CMDFIFO packet 8c26121f 001e7264
Swap buffer 00000001 1 0FC7055C

and then crashes PCem with a nasty long list of

Code: Select all

Abrt reading from 82BD1070
Double fault 870420761
Triple fault - reset
NULL segment! rb 0CDE(0000CDE0):000072D3 64 00009002
NULL segment! rb 0CDE(0000CDE0):000072D3 64 00009002
NULL segment! rb 0CDE(0000CDE0):000072D3 64 00009002
NULL segment! rb 0CDE(0000CDE0):000072D3 64 00009002
NULL segment! rb 0CDE(0000CDE0):000072D3 64 00009002
NULL segment! rb 0CDE(0000CDE0):000072D3 64 00009002
NULL segment! rb 0CDE(0000CDE0):000072D3 64 00009002


I remember running this fine on Voodoo2 over a decade ago, but whether it was the DX or DOS version i'm not sure. I'll have to check real behavior later
seth
Posts: 5
Joined: Tue 14 Mar, 2017 12:13 pm

Re: 3DFX emulation

Postby seth » Thu 16 Mar, 2017 12:53 am

I'll have to check real behavior later

Great. Thanks! :)

I've played another one (same system and settings): the x-gold version of 'x: beyond the frontier'. It's running great so far, but after the tutorial I have some weird graphical glitches. I thought this could be helpful:

x1.jpg
x1.jpg (92.95 KiB) Viewed 2002 times
x11.jpg
x11.jpg (92.72 KiB) Viewed 2002 times
x131.jpg
x131.jpg (94.19 KiB) Viewed 2002 times
SarahWalker
Site Admin
Posts: 1327
Joined: Thu 24 Apr, 2014 4:18 pm

Re: 3DFX emulation

Postby SarahWalker » Fri 28 Apr, 2017 8:07 pm

Finally getting back to 3DFX stuff...
rakzom wrote:With v12 and Voodoo 2, there is some texture glitches in Motocross Madness demo for the player shadows and the dust trail

https://www.youtube.com/watch?v=_cr8h6Ir9fM

PCem v12 - 91% - Award 430VX PCI - Pentium MMX 166 - Press CTRL-END to release mouse 27_02_2017 22_43_51.jpg

I can't reproduce this. What graphics settings are you using in the game? Which Voodoo drivers? What emulator config?
SarahWalker
Site Admin
Posts: 1327
Joined: Thu 24 Apr, 2014 4:18 pm

Re: 3DFX emulation

Postby SarahWalker » Tue 15 Aug, 2017 7:46 pm

Rev 843 adds SLI emulation. Note that enabling SLI will double the number of render threads in use, so enabling it with 2 render threads in the GUI will give 4 render threads total - with the overhead of the rest of the emulator, you will need at least an 8 thread CPU to make this perform well. SLI with 1 render thread (ie 2 in total) should perform okay on quad core CPUs.

Voodoo 1 SLI will probably require the Quantum3D drivers in order to work. Voodoo 1 doesn't have proper synchronisation between the two cards, so interlacing artifacts are likely. Also it doesn't support 1024x768, so you won't get any higher resolutions.

Voodoo 2 SLI should just work with any driver, and you shouldn't get interlacing artifacts unless you turn vsync off.
User avatar
omarsis81
Posts: 544
Joined: Thu 17 Dec, 2015 6:20 pm

Re: 3DFX emulation

Postby omarsis81 » Tue 15 Aug, 2017 7:53 pm

Much appreciated Sarah!
Time to enable Hyper Threading again. SLI here we go!
User avatar
leilei
Posts: 432
Joined: Fri 25 Apr, 2014 4:47 pm

Re: 3DFX emulation

Postby leilei » Tue 15 Aug, 2017 11:30 pm

From quick testing, the screen filter code doesn't like SLI, it seems to induce more scanline artifacts than normal, and sometimes SLI has the emulator hanging on initializing different video modes sometimes (Q3 1.27g w/ 3dfx V2 Jan '00 drivers on W98SE has had a few hard freezes, Wx build)

Disabling SLI through the Voodoo2 panel also can set off a hang.

EDIT: Occurs on non-Wx build as well, and even sometimes clicking around q3 menus can set off hangs (as the game halts to load textures). Haven't tried V1 SLI yet.

EDIT 2: the hangs could be recompiler related as I haven't been able to reproduce them with WinChip interpreter... (except for the disable SLI hang)

On a more positive note i've noticed paletted+alpha textures are fast on V2 now.
JosepMa
Posts: 70
Joined: Tue 20 Jun, 2017 6:25 pm

Re: 3DFX emulation

Postby JosepMa » Wed 16 Aug, 2017 6:41 pm

Compiling with gcc 7 and -Wall gives this error:

vid_voodoo.c:7393:17: error: specified bound 512 equals the size of the destination [-Werror=stringop-overflow=]
strncat(temps, temps2, 512);
^~~~~~~~~~~~~~~~~~~~~~~~~~~
vid_voodoo.c:7399:17: error: specified bound 512 equals the size of the destination [-Werror=stringop-overflow=]
strncat(temps, temps2, 512);
^~~~~~~~~~~~~~~~~~~~~~~~~~~
vid_voodoo.c:7405:25: error: specified bound 512 equals the size of the destination [-Werror=stringop-overflow=]
strncat(temps, temps2, 512);
^~~~~~~~~~~~~~~~~~~~~~~~~~~


These are the definitions
char temps[512], temps2[256];


The definition of strncat says this:
char * strncat ( char * destination, const char * source, size_t num );
Append characters from string
Appends the first num characters of source to destination, plus a terminating null-character.


The important part is "plus a terminating null-character". So it really means that "num" has to be one less than the destination size.
SarahWalker
Site Admin
Posts: 1327
Joined: Thu 24 Apr, 2014 4:18 pm

Re: 3DFX emulation

Postby SarahWalker » Wed 16 Aug, 2017 6:54 pm

Rev 847 should fix the strncat() usage.
A. Naim
Posts: 75
Joined: Thu 09 Jul, 2015 5:06 pm

Re: 3DFX emulation

Postby A. Naim » Fri 18 Aug, 2017 10:06 pm

This is delightful!

PCem v13 is going to rock (even more than it already does!)
User avatar
omarsis81
Posts: 544
Joined: Thu 17 Dec, 2015 6:20 pm

Re: 3DFX emulation

Postby omarsis81 » Sat 19 Aug, 2017 1:20 am

A. Naim wrote:This is delightful!

PCem v13 is going to rock (even more than it already does!)

With the exception of the Configurator Manager, PCem always gets better and better with each version ;)
Orchidsworn
Posts: 59
Joined: Sun 22 Mar, 2015 10:16 pm

Re: 3DFX emulation

Postby Orchidsworn » Sun 20 Aug, 2017 8:37 am

Seems this program is leaning me more and more towards a Ryzen Build. I am interested to see what the next chips from AMD bring. But hey if a 6 core Intel comes out at a competitive price that might be nice as well. I love how Hardware is starting to pick up and I got some software that is going really benefit it. Thank you guys for giving me a reason to look forward to something it has been some rather boring years these last couple.
A. Naim
Posts: 75
Joined: Thu 09 Jul, 2015 5:06 pm

Re: 3DFX emulation

Postby A. Naim » Sun 20 Aug, 2017 8:59 am

Orchidsworn wrote:Seems this program is leaning me more and more towards a Ryzen Build. I am interested to see what the next chips from AMD bring. But hey if a 6 core Intel comes out at a competitive price that might be nice as well. I love how Hardware is starting to pick up and I got some software that is going really benefit it. Thank you guys for giving me a reason to look forward to something it has been some rather boring years these last couple.

Ryzen has some low-hanging optimization fruit, from what I've read in tech reviews; not to mention bumping the clock speed should be quite doable for Zen 2. For optimization, the cache is apparently a bit too hit-or-miss, and tends to be unusually slow.
Orchidsworn
Posts: 59
Joined: Sun 22 Mar, 2015 10:16 pm

Re: 3DFX emulation

Postby Orchidsworn » Wed 23 Aug, 2017 9:25 am

A. Naim wrote:
Orchidsworn wrote:Seems this program is leaning me more and more towards a Ryzen Build. I am interested to see what the next chips from AMD bring. But hey if a 6 core Intel comes out at a competitive price that might be nice as well. I love how Hardware is starting to pick up and I got some software that is going really benefit it. Thank you guys for giving me a reason to look forward to something it has been some rather boring years these last couple.

Ryzen has some low-hanging optimization fruit, from what I've read in tech reviews; not to mention bumping the clock speed should be quite doable for Zen 2. For optimization, the cache is apparently a bit too hit-or-miss, and tends to be unusually slow.


Well I am not likely to get anything before Zen 2 so not a problem for me. I am just thinking be nice to have all those threads if this program will have a setup that can use 8 threads on its own.
tk421
Posts: 16
Joined: Sat 18 Jun, 2016 6:57 am

Re: 3DFX emulation

Postby tk421 » Wed 23 Aug, 2017 10:02 am

Adding SLI emulation is a major development for PCem. I have never run a PC with an SLI configuration, so I am eager to use this feature when the time comes.

Adding SLI to PCem would seem to raise the question of buying an Intel or AMD CPU. Is it possible I can or should buy a Ryzen CPU in place of an Intel i7 CPU (either quad core or 8 core)? I am inching towards the i7, but I am sure other members have much better recommendations for a new CPU given this development.

It is an exciting time to be a PC user!
User avatar
omarsis81
Posts: 544
Joined: Thu 17 Dec, 2015 6:20 pm

Re: 3DFX emulation

Postby omarsis81 » Wed 23 Aug, 2017 12:51 pm

tk421 wrote:Adding SLI emulation is a major development for PCem. I have never run a PC with an SLI configuration, so I am eager to use this feature when the time comes.

So, we finally DID have our surprise for v13 after all Sarah! ;)
tk421 wrote:Adding SLI to PCem would seem to raise the question of buying an Intel or AMD CPU.

I don't want to take sides on what brand to purchase, but we discussed many times that PCem benefits from high performing single core, and to my knowledge Intel still ahead of the race.
This is because the emulated processor is what takes most of the host processor and that task cannot be split into multiple threads, so having a 32 thread processor running at 2.2 ghz would run PCem like a snail (well, not so much, but you get my point)
SarahWalker
Site Admin
Posts: 1327
Joined: Thu 24 Apr, 2014 4:18 pm

Re: 3DFX emulation

Postby SarahWalker » Wed 23 Aug, 2017 5:34 pm

I think we're going to have to wait for someone to actually buy a Ryzen before we know if it's worthwhile or not. My gut feeling is it's _probably_ worth waiting for the second generation at least.

I'd expect though that if you buy a big i7 you probably won't be disappointed. gen_angry got some pretty excellent results a while ago on a non-overclocked 6700k.
Orchidsworn
Posts: 59
Joined: Sun 22 Mar, 2015 10:16 pm

Re: 3DFX emulation

Postby Orchidsworn » Thu 24 Aug, 2017 12:25 pm

omarsis81 wrote:
tk421 wrote:Adding SLI emulation is a major development for PCem. I have never run a PC with an SLI configuration, so I am eager to use this feature when the time comes.

So, we finally DID have our surprise for v13 after all Sarah! ;)
tk421 wrote:Adding SLI to PCem would seem to raise the question of buying an Intel or AMD CPU.

I don't want to take sides on what brand to purchase, but we discussed many times that PCem benefits from high performing single core, and to my knowledge Intel still ahead of the race.
This is because the emulated processor is what takes most of the host processor and that task cannot be split into multiple threads, so having a 32 thread processor running at 2.2 ghz would run PCem like a snail (well, not so much, but you get my point)



I was happy with network support that makes the computer full feature for games at least. Now everything is just upgrades to said computer.
Orchidsworn
Posts: 59
Joined: Sun 22 Mar, 2015 10:16 pm

Re: 3DFX emulation

Postby Orchidsworn » Thu 24 Aug, 2017 12:27 pm

SarahWalker wrote:I think we're going to have to wait for someone to actually buy a Ryzen before we know if it's worthwhile or not. My gut feeling is it's _probably_ worth waiting for the second generation at least.

I'd expect though that if you buy a big i7 you probably won't be disappointed. gen_angry got some pretty excellent results a while ago on a non-overclocked 6700k.


My experience says Intel or AMD don't buy the first version of a major architectural change. Rare occasions do they knock it out of the park with the first swing. So I am incline to agree. I say go with what Intel has it is proven to be quality or wait another year and see how Zen matures.

Return to “Development”

Who is online

Users browsing this forum: grommit2007 and 5 guests