📄 ddpdb.c
字号:
/* ***** BEGIN LICENSE BLOCK ***** * Source last modified: $Id: ddpdb.c,v 1.2.2.1 2004/07/09 01:59:19 hubbe Exp $ * * Portions Copyright (c) 1995-2004 RealNetworks, Inc. All Rights Reserved. * * The contents of this file, and the files included with this file, * are subject to the current version of the RealNetworks Public * Source License (the "RPSL") available at * http://www.helixcommunity.org/content/rpsl unless you have licensed * the file under the current version of the RealNetworks Community * Source License (the "RCSL") available at * http://www.helixcommunity.org/content/rcsl, in which case the RCSL * will apply. You may also obtain the license terms directly from * RealNetworks. You may not use this file except in compliance with * the RPSL or, if you have a valid RCSL with RealNetworks applicable * to this file, the RCSL. Please see the applicable RPSL or RCSL for * the rights, obligations and limitations governing use of the * contents of the file. * * Alternatively, the contents of this file may be used under the * terms of the GNU General Public License Version 2 or later (the * "GPL") in which case the provisions of the GPL are applicable * instead of those above. If you wish to allow use of your version of * this file only under the terms of the GPL, and not to allow others * to use your version of this file under the terms of either the RPSL * or RCSL, indicate your decision by deleting the provisions above * and replace them with the notice and other provisions required by * the GPL. If you do not delete the provisions above, a recipient may * use your version of this file under the terms of any one of the * RPSL, the RCSL or the GPL. * * This file is part of the Helix DNA Technology. RealNetworks is the * developer of the Original Code and owns the copyrights in the * portions it created. * * This file, and the files included with this file, is distributed * and made available on an 'AS IS' basis, WITHOUT WARRANTY OF ANY * KIND, EITHER EXPRESS OR IMPLIED, AND REALNETWORKS HEREBY DISCLAIMS * ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET * ENJOYMENT OR NON-INFRINGEMENT. * * Technology Compatibility Kit Test Suite(s) Location: * http://www.helixcommunity.org/content/tck * * Contributor(s): * * ***** END LICENSE BLOCK ***** *//* Windows include files: */#include <windows.h>#include <regstr.h>#include <ddraw.h>#ifdef IMPORT#include <initguid.h>#endif/* standard libraries: */#include <stdio.h>#include <sys/types.h>#include <sys/stat.h>#include <string.h>/* our headers: */#include "hxdx5032.h" // for win95 driver info in CFullScreenInfo#include "ddpdb.h"#include "colormap.h"#include "hxdllldr.h"#define F(cid) (1U << (cid)) /* converts CID into a bitmask */#define MAX_BUF 512#define ENUM_MAX 6/* * DirectDraw profiles: */#define DDPDB_MAGIC "DDPDB"#define DDPDB_VERSION 0x100#define MAXPROFILES 256static struct{ char szMagic[8]; /* some identifier */ DWORD dwVersion; /* database version */ DWORD dwNumProfiles; /* # of records */ DDDEVICEPROFILE ddProfiles[MAXPROFILES]; /* data */} DDPDB ={ DDPDB_MAGIC, DDPDB_VERSION, 30, /* # of profiles !!!!!!!!! */ {{ VER_PLATFORM_WIN32_WINDOWS, {"ATI Rage II+ PCI (ati_m64)", "ati_m64.drv", 0x6b8,0x4000a, 0x1002, 0x4755, 0x0, 0x9a5b, {0x0,0x0,0x0,{0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0}}}, /* buggy driver... do NOT use overlays !!!: */ {0, 0, 0, 0, 0}, /* blits (use YUVs only !!!): */ {F(CID_YV12) + F(CID_YUY2) + F(CID_UYVY), F(CID_YV12) + F(CID_YUY2) + F(CID_UYVY), F(CID_YV12) + F(CID_YUY2) + F(CID_UYVY), F(CID_YV12) + F(CID_YUY2) + F(CID_UYVY), F(CID_YV12) + F(CID_YUY2) + F(CID_UYVY)} }, { VER_PLATFORM_WIN32_WINDOWS, {"RAGE PRO TURBO AGP 2X (English)", "macxdd32.dll", 0x10937,0x4000a, 0x1002, 0x4742, 0x47421002, 0x5c, {0xd7b71ee2,0x402,0x11cf,{0x85,0x7a,0x43,0x67,0xf9,0xc2,0xc9,0x35}}}, /* do NOT use overlays !!!: */ {0, 0, 0, 0, 0}, /* no blits either: */ {0, 0, 0, 0, 0} }, { VER_PLATFORM_WIN32_NT, {"1002-4C46-03", "ati2dvai.dll", 0x10426,0x5000c, 0x3320334d, 0x7a484d33, 0x50474128, 0x400029, {0x800,0x4,0x0,{0x48,0x7,0x13,0x0,0xffffffd2,0x2c,0x40,0x0}}}, /* do NOT use overlays !!!: */ {0, 0, 0, 0, 0}, /* no blits either: */ {0, 0, 0, 0, 0} }, { VER_PLATFORM_WIN32_WINDOWS, {"Matrox Millennium G200 AGP", "MGAXDD32.DLL", 0x1100e,0x4000a, 0x102B, 0x521, 0, 0, {0xd7b71ecb,0x4661,0x11cf,{0xbe,0x73,0x01,0x20,0xa5,0xc2,0xc9,0x35}}}, /* overlays (use YUVs only): */ {F(CID_YV12) + F(CID_YUY2) + F(CID_UYVY), F(CID_YV12) + F(CID_YUY2) + F(CID_UYVY), F(CID_YV12) + F(CID_YUY2) + F(CID_UYVY), F(CID_YV12) + F(CID_YUY2) + F(CID_UYVY), F(CID_YV12) + F(CID_YUY2) + F(CID_UYVY)}, /* blits (use YUVs & matching RGBs): */ {F(CID_YV12) + F(CID_YUY2) + F(CID_UYVY) + F(CID_RGB32), F(CID_YV12) + F(CID_YUY2) + F(CID_UYVY) + F(CID_RGB24), F(CID_YV12) + F(CID_YUY2) + F(CID_UYVY) + F(CID_RGB565), F(CID_YV12) + F(CID_YUY2) + F(CID_UYVY) + F(CID_RGB555), F(CID_YV12) + F(CID_YUY2) + F(CID_UYVY) + F(CID_RGB8)} }, { VER_PLATFORM_WIN32_NT, {"Matrox Millennium G200 AGP", "mga64.dll", 0x0,0x40000, /* MGA-G200 B8 R1: */ 0x2d41474d, 0x30303247, 0x20384220, 0x03152, {0,0,0,{0,0,0,0,0,0,0,0}}}, /* do NOT use overlays !!!: */ {0, 0, 0, 0, 0}, /* blits (use YUY2s & matching RGBs only): */ {F(CID_YUY2) + F(CID_RGB32), F(CID_YUY2) + F(CID_RGB24), F(CID_YUY2) + F(CID_RGB565), F(CID_YUY2) + F(CID_RGB555), F(CID_YUY2) + F(CID_RGB8)} }, { VER_PLATFORM_WIN32_NT, {"Matrox Millennium G200 AGP", "tsirchnl.dll", 0xc9,0x70008, 0x2d41474d, 0x30303247, 0x20384220, 0x4b003152, {0x4f4e4d4c,0x5150,0x5352,{0x54,0x55,0x56,0x57,0x58,0x59,0x5a,0x5b}}}, /* do NOT use overlays !!!: */ {0, 0, 0, 0, 0}, /* blits (use YUY2s & matching RGBs only): */ {F(CID_YUY2) + F(CID_RGB32), F(CID_YUY2) + F(CID_RGB24), F(CID_YUY2) + F(CID_RGB565), F(CID_YUY2) + F(CID_RGB555), F(CID_YUY2) + F(CID_RGB8)} }, { VER_PLATFORM_WIN32_WINDOWS, {"Matrox Millennium II PowerDesk", "MGAXDD32.DLL", 0x10ee2,0x4000a, 0x102b, 0x51b, 0x0, 0x0, {0xd7b71ecb,0x465b,0x11cf,{0x52,0x6d,0x1,0x20,0xa5,0xc2,0xc9,0x35}}}, /* does not have overlays... */ {0, 0, 0, 0, 0}, /* blits (use YUY2s only): */ {F(CID_YUY2), F(CID_YUY2), F(CID_YUY2), F(CID_YUY2), F(CID_YUY2)} }, { VER_PLATFORM_WIN32_WINDOWS, {"Matrox Millennium II PowerDesk", "MGAXDD32.DLL", 0xe2e,0x40003, 0x102b, 0x51b, 0x0, 0x0, {0xd7b71ecb,0x465b,0x11cf,{0x9e,0x6d,0x0,0x20,0xac,0xc2,0xc9,0x35}}}, /* does not have overlays... */ {0, 0, 0, 0, 0}, /* blits (use YUY2s only): */ {F(CID_YUY2), F(CID_YUY2), F(CID_YUY2), F(CID_YUY2), F(CID_YUY2)} }, { VER_PLATFORM_WIN32_WINDOWS, {"Matrox Millennium II PCI", "mgapdx64.drv", 0x110b8,0x4000a, 0x102b, 0x51b, 0x0, 0x25b, {0x0,0x0,0x0,{0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0}}}, /* does not have overlays... */ {0, 0, 0, 0, 0}, /* blits (use YUY2s only): */ {F(CID_YUY2), F(CID_YUY2), F(CID_YUY2), F(CID_YUY2), F(CID_YUY2)} }, { VER_PLATFORM_WIN32_WINDOWS, {"Diamond Viper V330", "vprddle.DLL", 0x10080,0x4000a, 0x12d2, 0x18, 0, 0, {0xd7b71c32,0x4358,0x11cf,{0x30,0x63,0x01,0x20,0xa5,0xc2,0xc9,0x35}}}, /* overlays (use YUY2 & UYVY only): */ {F(CID_YUY2) + F(CID_UYVY), F(CID_YUY2) + F(CID_UYVY), F(CID_YUY2) + F(CID_UYVY), F(CID_YUY2) + F(CID_UYVY), F(CID_YUY2) + F(CID_UYVY)}, /* blits (use YUY2, UYVY & matching RGBs): */ {F(CID_YUY2) + F(CID_UYVY) + F(CID_RGB32), F(CID_YUY2) + F(CID_UYVY) + F(CID_RGB24), F(CID_YUY2) + F(CID_UYVY) + F(CID_RGB565), F(CID_YUY2) + F(CID_UYVY) + F(CID_RGB555), F(CID_YUY2) + F(CID_UYVY) + F(CID_RGB8)} }, { VER_PLATFORM_WIN32_WINDOWS, {"NVIDIA GeForce 256 AGP Plus (Dell)", "NVDD32.DLL", 0x10179,0x4000c, 0x10de, 0x100, 0x810de, 0x10, {0xd7b71e3e,0x4240,0x11cf,{0x17,0x72,0x9,0x20,0xb3,0xc2,0xc9,0x35}}}, /* do NOT use overlays !!!: */ {0, 0, 0, 0, 0}, /* no blits either: */ {0, 0, 0, 0, 0} }, { VER_PLATFORM_WIN32_WINDOWS, {"Diamond Viper V330", "vprdrvle.drv", 0x1007e, 0x4000a, 0x12d2, 0x18, 0x0, 0x0, {0x0,0x0,0x0,{0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0}}}, /* do NOT use overlays !!!: */ {0, 0, 0, 0, 0}, /* blits (use YUY2s & matching RGBs only): */ {F(CID_YUY2) + F(CID_RGB32), F(CID_YUY2) + F(CID_RGB24), F(CID_YUY2) + F(CID_RGB565), F(CID_YUY2) + F(CID_RGB555), F(CID_YUY2) + F(CID_RGB8)} }, { VER_PLATFORM_WIN32_WINDOWS, {"Diamond Viper V550", "NVDD32.DLL", 0x10170,0x4000c, 0x10de, 0x20, 0x5501092, 0x4, {0xd7b71e3e,0x4360,0x11cf,{0x52,0x72,0x51,0x25,0xa7,0xc2,0xc9,0x35}}}, /* do NOT use overlays !!!: */ {0, 0, 0, 0, 0}, /* no blits either: */ {0, 0, 0, 0, 0} }, { VER_PLATFORM_WIN32_WINDOWS, {"[Hercules] Thriller 3D Series (v 0.81.3539)", "v200032.dll", 0xdd2,0x4000a, 0x1163, 0x2000, 0x34843, 0x6, {0xd7b71f83,0x6340,0x11cf,{0x21,0x26,0x3,0x20,0xa3,0xc2,0xc9,0x35}}}, /* do NOT use overlays !!!: */ {0, 0, 0, 0, 0}, /* no blits either: */ {0, 0, 0, 0, 0} }, { VER_PLATFORM_WIN32_NT, {"Diamond Multimedia Systems, Inc. Stealth II G460 Ver. 1.12\x0d\x0aV", "stlthg46.dll", 0x0,0x40000, /* Intel740: */ 0x65746e49, 0x3034376c, 0, 0, {0,0,0,{0,0,0,0,0,0,0,0}}}, /* do NOT use overlays !!!: */ {0, 0, 0, 0, 0}, /* no blits either: */ {0, 0, 0, 0, 0} }, { VER_PLATFORM_WIN32_WINDOWS, {"STB Lightspeed 128, with STB Vision 95", "stbvisn.drv", 0x514,0x40003, 0x100c, 0x3208, 0x0, 0x0, {0x0,0x0,0x0,{0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0}}}, /* do NOT use overlays !!!: */ {0, 0, 0, 0, 0}, /* no blits either: */ {0, 0, 0, 0, 0} }, { VER_PLATFORM_WIN32_WINDOWS, {"Diamond SpeedStar A50 for Windows 98", "DMSSA50x.dll", 0xc8,0x4000a, 0x1039, 0x6326, 0xa501092, 0xb, {0xd7b71ed9,0x2066,0x11cf,{0xea,0x73,0x50,0x2a,0xae,0xc2,0xc9,0x35}}}, /* do NOT use overlays in 16-bit mode !!!: */ {F(CID_YUY2), F(CID_YUY2), 0, 0, F(CID_YUY2)}, /* no blits: */ {0, 0, 0, 0, 0} }, /* these STB cards use nVidia Riva 182zx: */ { VER_PLATFORM_WIN32_WINDOWS, {"STB Velocity 128 3D", "stbv128.drv", 0x10074,0x4000a, 0x12d2, 0x18, 0x0, 0x0, {0,0,0,{0,0,0,0,0,0,0,0}}}, /* do NOT use overlays !!!: */ {0, 0, 0, 0, 0}, /* blits (use YUY2s & matching RGBs only): */ {F(CID_YUY2) + F(CID_RGB32), F(CID_YUY2) + F(CID_RGB24), F(CID_YUY2) + F(CID_RGB565), F(CID_YUY2) + F(CID_RGB555), F(CID_YUY2) + F(CID_RGB8)} }, { VER_PLATFORM_WIN32_WINDOWS, {"STB Velocity 128 (TV Support)", "STBV128.DRV", 0x1006d,0x4000a, 0x12d2, 0x18, 0x0, 0x0, {0,0,0,{0,0,0,0,0,0,0,0}}}, /* do NOT use overlays !!!: */ {0, 0, 0, 0, 0}, /* blits (use YUY2s & matching RGBs only): */ {F(CID_YUY2) + F(CID_RGB32), F(CID_YUY2) + F(CID_RGB24), F(CID_YUY2) + F(CID_RGB565), F(CID_YUY2) + F(CID_RGB555), F(CID_YUY2) + F(CID_RGB8)} }, { VER_PLATFORM_WIN32_WINDOWS, {"STB Lightspeed 128, without STB Vision 95", "stbls128.drv", 0x514,0x40003, 0x100c, 0x3208, 0x0, 0x0, {0,0,0,{0,0,0,0,0,0,0,0}}}, /* overlays (use UYVY only): */ {F(CID_UYVY), F(CID_UYVY), F(CID_UYVY), F(CID_UYVY),
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -