VOGONS


First post, by PhilsComputerLab

User metadata
Rank l33t++
Rank
l33t++

To calibrate a video capture card to the output of 3D only cards, like a 3dfx Voodoo or Voodoo 2, I'm after a way to display Elinda's calibration images in D3D and/or OpenGL and/or Glide.

Sounds simple, but I don't know of such a tool.

Another idea is swapping out an image file of a game maybe, that uses plain image files as a background or something like that.

YouTube, Facebook, Website

Reply 2 of 45, by PhilsComputerLab

User metadata
Rank l33t++
Rank
l33t++
yawetaG wrote:

Wouldn't the SDK's for D3D/OpenGL/Glide include such tools?

I have no idea. I really need something that is ready to go, and need it rather soon 😊

YouTube, Facebook, Website

Reply 3 of 45, by Scali

User metadata
Rank l33t
Rank
l33t

I don't think there are tools for that. They'd need to be developed.
Not too difficult (just two triangles covering the whole screen with a triangle covering it, taking care of the subpixel/subtexel positioning to make sure you get a proper 1:1 pixel:texel mapping), but someone has to do it.
I have some Direct3D 1.0 code that someone could use if they are interested. I have various other projects going on right now, so I don't know if or when I'd be able to make such a tool myself.

http://scalibq.wordpress.com/just-keeping-it- … ro-programming/

Reply 5 of 45, by Scali

User metadata
Rank l33t
Rank
l33t
leileilol wrote:

The 256x256 splitting of the image has to be done too

Oh yea, good point. I forgot that only 'modern' cards have the luxury of non-pow2 texturing 😀

http://scalibq.wordpress.com/just-keeping-it- … ro-programming/

Reply 6 of 45, by spiroyster

User metadata
Rank Oldbie
Rank
Oldbie

Can you post the image? I can possibly whip up a GL 1.2 (win9x) program to display said image either later or tomorrow (probably tomorrow). twould be a Blast from the past!

Easiest thing to do is convert to PPM (just post the image, I can convert it), since this is text based and can be hardcoded into the program. There is no jpg, png, tga etc support out of the box with GL. So raw uncompressed. Do you just want simple exe to just display the calibration image (maintaining aspect ratio?). If you want full screen, it would require glut (not the end of the world, I just like to keep my code as devoid of 3rd party as possible 😀) as I have never done native windows full screen GL.

And yes, as others have said, best if its dimensions are 2^n (power2 texture), especially if you don't require filtering (only nearest neighbour interpolation) otherwise you may get some artefacts from the texel interpolation. Bilinear or Anisotropic should mitigate this but you might not get detail which is usually required for calibration? Let me know which filtering.

I would be interested to see a Glide equivalence of this code 😀 Can't do D3D for you though I'm afraid.

Reply 7 of 45, by PhilsComputerLab

User metadata
Rank l33t++
Rank
l33t++

That would be awesome, thank you!

Images are attached.

Attachments

  • Filename
    Calibration images.zip
    File size
    17.95 KiB
    Downloads
    135 downloads
    File license
    Fair use/fair dealing exception

YouTube, Facebook, Website

Reply 9 of 45, by leileilol

User metadata
Rank l33t++
Rank
l33t++

It's less about 2D core and more about image quality handled in the 3d core

Scali wrote:
leileilol wrote:

The 256x256 splitting of the image has to be done too

Oh yea, good point. I forgot that only 'modern' cards have the luxury of non-pow2 texturing 😀

