Page 5 of 7

Re: 3DFX emulation

Posted: Sat 04 Feb, 2017 4:01 am
by leilei
PCem crashes when you try to use 1024x768 in Battlezone with a Voodoo2. it should be able to function IIRC, i've seen it working on a single 3D Blaster V2 at one point. It didn't use a z-buffer for that mode iirc

It initializes 1024x768 with a brief grey flash and the first soundbuffer chunk in the game plays, and then PCem crashes to desktop.

Filter off and interpreter also tested.

Code: Select all

Voodoo Filter: 000000
Swap buffer 00000000 2 0FA9052C
Swap buffer 00000000 1 0FA9052C
Swap buffer 00000000 1 0FA9052C
Swap buffer 00000000 1 0FA9052C
Swap buffer 00000000 1 0FA9052C
Bad CMDFIFO packet ff929292 00300010
PIC1 : MASK 38 PEND 00 INS 00 VECTOR 50
PIC2 : MASK 0D PEND 00 INS 00 VECTOR 58

Re: 3DFX emulation

Posted: Sat 04 Feb, 2017 10:08 am
by Orchidsworn
omarsis81 wrote:
Orchidsworn wrote: If you got a computer that can run SLI emulation I am definitely envious.
LOL, no, of course I don't. I believe SLI is not implemented yet and you would requiere a Pentium II to get some juice out of them.
But I remember reading here that host CPU is not the most demanding stuff when emulating a video card. Currently PCem uses up to 3 threads, maybe SLI can take a fourth... (which is quite standard CPU)
IF that is doable it would almost be a why not situation of course. Hell my 7 year old computer I am on has 4 cores/threads.

I likely will have plenty of computer when I update next year ... just waiting on PCI-E 4.0 for future proofing sake

Maybe we will have Pentium II by that point which is about as powerful of a CPU as you need to play anything that a virutal xp machine or native windows can't already play.... here is to wishing. I really want network support more than anything.

Re: 3DFX emulation

Posted: Sun 05 Feb, 2017 9:07 am
by SarahWalker
Battlezone only lets me select 640x480. Is there some patch I need?

Re: 3DFX emulation

Posted: Sun 05 Feb, 2017 11:28 am
by leilei
You'll have to edit render.cfg to unlock it. After doing so the menu should grant access to 800x600 and 1024x768 for Direct3D

Re: 3DFX emulation

Posted: Sun 05 Feb, 2017 4:53 pm
by SarahWalker
Battlezone works at 1024x768 as of rev 631. There did seem to be missing textures on the player's gun though, I've yet to confirm if this is the case or not on a real V2.

Re: 3DFX emulation

Posted: Mon 06 Feb, 2017 1:34 am
by leilei
I get the gun. Make sure Cockpit Detail is set to Textured

A little interesting that the driver (3.02.02) turns off dithering and filtering for 1024x768 :)

Re: 3DFX emulation

Posted: Mon 06 Feb, 2017 8:30 pm
by SarahWalker
Rev 634 should fix the texture edge filtering issue.

Re: 3DFX emulation

Posted: Mon 06 Feb, 2017 9:41 pm
by SarahWalker
Rev 635 fixes the Starfleet Academy flickering.

Re: 3DFX emulation

Posted: Tue 07 Feb, 2017 4:35 am
by leilei
I've noticed a few polygons flashing in Starsiege Tribes.

Motorhead looks great and the motion blur works, the font's a pixel off though.

Attached is the trailing artifacts Outrage gets immediately visible from the start (Doesn't happen on V1)
pcemoutrage.jpg
pcemoutrage.jpg (67.39 KiB) Viewed 26759 times

Re: 3DFX emulation

Posted: Tue 07 Feb, 2017 8:32 pm
by SarahWalker
Outrage looks like that on real hardware. It appears to forget to clear it's framebuffers before rendering into them...

Re: 3DFX emulation

Posted: Tue 07 Feb, 2017 10:34 pm
by leilei
Interesting. Looking into it, it's apparently a 3dfx driver regression. It looks normal on a May 1998 driver (except for hud texture corruptions ingame that do not happen on the later driver)

Re: 3DFX emulation

Posted: Wed 08 Feb, 2017 10:06 pm
by SarahWalker
Rev 636 fixes the Serious Sam issues.

Re: 3DFX emulation

Posted: Sat 11 Feb, 2017 6:34 am
by leilei
Good news, I've a working real Voodoo2 again. I'll try to check my own untested bugs later (i.e. nolf, max, etc)

Here's some accuracy nitpicking that might be way too last-minute for v12 (i'm not sure but still). I also have a Voodoo3 in the same system so I took some shots of that and PCem happens to resemble the V3 more at this point (though v3 might be a bit brighter biased in its dither?)

