diff --git a/Include/3DFX.H b/Include/3DFX.H new file mode 100644 index 0000000..ad99306 --- /dev/null +++ b/Include/3DFX.H @@ -0,0 +1,118 @@ +/* +** Copyright (c) 1995, 3Dfx Interactive, Inc. +** All Rights Reserved. +** +** This is UNPUBLISHED PROPRIETARY SOURCE CODE of 3Dfx Interactive, Inc.; +** the contents of this file may not be disclosed to third parties, copied or +** duplicated in any form, in whole or in part, without the prior written +** permission of 3Dfx Interactive, Inc. +** +** RESTRICTED RIGHTS LEGEND: +** Use, duplication or disclosure by the Government is subject to restrictions +** as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data +** and Computer Software clause at DFARS 252.227-7013, and/or in similar or +** successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished - +** rights reserved under the Copyright Laws of the United States. +** +** $Revision: 9 $ +** $Date: 12/23/97 9:57a $ +*/ +#ifndef __3DFX_H__ +#define __3DFX_H__ + +/* +** basic data types +*/ +typedef unsigned char FxU8; +typedef signed char FxI8; +typedef unsigned short FxU16; +typedef signed short FxI16; +typedef signed long FxI32; +typedef unsigned long FxU32; +typedef int FxBool; +typedef float FxFloat; +typedef double FxDouble; + +/* +** color types +*/ +typedef unsigned long FxColor_t; +typedef struct { float r, g, b, a; } FxColor4; + +/* +** fundamental types +*/ +#define FXTRUE 1 +#define FXFALSE 0 + +/* +** helper macros +*/ +#define FXUNUSED( a ) ((void)(a)) +#define FXBIT( i ) ( 1L << (i) ) + +/* +** export macros +*/ + +#if defined(__MSC__) +# if defined (MSVC16) +# define FX_ENTRY +# define FX_CALL +# else +# define FX_ENTRY extern +# define FX_CALL __stdcall +# endif +#elif defined(__WATCOMC__) +# define FX_ENTRY extern +# define FX_CALL __stdcall +#elif defined (__IBMC__) || defined (__IBMCPP__) + /* IBM Visual Age C/C++: */ +# define FX_ENTRY extern +# define FX_CALL __stdcall +#elif defined(__DJGPP__) +# define FX_ENTRY extern +# define FX_CALL +#elif defined(__unix__) +# define FX_ENTRY extern +# define FX_CALL +#elif defined(__MWERKS__) +# if macintosh +# define FX_ENTRY extern +# define FX_CALL +# else /* !macintosh */ +# error "Unknown MetroWerks target platform" +# endif /* !macintosh */ +#else +# warning define FX_ENTRY & FX_CALL for your compiler +# define FX_ENTRY extern +# define FX_CALL +#endif + +/* +** x86 compiler specific stuff +*/ +#if defined(__BORLANDC_) +# define REALMODE + +# define REGW( a, b ) ((a).x.b) +# define REGB( a, b ) ((a).h.b) +# define INT86( a, b, c ) int86(a,b,c) +# define INT86X( a, b, c, d ) int86x(a,b,c,d) + +# define RM_SEG( a ) FP_SEG( a ) +# define RM_OFF( a ) FP_OFF( a ) +#elif defined(__WATCOMC__) +# undef FP_SEG +# undef FP_OFF + +# define REGW( a, b ) ((a).w.b) +# define REGB( a, b ) ((a).h.b) +# define INT86( a, b, c ) int386(a,b,c) +# define INT86X( a, b, c, d ) int386x(a,b,c,d) + +# define RM_SEG( a ) ( ( ( ( FxU32 ) (a) ) & 0x000F0000 ) >> 4 ) +# define RM_OFF( a ) ( ( FxU16 ) (a) ) +#endif + +#endif /* !__3DFX_H__ */ diff --git a/Include/FXDLL.H b/Include/FXDLL.H new file mode 100644 index 0000000..ebe424d --- /dev/null +++ b/Include/FXDLL.H @@ -0,0 +1,125 @@ +/* +** Copyright (c) 1995, 1996, 3Dfx Interactive, Inc. +** All Rights Reserved. +** +** This is UNPUBLISHED PROPRIETARY SOURCE CODE of 3Dfx Interactive, Inc.; +** the contents of this file may not be disclosed to third parties, copied or +** duplicated in any form, in whole or in part, without the prior written +** permission of 3Dfx Interactive, Inc. +** +** RESTRICTED RIGHTS LEGEND: +** Use, duplication or disclosure by the Government is subject to restrictions +** as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data +** and Computer Software clause at DFARS 252.227-7013, and/or in similar or +** successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished - +** rights reserved under the Copyright Laws of the United States. +** +** $Revision: 9 $ +** $Date: 7/24/98 1:37p $ +*/ +/* preprocessor defines for libraries to support DLL creation */ + +/* in header file, use FX_ENTRY return-type FX_CALL function-name ( ... ) */ +/* in source file, use FX_EXPORT return-type FX_CSTYLE function-name (... ) */ + +/* in source file, set FX_DLL_DEFINITION, include this file, then include + header file for library. */ + +/* we need to use two macros per declaration/definition because MSVC + requires __stdcall and __declspec( dllexport ) be in different parts + of the prototype! */ + +/* I use two sets in case we need to control declarations and definitions + differently. If it turns out we don't, it should be easy to do a search + and replace to eliminate one set */ + +/* NOTE: this header file may be included more than once, and FX_DLL_DEFINITION + may have changed, so we do not protect this with an #fndef __FXDLL_H__ + statement like we normally would. */ + + +#ifdef FX_ENTRY +#undef FX_ENTRY +#endif + +#ifdef FX_CALL +#undef FX_CALL +#endif + +#ifdef FX_EXPORT +#undef FX_EXPORT +#endif + +#ifdef FX_CSTYLE +#undef FX_CSTYLE +#endif + +#if defined(FX_DLL_DEFINITION) + #if defined(FX_DLL_ENABLE) + #if defined(__MSC__) + #ifndef KERNEL + #define FX_ENTRY __declspec( dllexport ) + #define FX_EXPORT __declspec( dllexport ) + #else + #define FX_ENTRY + #define FX_EXPORT + #endif /* #ifndef KERNEL */ + #define FX_CALL __stdcall + #define FX_CSTYLE __stdcall + + #elif defined(__WATCOMC__) + #define FX_ENTRY + #define FX_CALL __stdcall __export + + #define FX_EXPORT + #define FX_CSTYLE __stdcall __export + + #else /* compiler */ + #error define FX_ENTRY,FX_CALL & FX_EXPORT,FX_CSTYLE for your compiler + #endif /* compiler */ + + #else /* FX_DLL_ENABLE */ + #define FX_ENTRY + #define FX_CALL __stdcall + + #define FX_EXPORT + #define FX_CSTYLE __stdcall + #endif /* FX_DLL_ENABLE */ + +#else /* FX_DLL_DEFINITION */ + #define FX_ENTRY extern + #define FX_CALL __stdcall +#endif /* FX_DLL_DEFINITION */ + +/* + * We don't want any of this DLL junk for DJGPP or UNIX + * so undo what is done above. + */ +#if defined(__DJGPP__) || defined(__unix__) + #ifdef FX_CALL + #undef FX_CALL + #endif + + #ifdef FX_CSTYLE + #undef FX_CSTYLE + #endif + + #ifdef FX_EXPORT + #undef FX_EXPORT + #endif + + #ifdef FX_ENTRY + #undef FX_ENTRY + #endif + + #define FX_CALL + #define FX_CSTYLE + #define FX_EXPORT + #define FX_ENTRY +#endif + +#if defined (MSVC16) + #undef FX_CALL + #define FX_CALL +#endif + diff --git a/Include/FXGLOB.H b/Include/FXGLOB.H new file mode 100644 index 0000000..ac22982 --- /dev/null +++ b/Include/FXGLOB.H @@ -0,0 +1,30 @@ +/* +** Copyright (c) 1995, 3Dfx Interactive, Inc. +** All Rights Reserved. +** +** This is UNPUBLISHED PROPRIETARY SOURCE CODE of 3Dfx Interactive, Inc.; +** the contents of this file may not be disclosed to third parties, copied or +** duplicated in any form, in whole or in part, without the prior written +** permission of 3Dfx Interactive, Inc. +** +** RESTRICTED RIGHTS LEGEND: +** Use, duplication or disclosure by the Government is subject to restrictions +** as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data +** and Computer Software clause at DFARS 252.227-7013, and/or in similar or +** successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished - +** rights reserved under the Copyright Laws of the United States. +** +** $ Revision: $ +** $ Date: $ +** +*/ + + +#ifndef _FXGLOB_H_ +#define _FXGLOB_H_ + + +void fxGlobify( int *argc, char ***argv ); + + +#endif diff --git a/Include/FXOS.H b/Include/FXOS.H new file mode 100644 index 0000000..a19c0fb --- /dev/null +++ b/Include/FXOS.H @@ -0,0 +1,50 @@ +/* +** Copyright (c) 1995, 3Dfx Interactive, Inc. +** All Rights Reserved. +** +** This is UNPUBLISHED PROPRIETARY SOURCE CODE of 3Dfx Interactive, Inc.; +** the contents of this file may not be disclosed to third parties, copied or +** duplicated in any form, in whole or in part, without the prior written +** permission of 3Dfx Interactive, Inc. +** +** RESTRICTED RIGHTS LEGEND: +** Use, duplication or disclosure by the Government is subject to restrictions +** as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data +** and Computer Software clause at DFARS 252.227-7013, and/or in similar or +** successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished - +** rights reserved under the Copyright Laws of the United States. +** +** $ Revision: $ +** $ Date: $ +** +*/ + + +#ifndef _FXOS_H_ +#define _FXOS_H_ + +#include + +# ifdef __cplusplus +extern "C" { +# endif + +# ifdef WIN32 +void sleep(int secs); +#define gethostname fxGethostname + +int gethostname(char *name, int namelen); + +# endif + +float fxTime(void); +float timer(int flag); + +FILE *fxFopenPath(const char *filename, const char *mode, + const char *path, const char **pprefix); + +# ifdef __cplusplus +} +# endif + +#endif diff --git a/Include/SST1VID.H b/Include/SST1VID.H new file mode 100644 index 0000000..be65c31 --- /dev/null +++ b/Include/SST1VID.H @@ -0,0 +1,111 @@ +/* +** Copyright (c) 1995, 3Dfx Interactive, Inc. +** All Rights Reserved. +** +** This is UNPUBLISHED PROPRIETARY SOURCE CODE of 3Dfx Interactive, Inc.; +** the contents of this file may not be disclosed to third parties, copied or +** duplicated in any form, in whole or in part, without the prior written +** permission of 3Dfx Interactive, Inc. +** +** RESTRICTED RIGHTS LEGEND: +** Use, duplication or disclosure by the Government is subject to restrictions +** as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data +** and Computer Software clause at DFARS 252.227-7013, and/or in similar or +** successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished - +** rights reserved under the Copyright Laws of the United States. +** +** $Header: /devel/cvg/incsrc/SST1VID.H 6 7/24/98 1:41p Hohn $ +** $Log: /devel/cvg/incsrc/SST1VID.H $ +** +** 6 7/24/98 1:41p Hohn +** +** 5 3/10/98 2:33p Psmith +** separating cvg tree from h3/h4 trees + * + * 4 9/09/97 7:35p Sellers + * Added 400x300 resolution + * + * 3 8/24/97 9:31a Sellers + * moved new video timing to sst1vid.h + * redefined 1600x1280 to be 1600x1200 + * + * 2 6/05/97 11:14p Pgj + * + * 5 7/24/96 3:43p Sellers + * added 512x384 @ 60 Hz for arcade monitors + * added 512x256 @ 60 Hz for arcade monitors + * + * 4 7/18/96 10:58a Sellers + * fixed FT and TF clock delay values for lower frequencies with + * .5/.5 combos + * + * 3 6/18/96 6:54p Sellers + * added sst1InitShutdownSli() to fix Glide Splash screen problems with + * SLI + * + * 2 6/13/96 7:45p Sellers + * added "voodoo.ini" support + * added DirectX support + * misc cleanup + * + * 2 6/11/96 1:43p Sellers + * added support for 60, 75, 85, and 120 Hz refresh rates for "most" + * resolutions + * + * 1 5/08/96 5:43p Paik + * Video definitions +*/ +#ifndef __SST1VID_H__ +#define __SST1VID_H__ + +#ifdef __cplusplus +extern "C" { +#endif + +/* Video defines */ + +typedef FxI32 GrScreenRefresh_t; +#define GR_REFRESH_60Hz 0x0 +#define GR_REFRESH_70Hz 0x1 +#define GR_REFRESH_72Hz 0x2 +#define GR_REFRESH_75Hz 0x3 +#define GR_REFRESH_80Hz 0x4 +#define GR_REFRESH_90Hz 0x5 +#define GR_REFRESH_100Hz 0x6 +#define GR_REFRESH_85Hz 0x7 +#define GR_REFRESH_120Hz 0x8 +#define GR_REFRESH_NONE 0xff + +typedef FxI32 GrScreenResolution_t; +#define GR_RESOLUTION_320x200 0x0 +#define GR_RESOLUTION_320x240 0x1 +#define GR_RESOLUTION_400x256 0x2 +#define GR_RESOLUTION_512x384 0x3 +#define GR_RESOLUTION_640x200 0x4 +#define GR_RESOLUTION_640x350 0x5 +#define GR_RESOLUTION_640x400 0x6 +#define GR_RESOLUTION_640x480 0x7 +#define GR_RESOLUTION_800x600 0x8 +#define GR_RESOLUTION_960x720 0x9 +#define GR_RESOLUTION_856x480 0xa +#define GR_RESOLUTION_512x256 0xb +#define GR_RESOLUTION_1024x768 0xC +#define GR_RESOLUTION_1280x1024 0xD +#define GR_RESOLUTION_1600x1200 0xE +#define GR_RESOLUTION_400x300 0xF +#define GR_RESOLUTION_NONE 0xff + +#ifdef GR_RESOLUTION_MAX +#undef GR_RESOLUTION_MAX +#endif +#ifdef GR_RESOLUTION_MIN +#undef GR_RESOLUTION_MIN +#endif +#define GR_RESOLUTION_MIN GR_RESOLUTION_320x200 +#define GR_RESOLUTION_MAX GR_RESOLUTION_1600x1200 + +#ifdef __cplusplus +} +#endif + +#endif /* __SST1VID_H__ */ diff --git a/Include/dxwnd.h b/Include/dxwnd.h index 7db7414..5880555 100644 --- a/Include/dxwnd.h +++ b/Include/dxwnd.h @@ -92,7 +92,7 @@ #define EMULATEREGISTRY 0x00000400 // Emulate registry api to read extra keys #define CDROMDRIVETYPE 0x00000800 // Pretends that GetDriveType() always returns DRIVE_CDROM #define NOWINDOWMOVE 0x00001000 // Do not try to update window position & size on D3D rendering -#define DISABLEHAL 0x00002000 // Disable HAL support (IID_IDirect3DHALDevice) +#define DISABLEHAL 0x00002000 // Disable HAL support (IID_IDirect3DHALDevice) - no longer used #define LOCKSYSCOLORS 0x00004000 // Lock Sys Colors changes by SetSysColors() call #define GDIEMULATEDC 0x00008000 // Map GDI/user32 calls to primary to a memory surface to be stretch-blitted to the primary #define FULLSCREENONLY 0x00010000 // assume that the program is always in fullscreen mode @@ -127,6 +127,7 @@ #define INTERCEPTRDTSC 0x00000800 // Intercapts RDTSC opcodes to hook at assembly level #define LIMITSCREENRES 0x00001000 // Limit available screen resolution up to defined maximum #define NOFILLRECT 0x00002000 // Suppress FillRect calls +#define HOOKGLIDE 0x00004000 // Hook glide calls // logging Tflags DWORD: #define OUTTRACE 0x00000001 // enables tracing to dxwnd.log in general diff --git a/Include/glide.h b/Include/glide.h new file mode 100644 index 0000000..eb3e1b2 --- /dev/null +++ b/Include/glide.h @@ -0,0 +1,917 @@ +/* +** Copyright (c) 1995, 3Dfx Interactive, Inc. +** All Rights Reserved. +** +** This is UNPUBLISHED PROPRIETARY SOURCE CODE of 3Dfx Interactive, Inc.; +** the contents of this file may not be disclosed to third parties, copied or +** duplicated in any form, in whole or in part, without the prior written +** permission of 3Dfx Interactive, Inc. +** +** RESTRICTED RIGHTS LEGEND: +** Use, duplication or disclosure by the Government is subject to restrictions +** as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data +** and Computer Software clause at DFARS 252.227-7013, and/or in similar or +** successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished - +** rights reserved under the Copyright Laws of the United States. +*/ + +/* +** GLIDE.H +** +** The following #defines are relevant when using Glide: +** +** One of the following "platform constants" must be defined during +** compilation: +** +** __DOS__ Defined for 32-bit DOS applications +** __WIN32__ Defined for 32-bit Windows applications +** __sparc__ Defined for Sun Solaris/SunOS +** __linux__ Defined for Linux applications +** __IRIX__ Defined for SGI Irix applications +** +*/ +#ifndef __GLIDE_H__ +#define __GLIDE_H__ + +#include <3dfx.h> +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* +** ----------------------------------------------------------------------- +** TYPE DEFINITIONS +** ----------------------------------------------------------------------- +*/ +typedef FxU32 GrColor_t; +typedef FxU8 GrAlpha_t; +typedef FxU32 GrMipMapId_t; +typedef FxU8 GrFog_t; +typedef FxU32 GrContext_t; +typedef int (__stdcall *GrProc)(); + +/* +** ----------------------------------------------------------------------- +** CONSTANTS AND TYPES +** ----------------------------------------------------------------------- +*/ +#define GR_NULL_MIPMAP_HANDLE ((GrMipMapId_t) -1) + +#define GR_MIPMAPLEVELMASK_EVEN FXBIT(0) +#define GR_MIPMAPLEVELMASK_ODD FXBIT(1) +#define GR_MIPMAPLEVELMASK_BOTH (GR_MIPMAPLEVELMASK_EVEN | GR_MIPMAPLEVELMASK_ODD ) + +#define GR_LODBIAS_BILINEAR 0.5 +#define GR_LODBIAS_TRILINEAR 0.0 + +typedef FxI32 GrChipID_t; +#define GR_TMU0 0x0 +#define GR_TMU1 0x1 +#define GR_TMU2 0x2 + +#define GR_FBI 0x0 + +typedef FxI32 GrCombineFunction_t; +#define GR_COMBINE_FUNCTION_ZERO 0x0 +#define GR_COMBINE_FUNCTION_NONE GR_COMBINE_FUNCTION_ZERO +#define GR_COMBINE_FUNCTION_LOCAL 0x1 +#define GR_COMBINE_FUNCTION_LOCAL_ALPHA 0x2 +#define GR_COMBINE_FUNCTION_SCALE_OTHER 0x3 +#define GR_COMBINE_FUNCTION_BLEND_OTHER GR_COMBINE_FUNCTION_SCALE_OTHER +#define GR_COMBINE_FUNCTION_SCALE_OTHER_ADD_LOCAL 0x4 +#define GR_COMBINE_FUNCTION_SCALE_OTHER_ADD_LOCAL_ALPHA 0x5 +#define GR_COMBINE_FUNCTION_SCALE_OTHER_MINUS_LOCAL 0x6 +#define GR_COMBINE_FUNCTION_SCALE_OTHER_MINUS_LOCAL_ADD_LOCAL 0x7 +#define GR_COMBINE_FUNCTION_BLEND GR_COMBINE_FUNCTION_SCALE_OTHER_MINUS_LOCAL_ADD_LOCAL +#define GR_COMBINE_FUNCTION_SCALE_OTHER_MINUS_LOCAL_ADD_LOCAL_ALPHA 0x8 +#define GR_COMBINE_FUNCTION_SCALE_MINUS_LOCAL_ADD_LOCAL 0x9 +#define GR_COMBINE_FUNCTION_BLEND_LOCAL GR_COMBINE_FUNCTION_SCALE_MINUS_LOCAL_ADD_LOCAL +#define GR_COMBINE_FUNCTION_SCALE_MINUS_LOCAL_ADD_LOCAL_ALPHA 0x10 + +typedef FxI32 GrCombineFactor_t; +#define GR_COMBINE_FACTOR_ZERO 0x0 +#define GR_COMBINE_FACTOR_NONE GR_COMBINE_FACTOR_ZERO +#define GR_COMBINE_FACTOR_LOCAL 0x1 +#define GR_COMBINE_FACTOR_OTHER_ALPHA 0x2 +#define GR_COMBINE_FACTOR_LOCAL_ALPHA 0x3 +#define GR_COMBINE_FACTOR_TEXTURE_ALPHA 0x4 +#define GR_COMBINE_FACTOR_TEXTURE_RGB 0x5 +#define GR_COMBINE_FACTOR_DETAIL_FACTOR GR_COMBINE_FACTOR_TEXTURE_ALPHA +#define GR_COMBINE_FACTOR_LOD_FRACTION 0x5 +#define GR_COMBINE_FACTOR_ONE 0x8 +#define GR_COMBINE_FACTOR_ONE_MINUS_LOCAL 0x9 +#define GR_COMBINE_FACTOR_ONE_MINUS_OTHER_ALPHA 0xa +#define GR_COMBINE_FACTOR_ONE_MINUS_LOCAL_ALPHA 0xb +#define GR_COMBINE_FACTOR_ONE_MINUS_TEXTURE_ALPHA 0xc +#define GR_COMBINE_FACTOR_ONE_MINUS_DETAIL_FACTOR GR_COMBINE_FACTOR_ONE_MINUS_TEXTURE_ALPHA +#define GR_COMBINE_FACTOR_ONE_MINUS_LOD_FRACTION 0xd + + +typedef FxI32 GrCombineLocal_t; +#define GR_COMBINE_LOCAL_ITERATED 0x0 +#define GR_COMBINE_LOCAL_CONSTANT 0x1 +#define GR_COMBINE_LOCAL_NONE GR_COMBINE_LOCAL_CONSTANT +#define GR_COMBINE_LOCAL_DEPTH 0x2 + +typedef FxI32 GrCombineOther_t; +#define GR_COMBINE_OTHER_ITERATED 0x0 +#define GR_COMBINE_OTHER_TEXTURE 0x1 +#define GR_COMBINE_OTHER_CONSTANT 0x2 +#define GR_COMBINE_OTHER_NONE GR_COMBINE_OTHER_CONSTANT + + +typedef FxI32 GrAlphaSource_t; +#define GR_ALPHASOURCE_CC_ALPHA 0x0 +#define GR_ALPHASOURCE_ITERATED_ALPHA 0x1 +#define GR_ALPHASOURCE_TEXTURE_ALPHA 0x2 +#define GR_ALPHASOURCE_TEXTURE_ALPHA_TIMES_ITERATED_ALPHA 0x3 + + +typedef FxI32 GrColorCombineFnc_t; +#define GR_COLORCOMBINE_ZERO 0x0 +#define GR_COLORCOMBINE_CCRGB 0x1 +#define GR_COLORCOMBINE_ITRGB 0x2 +#define GR_COLORCOMBINE_ITRGB_DELTA0 0x3 +#define GR_COLORCOMBINE_DECAL_TEXTURE 0x4 +#define GR_COLORCOMBINE_TEXTURE_TIMES_CCRGB 0x5 +#define GR_COLORCOMBINE_TEXTURE_TIMES_ITRGB 0x6 +#define GR_COLORCOMBINE_TEXTURE_TIMES_ITRGB_DELTA0 0x7 +#define GR_COLORCOMBINE_TEXTURE_TIMES_ITRGB_ADD_ALPHA 0x8 +#define GR_COLORCOMBINE_TEXTURE_TIMES_ALPHA 0x9 +#define GR_COLORCOMBINE_TEXTURE_TIMES_ALPHA_ADD_ITRGB 0xa +#define GR_COLORCOMBINE_TEXTURE_ADD_ITRGB 0xb +#define GR_COLORCOMBINE_TEXTURE_SUB_ITRGB 0xc +#define GR_COLORCOMBINE_CCRGB_BLEND_ITRGB_ON_TEXALPHA 0xd +#define GR_COLORCOMBINE_DIFF_SPEC_A 0xe +#define GR_COLORCOMBINE_DIFF_SPEC_B 0xf +#define GR_COLORCOMBINE_ONE 0x10 + +typedef FxI32 GrAlphaBlendFnc_t; +#define GR_BLEND_ZERO 0x0 +#define GR_BLEND_SRC_ALPHA 0x1 +#define GR_BLEND_SRC_COLOR 0x2 +#define GR_BLEND_DST_COLOR GR_BLEND_SRC_COLOR +#define GR_BLEND_DST_ALPHA 0x3 +#define GR_BLEND_ONE 0x4 +#define GR_BLEND_ONE_MINUS_SRC_ALPHA 0x5 +#define GR_BLEND_ONE_MINUS_SRC_COLOR 0x6 +#define GR_BLEND_ONE_MINUS_DST_COLOR GR_BLEND_ONE_MINUS_SRC_COLOR +#define GR_BLEND_ONE_MINUS_DST_ALPHA 0x7 +#define GR_BLEND_RESERVED_8 0x8 +#define GR_BLEND_RESERVED_9 0x9 +#define GR_BLEND_RESERVED_A 0xa +#define GR_BLEND_RESERVED_B 0xb +#define GR_BLEND_RESERVED_C 0xc +#define GR_BLEND_RESERVED_D 0xd +#define GR_BLEND_RESERVED_E 0xe +#define GR_BLEND_ALPHA_SATURATE 0xf +#define GR_BLEND_PREFOG_COLOR GR_BLEND_ALPHA_SATURATE + +typedef FxI32 GrAspectRatio_t; +#define GR_ASPECT_LOG2_8x1 3 /* 8W x 1H */ +#define GR_ASPECT_LOG2_4x1 2 /* 4W x 1H */ +#define GR_ASPECT_LOG2_2x1 1 /* 2W x 1H */ +#define GR_ASPECT_LOG2_1x1 0 /* 1W x 1H */ +#define GR_ASPECT_LOG2_1x2 -1 /* 1W x 2H */ +#define GR_ASPECT_LOG2_1x4 -2 /* 1W x 4H */ +#define GR_ASPECT_LOG2_1x8 -3 /* 1W x 8H */ + +typedef FxI32 GrBuffer_t; +#define GR_BUFFER_FRONTBUFFER 0x0 +#define GR_BUFFER_BACKBUFFER 0x1 +#define GR_BUFFER_AUXBUFFER 0x2 +#define GR_BUFFER_DEPTHBUFFER 0x3 +#define GR_BUFFER_ALPHABUFFER 0x4 +#define GR_BUFFER_TRIPLEBUFFER 0x5 + +typedef FxI32 GrChromakeyMode_t; +#define GR_CHROMAKEY_DISABLE 0x0 +#define GR_CHROMAKEY_ENABLE 0x1 + +typedef FxI32 GrChromaRangeMode_t; +#define GR_CHROMARANGE_RGB_ALL_EXT 0x0 + +#define GR_CHROMARANGE_DISABLE_EXT 0x00 +#define GR_CHROMARANGE_ENABLE_EXT 0x01 + +typedef FxI32 GrTexChromakeyMode_t; +#define GR_TEXCHROMA_DISABLE_EXT 0x0 +#define GR_TEXCHROMA_ENABLE_EXT 0x1 + +#define GR_TEXCHROMARANGE_RGB_ALL_EXT 0x0 + +typedef FxI32 GrCmpFnc_t; +#define GR_CMP_NEVER 0x0 +#define GR_CMP_LESS 0x1 +#define GR_CMP_EQUAL 0x2 +#define GR_CMP_LEQUAL 0x3 +#define GR_CMP_GREATER 0x4 +#define GR_CMP_NOTEQUAL 0x5 +#define GR_CMP_GEQUAL 0x6 +#define GR_CMP_ALWAYS 0x7 + +typedef FxI32 GrColorFormat_t; +#define GR_COLORFORMAT_ARGB 0x0 +#define GR_COLORFORMAT_ABGR 0x1 + +#define GR_COLORFORMAT_RGBA 0x2 +#define GR_COLORFORMAT_BGRA 0x3 + +typedef FxI32 GrCullMode_t; +#define GR_CULL_DISABLE 0x0 +#define GR_CULL_NEGATIVE 0x1 +#define GR_CULL_POSITIVE 0x2 + +typedef FxI32 GrDepthBufferMode_t; +#define GR_DEPTHBUFFER_DISABLE 0x0 +#define GR_DEPTHBUFFER_ZBUFFER 0x1 +#define GR_DEPTHBUFFER_WBUFFER 0x2 +#define GR_DEPTHBUFFER_ZBUFFER_COMPARE_TO_BIAS 0x3 +#define GR_DEPTHBUFFER_WBUFFER_COMPARE_TO_BIAS 0x4 + +typedef FxI32 GrDitherMode_t; +#define GR_DITHER_DISABLE 0x0 +#define GR_DITHER_2x2 0x1 +#define GR_DITHER_4x4 0x2 + +typedef FxI32 GrFogMode_t; +#define GR_FOG_DISABLE 0x0 +#define GR_FOG_WITH_TABLE_ON_FOGCOORD_EXT 0x1 +#define GR_FOG_WITH_TABLE_ON_Q 0x2 +#define GR_FOG_WITH_TABLE_ON_W GR_FOG_WITH_TABLE_ON_Q +#define GR_FOG_WITH_ITERATED_Z 0x3 +#define GR_FOG_MULT2 0x100 +#define GR_FOG_ADD2 0x200 + +typedef FxU32 GrLock_t; +#define GR_LFB_READ_ONLY 0x00 +#define GR_LFB_WRITE_ONLY 0x01 +#define GR_LFB_IDLE 0x00 +#define GR_LFB_NOIDLE 0x10 + +typedef FxI32 GrLfbBypassMode_t; +#define GR_LFBBYPASS_DISABLE 0x0 +#define GR_LFBBYPASS_ENABLE 0x1 + +typedef FxI32 GrLfbWriteMode_t; +#define GR_LFBWRITEMODE_565 0x0 /* RGB:RGB */ +#define GR_LFBWRITEMODE_555 0x1 /* RGB:RGB */ +#define GR_LFBWRITEMODE_1555 0x2 /* ARGB:ARGB */ +#define GR_LFBWRITEMODE_RESERVED1 0x3 +#define GR_LFBWRITEMODE_888 0x4 /* RGB */ +#define GR_LFBWRITEMODE_8888 0x5 /* ARGB */ +#define GR_LFBWRITEMODE_RESERVED2 0x6 +#define GR_LFBWRITEMODE_RESERVED3 0x7 +#define GR_LFBWRITEMODE_RESERVED4 0x8 +#define GR_LFBWRITEMODE_RESERVED5 0x9 +#define GR_LFBWRITEMODE_RESERVED6 0xa +#define GR_LFBWRITEMODE_RESERVED7 0xb +#define GR_LFBWRITEMODE_565_DEPTH 0xc /* RGB:DEPTH */ +#define GR_LFBWRITEMODE_555_DEPTH 0xd /* RGB:DEPTH */ +#define GR_LFBWRITEMODE_1555_DEPTH 0xe /* ARGB:DEPTH */ +#define GR_LFBWRITEMODE_ZA16 0xf /* DEPTH:DEPTH */ +#define GR_LFBWRITEMODE_ANY 0xFF + + +typedef FxI32 GrOriginLocation_t; +#define GR_ORIGIN_UPPER_LEFT 0x0 +#define GR_ORIGIN_LOWER_LEFT 0x1 +#define GR_ORIGIN_ANY 0xFF + +typedef struct { + int size; + void *lfbPtr; + FxU32 strideInBytes; + GrLfbWriteMode_t writeMode; + GrOriginLocation_t origin; +} GrLfbInfo_t; + +typedef FxI32 GrLOD_t; +#define GR_LOD_LOG2_256 0x8 +#define GR_LOD_LOG2_128 0x7 +#define GR_LOD_LOG2_64 0x6 +#define GR_LOD_LOG2_32 0x5 +#define GR_LOD_LOG2_16 0x4 +#define GR_LOD_LOG2_8 0x3 +#define GR_LOD_LOG2_4 0x2 +#define GR_LOD_LOG2_2 0x1 +#define GR_LOD_LOG2_1 0x0 + +typedef FxI32 GrMipMapMode_t; +#define GR_MIPMAP_DISABLE 0x0 /* no mip mapping */ +#define GR_MIPMAP_NEAREST 0x1 /* use nearest mipmap */ +#define GR_MIPMAP_NEAREST_DITHER 0x2 /* GR_MIPMAP_NEAREST + LOD dith */ + +typedef FxI32 GrSmoothingMode_t; +#define GR_SMOOTHING_DISABLE 0x0 +#define GR_SMOOTHING_ENABLE 0x1 + +typedef FxI32 GrTextureClampMode_t; +#define GR_TEXTURECLAMP_WRAP 0x0 +#define GR_TEXTURECLAMP_CLAMP 0x1 +#define GR_TEXTURECLAMP_MIRROR_EXT 0x2 + +typedef FxI32 GrTextureCombineFnc_t; +#define GR_TEXTURECOMBINE_ZERO 0x0 /* texout = 0 */ +#define GR_TEXTURECOMBINE_DECAL 0x1 /* texout = texthis */ +#define GR_TEXTURECOMBINE_OTHER 0x2 /* this TMU in passthru mode */ +#define GR_TEXTURECOMBINE_ADD 0x3 /* tout = tthis + t(this+1) */ +#define GR_TEXTURECOMBINE_MULTIPLY 0x4 /* texout = tthis * t(this+1) */ +#define GR_TEXTURECOMBINE_SUBTRACT 0x5 /* Sutract from upstream TMU */ +#define GR_TEXTURECOMBINE_DETAIL 0x6 /* detail--detail on tthis */ +#define GR_TEXTURECOMBINE_DETAIL_OTHER 0x7 /* detail--detail on tthis+1 */ +#define GR_TEXTURECOMBINE_TRILINEAR_ODD 0x8 /* trilinear--odd levels tthis*/ +#define GR_TEXTURECOMBINE_TRILINEAR_EVEN 0x9 /*trilinear--even levels tthis*/ +#define GR_TEXTURECOMBINE_ONE 0xa /* texout = 0xFFFFFFFF */ + +typedef FxI32 GrTextureFilterMode_t; +#define GR_TEXTUREFILTER_POINT_SAMPLED 0x0 +#define GR_TEXTUREFILTER_BILINEAR 0x1 + +typedef FxI32 GrTextureFormat_t; +#define GR_TEXFMT_8BIT 0x0 +#define GR_TEXFMT_RGB_332 GR_TEXFMT_8BIT +#define GR_TEXFMT_YIQ_422 0x1 +#define GR_TEXFMT_ALPHA_8 0x2 /* (0..0xFF) alpha */ +#define GR_TEXFMT_INTENSITY_8 0x3 /* (0..0xFF) intensity */ +#define GR_TEXFMT_ALPHA_INTENSITY_44 0x4 +#define GR_TEXFMT_P_8 0x5 /* 8-bit palette */ +#define GR_TEXFMT_RSVD0 0x6 +#define GR_TEXFMT_RSVD1 0x7 +#define GR_TEXFMT_16BIT 0x8 +#define GR_TEXFMT_ARGB_8332 GR_TEXFMT_16BIT +#define GR_TEXFMT_AYIQ_8422 0x9 +#define GR_TEXFMT_RGB_565 0xa +#define GR_TEXFMT_ARGB_1555 0xb +#define GR_TEXFMT_ARGB_4444 0xc +#define GR_TEXFMT_ALPHA_INTENSITY_88 0xd +#define GR_TEXFMT_AP_88 0xe /* 8-bit alpha 8-bit palette */ +#define GR_TEXFMT_RSVD2 0xf + +typedef FxU32 GrTexTable_t; +#define GR_TEXTABLE_NCC0 0x0 +#define GR_TEXTABLE_NCC1 0x1 +#define GR_TEXTABLE_PALETTE 0x2 +#define GR_TEXTABLE_PALETTE_6666_EXT 0x3 + +typedef FxU32 GrNCCTable_t; +#define GR_NCCTABLE_NCC0 0x0 +#define GR_NCCTABLE_NCC1 0x1 + +typedef FxU32 GrTexBaseRange_t; +#define GR_TEXBASE_256 0x3 +#define GR_TEXBASE_128 0x2 +#define GR_TEXBASE_64 0x1 +#define GR_TEXBASE_32_TO_1 0x0 + + +typedef FxU32 GrEnableMode_t; +#define GR_MODE_DISABLE 0x0 +#define GR_MODE_ENABLE 0x1 + +#define GR_AA_ORDERED 0x01 +#define GR_ALLOW_MIPMAP_DITHER 0x02 +#define GR_PASSTHRU 0x03 +#define GR_SHAMELESS_PLUG 0x04 +#define GR_VIDEO_SMOOTHING 0x05 + +typedef FxU32 GrCoordinateSpaceMode_t; +#define GR_WINDOW_COORDS 0x00 +#define GR_CLIP_COORDS 0x01 + +/* Types of data in strips */ +#define GR_FLOAT 0 +#define GR_U8 1 + +/* Parameters for strips */ +#define GR_PARAM_XY 0x01 +#define GR_PARAM_Z 0x02 +#define GR_PARAM_W 0x03 +#define GR_PARAM_Q 0x04 +#define GR_PARAM_FOG_EXT 0x05 + +#define GR_PARAM_A 0x10 + +#define GR_PARAM_RGB 0x20 + +#define GR_PARAM_PARGB 0x30 + +#define GR_PARAM_ST0 0x40 +#define GR_PARAM_ST1 GR_PARAM_ST0+1 +#define GR_PARAM_ST2 GR_PARAM_ST0+2 + +#define GR_PARAM_Q0 0x50 +#define GR_PARAM_Q1 GR_PARAM_Q0+1 +#define GR_PARAM_Q2 GR_PARAM_Q0+2 + +#define GR_PARAM_DISABLE 0x00 +#define GR_PARAM_ENABLE 0x01 + +/* +** grDrawVertexArray/grDrawVertexArrayContiguous primitive type +*/ +#define GR_POINTS 0 +#define GR_LINE_STRIP 1 +#define GR_LINES 2 +#define GR_POLYGON 3 +#define GR_TRIANGLE_STRIP 4 +#define GR_TRIANGLE_FAN 5 +#define GR_TRIANGLES 6 +#define GR_TRIANGLE_STRIP_CONTINUE 7 +#define GR_TRIANGLE_FAN_CONTINUE 8 + +/* +** grGet/grReset types +*/ +#define GR_BITS_DEPTH 0x01 +#define GR_BITS_RGBA 0x02 +#define GR_FIFO_FULLNESS 0x03 +#define GR_FOG_TABLE_ENTRIES 0x04 +#define GR_GAMMA_TABLE_ENTRIES 0x05 +#define GR_GLIDE_STATE_SIZE 0x06 +#define GR_GLIDE_VERTEXLAYOUT_SIZE 0x07 +#define GR_IS_BUSY 0x08 +#define GR_LFB_PIXEL_PIPE 0x09 +#define GR_MAX_TEXTURE_SIZE 0x0a +#define GR_MAX_TEXTURE_ASPECT_RATIO 0x0b +#define GR_MEMORY_FB 0x0c +#define GR_MEMORY_TMU 0x0d +#define GR_MEMORY_UMA 0x0e +#define GR_NUM_BOARDS 0x0f +#define GR_NON_POWER_OF_TWO_TEXTURES 0x10 +#define GR_NUM_FB 0x11 +#define GR_NUM_SWAP_HISTORY_BUFFER 0x12 +#define GR_NUM_TMU 0x13 +#define GR_PENDING_BUFFERSWAPS 0x14 +#define GR_REVISION_FB 0x15 +#define GR_REVISION_TMU 0x16 +#define GR_STATS_LINES 0x17 /* grGet/grReset */ +#define GR_STATS_PIXELS_AFUNC_FAIL 0x18 +#define GR_STATS_PIXELS_CHROMA_FAIL 0x19 +#define GR_STATS_PIXELS_DEPTHFUNC_FAIL 0x1a +#define GR_STATS_PIXELS_IN 0x1b +#define GR_STATS_PIXELS_OUT 0x1c +#define GR_STATS_PIXELS 0x1d /* grReset */ +#define GR_STATS_POINTS 0x1e /* grGet/grReset */ +#define GR_STATS_TRIANGLES_IN 0x1f +#define GR_STATS_TRIANGLES_OUT 0x20 +#define GR_STATS_TRIANGLES 0x21 /* grReset */ +#define GR_SWAP_HISTORY 0x22 +#define GR_SUPPORTS_PASSTHRU 0x23 +#define GR_TEXTURE_ALIGN 0x24 +#define GR_VIDEO_POSITION 0x25 +#define GR_VIEWPORT 0x26 +#define GR_WDEPTH_MIN_MAX 0x27 +#define GR_ZDEPTH_MIN_MAX 0x28 +#define GR_VERTEX_PARAMETER 0x29 +#define GR_BITS_GAMMA 0x2a + +/* +** grGetString types +*/ +#define GR_EXTENSION 0xa0 +#define GR_HARDWARE 0xa1 +#define GR_RENDERER 0xa2 +#define GR_VENDOR 0xa3 +#define GR_VERSION 0xa4 + +/* +** ----------------------------------------------------------------------- +** STRUCTURES +** ----------------------------------------------------------------------- +*/ + +typedef struct { + GrLOD_t smallLodLog2; + GrLOD_t largeLodLog2; + GrAspectRatio_t aspectRatioLog2; + GrTextureFormat_t format; + void *data; +} GrTexInfo; + +typedef struct GrSstPerfStats_s { + FxU32 pixelsIn; /* # pixels processed (minus buffer clears) */ + FxU32 chromaFail; /* # pixels not drawn due to chroma key */ + FxU32 zFuncFail; /* # pixels not drawn due to Z comparison */ + FxU32 aFuncFail; /* # pixels not drawn due to alpha comparison */ + FxU32 pixelsOut; /* # pixels drawn (including buffer clears) */ +} GrSstPerfStats_t; + +typedef struct { + GrScreenResolution_t resolution; + GrScreenRefresh_t refresh; + int numColorBuffers; + int numAuxBuffers; +} GrResolution; + +typedef GrResolution GlideResolution; + +#define GR_QUERY_ANY ((FxU32)(~0)) + +typedef FxU32 GrLfbSrcFmt_t; +#define GR_LFB_SRC_FMT_565 0x00 +#define GR_LFB_SRC_FMT_555 0x01 +#define GR_LFB_SRC_FMT_1555 0x02 +#define GR_LFB_SRC_FMT_888 0x04 +#define GR_LFB_SRC_FMT_8888 0x05 +#define GR_LFB_SRC_FMT_565_DEPTH 0x0c +#define GR_LFB_SRC_FMT_555_DEPTH 0x0d +#define GR_LFB_SRC_FMT_1555_DEPTH 0x0e +#define GR_LFB_SRC_FMT_ZA16 0x0f +#define GR_LFB_SRC_FMT_RLE16 0x80 + +#ifdef H3D +#define GR_HINT_H3DENABLE 4 +#undef GR_HINTTYPE_MAX +#define GR_HINTTYPE_MAX 4 +#endif + +/* +** ----------------------------------------------------------------------- +** FUNCTION PROTOTYPES +** ----------------------------------------------------------------------- +*/ +#ifndef FX_GLIDE_NO_FUNC_PROTO +/* +** rendering functions +*/ +FX_ENTRY void FX_CALL +grDrawPoint( const void *pt ); + +FX_ENTRY void FX_CALL +grDrawLine( const void *v1, const void *v2 ); + +FX_ENTRY void FX_CALL +grDrawTriangle( const void *a, const void *b, const void *c ); + +FX_ENTRY void FX_CALL +grVertexLayout(FxU32 param, FxI32 offset, FxU32 mode); + +FX_ENTRY void FX_CALL +grDrawVertexArray(FxU32 mode, FxU32 Count, void *pointers); + +FX_ENTRY void FX_CALL +grDrawVertexArrayContiguous(FxU32 mode, FxU32 Count, void *pointers, FxU32 stride); + +/* +** Antialiasing Functions +*/ + +FX_ENTRY void FX_CALL +grAADrawTriangle( + const void *a, const void *b, const void *c, + FxBool ab_antialias, FxBool bc_antialias, FxBool ca_antialias + ); + +/* +** buffer management +*/ +FX_ENTRY void FX_CALL +grBufferClear( GrColor_t color, GrAlpha_t alpha, FxU32 depth ); + +FX_ENTRY void FX_CALL +grBufferSwap( FxU32 swap_interval ); + +FX_ENTRY void FX_CALL +grRenderBuffer( GrBuffer_t buffer ); + +/* +** error management +*/ +typedef void (*GrErrorCallbackFnc_t)( const char *string, FxBool fatal ); + +FX_ENTRY void FX_CALL +grErrorSetCallback( GrErrorCallbackFnc_t fnc ); + +/* +** SST routines +*/ +FX_ENTRY void FX_CALL +grFinish(void); + +FX_ENTRY void FX_CALL +grFlush(void); + +FX_ENTRY GrContext_t FX_CALL +grSstWinOpen( + FxU32 hWnd, + GrScreenResolution_t screen_resolution, + GrScreenRefresh_t refresh_rate, + GrColorFormat_t color_format, + GrOriginLocation_t origin_location, + int nColBuffers, + int nAuxBuffers); + +FX_ENTRY FxBool FX_CALL +grSstWinClose( GrContext_t context ); + +FX_ENTRY FxBool FX_CALL +grSelectContext( GrContext_t context ); + +FX_ENTRY void FX_CALL +grSstOrigin(GrOriginLocation_t origin); + +FX_ENTRY void FX_CALL +grSstSelect( int which_sst ); + +/* +** Glide configuration and special effect maintenance functions +*/ +FX_ENTRY void FX_CALL +grAlphaBlendFunction( + GrAlphaBlendFnc_t rgb_sf, GrAlphaBlendFnc_t rgb_df, + GrAlphaBlendFnc_t alpha_sf, GrAlphaBlendFnc_t alpha_df + ); + +FX_ENTRY void FX_CALL +grAlphaCombine( + GrCombineFunction_t function, GrCombineFactor_t factor, + GrCombineLocal_t local, GrCombineOther_t other, + FxBool invert + ); + +FX_ENTRY void FX_CALL +grAlphaControlsITRGBLighting( FxBool enable ); + +FX_ENTRY void FX_CALL +grAlphaTestFunction( GrCmpFnc_t function ); + +FX_ENTRY void FX_CALL +grAlphaTestReferenceValue( GrAlpha_t value ); + +FX_ENTRY void FX_CALL +grChromakeyMode( GrChromakeyMode_t mode ); + +FX_ENTRY void FX_CALL +grChromakeyValue( GrColor_t value ); + +FX_ENTRY void FX_CALL +grClipWindow( FxU32 minx, FxU32 miny, FxU32 maxx, FxU32 maxy ); + +FX_ENTRY void FX_CALL +grColorCombine( + GrCombineFunction_t function, GrCombineFactor_t factor, + GrCombineLocal_t local, GrCombineOther_t other, + FxBool invert ); + +FX_ENTRY void FX_CALL +grColorMask( FxBool rgb, FxBool a ); + +FX_ENTRY void FX_CALL +grCullMode( GrCullMode_t mode ); + +FX_ENTRY void FX_CALL +grConstantColorValue( GrColor_t value ); + +FX_ENTRY void FX_CALL +grDepthBiasLevel( FxI32 level ); + +FX_ENTRY void FX_CALL +grDepthBufferFunction( GrCmpFnc_t function ); + +FX_ENTRY void FX_CALL +grDepthBufferMode( GrDepthBufferMode_t mode ); + +FX_ENTRY void FX_CALL +grDepthMask( FxBool mask ); + +FX_ENTRY void FX_CALL +grDisableAllEffects( void ); + +FX_ENTRY void FX_CALL +grDitherMode( GrDitherMode_t mode ); + +FX_ENTRY void FX_CALL +grFogColorValue( GrColor_t fogcolor ); + +FX_ENTRY void FX_CALL +grFogMode( GrFogMode_t mode ); + +FX_ENTRY void FX_CALL +grFogTable( const GrFog_t ft[] ); + +FX_ENTRY void FX_CALL +grLoadGammaTable( FxU32 nentries, FxU32 *red, FxU32 *green, FxU32 *blue); + +FX_ENTRY void FX_CALL +grSplash(float x, float y, float width, float height, FxU32 frame); + +FX_ENTRY FxU32 FX_CALL +grGet( FxU32 pname, FxU32 plength, FxI32 *params ); + +FX_ENTRY const char * FX_CALL +grGetString( FxU32 pname ); + +FX_ENTRY FxI32 FX_CALL +grQueryResolutions( const GrResolution *resTemplate, GrResolution *output ); + +FX_ENTRY FxBool FX_CALL +grReset( FxU32 what ); + +FX_ENTRY GrProc FX_CALL +grGetProcAddress( char *procName ); + +FX_ENTRY void FX_CALL +grEnable( GrEnableMode_t mode ); + +FX_ENTRY void FX_CALL +grDisable( GrEnableMode_t mode ); + +FX_ENTRY void FX_CALL +grCoordinateSpace( GrCoordinateSpaceMode_t mode ); + +FX_ENTRY void FX_CALL +grDepthRange( FxFloat n, FxFloat f ); + +FX_ENTRY void FX_CALL +grViewport( FxI32 x, FxI32 y, FxI32 width, FxI32 height ); + +/* +** texture mapping control functions +*/ +FX_ENTRY FxU32 FX_CALL +grTexCalcMemRequired( + GrLOD_t lodmin, GrLOD_t lodmax, + GrAspectRatio_t aspect, GrTextureFormat_t fmt); + +FX_ENTRY FxU32 FX_CALL +grTexTextureMemRequired( FxU32 evenOdd, + GrTexInfo *info ); + +FX_ENTRY FxU32 FX_CALL +grTexMinAddress( GrChipID_t tmu ); + +FX_ENTRY FxU32 FX_CALL +grTexMaxAddress( GrChipID_t tmu ); + +FX_ENTRY void FX_CALL +grTexNCCTable( GrNCCTable_t table ); + +FX_ENTRY void FX_CALL +grTexSource( GrChipID_t tmu, + FxU32 startAddress, + FxU32 evenOdd, + GrTexInfo *info ); + +FX_ENTRY void FX_CALL +grTexClampMode( + GrChipID_t tmu, + GrTextureClampMode_t s_clampmode, + GrTextureClampMode_t t_clampmode + ); + +FX_ENTRY void FX_CALL +grTexCombine( + GrChipID_t tmu, + GrCombineFunction_t rgb_function, + GrCombineFactor_t rgb_factor, + GrCombineFunction_t alpha_function, + GrCombineFactor_t alpha_factor, + FxBool rgb_invert, + FxBool alpha_invert + ); + +FX_ENTRY void FX_CALL +grTexDetailControl( + GrChipID_t tmu, + int lod_bias, + FxU8 detail_scale, + float detail_max + ); + +FX_ENTRY void FX_CALL +grTexFilterMode( + GrChipID_t tmu, + GrTextureFilterMode_t minfilter_mode, + GrTextureFilterMode_t magfilter_mode + ); + + +FX_ENTRY void FX_CALL +grTexLodBiasValue(GrChipID_t tmu, float bias ); + +FX_ENTRY void FX_CALL +grTexDownloadMipMap( GrChipID_t tmu, + FxU32 startAddress, + FxU32 evenOdd, + GrTexInfo *info ); + +FX_ENTRY void FX_CALL +grTexDownloadMipMapLevel( GrChipID_t tmu, + FxU32 startAddress, + GrLOD_t thisLod, + GrLOD_t largeLod, + GrAspectRatio_t aspectRatio, + GrTextureFormat_t format, + FxU32 evenOdd, + void *data ); + +FX_ENTRY FxBool FX_CALL +grTexDownloadMipMapLevelPartial( GrChipID_t tmu, + FxU32 startAddress, + GrLOD_t thisLod, + GrLOD_t largeLod, + GrAspectRatio_t aspectRatio, + GrTextureFormat_t format, + FxU32 evenOdd, + void *data, + int start, + int end ); + +FX_ENTRY void FX_CALL +grTexDownloadTable( GrTexTable_t type, + void *data ); + +FX_ENTRY void FX_CALL +grTexDownloadTablePartial( GrTexTable_t type, + void *data, + int start, + int end ); + +FX_ENTRY void FX_CALL +grTexMipMapMode( GrChipID_t tmu, + GrMipMapMode_t mode, + FxBool lodBlend ); + +FX_ENTRY void FX_CALL +grTexMultibase( GrChipID_t tmu, + FxBool enable ); + +FX_ENTRY void FX_CALL +grTexMultibaseAddress( GrChipID_t tmu, + GrTexBaseRange_t range, + FxU32 startAddress, + FxU32 evenOdd, + GrTexInfo *info ); + +/* +** linear frame buffer functions +*/ + +FX_ENTRY FxBool FX_CALL +grLfbLock( GrLock_t type, GrBuffer_t buffer, GrLfbWriteMode_t writeMode, + GrOriginLocation_t origin, FxBool pixelPipeline, + GrLfbInfo_t *info ); + +FX_ENTRY FxBool FX_CALL +grLfbUnlock( GrLock_t type, GrBuffer_t buffer ); + +FX_ENTRY void FX_CALL +grLfbConstantAlpha( GrAlpha_t alpha ); + +FX_ENTRY void FX_CALL +grLfbConstantDepth( FxU32 depth ); + +FX_ENTRY void FX_CALL +grLfbWriteColorSwizzle(FxBool swizzleBytes, FxBool swapWords); + +FX_ENTRY void FX_CALL +grLfbWriteColorFormat(GrColorFormat_t colorFormat); + +FX_ENTRY FxBool FX_CALL +grLfbWriteRegion( GrBuffer_t dst_buffer, + FxU32 dst_x, FxU32 dst_y, + GrLfbSrcFmt_t src_format, + FxU32 src_width, FxU32 src_height, + FxBool pixelPipeline, + FxI32 src_stride, void *src_data ); + +FX_ENTRY FxBool FX_CALL +grLfbReadRegion( GrBuffer_t src_buffer, + FxU32 src_x, FxU32 src_y, + FxU32 src_width, FxU32 src_height, + FxU32 dst_stride, void *dst_data ); + +/* +** glide management functions +*/ +FX_ENTRY void FX_CALL +grGlideInit( void ); + +FX_ENTRY void FX_CALL +grGlideShutdown( void ); + +FX_ENTRY void FX_CALL +grGlideGetState( void *state ); + +FX_ENTRY void FX_CALL +grGlideSetState( const void *state ); + +FX_ENTRY void FX_CALL +grGlideGetVertexLayout( void *layout ); + +FX_ENTRY void FX_CALL +grGlideSetVertexLayout( const void *layout ); + +#endif /* FX_GLIDE_NO_FUNC_PROTO */ + +#ifdef __cplusplus +} +#endif + +#include + +#endif /* __GLIDE_H__ */ diff --git a/Include/glidesys.h b/Include/glidesys.h new file mode 100644 index 0000000..bb66d3c --- /dev/null +++ b/Include/glidesys.h @@ -0,0 +1,146 @@ +/* +** Copyright (c) 1995, 3Dfx Interactive, Inc. +** All Rights Reserved. +** +** This is UNPUBLISHED PROPRIETARY SOURCE CODE of 3Dfx Interactive, Inc.; +** the contents of this file may not be disclosed to third parties, copied or +** duplicated in any form, in whole or in part, without the prior written +** permission of 3Dfx Interactive, Inc. +** +** RESTRICTED RIGHTS LEGEND: +** Use, duplication or disclosure by the Government is subject to restrictions +n** as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data +** and Computer Software clause at DFARS 252.227-7013, and/or in similar or +** successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished - +** rights reserved under the Copyright Laws of the United States. +** +** $Header: /devel/cvg/glide3/src/glidesys.h 3 7/24/98 1:41p Hohn $ +** $Log: /devel/cvg/glide3/src/glidesys.h $ +** +** 3 7/24/98 1:41p Hohn +** +** 2 6/15/98 10:50a Peter +** made csim compile time option + * + * 1 1/16/98 4:29p Atai + * create glide 3 src + * + * 10 12/09/97 12:20p Peter + * mac glide port + * + * 9 11/04/97 4:00p Dow + * Banshee Mods + * + * 8 8/18/97 3:52p Peter + * pre-hw arrival fixes/cleanup + * + * 7 6/02/97 4:09p Peter + * Compile w/ gcc for Dural + * + * 6 5/27/97 1:16p Peter + * Basic cvg, w/o cmd fifo stuff. + * + * 5 5/21/97 6:05a Peter +*/ +#ifndef __GLIDESYS_H__ +#define __GLIDESYS_H__ + +/* +n** ----------------------------------------------------------------------- +** COMPILER/ENVIRONMENT CONFIGURATION +** ----------------------------------------------------------------------- +*/ + +/* Endianness is stored in bits [30:31] */ +#define GLIDE_ENDIAN_SHIFT 30 +#define GLIDE_ENDIAN_LITTLE (0x1 << GLIDE_ENDIAN_SHIFT) +#define GLIDE_ENDIAN_BIG (0x2 << GLIDE_ENDIAN_SHIFT) + +/* OS is stored in bits [0:6] */ +#define GLIDE_OS_SHIFT 0 +#define GLIDE_OS_UNIX 0x1 +#define GLIDE_OS_DOS32 0x2 +#define GLIDE_OS_WIN32 0x4 +#define GLIDE_OS_MACOS 0x8 +#define GLIDE_OS_OS2 0x10 +#define GLIDE_OS_OTHER 0x40 /* For Proprietary Arcade HW */ + +/* Sim vs. Hardware is stored in bits [7:8] */ +#define GLIDE_SST_SHIFT 7 +#define GLIDE_SST_SIM (0x1 << GLIDE_SST_SHIFT) +#define GLIDE_SST_HW (0x2 << GLIDE_SST_SHIFT) + +/* Hardware Type is stored in bits [9:13] */ +#define GLIDE_HW_SHIFT 9 +#define GLIDE_HW_SST1 (0x1 << GLIDE_HW_SHIFT) +#define GLIDE_HW_SST96 (0x2 << GLIDE_HW_SHIFT) +#define GLIDE_HW_H3 (0x4 << GLIDE_HW_SHIFT) +#define GLIDE_HW_SST2 (0x8 << GLIDE_HW_SHIFT) +#define GLIDE_HW_CVG (0x10 << GLIDE_HW_SHIFT) + +/* +** Make sure we handle all instances of WIN32 +*/ +#ifndef __WIN32__ +# if defined (_WIN32) || defined (WIN32) || defined(__NT__) +# define __WIN32__ +# endif +#endif + +/* We need two checks on the OS: one for endian, the other for OS */ +/* Check for endianness */ +#if defined(__IRIX__) || defined(__sparc__) || defined(MACOS) +# define GLIDE_ENDIAN GLIDE_ENDIAN_BIG +#else +# define GLIDE_ENDIAN GLIDE_ENDIAN_LITTLE +#endif + +/* Check for OS */ +#if defined(__IRIX__) || defined(__sparc__) || defined(__linux__) +# define GLIDE_OS GLIDE_OS_UNIX +#elif defined(__DOS__) +# define GLIDE_OS GLIDE_OS_DOS32 +#elif defined(__WIN32__) +# define GLIDE_OS GLIDE_OS_WIN32 +#elif defined(macintosh) +# define GLIDE_OS GLIDE_OS_MACOS +#else +#error "Unknown OS" +#endif + +/* Check for Simulator vs. Hardware */ +#if HAL_CSIM || HWC_CSIM +# define GLIDE_SST GLIDE_SST_SIM +#else +# define GLIDE_SST GLIDE_SST_HW +#endif + +/* Check for type of hardware */ +#ifdef SST96 +# define GLIDE_HW GLIDE_HW_SST96 +#elif defined(H3) +# define GLIDE_HW GLIDE_HW_H3 +#elif defined(SST2) +# define GLIDE_HW GLIDE_HW_SST2 +#elif defined(CVG) +# define GLIDE_HW GLIDE_HW_CVG +#else /* Default to SST1 */ +# define GLIDE_HW GLIDE_HW_SST1 +#endif + + +#define GLIDE_PLATFORM (GLIDE_ENDIAN | GLIDE_OS | GLIDE_SST | GLIDE_HW) + +/* +** Control the number of TMUs +*/ +#ifndef GLIDE_NUM_TMU +# define GLIDE_NUM_TMU 2 +#endif + + +#if ((GLIDE_NUM_TMU < 0) && (GLIDE_NUM_TMU > 3)) +# error "GLIDE_NUM_TMU set to an invalid value" +#endif + +#endif /* __GLIDESYS_H__ */ diff --git a/Include/glideutl.h b/Include/glideutl.h new file mode 100644 index 0000000..2eb1682 --- /dev/null +++ b/Include/glideutl.h @@ -0,0 +1,143 @@ +/* +** Copyright (c) 1995, 3Dfx Interactive, Inc. +** All Rights Reserved. +** +** This is UNPUBLISHED PROPRIETARY SOURCE CODE of 3Dfx Interactive, Inc.; +** the contents of this file may not be disclosed to third parties, copied or +** duplicated in any form, in whole or in part, without the prior written +** permission of 3Dfx Interactive, Inc. +** +** RESTRICTED RIGHTS LEGEND: +** Use, duplication or disclosure by the Government is subject to restrictions +** as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data +** and Computer Software clause at DFARS 252.227-7013, and/or in similar or +** successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished - +** rights reserved under the Copyright Laws of the United States. +** +** $Header: /devel/cvg/glide3/src/glideutl.h 4 7/24/98 1:41p Hohn $ +** $Log: /devel/cvg/glide3/src/glideutl.h $ +** +** 4 7/24/98 1:41p Hohn +** +** 3 1/30/98 4:27p Atai +** gufog* prototype +** +** 1 1/29/98 4:00p Atai + * + * 1 1/16/98 4:29p Atai + * create glide 3 src + * + * 11 1/07/98 11:18a Atai + * remove GrMipMapInfo and GrGC.mm_table in glide3 + * + * 10 1/06/98 6:47p Atai + * undo grSplash and remove gu routines + * + * 9 1/05/98 6:04p Atai + * move 3df gu related data structure from glide.h to glideutl.h + * + * 8 12/18/97 2:13p Peter + * fogTable cataclysm + * + * 7 12/15/97 5:52p Atai + * disable obsolete glide2 api for glide3 + * + * 6 8/14/97 5:32p Pgj + * remove dead code per GMT + * + * 5 6/12/97 5:19p Pgj + * Fix bug 578 + * + * 4 3/05/97 9:36p Jdt + * Removed guFbWriteRegion added guEncodeRLE16 + * + * 3 1/16/97 3:45p Dow + * Embedded fn protos in ifndef FX_GLIDE_NO_FUNC_PROTO +*/ + +/* Glide Utility routines */ + +#ifndef __GLIDEUTL_H__ +#define __GLIDEUTL_H__ + +#ifdef __cplusplus +extern "C" { +#endif + +/* +** 3DF texture file structs +*/ + +typedef struct +{ + FxU32 width, height; + int small_lod, large_lod; + GrAspectRatio_t aspect_ratio; + GrTextureFormat_t format; +} Gu3dfHeader; + +typedef struct +{ + FxU8 yRGB[16]; + FxI16 iRGB[4][3]; + FxI16 qRGB[4][3]; + FxU32 packed_data[12]; +} GuNccTable; + +typedef struct { + FxU32 data[256]; +} GuTexPalette; + +typedef union { + GuNccTable nccTable; + GuTexPalette palette; +} GuTexTable; + +typedef struct +{ + Gu3dfHeader header; + GuTexTable table; + void *data; + FxU32 mem_required; /* memory required for mip map in bytes. */ +} Gu3dfInfo; + +#ifndef FX_GLIDE_NO_FUNC_PROTO +/* +** Gamma functions +*/ + +FX_ENTRY void FX_CALL +guGammaCorrectionRGB( FxFloat red, FxFloat green, FxFloat blue ); + +/* +** fog stuff +*/ +FX_ENTRY float FX_CALL +guFogTableIndexToW( int i ); + +FX_ENTRY void FX_CALL +guFogGenerateExp( GrFog_t *fogtable, float density ); + +FX_ENTRY void FX_CALL +guFogGenerateExp2( GrFog_t *fogtable, float density ); + +FX_ENTRY void FX_CALL +guFogGenerateLinear(GrFog_t *fogtable, + float nearZ, float farZ ); + +/* +** hi-level texture manipulation tools. +*/ +FX_ENTRY FxBool FX_CALL +gu3dfGetInfo( const char *filename, Gu3dfInfo *info ); + +FX_ENTRY FxBool FX_CALL +gu3dfLoad( const char *filename, Gu3dfInfo *data ); + +#endif /* FX_GLIDE_NO_FUNC_PROTO */ + +#ifdef __cplusplus +} +#endif + +#endif /* __GLIDEUTL_H__ */ diff --git a/Include/sst1init.h b/Include/sst1init.h new file mode 100644 index 0000000..d7c15b2 --- /dev/null +++ b/Include/sst1init.h @@ -0,0 +1,1840 @@ +/*-*-c++-*-*/ +/* +** Copyright (c) 1997, 3Dfx Interactive, Inc. +** All Rights Reserved. +** +** This is UNPUBLISHED PROPRIETARY SOURCE CODE of 3Dfx Interactive, Inc.; +** the contents of this file may not be disclosed to third parties, copied or +** duplicated in any form, in whole or in part, without the prior written +** permission of 3Dfx Interactive, Inc. +** +** RESTRICTED RIGHTS LEGEND: +** Use, duplication or disclosure by the Government is subject to restrictions +** as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data +** and Computer Software clause at DFARS 252.227-7013, and/or in similar or +** successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished - +** rights reserved under the Copyright Laws of the United States. +** +** +** $Revision: 62 $ +** $Date: 7/24/98 1:38p $ +** +*/ + +#ifndef __SST1INIT_H__ +#define __SST1INIT_H__ + +/* +** Copyright (c) 1996, 3Dfx Interactive, Inc. +** All Rights Reserved. +** +** This is UNPUBLISHED PROPRIETARY SOURCE CODE of 3Dfx Interactive, Inc.; +** the contents of this file may not be disclosed to third parties, copied or +** duplicated in any form, in whole or in part, without the prior written +** permission of 3Dfx Interactive, Inc. +** +** RESTRICTED RIGHTS LEGEND: +** Use, duplication or disclosure by the Government is subject to restrictions +** as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data +** and Computer Software clause at DFARS 252.227-7013, and/or in similar or +** successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished - +** rights reserved under the Copyright Laws of the United States. +** +** $Revision: 62 $ +** $Date: 7/24/98 1:38p $ +** +** SST-1 Initialization routine protypes +** +** If all initialization routines are called, it is assumed they are called +** in the following order: +** 1. sst1InitMapBoard(); +** 2. sst1InitRegisters(); +** 3. sst1InitGamma(); +** 4. sst1InitVideoBuffers(); +** 5. sst1InitSli(); [Optional] +** 6. sst1InitCmdFifo(); +** +** sst1InitShutdown() is called at the end of an application to turn off +** the SST-1 graphics subsystem +** +*/ + +/* sst1init.h assumes "glide.h" and "sst.h" are already included */ + +/* Init code debug print routine */ +#ifdef INIT_DOS /* Glide version... */ +#define INIT_OUTPUT +#define INIT_PRINTF(a) sst1InitPrintf a +#define INIT_INFO(A) +#endif + +#ifndef DIRECTX +#undef GETENV +#undef ATOI +#undef ATOF +#undef SSCANF +#undef POW +#define GETENV(A) sst1InitGetenv(A) +#define ATOI(A) atoi(A) +#define ATOF(A) atof(A) +#define SSCANF( A, B, C ) sscanf( A, B, C ) +#define POW( A, B ) pow( A, B ) +#define FTOL( X ) ((FxU32)(X)) + +// Video resolution declarations +#include "sst1vid.h" + +// Info Structure declaration +#include "cvginfo.h" + +#else /* DIRECTX */ +#include "ddglobal.h" +#pragma optimize ("",off) /* ddglobal.h tuns this on for retail builds */ +#undef INIT_PRINTF +#undef INIT_INFO +#undef GETENV +#undef ATOI +#undef ATOF +#undef FTOL +#undef ITOF_INV +#undef SSCANF +#undef POW +/* #define INIT_PRINTF(a) */ +#ifdef FXTRACE + #define INIT_PRINTF DDPRINTF +#else + #define INIT_PRINTF 1 ? (void) 0 : (void) +#endif +#define INIT_INFO(A) +#define GETENV(A) ddgetenv(A) +#define ATOI(A) ddatoi(A) +#define ATOF(A) ddatof(A) +#define FTOL(A) ddftol(A) +#define ITOF_INV(A) dd_itof_inv(A) +#define SSCANF( A, B, C ) ddsscanf( A, B, C ) +#define POW( A, B ) ddpow( A, B ) + +#endif /* DIRECTX */ + +/* Defines to writing to/reading from SST-1 */ +#if 0 +#define IGET(A) A +#define ISET(A,D) A = (D) +#else +#define IGET(A) sst1InitRead32((FxU32 *) &(A)) +#define ISET(A,D) sst1InitWrite32((FxU32 *) &(A), D) +#endif + +/* +** P6 Fence +** +** Here's the stuff to do P6 Fencing. This is required for the +** certain things on the P6 +*/ +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef SST1INIT_ALLOCATE + FxU32 p6FenceVar; +#else + extern FxU32 p6FenceVar; +#endif + +#if defined(__WATCOMC__) +void +p6Fence(void); +# pragma aux p6Fence = \ + "xchg eax, p6FenceVar" \ + modify [eax]; +# define P6FENCE p6Fence() +#elif defined(__MSC__) +# define P6FENCE {_asm xchg eax, p6FenceVar} +#elif defined(macintosh) && __POWERPC__ && defined(__MWERKS__) +# define P6FENCE __eieio() +#else +# error "P6 Fencing in-line assembler code needs to be added for this compiler" +#endif + +#ifdef __cplusplus +} +#endif + +#ifndef _FXPCI_H_ +#include +#endif +#include + +/*--------------------------------------------------------*/ +/* Following defines need to go in "cvgdefs.h" eventually */ +#define SST_CMDFIFO_ADDR BIT(21) + +/*--------- SST PCI Configuration Command bits --------------*/ +#define SST_PCIMEM_ACCESS_EN BIT(1) + +/*------- SST PCI Configuration Register defaults -----------*/ +#define SST_PCI_INIT_ENABLE_DEFAULT 0x0 +#define SST_PCI_BUS_SNOOP_DEFAULT 0x0 + +/*--- SST PCI Init Enable Configuration Register defaults ---*/ +#define SST_SLI_OWNPCI SST_SCANLINE_SLV_OWNPCI +#define SST_SLI_MASTER_OWNPCI 0x0 +#define SST_SLI_SLAVE_OWNPCI SST_SCANLINE_SLV_OWNPCI +#define SST_CHUCK_REVISION_ID_SHIFT 12 +#define SST_CHUCK_REVISION_ID (0xF< +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef SST1INIT_ALLOCATE +FILE *sst1InitMsgFile = stdout; +#else +extern FILE *sst1InitMsgFile; +#endif + +#ifdef __cplusplus +} +#endif + +#endif + +/* Maximum number of SST-1 boards supported in system */ +#define SST1INIT_MAX_BOARDS 16 + +/* Maximum number of read pushes in "voodoo.ini" file */ +#define DACRDWR_MAX_PUSH 16 + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef SST1INIT_ALLOCATE + static char headersIdent[] = "@#%Voodoo2 InitHeaders $Revision: 62 $"; + FxBool sst1InitUseVoodooFile = FXFALSE; + sst1InitEnvVarStruct *envVarsBase = (sst1InitEnvVarStruct *) NULL; + sst1InitDacStruct *dacStructBase = (sst1InitDacStruct *) NULL; + sst1InitDacStruct *iniDac = (sst1InitDacStruct *) NULL; + sst1InitDacSetVideoStruct *iniVideo = (sst1InitDacSetVideoStruct *) NULL; + sst1InitDacSetMemClkStruct *iniMemClk = (sst1InitDacSetMemClkStruct *) NULL; + FxU32 iniStack[DACRDWR_MAX_PUSH]; + int iniStackPtr = 0; + sst1DeviceInfoStruct *sst1CurrentBoard; + FxU32 sst1InitDeviceNumber; + sst1DeviceInfoStruct sst1BoardInfo[SST1INIT_MAX_BOARDS]; + FxU32 boardsInSystem; + FxU32 boardsInSystemReally; + FxU32 initIdleEnabled = 1; + + + const PciRegister SST1_PCI_CFG_SCRATCH = { 0x50, 4, READ_WRITE }; + const PciRegister SST1_PCI_SIPROCESS = { 0x54, 4, READ_WRITE }; +#else + extern FxBool sst1InitUseVoodooFile; + extern sst1InitEnvVarStruct *envVarsBase; + extern sst1InitDacStruct *dacStructBase; + extern sst1InitDacStruct *iniDac; + extern sst1InitDacSetVideoStruct *iniVideo; + extern sst1InitDacSetMemClkStruct *iniMemClk; + extern FxU32 iniStack[]; + extern int iniStackPtr; + extern sst1DeviceInfoStruct *sst1CurrentBoard; + extern FxU32 sst1InitDeviceNumber; + extern sst1DeviceInfoStruct sst1BoardInfo[SST1INIT_MAX_BOARDS]; + extern FxU32 boardsInSystem; + extern FxU32 boardsInSystemReally; + extern FxU32 initIdleEnabled; + + extern PciRegister SST1_PCI_CFG_SCRATCH; + extern PciRegister SST1_PCI_SIPROCESS; +#endif /* SST1INIT_ALLOCATE */ + +#ifdef __3Dfx_PCI_CFG__ +/* This is really ugly, but it makes us happy w/ the top of the tree + * pci library which is happier than Gary's library. + */ +#define SST1_PCI_INIT_ENABLE PCI_SST1_INIT_ENABLE +#define SST1_PCI_BUS_SNOOP0 PCI_SST1_BUS_SNOOP_0 +#define SST1_PCI_BUS_SNOOP1 PCI_SST1_BUS_SNOOP_1 +#define SST1_PCI_CFG_STATUS PCI_SST1_CFG_STATUS +#else /* !__3Dfx_PCI_CFG__ */ +#define SST1_PCI_BUS_SNOOP0 SST1_PCI_BUS_SNOOP_0 +#define SST1_PCI_BUS_SNOOP1 SST1_PCI_BUS_SNOOP_1 +#endif /* !__3Dfx_PCI_CFG__ */ + +#ifdef __cplusplus +} +#endif + +#ifdef SST1INIT_VIDEO_ALLOCATE +/* SST1INIT_VIDEO_ALLOCATE is only #defined in video.c + + Define useful clock and video timings + Clocks generated are follows: + Clock Freq. (MHz) = + [14.318 * (clkTiming_M+2)] / [(clkTiming_N+2) * (2^clkTiming_P)] + + Solving for clkTiming_M yields: + clkTiming_M = + [ [(Clock Freq (Mhz)) * (clkTiming_N+2) * (2^clkTiming_P)] / 14.318 ] - 2 + + NOTE: [14.318 * (clkTiming_M+2)] / (clkTiming_N+2) should be between + 120 and 240 + NOTE: Max. M is 127 + NOTE: Max. N is 31 + NOTE: Max. P is 3 + NOTE: Max. L is 15 + NOTE: Max. IB is 15 +*/ + + +/* H3D video timing structures */ +#ifdef H3D +/* This guy's not used anywhere */ +sst1VideoTimingStruct SST_VREZ_640X502_60 = { + 96, /* hSyncOn */ + 704, /* hSyncOff */ + 2, /* vSyncOn */ + 523, /* vSyncOff */ + 38, /* hBackPorch */ + 15, /* vBackPorch */ + 640, /* xDimension */ + 502, /* yDimension */ + 60, /* refreshRate */ + 0, /* miscCtrl */ + 160, /* memOffset */ + 20, /* tilesInX */ + 25, /* vFifoThreshold */ + FXTRUE, /* video16BPPIsOK */ + FXTRUE, /* video24BPPIsOK */ + 25.175F, /* clkFreq16bpp */ + 50.350F /* clkFreq24bpp */ +}; + + +/* Line doubled 640x480...line doubling done externally */ +sst1VideoTimingStruct SST_VREZ_640X960LD_60 = { + 45, /* hSyncOn */ + 785, /* hSyncOff */ + 3, /* vSyncOn */ + 1044, /* vSyncOff */ + 100, /* hBackPorch */ + 18, /* vBackPorch */ + 640, /* xDimension */ + 502, /* yDimension */ + 60, /* refreshRate */ + 0, /* miscCtrl */ + 160, /* memOffset */ + 20, /* tilesInX */ + 23, /* vFifoThreshold */ + FXTRUE, /* video16BPPIsOK */ + FXTRUE, /* video24BPPIsOK */ + 50.82F, /* clkFreq16bpp */ + 101.64F /* clkFreq24bpp */ +}; + + +/* Full resolution 640x480... */ +sst1VideoTimingStruct SST_VREZ_640X960_60 = { + 45, /* hSyncOn */ + 785, /* hSyncOff */ + 3, /* vSyncOn */ + 1044, /* vSyncOff */ + 100, /* hBackPorch */ + 18, /* vBackPorch */ + 640, /* xDimension */ + 1004, /* yDimension */ + 60, /* refreshRate */ + 0, /* miscCtrl */ + 320, /* memOffset */ + 20, /* tilesInX */ + 23, /* vFifoThreshold */ + FXTRUE, /* video16BPPIsOK */ + FXTRUE, /* video24BPPIsOK */ + 50.82F, /* clkFreq16bpp */ + 101.64F /* clkFreq24bpp */ +}; + + +/* Line doubled 800x600...line doubling done externally */ +sst1VideoTimingStruct SST_VREZ_800X1200LD_45 = { + 63, /* hSyncOn */ + 983, /* hSyncOff */ + 3, /* vSyncOn */ + 1242, /* vSyncOff */ + 150, /* hBackPorch */ + 27, /* vBackPorch */ + 800, /* xDimension */ + 608, /* yDimension */ + 42, /* refreshRate */ + 0, /* miscCtrl */ + 247, /* memOffset */ + 26, /* tilesInX */ + 19, /* vFifoThreshold */ + FXTRUE, /* video16BPPIsOK */ + FXTRUE, /* video24BPPIsOK */ + 56.25F, /* clkFreq16bpp */ + 112.5F /* clkFreq24bpp */ +}; + +sst1VideoTimingStruct SST_VREZ_800X630_60 = { + 127, /* hSyncOn */ + 927, /* hSyncOff */ + 4, /* vSyncOn */ + 656, /* vSyncOff */ + 86, /* hBackPorch */ + 23, /* vBackPorch */ + 800, /* xDimension */ + 630, /* yDimension */ + 60, /* refreshRate */ + 0, /* miscCtrl */ + 260, /* memOffset */ + 26, /* tilesInX */ + 23, /* vFifoThreshold */ + FXTRUE, /* video16BPPIsOK */ + FXTRUE, /* video24BPPIsOK */ + 40.0F, /* clkFreq16bpp */ + 80.0F /* clkFreq24bpp */ +}; + + +/* Full res 800x600...so far, ain't nobody got enough memory */ +sst1VideoTimingStruct SST_VREZ_800X1200_45 = { + 63, /* hSyncOn */ + 983, /* hSyncOff */ + 3, /* vSyncOn */ + 1244, /* vSyncOff */ + 150, /* hBackPorch */ + 27, /* vBackPorch */ + 800, /* xDimension */ + 1216, /* yDimension */ + 42, /* refreshRate */ + 0, /* miscCtrl */ + 494, /* memOffset */ + 26, /* tilesInX */ + 19, /* vFifoThreshold */ + FXTRUE, /* video16BPPIsOK */ + FXTRUE, /* video24BPPIsOK */ + 56.25F, /* clkFreq16bpp */ + 112.5F /* clkFreq24bpp */ +}; + +sst1VideoTimingStruct SST_VREZ_960X742_60 = { + 103, /* hSyncOn */ + 1151, /* hSyncOff */ + 3, /* vSyncOn */ + 765, /* vSyncOff */ + 142, /* hBackPorch */ + 22, /* vBackPorch */ + 960, /* xDimension */ + 742, /* yDimension */ + 60, /* refreshRate */ + 0, /* miscCtrl */ + 360, /* memOffset */ + 30, /* tilesInX */ + 19, /* vFifoThreshold */ + FXTRUE, /* video16BPPIsOK */ + FXTRUE, /* video24BPPIsOK */ + 56.219F, /* clkFreq16bpp */ + 112.437F /* clkFreq24bpp */ +}; + +#endif + + +sst1VideoTimingStruct SST_VREZ_320X200_70 = { + 96, /* hSyncOn */ + 704, /* hSyncOff */ + 2, /* vSyncOn */ + 447, /* vSyncOff */ + 48, /* hBackPorch */ + 35, /* vBackPorch */ + 320, /* xDimension */ + 200, /* yDimension */ + 70, /* refreshRate */ + 0x3, /* miscCtrl */ + 35, /* memOffset */ + 10, /* tilesInX */ + 25, /* vFifoThreshold */ + FXTRUE, /* video16BPPIsOK */ + FXTRUE, /* video24BPPIsOK */ + 25.175F, /* clkFreq16bpp */ + 50.350F /* clkFreq24bpp */ +}; + +sst1VideoTimingStruct SST_VREZ_320X200_75 = { + 99, /* hSyncOn */ + 733, /* hSyncOff */ + 3, /* vSyncOn */ + 429, /* vSyncOff */ + 52, /* hBackPorch */ + 25, /* vBackPorch */ + 320, /* xDimension */ + 200, /* yDimension */ + 75, /* refreshRate */ + 0x3, /* miscCtrl */ + 35, /* memOffset */ + 10, /* tilesInX */ + 25, /* vFifoThreshold */ + FXTRUE, /* video16BPPIsOK */ + FXTRUE, /* video24BPPIsOK */ + 27.0F, /* clkFreq16bpp */ + 54.0F /* clkFreq24bpp */ +}; + +sst1VideoTimingStruct SST_VREZ_320X200_85 = { + 63, /* hSyncOn */ + 767, /* hSyncOff */ + 3, /* vSyncOn */ + 442, /* vSyncOff */ + 94, /* hBackPorch */ + 41, /* vBackPorch */ + 320, /* xDimension */ + 200, /* yDimension */ + 85, /* refreshRate */ + 0x3, /* miscCtrl */ + 35, /* memOffset */ + 10, /* tilesInX */ + 23, /* vFifoThreshold */ + FXTRUE, /* video16BPPIsOK */ + FXTRUE, /* video24BPPIsOK */ + 31.5F, /* clkFreq16bpp */ + 63.0F /* clkFreq24bpp */ +}; + +sst1VideoTimingStruct SST_VREZ_320X200_120 = { + 67, /* hSyncOn */ + 798, /* hSyncOff */ + 3, /* vSyncOn */ + 424, /* vSyncOff */ + 94, /* hBackPorch */ + 16, /* vBackPorch */ + 320, /* xDimension */ + 200, /* yDimension */ + 120, /* refreshRate */ + 0x3, /* miscCtrl */ + 35, /* memOffset */ + 10, /* tilesInX */ + 23, /* vFifoThreshold */ + FXTRUE, /* video16BPPIsOK */ + FXTRUE, /* video24BPPIsOK */ + 44.47F, /* clkFreq16bpp */ + 88.94F /* clkFreq24bpp */ +}; + +sst1VideoTimingStruct SST_VREZ_320X240_60 = { + 96, /* hSyncOn */ + 704, /* hSyncOff */ + 2, /* vSyncOn */ + 523, /* vSyncOff */ + 38, /* hBackPorch */ + 25, /* vBackPorch */ + 320, /* xDimension */ + 240, /* yDimension */ + 60, /* refreshRate */ + 0x3, /* miscCtrl */ + 40, /* memOffset */ + 10, /* tilesInX */ + 25, /* vFifoThreshold */ + FXTRUE, /* video16BPPIsOK */ + FXTRUE, /* video24BPPIsOK */ + 25.175F, /* clkFreq16bpp */ + 50.350F /* clkFreq24bpp */ +}; + +sst1VideoTimingStruct SST_VREZ_320X240_75 = { + 63, /* hSyncOn */ + 775, /* hSyncOff */ + 3, /* vSyncOn */ + 497, /* vSyncOff */ + 118, /* hBackPorch */ + 16, /* vBackPorch */ + 320, /* xDimension */ + 240, /* yDimension */ + 75, /* refreshRate */ + 0x3, /* miscCtrl */ + 40, /* memOffset */ + 10, /* tilesInX */ + 25, /* vFifoThreshold */ + FXTRUE, /* video16BPPIsOK */ + FXTRUE, /* video24BPPIsOK */ + 31.5F, /* clkFreq16bpp */ + 63.0F /* clkFreq24bpp */ +}; + +sst1VideoTimingStruct SST_VREZ_320X240_85 = { + 55, /* hSyncOn */ + 776, /* hSyncOff */ + 3, /* vSyncOn */ + 506, /* vSyncOff */ + 78, /* hBackPorch */ + 25, /* vBackPorch */ + 320, /* xDimension */ + 240, /* yDimension */ + 85, /* refreshRate */ + 0x3, /* miscCtrl */ + 40, /* memOffset */ + 10, /* tilesInX */ + 23, /* vFifoThreshold */ + FXTRUE, /* video16BPPIsOK */ + FXTRUE, /* video24BPPIsOK */ + 36.0F, /* clkFreq16bpp */ + 72.0F /* clkFreq24bpp */ +}; + +sst1VideoTimingStruct SST_VREZ_320X240_120 = { + 45, /* hSyncOn */ + 785, /* hSyncOff */ + 3, /* vSyncOn */ + 506, /* vSyncOff */ + 100, /* hBackPorch */ + 18, /* vBackPorch */ + 320, /* xDimension */ + 240, /* yDimension */ + 120, /* refreshRate */ + 0x3, /* miscCtrl */ + 40, /* memOffset */ + 10, /* tilesInX */ + 23, /* vFifoThreshold */ + FXTRUE, /* video16BPPIsOK */ + FXTRUE, /* video24BPPIsOK */ + 50.82F, /* clkFreq16bpp */ + 101.64F /* clkFreq24bpp */ +}; + +sst1VideoTimingStruct SST_VREZ_400X300_60 = { + 39, /* hSyncOn */ + 471, /* hSyncOff */ + 3, /* vSyncOn */ + 619, /* vSyncOff */ + 54, /* hBackPorch */ + 18, /* vBackPorch */ + 400, /* xDimension */ + 300, /* yDimension */ + 60, /* refreshRate */ + 0x2, /* miscCtrl */ + 70, /* memOffset */ + 14, /* tilesInX */ + 23, /* vFifoThreshold */ + FXTRUE, /* video16BPPIsOK */ + FXTRUE, /* video24BPPIsOK */ + 19.108F, /* clkFreq16bpp */ + 38.216F /* clkFreq24bpp */ +}; + +sst1VideoTimingStruct SST_VREZ_400X300_75 = { + 39, /* hSyncOn */ + 487, /* hSyncOff */ + 3, /* vSyncOn */ + 624, /* vSyncOff */ + 62, /* hBackPorch */ + 23, /* vBackPorch */ + 400, /* xDimension */ + 300, /* yDimension */ + 75, /* refreshRate */ + 0x2, /* miscCtrl */ + 70, /* memOffset */ + 14, /* tilesInX */ + 23, /* vFifoThreshold */ + FXTRUE, /* video16BPPIsOK */ + FXTRUE, /* video24BPPIsOK */ + 24.829F, /* clkFreq16bpp */ + 49.658F /* clkFreq24bpp */ +}; + +sst1VideoTimingStruct SST_VREZ_400X300_85 = { + 39, /* hSyncOn */ + 487, /* hSyncOff */ + 3, /* vSyncOn */ + 627, /* vSyncOff */ + 62, /* hBackPorch */ + 26, /* vBackPorch */ + 400, /* xDimension */ + 300, /* yDimension */ + 85, /* refreshRate */ + 0x2, /* miscCtrl */ + 70, /* memOffset */ + 14, /* tilesInX */ + 23, /* vFifoThreshold */ + FXTRUE, /* video16BPPIsOK */ + FXTRUE, /* video24BPPIsOK */ + 28.274F, /* clkFreq16bpp */ + 56.548F /* clkFreq24bpp */ +}; + +sst1VideoTimingStruct SST_VREZ_400X300_120 = { + 39, /* hSyncOn */ + 503, /* hSyncOff */ + 3, /* vSyncOn */ + 640, /* vSyncOff */ + 70, /* hBackPorch */ + 39, /* vBackPorch */ + 400, /* xDimension */ + 300, /* yDimension */ + 120, /* refreshRate */ + 0x2, /* miscCtrl */ + 70, /* memOffset */ + 14, /* tilesInX */ + 23, /* vFifoThreshold */ + FXTRUE, /* video16BPPIsOK */ + FXTRUE, /* video24BPPIsOK */ + 41.975F, /* clkFreq16bpp */ + 83.950F /* clkFreq24bpp */ +}; + +/* 512x256@60 only syncs to Arcade-style monitors */ +sst1VideoTimingStruct SST_VREZ_512X256_60 = { + 41, /* hSyncOn */ + 626, /* hSyncOff */ + 4, /* vSyncOn */ + 286, /* vSyncOff */ + 65, /* hBackPorch */ + 24, /* vBackPorch */ + 512, /* xDimension */ + 256, /* yDimension */ + 60, /* refreshRate */ + 0, /* miscCtrl */ + 64, /* memOffset */ + 16, /* tilesInX */ + 25, /* vFifoThreshold */ + FXFALSE, /* video16BPPIsOK */ + FXTRUE, /* video24BPPIsOK */ + 23.334F, /* clkFreq16bpp */ + 23.334F /* clkFreq24bpp */ +}; + +#if 0 +// For Arcade monitors... +sst1VideoTimingStruct SST_VREZ_512X384_60 = { + 23, /* hSyncOn */ + 640, /* hSyncOff */ + 3, /* vSyncOn */ + 411, /* vSyncOff */ + 90, /* hBackPorch */ + 24, /* vBackPorch */ + 512, /* xDimension */ + 384, /* yDimension */ + 60, /* refreshRate */ + 0, /* miscCtrl */ + 96, /* memOffset */ + 16, /* tilesInX */ + 23, /* vFifoThreshold */ + FXFALSE, /* video16BPPIsOK */ + FXTRUE, /* video24BPPIsOK */ + 33.0F, /* clkFreq16bpp */ + 33.0F /* clkFreq24bpp */ +}; +#else +// For PC monitors... +sst1VideoTimingStruct SST_VREZ_512X384_60 = { + 55, /* hSyncOn */ + 615, /* hSyncOff */ + 3, /* vSyncOn */ + 792, /* vSyncOff */ + 78, /* hBackPorch */ + 23, /* vBackPorch */ + 512, /* xDimension */ + 384, /* yDimension */ + 60, /* refreshRate */ + 0x2, /* miscCtrl */ + 96, /* memOffset */ + 16, /* tilesInX */ + 23, /* vFifoThreshold */ + FXTRUE, /* video16BPPIsOK */ + FXTRUE, /* video24BPPIsOK */ + 32.054F, /* clkFreq16bpp */ + 64.108F /* clkFreq24bpp */ +}; +#endif + +sst1VideoTimingStruct SST_VREZ_512X384_72 = { + 51, /* hSyncOn */ + 591, /* hSyncOff */ + 3, /* vSyncOn */ + 430, /* vSyncOff */ + 55, /* hBackPorch */ + 25, /* vBackPorch */ + 512, /* xDimension */ + 384, /* yDimension */ + 72, /* refreshRate */ + 0, /* miscCtrl */ + 96, /* memOffset */ + 16, /* tilesInX */ + 23, /* vFifoThreshold */ + FXTRUE, /* video16BPPIsOK */ + FXTRUE, /* video24BPPIsOK */ + 20.093F, /* clkFreq16bpp */ + 40.186F /* clkFreq24bpp */ +}; + +sst1VideoTimingStruct SST_VREZ_512X384_75 = { + 55, /* hSyncOn */ + 631, /* hSyncOff */ + 3, /* vSyncOn */ + 799, /* vSyncOff */ + 86, /* hBackPorch */ + 30, /* vBackPorch */ + 512, /* xDimension */ + 384, /* yDimension */ + 75, /* refreshRate */ + 0x2, /* miscCtrl */ + 96, /* memOffset */ + 16, /* tilesInX */ + 23, /* vFifoThreshold */ + FXTRUE, /* video16BPPIsOK */ + FXTRUE, /* video24BPPIsOK */ + 41.383F, /* clkFreq16bpp */ + 82.766F /* clkFreq24bpp */ +}; + +sst1VideoTimingStruct SST_VREZ_512X384_75_NOSCANDOUBLE = { + 47, /* hSyncOn */ + 591, /* hSyncOff */ + 3, /* vSyncOn */ + 399, /* vSyncOff */ + 62, /* hBackPorch */ + 14, /* vBackPorch */ + 512, /* xDimension */ + 384, /* yDimension */ + 75, /* refreshRate */ + 0, /* miscCtrl */ + 96, /* memOffset */ + 16, /* tilesInX */ + 23, /* vFifoThreshold */ + FXTRUE, /* video16BPPIsOK */ + FXTRUE, /* video24BPPIsOK */ + 19.296F, /* clkFreq16bpp */ + 38.592F /* clkFreq24bpp */ +}; + +sst1VideoTimingStruct SST_VREZ_512X384_85 = { + 55, /* hSyncOn */ + 631, /* hSyncOff */ + 3, /* vSyncOn */ + 804, /* vSyncOff */ + 86, /* hBackPorch */ + 35, /* vBackPorch */ + 512, /* xDimension */ + 384, /* yDimension */ + 85, /* refreshRate */ + 0x2, /* miscCtrl */ + 96, /* memOffset */ + 16, /* tilesInX */ + 23, /* vFifoThreshold */ + FXTRUE, /* video16BPPIsOK */ + FXTRUE, /* video24BPPIsOK */ + 47.193F, /* clkFreq16bpp */ + 94.386F /* clkFreq24bpp */ +}; + +sst1VideoTimingStruct SST_VREZ_512X384_85_NOSCANDOUBLE = { + 55, /* hSyncOn */ + 599, /* hSyncOff */ + 3, /* vSyncOn */ + 401, /* vSyncOff */ + 70, /* hBackPorch */ + 16, /* vBackPorch */ + 512, /* xDimension */ + 384, /* yDimension */ + 85, /* refreshRate */ + 0, /* miscCtrl */ + 96, /* memOffset */ + 16, /* tilesInX */ + 23, /* vFifoThreshold */ + FXTRUE, /* video16BPPIsOK */ + FXTRUE, /* video24BPPIsOK */ + 22.527F, /* clkFreq16bpp */ + 45.054F /* clkFreq24bpp */ +}; + +sst1VideoTimingStruct SST_VREZ_512X384_120 = { + 25, /* hSyncOn */ + 650, /* hSyncOff */ + 3, /* vSyncOn */ + 409, /* vSyncOff */ + 110, /* hBackPorch */ + 25, /* vBackPorch */ + 512, /* xDimension */ + 384, /* yDimension */ + 120, /* refreshRate */ + 0, /* miscCtrl */ + 96, /* memOffset */ + 16, /* tilesInX */ + 25, /* vFifoThreshold */ + FXTRUE, /* video16BPPIsOK */ + FXTRUE, /* video24BPPIsOK */ + 33.5F, /* clkFreq16bpp */ + 67.0F /* clkFreq24bpp */ +}; + +/* Verified 10/21/96 */ +sst1VideoTimingStruct SST_VREZ_640X400_70 = { + 96, /* hSyncOn */ + 704, /* hSyncOff */ + 2, /* vSyncOn */ + 447, /* vSyncOff */ + 48, /* hBackPorch */ + 35, /* vBackPorch */ + 640, /* xDimension */ + 400, /* yDimension */ + 70, /* refreshRate */ + 0, /* miscCtrl */ + 130, /* memOffset */ + 20, /* tilesInX */ + 25, /* vFifoThreshold */ + FXTRUE, /* video16BPPIsOK */ + FXTRUE, /* video24BPPIsOK */ + 25.175F, /* clkFreq16bpp */ + 50.350F /* clkFreq24bpp */ +}; + +/* Verified 10/21/96 */ +sst1VideoTimingStruct SST_VREZ_640X400_75 = { + 99, /* hSyncOn */ + 733, /* hSyncOff */ + 3, /* vSyncOn */ + 429, /* vSyncOff */ + 52, /* hBackPorch */ + 25, /* vBackPorch */ + 640, /* xDimension */ + 400, /* yDimension */ + 75, /* refreshRate */ + 0, /* miscCtrl */ + 130, /* memOffset */ + 20, /* tilesInX */ + 25, /* vFifoThreshold */ + FXTRUE, /* video16BPPIsOK */ + FXTRUE, /* video24BPPIsOK */ + 27.0F, /* clkFreq16bpp */ + 54.0F /* clkFreq24bpp */ +}; + +/* VESA Standard */ +/* Verified 10/21/96 */ +sst1VideoTimingStruct SST_VREZ_640X400_85 = { + 63, /* hSyncOn */ + 767, /* hSyncOff */ + 3, /* vSyncOn */ + 442, /* vSyncOff */ + 94, /* hBackPorch */ + 41, /* vBackPorch */ + 640, /* xDimension */ + 400, /* yDimension */ + 85, /* refreshRate */ + 0, /* miscCtrl */ + 130, /* memOffset */ + 20, /* tilesInX */ + 23, /* vFifoThreshold */ + FXTRUE, /* video16BPPIsOK */ + FXTRUE, /* video24BPPIsOK */ + 31.5F, /* clkFreq16bpp */ + 63.0F /* clkFreq24bpp */ +}; + +/* Verified 10/21/96 */ +sst1VideoTimingStruct SST_VREZ_640X400_120 = { + 67, /* hSyncOn */ + 798, /* hSyncOff */ + 3, /* vSyncOn */ + 424, /* vSyncOff */ + 94, /* hBackPorch */ + 16, /* vBackPorch */ + 640, /* xDimension */ + 400, /* yDimension */ + 120, /* refreshRate */ + 0, /* miscCtrl */ + 130, /* memOffset */ + 20, /* tilesInX */ + 23, /* vFifoThreshold */ + FXTRUE, /* video16BPPIsOK */ + FXTRUE, /* video24BPPIsOK */ + 44.47F, /* clkFreq16bpp */ + 88.94F /* clkFreq24bpp */ +}; + +/* VESA Standard */ +/* Verified 10/21/96 */ +sst1VideoTimingStruct SST_VREZ_640X480_60 = { + 96, /* hSyncOn */ + + 704, /* hSyncOff */ + 2, /* vSyncOn */ + 523, /* vSyncOff */ + 38, /* hBackPorch */ + 25, /* vBackPorch */ + 640, /* xDimension */ + 480, /* yDimension */ + 60, /* refreshRate */ + 0, /* miscCtrl */ + 150, /* memOffset */ + 20, /* tilesInX */ + 25, /* vFifoThreshold */ + FXTRUE, /* video16BPPIsOK */ + FXTRUE, /* video24BPPIsOK */ + 25.175F, /* clkFreq16bpp */ + 50.350F /* clkFreq24bpp */ +}; + +/* VESA Standard */ +/* Verified 10/21/96 */ +sst1VideoTimingStruct SST_VREZ_640X480_75 = { + 63, /* hSyncOn */ + 775, /* hSyncOff */ + 3, /* vSyncOn */ + 497, /* vSyncOff */ + 118, /* hBackPorch */ + 16, /* vBackPorch */ + 640, /* xDimension */ + 480, /* yDimension */ + 75, /* refreshRate */ + 0, /* miscCtrl */ + 150, /* memOffset */ + 20, /* tilesInX */ + 25, /* vFifoThreshold */ + FXTRUE, /* video16BPPIsOK */ + FXTRUE, /* video24BPPIsOK */ + 31.5F, /* clkFreq16bpp */ + 63.0F /* clkFreq24bpp */ +}; + +/* VESA Standard */ +/* Verified 10/21/96 */ +sst1VideoTimingStruct SST_VREZ_640X480_85 = { + 55, /* hSyncOn */ + 776, /* hSyncOff */ + 3, /* vSyncOn */ + 506, /* vSyncOff */ + 78, /* hBackPorch */ + 25, /* vBackPorch */ + 640, /* xDimension */ + 480, /* yDimension */ + 85, /* refreshRate */ + 0, /* miscCtrl */ + 150, /* memOffset */ + 20, /* tilesInX */ + 23, /* vFifoThreshold */ + FXTRUE, /* video16BPPIsOK */ + FXTRUE, /* video24BPPIsOK */ + 36.0F, /* clkFreq16bpp */ + 72.0F /* clkFreq24bpp */ +}; + +/* Verified 10/21/96 */ +sst1VideoTimingStruct SST_VREZ_640X480_120 = { + 45, /* hSyncOn */ + 785, /* hSyncOff */ + 3, /* vSyncOn */ + 506, /* vSyncOff */ + 100, /* hBackPorch */ + 18, /* vBackPorch */ + 640, /* xDimension */ + 480, /* yDimension */ + 120, /* refreshRate */ + 0, /* miscCtrl */ + 150, /* memOffset */ + 20, /* tilesInX */ + 23, /* vFifoThreshold */ + FXTRUE, /* video16BPPIsOK */ + FXTRUE, /* video24BPPIsOK */ + 50.82F, /* clkFreq16bpp */ + 101.64F /* clkFreq24bpp */ +}; + +/* VESA Standard */ +/* Verified 10/21/96 */ +// 800x600 requires 832x608 amount of memory usage... +sst1VideoTimingStruct SST_VREZ_800X600_60 = { + 127, /* hSyncOn */ + 927, /* hSyncOff */ + 4, /* vSyncOn */ + 624, /* vSyncOff */ + 86, /* hBackPorch */ + 23, /* vBackPorch */ + 800, /* xDimension */ + 600, /* yDimension */ + 60, /* refreshRate */ + 0, /* miscCtrl */ + 247, /* memOffset */ + 26, /* tilesInX */ + 23, /* vFifoThreshold */ + FXTRUE, /* video16BPPIsOK */ + FXTRUE, /* video24BPPIsOK */ + 40.0F, /* clkFreq16bpp */ + 80.0F /* clkFreq24bpp */ +}; + +/* VESA Standard */ +/* Verified 10/21/96 */ +sst1VideoTimingStruct SST_VREZ_800X600_75 = { + 79, /* hSyncOn */ + 975, /* hSyncOff */ + 3, /* vSyncOn */ + 622, /* vSyncOff */ + 158, /* hBackPorch */ + 21, /* vBackPorch */ + 800, /* xDimension */ + 600, /* yDimension */ + 75, /* refreshRate */ + 0, /* miscCtrl */ + 247, /* memOffset */ + 26, /* tilesInX */ + 21, /* vFifoThreshold */ + FXTRUE, /* video16BPPIsOK */ + FXTRUE, /* video24BPPIsOK */ + 49.5F, /* clkFreq16bpp */ + 99.0F /* clkFreq24bpp */ +}; + +/* VESA Standard */ +/* Verified 10/21/96 */ +sst1VideoTimingStruct SST_VREZ_800X600_85 = { + 63, /* hSyncOn */ + 983, /* hSyncOff */ + 3, /* vSyncOn */ + 628, /* vSyncOff */ + 150, /* hBackPorch */ + 27, /* vBackPorch */ + 800, /* xDimension */ + 600, /* yDimension */ + 85, /* refreshRate */ + 0, /* miscCtrl */ + 247, /* memOffset */ + 26, /* tilesInX */ + 19, /* vFifoThreshold */ + FXTRUE, /* video16BPPIsOK */ + FXTRUE, /* video24BPPIsOK */ + 56.25F, /* clkFreq16bpp */ + 112.5F /* clkFreq24bpp */ +}; + +sst1VideoTimingStruct SST_VREZ_800X600_120 = { + 87, /* hSyncOn */ + 999, /* hSyncOff */ + 3, /* vSyncOn */ + 640, /* vSyncOff */ + 142, /* hBackPorch */ + 39, /* vBackPorch */ + 800, /* xDimension */ + 600, /* yDimension */ + 120, /* refreshRate */ + 0, /* miscCtrl */ + 247, /* memOffset */ + 26, /* tilesInX */ + 17, /* vFifoThreshold */ + FXTRUE, /* video16BPPIsOK */ + FXFALSE, /* video24BPPIsOK */ + 83.950F, /* clkFreq16bpp */ + 83.950F /* clkFreq24bpp -- unsupported */ +}; + +// 856x480 requires 896x480 amount of memory usage... +sst1VideoTimingStruct SST_VREZ_856X480_60 = { + 136, /* hSyncOn */ + 1008, /* hSyncOff */ + 2, /* vSyncOn */ + 523, /* vSyncOff */ + 100, /* hBackPorch */ + 23, /* vBackPorch */ + 856, /* xDimension */ + 480, /* yDimension */ + 60, /* refreshRate */ + 0, /* miscCtrl */ + 210, /* memOffset */ + 28, /* tilesInX */ + 16, /* vFifoThreshold */ + FXTRUE, /* video16BPPIsOK */ + FXTRUE, /* video24BPPIsOK */ + 36.0F, /* clkFreq16bpp */ + 72.0F /* clkFreq24bpp */ +}; + +// 960x720 requires 960x736 amount of memory usage... +sst1VideoTimingStruct SST_VREZ_960X720_60 = { + 103, /* hSyncOn */ + 1151, /* hSyncOff */ + 3, /* vSyncOn */ + 743, /* vSyncOff */ + 142, /* hBackPorch */ + 22, /* vBackPorch */ + 960, /* xDimension */ + 720, /* yDimension */ + 60, /* refreshRate */ + 0, /* miscCtrl */ + 345, /* memOffset */ + 30, /* tilesInX */ + 19, /* vFifoThreshold */ + FXTRUE, /* video16BPPIsOK */ + FXTRUE, /* video24BPPIsOK */ + 56.219F, /* clkFreq16bpp */ + 112.437F /* clkFreq24bpp */ +}; + +sst1VideoTimingStruct SST_VREZ_960X720_75 = { + 103, /* hSyncOn */ + 1183, /* hSyncOff */ + 3, /* vSyncOn */ + 749, /* vSyncOff */ + 158, /* hBackPorch */ + 28, /* vBackPorch */ + 960, /* xDimension */ + 720, /* yDimension */ + 75, /* refreshRate */ + 0, /* miscCtrl */ + 345, /* memOffset */ + 30, /* tilesInX */ + 19, /* vFifoThreshold */ + FXTRUE, /* video16BPPIsOK */ + FXFALSE, /* video24BPPIsOK */ + 72.643F, /* clkFreq16bpp */ + 72.643F /* clkFreq24bpp -- unsupported */ +}; + +sst1VideoTimingStruct SST_VREZ_960X720_85 = { + 103, /* hSyncOn */ + 1199, /* hSyncOff */ + 3, /* vSyncOn */ + 753, /* vSyncOff */ + 166, /* hBackPorch */ + 32, /* vBackPorch */ + 960, /* xDimension */ + 720, /* yDimension */ + 85, /* refreshRate */ + 0, /* miscCtrl */ + 345, /* memOffset */ + 30, /* tilesInX */ + 19, /* vFifoThreshold */ + FXTRUE, /* video16BPPIsOK */ + FXFALSE, /* video24BPPIsOK */ + 83.795F, /* clkFreq16bpp */ + 83.795F /* clkFreq24bpp -- unsupported */ +}; + +sst1VideoTimingStruct SST_VREZ_1024X768_60 = { + 136, /* hSyncOn */ + 1208, /* hSyncOff */ + 6, /* vSyncOn */ + 800, /* vSyncOff */ + 160, /* hBackPorch */ + 29, /* vBackPorch */ + 1024, /* xDimension */ + 768, /* yDimension */ + 60, /* refreshRate */ + 0, /* miscCtrl */ + 384, /* memOffset */ + 32, /* tilesInX */ + 16, /* vFifoThreshold */ + FXTRUE, /* video16BPPIsOK */ + FXFALSE, /* video24BPPIsOK */ + 65.0F, /* clkFreq16bpp */ + 130.0F /* clkFreq24bpp */ +}; + +sst1VideoTimingStruct SST_VREZ_1024X768_75 = { + 96, /* hSyncOn */ + 1216, /* hSyncOff */ + 3, /* vSyncOn */ + 797, /* vSyncOff */ + 176, /* hBackPorch */ + 28, /* vBackPorch */ + 1024, /* xDimension */ + 768, /* yDimension */ + 75, /* refreshRate */ + 0, /* miscCtrl */ + 384, /* memOffset */ + 32, /* tilesInX */ + 16, /* vFifoThreshold */ + FXTRUE, /* video16BPPIsOK */ + FXFALSE, /* video24BPPIsOK */ + 78.75F, /* clkFreq16bpp */ + 78.75F /* clkFreq24bpp -- unsupported */ +}; + +sst1VideoTimingStruct SST_VREZ_1024X768_85 = { + 96, /* hSyncOn */ + 1280, /* hSyncOff */ + 3, /* vSyncOn */ + 805, /* vSyncOff */ + 208, /* hBackPorch */ + 36, /* vBackPorch */ + 1024, /* xDimension */ + 768, /* yDimension */ + 85, /* refreshRate */ + 0, /* miscCtrl */ + 384, /* memOffset */ + 32, /* tilesInX */ + 16, /* vFifoThreshold */ + FXTRUE, /* video16BPPIsOK */ + FXFALSE, /* video24BPPIsOK */ + 94.5F, /* clkFreq16bpp */ + 94.5F /* clkFreq24bpp -- unsupported */ +}; + +#else /* SST1INIT_VIDEO_ALLOCATE */ + + +#ifdef __cplusplus +extern "C" { +#endif + +extern sst1VideoTimingStruct SST_VREZ_640X480_60; +extern sst1VideoTimingStruct SST_VREZ_800X600_60; + +#ifdef __cplusplus +} +#endif + +#endif /* SST1INIT_VIDEO_ALLOCATE */ + +#endif /* !__SST1INIT_H__ */ diff --git a/build/dxwnd.dll b/build/dxwnd.dll index f9d7c81..60a2783 100644 --- a/build/dxwnd.dll +++ b/build/dxwnd.dll @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:03271f56101f397e9d6ffc4c966d04af5ae7a94e2dfd2df958d185363586a74a -size 446976 +oid sha256:f5ca6f4d3ce49c5e35b6ced416a8e48d7948813d8994ff1fefcb656817359bb8 +size 448512 diff --git a/build/dxwnd.exe b/build/dxwnd.exe index 61146d9..c754c5b 100644 --- a/build/dxwnd.exe +++ b/build/dxwnd.exe @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8621dc8cebb19d5e945aeba4932dff40115f73c88209fe39e4388bef4822f621 +oid sha256:6b5fbb1db51dc2da5ddf88d048bb24471391cc9f1ff80e96a27c916198cc6f4b size 535040 diff --git a/build/dxwnd.ini b/build/dxwnd.ini index 5c093a9..fab5947 100644 --- a/build/dxwnd.ini +++ b/build/dxwnd.ini @@ -84,7 +84,7 @@ flag3=671088674 flagg3=-939524096 flagh3=20 flagi3=4 -tflag3=3 +tflag3=2 initx3=0 inity3=0 minx3=0 @@ -249,17 +249,17 @@ maxfps9=0 initts9=0 winver9=0 maxres9=0 -title10=Bomberbabe -path10=D:\Games\Ludonic\Bomberbabe.exe +title10=Black Moon Chronicles +path10=D:\Games\Black Moon Chronicles\Lune noire\Engine.exe module10= opengllib10= ver10=0 coord10=0 -flag10=671088674 -flagg10=1207959552 -flagh10=20 +flag10=134234146 +flagg10=1207959568 +flagh10=32788 flagi10=4 -tflag10=0 +tflag10=6210 initx10=0 inity10=0 minx10=0 @@ -273,18 +273,18 @@ sizy10=600 maxfps10=0 initts10=0 winver10=0 -maxres10=0 -title11=Bunnies must die -path11=D:\Games\Bunnies must die\bmd.exe +maxres10=-1 +title11=Bomberbabe +path11=D:\Games\Ludonic\Bomberbabe.exe module11= opengllib11= -ver11=1 +ver11=0 coord11=0 -flag11=142606370 -flagg11=1744830465 -flagh11=65556 +flag11=671088674 +flagg11=1207959552 +flagh11=20 flagi11=4 -tflag11=258 +tflag11=0 initx11=0 inity11=0 minx11=0 @@ -299,17 +299,17 @@ maxfps11=0 initts11=0 winver11=0 maxres11=0 -title12=Carmageddon 2 (GLIDE) -path12=D:\Games\Carmageddon_2\carma2_HW.exe +title12=Bunnies must die +path12=D:\Games\Bunnies must die\bmd.exe module12= opengllib12= -ver12=0 +ver12=1 coord12=0 -flag12=134217730 -flagg12=1208025088 -flagh12=20 -flagi12=12 -tflag12=0 +flag12=142606370 +flagg12=1744830465 +flagh12=65556 +flagi12=4 +tflag12=258 initx12=0 inity12=0 minx12=0 @@ -324,15 +324,15 @@ maxfps12=0 initts12=0 winver12=0 maxres12=0 -title13=Carmageddon 2 (SW) -path13=D:\Games\Carmageddon_2\carma2_SW.exe +title13=Carmageddon 2 (GLIDE) +path13=D:\Games\Carmageddon_2\carma2_HW.exe module13= opengllib13= ver13=0 coord13=0 -flag13=671088674 +flag13=134217730 flagg13=1208025088 -flagh13=33562644 +flagh13=20 flagi13=12 tflag13=0 initx13=0 @@ -349,16 +349,16 @@ maxfps13=0 initts13=0 winver13=0 maxres13=0 -title14=Cave Story -path14=D:\Games\Cave Story\Doukutsu.exe +title14=Carmageddon 2 (SW) +path14=D:\Games\Carmageddon_2\carma2_SW.exe module14= opengllib14= ver14=0 coord14=0 -flag14=134217762 -flagg14=1207959552 -flagh14=20 -flagi14=4 +flag14=671088674 +flagg14=1208025088 +flagh14=33562644 +flagi14=12 tflag14=0 initx14=0 inity14=0 @@ -374,17 +374,17 @@ maxfps14=0 initts14=0 winver14=0 maxres14=0 -title15=Crimson Skies -path15=D:\Games\Crimson_Skies\crimson.exe +title15=Cave Story +path15=D:\Games\Cave Story\Doukutsu.exe module15= opengllib15= -ver15=7 +ver15=0 coord15=0 -flag15=134234148 -flagg15=-939524096 +flag15=134217762 +flagg15=1207959552 flagh15=20 -flagi15=36 -tflag15=259 +flagi15=4 +tflag15=0 initx15=0 inity15=0 minx15=0 @@ -399,17 +399,17 @@ maxfps15=0 initts15=0 winver15=0 maxres15=0 -title16=Daikatana -path16=D:\Games\Daikatana\daikatana.exe +title16=Crimson Skies +path16=D:\Games\Crimson_Skies\crimson.exe module16= opengllib16= -ver16=12 +ver16=7 coord16=0 -flag16=269492742 -flagg16=537002497 +flag16=134234148 +flagg16=-939524096 flagh16=20 -flagi16=0 -tflag16=2 +flagi16=36 +tflag16=258 initx16=0 inity16=0 minx16=0 @@ -424,17 +424,17 @@ maxfps16=0 initts16=0 winver16=0 maxres16=0 -title17=Devastation -path17=D:\Games\Devastation\System\Devastation.exe +title17=Daikatana +path17=D:\Games\Daikatana\daikatana.exe module17= opengllib17= -ver17=0 +ver17=12 coord17=0 -flag17=167772198 -flagg17=1209008128 -flagh17=65556 -flagi17=2 -tflag17=322 +flag17=269492742 +flagg17=537002497 +flagh17=20 +flagi17=0 +tflag17=2 initx17=0 inity17=0 minx17=0 @@ -443,22 +443,22 @@ maxx17=0 maxy17=0 posx17=50 posy17=50 -sizx17=320 -sizy17=240 +sizx17=800 +sizy17=600 maxfps17=0 initts17=0 winver17=0 maxres17=0 -title18=Doom Shareware for Windows 95 -path18=D:\Games\Doom Shareware for Windows 95\Doom95.exe +title18=Dark Reign 1.7 +path18=D:\Games\Dark Reign 1.7\dkreign.exe module18= opengllib18= ver18=0 coord18=2 flag18=134217762 -flagg18=1207959568 +flagg18=1208025104 flagh18=20 -flagi18=0 +flagi18=4 tflag18=0 initx18=0 inity18=0 @@ -471,20 +471,20 @@ posy18=50 sizx18=800 sizy18=600 maxfps18=0 -initts18=0 +initts18=-4 winver18=0 -maxres18=0 -title19=Dracula Twins -path19=D:\Games\Dracula Twins\DraculaTwins.exe +maxres18=-1 +title19=Dark Vengeance +path19=D:\Games\dark_vengeance\dv.exe module19= opengllib19= ver19=0 coord19=0 -flag19=134217762 -flagg19=1207959552 -flagh19=20 +flag19=136314915 +flagg19=1476395008 +flagh19=65556 flagi19=4 -tflag19=0 +tflag19=2048 initx19=0 inity19=0 minx19=0 @@ -498,18 +498,18 @@ sizy19=600 maxfps19=0 initts19=0 winver19=0 -maxres19=0 -title20=Duckman -path20=D:\Games\Duckman\DUCKMAN.EXE +maxres19=-1 +title20=Devastation +path20=D:\Games\Devastation\System\Devastation.exe module20= opengllib20= ver20=0 coord20=0 -flag20=134217762 +flag20=167772198 flagg20=1209008128 -flagh20=33554452 -flagi20=4 -tflag20=3 +flagh20=65556 +flagi20=2 +tflag20=322 initx20=0 inity20=0 minx20=0 @@ -518,22 +518,22 @@ maxx20=0 maxy20=0 posx20=50 posy20=50 -sizx20=800 -sizy20=600 +sizx20=320 +sizy20=240 maxfps20=0 initts20=0 winver20=0 maxres20=0 -title21=Duke Nukem 3D -path21=D:\Games\Duke3d\DUKE3D.EXE +title21=Doom Shareware for Windows 95 +path21=D:\Games\Doom Shareware for Windows 95\Doom95.exe module21= opengllib21= ver21=0 -coord21=0 +coord21=2 flag21=134217762 -flagg21=1207959552 +flagg21=1207959568 flagh21=20 -flagi21=4 +flagi21=0 tflag21=0 initx21=0 inity21=0 @@ -549,17 +549,17 @@ maxfps21=0 initts21=0 winver21=0 maxres21=0 -title22=Dungeon Keeper 2 (GOG) -path22=D:\Games\Dungeon Keeper 2 (GOG)\DKII.EXE +title22=Dracula Twins +path22=D:\Games\Dracula Twins\DraculaTwins.exe module22= opengllib22= ver22=0 coord22=0 -flag22=136331298 -flagg22=1241513984 +flag22=134217762 +flagg22=1207959552 flagh22=20 -flagi22=0 -tflag22=258 +flagi22=4 +tflag22=0 initx22=0 inity22=0 minx22=0 @@ -574,17 +574,17 @@ maxfps22=0 initts22=0 winver22=0 maxres22=0 -title23=Dungeon Lords MMXII -path23=D:\Games\Dungeon Lords MMXII\dlords2012.exe +title23=Duckman +path23=D:\Games\Duckman\DUCKMAN.EXE module23= opengllib23= ver23=0 coord23=0 flag23=134217762 -flagg23=1207959552 -flagh23=20 +flagg23=1209008128 +flagh23=33554452 flagi23=4 -tflag23=0 +tflag23=2 initx23=0 inity23=0 minx23=0 @@ -599,17 +599,17 @@ maxfps23=0 initts23=0 winver23=0 maxres23=0 -title24=Empire Earth -path24=D:\Games\Empire Earth\Empire Earth.exe -module24= +title24=Duke Nukem - Manhattan Project (D3D8) +path24=D:\Games\Duke Nukem - Manhattan Project\prism3d.exe +module24=p3shared opengllib24= -ver24=0 +ver24=8 coord24=0 -flag24=-1459617632 -flagg24=201326848 -flagh24=84 -flagi24=0 -tflag24=262 +flag24=134217762 +flagg24=1208090624 +flagh24=20 +flagi24=4 +tflag24=0 initx24=0 inity24=0 minx24=0 @@ -618,23 +618,23 @@ maxx24=0 maxy24=0 posx24=50 posy24=50 -sizx24=0 -sizy24=0 +sizx24=800 +sizy24=600 maxfps24=0 initts24=0 winver24=0 -maxres24=0 -title25=F-16 Fighting Falcon -path25=D:\Games\F16\f1695.exe +maxres24=-1 +title25=Duke Nukem 3D +path25=D:\Games\Duke3d\DUKE3D.EXE module25= opengllib25= ver25=0 coord25=0 -flag25=134217826 -flagg25=1209008128 +flag25=134217762 +flagg25=1207959552 flagh25=20 flagi25=4 -tflag25=258 +tflag25=0 initx25=0 inity25=0 minx25=0 @@ -649,17 +649,17 @@ maxfps25=0 initts25=0 winver25=0 maxres25=0 -title26=Fate -path26=D:\Games\Fate\Fate.exe +title26=Dungeon Keeper 2 (GOG) +path26=D:\Games\Dungeon Keeper 2 (GOG)\DKII.EXE module26= opengllib26= ver26=0 coord26=0 -flag26=134217762 -flagg26=1207959552 +flag26=136331298 +flagg26=1241513984 flagh26=20 -flagi26=4 -tflag26=0 +flagi26=0 +tflag26=258 initx26=0 inity26=0 minx26=0 @@ -674,17 +674,17 @@ maxfps26=0 initts26=0 winver26=0 maxres26=0 -title27=Fighting Force -path27=D:\Games\Fighting Force\game\fforce.exe +title27=Dungeon Lords MMXII +path27=D:\Games\Dungeon Lords MMXII\dlords2012.exe module27= opengllib27= ver27=0 coord27=0 -flag27=134217824 +flag27=134217762 flagg27=1207959552 flagh27=20 flagi27=4 -tflag27=6163 +tflag27=0 initx27=0 inity27=0 minx27=0 @@ -699,17 +699,17 @@ maxfps27=0 initts27=0 winver27=0 maxres27=0 -title28=Gangsters -path28=D:\Games\Gangsters\gangsters.exe +title28=Empire Earth +path28=D:\Games\Empire Earth\Empire Earth.exe module28= opengllib28= ver28=0 coord28=0 -flag28=1208483874 -flagg28=1209008128 -flagh28=20 -flagi28=4 -tflag28=0 +flag28=-1459617632 +flagg28=201326848 +flagh28=84 +flagi28=0 +tflag28=262 initx28=0 inity28=0 minx28=0 @@ -718,23 +718,23 @@ maxx28=0 maxy28=0 posx28=50 posy28=50 -sizx28=800 -sizy28=600 +sizx28=0 +sizy28=0 maxfps28=0 initts28=0 winver28=0 maxres28=0 -title29=Grand Prix Legends -path29=D:\Games\gpl\gpl.exe +title29=F-16 Fighting Falcon +path29=D:\Games\F16\f1695.exe module29= opengllib29= ver29=0 coord29=0 -flag29=679485472 -flagg29=-939524096 +flag29=134217826 +flagg29=1209008128 flagh29=20 flagi29=4 -tflag29=0 +tflag29=258 initx29=0 inity29=0 minx29=0 @@ -749,16 +749,16 @@ maxfps29=0 initts29=0 winver29=0 maxres29=0 -title30=Grand Prix World -path30=D:\Games\Grand Prix World\gpwxp2.exe +title30=Fate +path30=D:\Games\Fate\Fate.exe module30= opengllib30= ver30=0 coord30=0 flag30=134217762 -flagg30=135266432 +flagg30=1207959552 flagh30=20 -flagi30=0 +flagi30=4 tflag30=0 initx30=0 inity30=0 @@ -774,17 +774,17 @@ maxfps30=0 initts30=0 winver30=0 maxres30=0 -title31=GTA 3 -path31=D:\Games\GTA3\gta3.exe +title31=Fighting Force +path31=D:\Games\Fighting Force\game\fforce.exe module31= opengllib31= ver31=0 coord31=0 -flag31=134217762 +flag31=134217824 flagg31=1207959552 flagh31=20 flagi31=4 -tflag31=258 +tflag31=6162 initx31=0 inity31=0 minx31=0 @@ -799,17 +799,17 @@ maxfps31=0 initts31=0 winver31=0 maxres31=0 -title32=Half-Life -path32=D:\Games\Half-Life\hl.exe +title32=Gangsters +path32=D:\Games\Gangsters\gangsters.exe module32= opengllib32= -ver32=12 +ver32=0 coord32=0 -flag32=1207959584 -flagg32=1209139200 -flagh32=16 -flagi32=2060 -tflag32=4097 +flag32=1208483874 +flagg32=1209008128 +flagh32=20 +flagi32=4 +tflag32=0 initx32=0 inity32=0 minx32=0 @@ -824,17 +824,17 @@ maxfps32=0 initts32=0 winver32=0 maxres32=0 -title33=Hearts of Iron 2 -path33=D:\Games\Hearts of Iron 2\HoI2.exe +title33=Grand Prix Legends +path33=D:\Games\gpl\gpl.exe module33= opengllib33= ver33=0 -coord33=2 -flag33=939526179 -flagg33=1207959568 -flagh33=32788 -flagi33=2 -tflag33=2 +coord33=0 +flag33=679485472 +flagg33=-939524096 +flagh33=20 +flagi33=4 +tflag33=0 initx33=0 inity33=0 minx33=0 @@ -849,17 +849,17 @@ maxfps33=0 initts33=0 winver33=0 maxres33=0 -title34=Heroes of Might and Magic IV -path34=D:\Games\Heroes of Might and Magic IV\heroes4.exe +title34=Grand Prix World +path34=D:\Games\Grand Prix World\gpwxp2.exe module34= opengllib34= ver34=0 -coord34=2 -flag34=671350818 -flagg34=1207959568 -flagh34=-2147418092 -flagi34=1 -tflag34=258 +coord34=0 +flag34=134217762 +flagg34=135266432 +flagh34=20 +flagi34=0 +tflag34=0 initx34=0 inity34=0 minx34=0 @@ -874,17 +874,17 @@ maxfps34=0 initts34=0 winver34=0 maxres34=0 -title35=Hitman - Codename 47 -path35=D:\Games\Hitman - Codename 47\Hitman.Exe +title35=GTA 3 +path35=D:\Games\GTA3\gta3.exe module35= opengllib35= -ver35=1 +ver35=0 coord35=0 -flag35=134234144 -flagg35=1207959808 +flag35=134217762 +flagg35=1207959552 flagh35=20 flagi35=4 -tflag35=2 +tflag35=258 initx35=0 inity35=0 minx35=0 @@ -899,17 +899,17 @@ maxfps35=0 initts35=0 winver35=0 maxres35=0 -title36=Hitman 2 Silent Assassin -path36=D:\Games\Hitman 2 Silent Assassin\hitman2.exe +title36=Half-Life +path36=D:\Games\Half-Life\hl.exe module36= opengllib36= -ver36=0 -coord36=2 -flag36=134234150 -flagg36=1207959568 -flagh36=20 -flagi36=4 -tflag36=0 +ver36=12 +coord36=0 +flag36=1207959584 +flagg36=1209139200 +flagh36=16 +flagi36=2060 +tflag36=4096 initx36=0 inity36=0 minx36=0 @@ -924,17 +924,17 @@ maxfps36=0 initts36=0 winver36=0 maxres36=0 -title37=Homeworld 2 -path37=D:\Games\Homeworld2\Bin\Release\Homeworld2.exe +title37=Hearts of Iron 2 +path37=D:\Games\Hearts of Iron 2\HoI2.exe module37= opengllib37= ver37=0 -coord37=0 -flag37=671154178 -flagg37=134217728 -flagh37=285 -flagi37=0 -tflag37=0 +coord37=2 +flag37=939526179 +flagg37=1207959568 +flagh37=32788 +flagi37=2 +tflag37=2 initx37=0 inity37=0 minx37=0 @@ -949,17 +949,17 @@ maxfps37=0 initts37=0 winver37=0 maxres37=0 -title38=Imperialism -path38=D:\Games\Imperialism\Imperialism.exe +title38=Heroes of Might and Magic IV +path38=D:\Games\Heroes of Might and Magic IV\heroes4.exe module38= opengllib38= ver38=0 -coord38=0 -flag38=-1467998174 -flagg38=1209008128 -flagh38=20 -flagi38=4 -tflag38=0 +coord38=2 +flag38=671350818 +flagg38=1207959568 +flagh38=-2147418092 +flagi38=1 +tflag38=258 initx38=0 inity38=0 minx38=0 @@ -974,17 +974,17 @@ maxfps38=0 initts38=0 winver38=0 maxres38=0 -title39=Imperialism II -path39=D:\Games\Imperialism 2\imperialism II.exe +title39=Hitman - Codename 47 +path39=D:\Games\Hitman - Codename 47\Hitman.Exe module39= opengllib39= -ver39=0 +ver39=1 coord39=0 -flag39=679485474 -flagg39=1207959552 -flagh39=32788 +flag39=134234144 +flagg39=1207959808 +flagh39=20 flagi39=4 -tflag39=0 +tflag39=2 initx39=0 inity39=0 minx39=0 @@ -999,17 +999,17 @@ maxfps39=0 initts39=0 winver39=0 maxres39=0 -title40=International Football 2000 -path40=D:\Games\International Football 2000\MSIF2000.ICD +title40=Hitman 2 Silent Assassin +path40=D:\Games\Hitman 2 Silent Assassin\hitman2.exe module40= opengllib40= ver40=0 -coord40=0 -flag40=150994976 -flagg40=1207959552 +coord40=2 +flag40=134234150 +flagg40=1207959568 flagh40=20 flagi40=4 -tflag40=258 +tflag40=0 initx40=0 inity40=0 minx40=0 @@ -1024,15 +1024,15 @@ maxfps40=0 initts40=0 winver40=0 maxres40=0 -title41=Jet Moto -path41=D:\Games\Jet_Moto\JETMOTO.EXE +title41=Homeworld 2 +path41=D:\Games\Homeworld2\Bin\Release\Homeworld2.exe module41= opengllib41= ver41=0 coord41=0 -flag41=671088674 -flagg41=1207959568 -flagh41=20 +flag41=671154178 +flagg41=134217728 +flagh41=285 flagi41=0 tflag41=0 initx41=0 @@ -1049,17 +1049,17 @@ maxfps41=0 initts41=0 winver41=0 maxres41=0 -title42=KISS Pinball -path42=D:\Games\KISS Pinball\kisspin.exe +title42=Imperialism +path42=D:\Games\Imperialism\Imperialism.exe module42= opengllib42= -ver42=1 +ver42=0 coord42=0 -flag42=679616546 -flagg42=1207959552 -flagh42=98324 +flag42=-1467998173 +flagg42=1209008128 +flagh42=20 flagi42=4 -tflag42=259 +tflag42=4102 initx42=0 inity42=0 minx42=0 @@ -1074,17 +1074,17 @@ maxfps42=0 initts42=0 winver42=0 maxres42=0 -title43=Kiss Psycho Circus -path43=D:\Games\Kiss\client.exe +title43=Imperialism II +path43=D:\Games\Imperialism 2\imperialism II.exe module43= opengllib43= ver43=0 coord43=0 -flag43=134234148 -flagg43=-939523840 +flag43=-1434181598 +flagg43=134217728 flagh43=20 -flagi43=16 -tflag43=2 +flagi43=4 +tflag43=6146 initx43=0 inity43=0 minx43=0 @@ -1093,23 +1093,23 @@ maxx43=0 maxy43=0 posx43=50 posy43=50 -sizx43=800 -sizy43=600 +sizx43=1200 +sizy43=900 maxfps43=0 initts43=0 winver43=0 maxres43=0 -title44=Knights Of Honor -path44=D:\Games\Knights Of Honor\KoH.exe +title44=International Football 2000 +path44=D:\Games\International Football 2000\MSIF2000.ICD module44= opengllib44= ver44=0 coord44=0 -flag44=-402382814 +flag44=150994976 flagg44=1207959552 -flagh44=65556 +flagh44=20 flagi44=4 -tflag44=6431 +tflag44=258 initx44=0 inity44=0 minx44=0 @@ -1124,17 +1124,17 @@ maxfps44=0 initts44=0 winver44=0 maxres44=0 -title45=KnightShift -path45=D:\Games\knightshift\KnightShift.ex1 +title45=Jet Moto +path45=D:\Games\Jet_Moto\JETMOTO.EXE module45= opengllib45= -ver45=8 +ver45=0 coord45=0 -flag45=134217760 -flagg45=1207959552 +flag45=671088674 +flagg45=1207959568 flagh45=20 -flagi45=4 -tflag45=3 +flagi45=0 +tflag45=0 initx45=0 inity45=0 minx45=0 @@ -1149,17 +1149,17 @@ maxfps45=0 initts45=0 winver45=0 maxres45=0 -title46=Kohan II Kings of War -path46=D:\Games\Kohan II Kings of War\k2.exe +title46=KISS Pinball +path46=D:\Games\KISS Pinball\kisspin.exe module46= opengllib46= -ver46=9 +ver46=1 coord46=0 -flag46=134217762 +flag46=679616546 flagg46=1207959552 -flagh46=20 -flagi46=1028 -tflag46=6163 +flagh46=98324 +flagi46=4 +tflag46=258 initx46=0 inity46=0 minx46=0 @@ -1174,17 +1174,17 @@ maxfps46=0 initts46=0 winver46=0 maxres46=0 -title47=L.E.D. Wars (not working) -path47=D:\Games\l.e.d._wars\LED.EXE +title47=Kiss Psycho Circus +path47=D:\Games\Kiss\client.exe module47= opengllib47= -ver47=1 +ver47=0 coord47=0 -flag47=679477282 -flagg47=1744830480 -flagh47=65556 -flagi47=4 -tflag47=258 +flag47=134234148 +flagg47=-939523840 +flagh47=20 +flagi47=16 +tflag47=2 initx47=0 inity47=0 minx47=0 @@ -1199,17 +1199,17 @@ maxfps47=0 initts47=0 winver47=0 maxres47=0 -title48=Land of the Dead -path48=D:\Games\Land of the Dead\System\LOTD.exe +title48=KKND Xtreme +path48=D:\Games\KKNDXtreme\KKND.exe module48= opengllib48= ver48=0 -coord48=2 -flag48=134217766 -flagg48=1207959568 +coord48=0 +flag48=134234146 +flagg48=1207959552 flagh48=20 -flagi48=0 -tflag48=64 +flagi48=4 +tflag48=0 initx48=0 inity48=0 minx48=0 @@ -1223,18 +1223,18 @@ sizy48=600 maxfps48=0 initts48=0 winver48=0 -maxres48=0 -title49=Last Bronx -path49=D:\Games\Last_Bronx\LB.EXE +maxres48=-1 +title49=Knights Of Honor +path49=D:\Games\Knights Of Honor\KoH.exe module49= opengllib49= ver49=0 coord49=0 -flag49=134217762 -flagg49=-939520000 -flagh49=20 +flag49=-402382814 +flagg49=1207959552 +flagh49=65556 flagi49=4 -tflag49=0 +tflag49=6430 initx49=0 inity49=0 minx49=0 @@ -1245,21 +1245,21 @@ posx49=50 posy49=50 sizx49=800 sizy49=600 -maxfps49=20 -initts49=4 +maxfps49=0 +initts49=0 winver49=0 maxres49=0 -title50=LEGO® Marvel Super Heroes Demo -path50=C:\Program Files (x86)\Warner Bros. Interactive Entertainment\LEGO® Marvel Super Heroes Demo\LEGOMarvelDemo.exe +title50=KnightShift +path50=D:\Games\knightshift\KnightShift.ex1 module50= opengllib50= -ver50=0 +ver50=8 coord50=0 -flag50=134217762 +flag50=134217760 flagg50=1207959552 flagh50=20 flagi50=4 -tflag50=0 +tflag50=2 initx50=0 inity50=0 minx50=0 @@ -1274,17 +1274,17 @@ maxfps50=0 initts50=0 winver50=0 maxres50=0 -title51=L'Elefante a Strisce -path51=D:\Games\L'Elefante a Strisce\Pilots1I.EXE +title51=Kohan II Kings of War +path51=D:\Games\Kohan II Kings of War\k2.exe module51= opengllib51= -ver51=0 +ver51=9 coord51=0 flag51=134217762 -flagg51=135266368 +flagg51=1207959552 flagh51=20 -flagi51=0 -tflag51=64 +flagi51=1028 +tflag51=6162 initx51=0 inity51=0 minx51=0 @@ -1299,17 +1299,17 @@ maxfps51=0 initts51=0 winver51=0 maxres51=0 -title52=Lords of Magic Special Edition -path52=D:\Games\LoM\SIERRA\LOMSE\lomse.exe +title52=kxtzcfr.exe +path52=D:\Games\Awakening of dreamless castle\Awakening - The Dreamless Castle\kxtzcfr.exe module52= opengllib52= ver52=0 coord52=0 -flag52=402669603 -flagg52=1207959568 -flagh52=6291476 -flagi52=0 -tflag52=6419 +flag52=134217762 +flagg52=1207959552 +flagh52=20 +flagi52=4 +tflag52=6226 initx52=0 inity52=0 minx52=0 @@ -1323,18 +1323,18 @@ sizy52=600 maxfps52=0 initts52=0 winver52=0 -maxres52=0 -title53=Lords of the Realm 2 -path53=D:\Games\Lords of the Realm 2\LORDS2.EXE +maxres52=-1 +title53=L.E.D. Wars (not working) +path53=D:\Games\l.e.d._wars\LED.EXE module53= opengllib53= -ver53=0 +ver53=1 coord53=0 -flag53=134217762 -flagg53=1209008128 +flag53=679477282 +flagg53=1744830480 flagh53=65556 flagi53=4 -tflag53=0 +tflag53=258 initx53=0 inity53=0 minx53=0 @@ -1349,17 +1349,17 @@ maxfps53=0 initts53=0 winver53=0 maxres53=0 -title54=Lost Valley -path54=D:\Games\Lost Valley\lost valley\lost valley data.exe +title54=Land of the Dead +path54=D:\Games\Land of the Dead\System\LOTD.exe module54= opengllib54= ver54=0 -coord54=0 -flag54=679485474 -flagg54=1207959552 -flagh54=-2080374764 +coord54=2 +flag54=134217766 +flagg54=1207959568 +flagh54=20 flagi54=0 -tflag54=0 +tflag54=64 initx54=0 inity54=0 minx54=0 @@ -1374,17 +1374,17 @@ maxfps54=0 initts54=0 winver54=0 maxres54=0 -title55=Mageslayer -path55=D:\Games\MAGE\MAGESLAY.EXE +title55=Last Bronx +path55=D:\Games\Last_Bronx\LB.EXE module55= opengllib55= ver55=0 coord55=0 -flag55=136314914 -flagg55=1476395008 +flag55=134217762 +flagg55=-939520000 flagh55=20 -flagi55=1 -tflag55=83 +flagi55=4 +tflag55=0 initx55=0 inity55=0 minx55=0 @@ -1395,21 +1395,21 @@ posx55=50 posy55=50 sizx55=800 sizy55=600 -maxfps55=0 -initts55=0 +maxfps55=20 +initts55=4 winver55=0 maxres55=0 -title56=Magic & Mayhem -path56=D:\Games\Magic_&_Mayhem\Chaos.exe -module56= +title56=Le Mans 24 Hours +path56=D:\Games\Le Mans 24 Hours\Bin\lemans.exe +module56=glidedll avicap opengllib56= -ver56=0 +ver56=1 coord56=0 -flag56=134217762 -flagg56=1207959552 -flagh56=20 +flag56=201326627 +flagg56=1241513984 +flagh56=532 flagi56=4 -tflag56=0 +tflag56=4162 initx56=0 inity56=0 minx56=0 @@ -1423,18 +1423,18 @@ sizy56=600 maxfps56=0 initts56=0 winver56=0 -maxres56=0 -title57=Martian Gothic Unification -path57=D:\Games\Martian Gothic\martian gothic.exe +maxres56=-1 +title57=LEGO® Marvel Super Heroes Demo +path57=C:\Program Files (x86)\Warner Bros. Interactive Entertainment\LEGO® Marvel Super Heroes Demo\LEGOMarvelDemo.exe module57= opengllib57= ver57=0 coord57=0 -flag57=203423776 -flagg57=1476395008 +flag57=134217762 +flagg57=1207959552 flagh57=20 -flagi57=5 -tflag57=6163 +flagi57=4 +tflag57=0 initx57=0 inity57=0 minx57=0 @@ -1449,17 +1449,17 @@ maxfps57=0 initts57=0 winver57=0 maxres57=0 -title58=Motocross Madness (DEMO) -path58=D:\Games\Motocross Madness Trial\mcm.exe +title58=L'Elefante a Strisce +path58=D:\Games\L'Elefante a Strisce\Pilots1I.EXE module58= opengllib58= ver58=0 coord58=0 -flag58=134217760 -flagg58=1207959552 +flag58=134217762 +flagg58=135266368 flagh58=20 flagi58=0 -tflag58=0 +tflag58=64 initx58=0 inity58=0 minx58=0 @@ -1474,17 +1474,17 @@ maxfps58=0 initts58=0 winver58=0 maxres58=0 -title59=Nascar Racing 3 -path59=D:\Games\Nascar Racing 3\NASCAR Racing 3.exe +title59=Lords of Magic Special Edition +path59=D:\Games\LoM\SIERRA\LOMSE\lomse.exe module59= opengllib59= ver59=0 coord59=0 -flag59=671105056 -flagg59=1207959552 -flagh59=20 -flagi59=4 -tflag59=6163 +flag59=402669603 +flagg59=1207959568 +flagh59=6291476 +flagi59=0 +tflag59=6418 initx59=0 inity59=0 minx59=0 @@ -1499,17 +1499,17 @@ maxfps59=0 initts59=0 winver59=0 maxres59=0 -title60=Need for Speed 2SE -path60=D:\Games\Need for Speed 2SE\NFS2SEN.EXE +title60=Lords of the Realm 2 +path60=D:\Games\Lords of the Realm 2\LORDS2.EXE module60= opengllib60= ver60=0 coord60=0 -flag60=134217826 -flagg60=1480589312 -flagh60=20 +flag60=134217762 +flagg60=1209008128 +flagh60=65556 flagi60=4 -tflag60=6163 +tflag60=0 initx60=0 inity60=0 minx60=0 @@ -1524,17 +1524,17 @@ maxfps60=0 initts60=0 winver60=0 maxres60=0 -title61=Need for Speed 2SE (3dfx) -path61=D:\Games\Need for Speed 2SE\nfs2sea.exe +title61=Lost Valley +path61=D:\Games\Lost Valley\lost valley\lost valley data.exe module61= opengllib61= ver61=0 coord61=0 -flag61=134217760 +flag61=679485474 flagg61=1207959552 -flagh61=20 -flagi61=4 -tflag61=6147 +flagh61=-2080374764 +flagi61=0 +tflag61=0 initx61=0 inity61=0 minx61=0 @@ -1549,17 +1549,17 @@ maxfps61=0 initts61=0 winver61=0 maxres61=0 -title62=Need for Speed 3 -path62=D:\Games\Need for Speed 3\nfs3.exe +title62=Mageslayer +path62=D:\Games\MAGE\MAGESLAY.EXE module62= opengllib62= -ver62=1 +ver62=0 coord62=0 -flag62=134217762 -flagg62=1207959552 -flagh62=20 -flagi62=4 -tflag62=0 +flag62=134234146 +flagg62=402653216 +flagh62=8212 +flagi62=1 +tflag62=6210 initx62=0 inity62=0 minx62=0 @@ -1574,16 +1574,16 @@ maxfps62=0 initts62=0 winver62=0 maxres62=0 -title63=Need For Speed Underground -path63=D:\Games\Need For Speed Underground\speed.exe +title63=Magic & Mayhem +path63=D:\Games\Magic_&_Mayhem\Chaos.exe module63= opengllib63= -ver63=9 +ver63=0 coord63=0 flag63=134217762 flagg63=1207959552 flagh63=20 -flagi63=1028 +flagi63=4 tflag63=0 initx63=0 inity63=0 @@ -1599,17 +1599,17 @@ maxfps63=0 initts63=0 winver63=0 maxres63=0 -title64=Need for Speed Underground 2 -path64=D:\Games\Need for Speed Underground 2\SPEED2.EXE +title64=Martian Gothic Unification +path64=D:\Games\Martian Gothic\martian gothic.exe module64= opengllib64= -ver64=9 +ver64=0 coord64=0 -flag64=134217762 -flagg64=1207959552 +flag64=203423776 +flagg64=1476395008 flagh64=20 -flagi64=4 -tflag64=0 +flagi64=5 +tflag64=6162 initx64=0 inity64=0 minx64=0 @@ -1624,14 +1624,14 @@ maxfps64=0 initts64=0 winver64=0 maxres64=0 -title65=Neophyte Koplio's Story -path65=D:\Games\Neophyte Koplio's Story\KOPLIO.exe +title65=Millennium Racer Y2K fighters +path65=D:\Games\Millennium Racer\MRacer.exe module65= opengllib65= -ver65=1 +ver65=0 coord65=0 -flag65=134234146 -flagg65=1207959552 +flag65=671105056 +flagg65=1476395024 flagh65=20 flagi65=4 tflag65=0 @@ -1648,17 +1648,17 @@ sizy65=600 maxfps65=0 initts65=0 winver65=0 -maxres65=0 -title66=NetStorm - Islands at War -path66=D:\Games\NetStorm - Islands at War\Netstorm.exe +maxres65=-1 +title66=Motocross Madness (DEMO) +path66=D:\Games\Motocross Madness Trial\mcm.exe module66= opengllib66= ver66=0 coord66=0 -flag66=679608354 -flagg66=1209008384 +flag66=134217760 +flagg66=1207959552 flagh66=20 -flagi66=4 +flagi66=0 tflag66=0 initx66=0 inity66=0 @@ -1674,17 +1674,17 @@ maxfps66=0 initts66=0 winver66=0 maxres66=0 -title67=Pandemonium 2 (GLIDE) -path67=D:\Games\Pandemonium 2\pandy.exe +title67=Nascar Racing 3 +path67=D:\Games\Nascar Racing 3\NASCAR Racing 3.exe module67= opengllib67= ver67=0 coord67=0 -flag67=134217762 +flag67=671105056 flagg67=1207959552 flagh67=20 flagi67=4 -tflag67=0 +tflag67=6162 initx67=0 inity67=0 minx67=0 @@ -1699,17 +1699,17 @@ maxfps67=0 initts67=0 winver67=0 maxres67=0 -title68=Panzer Dragoon -path68=D:\Games\Panzer Dragoon\game\PANZERDG.EXE +title68=Need for Speed 2SE +path68=D:\Games\Need for Speed 2SE\NFS2SEN.EXE module68= opengllib68= ver68=0 coord68=0 -flag68=134217762 -flagg68=1207959552 +flag68=134217826 +flagg68=1480589312 flagh68=20 flagi68=4 -tflag68=67 +tflag68=6162 initx68=0 inity68=0 minx68=0 @@ -1724,17 +1724,17 @@ maxfps68=0 initts68=0 winver68=0 maxres68=0 -title69=Praetorians -path69=D:\games\Praetorians\Praetorians.exe +title69=Need for Speed 2SE (3dfx) +path69=D:\Games\Need for Speed 2SE\nfs2sea.exe module69= opengllib69= ver69=0 -coord69=2 +coord69=0 flag69=134217760 -flagg69=1209008144 -flagh69=22 +flagg69=1207959552 +flagh69=20 flagi69=4 -tflag69=2 +tflag69=6146 initx69=0 inity69=0 minx69=0 @@ -1749,17 +1749,17 @@ maxfps69=0 initts69=0 winver69=0 maxres69=0 -title70=Praetorians (DEMO) -path70=D:\Games\Praetorians Demo\Praetorians.exe +title70=Need for Speed 3 +path70=D:\Games\Need for Speed 3\nfs3.exe module70= opengllib70= -ver70=0 +ver70=1 coord70=0 -flag70=150994976 -flagg70=1209008128 -flagh70=65556 +flag70=134217762 +flagg70=1207959552 +flagh70=20 flagi70=4 -tflag70=6419 +tflag70=0 initx70=0 inity70=0 minx70=0 @@ -1774,16 +1774,16 @@ maxfps70=0 initts70=0 winver70=0 maxres70=0 -title71=Premier Manager 98 -path71=D:\Games\Premier Manager 98\MANAGER.EXE +title71=Need For Speed Underground +path71=D:\Games\Need For Speed Underground\speed.exe module71= opengllib71= -ver71=0 +ver71=9 coord71=0 -flag71=671092770 +flag71=134217762 flagg71=1207959552 -flagh71=16 -flagi71=0 +flagh71=20 +flagi71=1028 tflag71=0 initx71=0 inity71=0 @@ -1799,16 +1799,16 @@ maxfps71=0 initts71=0 winver71=0 maxres71=0 -title72=Primitive Wars -path72=D:\Games\Primitive Wars\Pw.exe +title72=Need for Speed Underground 2 +path72=D:\Games\Need for Speed Underground 2\SPEED2.EXE module72= opengllib72= -ver72=0 +ver72=9 coord72=0 -flag72=671088674 -flagg72=134217728 +flag72=134217762 +flagg72=1207959552 flagh72=20 -flagi72=0 +flagi72=4 tflag72=0 initx72=0 inity72=0 @@ -1824,17 +1824,17 @@ maxfps72=0 initts72=0 winver72=0 maxres72=0 -title73=Project IGI -path73=D:\Games\Project IGI\pc\IGI.exe +title73=Neophyte Koplio's Story +path73=D:\Games\Neophyte Koplio's Story\KOPLIO.exe module73= opengllib73= -ver73=0 +ver73=1 coord73=0 -flag73=671105060 -flagg73=-939524096 +flag73=134234146 +flagg73=1207959552 flagh73=20 flagi73=4 -tflag73=67 +tflag73=0 initx73=0 inity73=0 minx73=0 @@ -1849,17 +1849,17 @@ maxfps73=0 initts73=0 winver73=0 maxres73=0 -title74=Project Nomads (DEMO) -path74=D:\Games\Project Nomads Demo\bin\win32\nomads.exe +title74=NetStorm - Islands at War +path74=D:\Games\NetStorm - Islands at War\Netstorm.exe module74= opengllib74= -ver74=8 +ver74=0 coord74=0 -flag74=-1476394974 -flagg74=1207959808 -flagh74=4 -flagi74=0 -tflag74=274 +flag74=679608354 +flagg74=1209008384 +flagh74=20 +flagi74=4 +tflag74=0 initx74=0 inity74=0 minx74=0 @@ -1874,17 +1874,17 @@ maxfps74=0 initts74=0 winver74=0 maxres74=0 -title75=Quake 2 -path75=D:\Games\QUAKE2\quake2.exe +title75=O.R.B. Offword Rescue Base +path75=D:\Games\O.R.B\orb.exe module75= opengllib75= ver75=0 -coord75=0 -flag75=134234114 -flagg75=1208090624 +coord75=2 +flag75=134234144 +flagg75=1207959568 flagh75=20 flagi75=4 -tflag75=0 +tflag75=6162 initx75=0 inity75=0 minx75=0 @@ -1898,16 +1898,16 @@ sizy75=600 maxfps75=0 initts75=0 winver75=0 -maxres75=0 -title76=Railroad Tycoon II -path76=D:\Games\Railroad.Tycoon.II\RT2.EXE +maxres75=-1 +title76=Pandemonium 2 (GLIDE) +path76=D:\Games\Pandemonium 2\pandy.exe module76= opengllib76= ver76=0 coord76=0 flag76=134217762 flagg76=1207959552 -flagh76=20 +flagh76=65556 flagi76=4 tflag76=0 initx76=0 @@ -1924,17 +1924,17 @@ maxfps76=0 initts76=0 winver76=0 maxres76=0 -title77=Rayman 2 Demo -path77=D:\Games\Rayman2Demo\Rayman2Demo.exe +title77=Panzer Dragoon +path77=D:\Games\Panzer Dragoon\game\PANZERDG.EXE module77= opengllib77= -ver77=7 +ver77=0 coord77=0 -flag77=402653217 -flagg77=1208025088 -flagh77=2097172 -flagi77=0 -tflag77=6419 +flag77=134217762 +flagg77=1207959552 +flagh77=20 +flagi77=4 +tflag77=66 initx77=0 inity77=0 minx77=0 @@ -1946,20 +1946,20 @@ posy77=50 sizx77=800 sizy77=600 maxfps77=0 -initts77=4 +initts77=0 winver77=0 maxres77=0 -title78=Serious Sam - The Second Encounter Demo -path78=D:\Games\Serious Sam - The Second Encounter Demo\Bin\SeriousSam.exe +title78=Port Royale 2 +path78=D:\Games\Port Royale 2\PR2.exe module78= opengllib78= -ver78=0 +ver78=8 coord78=0 -flag78=671088674 -flagg78=1208156160 -flagh78=20 +flag78=671096866 +flagg78=1207959552 +flagh78=65556 flagi78=4 -tflag78=64 +tflag78=0 initx78=0 inity78=0 minx78=0 @@ -1971,20 +1971,20 @@ posy78=50 sizx78=800 sizy78=600 maxfps78=0 -initts78=4 +initts78=0 winver78=0 -maxres78=0 -title79=Shadows of the Empire (DEMO) -path79=D:\Games\Shadows of the Empire\shadows.exe +maxres78=-1 +title79=Praetorians +path79=D:\games\Praetorians\Praetorians.exe module79= opengllib79= ver79=0 coord79=2 -flag79=134479906 -flagg79=1207959568 -flagh79=33554452 -flagi79=0 -tflag79=274 +flag79=134217760 +flagg79=1209008144 +flagh79=22 +flagi79=4 +tflag79=2 initx79=0 inity79=0 minx79=0 @@ -1999,17 +1999,17 @@ maxfps79=0 initts79=0 winver79=0 maxres79=0 -title80=Sid Meier's Civilization III Complete -path80=D:\Games\Sid Meier's Civilization III Complete\Conquests\Civ3Conquests.exe -module80=jgl +title80=Praetorians (DEMO) +path80=D:\Games\Praetorians Demo\Praetorians.exe +module80= opengllib80= ver80=0 coord80=0 -flag80=973352994 -flagg80=136462360 -flagh80=2162708 -flagi80=4100 -tflag80=64 +flag80=150994976 +flagg80=1209008128 +flagh80=65556 +flagi80=4 +tflag80=6418 initx80=0 inity80=0 minx80=0 @@ -2021,20 +2021,20 @@ posy80=50 sizx80=800 sizy80=600 maxfps80=0 -initts80=6 +initts80=0 winver80=0 -maxres80=5 -title81=Star Wars Episode I Racer -path81=D:\Games\Star Wars Episode 1 racer\SWEP1RCR.EXE +maxres80=0 +title81=Premier Manager 98 +path81=D:\Games\Premier Manager 98\MANAGER.EXE module81= opengllib81= ver81=0 coord81=0 -flag81=679493669 -flagg81=1210056720 -flagh81=8212 -flagi81=20 -tflag81=65 +flag81=671092770 +flagg81=1207959552 +flagh81=16 +flagi81=0 +tflag81=0 initx81=0 inity81=0 minx81=0 @@ -2049,17 +2049,17 @@ maxfps81=0 initts81=0 winver81=0 maxres81=0 -title82=StarCraft -path82=D:\Games\Starcraft\StarCraft.exe +title82=Primitive Wars +path82=D:\Games\Primitive Wars\Pw.exe module82= opengllib82= ver82=0 coord82=0 -flag82=134217762 -flagg82=134283264 +flag82=671088674 +flagg82=134217728 flagh82=20 -flagi82=8 -tflag82=64 +flagi82=0 +tflag82=0 initx82=0 inity82=0 minx82=0 @@ -2074,17 +2074,17 @@ maxfps82=0 initts82=0 winver82=0 maxres82=0 -title83=Starsky & Hutch - GAME -path83=D:\Games\Starsky & Hutch\StarskyPC.exe +title83=Project Eden +path83=D:\Games\Project Eden\Eden.exe module83= opengllib83= ver83=0 coord83=0 -flag83=947912739 +flag83=134217763 flagg83=1207959552 flagh83=20 flagi83=4 -tflag83=0 +tflag83=64 initx83=0 inity83=0 minx83=0 @@ -2098,18 +2098,18 @@ sizy83=600 maxfps83=0 initts83=0 winver83=0 -maxres83=0 -title84=Starsky & Hutch - LAUNCHER -path84=D:\Games\Starsky & Hutch\Starsky.exe +maxres83=-1 +title84=Project IGI +path84=D:\Games\Project IGI\pc\IGI.exe module84= opengllib84= ver84=0 coord84=0 -flag84=134217728 -flagg84=1207959552 +flag84=671105060 +flagg84=-939524096 flagh84=20 flagi84=4 -tflag84=0 +tflag84=66 initx84=0 inity84=0 minx84=0 @@ -2124,17 +2124,17 @@ maxfps84=0 initts84=0 winver84=0 maxres84=0 -title85=State of Emergency -path85=D:\Games\State of Emergency\KaosPC.cracked.exe +title85=Project Nomads (DEMO) +path85=D:\Games\Project Nomads Demo\bin\win32\nomads.exe module85= opengllib85= ver85=8 coord85=0 -flag85=671088676 -flagg85=1208025088 -flagh85=20 -flagi85=2052 -tflag85=6163 +flag85=-1476394974 +flagg85=1207959808 +flagh85=4 +flagi85=0 +tflag85=274 initx85=0 inity85=0 minx85=0 @@ -2145,21 +2145,21 @@ posx85=50 posy85=50 sizx85=800 sizy85=600 -maxfps85=50 -initts85=2 +maxfps85=0 +initts85=0 winver85=0 maxres85=0 -title86=Still Life (GOG) -path86=D:\Games\Still Life (GOG)\StillLife.exe +title86=Quake 2 +path86=D:\Games\QUAKE2\quake2.exe module86= opengllib86= ver86=0 coord86=0 -flag86=671105058 -flagg86=1207959568 +flag86=134234114 +flagg86=1208090624 flagh86=20 flagi86=4 -tflag86=1088 +tflag86=0 initx86=0 inity86=0 minx86=0 @@ -2173,24 +2173,24 @@ sizy86=600 maxfps86=0 initts86=0 winver86=0 -maxres86=-1 -title87=Syberia -path87=D:\Games\Syberia\Syberia.exe +maxres86=0 +title87=Railroad Tycoon II +path87=D:\Games\Railroad.Tycoon.II\RT2.EXE module87= opengllib87= ver87=0 coord87=0 -flag87=822116385 -flagg87=1242562576 +flag87=134217762 +flagg87=1207959552 flagh87=20 flagi87=4 -tflag87=6171 -initx87=150 -inity87=150 -minx87=150 -miny87=150 -maxx87=800 -maxy87=600 +tflag87=0 +initx87=0 +inity87=0 +minx87=0 +miny87=0 +maxx87=0 +maxy87=0 posx87=50 posy87=50 sizx87=800 @@ -2199,17 +2199,17 @@ maxfps87=0 initts87=0 winver87=0 maxres87=0 -title88=Take no Prisoners -path88=D:\Games\Take no Prisoners\TNP.EXE +title88=Rayman 2 Demo +path88=D:\Games\Rayman2Demo\Rayman2Demo.exe module88= opengllib88= -ver88=0 +ver88=7 coord88=0 -flag88=134217762 -flagg88=134217860 -flagh88=20 -flagi88=512 -tflag88=259 +flag88=402653217 +flagg88=1208025088 +flagh88=2097172 +flagi88=0 +tflag88=6418 initx88=0 inity88=0 minx88=0 @@ -2221,20 +2221,20 @@ posy88=50 sizx88=800 sizy88=600 maxfps88=0 -initts88=0 +initts88=4 winver88=0 maxres88=0 -title89=The Bard's Tale -path89=D:\Games\The Bard's Tale\The Bard's Tale.exe +title89=Serious Sam - The Second Encounter Demo +path89=D:\Games\Serious Sam - The Second Encounter Demo\Bin\SeriousSam.exe module89= opengllib89= -ver89=9 +ver89=0 coord89=0 -flag89=134217760 -flagg89=134217728 -flagh89=16 -flagi89=1024 -tflag89=6162 +flag89=671088674 +flagg89=1208156160 +flagh89=20 +flagi89=4 +tflag89=64 initx89=0 inity89=0 minx89=0 @@ -2246,20 +2246,20 @@ posy89=50 sizx89=800 sizy89=600 maxfps89=0 -initts89=0 +initts89=4 winver89=0 maxres89=0 -title90=Tomb Raider 4 (DEMO) -path90=D:\Games\Tomb Raider - The Last Revelation (Demo)\tomb4.exe +title90=Shadows of the Empire (DEMO) +path90=D:\Games\Shadows of the Empire\shadows.exe module90= opengllib90= -ver90=7 -coord90=0 -flag90=134217760 -flagg90=1207959552 -flagh90=20 +ver90=0 +coord90=2 +flag90=134479906 +flagg90=1207959568 +flagh90=33554452 flagi90=0 -tflag90=258 +tflag90=274 initx90=0 inity90=0 minx90=0 @@ -2274,17 +2274,17 @@ maxfps90=0 initts90=0 winver90=0 maxres90=0 -title91=Tomb Raider II -path91=D:\Games\Tomb Raider II\Tomb2.exe -module91= +title91=Sid Meier's Civilization III Complete +path91=D:\Games\Sid Meier's Civilization III Complete\Conquests\Civ3Conquests.exe +module91=jgl opengllib91= ver91=0 coord91=0 -flag91=671088674 -flagg91=1207959552 -flagh91=20 -flagi91=0 -tflag91=0 +flag91=973352994 +flagg91=136462360 +flagh91=2162708 +flagi91=4100 +tflag91=64 initx91=0 inity91=0 minx91=0 @@ -2296,20 +2296,20 @@ posy91=50 sizx91=800 sizy91=600 maxfps91=0 -initts91=0 +initts91=6 winver91=0 -maxres91=0 -title92=Tomb Raider II Gold (DEMO) -path92=D:\Games\Tomb Raider II Gold (Demo)\Tomb2.exe +maxres91=5 +title92=SimCity 4 Deluxe +path92=D:\Games\SimCity 4 Deluxe\Apps\SimCity 4.exe module92= opengllib92= -ver92=0 -coord92=2 -flag92=671088674 -flagg92=1224736784 +ver92=7 +coord92=0 +flag92=32 +flagg92=1207959568 flagh92=20 -flagi92=0 -tflag92=258 +flagi92=4100 +tflag92=8158 initx92=0 inity92=0 minx92=0 @@ -2318,23 +2318,23 @@ maxx92=0 maxy92=0 posx92=50 posy92=50 -sizx92=800 -sizy92=600 +sizx92=1200 +sizy92=900 maxfps92=0 initts92=0 winver92=0 -maxres92=0 -title93=Tomb Raider III -path93=D:\Games\Tomb Raider III\tomb3.exe +maxres92=1 +title93=Star Wars Episode I Racer +path93=D:\Games\Star Wars Episode 1 racer\SWEP1RCR.EXE module93= opengllib93= ver93=0 -coord93=2 -flag93=134217760 -flagg93=1241514000 -flagh93=20 -flagi93=0 -tflag93=322 +coord93=0 +flag93=679493669 +flagg93=1210056720 +flagh93=8212 +flagi93=20 +tflag93=64 initx93=0 inity93=0 minx93=0 @@ -2349,17 +2349,17 @@ maxfps93=0 initts93=0 winver93=0 maxres93=0 -title94=Total Annihilation Kingdoms -path94=D:\Games\Total Annihilation Kingdoms\Kingdoms.exe +title94=StarCraft +path94=D:\Games\Starcraft\StarCraft.exe module94= opengllib94= -ver94=7 +ver94=0 coord94=0 -flag94=671105058 -flagg94=1207959552 +flag94=134217762 +flagg94=134283264 flagh94=20 -flagi94=4 -tflag94=6163 +flagi94=8 +tflag94=64 initx94=0 inity94=0 minx94=0 @@ -2374,17 +2374,17 @@ maxfps94=0 initts94=0 winver94=0 maxres94=0 -title95=Unreal Tournament -path95=D:\Games\Unreal Tournament\System\UnrealTournament.exe +title95=Starsky & Hutch - GAME +path95=D:\Games\Starsky & Hutch\StarskyPC.exe module95= opengllib95= ver95=0 coord95=0 -flag95=-2013265886 -flagg95=1209073680 +flag95=947912739 +flagg95=1207959552 flagh95=20 -flagi95=2052 -tflag95=4097 +flagi95=4 +tflag95=0 initx95=0 inity95=0 minx95=0 @@ -2393,22 +2393,22 @@ maxx95=0 maxy95=0 posx95=50 posy95=50 -sizx95=1200 -sizy95=900 +sizx95=800 +sizy95=600 maxfps95=0 initts95=0 winver95=0 maxres95=0 -title96=Virtua Fighter 2 (DEMO) -path96=D:\Games\vf2_demo\VF2DEMO.EXE +title96=Starsky & Hutch - LAUNCHER +path96=D:\Games\Starsky & Hutch\Starsky.exe module96= opengllib96= ver96=0 coord96=0 -flag96=939524131 -flagg96=1207959664 +flag96=134217728 +flagg96=1207959552 flagh96=20 -flagi96=0 +flagi96=4 tflag96=0 initx96=0 inity96=0 @@ -2424,17 +2424,17 @@ maxfps96=0 initts96=0 winver96=0 maxres96=0 -title97=Virtua Fighter PC -path97=D:\Games\Virtua Fighter\VFPC.EXE +title97=State of Emergency +path97=D:\Games\State of Emergency\KaosPC.cracked.exe module97= opengllib97= -ver97=0 +ver97=8 coord97=0 -flag97=402653218 -flagg97=1224736784 -flagh97=33562644 -flagi97=0 -tflag97=291 +flag97=671088676 +flagg97=1208025088 +flagh97=20 +flagi97=2052 +tflag97=6162 initx97=0 inity97=0 minx97=0 @@ -2445,20 +2445,20 @@ posx97=50 posy97=50 sizx97=800 sizy97=600 -maxfps97=0 -initts97=0 +maxfps97=50 +initts97=2 winver97=0 maxres97=0 -title98=Warcraft 2 Battlenet Ed -path98=D:\Games\Warcraft 2 Battlenet Ed\Warcraft II BNE.exe +title98=State of War Warmonger +path98=D:\Games\State of War Warmonger\State of War - Warmonger.exe module98= opengllib98= ver98=0 coord98=0 -flag98=134217762 -flagg98=1210122240 -flagh98=148 -flagi98=12 +flag98=134234210 +flagg98=134217728 +flagh98=532 +flagi98=4 tflag98=0 initx98=0 inity98=0 @@ -2473,18 +2473,18 @@ sizy98=600 maxfps98=0 initts98=0 winver98=0 -maxres98=0 -title99=Wargasm -path99=D:\Games\Wargasm\tank.exe +maxres98=-1 +title99=Still Life (GOG) +path99=D:\Games\Still Life (GOG)\StillLife.exe module99= opengllib99= ver99=0 -coord99=2 -flag99=671088672 -flagg99=1207959696 -flagh99=65556 -flagi99=0 -tflag99=6163 +coord99=0 +flag99=671105058 +flagg99=1207959568 +flagh99=20 +flagi99=4 +tflag99=6210 initx99=0 inity99=0 minx99=0 @@ -2498,24 +2498,24 @@ sizy99=600 maxfps99=0 initts99=0 winver99=0 -maxres99=0 -title100=Warlords Battlecry II (DEMO) -path100=D:\Games\Warlords Battlecry II Demo\Battlecry II Demo.exe +maxres99=5 +title100=Syberia +path100=D:\Games\Syberia\Syberia.exe module100= opengllib100= ver100=0 -coord100=2 -flag100=134217762 -flagg100=1207959568 -flagh100=22 -flagi100=0 -tflag100=258 -initx100=0 -inity100=0 -minx100=0 -miny100=0 -maxx100=0 -maxy100=0 +coord100=0 +flag100=822116385 +flagg100=1242562576 +flagh100=20 +flagi100=4 +tflag100=6170 +initx100=150 +inity100=150 +minx100=150 +miny100=150 +maxx100=800 +maxy100=600 posx100=50 posy100=50 sizx100=800 @@ -2524,17 +2524,17 @@ maxfps100=0 initts100=0 winver100=0 maxres100=0 -title101=Whiteout -path101=D:\Games\Whiteout\Whiteout.exe +title101=Take no Prisoners +path101=D:\Games\Take no Prisoners\TNP.EXE module101= opengllib101= ver101=0 coord101=0 -flag101=402653217 -flagg101=1207959552 +flag101=134217762 +flagg101=134217860 flagh101=20 -flagi101=0 -tflag101=66 +flagi101=512 +tflag101=258 initx101=0 inity101=0 minx101=0 @@ -2543,23 +2543,23 @@ maxx101=0 maxy101=0 posx101=50 posy101=50 -sizx101=640 -sizy101=480 +sizx101=800 +sizy101=600 maxfps101=0 initts101=0 winver101=0 maxres101=0 -title102=Wildfire -path102=D:\Games\Wildfire\Wildfire.exe +title102=The Bard's Tale +path102=D:\Games\The Bard's Tale\The Bard's Tale.exe module102= opengllib102= -ver102=0 +ver102=9 coord102=0 -flag102=-1476392958 -flagg102=1210122240 -flagh102=20 -flagi102=12 -tflag102=0 +flag102=134217760 +flagg102=134217728 +flagh102=16 +flagi102=1024 +tflag102=6162 initx102=0 inity102=0 minx102=0 @@ -2574,17 +2574,17 @@ maxfps102=0 initts102=0 winver102=0 maxres102=0 -title103=Worms Pinball -path103=D:\Games\Worms Pinball\WPIB.exe +title103=Tomb Raider 4 (DEMO) +path103=D:\Games\Tomb Raider - The Last Revelation (Demo)\tomb4.exe module103= opengllib103= -ver103=1 +ver103=7 coord103=0 -flag103=134217762 -flagg103=1207959568 +flag103=134217760 +flagg103=1207959552 flagh103=20 -flagi103=4 -tflag103=0 +flagi103=0 +tflag103=258 initx103=0 inity103=0 minx103=0 @@ -2599,13 +2599,13 @@ maxfps103=0 initts103=0 winver103=0 maxres103=0 -title104=Zanzarah -path104=D:\Games\Zanzarah\System\zanthp.exe +title104=Tomb Raider II +path104=D:\Games\Tomb Raider II\Tomb2.exe module104= opengllib104= ver104=0 coord104=0 -flag104=679477280 +flag104=671088674 flagg104=1207959552 flagh104=20 flagi104=0 @@ -2624,14 +2624,14 @@ maxfps104=0 initts104=0 winver104=0 maxres104=0 -title105=Zax the Alien Hunter (DEMO) -path105=D:\Games\ZaxDemo\Zax.exe +title105=Tomb Raider II Gold (DEMO) +path105=D:\Games\Tomb Raider II Gold (Demo)\Tomb2.exe module105= opengllib105= ver105=0 coord105=2 -flag105=-2011168734 -flagg105=1209008144 +flag105=671088674 +flagg105=1224736784 flagh105=20 flagi105=0 tflag105=258 @@ -2649,17 +2649,17 @@ maxfps105=0 initts105=0 winver105=0 maxres105=0 -title106=ZPC Zero Population Count -path106=D:\Games\ZPC\ZPC.EXE +title106=Tomb Raider III +path106=D:\Games\Tomb Raider III\tomb3.exe module106= opengllib106= ver106=0 -coord106=0 -flag106=134217762 -flagg106=1207959552 +coord106=2 +flag106=134217760 +flagg106=1241514000 flagh106=20 -flagi106=4 -tflag106=0 +flagi106=0 +tflag106=322 initx106=0 inity106=0 minx106=0 @@ -2674,8 +2674,333 @@ maxfps106=0 initts106=0 winver106=0 maxres106=0 +title107=Total Annihilation Kingdoms +path107=D:\Games\Total Annihilation Kingdoms\Kingdoms.exe +module107= +opengllib107= +ver107=7 +coord107=0 +flag107=671105058 +flagg107=1207959552 +flagh107=20 +flagi107=4 +tflag107=6162 +initx107=0 +inity107=0 +minx107=0 +miny107=0 +maxx107=0 +maxy107=0 +posx107=50 +posy107=50 +sizx107=800 +sizy107=600 +maxfps107=0 +initts107=0 +winver107=0 +maxres107=0 +title108=Unreal Tournament +path108=D:\Games\Unreal Tournament\System\UnrealTournament.exe +module108= +opengllib108= +ver108=0 +coord108=0 +flag108=-2013265886 +flagg108=1209073680 +flagh108=20 +flagi108=2052 +tflag108=4096 +initx108=0 +inity108=0 +minx108=0 +miny108=0 +maxx108=0 +maxy108=0 +posx108=50 +posy108=50 +sizx108=1200 +sizy108=900 +maxfps108=0 +initts108=0 +winver108=0 +maxres108=0 +title109=Virtua Fighter 2 (DEMO) +path109=D:\Games\vf2_demo\VF2DEMO.EXE +module109= +opengllib109= +ver109=0 +coord109=0 +flag109=939524131 +flagg109=1207959664 +flagh109=20 +flagi109=0 +tflag109=0 +initx109=0 +inity109=0 +minx109=0 +miny109=0 +maxx109=0 +maxy109=0 +posx109=50 +posy109=50 +sizx109=800 +sizy109=600 +maxfps109=0 +initts109=0 +winver109=0 +maxres109=0 +title110=Virtua Fighter PC +path110=D:\Games\Virtua Fighter\VFPC.EXE +module110= +opengllib110= +ver110=0 +coord110=0 +flag110=402653218 +flagg110=1224736784 +flagh110=33562644 +flagi110=0 +tflag110=290 +initx110=0 +inity110=0 +minx110=0 +miny110=0 +maxx110=0 +maxy110=0 +posx110=50 +posy110=50 +sizx110=800 +sizy110=600 +maxfps110=0 +initts110=0 +winver110=0 +maxres110=2 +title111=Warcraft 2 Battlenet Ed +path111=D:\Games\Warcraft 2 Battlenet Ed\Warcraft II BNE.exe +module111= +opengllib111= +ver111=0 +coord111=0 +flag111=134217762 +flagg111=1210122240 +flagh111=148 +flagi111=12 +tflag111=0 +initx111=0 +inity111=0 +minx111=0 +miny111=0 +maxx111=0 +maxy111=0 +posx111=50 +posy111=50 +sizx111=800 +sizy111=600 +maxfps111=0 +initts111=0 +winver111=0 +maxres111=0 +title112=Wargasm +path112=D:\Games\Wargasm\tank.exe +module112= +opengllib112= +ver112=0 +coord112=2 +flag112=671088672 +flagg112=1207959696 +flagh112=65556 +flagi112=0 +tflag112=6162 +initx112=0 +inity112=0 +minx112=0 +miny112=0 +maxx112=0 +maxy112=0 +posx112=50 +posy112=50 +sizx112=800 +sizy112=600 +maxfps112=0 +initts112=0 +winver112=0 +maxres112=0 +title113=Warlords Battlecry II (DEMO) +path113=D:\Games\Warlords Battlecry II Demo\Battlecry II Demo.exe +module113= +opengllib113= +ver113=0 +coord113=2 +flag113=134217762 +flagg113=1207959568 +flagh113=22 +flagi113=0 +tflag113=258 +initx113=0 +inity113=0 +minx113=0 +miny113=0 +maxx113=0 +maxy113=0 +posx113=50 +posy113=50 +sizx113=800 +sizy113=600 +maxfps113=0 +initts113=0 +winver113=0 +maxres113=0 +title114=Whiteout +path114=D:\Games\Whiteout\Whiteout.exe +module114= +opengllib114= +ver114=0 +coord114=0 +flag114=402653217 +flagg114=1207959552 +flagh114=20 +flagi114=0 +tflag114=66 +initx114=0 +inity114=0 +minx114=0 +miny114=0 +maxx114=0 +maxy114=0 +posx114=50 +posy114=50 +sizx114=640 +sizy114=480 +maxfps114=0 +initts114=0 +winver114=0 +maxres114=0 +title115=Wildfire +path115=D:\Games\Wildfire\Wildfire.exe +module115= +opengllib115= +ver115=0 +coord115=0 +flag115=-1476392958 +flagg115=1210122240 +flagh115=20 +flagi115=12 +tflag115=0 +initx115=0 +inity115=0 +minx115=0 +miny115=0 +maxx115=0 +maxy115=0 +posx115=50 +posy115=50 +sizx115=800 +sizy115=600 +maxfps115=0 +initts115=0 +winver115=0 +maxres115=0 +title116=Worms Pinball +path116=D:\Games\Worms Pinball\WPIB.exe +module116= +opengllib116= +ver116=1 +coord116=0 +flag116=134217762 +flagg116=1207959568 +flagh116=20 +flagi116=4 +tflag116=0 +initx116=0 +inity116=0 +minx116=0 +miny116=0 +maxx116=0 +maxy116=0 +posx116=50 +posy116=50 +sizx116=800 +sizy116=600 +maxfps116=0 +initts116=0 +winver116=0 +maxres116=0 +title117=Zanzarah +path117=D:\Games\Zanzarah\System\zanthp.exe +module117= +opengllib117= +ver117=0 +coord117=0 +flag117=679477280 +flagg117=1207959552 +flagh117=20 +flagi117=0 +tflag117=0 +initx117=0 +inity117=0 +minx117=0 +miny117=0 +maxx117=0 +maxy117=0 +posx117=50 +posy117=50 +sizx117=800 +sizy117=600 +maxfps117=0 +initts117=0 +winver117=0 +maxres117=0 +title118=Zax the Alien Hunter (DEMO) +path118=D:\Games\ZaxDemo\Zax.exe +module118= +opengllib118= +ver118=0 +coord118=2 +flag118=-2011168734 +flagg118=1209008144 +flagh118=20 +flagi118=0 +tflag118=258 +initx118=0 +inity118=0 +minx118=0 +miny118=0 +maxx118=0 +maxy118=0 +posx118=50 +posy118=50 +sizx118=800 +sizy118=600 +maxfps118=0 +initts118=0 +winver118=0 +maxres118=0 +title119=ZPC Zero Population Count +path119=D:\Games\ZPC\ZPC.EXE +module119= +opengllib119= +ver119=0 +coord119=0 +flag119=134217762 +flagg119=1207959552 +flagh119=20 +flagi119=4 +tflag119=0 +initx119=0 +inity119=0 +minx119=0 +miny119=0 +maxx119=0 +maxy119=0 +posx119=50 +posy119=50 +sizx119=800 +sizy119=600 +maxfps119=0 +initts119=0 +winver119=0 +maxres119=0 [window] -posx=840 -posy=104 -sizx=868 -sizy=837 +posx=1035 +posy=288 +sizx=638 +sizy=448 diff --git a/build/exports/Black Moon Chronicles.dxw b/build/exports/Black Moon Chronicles.dxw new file mode 100644 index 0000000..ddb82ae --- /dev/null +++ b/build/exports/Black Moon Chronicles.dxw @@ -0,0 +1,26 @@ +[target] +title0=Black Moon Chronicles +path0=D:\Games\Black Moon Chronicles\Lune noire\Engine.exe +module0= +opengllib0= +ver0=0 +coord0=0 +flag0=134234146 +flagg0=1207959568 +flagh0=32788 +flagi0=4 +tflag0=6211 +initx0=0 +inity0=0 +minx0=0 +miny0=0 +maxx0=0 +maxy0=0 +posx0=50 +posy0=50 +sizx0=800 +sizy0=600 +maxfps0=0 +initts0=0 +winver0=0 +maxres0=-1 diff --git a/build/exports/Dark Vengeance.dxw b/build/exports/Dark Vengeance.dxw new file mode 100644 index 0000000..6cf30fa --- /dev/null +++ b/build/exports/Dark Vengeance.dxw @@ -0,0 +1,26 @@ +[target] +title0=Dark Vengeance +path0=D:\Games\dark_vengeance\dv.exe +module0= +opengllib0= +ver0=0 +coord0=0 +flag0=136314915 +flagg0=1476395008 +flagh0=65556 +flagi0=4 +tflag0=2049 +initx0=0 +inity0=0 +minx0=0 +miny0=0 +maxx0=0 +maxy0=0 +posx0=50 +posy0=50 +sizx0=800 +sizy0=600 +maxfps0=0 +initts0=0 +winver0=0 +maxres0=-1 diff --git a/build/exports/Duke Nukem - Manhattan Project (D3D8).dxw b/build/exports/Duke Nukem - Manhattan Project (D3D8).dxw new file mode 100644 index 0000000..18b7b30 --- /dev/null +++ b/build/exports/Duke Nukem - Manhattan Project (D3D8).dxw @@ -0,0 +1,26 @@ +[target] +title0=Duke Nukem - Manhattan Project (D3D8) +path0=D:\Games\Duke Nukem - Manhattan Project\prism3d.exe +module0=p3shared +opengllib0= +ver0=8 +coord0=0 +flag0=134217762 +flagg0=1207959552 +flagh0=20 +flagi0=4 +tflag0=0 +initx0=0 +inity0=0 +minx0=0 +miny0=0 +maxx0=0 +maxy0=0 +posx0=50 +posy0=50 +sizx0=800 +sizy0=600 +maxfps0=0 +initts0=0 +winver0=0 +maxres0=-1 diff --git a/build/exports/KKND Xtreme.dxw b/build/exports/KKND Xtreme.dxw new file mode 100644 index 0000000..a9c842f --- /dev/null +++ b/build/exports/KKND Xtreme.dxw @@ -0,0 +1,26 @@ +[target] +title0=KKND Xtreme +path0=D:\Games\KKNDXtreme\KKND.exe +module0= +opengllib0= +ver0=0 +coord0=0 +flag0=134234146 +flagg0=1207959552 +flagh0=20 +flagi0=4 +tflag0=0 +initx0=0 +inity0=0 +minx0=0 +miny0=0 +maxx0=0 +maxy0=0 +posx0=50 +posy0=50 +sizx0=800 +sizy0=600 +maxfps0=0 +initts0=0 +winver0=0 +maxres0=-1 diff --git a/build/exports/Millennium Racer Y2K fighters.dxw b/build/exports/Millennium Racer Y2K fighters.dxw new file mode 100644 index 0000000..5d2d6b7 --- /dev/null +++ b/build/exports/Millennium Racer Y2K fighters.dxw @@ -0,0 +1,26 @@ +[target] +title0=Millennium Racer Y2K fighters +path0=D:\Games\Millennium Racer\MRacer.exe +module0= +opengllib0= +ver0=0 +coord0=0 +flag0=671105056 +flagg0=1476395024 +flagh0=20 +flagi0=4 +tflag0=0 +initx0=0 +inity0=0 +minx0=0 +miny0=0 +maxx0=0 +maxy0=0 +posx0=50 +posy0=50 +sizx0=800 +sizy0=600 +maxfps0=0 +initts0=0 +winver0=0 +maxres0=-1 diff --git a/build/exports/O.R.B. Offword Rescue Base.dxw b/build/exports/O.R.B. Offword Rescue Base.dxw new file mode 100644 index 0000000..245e8c7 --- /dev/null +++ b/build/exports/O.R.B. Offword Rescue Base.dxw @@ -0,0 +1,26 @@ +[target] +title0=O.R.B. Offword Rescue Base +path0=D:\Games\O.R.B\orb.exe +module0= +opengllib0= +ver0=0 +coord0=2 +flag0=134234144 +flagg0=1207959568 +flagh0=20 +flagi0=4 +tflag0=6163 +initx0=0 +inity0=0 +minx0=0 +miny0=0 +maxx0=0 +maxy0=0 +posx0=50 +posy0=50 +sizx0=800 +sizy0=600 +maxfps0=0 +initts0=0 +winver0=0 +maxres0=-1 diff --git a/build/exports/Port Royale 2.dxw b/build/exports/Port Royale 2.dxw new file mode 100644 index 0000000..02ee5b9 --- /dev/null +++ b/build/exports/Port Royale 2.dxw @@ -0,0 +1,26 @@ +[target] +title0=Port Royale 2 +path0=D:\Games\Port Royale 2\PR2.exe +module0= +opengllib0= +ver0=8 +coord0=0 +flag0=671096866 +flagg0=1207959552 +flagh0=65556 +flagi0=4 +tflag0=0 +initx0=0 +inity0=0 +minx0=0 +miny0=0 +maxx0=0 +maxy0=0 +posx0=50 +posy0=50 +sizx0=800 +sizy0=600 +maxfps0=0 +initts0=0 +winver0=0 +maxres0=-1 diff --git a/build/exports/Project Eden.dxw b/build/exports/Project Eden.dxw new file mode 100644 index 0000000..dd04a6e --- /dev/null +++ b/build/exports/Project Eden.dxw @@ -0,0 +1,26 @@ +[target] +title0=Project Eden +path0=D:\Games\Project Eden\Eden.exe +module0= +opengllib0= +ver0=0 +coord0=0 +flag0=134217763 +flagg0=1207959552 +flagh0=20 +flagi0=4 +tflag0=64 +initx0=0 +inity0=0 +minx0=0 +miny0=0 +maxx0=0 +maxy0=0 +posx0=50 +posy0=50 +sizx0=800 +sizy0=600 +maxfps0=0 +initts0=0 +winver0=0 +maxres0=-1 diff --git a/build/exports/State of War Warmonger.dxw b/build/exports/State of War Warmonger.dxw new file mode 100644 index 0000000..44300a8 --- /dev/null +++ b/build/exports/State of War Warmonger.dxw @@ -0,0 +1,26 @@ +[target] +title0=State of War Warmonger +path0=D:\Games\State of War Warmonger\State of War - Warmonger.exe +module0= +opengllib0= +ver0=0 +coord0=0 +flag0=134234210 +flagg0=134217728 +flagh0=532 +flagi0=4 +tflag0=0 +initx0=0 +inity0=0 +minx0=0 +miny0=0 +maxx0=0 +maxy0=0 +posx0=50 +posy0=50 +sizx0=800 +sizy0=600 +maxfps0=0 +initts0=0 +winver0=0 +maxres0=-1 diff --git a/build/readme-relnotes.txt b/build/readme-relnotes.txt index 274098b..a44714c 100644 --- a/build/readme-relnotes.txt +++ b/build/readme-relnotes.txt @@ -366,3 +366,14 @@ fixed window move/resize when message processing is enabled: coordinates outside expanded timer processing to include user32 Set/KillTimer - in "Aaron Hall's Dungeon Odissey" fixed possible recursion while hooking child window procedure identical to parent's one fixed gdi emulation on top of ddraw surface, enough to play "Sid Meyer's Civilization III". + +v2.02.54 +fixed a bug in d3d GetAvailableVidMem that was causing too many troubles... +fixed a bug in Suppress IME option +fixed a bug in handled library list, possibly affecting d3d/d3d7 games +avoid fixing window style for non-desktop windows (fixed a Port Royale 2 bug) +eliminated "Disable HAL support", no longer necessary +some incomplete work on gdi game handling +added preliminary, incomplete (not working) glide handling + + diff --git a/d3d9proxy/proxydll.sln b/d3d9proxy/proxydll.sln deleted file mode 100644 index c88932b..0000000 --- a/d3d9proxy/proxydll.sln +++ /dev/null @@ -1,19 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual Studio 2008 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "proxydll", "proxydll.vcproj", "{02EB97D5-B1C5-411E-8274-83A95985DE6F}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {02EB97D5-B1C5-411E-8274-83A95985DE6F}.Debug|Win32.ActiveCfg = Debug|Win32 - {02EB97D5-B1C5-411E-8274-83A95985DE6F}.Debug|Win32.Build.0 = Debug|Win32 - {02EB97D5-B1C5-411E-8274-83A95985DE6F}.Release|Win32.ActiveCfg = Release|Win32 - {02EB97D5-B1C5-411E-8274-83A95985DE6F}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/dll/ddraw.cpp b/dll/ddraw.cpp index 55708e4..5d91f1c 100644 --- a/dll/ddraw.cpp +++ b/dll/ddraw.cpp @@ -1627,13 +1627,25 @@ HRESULT WINAPI extQueryInterfaceS(void *lpdds, REFIID riid, LPVOID *obp) break; case 0x84e63de0: OutTraceDW("QueryInterface: IID_IDirect3DHALDevice\n"); +#ifdef COMMENTED_OUT if (dxw.dwFlags3 & DISABLEHAL){ // IID_IDirect3DHALDevice - Dark Vengeance // this is odd: this piece of code returns the very same error code returned by the actual // QueryInterface call, but avoid a memory corruption and makes the game working.... // there must be something wrong behind it. + + // SEEMS FIXED NOW, NO MORE CRASHES, THIS OPTION IS USELESS + OutTraceDW("QueryInterface: suppress IID_IDirect3DHALDevice interface res=DDERR_GENERIC\n"); return DDERR_GENERIC; + + //GUID IID_IDirect3DRGBDevice = {0xA4665C60,0x2673,0x11CF,0xA3,0x1A,0x00,0xAA,0x00,0xB9,0x33,0x56}; + //res = (*pQueryInterfaceS)(lpdds, IID_IDirect3DRGBDevice, obp); + //OutTraceDW("QueryInterface: redirect IID_IDirect3DHALDevice to RGB interface res=%x(%s)\n", res, ExplainDDError(res)); + //return res; + + //return DD_OK; } +#endif break; case 0xA4665C60: // IID_IDirect3DRGBDevice OutTraceDW("QueryInterface: IID_IDirect3DRGBDevice\n"); @@ -3724,6 +3736,23 @@ HRESULT WINAPI myEnumModesFilter(LPDDSURFACEDESC lpDDSurfaceDesc, LPVOID lpConte } } + if(dxw.dwFlags4 & LIMITSCREENRES){ + #define HUGE 100000 + DWORD maxw, maxh; + switch(dxw.MaxScreenRes){ + case DXW_NO_LIMIT: maxw=HUGE; maxh=HUGE; break; + case DXW_LIMIT_320x200: maxw=320; maxh=200; break; + case DXW_LIMIT_640x480: maxw=640; maxh=480; break; + case DXW_LIMIT_800x600: maxw=800; maxh=600; break; + case DXW_LIMIT_1024x768: maxw=1024; maxh=768; break; + case DXW_LIMIT_1280x960: maxw=1280; maxh=960; break; + } + if((lpDDSurfaceDesc->dwWidth > maxw) || (lpDDSurfaceDesc->dwHeight > maxh)){ + OutTraceDW("EnumDisplaySettings: hide device mode=(%d,%d)\n", maxw, maxh); + return DDENUMRET_OK; + } + } + // tricky part: in 16BPP color depth let the callback believe that the pixel encoding // is actually the one implemented in the emulation routines. // should it fix also the other color depths? @@ -4428,6 +4457,7 @@ HRESULT WINAPI extDirectDrawEnumerateEx(LPDDENUMCALLBACKEX lpCallback, LPVOID lp else ret=(*pDirectDrawEnumerateEx)(lpCallback, lpContext, dwFlags); if(ret) OutTraceE("DirectDrawEnumerateEx: ERROR res=%x(%s)\n", ret, ExplainDDError(ret)); + if(dxw.dwFlags1 & SUPPRESSDXERRORS) ret=0; return ret; } @@ -4461,11 +4491,14 @@ HRESULT WINAPI extDDGetGammaRamp(LPDIRECTDRAWSURFACE lpdds, DWORD dwFlags, LPDDG } else { OutTraceDW("GetAvailableVidMem(D): DDSCaps=%x(%s) Total=%x Free=%x\n", - *lpDDSCaps, ExplainDDSCaps(lpDDSCaps->dwCaps), *lpdwTotal, *lpdwFree); + *lpDDSCaps, ExplainDDSCaps(lpDDSCaps->dwCaps), lpdwTotal?*lpdwTotal:0, lpdwFree?*lpdwFree:0); if(dxw.dwFlags2 & LIMITRESOURCES){ // check for memory value overflow - see "Mageslayer" and "Take no Prisoners" DWORD dwLocalTotal; const DWORD dwMaxMem = 0x7FFFF000; - if(lpdwTotal == NULL) lpdwTotal = &dwLocalTotal; // point to usable memory.... + if(lpdwTotal == NULL) { + lpdwTotal = &dwLocalTotal; // point to usable memory.... + res=(*pGetAvailableVidMem)(lpdd, lpDDSCaps, lpdwTotal, lpdwFree); // do it again to get total memory + } if(*lpdwTotal > dwMaxMem){ if(lpdwFree != NULL){ DWORD dwDiff = *lpdwTotal - *lpdwFree; diff --git a/dll/dxhook.cpp b/dll/dxhook.cpp index 91be625..42b83eb 100644 --- a/dll/dxhook.cpp +++ b/dll/dxhook.cpp @@ -10,6 +10,7 @@ #include "dxwcore.hpp" #include "dxhook.h" #include "glhook.h" +#include "glidehook.h" #include "msvfwhook.h" #define DXWDECLARATIONS 1 #include "syslibs.h" @@ -59,7 +60,7 @@ static char *Flag3Names[32]={ "FORCEHOOKOPENGL", "MARKBLIT", "HOOKDLLS", "SUPPRESSD3DEXT", "HOOKENABLED", "FIXD3DFRAME", "FORCE16BPP", "BLACKWHITE", "SAVECAPS", "SINGLEPROCAFFINITY", "EMULATEREGISTRY", "CDROMDRIVETYPE", - "NOWINDOWMOVE", "DISABLEHAL", "LOCKSYSCOLORS", "GDIEMULATEDC", + "NOWINDOWMOVE", "--DISABLEHAL--", "LOCKSYSCOLORS", "GDIEMULATEDC", "FULLSCREENONLY", "FONTBYPASS", "YUV2RGB", "RGB2YUV", "BUFFEREDIOFIX", "FILTERMESSAGES", "PEEKALLMESSAGES", "SURFACEWARN", "ANALYTICMODE", "FORCESHEL", "CAPMASK", "COLORFIX", @@ -70,7 +71,7 @@ static char *Flag4Names[32]={ "NOALPHACHANNEL", "SUPPRESSCHILD", "FIXREFCOUNTER", "SHOWTIMESTRETCH", "ZBUFFERCLEAN", "ZBUFFER0CLEAN", "ZBUFFERALWAYS", "DISABLEFOGGING", "NOPOWER2FIX", "NOPERFCOUNTER", "ADDPROXYLIBS", "INTERCEPTRDTSC", - "LIMITSCREENRES", "NOFILLRECT", "", "", + "LIMITSCREENRES", "NOFILLRECT", "HOOKGLIDE", "", "", "", "", "", "", "", "", "", "", "", "", "", @@ -162,9 +163,11 @@ static void SuppressIMEWindow() ImmDisableIME_Type pImmDisableIME; HMODULE ImmLib; ImmLib=(*pLoadLibraryA)("Imm32"); - pImmDisableIME=(ImmDisableIME_Type)(*pGetProcAddress)(ImmLib,"ImmDisableIME"); - (*pImmDisableIME)(-1); - CloseHandle(ImmLib); + if(ImmLib){ + pImmDisableIME=(ImmDisableIME_Type)(*pGetProcAddress)(ImmLib,"ImmDisableIME"); + if(pImmDisableIME)(*pImmDisableIME)(-1); + FreeLibrary(ImmLib); + } } void HookDlls(HMODULE module) @@ -1279,6 +1282,7 @@ void HookModule(HMODULE base, int dxversion) HookDirect3D(base, dxversion); HookDirect3D7(base, dxversion); if(dxw.dwFlags2 & HOOKOPENGL) HookOpenGLLibs(base, dxw.CustomOpenGLLib); + if(dxw.dwFlags4 & HOOKGLIDE) HookGlideLibs(base); if((dxw.dwFlags3 & EMULATEREGISTRY) || (dxw.dwTFlags & OUTREGISTRY)) HookAdvApi32(base); HookMSV4WLibs(base); // -- used by Aliens & Amazons demo: what for? } diff --git a/dll/dxhook.h b/dll/dxhook.h index d3c5cb8..2e776ee 100644 --- a/dll/dxhook.h +++ b/dll/dxhook.h @@ -33,6 +33,7 @@ extern FARPROC Remap_WinMM_ProcAddress(LPCSTR, HMODULE); extern FARPROC Remap_ImeLib_ProcAddress(LPCSTR, HMODULE); extern FARPROC Remap_vfw_ProcAddress(LPCSTR, HMODULE); extern FARPROC Remap_AdvApi32_ProcAddress(LPCSTR, HMODULE); +extern FARPROC Remap_Glide_ProcAddress(LPCSTR, HMODULE); typedef struct { char *APIName; diff --git a/dll/dxwcore.cpp b/dll/dxwcore.cpp index fe22d18..b48d26f 100644 --- a/dll/dxwcore.cpp +++ b/dll/dxwcore.cpp @@ -1203,9 +1203,11 @@ int dxwCore::GetDLLIndex(char *lpFileName) "tapi32", "netapi32", "wintrust", - "advapi32", "d3dim", "d3dim700", +// "+glide", +// "+glide2x", +// "+glide3x", NULL }; @@ -1308,6 +1310,16 @@ HDC dxwCore::AcquireEmulatedDC(HWND hwnd) return AcquireEmulatedDC(wdc); } +HDC dxwCore::AcquireEmulatedDC(LPDIRECTDRAWSURFACE lpdds) +{ + HDC ddc; + typedef HRESULT (WINAPI *GetDC_Type) (LPDIRECTDRAWSURFACE, HDC FAR *); + extern GetDC_Type pGetDC; + if((*pGetDC)(lpdds, &ddc)) + OutTraceE("GetDC: ERROR err=%d at=%d\n", GetLastError(), __LINE__); + return AcquireEmulatedDC(ddc); +} + HDC dxwCore::AcquireEmulatedDC(HDC wdc) { RealHDC=wdc; @@ -1453,3 +1465,21 @@ void dxwCore::RenewTimers() break; } } + +BOOL dxwCore::CheckScreenResolution(unsigned int w, unsigned int h) +{ + #define HUGE 100000 + if(dxw.dwFlags4 & LIMITSCREENRES){ + DWORD maxw, maxh; + switch(MaxScreenRes){ + case DXW_NO_LIMIT: maxw=HUGE; maxh=HUGE; break; + case DXW_LIMIT_320x200: maxw=320; maxh=200; break; + case DXW_LIMIT_640x480: maxw=640; maxh=480; break; + case DXW_LIMIT_800x600: maxw=800; maxh=600; break; + case DXW_LIMIT_1024x768: maxw=1024; maxh=768; break; + case DXW_LIMIT_1280x960: maxw=1280; maxh=960; break; + } + if((w > maxw) || (h > maxh)) return FALSE; + } + return TRUE; +} diff --git a/dll/dxwcore.hpp b/dll/dxwcore.hpp index 0e92324..c0cde6e 100644 --- a/dll/dxwcore.hpp +++ b/dll/dxwcore.hpp @@ -100,6 +100,7 @@ public: // methods void FixWindowFrame(HWND); HDC AcquireEmulatedDC(HWND); HDC AcquireEmulatedDC(HDC); + HDC AcquireEmulatedDC(LPDIRECTDRAWSURFACE); BOOL ReleaseEmulatedDC(HWND); BOOL IsVirtual(HDC); void ResetEmulatedDC(); @@ -110,6 +111,7 @@ public: // methods void PopTimer(UINT); void PopTimer(HWND, UINT_PTR); void RenewTimers(); + BOOL CheckScreenResolution(unsigned int, unsigned int); public: // simple data variables DDPIXELFORMAT ActualPixelFormat; @@ -177,7 +179,7 @@ typedef enum { SYSLIBIDX_DIRECT3D9, SYSLIBIDX_DIRECT3D10, SYSLIBIDX_DIRECT3D10_1, - SYSLIBIDX_DIRECT2D11, + SYSLIBIDX_DIRECT3D11, SYSLIBIDX_OPENGL, SYSLIBIDX_MSVFW, SYSLIBIDX_SMACK, @@ -197,5 +199,9 @@ typedef enum { SYSLIBIDX_WINTRUST, SYSLIBIDX_DIRECT3D, SYSLIBIDX_DIRECT3D700, +// SYSLIBIDX_GLIDE, +// SYSLIBIDX_GLIDE2X, +// SYSLIBIDX_GLIDE3X, SYSLIBIDX_MAX } enum_syslibraries; + diff --git a/dll/dxwnd.cpp b/dll/dxwnd.cpp index a4525f9..f7236da 100644 --- a/dll/dxwnd.cpp +++ b/dll/dxwnd.cpp @@ -24,7 +24,7 @@ along with this program. If not, see . #include "dxwnd.h" #include "dxwcore.hpp" -#define VERSION "2.02.53" +#define VERSION "2.02.54" #define DDTHREADLOCK 1 diff --git a/dll/dxwnd.vs2008.suo b/dll/dxwnd.vs2008.suo index f1a1067..20e9ab0 100644 Binary files a/dll/dxwnd.vs2008.suo and b/dll/dxwnd.vs2008.suo differ diff --git a/dll/dxwnd.vs2008.vcproj b/dll/dxwnd.vs2008.vcproj index d634efd..9275997 100644 --- a/dll/dxwnd.vs2008.vcproj +++ b/dll/dxwnd.vs2008.vcproj @@ -332,6 +332,10 @@ RelativePath=".\gdi32.cpp" > + + @@ -425,6 +429,10 @@ RelativePath=".\glhook.h" > + + diff --git a/dll/gdi32.cpp b/dll/gdi32.cpp index 9298cbb..24d19b6 100644 --- a/dll/gdi32.cpp +++ b/dll/gdi32.cpp @@ -629,7 +629,7 @@ HDC WINAPI extDDCreateCompatibleDC(HDC hdc) res=(*pGetDC)(dxw.lpDDSPrimHDC, &PrimHDC); if(res) OutTraceE("GDI.CreateCompatibleDC ERROR: GetDC lpdds=%x err=%d(%s) at %d\n", dxw.lpDDSPrimHDC, res, ExplainDDError(res), __LINE__); } - OutTraceDW("GDI.CreateCompatibleDC: duplicating screen HDC lpDDSPrimHDC=%x SrcHdc=%x\n", dxw.lpDDSPrimHDC, PrimHDC); + OutTraceDW("GDI.CreateCompatibleDC: duplicating primary surface HDC lpDDSPrimHDC=%x SrcHdc=%x\n", dxw.lpDDSPrimHDC, PrimHDC); RetHdc=(*pGDICreateCompatibleDC)(PrimHDC); } else @@ -654,7 +654,6 @@ BOOL WINAPI extDDDeleteDC(HDC hdc) return res; } -#if 1 static HDC WINAPI winDDGetDC(HWND hwnd, char *api) { HDC hdc; @@ -700,42 +699,6 @@ static HDC WINAPI winDDGetDC(HWND hwnd, char *api) OutTraceE("%s: ERROR err=%d at %d\n", api, GetLastError, __LINE__); return(hdc); } -#else -HDC hPrimaryDC=NULL; -static HDC WINAPI winDDGetDC(HWND hwnd, char *api) -{ - HDC hdc; - //HRESULT res; - //extern HRESULT WINAPI extGetDC(LPDIRECTDRAWSURFACE, HDC FAR *); - - OutTraceDW("%s: hwnd=%x\n", api, hwnd); - - //dxw.ResetPrimarySurface(); - //dxw.SetPrimarySurface(); - if(dxw.IsRealDesktop(hwnd) && dxw.IsFullScreen()){ - LPDIRECTDRAWSURFACE lpPrim; - HDC PrimDC; - lpPrim=dxw.GetPrimarySurface(); - (*pGetDC)(lpPrim, &PrimDC); - hdc=(*pGDICreateCompatibleDC)(PrimDC); - (*pReleaseDC)(lpPrim, PrimDC); - OutTraceDW("%s: returning DDRAW DC handle hwnd=%x hdc=%x\n", api, hwnd, hdc); - hPrimaryDC=hdc; - return hdc; - } - else { - hdc=(*pGDIGetDC)(hwnd ? hwnd : dxw.GethWnd()); - OutTraceDW("%s: returning window DC handle hwnd=%x hdc=%x\n", api, hwnd, hdc); - //PrimHDC=NULL; - } - - if(hdc) - OutTraceDW("%s: hwnd=%x hdc=%x\n", api, hwnd, hdc); - else - OutTraceE("%s: ERROR err=%d at %d\n", api, GetLastError, __LINE__); - return(hdc); -} -#endif HDC WINAPI extDDCreateDC(LPSTR Driver, LPSTR Device, LPSTR Output, CONST DEVMODE *InitData) { @@ -807,9 +770,8 @@ BOOL WINAPI extDDBitBlt(HDC hdcDest, int nXDest, int nYDest, int nWidth, int nHe OutTraceDW("GDI.BitBlt(PRIMARY): HDC=%x nXDest=%d nYDest=%d nWidth=%d nHeight=%d hdcSrc=%x nXSrc=%d nYSrc=%d dwRop=%x(%s)\n", hdcDest, nXDest, nYDest, nWidth, nHeight, hdcSrc, nXSrc, nYSrc, dwRop, ExplainROP(dwRop)); - ret=1; // OK + ret=TRUE; // OK - //if(hdcDest==0) { if(dxw.IsDesktop(WindowFromDC(hdcDest))) { OutTrace("hdcDest=%x PrimHDC=%x\n", hdcDest, PrimHDC); hdcDest=PrimHDC; @@ -822,20 +784,12 @@ BOOL WINAPI extDDBitBlt(HDC hdcDest, int nXDest, int nYDest, int nWidth, int nHe res=(*pGDIBitBlt)(hdcDest, nXDest, nYDest, nWidth, nHeight, hdcSrc, nXSrc, nYSrc, dwRop); if(!res) OutTraceE("GDI.BitBlt: ERROR err=%d at %d\n", GetLastError(), __LINE__); dxw.ScreenRefresh(); - + return ret; } + // proxy ... res=(*pGDIBitBlt)(hdcDest, nXDest, nYDest, nWidth, nHeight, hdcSrc, nXSrc, nYSrc, dwRop); if(!res) OutTraceE("GDI.BitBlt: ERROR err=%d at %d\n", GetLastError(), __LINE__); - - - //dxw.SetPrimarySurface(); - //OutTraceDW("GDI.StretchBlt: refreshing primary surface lpdds=%x\n",dxw.lpDDSPrimHDC); - //sBlt("GDI.BitBlt", dxw.lpDDSPrimHDC, NULL, dxw.lpDDSPrimHDC, NULL, 0, NULL, 0); - //res=(*pUnlockMethod(dxw.lpDDSPrimHDC))(dxw.lpDDSPrimHDC, NULL); - - //res=(*pGDIBitBlt)(NULL, nXDest, nYDest, nWidth, nHeight, hdcSrc, nXSrc, nYSrc, dwRop); - //if(!res) ret=0; return ret; } diff --git a/dll/glide.cpp b/dll/glide.cpp new file mode 100644 index 0000000..91e69b5 --- /dev/null +++ b/dll/glide.cpp @@ -0,0 +1,130 @@ +#define __MSC__ +#include +#include +#include "dxwnd.h" +#include "dxwcore.hpp" +#include "syslibs.h" +#include "dxhook.h" +#include "hddraw.h" +#include "dxhelper.h" +#include "glidehook.h" + +void WINAPI extgrGlideInit(void); +void WINAPI extgrGlideShutdown(void); +void WINAPI extgrClipWindow(FxU32, FxU32, FxU32, FxU32); +GrContext_t WINAPI extgrSstWinOpen(FxU32, GrScreenResolution_t, GrScreenRefresh_t, GrColorFormat_t, GrOriginLocation_t, int, int); +FxI32 WINAPI extgrQueryResolutions (const GrResolution *, GrResolution *); + +grGlideInit_Type pgrGlideInit = 0; +grGlideShutdown_Type pgrGlideShutdown = 0; +grClipWindow_Type pgrClipWindow = 0; +grSstWinOpen_Type pgrSstWinOpen = 0; +grQueryResolutions_Type pgrQueryResolutions = 0; + +static HookEntry_Type Hooks[]={ + {"_grGlideInit@0", (FARPROC)NULL, (FARPROC *)&pgrGlideInit, (FARPROC)extgrGlideInit}, + {"_grGlideShutdown@0", (FARPROC)NULL, (FARPROC *)&pgrGlideShutdown, (FARPROC)extgrGlideShutdown}, + {"_grClipWindow@16", (FARPROC)NULL, (FARPROC *)&pgrClipWindow, (FARPROC)extgrClipWindow}, + {"_grSstWinOpen@28", (FARPROC)NULL, (FARPROC *)&pgrSstWinOpen, (FARPROC)extgrSstWinOpen}, + {"_grQueryResolutions@8", (FARPROC)NULL, (FARPROC *)&pgrQueryResolutions, (FARPROC)extgrQueryResolutions}, + {0, NULL, 0, 0} // terminator +}; + +FARPROC Remap_Glide_ProcAddress(LPCSTR proc, HMODULE hModule) +{ + FARPROC addr; + OutTrace("Remap_Glide_ProcAddress: proc=%s\n", proc); + if(!(dxw.dwFlags4 & HOOKGLIDE)) return NULL; + if (addr=RemapLibrary(proc, hModule, Hooks)) return addr; + // NULL -> keep the original call address + return NULL; +} + +void HookGlideLibs(HMODULE hModule) +{ + OutTraceDW("HookGlideLibs module=%x\n", hModule); + HookLibrary(hModule, Hooks, "glide.dll"); + HookLibrary(hModule, Hooks, "glide2x.dll"); + HookLibrary(hModule, Hooks, "glide3x.dll"); + return; +} + +// static utility + +static char *ExplainGlideRes(int res) +{ + char *p; + switch(res){ + case GR_RESOLUTION_320x200: p="320x200"; break; + case GR_RESOLUTION_320x240: p="320x240"; break; + case GR_RESOLUTION_400x256: p="400x256"; break; + case GR_RESOLUTION_512x384: p="512x384"; break; + case GR_RESOLUTION_640x200: p="640x200"; break; + case GR_RESOLUTION_640x350: p="640x350"; break; + case GR_RESOLUTION_640x400: p="640x400"; break; + case GR_RESOLUTION_640x480: p="640x480"; break; + case GR_RESOLUTION_800x600: p="800x600"; break; + case GR_RESOLUTION_960x720: p="960x720"; break; + case GR_RESOLUTION_856x480: p="856x480"; break; + case GR_RESOLUTION_512x256: p="512x256"; break; + case GR_RESOLUTION_1024x768: p="1024x768"; break; + case GR_RESOLUTION_1280x1024: p="1280x1024"; break; + case GR_RESOLUTION_1600x1200: p="1600x1200"; break; + case GR_RESOLUTION_400x300: p="400x300"; break; + case GR_RESOLUTION_NONE: p="NONE"; break; + default: p="unknown"; break; + } + return p; +} + +// glide wrappers + +void WINAPI extgrClipWindow(FxU32 minx, FxU32 miny, FxU32 maxx, FxU32 maxy) +{ + OutTrace("grClipWindow: win=(%d,%d)-(%d,%d)\n", minx, miny, maxx, maxy); + return (*pgrClipWindow)(minx, miny, maxx, maxy); +} + +GrContext_t WINAPI extgrSstWinOpen( + FxU32 hWin, + GrScreenResolution_t res, + GrScreenRefresh_t ref, + GrColorFormat_t cFormat, + GrOriginLocation_t org_loc, + int num_buffers, + int num_aux_buffers) +{ + GrContext_t ret; + + OutTrace("grSstWinOpen: hWin=%x res=%x(%s)\n", hWin, res, ExplainGlideRes(res)); + + if(dxw.IsDesktop((HWND)hWin)) hWin=(FxU32)dxw.GethWnd(); + ret=(*pgrSstWinOpen)(hWin, res, ref, cFormat, org_loc, num_buffers, num_aux_buffers); + OutTrace("grSstWinOpen: ret=%x\n", ret); + return ret; +} + +FxI32 WINAPI extgrQueryResolutions (const GrResolution *resTemplate, GrResolution *output) +{ + FxI32 ret; + + OutTrace("grQueryResolutions: resolution=%x refresh=%x numColorBuffers=%d numAuxBuffers=%d\n", + resTemplate->resolution, resTemplate->refresh, resTemplate->numColorBuffers, resTemplate->numAuxBuffers); + + ret=(*pgrQueryResolutions)(resTemplate, output); + OutTrace("grQueryResolutions: res=%d\n", ret); + return ret; +} + +void WINAPI extgrGlideInit(void) +{ + OutTrace("grGlideInit\n"); + return; +} + +void WINAPI extgrGlideShutdown(void) +{ + OutTrace("grGlideShutdown\n"); + return; +} + diff --git a/dll/glidehook.h b/dll/glidehook.h new file mode 100644 index 0000000..756b2ae --- /dev/null +++ b/dll/glidehook.h @@ -0,0 +1,14 @@ +#define __WIN32__ +#define __MSC__ + +#include "3dfx.h" +#include "glide.h" + +extern void HookGlideLibs(HMODULE); + +typedef void (WINAPI *grGlideInit_Type)(void); +typedef void (WINAPI *grGlideShutdown_Type)(void); +typedef void (WINAPI *grClipWindow_Type)(FxU32, FxU32, FxU32, FxU32); +typedef GrContext_t (WINAPI *grSstWinOpen_Type)(FxU32, GrScreenResolution_t, GrScreenRefresh_t, GrColorFormat_t, GrOriginLocation_t, int, int); +typedef FxI32 (WINAPI *grQueryResolutions_Type)(const GrResolution *, GrResolution *); + diff --git a/dll/kernel32.cpp b/dll/kernel32.cpp index c0c303c..670af27 100644 --- a/dll/kernel32.cpp +++ b/dll/kernel32.cpp @@ -406,7 +406,10 @@ HMODULE WINAPI LoadLibraryExWrapper(LPCTSTR lpFileName, HANDLE hFile, DWORD dwFl if(dwFlags & (LOAD_LIBRARY_AS_DATAFILE_EXCLUSIVE|LOAD_LIBRARY_AS_DATAFILE)) return libhandle; idx=dxw.GetDLLIndex((char *)lpFileName); - if(idx != -1) SysLibs[idx]=libhandle; + if(idx != -1) { + OutTraceDW("%s: push idx=%x library=%s hdl=%x\n", api, idx, lpFileName, libhandle); + SysLibs[idx]=libhandle; + } // handle custom OpenGL library if(!lstrcmpi(lpFileName,dxw.CustomOpenGLLib)){ idx=SYSLIBIDX_OPENGL; @@ -509,12 +512,17 @@ FARPROC WINAPI extGetProcAddress(HMODULE hModule, LPCSTR proc) case SYSLIBIDX_DIRECT3D10_1: if (remap=Remap_d3d10_1_ProcAddress(proc, hModule)) return remap; break; - case SYSLIBIDX_DIRECT2D11: + case SYSLIBIDX_DIRECT3D11: if (remap=Remap_d3d11_ProcAddress(proc, hModule)) return remap; break; case SYSLIBIDX_OPENGL: if (remap=Remap_gl_ProcAddress(proc, hModule)) return remap; break; +// case SYSLIBIDX_GLIDE: +// case SYSLIBIDX_GLIDE2X: +// case SYSLIBIDX_GLIDE3X: +// if (remap=Remap_Glide_ProcAddress(proc, hModule)) return remap; +// break; case SYSLIBIDX_MSVFW: if (remap=Remap_vfw_ProcAddress(proc, hModule)) return remap; break; @@ -534,7 +542,7 @@ FARPROC WINAPI extGetProcAddress(HMODULE hModule, LPCSTR proc) if (remap=Remap_d3d7_ProcAddress(proc, hModule)) return remap; break; default: - break; + break; } } else { diff --git a/dll/user32.cpp b/dll/user32.cpp index 7184465..74368b6 100644 --- a/dll/user32.cpp +++ b/dll/user32.cpp @@ -568,7 +568,8 @@ LONG WINAPI extSetWindowLong(HWND hwnd, int nIndex, LONG dwNewLong) } if (dxw.dwFlags1 & FIXWINFRAME){ - if((nIndex==GWL_STYLE) && !(dwNewLong & WS_CHILD)){ + //if((nIndex==GWL_STYLE) && !(dwNewLong & WS_CHILD)){ + if((nIndex==GWL_STYLE) && !(dwNewLong & WS_CHILD) && dxw.IsDesktop(hwnd)){ OutTraceDW("SetWindowLong: GWL_STYLE %x force OVERLAPPEDWINDOW\n", dwNewLong); dwNewLong |= WS_OVERLAPPEDWINDOW; dwNewLong &= ~WS_CLIPSIBLINGS; @@ -1189,7 +1190,8 @@ static HWND WINAPI extCreateWindowCommon( (*pShowWindow)(wndh, SW_SHOWNORMAL); } - if ((dxw.dwFlags1 & FIXWINFRAME) && !(dwStyle & WS_CHILD)) + //if ((dxw.dwFlags1 & FIXWINFRAME) && !(dwStyle & WS_CHILD)) + if ((dxw.dwFlags1 & FIXWINFRAME) && !(dwStyle & WS_CHILD) && dxw.IsDesktop(wndh)) dxw.FixWindowFrame(wndh); // to do: handle inner child, and leave dialogue & modal child alone!!! @@ -1686,7 +1688,6 @@ int WINAPI extGDIReleaseDC(HWND hwnd, HDC hDC) HDC WINAPI extBeginPaint(HWND hwnd, LPPAINTSTRUCT lpPaint) { HDC hdc; - extern HRESULT WINAPI extGetDC(LPDIRECTDRAWSURFACE, HDC FAR *); OutTraceDW("GDI.BeginPaint: hwnd=%x lpPaint=%x FullScreen=%x\n", hwnd, lpPaint, dxw.IsFullScreen()); hdc=(*pBeginPaint)(hwnd, lpPaint); @@ -1695,12 +1696,7 @@ HDC WINAPI extBeginPaint(HWND hwnd, LPPAINTSTRUCT lpPaint) if(!dxw.IsFullScreen()) return hdc; // on CLIENTREMAPPING, resize the paint area to virtual screen size - if(dxw.dwFlags1 & CLIENTREMAPPING){ - lpPaint->rcPaint.top=0; - lpPaint->rcPaint.left=0; - lpPaint->rcPaint.right=dxw.GetScreenWidth(); - lpPaint->rcPaint.bottom=dxw.GetScreenHeight(); - } + if(dxw.dwFlags1 & CLIENTREMAPPING) lpPaint->rcPaint=dxw.GetScreenRect(); if(!dxw.IsDesktop(hwnd)) return hdc; @@ -1708,7 +1704,7 @@ HDC WINAPI extBeginPaint(HWND hwnd, LPPAINTSTRUCT lpPaint) HDC EmuHDC; EmuHDC = dxw.AcquireEmulatedDC(hwnd); lpPaint->hdc=EmuHDC; - dxw.MapClient(&lpPaint->rcPaint); + //dxw.MapClient(&lpPaint->rcPaint); OutTraceDW("GDI.BeginPaint(GDIEMULATEDC): hdc=%x -> %x\n", hdc, EmuHDC); return EmuHDC; } @@ -1717,27 +1713,22 @@ HDC WINAPI extBeginPaint(HWND hwnd, LPPAINTSTRUCT lpPaint) return hdc; } +#ifndef EXPERIMENTAL HDC WINAPI extDDBeginPaint(HWND hwnd, LPPAINTSTRUCT lpPaint) { HDC hdc; extern HRESULT WINAPI extGetDC(LPDIRECTDRAWSURFACE, HDC FAR *); - OutTraceDW("GDI.BeginPaint: hwnd=%x lpPaint=%x FullScreen=%x\n", hwnd, lpPaint, dxw.IsFullScreen()); + OutTraceDW("GDI.BeginPaint: hwnd=%x%s lpPaint=%x FullScreen=%x\n", + hwnd, dxw.IsDesktop(hwnd)?"(DESKTOP)":"", lpPaint, dxw.IsFullScreen()); + + if(dxw.IsDesktop(hwnd)) hwnd=dxw.GethWnd(); + hdc=(*pBeginPaint)(hwnd, lpPaint); // if not in fullscreen mode, that's all! if(!dxw.IsFullScreen()) return hdc; - // on CLIENTREMAPPING, resize the paint area to virtual screen size - if(dxw.dwFlags1 & CLIENTREMAPPING){ - lpPaint->rcPaint.top=0; - lpPaint->rcPaint.left=0; - lpPaint->rcPaint.right=dxw.GetScreenWidth(); - lpPaint->rcPaint.bottom=dxw.GetScreenHeight(); - } - - if(!dxw.IsDesktop(hwnd)) return hdc; - // on MAPGDITOPRIMARY, return the PrimHDC handle instead of the window DC // if a primary surface has not been created yet, do it if(!pGetDC || !dxw.lpDDSPrimHDC){ @@ -1747,8 +1738,7 @@ HDC WINAPI extDDBeginPaint(HWND hwnd, LPPAINTSTRUCT lpPaint) LPDIRECTDRAWSURFACE lpDDS; DDSURFACEDESC ddsd; res=extDirectDrawCreate(0, &lpDD, NULL); - //lpDD->SetDisplayMode(dxw.GetScreenWidth(), dxw.GetScreenHeight(), NULL); - lpDD->SetCooperativeLevel(hwnd, DDSCL_FULLSCREEN | DDSCL_EXCLUSIVE); + lpDD->SetCooperativeLevel(dxw.GethWnd(), DDSCL_FULLSCREEN | DDSCL_EXCLUSIVE); memset((void *)&ddsd, 0, sizeof(DDSURFACEDESC)); ddsd.dwSize = sizeof(DDSURFACEDESC); ddsd.dwFlags = DDSD_CAPS|DDSD_HEIGHT|DDSD_WIDTH; @@ -1759,61 +1749,80 @@ HDC WINAPI extDDBeginPaint(HWND hwnd, LPPAINTSTRUCT lpPaint) dxw.lpDDSPrimHDC = lpDDS; OutTraceDW("GDI.BeginPaint(MAPGDITOPRIMARY): dd=%x ddsPrim=%x\n", lpDD, lpDDS); } + extGetDC(dxw.lpDDSPrimHDC,&PrimHDC); lpPaint->hdc=PrimHDC; - //dxw.MapClient(&lpPaint->rcPaint); + // resize the paint area to virtual screen size (see CivIII clipped panels...) + lpPaint->rcPaint=dxw.GetScreenRect(); + OutTraceDW("GDI.BeginPaint(MAPGDITOPRIMARY): hdc=%x -> %x\n", hdc, PrimHDC); return PrimHDC; } +#else +HDC WINAPI extDDBeginPaint(HWND hwnd, LPPAINTSTRUCT lpPaint) +{ + HDC hdc; + extern HRESULT WINAPI extGetDC(LPDIRECTDRAWSURFACE, HDC FAR *); + + OutTraceDW("GDI.BeginPaint: hwnd=%x%s lpPaint=%x FullScreen=%x\n", + hwnd, dxw.IsDesktop(hwnd)?"(DESKTOP)":"", lpPaint, dxw.IsFullScreen()); + + if(dxw.IsDesktop(hwnd)) hwnd=dxw.GethWnd(); + + hdc=(*pBeginPaint)(hwnd, lpPaint); + + // if not in fullscreen mode, that's all! + if(!dxw.IsFullScreen()) return hdc; + + // on MAPGDITOPRIMARY, return the PrimHDC handle instead of the window DC + // if a primary surface has not been created yet, do it + if(!pGetDC || !dxw.lpDDSPrimHDC){ + extern HRESULT WINAPI extDirectDrawCreate(GUID FAR *, LPDIRECTDRAW FAR *, IUnknown FAR *); + HRESULT res; + LPDIRECTDRAW lpDD; + LPDIRECTDRAWSURFACE lpDDS; + DDSURFACEDESC ddsd; + res=extDirectDrawCreate(0, &lpDD, NULL); + lpDD->SetCooperativeLevel(dxw.GethWnd(), DDSCL_FULLSCREEN | DDSCL_EXCLUSIVE); + memset((void *)&ddsd, 0, sizeof(DDSURFACEDESC)); + ddsd.dwSize = sizeof(DDSURFACEDESC); + ddsd.dwFlags = DDSD_CAPS|DDSD_HEIGHT|DDSD_WIDTH; + ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE; + ddsd.dwHeight = dxw.GetScreenHeight(); + ddsd.dwWidth = dxw.GetScreenWidth(); + res=lpDD->CreateSurface(&ddsd, &lpDDS, NULL); + dxw.lpDDSPrimHDC = lpDDS; + OutTraceDW("GDI.BeginPaint(MAPGDITOPRIMARY): dd=%x ddsPrim=%x\n", lpDD, lpDDS); + } + + HDC EmuHDC; + EmuHDC = dxw.AcquireEmulatedDC(dxw.lpDDSPrimHDC); + lpPaint->hdc=EmuHDC; + lpPaint->rcPaint=dxw.GetScreenRect(); + OutTraceDW("GDI.BeginPaint(MAPGDITOPRIMARY): hdc=%x -> %x\n", hdc, EmuHDC); + return EmuHDC; +} +#endif BOOL WINAPI extEndPaint(HWND hwnd, const PAINTSTRUCT *lpPaint) { BOOL ret; - extern HRESULT WINAPI extReleaseDC(LPDIRECTDRAWSURFACE lpdds, HDC FAR hdc); - extern HRESULT WINAPI extGetDC(LPDIRECTDRAWSURFACE, HDC FAR *); - extern HRESULT WINAPI extBlt(LPDIRECTDRAWSURFACE lpdds, LPRECT lpdestrect, LPDIRECTDRAWSURFACE lpddssrc, LPRECT lpsrcrect, DWORD dwflags, LPDDBLTFX lpddbltfx); OutTraceDW("GDI.EndPaint: hwnd=%x lpPaint=%x lpPaint.hdc=%x\n", hwnd, lpPaint, lpPaint->hdc); if((dxw.dwFlags3 & GDIEMULATEDC) && dxw.IsFullScreen() && dxw.IsDesktop(hwnd)){ OutTraceDW("GDI.EndPaint(GDIEMULATEDC): hwnd=%x\n", hwnd); ret=dxw.ReleaseEmulatedDC(hwnd); - ret=(*pEndPaint)(hwnd, lpPaint); // useful ???? seems not .... - if(!ret) OutTraceE("GDI.EndPaint ERROR: err=%d at %d\n", GetLastError(), __LINE__); - return ret; - } - - // v2.02.53 ... - if((dxw.dwFlags1 & MAPGDITOPRIMARY) && dxw.IsFullScreen() && dxw.IsDesktop(hwnd)){ - ret=(*pEndPaint)(hwnd, lpPaint); - dxw.lpDDSPrimHDC->Unlock(NULL); - //dxw.ScreenRefresh(); - extBlt(dxw.lpDDSPrimHDC, NULL, dxw.lpDDSPrimHDC, NULL, 0, NULL); - return TRUE; } // proxy part ... ret=(*pEndPaint)(hwnd, lpPaint); OutTraceDW("GDI.EndPaint: hwnd=%x ret=%x\n", hwnd, ret); if(!ret) OutTraceE("GDI.EndPaint ERROR: err=%d at %d\n", GetLastError(), __LINE__); - - //return ret; - - // if not in fullscreen mode, that's all! - if(!dxw.IsFullScreen()) return ret; - - // v2.02.09: on MAPGDITOPRIMARY, release the PrimHDC handle - if(dxw.dwFlags1 & MAPGDITOPRIMARY) { - if(pReleaseDC && dxw.lpDDSPrimHDC){ - extGetDC(dxw.lpDDSPrimHDC,&PrimHDC); - extReleaseDC(dxw.lpDDSPrimHDC, PrimHDC); - OutTraceDW("GDI.EndPaint: released hdc=%x\n", PrimHDC); - } - } - return ret; } +#ifndef EXPERIMENTAL BOOL WINAPI extDDEndPaint(HWND hwnd, const PAINTSTRUCT *lpPaint) { BOOL ret; @@ -1821,10 +1830,12 @@ BOOL WINAPI extDDEndPaint(HWND hwnd, const PAINTSTRUCT *lpPaint) extern HRESULT WINAPI extGetDC(LPDIRECTDRAWSURFACE, HDC FAR *); extern HRESULT WINAPI extBlt(LPDIRECTDRAWSURFACE lpdds, LPRECT lpdestrect, LPDIRECTDRAWSURFACE lpddssrc, LPRECT lpsrcrect, DWORD dwflags, LPDDBLTFX lpddbltfx); - OutTraceDW("GDI.EndPaint: hwnd=%x lpPaint=%x lpPaint.hdc=%x\n", hwnd, lpPaint, lpPaint->hdc); + OutTraceDW("GDI.EndPaint: hwnd=%x%s lpPaint=%x lpPaint.hdc=%x\n", + hwnd, dxw.IsDesktop(hwnd)?"(DESKTOP)":"", lpPaint, lpPaint->hdc); // v2.02.53 ... - if(dxw.IsFullScreen() && dxw.IsDesktop(hwnd)){ + //if(dxw.IsFullScreen() && dxw.IsDesktop(hwnd)){ + if(dxw.IsFullScreen()){ ret=(*pEndPaint)(hwnd, lpPaint); dxw.lpDDSPrimHDC->Unlock(NULL); //dxw.ScreenRefresh(); @@ -1838,6 +1849,40 @@ BOOL WINAPI extDDEndPaint(HWND hwnd, const PAINTSTRUCT *lpPaint) if(!ret) OutTraceE("GDI.EndPaint ERROR: err=%d at %d\n", GetLastError(), __LINE__); return ret; } +#else +BOOL WINAPI extDDEndPaint(HWND hwnd, const PAINTSTRUCT *lpPaint) +{ + BOOL ret; + extern HRESULT WINAPI extReleaseDC(LPDIRECTDRAWSURFACE lpdds, HDC FAR hdc); + extern HRESULT WINAPI extGetDC(LPDIRECTDRAWSURFACE, HDC FAR *); + extern HRESULT WINAPI extBlt(LPDIRECTDRAWSURFACE lpdds, LPRECT lpdestrect, LPDIRECTDRAWSURFACE lpddssrc, LPRECT lpsrcrect, DWORD dwflags, LPDDBLTFX lpddbltfx); + + OutTraceDW("GDI.EndPaint: hwnd=%x%s lpPaint=%x lpPaint.hdc=%x\n", + hwnd, dxw.IsDesktop(hwnd)?"(DESKTOP)":"", lpPaint, lpPaint->hdc); + + // v2.02.53 ... + //if(dxw.IsFullScreen() && dxw.IsDesktop(hwnd)){ + if(dxw.IsFullScreen()){ + RECT client; + HDC hdc; + ret=(*pEndPaint)(hwnd, lpPaint); + (*pGetDC)(dxw.lpDDSPrimHDC, &hdc); + (*pGetClientRect)(hwnd, &client); + if(!(*pGDIBitBlt)(hdc, 0, 0, client.right, client.bottom, lpPaint->hdc, 0, 0, SRCCOPY)) + OutTraceE("StretchBlt: ERROR err=%d at=%d\n", GetLastError(), __LINE__); + extReleaseDC(dxw.lpDDSPrimHDC, hdc); + //dxw.ScreenRefresh(); + extBlt(dxw.lpDDSPrimHDC, NULL, dxw.lpDDSPrimHDC, NULL, 0, NULL); + return TRUE; + } + + // proxy part ... + ret=(*pEndPaint)(hwnd, lpPaint); + OutTraceDW("GDI.EndPaint: hwnd=%x ret=%x\n", hwnd, ret); + if(!ret) OutTraceE("GDI.EndPaint ERROR: err=%d at %d\n", GetLastError(), __LINE__); + return ret; +} +#endif HWND WINAPI extCreateDialogIndirectParam(HINSTANCE hInstance, LPCDLGTEMPLATE lpTemplate, HWND hWndParent, DLGPROC lpDialogFunc, LPARAM lParamInit) { diff --git a/host/Resource.h b/host/Resource.h index 23b26e5..ff9b4e0 100644 --- a/host/Resource.h +++ b/host/Resource.h @@ -73,6 +73,8 @@ #define IDC_VIDEOTOSYSTEMMEM 1030 #define IDC_FIXTEXTOUT 1031 #define IDC_KEEPCURSORWITHIN 1032 +#define IDC_FIXTEXTOUT2 1032 +#define IDC_HOOKGLIDE 1032 #define IDC_USERGB565 1033 #define IDC_SUPPRESSDXERRORS 1034 #define IDC_PREVENTMAXIMIZE 1035 diff --git a/host/TabSysLibs.cpp b/host/TabSysLibs.cpp index f43f3b9..e03632b 100644 --- a/host/TabSysLibs.cpp +++ b/host/TabSysLibs.cpp @@ -34,6 +34,9 @@ void CTabSysLibs::DoDataExchange(CDataExchange* pDX) // OpenGL DDX_Check(pDX, IDC_FORCEHOOKOPENGL, cTarget->m_ForceHookOpenGL); DDX_Text(pDX, IDC_OPENGLLIB, cTarget->m_OpenGLLib); + + // Glide + DDX_Check(pDX, IDC_HOOKGLIDE, cTarget->m_HookGlide); } BEGIN_MESSAGE_MAP(CTabSysLibs, CDialog) diff --git a/host/TargetDlg.cpp b/host/TargetDlg.cpp index 1993abc..fa756e7 100644 --- a/host/TargetDlg.cpp +++ b/host/TargetDlg.cpp @@ -20,7 +20,7 @@ CTargetDlg::CTargetDlg(CWnd* pParent /*=NULL*/) : CDialog(CTargetDlg::IDD, pParent) { //{{AFX_DATA_INIT(CTargetDlg) - m_DXVersion = -1; + m_DXVersion = 0; m_Coordinates = 0; m_DxEmulationMode = 3; // default: EMULATESURFACE m_DCEmulationMode = 0; // default: no emulation @@ -88,6 +88,7 @@ CTargetDlg::CTargetDlg(CWnd* pParent /*=NULL*/) m_CursorClipping = FALSE; m_VideoToSystemMem = FALSE; m_FixTextOut = FALSE; + m_HookGlide = FALSE; m_KeepCursorWithin = FALSE; m_KeepCursorFixed = FALSE; m_UseRGB565 = FALSE; diff --git a/host/TargetDlg.h b/host/TargetDlg.h index 1a6f6b3..143a3c3 100644 --- a/host/TargetDlg.h +++ b/host/TargetDlg.h @@ -70,6 +70,7 @@ public: BOOL m_CursorClipping; BOOL m_VideoToSystemMem; BOOL m_FixTextOut; + BOOL m_HookGlide; BOOL m_KeepCursorWithin; BOOL m_KeepCursorFixed; BOOL m_UseRGB565; diff --git a/host/dxwndhost.aps b/host/dxwndhost.aps index ac4e647..afe5f30 100644 Binary files a/host/dxwndhost.aps and b/host/dxwndhost.aps differ diff --git a/host/dxwndhost.rc b/host/dxwndhost.rc index 8573541..e96686a 100644 --- a/host/dxwndhost.rc +++ b/host/dxwndhost.rc @@ -339,14 +339,14 @@ BEGIN CONTROL "Suppress clipping",IDC_SUPPRESSCLIPPING,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,118,76,119,10 CONTROL "Palette update don't Blit",IDC_NOPALETTEUPDATE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,118,88,119,10 CONTROL "Set AERO compatible mode",IDC_SETCOMPATIBILITY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,118,100,109,12 - CONTROL "Disable HAL support",IDC_DISABLEHAL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,118,112,109,12 - CONTROL "Forces HEL ",IDC_FORCESHEL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,118,124,109,12 - CONTROL "Win7 color fix",IDC_COLORFIX,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,118,136,109,12 - CONTROL "Don't fix the Pixel Format",IDC_NOPIXELFORMAT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,118,148,109,12 + CONTROL "Disable HAL support",IDC_DISABLEHAL,"Button",BS_AUTOCHECKBOX | NOT WS_VISIBLE | WS_DISABLED | WS_TABSTOP,118,216,109,12 + CONTROL "Forces HEL ",IDC_FORCESHEL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,118,112,109,12 + CONTROL "Win7 color fix",IDC_COLORFIX,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,118,124,109,12 + CONTROL "Don't fix the Pixel Format",IDC_NOPIXELFORMAT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,118,136,109,12 CONTROL "by default set no ALPHACHANNEL",IDC_NOALPHACHANNEL, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,118,160,123,12 - CONTROL "Fix ddraw ref counter",IDC_FIXREFCOUNTER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,118,172,123,12 - CONTROL "Add proxy libs",IDC_ADDPROXYLIBS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,118,184,123,12 + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,118,148,123,12 + CONTROL "Fix ddraw ref counter",IDC_FIXREFCOUNTER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,118,160,123,12 + CONTROL "Add proxy libs",IDC_ADDPROXYLIBS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,118,172,123,12 END IDD_TAB_INPUT DIALOGEX 0, 0, 300, 240 @@ -481,6 +481,8 @@ BEGIN LTEXT "Custom OpenGL library",IDC_STATIC,161,43,110,9 EDITTEXT IDC_OPENGLLIB,159,55,126,14,ES_AUTOHSCROLL CONTROL "Force Hook",IDC_FORCEHOOKOPENGL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,162,29,115,10 + GROUPBOX "Glide (3DFX)",IDC_STATIC,7,98,140,72 + CONTROL "Hook Glide libs",IDC_HOOKGLIDE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,112,125,10 END IDD_TAB_DEBUG DIALOGEX 0, 0, 300, 240 diff --git a/host/dxwndhost.vs2008.suo b/host/dxwndhost.vs2008.suo index 81d3939..d9d99e6 100644 Binary files a/host/dxwndhost.vs2008.suo and b/host/dxwndhost.vs2008.suo differ diff --git a/host/dxwndhostView.cpp b/host/dxwndhostView.cpp index 1454047..cef2529 100644 --- a/host/dxwndhostView.cpp +++ b/host/dxwndhostView.cpp @@ -196,6 +196,7 @@ static void SetTargetFromDlg(TARGETMAP *t, CTargetDlg *dlg) if(dlg->m_CursorClipping) t->flags |= CLIPCURSOR; if(dlg->m_VideoToSystemMem) t->flags |= SWITCHVIDEOMEMORY; if(dlg->m_FixTextOut) t->flags |= FIXTEXTOUT; + if(dlg->m_HookGlide) t->flags4 |= HOOKGLIDE; if(dlg->m_KeepCursorWithin) t->flags |= KEEPCURSORWITHIN; if(dlg->m_KeepCursorFixed) t->flags2 |= KEEPCURSORFIXED; if(dlg->m_UseRGB565) t->flags |= USERGB565; @@ -348,6 +349,7 @@ static void SetDlgFromTarget(TARGETMAP *t, CTargetDlg *dlg) dlg->m_CursorClipping = t->flags & CLIPCURSOR ? 1 : 0; dlg->m_VideoToSystemMem = t->flags & SWITCHVIDEOMEMORY ? 1 : 0; dlg->m_FixTextOut = t->flags & FIXTEXTOUT ? 1 : 0; + dlg->m_HookGlide = t->flags4 & HOOKGLIDE ? 1 : 0; dlg->m_KeepCursorWithin = t->flags & KEEPCURSORWITHIN ? 1 : 0; dlg->m_KeepCursorFixed = t->flags2 & KEEPCURSORFIXED ? 1 : 0; dlg->m_UseRGB565 = t->flags & USERGB565 ? 1 : 0; @@ -1142,16 +1144,17 @@ void CDxwndhostView::OnAdd() CTargetDlg dlg; LV_ITEM listitem; - dlg.m_DXVersion = 0; - dlg.m_Coordinates = 0; - dlg.m_MaxX = 0; //639; - dlg.m_MaxY = 0; //479; - dlg.m_DxEmulationMode = 3; // defaulting to EMULATIONMODE + //dlg.m_DXVersion = 0; + //dlg.m_Coordinates = 0; + //dlg.m_MaxX = 0; //639; + //dlg.m_MaxY = 0; //479; + //dlg.m_DxEmulationMode = 3; // defaulting to EMULATIONMODE for(i = 0; i < MAXTARGETS; i ++) if(!TargetMaps[i].path[0]) break; if(i>=MAXTARGETS){ MessageBoxEx(0, "Maximum entries number reached.\nDelete some entry to add a new one.", "Warning", MB_OK | MB_ICONEXCLAMATION, NULL); return; } + memset(&TargetMaps[i],0,sizeof(TARGETMAP)); // clean up, just in case.... if(dlg.DoModal() == IDOK && dlg.m_FilePath.GetLength()){ strncpy(TitleMaps[i].title, dlg.m_Title, 40); SetTargetFromDlg(&TargetMaps[i], &dlg);