Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
Shaswata Das 5c6fe3db62
Create README.md
4 years ago
..
i386 commiting as it is 4 years ago
atest.mas commiting as it is 4 years ago
atest_mh.mh commiting as it is 4 years ago
beadtbl.mcp commiting as it is 4 years ago
bldfuncs.h commiting as it is 4 years ago
bldfuncs.mas commiting as it is 4 years ago
bufread.h commiting as it is 4 years ago
bufread.mas commiting as it is 4 years ago
bufwrite.h commiting as it is 4 years ago
bufwrite.mas commiting as it is 4 years ago
bufwrite.mh commiting as it is 4 years ago
clrbd_mh.mh commiting as it is 4 years ago
clrgn_mh.mh commiting as it is 4 years ago
colorbld.mas commiting as it is 4 years ago
colorgen.mas commiting as it is 4 years ago
colorgen.mh commiting as it is 4 years ago
cvars.mh commiting as it is 4 years ago
i386src.inc commiting as it is 4 years ago
iammx.inc commiting as it is 4 years ago
loop.h commiting as it is 4 years ago
makefile commiting as it is 4 years ago
makefile.inc commiting as it is 4 years ago
ml1.mas commiting as it is 4 years ago
ml2.mas commiting as it is 4 years ago
ml3.mas commiting as it is 4 years ago
ml4.mas commiting as it is 4 years ago
ml5.mas commiting as it is 4 years ago
ml6.mas commiting as it is 4 years ago
ml7.mas commiting as it is 4 years ago
ml8.mas commiting as it is 4 years ago
ml9.mas commiting as it is 4 years ago
ml10.mas commiting as it is 4 years ago
ml11.mas commiting as it is 4 years ago
ml12.mas commiting as it is 4 years ago
ml13.mas commiting as it is 4 years ago
ml14.mas commiting as it is 4 years ago
ml15.mas commiting as it is 4 years ago
ml16.mas commiting as it is 4 years ago
ml17.mas commiting as it is 4 years ago
ml18.mas commiting as it is 4 years ago
ml19.mas commiting as it is 4 years ago
ml20.mas commiting as it is 4 years ago
ml21.mas commiting as it is 4 years ago
ml22.mas commiting as it is 4 years ago
ml23.mas commiting as it is 4 years ago
ml24.mas commiting as it is 4 years ago
ml25.mas commiting as it is 4 years ago
ml26.mas commiting as it is 4 years ago
ml27.mas commiting as it is 4 years ago
ml28.mas commiting as it is 4 years ago
monolith.txt commiting as it is 4 years ago
nommxsrc.inc commiting as it is 4 years ago
offs_acp.acp commiting as it is 4 years ago
readme.txt commiting as it is 4 years ago
sources commiting as it is 4 years ago
spanpars.h commiting as it is 4 years ago
spanpars.mas commiting as it is 4 years ago
spanutil.cpp commiting as it is 4 years ago
spanutil.h commiting as it is 4 years ago
stp_base.h commiting as it is 4 years ago
test.mas commiting as it is 4 years ago
test.mh commiting as it is 4 years ago
test_mh.mh commiting as it is 4 years ago
tex1a_mh.mh commiting as it is 4 years ago
tex1addr.mas commiting as it is 4 years ago
tex1addr.mh commiting as it is 4 years ago
tex2a_mh.mh commiting as it is 4 years ago
tex2addr.mas commiting as it is 4 years ago
texa_mh.mh commiting as it is 4 years ago
texaddr.mas commiting as it is 4 years ago
texaddra.mh commiting as it is 4 years ago
texbd_mh.mh commiting as it is 4 years ago
texblend.mas commiting as it is 4 years ago
texblend.mh commiting as it is 4 years ago
texrd_mh.mh commiting as it is 4 years ago
texread.mas commiting as it is 4 years ago
texread.mh commiting as it is 4 years ago
tstf_mh.mh commiting as it is 4 years ago
tstfail.mas commiting as it is 4 years ago
tstfail.mh commiting as it is 4 years ago

readme.txt

Status of general MMX span routines.


09/08/97 Checked in MMX code.
There is no way that the current code will compile and run. I haven't
even tried to compile it. This is primarily to have it backed up and
to let anyone that is interested see what has been done.
The orginal C (or MCP) code are comments of these ASM or MAS files.

The ACP directory contains a program that generates the .INC file
for offsets to all the data. This program was used by Drew and
seems to work better than H2INC. We should probably only have one
of these that would go in the inc directory, but it's not done that
way now (Plus, my code doesn't generate it based on a makefile.

Three regular registers have been set aside for use to access the data.
Since these are passed to every routine, I don't have to pass anything
on the stack as long as I don't modify them. I have modified them a
couple of times before I added this and they need to be changed to esi,
edi, ebp or eax (eax is usually used for the next indirect jump).

ebx is a pointer to the D3DI_SPANITER data (Also Accesses the SI stuff
inside it).
ecx is a pointer to the D3DI_RASTPRIM data.
edx is a pointer to tge D3DI_RASTSPAN data.

There are a few very useful m4 macros to acess this data in
readable way (It also made converting C code easier):

define(`XpCtxSI',`[ebx+D3DI_SPANITER_$1]')dnl
define(`XpCtx',`[ebx+D3DI_RASTCTX_$1]')dnl
define(`XpP', `[ecx+D3DI_RASTPRIM_$1]')dnl
define(`XpS', `[edx+D3DI_RASTSPAN_$1]')dnl

Things that need to be done.
1) New Special W divide. MMX newton's method code has already
been written, but it was very specialized (I negated the
OoW and OoWDX so that 2 - Oow*iW could be done with a pmadd
and a few other things.) Code shouldn't have to change much.

2) Assembly equivalents to the ACMP, ZCMP macros. A version of
these has also been written, but most compares were done in
a reverse order (to preserve registers). The MMX Alpha and
Z setup will most likely have to be different. This means
that the atest.asm has not been coded. A test.mas file is
written, and is missing ZCMP16 and ZCMP32. The other 4
specific code cases are done exactly like the C version
except the iXorMask always seems to be inverted do to how
the comparison is done.

3) BufWrite is not implemented. The code for doing this has
been done in APP notes. The 16 bit cases use a pmaddw
to combine the colors more quickly than shifting. There
is also work beening done on a quick dithering routine.
The MMX dithering routine will use a pcmpgtw to compare
with the dither table and the do a psubssw since if the
color value is to be incremented, then the mask will be
all ones (= -1). Subtracting it will increment the color.
The saturation is used to not increase too much. The
only problem to this is that the color is unsigned so
it has to be shifted down by one to saturate to 7fff.

4) BuffRead is not done. It uses almost identical routines
as those in texread.


5) Lots of clean up and 64 bit constants that need to be in
memory. I have to figure out what registers get passed
to routines that are called and what is passed back.
In some cases, it may be possible to pass data from one
bead to the next using registers. This maybe difficult
though.

6) ColorBld conversion. Mostly ROP stuff and calling of
bldfuncs.asm. ROP stuff should be pretty easy.

7) Since function names are the same, if I made a header
file declaring them extern "C" { }, the assembly code
could concievably execute in place of the current c code.
This is where the true bomb test is.

8) There's probably more, but there is always more.