hitch (the MASMED man) just sent me this really great demo of DirectDraw that works in win95b on DX7 in MASM32 for the example code but I did not want to hold it without it being shared around so I thought it better to post it now.

Regards,

hutch@movsd.com
Posted on 2002-09-20 01:07:03 by hutch--
Cool, I'm trying to figure out DX7 support right now. (Just what type is REFIID?)
Posted on 2002-09-20 03:16:31 by ThoughtCriminal
That's great....

Works fine on WinXP too......
Posted on 2002-09-20 03:37:11 by Fordy
fine on NT4SP6 too ... great example !!

cya
TBD
Posted on 2002-09-20 04:36:49 by TBD
I for the life of me can not get this to assemble:



h:\includes\DDrawConst.inc(106) : error A2163: non-benign structure redefinition
: incorrect initializers : DDPIXELFORMAT
h:\includes\DDrawConst.inc(112) : error A2163: non-benign structure redefinition
: incorrect initializers : DDPIXELFORMAT
h:\includes\DDrawConst.inc(120) : error A2163: non-benign structure redefinition
: incorrect initializers : DDPIXELFORMAT
h:\includes\DDrawConst.inc(124) : error A2163: non-benign structure redefinition
: incorrect initializers : DDPIXELFORMAT
h:\includes\DDrawConst.inc(127) : error A2163: non-benign structure redefinition
: incorrect initializers : DDPIXELFORMAT
h:\includes\DDrawConst.inc(137) : error A2163: non-benign structure redefinition
: incorrect initializers : DDSURFACEDESC
h:\includes\DDrawConst.inc(141) : error A2163: non-benign structure redefinition
: incorrect initializers : DDSURFACEDESC
h:\includes\DDrawConst.inc(142) : error A2163: non-benign structure redefinition
: incorrect initializers : DDSURFACEDESC
h:\includes\DDrawConst.inc(143) : error A2163: non-benign structure redefinition
: incorrect initializers : DDSURFACEDESC
h:\includes\DDrawConst.inc(144) : error A2163: non-benign structure redefinition
: incorrect initializers : DDSURFACEDESC
h:\includes\DDrawConst.inc(145) : error A2163: non-benign structure redefinition
: incorrect initializers : DDSURFACEDESC
h:\includes\DDrawConst.inc(146) : error A2163: non-benign structure redefinition
: incorrect initializers : DDSURFACEDESC
h:\includes\DDrawConst.inc(147) : error A2163: non-benign structure redefinition
: incorrect initializers : DDSURFACEDESC
h:\includes\DDrawConst.inc(148) : error A2163: non-benign structure redefinition
: incorrect initializers : DDSURFACEDESC
h:\includes\DDrawConst.inc(149) : error A2163: non-benign structure redefinition
: incorrect initializers : DDSURFACEDESC
h:\includes\DDrawConst.inc(197) : error A2163: non-benign structure redefinition
: incorrect initializers : DDBLTFX
h:\includes\DDrawConst.inc(200) : error A2163: non-benign structure redefinition
: incorrect initializers : DDBLTFX
h:\includes\DDrawConst.inc(202) : error A2163: non-benign structure redefinition
: incorrect initializers : DDBLTFX
h:\includes\DDrawConst.inc(206) : error A2163: non-benign structure redefinition
: incorrect initializers : DDBLTFX
h:\includes\DDrawConst.inc(207) : error A2163: non-benign structure redefinition
: incorrect initializers : DDBLTFX
h:\includes\DDrawConst.inc(208) : error A2163: non-benign structure redefinition
: incorrect initializers : DDBLTFX
h:\includes\DDrawConst.inc(210) : error A2163: non-benign structure redefinition
: incorrect initializers : DDBLTFX
h:\includes\DDrawConst.inc(213) : error A2163: non-benign structure redefinition
: incorrect initializers : DDBLTFX
h:\includes\DDrawConst.inc(215) : error A2163: non-benign structure redefinition
: incorrect initializers : DDBLTFX
h:\includes\DDrawConst.inc(223) : error A2163: non-benign structure redefinition
: incorrect initializers : DDBLTFX
h:\includes\DDrawConst.inc(224) : error A2163: non-benign structure redefinition
: incorrect initializers : DDBLTFX
h:\includes\DDrawConst.inc(225) : error A2163: non-benign structure redefinition
: incorrect initializers : DDBLTFX
h:\includes\DDrawConst.inc(290) : error A2161: non-benign structure redefinition
: too few labels : IDirectDrawSurfaceVtbl
h:\includes\Animate.asm(274) : error A2006: undefined symbol : SLock
DDSINVOKE(6): Macro Called From
h:\includes\Animate.asm(274): Include File
h:\includes\Animate.asm(278) : error A2006: undefined symbol : SLock
DDSINVOKE(6): Macro Called From
h:\includes\Animate.asm(278): Include File
h:\includes\DDrawExeInit.asm(4) : error A2006: undefined symbol : SLock
DDSINVOKE(6): Macro Called From
h:\includes\DDrawExeInit.asm(4): Include File
h:\includes\DDrawExeInit.asm(145) : error A2006: undefined symbol : SLock
DDSINVOKE(6): Macro Called From
h:\includes\DDrawExeInit.asm(145): Include File