EDIT: Added Voodoo3's "smooth alpha blending" option results

Re: 3DFX emulation

Posted: Sun 12 Feb, 2017 5:15 am
by leilei
Debunking my own reports with screenshots from the real V2:

NOLF combine bug is real behavior and is not a PCem bug
v2-nolf-combinebug.jpg
v2-nolf-combinebug.jpg (41.29 KiB) Viewed 26424 times
Max Payne combine bug is real behavior and is not a PCem bug
v2-max-combinebug.jpg
v2-max-combinebug.jpg (44.28 KiB) Viewed 26423 times
3DMark2001 HUD/Sponsor bug is a PCem bug and doesn't happen on real V2 hardware
v2-3dmark2001.jpg
v2-3dmark2001.jpg (75.38 KiB) Viewed 26424 times
Battlezone 2 menu successfully initializes on real V2 hardware.

Also noticed putting the Voodoo2's gamma up to 3 does not gamma the purple lines. which is strange as i've captured them amplified on V3's svideo out before, so maybe the order is...

V3:
- Filter
- Lines (4x1 filter only)
- Gamma

V2?:
- Gamma
- Filter
- Lines

While playing around with the gamma while looking at the single texel i've noticed it losing precision/getting more black bleed in the lower right corner, so maybe the filter is working on a gamma'd picture

Re: 3DFX emulation

Posted: Sun 12 Feb, 2017 2:15 pm
by omarsis81
Good work leilei!

Re: 3DFX emulation

Posted: Sun 12 Feb, 2017 3:08 pm
by SarahWalker
Thanks for this leilei!

3DMark2001 is a bug in LOD calculations - PCem's implementation of this is a bit wrong. At some point I need to do some experimentation with a real V2 but that's not going to happen for v12.

Re: 3DFX emulation

Posted: Mon 13 Feb, 2017 1:34 am
by leilei
There's also dithered mipmaps on the V2 (which when enabled, doesn't care whether it's bilinaer or trilinear filtering)

Q3A Demo v1.11, r_colorMipLevels 1 + devmap q3dm1, no overbrights, no gamma, lightmap, real v2 shot
v2-trilinear-lightmap-dithering.png
v2-trilinear-lightmap-dithering.png (186.09 KiB) Viewed 26282 times
and for reference (on LOD correction etc), here's with it off (while trilinear is still enabled - it uses bilinear on multitextured surfaces)
v2-trilinear-lightmap2.png
v2-trilinear-lightmap2.png (199.4 KiB) Viewed 26269 times

Re: 3DFX emulation

Posted: Tue 14 Feb, 2017 5:40 am
by leilei
WIP Patch on the filter, changing the method. Didn't do any deep tuning/tweaking yet. it's also currently in a messy obviously refactorable state and is possibly slower/unstable. i just had to get this out as soon as i could

It doesn't add differences anymore, but tries to average with a 25% translucency per sampled pixel and tries to obey the threshold.

I started off by trying to copy the output of an Elite Force menu screen with SSTV2_VIDEO_FILTER_THRESHOLD set to 0xFFFFFF, and then tried to apply the threshold stuff later. On a real V2 the vertical purple lines in the interface would show 3 times to the right and once to the left, as well as the small text seeing slightly double.

Also I ordered the gamma to happen in the filter function before that filters rather than after it

EDIT: Replaced patch with a more noticable, more stable slightly cleaned up version

Re: 3DFX emulation

Posted: Thu 16 Feb, 2017 2:39 am
by leilei
Empire Earth can freeze the guest system when using the Voodoo 1 and 2. Works on ViRGE with graphical corruption though, i've yet to test this on the real V2 (worth noting the main menu is 1024x768 and is using the direct3d api)
EDIT: Doesn't work on real V2. gives black screen error message and quits (but doesn't freeze)

unrelated, also backing up my claim about the order of gamma before filter, is i've seen the dither pattern unscathed in superbright pixels of overpowered gamma (which would overflow and lead into garbage colors on real hardware)

Oddly I can't see any purple lines at all on this real V2. V3's are obvious though, and I believe V1's filter is the same as V3's. i'll have to remake my filter to have v1 filter and the v2 filter separated

EDIT 2:
PATCH INCOMING

Changes:
- New method for Voodoo2 filter (since the previous patch)
- No lines on Voodoo2
- Added new filter for Voodoo2 and kept that separate from Voodoo's filter
- Fixed offset bug on Voodoo1's filter (all columns are now visible and nothing should be pushed off)
- Moved lines before the filtering on Voodoo1 (based on Voodoo3 observation)
- Gamma is back to after the filter for both cards for now