and probably texture formats too. To get a 24-bit image on a 3dfx Voodoo would probably involve 3x grayscale per component paletted textures additively blended, appropriately vertex color modulated, but there would probably be still precision loss from the blend and the dithering on the texture mapping unit anyway (which in turn, brings us the entire point of this thread's prospect)

What I usually did was make a special menu page for Q3 Team Arena code 😉 It's OpenGL at that point, but there's dozens of wrappers!

apsosig.png
long live PCem

Reply 10 of 45, by Scali

User metadata
Rank l33t
Rank
l33t
mrau wrote:

d3d? isnt ddraw enough?

Good question. I'm not sure if you would be able to get a non-D3D surface on a VooDoo card, and if so, if that surface is lockable, or if you could otherwise blit 2D images to it. Might be possible.
But leileilol raises an interesting point there... because if the textureformats don't support 24-bit rendering, then the quality of rendering an image via textures would be different than just blitting the pixels 1:1.

http://scalibq.wordpress.com/just-keeping-it- … ro-programming/

Reply 11 of 45, by leileilol

User metadata
Rank l33t++
Rank
l33t++

There's at least one DirectDraw sample app in the DX6 SDK that can render on the Voodoo2 in 2D at least. Forget which though

EDIT: FSWINDOW.EXE. It renders a bouncing ball on a black background in 2d on the card. as well as a typical Windows dialog box.

fswindow.png
Filename
fswindow.png
File size
13.33 KiB
Views
1973 views
File comment
FSWINDOW.EXE on PCem's Voodoo2 emulation
File license
Fair use/fair dealing exception
Last edited by leileilol on 2016-12-22, 19:19. Edited 2 times in total.

apsosig.png
long live PCem

Reply 13 of 45, by spiroyster

User metadata
Rank Oldbie
Rank
Oldbie

Hello, apologies for the delay. xmas occurred o.0

So, that was an interesting experience 😲 , so used to C++14 that I forget how much the language has evolved and there are sooo many trivia things these days that I take for granted. Can't say I miss much of the old days, coding-wise though.

In all my excitement I overlooked one rather key factor, I don't have access to my VS6.0 (Aspen) environment since we have recently moved house and I haven't got around to setting up my retro rig yet. Also, its a P3 SGI workstation, with quite sophisticated GL implementation so I can't test with 'limited' GL hardware (eg. voodoo etc.) 😵 . However the code has no STL, no glut (thanks again Nehe), uses OpenGL 1.1, is Win32 and is (I think) C++98 compliant so hopefully someone else will have access to VS6.0 and can build you a binary (.exe) ??? Anyone ??? since there are feckall dependencies (other than GL and windows).

Sauce:
https://raw.githubusercontent.com/spiroyster/ … aster/ppmgl.cpp

I have included a VS2015 built binary in the repo (ppmgl.exe), but you will need the VC++ Redist for VS2015 which is available for WinXP! but nothing earlier (like 2000, ME, 9x).

It loads PPM Ascii files (P3). I converted your images using gimp:

1) Load in your image to GIMP
2) File->Export As
3) Rename the extension to .ppm
4) Select ASCII from the Export option.

To use:
> ppmgl image.ppm /fullscreen

('/fullscreen' is optional)

Let me know if you get any problems.

Merry Chirstmas and all that jazz 😀

Reply 14 of 45, by PhilsComputerLab

User metadata
Rank l33t++
Rank
l33t++
spiroyster wrote:

But nothing earlier (like 2000, ME, 9x).

Oh dear, I guess I should have mentioned that. These old machines don't run XP, mostly DOS and Windows 98 at best.

YouTube, Facebook, Website

Reply 15 of 45, by xjas

User metadata
Rank l33t
Rank
l33t
mrau wrote:

voodoo2 allegedly can display the desktop in XWindows under linux so it must have some facilities

You can absolutely write pixels directly to the voodoo 1 & 2's framebuffer memory, just like a 2D card. I looked into this for a backburner project I was/am working on but haven't gotten around to writing the code that does it yet.

Look at the Linux sstfb driver for inspiration.

twitch.tv/oldskooljay - playing the obscure, forgotten & weird - most Tuesdays & Thursdays @ 6:30 PM PDT. Bonus streams elsewhen!

Reply 16 of 45, by spiroyster

User metadata
Rank Oldbie
Rank
Oldbie
PhilsComputerLab wrote:
spiroyster wrote:

But nothing earlier (like 2000, ME, 9x).

Oh dear, I guess I should have mentioned that. These old machines don't run XP, mostly DOS and Windows 98 at best.

As in, the vs2015 compiled binary in the repo required vs2015 redist so will not work pre xp, however if you compile that code with vs6.0, it will work on all windows but no dos 😀. Cannot test though, but is written with old syntax, come the new year I will fire up the old beast and can built you an exe for win95. 0.o

Reply 17 of 45, by PhilsComputerLab

User metadata
Rank l33t++
Rank
l33t++

Windows 9x would be perfect! Voodoo and Voodoo 2 work great with that version. I'm in no rush, and thank you for helping!

YouTube, Facebook, Website

Reply 18 of 45, by DOSfan1994

User metadata
Rank Member
Rank
Member
leileilol wrote:

There's at least one DirectDraw sample app in the DX6 SDK that can render on the Voodoo2 in 2D at least. Forget which though

EDIT: FSWINDOW.EXE. It renders a bouncing ball on a black background in 2d on the card. as well as a typical Windows dialog box.

fswindow.png

Voodoo 2 does not do 2D nor have a 2D core.

Reply 19 of 45, by spiroyster

User metadata
Rank Oldbie
Rank
Oldbie
PhilsComputerLab wrote:

Windows 9x would be perfect! Voodoo and Voodoo 2 work great with that version. I'm in no rush, and thank you for helping!

Have updated, included now is a compiled executable which should work. I'm hoping anyway. (win9x)+
https://github.com/spiroyster/ppmgl/raw/master/ppmgl.exe

Also ppm versions of your calibration images can be found ...
https://github.com/spiroyster/ppmgl