2 ** THIS SOFTWARE IS SUBJECT TO COPYRIGHT PROTECTION AND IS OFFERED ONLY
3 ** PURSUANT TO THE 3DFX GLIDE GENERAL PUBLIC LICENSE. THERE IS NO RIGHT
4 ** TO USE THE GLIDE TRADEMARK WITHOUT PRIOR WRITTEN PERMISSION OF 3DFX
5 ** INTERACTIVE, INC. A COPY OF THIS LICENSE MAY BE OBTAINED FROM THE
6 ** DISTRIBUTOR OR BY CONTACTING 3DFX INTERACTIVE INC(info@3dfx.com).
7 ** THIS PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
8 ** EXPRESSED OR IMPLIED. SEE THE 3DFX GLIDE GENERAL PUBLIC LICENSE FOR A
9 ** FULL TEXT OF THE NON-WARRANTY PROVISIONS.
11 ** USE, DUPLICATION OR DISCLOSURE BY THE GOVERNMENT IS SUBJECT TO
12 ** RESTRICTIONS AS SET FORTH IN SUBDIVISION (C)(1)(II) OF THE RIGHTS IN
13 ** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 252.227-7013,
14 ** AND/OR IN SIMILAR OR SUCCESSOR CLAUSES IN THE FAR, DOD OR NASA FAR
15 ** SUPPLEMENT. UNPUBLISHED RIGHTS RESERVED UNDER THE COPYRIGHT LAWS OF
18 ** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
20 ** $Header: /cvsroot/glide/glide3x/h5/glide3/src/glidesys.h,v 1.3.4.3 2003/07/24 03:51:08 anholt Exp $
22 ** 3 3dfx 1.0.1.0.1.0 10/11/00 Brent Forced check in to enforce
24 ** 2 3dfx 1.0.1.0 06/20/00 Joseph Kain Changes to support the
25 ** Napalm Glide open source release. Changes include cleaned up offensive
26 ** comments and new legal headers.
27 ** 1 3dfx 1.0 09/11/99 StarTeam VTS Administrator
30 ** 4 11/05/98 11:18a Russp
31 ** Fix GLIDE_NUM_TMU error check (change "&&" to "||")
33 ** 3 7/24/98 1:41p Hohn
35 ** 2 6/15/98 10:50a Peter
36 ** made csim compile time option
38 * 1 1/16/98 4:29p Atai
41 * 10 12/09/97 12:20p Peter
44 * 9 11/04/97 4:00p Dow
47 * 8 8/18/97 3:52p Peter
48 * pre-hw arrival fixes/cleanup
50 * 7 6/02/97 4:09p Peter
51 * Compile w/ gcc for Dural
53 * 6 5/27/97 1:16p Peter
54 * Basic cvg, w/o cmd fifo stuff.
56 * 5 5/21/97 6:05a Peter
58 #ifndef __GLIDESYS_H__
59 #define __GLIDESYS_H__
62 n** -----------------------------------------------------------------------
63 ** COMPILER/ENVIRONMENT CONFIGURATION
64 ** -----------------------------------------------------------------------
67 /* Endianness is stored in bits [30:31] */
68 #define GLIDE_ENDIAN_SHIFT 30
69 #define GLIDE_ENDIAN_LITTLE (0x1 << GLIDE_ENDIAN_SHIFT)
70 #define GLIDE_ENDIAN_BIG (0x2 << GLIDE_ENDIAN_SHIFT)
72 /* OS is stored in bits [0:6] */
73 #define GLIDE_OS_SHIFT 0
74 #define GLIDE_OS_UNIX 0x1
75 #define GLIDE_OS_DOS32 0x2
76 #define GLIDE_OS_WIN32 0x4
77 #define GLIDE_OS_MACOS 0x8
78 #define GLIDE_OS_OS2 0x10
79 #define GLIDE_OS_OTHER 0x40 /* For Proprietary Arcade HW */
81 /* Sim vs. Hardware is stored in bits [7:8] */
82 #define GLIDE_SST_SHIFT 7
83 #define GLIDE_SST_SIM (0x1 << GLIDE_SST_SHIFT)
84 #define GLIDE_SST_HW (0x2 << GLIDE_SST_SHIFT)
86 /* Hardware Type is stored in bits [9:13] */
87 #define GLIDE_HW_SHIFT 9
88 #define GLIDE_HW_SST1 (0x1 << GLIDE_HW_SHIFT)
89 #define GLIDE_HW_SST96 (0x2 << GLIDE_HW_SHIFT)
90 #define GLIDE_HW_H3 (0x4 << GLIDE_HW_SHIFT)
91 #define GLIDE_HW_SST2 (0x8 << GLIDE_HW_SHIFT)
92 #define GLIDE_HW_CVG (0x10 << GLIDE_HW_SHIFT)
95 ** Make sure we handle all instances of WIN32
98 # if defined (_WIN32) || defined (WIN32) || defined(__NT__)
103 /* We need two checks on the OS: one for endian, the other for OS */
104 /* Check for endianness */
105 #if defined(__IRIX__) || defined(__sparc__) || defined(MACOS)
106 # define GLIDE_ENDIAN GLIDE_ENDIAN_BIG
108 # define GLIDE_ENDIAN GLIDE_ENDIAN_LITTLE
112 #if defined(__IRIX__) || defined(__sparc__) || defined(__linux__) || \
113 defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || \
114 defined(__FreeBSD_kernel__) || defined(__GNU__)
115 # define GLIDE_OS GLIDE_OS_UNIX
116 #elif defined(__DOS__)
117 # define GLIDE_OS GLIDE_OS_DOS32
118 #elif defined(__WIN32__)
119 # define GLIDE_OS GLIDE_OS_WIN32
120 #elif defined(macintosh) || defined(__APPLE__)
121 # define GLIDE_OS GLIDE_OS_MACOS
126 /* Check for Simulator vs. Hardware */
127 #if HAL_CSIM || HWC_CSIM
128 # define GLIDE_SST GLIDE_SST_SIM
130 # define GLIDE_SST GLIDE_SST_HW
133 /* Check for type of hardware */
135 # define GLIDE_HW GLIDE_HW_SST96
137 # define GLIDE_HW GLIDE_HW_H3
139 # define GLIDE_HW GLIDE_HW_SST2
141 # define GLIDE_HW GLIDE_HW_CVG
142 #else /* Default to SST1 */
143 # define GLIDE_HW GLIDE_HW_SST1
147 #define GLIDE_PLATFORM (GLIDE_ENDIAN | GLIDE_OS | GLIDE_SST | GLIDE_HW)
150 ** Control the number of TMUs
152 #ifndef GLIDE_NUM_TMU
153 # define GLIDE_NUM_TMU 2
157 #if ((GLIDE_NUM_TMU < 0) || (GLIDE_NUM_TMU > 3))
158 # error "GLIDE_NUM_TMU set to an invalid value"
161 #endif /* __GLIDESYS_H__ */