dgVoodoo 1.40plus source
------------------------

0. License
----------

I release this source under GNU LESSER GENERAL PUBLIC LICENSE
 Version 2.1.
To complete the reqirements, I inserted a short description along with the license text into each
source file.



1. Some thoughts
----------------

Well, when Stiletto decided to collect all available graphics wrappers, with all of their related stuffs, into a
big package, I thought of it as making a wrapper museum. A museum? Yes, because most of the wrappers are not supposed
to work on recent modern systems, including dgVoodoo 1.x. He asked if I had any dgVoodoo source stuff to include, and
I thought, after all, why not to release dgVoodoo source. It all is old, aged, outdated and abandoned. No one will
utilize anything from it because nowadays no one is programming Win9x kernel, 32 bit protected mode DOS, etcetera.
No one is supposed to utilize anything from the Glide graphics wrapping part because it is relying on legacy technology,
fixed function pipeline, very simple shaders, and so on. There are better implementations for some time past.

If this stuff is useful for somebody after all, then I'm glad to be helpful. :)



2. About the source
-------------------

At first, the most important: it is a total mess. Or, almost...
I was a big assembly-nerd, I wrote all of my codes in assembly in the DOS era. I couldn't even code in C.
I used some Pascal in the school but always laughed at the generated code, it's size and performance...
Size and speed was over all for me, back then (plz don't misunderstand).
That is why there are a lot of assembly code and some of them are really ancient, ported from DOS.

This version of dgVoodoo was coded in C, not in C++. Keep this in mind when seeing DirectX7 calls made in C
or even in *cough* assembly...


And, sorry about the comments. As far as I remember, later I partly englishized them but not entirely.
(Once I'm speaking about languages: did you know that the language closest now to hungarian is english?
 Even if you are rolling on the floor laughing when reading this. It was not clear but only suspicious (and funny)
 to me for a long time until did not read a book of a philologist on the subject.
 But nothing surprising, since all languages in Europe originate in the same common ancient language and took
 their own changing and evolution in different ways.)


Used tools:

- MASM                         (needed for the Win9x virtual device driver, dgVoodoo.vxd)

- Visual Studio 6.0            (for glide.dll, glide2x.dll, dgVoodoo.exe, dgVoodooSetup.exe)
- Various versions of TASM     (it was my favourite assembler, RIP :) needed for general asm code in connection
                                with MSVC, and for real mode DOS code like dgVesa.com)

- Watcom C++
- Watcom Assembler             (glide2x.ovl)

These tools are not included here, of course. Unfortunately there is no any common script for building.
I used MSVC and local batch files "manually" for each module.
Sadly, you can't compile it with VS newer than 6.0 (maybe 2003 does it), because assembly parts compile with
TASM. TASM generates the old Intel-format object files while post-6.0 VS linker accepts only the new
COFF-objects.


Important: when looking at the code, its awful style and some aged programming techniques, keep in mind
that it is not me. I mean, it is an earlier version of me, Dege 1.x. I was kid when wrote it. :)
If I had to rewrite dgVoodoo I would do it in a different way (as I did with 2.x) even if I had to use the
same DX7/DX9 technological level.


Are you sure you want to see it? :)


(If you find the quantity of the assembly pretty large, keep in mind that this version run fast even on a
Pentium2 with a RivaTnT2 graphic card. Since bitmap conversion, colorkeying and so on could nowhere and near
be solved on the GPU back then, it had to be done on the cpu with fast code that could not be written in C.
I still maintain this claim, I still use assembly for fast, time critical codes using SIMD, vectorized SSE
instructions with instruction pairing. The only difference now is that I use assembly for things that really
need that, all other is done in C++.)



3. Update
---------

This source is only for view. Cannot be compiled with moder tools:

- VxD files cannot be created with VS linker newer than VS2003
- Some of the assemblies should be ported to MASM

I attempted to make a solution to be able to build the dlls and the setup but without success.


Dege