I've reworked all the paths so no file are missing and I'm using the same assembly lines:



e:\masm32\bin\ml.exe /c /coff h:\DirectDraw.asm
e:\masm32\bin\link.exe /SUBSYSTEM:WINDOWS h:\DirectDraw.obj


Any ideas?? Heres where the errors are:(some of them)



DDPIXELFORMAT STRUC
dwSize DWORD ?
dwFlags DWORD ?
dwFourCC DWORD ?
UNION
dwRGBBitCount DWORD ? ;<here is the first error line106
dwYUVBitCount DWORD ?
dwZBufferBitDepth DWORD ?
dwAlphaBitDepth DWORD ?
ENDS
UNION
dwRBitMask DWORD ? ;<-then here
dwYBitMask DWORD ?
ENDS
UNION
dwGBitMask DWORD ?
dwUBitMask DWORD ?
ENDS
UNION
dwBBitMask DWORD ? ;<-then here
dwVBitMask DWORD ?
ENDS
UNION
dwRGBAlphaBitMask DWORD ? ;<-then here
dwYUVAlphaBitMask DWORD ?
ENDS
DDPIXELFORMAT ENDS ;<-the last is here

Thats the errors for DDPIXELFORMAT, if the fix can be found, everything should work.

Thanks.
Posted on 2002-09-20 08:04:25 by ThoughtCriminal
Still have not figured this out.

I unzipped it into the MASM32 folder, but I still get errors?
I have made no changes, not even to the paths.
I have gone back to the ml.exe that comes with MASM32
I get a different error in addition to the ones I already get:


includes\DDrawConst.inc(105) : error A2187: must use floating-point initializer
includes\DDrawConst.inc(109) : error A2187: must use floating-point initializer
includes\DDrawConst.inc(111) : error A2187: must use floating-point initializer
includes\DDrawConst.inc(113) : error A2187: must use floating-point initializer
includes\DDrawConst.inc(115) : error A2187: must use floating-point initializer
.
.

Before the, with the newer version of ML, the first error was on line 106.


DDPIXELFORMAT STRUC
dwSize DWORD ?
dwFlags DWORD ?
dwFourCC DWORD ?
UNION <-----------------------------------------here is line 105 in the source
dwRGBBitCount DWORD ?
dwYUVBitCount DWORD ?
dwZBufferBitDepth DWORD ?
dwAlphaBitDepth DWORD ?
ENDS
.
.
.



Again, I have made no changes to the source of this latest attempt.

Thanks.


Heres the error code:
must use floating point initializer

ML Nonfatal Error A2187
A variable declared with the REAL4, REAL8, and REAL10 directives must be initialized with a floating-point number or a question mark (?).
Posted on 2002-09-20 11:12:06 by ThoughtCriminal
Ahhhh frick, just figued is out. I had backedup the ddraw.inc that comes with MASM32 for the ddraw.inc that the macros were borrowed from.

So It works fine on W2K sp2. ('cept for the video lines being all messed up)(I just played UT2003beta, so maybe that could be it. Well, I'm happy that I can compile it. Now I can have fun rebooting and debugging it if it still does not work right :alright:









hrmmmm seems I must add window mode support first.....
Posted on 2002-09-20 11:22:19 by ThoughtCriminal
There must be something wrong with my Radeon Card drivers, this demo just won't display properly. Anyone have any ideas.
Posted on 2002-09-20 12:15:52 by Eóin
I think you have the same problem as me, but I use Geforce. I'm dling the latest drivers.

It looks like an alignment or pointer error.
Posted on 2002-09-20 13:47:18 by ThoughtCriminal
Thats it, I had the same problem with gges (is that his name?) latest demo when noone else did. His previous demos worked perfectly though when many other were having problems, very strange.
Posted on 2002-09-20 21:59:30 by Eóin
hutch,

Unexpected this is.
Never thought u would release it so soon :)

For all directdraw freaks, i've included 10 examples in the lastest masmed preview (self-promoting).

If they doesn't work on lastest gfx monsters, well... too bad i'm not using a recent graphic card anyway (s3 virge is my flavour).

Cheers,

H.
Posted on 2002-09-25 04:17:42 by hitchhikr
And where is that sexy,tiny,dirty OpenGHell i sent to u mon ?

H.
Posted on 2002-09-25 05:11:33 by hitchhikr
Hi again,

For the interested ones,
i've tested my dd examples on:

S3 Virge DX/GX:
Ford prefect! (developped on)

Intel 82810:
Obtained 16 bits surface have different format
(maybe it is automagically switched to 24/32 bits or something coz screen is packed 1:2)

Matrox Mystique:
Trashy colors on 16 bits surfaces (no red).

Nvidia riva tnt2:
Trashy colors on 16 bits surfaces (no red).

Sis 6326:
Trashy colors on 16 bits surfaces (no red).

S3 Trio 64V2:
Trashy colors on 16 bits surfaces (no red).

Sis 5598:
Trashy colors on 16 bits surfaces (no red).

8 bits surfaces are working perfectly on these cards.


Cheers,

hitchhikr.
Posted on 2002-09-26 18:40:48 by hitchhikr