I'm trying to compile 3dfx's "Board Manufacturing Diagnostic" software from source code included in the 3dfx_source_code.rar release. This is for testing memory access across multiple onboard VSA-100 chips as well as over SLI. While there were no official VSA-100 SLI boards made publicly, this functionality was tested by 3dfx internally using this tool and may be used to reproduce this functionality using custom boards.
I've managed to get portions of this tool to compile but there appears to be missing source code. For example, the tool used to be able to run under Windows (probably 9x) but this source code is missing. It should be able to compile for DOS but this results in a number of compile errors due to missing files. There are identically named files elsewhere in the source tree but there are several different versions and all of them produce linker errors.
Is there anyone familiar with this source tree or possibly someone who I can get in touch with to get it building properly? Are there any other source code releases available which may provide the missing files?
Can you be a bit more specific what you're having trouble with?
Most likely the files aren't really missing, it's just that the build system can't find it. If you're trying to do this under Linux, try changing the file names to lower case and fixing the paths.
Also any extra CR and EOF characters need to be removed.
In this case there are actual missing files. For example, some are referenced in the makefile but do not exist anywhere in the directory tree. In other instances the file exist but they are either the wrong version (multiple versions exist in the same tree) or include other files unrelated to the diagnostics tool which create additional linker errors.
What I'm looking for are other source trees which may contain the missing code. Was the source code ever released for device drivers?
I managed to get a subset of it built but it's not working correctly for me. The documentation suggests that it is meant to be used with a VSA-100 card but I only have the Voodoo Banshee, 2, and 3.
Another unknown factor is whether or not this tool is capable of working with AGP cards so if you test this please mention whether you used AGP or PCI. The full mdc.exe tool is supposed to support AGP with the /agp switch but this is not that. This is instead a subset of the tool which compiles to ediag.exe and is what 3dfx modified or merged into the full mdc.exe diagnostics software.
I've attached the sample tool if someone with a Voodoo 4 or 5 can test this for me. The syntax to query the card is:
1dos4gw ediag.exe -info
In my case the screen blanks and returns to the command prompt with no output. I would appreciate it if I could have some help testing this since I don't have the correct hardware.
Anyway, the takeaway seems to be that the calling conventions are all over the place in that code.
Some of the libraries are using register-based and some stack-based cc, and the final linking stage tries to use both.
I don't know if that is even possible to do?
The symbols that are listed as "undefined reference" are in fact included in the libraries, but their calling convention doesn't match.
Which means the names don't exactly match either:
If the symbol name starts or ends with an underscore that means the cc is register-based, otherwise it's stack-based.
(see Watcom User's guide / cguide.pdf for further info)
The makefiles seem to be consistent in using stack-based cc (the compiler flag -5s), so you'll need the library files to match that.
Hi, if someone continues this, I manage to built it, wont post it just yet, cus Im not sure if it works, but I can add some tips if anyone else in the future wants to give it a go. While I still have it fresh in my head.
I used a winXp virtual machine, so could also cause some problems.. But will see when I get some comfirmation.
First, if you need to edit headers or make code changes, you are doing something wrong (what I learned after many hours 🙁 ), keep that in mind, before you go ham on code changing.
Tools
It builds all the libs needed, sets enviroment variables, then it continues to the actual .exe build.
For libs you needz
- msvc 1.52 (for 16bit), 4.2 and/or 6.0
- dxsdk, It uses dx7, I used dx9 (same shit)
- dx7ddk
- masm 6.14
- ddk9x, I used win98se ddk (3dfx had win95ddk noted in the files)
- win32sdk
- Watcom 10.6
Some explanation
The way 3dfx setup their build .bats is like this, from root 3dfx_sources folder
BuildDiags.bat (start, makes some folders, builds all the libs)
- q3ddiagsenv.cmd
- tools.bat
- setdosenv.bat
- build.bat (in diags\mftg, actual run build for the program)
I put everything in one nd.bat file that is attached to this post, use that for help. Put in root sources folder.
The paths I use are mostly c:\devtools\ where I install tools, and c:\work\3dfx ... My sources root folder.
Most libs will be in 3dfx\swlibs. When prepared they will be copied to 3dfx\H5 and eventually to 3dfx\H5\DIAGS\MFTG\3dfx\lib and ofc include
(you can remove tests from makefile-s (one in glide, one in glide3), this will build those Test01.exe - Textxx.exe, that are already built elsewhere in the 3dfx sources, \3dfx_sources\3Dfx\Sdk\Glide2x\Bin)
Prep and build
First thing you do, remove "read only" from every file in 3dfx_sources.
Build procedure, first prepares all the files needed, libraris and thats the main thing to get right.
You have to correct lots of make-files. Search and open all in h5 and swlibs subfolder.
Your main pathing will be (my paths)
%BUILD_ROOT% ... %BUILD_DRIVE%\Work\3dfx
%BUILD_ROOT_SWLIBS% ... %BUILD_ROOT%\swlibs
%FX_GLIDE_HW% ... H5
Why I mention this?
This is what you do to make-files.
Change "/" to "\" for every stuff where it represents a path. Yes a lot of this, but its gonna save you a lot of problems going forward.
Also check pathing, some stuff will be hardcoded in some makefiles like "d:/3dfx/devel/h5"... You will also need to correct this, adapt to your paths.
Theres also some h3/h5 (remember you only have h5!) and some old sst1 pathing, again change to what you have.
If you do these 2 simple steps, doctor will hate you... your build should be sucessfull up to "--note here---" where I listed librarys.
For glide, I think I changed smthing wrong, and some stuff from glide3 folder gets copied to h5\includes, but should be from glide(no number) folder. I just replaced some headers
from 3dfx\H5\GLIDE\SRC to 3dfx\H5\INCLUDE (make a copy if you do this).
-- Up to here, you have all libs and related files built, and only the program build is left.
This will leave you with only one error, and a couple of warnings(that as a veteran developer, you ignore).
The error is related to glideSplashScreen.
Open \3dfx\H5\DIAGS\MFTG\CORE\LM_GLDE.C, find and removecomment everything to do with the splash "grSplash", in 3 places.
Thats it, mdc.exe will pop out. Does it work? Dont know!
But its atleast something to get you started. If "mine" works, Ill add another post.