Known bugs:
- Voodoo2 filter seems to makes banding in the darker colors, yet to investigate this (possibly some blending dither table aberration with lightmaps)
- Voodoo2 filter's a little slow and could be faster
- Might be a little unstable? I've seen some games hang on quit but whether it's related to the filter I do not know

Re: 3DFX emulation

Posted: Sat 18 Feb, 2017 10:49 pm
by leilei
I regret not quadruple posting :(

New patch based on current revision. Only changes since the last patch is that I dropped the + 1's on filter line stuff since they're no longer necessary

Re: 3DFX emulation

Posted: Sun 19 Feb, 2017 10:50 pm
by ZoltanTheHun
Thanks Sarah and everyone else who added to this truly amazing emulator.

Let me share my findings about V12 of the emulator.

In Janes F-15, when recompiler activated on VoodooII, I get Z-buffer like issues with skybox and terrain, also mouse cursor is not visible. If I turn off recompiler, there is very minimal issue with runway and ground texture zfighting from certain angles.

Re: 3DFX emulation

Posted: Mon 20 Feb, 2017 3:25 am
by leilei
^ Can reproduce. Used a mid-98 driver and the latest official jan-00 driver.


EDIT: New patch. changes since last:

- an attempt to optimize the V2 filter - it's a single loop now
- an attempt to make filter more stable by not forgetting to add free() on the fil uint8_s

Attached is a comparison picture of the two filters

Re: 3DFX emulation

Posted: Mon 20 Feb, 2017 3:28 pm
by Fusion
How does one go about using your patches? Do they get placed somewhere and compiled with the emulator? And do we need all your patches in order, or just the latest one? Thanks!

Re: 3DFX emulation

Posted: Mon 20 Feb, 2017 4:03 pm
by omarsis81
Fusion wrote:How does one go about using your patches? Do they get placed somewhere and compiled with the emulator? And do we need all your patches in order, or just the latest one? Thanks!
I believe you need to compile the whole program

Re: 3DFX emulation

Posted: Tue 21 Feb, 2017 10:00 am
by leilei
I thought Aliens vs. Predator worked fine on Voodoo2 until I tried the marines campaign and immediately saw issues with alpha modulation which can hinder gameplay

doesn't happen on Voodoo Graphics, and pre-DX7 Voodoo2 drivers (June '99 and earlier). I'll have to drag this over to the real V2 and see if it happens on 3.02.02 there.

Re: 3DFX emulation

Posted: Wed 22 Feb, 2017 9:08 pm
by SarahWalker
Rev 649 brings the filter up to voodoofilter-2017l.patch.

Btw, you don't need to free the fil* arrays - they're allocated on the stack so get freed when they go out of scope.

Re: 3DFX emulation

Posted: Thu 23 Feb, 2017 1:24 am
by leilei
Thanks. At this point I have no idea what to do next with the filter other than finetuning lookup table generation against useful VGA captures that aren't made yet. I tried my best at eyeballing it while adjusting the threshold for differences. I think i'm done with it until the V3 ever comes (not sure how its 2x2 box filter could play with the threaded lines)

Re: 3DFX emulation

Posted: Mon 27 Feb, 2017 9:50 pm
by rakzom
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
PCem v12 - 91% - Award 430VX PCI - Pentium MMX 166 - Press CTRL-END to release mouse 27_02_2017 22_43_51.jpg (69.42 KiB) Viewed 25258 times

Re: 3DFX emulation

Posted: Sat 04 Mar, 2017 6:36 pm
by szadycbr
Hi there, i run across the 3dfx city app. from 1998 and i tryed to run it on win98 IE 5.0 but it wont work cos plugin could not recognize VM version, so i downloaded msvm 2.0 but it did not allow me to install , cos newer ver. was installed. i did install win95 to check that thing and after following the oficial guide it works.
I saw video on YT ,the guy runs it on genue p3 ,there is the vid from the guy on YT https://www.youtube.com/watch?v=eghlSdGvuC0 and link to archive 3dfx page if anyone want to check it out http://web.archive.org/web/199804212245 ... nload.html and for some reason i could not download the 4.9MB msvm from this site so i got it from Microsoft archive http://web.archive.org/web/199904201448 ... javx86.asp

And thats how it looks on PCem , looks kinda same. Can anyone tell me whats happend to blinking HDD "diode" in v12? it was extremally helpfull, how can i get it back? cos now i dont know what the machine is doing, is it thinking? copying? or what? this indicator was very helpfull, how to bring it back?

Re: 3DFX emulation

Posted: Sun 05 Mar, 2017 9:30 am
by SarahWalker
The HDD blinking is currently only implemented in the DirectDraw display code, not Direct3D. I keep meaning to port it but keep forgetting. Maybe for v13?