327 Commits

Author SHA1 Message Date
48e1209c00 trial 2026-03-27 01:52:16 +01:00
d360e9684e test 2026-03-27 01:43:19 +01:00
4253416778 trial 2026-03-27 01:25:22 +01:00
a0f1117bc7 restore nop for mmx 2026-03-27 01:08:06 +01:00
2fb623617d woups 2026-03-27 00:55:30 +01:00
8c63c25d3d fix mmx on linux 2026-03-27 00:54:20 +01:00
1458b8f773 remove no-strict-aliasing 2026-03-27 00:38:57 +01:00
57d57e8161 Revert "trial"
This reverts commit 58692a7fd8.
2026-03-27 00:38:26 +01:00
58692a7fd8 trial 2026-03-27 00:22:05 +01:00
79f59f3c97 work 2026-03-27 00:03:45 +01:00
c111f47e42 add execution bit (again) 2026-03-25 20:12:31 +01:00
a7ffcad6a3 test 2026-03-25 01:35:47 +01:00
ea6b9fa72a test 2026-03-25 01:22:58 +01:00
272994024c test 2026-03-25 01:11:31 +01:00
ec0b7e35b9 grrr 2026-03-25 00:45:07 +01:00
583de68697 cleanning 2026-03-25 00:29:34 +01:00
1acaf93b2d clean 2026-03-25 00:00:23 +01:00
92b702246d work 2026-03-24 23:26:47 +01:00
c83f76c089 work 2026-03-24 23:17:05 +01:00
69aede93a6 work 2026-03-24 23:10:28 +01:00
7ba493dec6 fix asm 2026-03-24 22:59:06 +01:00
53aff71bbd update makefiles 2026-03-24 22:49:12 +01:00
85266ef91e fix compilation 2026-03-24 22:03:03 +01:00
4c9d7d88f0 remove binary files 2026-03-24 21:51:57 +01:00
6a464b6985 fix cqse again 2026-03-24 21:37:26 +01:00
76dd80b647 remove temp files 2026-03-24 21:27:28 +01:00
d3b0a2617e fix case 2026-03-24 21:26:32 +01:00
8f164d5664 fix 2026-03-24 21:21:21 +01:00
c416c1b7a2 trial 2026-03-24 21:11:02 +01:00
8d7d0b0ab9 fix 2.6.24 device creation (and hopefully later kernels) 2026-03-24 20:36:39 +01:00
2ec5dc2709 revert to old driver (ugly tree, will fix that later) 2026-03-24 01:19:53 +01:00
4816fb5893 arch opts 2026-03-23 23:23:27 +01:00
4267922ec2 CRLF fix 2026-03-23 23:16:31 +01:00
a9cc616aeb bump version 2026-03-21 02:22:34 +01:00
6234780d24 fix + opt 2026-03-21 02:07:00 +01:00
ed1812e9ce bump glide2 versions 2026-03-21 01:52:44 +01:00
159f4518d5 trying to sync headers... 2026-03-21 01:23:04 +01:00
578e623aad fix build 2026-03-20 23:37:27 +01:00
759ac19aff implement device_class to auto create /dev/3dfx 2026-03-20 20:42:31 +01:00
df592b464f add execution bit to rules file for debian packaging 2026-03-20 20:12:55 +01:00
6717a618ac integration 2026-03-20 19:48:08 +01:00
8a704cd926 fix target 2026-03-20 19:10:32 +01:00
d0735d0b99 implement simple debian module package creation 2026-03-20 18:35:39 +01:00
Khralkatorrix
ee38094805 glide2x, glide3x: On MSVC, don't treat warning as error for glide tests.
Signed-off-by: Khralkatorrix <garuda2550@gmail.com>
2024-01-27 18:23:24 +03:00
Ozkan Sezer
6e79c3d9b7 add note to glide3x README about swlibs. 2022-12-25 14:02:40 +03:00
Jonathan Schleifer
d86e089d35 Fix compilation with MinGW
Change the 'extern inline' procedures in fxglide.h to 'static inline' .
2022-12-25 12:02:40 +01:00
Ozkan Sezer
7d4a1ddda1 h3/h5, minihwc: inline configmg code, remove win9x.asm. 2022-07-23 03:28:28 +03:00
Ozkan Sezer
5ba939612e sst1: sync glide2/3 versions of makefiles, minor reorganization in init. 2021-11-11 17:50:04 +03:00
Ozkan Sezer
85186e0206 remove irrelevant ssttype checks from individual hw code 2021-11-11 17:37:50 +03:00
Ozkan Sezer
587e01e573 do not include SST1 and SST96 init codes together. 2021-11-11 17:37:04 +03:00
Ozkan Sezer
a20bb982cc cvg, sst1: tweak another getenv() usage. 2021-11-11 17:33:40 +03:00
Ozkan Sezer
5ffccc63b8 cvg, sst1, sst96: cache the getenv() results in init code. 2021-11-11 17:33:32 +03:00
Ozkan Sezer
c9727c8829 shortened a few error messages 2021-11-11 17:33:02 +03:00
Ozkan Sezer
d254f7f28e reverted commit a6ceeebd00 from glide2x/h3 - not needed. 2021-08-08 23:55:50 +03:00
Ozkan Sezer
170185784e fxpci.c (pciOpen): commented out assert(0) for !busDetected case :
let the procedure return false with pciErrorCode == PCI_ERR_NO_BUS
2021-08-08 23:55:50 +03:00
Ozkan Sezer
a6ceeebd00 h3, h5, grGlideInit: return if _GlideRoot.hwConfig.num_sst == 0:
In case of error, _GlideInitEnvironment() calls GrErrorCallback() which is
supposed to be a noreturn function, but it really is not for non-windows..
Eww...
2021-08-08 23:55:10 +03:00
Ozkan Sezer
67ad843c88 removed dxe description from djgpp dxe builds 2021-08-08 23:55:04 +03:00
Ozkan Sezer
f7bcf2ba77 h3, minihwc.c: added missing string.h include 2021-08-08 23:55:02 +03:00
Ozkan Sezer
5e6b39fb2b h3/h5, hwcInit, GLIDE_INIT_HWC: set errorString in case of failure. 2021-08-08 20:23:02 +03:00
Ozkan Sezer
43fbe0bf3c minor warning fixes. 2021-02-02 11:11:10 +03:00
Ozkan Sezer
438ac12be4 fix typo from unintended search/replace 2020-11-27 11:44:50 +03:00
Ozkan Sezer
1f827a4602 glide2x/README: added note about cross-compiling on 64-bit hosts. 2020-10-07 23:00:50 +03:00
Ozkan Sezer
acddb52685 glide3x/sst1: replaced several [unsigned] long type usage with FxI32/FxU32
should fix issue noted at
e8f60ad8bb (commitcomment-40186242)

the glide2x tree in whole needs a similar massage..
2020-10-07 23:00:40 +03:00
Ozkan Sezer
fe35279d12 updated djgpp cross-build scripts 2020-07-08 15:10:00 +03:00
Ozkan Sezer
6d671089f6 added quick shell scripts for djgpp cross-compile. 2020-07-08 14:32:30 +03:00
sezero
1ceb326d78 added top-level 3DFX GLIDE Source Code General Public License file. 2019-09-11 11:11:50 +03:00
sezero
9fbf8482a8 swlibs: remove rest of the old makefiles
the old glide-devel-branch has them for reference.
2019-09-08 01:20:00 +03:00
sezero
f0adaa0423 glide2x: remove rest of the old makefiles
the old glide-devel-branch has them for reference.
2019-09-08 01:10:00 +03:00
sezero
0cfcfe0e88 glide2x: added new Makefiles for tests. 2019-09-08 00:28:00 +03:00
sezero
8522edee5c glide2x: allow disabling the splash screen and the shameless plug code. 2019-07-07 00:47:28 +03:00
sezero
8be8bb66b5 glide2x, sst1: use different lib directories for sst1 and sst96 targets,
just like we do in the glide3x/sst1 tree.
2019-07-06 23:44:02 +03:00
sezero
91669cea49 glide2x, sst1: use different lib directories for sst1 and sst96 targets,
just like we do in the glide3x/sst1 tree.
2019-07-06 23:33:10 +03:00
sezero
305fab3650 glide2x: initial makefiles to target DOS/DJGPP.
build-tested yet, will see if they actually run later.
2019-07-06 18:37:00 +03:00
sezero
a5e52f47f5 glide2x djgpp build fixes #7/7:
h3, dos_mode.c: backported a fix by Daniel Borca from commit 3e642e03.
2019-07-06 14:06:40 +03:00
sezero
671cee61eb glide2x djgpp build fixes #6/7:
h3, dos_mode.c: add missing includes.
2019-07-06 14:06:07 +03:00
sezero
7f50068a47 glide2x djgpp build fixes #5/7:
h3, minihwc.c, gdebug.c: minor warning fixes.
2019-07-06 14:05:50 +03:00
sezero
ccadf5f395 glide2x djgpp build fixes #4/7:
sst1: change Int10 handler code to build if GLIDE_DEBUG10 is defined
instead of just GLIDE_DEBUG. (same thing is done in glide3x/sst1 tree.)
the code is for watcom, but can actually be ported to djgpp if it is
really needed some day.
2019-07-06 14:05:35 +03:00
sezero
1096fc0efb glide2x djgpp build fixes #3/7:
enable rle_decode_line_asm() stub for djgpp builds too.
2019-07-06 14:05:18 +03:00
sezero
0e352d42c1 glide2x djgpp build fixes #2/7:
gerror.c: _guHeapCheck() is for watcom builds only due to _heapchk()
2019-07-06 14:05:04 +03:00
sezero
ee5fecf71f glide2x djgpp build fixes #1/7:
sst1, gerror.c: add proper dos includes for djgpp
2019-07-06 14:04:45 +03:00
sezero
26c95e24f6 glide2x, h3: added cinit from glide3x after removing napalm-only bits. 2019-07-06 14:03:26 +03:00
sezero
a0f4e5a4e6 sst1: a bit more style cleanup 2018-11-05 21:50:20 +03:00
sezero
347ccd8391 glide2x, sst1/sst96, init: added includes for djgpp 2018-11-05 19:41:28 +03:00
sezero
c468e627e7 sst1/sst96: some whitespace/style cleanup.
also removed commented out code from glide3x _grChromaRangeExt(),
guGammaCorrectionRGB() and grLoadGammaTable().

the djgpp dxe output is still exactly the same.
2018-11-05 19:35:55 +03:00
sezero
426c3988a3 glide2x, cvg: fix fxoem2x.dll build (in case it ever gets enabled.) 2018-09-12 14:00:02 +03:00
sezero
da8d31c9d5 Makefile.mingw: revise so that it works for both cross- and native-builds 2018-09-11 23:00:02 +03:00
sezero
50de6810a0 Makefile.wat: fix linkage of texus.exe if run with TEXUS2=1 2018-09-11 19:15:02 +03:00
sezero
cd39eb5320 fx64.h: Watcom 11.0 added "long long" support, adjust accordingly.
The legacy Watcom <= 10.5 code of 3dfx didn't compile using OpenWatcom.
2018-09-11 19:10:51 +03:00
sezero
99ee5eec74 Makefile.wat: revise so that watcom builds work on both linux and win32
- not tested on pure dos, and it shouldn't be a problem really..
- this needs to be done for Makefile.DJ and Makefile.mingw, too.
2018-09-11 17:21:04 +03:00
sezero
186bb19d28 tests, tlib.c: include conio.h for watcom builds 2018-09-11 17:20:01 +03:00
sezero
274d0d31c2 3dfx.h, glidesys.h: check __MSDOS__ along with __DOS__
Necessary when they are used for building 3rd-party programs.
__DOS__ is defined by Watcom, __MSDOS__ is defined by DJGPP.
2018-09-10 06:55:10 +03:00
sezero
01f2e823f7 Makefile.wat: use -bt=dos option for cross-builds to target dos correctly 2018-09-10 06:27:50 +03:00
sezero
fa2272350a Makefile.linux updates for XPATH usage: add and use X11LIBS variable. 2018-08-30 17:51:56 +03:00
sezero
4a33160a11 glide2x, sst1, Makefile.linux: updated XPATH usage to match glide3x tree
minor tidy-up in its glide3x counterpart.
2018-08-30 17:05:56 +03:00
sezero
c93f294492 sst1, init96.c: fixed minor warning in DEBUG builds 2018-08-30 17:04:05 +03:00
sezero
34fa903aea glide2x, cvg: fixed DEBUG builds. 2018-08-30 17:03:20 +03:00
sezero
2a770d57d5 cvg, gglide.c (grBufferClear): avoid parentheses warning.
binary output is identical.
2018-08-30 17:02:47 +03:00
sezero
a7b3d9290c glide3x, h5: remove gendate.h dependency.
BUILD_DATE is not used anywhare, at all.
2018-08-30 16:01:55 +03:00
sezero
e2dd1b0ba0 fxbldno.c: minor warning fixes. 2018-08-30 15:40:32 +03:00
sezero
11f9ba7f56 glide3x, Makefile.DJ: tweaked DXE descriptions. 2018-08-25 21:21:10 +03:00
sezero
5db23883e9 glide3x, Makefile.win32: reverted most parts of commit 8c917cb2 2018-08-25 21:20:30 +03:00
sezero
72028096b9 g3df.c: fix msvc build because of a sign-compare warning after 66386d5 2018-08-25 21:05:15 +03:00
sezero
ed0fb7ba52 h3/h5, lin_mode.c, linhwc.c (loadEnvFile): don't leak FILE* pointer 2018-08-24 23:10:40 +03:00
sezero
dbcbbb1313 sst1, sst1InitVoodooFile(): don't leak FILE* pointer in case of failure 2018-08-24 21:55:50 +03:00
sezero
db8ef4d0ef cvg,sst1, init: shortened a few messages. 2018-08-24 21:03:55 +03:00
sezero
575bafe6c9 glide3x: remove obsoleted README, and rename README.2 to README
also edit the Voodoo Rush entry to mention Macronix along with AT3D
2018-08-23 17:20:50 +03:00
sezero
e11ac4e5db h5, tests: rename Makefile.mgw to Makefile.mingw 2018-08-23 15:39:24 +03:00
sezero
0402d46e43 fxos.c, fxGethostname: fix a strict aliasing issue 2018-08-23 15:37:20 +03:00
sezero
cec38774f4 glide3x, tests: sbench depends on fxos.o for non-linux. 2018-08-23 15:20:02 +03:00
sezero
661f489f88 tests: conio.h or linutil.h includes are not needed
kbhit() and getch() are called from tlib
2018-08-23 14:33:50 +03:00
sezero
c430cef2b2 glide3x,tests,sbench.c: rename PI to FX_PI (avoid redefinition warnings) 2018-08-23 14:11:30 +03:00
sezero
4a72d2061d glide3x, tests, tlib.c: add missing DJGPP includes for cvg, h3 and sst1 2018-08-23 14:05:55 +03:00
sezero
eb40729806 glide3x: remove old makefiles, which are obsoleted for quite some time.
the master branch still has the old makefiles I guess, so, look at the
master branch if need reference.

update sst1 makefiles to store the libs under individual sst1 and sst96
directories.

update linux makefiles for XPATH variable usage.

rename makefile.linux to Makefile.linux under the tests directories.
2018-08-23 14:00:02 +03:00
sezero
bd3e0372c1 glide3x, tests, sbench.c: fix build errors:
sbench.c:300: error: lvalue required as left operand of assignment
sbench.c:301: error: lvalue required as left operand of assignment
sbench.c:375: error: lvalue required as left operand of assignment
sbench.c:376: error: lvalue required as left operand of assignment

I _think_ this is the correct fix: MSVC6 generates the same output
before and after this patch.
2018-08-23 03:47:50 +03:00
sezero
d565bf19ef glide3x, tests: more build fixes -- mostly for windows this time. 2018-08-23 01:20:20 +03:00
sezero
2ab9b505eb glide3x, tests: applied warning and build fixes from glide2x tree. 2018-08-23 00:28:02 +03:00
sezero
f2e22ecf56 glide2x, tests: minor tidy-up. 2018-08-22 22:55:40 +03:00
sezero
8574e105f2 glide2x,tests,display.c: silence 'diff.data' may be used uninitialized warning. 2018-08-22 22:44:50 +03:00
sezero
a4a70bba5b glide2x, tests: initialize firstTime to 1 instead of 0. 2018-08-22 22:20:10 +03:00
sezero
e649ca4613 glide2x, tests: comment out unused helper proc in plib.c 2018-08-22 22:02:28 +03:00
sezero
64b744733d glide2x, tests: fix out-of-bounds access to localVerts in test25.c 2018-08-22 21:55:02 +03:00
sezero
e7cc47e93e glide2x, tests: fix format warning test25.c 2018-08-22 21:36:33 +03:00
sezero
c6de03a346 glide2x, tests: fix warning from qatest00.c:
qatest00.c:517: warning: operation on 'nCurrAlpha' may be undefined
qatest00.c:528: warning: operation on 'nCurrAlpha' may be undefined
2018-08-22 21:32:40 +03:00
sezero
40230a559e glide2x, tests: replace exit()s with return 2018-08-22 20:33:33 +03:00
sezero
ffac0696a3 glide3x: applied commit fd64b6ac of guillemj to the sst1 testsuite. 2018-08-22 16:27:02 +03:00
sezero
1567a193fe glide2x, testsuite updates:
- style tidy-up in cvg and h3
- applied commit df4085a to sst1 tree
- there are suspicious -Wuninitialized warning fixes,
  will revisit them soon.
2018-08-22 16:15:37 +03:00
sezero
14c8945a32 tests, tlib.c, tlib.h: silence / fix warnings:
fix wrong error check in SimpleRleDecode() (thanks gcc -Wsign-compare).
fix some old wrong warning fixes in glide2x tree.
also remove ctype.h dependency and use a generic strupr().
2018-08-22 14:03:15 +03:00
sezero
e3612b4f58 add missing symlinks to Makefile.linux 2018-08-22 11:32:24 +03:00
sezero
b8c4edab9d glide2x: merge scanf() and fread() updates to g3df.c and gpci.c from glide3x 2018-08-22 03:15:56 +03:00
sezero
66386d5ac4 h5, g3df.c: fix wrong error fread() checks.
commit 4b63afa8 by jwrdegoede added fread() checks like:

 if(fread(buf,size,nelem,fp) != size*nelem) error();

however the check must be against nelem alone, and _not_
the total bytes.
2018-08-22 02:24:24 +03:00
sezero
c30be75227 g3df.c (ReadDataShort): slightly shortened by adapting from original glide2x/sst1 version. 2018-08-22 02:11:36 +03:00
sezero
7ced8d7f32 g3df.c: don't leak the FILE* in failure cases.
only h5 handled that but with inlined fclose() and FXFALSE returns.
used goto statements to simplify things.
2018-08-22 02:06:40 +03:00
sezero
5d1a34c31c h3, h5: fix a few uninitialized warnings 2018-08-21 14:05:50 +03:00
sezero
2d63cec195 h5, minihwc (hwcMapBoard): avoid shadowing a local var. 2018-08-21 12:55:02 +03:00
sezero
4a6f09253a fix my stupid typo from commit 85ec47f 2018-08-21 04:20:04 +03:00
sezero
85ec47f22b glide3x, h3/h5: changed threadValue stuff from FxU32 to unsigned long. 2018-08-21 04:11:28 +03:00
sezero
d04deb23d6 h5, minihwc (hwcMapBoard): make length const FxI32 type. 2018-08-21 04:10:50 +03:00
sezero
c4b365abdf h5, minihwc (hwcAAScreenShot): change fileNameNum to unsigned int type. 2018-08-21 04:10:24 +03:00
sezero
e4fc9db7db h3, minihwc (hwcInitRegisters): fix stupid printf/sprintf/FN_NAME typos
was there since the beginning.
2018-08-21 04:10:00 +03:00
sezero
537a15a2fc glide2x/cvg (grBufferClear): revert a parentheses warning fix from 2000
Building glide3x/cvg, gcc emits the following warning:
gglide.c: In function `grBufferClear':
gglide.c:733: warning: suggest parentheses around arithmetic in operand of |

... but glide2x/cvg is silent for it, because commit df4085a80 from
about 18 years ago added parentheses to silence it, like:

 GR_SET(BROADCAST_ID, hw, bltSize,
 - ( ((((tileHi - tileLow) * gc->hwDep.cvgDep.xTilePages) - 1) << 16) | (0x1000 >> 3)  - 1));
 + ((((((tileHi - tileLow) * gc->hwDep.cvgDep.xTilePages) - 1) << 16) | (0x1000 >> 3)) - 1));

... which seems wrong.  Substraction has precedence, therefore the
original code OR'ed the size by 511,  but the fixed code OR'ed the
size by 512 and then substracted 1 from the result.

Looking at sst1InitVideoBuffers() init/video.c: it sets sst->bltSize
like:

 ISET(sst->bltSize, ((pagesToFill-1)<<16) | 511);

Therefore, reverting this part of df4085a80 now.  We can live with the
warning.
2018-08-21 00:15:55 +03:00
sezero
46ca75c1dd glide2x, sst1: unused variable warning fixes. 2018-08-20 22:30:55 +03:00
sezero
36dc997a1d glide2x, sst1, gglide.c: warning fix:
gglide.c: In function `grAlphaCombine':
gglide.c:337: warning: suggest explicit braces to avoid ambiguous `else'
gglide.c: In function `grColorCombine':
gglide.c:917: warning: suggest explicit braces to avoid ambiguous `else'
2018-08-20 22:30:15 +03:00
sezero
d2c076b8ab fix some unused variable warnings 2018-08-20 20:55:32 +03:00
sezero
19c5f4e705 glide2x, cvg, oeminit.c: ifdef magic 2018-08-20 20:24:05 +03:00
sezero
ee6f124929 sst1: fix argc arg of main() 2018-08-20 20:16:20 +03:00
sezero
4d29b7f47f glide2x, sst1, ddgump.c: silence unitialized warnings. 2018-08-20 20:01:56 +03:00
sezero
8ee1de4bcf glide2x, h3, linhwc.c: fix a strict aliasing issue (same as in sst96.)
also make some stuff static.
2018-08-20 19:56:02 +03:00
sezero
c8f2b9f621 glide2x, sst1/cvg init: merge scanf updates from glide3x 2018-08-20 19:35:50 +03:00
sezero
c94050cb87 glide2x: added top-level makefiles. 2018-08-20 17:37:02 +03:00
sezero
3e2cc50867 glide3x,sst1 (sst1InitVoodooFile, INIT_LINUX): changed path separator to '/' 2018-08-20 17:01:36 +03:00
sezero
fa071d0a93 glide2x, sst1: fixed incompatible assignment warning for swapBuffers().
kept the original case in commented out form.
2018-08-20 16:40:57 +03:00
sezero
d39173dfd2 missed replacing an instance of '(char) NULL' with 0 2018-08-20 15:50:02 +03:00
sezero
ccf3cc1dc9 forgot renaming glide3x/sst1 version of makefile.linux 2018-08-20 15:10:00 +03:00
sezero
3be55b6512 fix "unknown conversion type character `v' in format" 2018-08-20 15:07:00 +03:00
sezero
0f6ca06167 rename makefile.linux -> Makefile.linux 2018-08-20 14:47:02 +03:00
sezero
61ebabbc40 glide2x: remove dependency on ctype.h functionality 2018-08-20 14:32:24 +03:00
sezero
103dec9ab9 glide2x,sst96: merged dborca commit 2506470 (Rush: fixed grLfbLock(AUXBUFFER)) 2018-08-20 14:00:02 +03:00
sezero
a5352b0145 glide2x, cvg, cpuid.c: fix strict aliasing issues with newer gcc 2018-08-20 13:45:01 +03:00
sezero
34b5d19350 remove a duplicated windows.h include 2018-08-20 11:40:15 +03:00
sezero
9ba0795fc7 glide2x: added experimental MinGW makefiles. 2018-08-20 10:23:10 +03:00
sezero
e9133561f1 glide2x, init96MapBoard: uncomment initAT3DGetHALData() (we do have initat3d.c) 2018-08-20 01:58:04 +03:00
sezero
5ebace29f9 more warning fixing and syncing glide2x init with glide3x 2018-08-20 01:34:20 +03:00
sezero
ece8c244f3 glide2x, cvg, sst1init: update P6FENCE macros from glide3 2018-08-20 01:33:24 +03:00
sezero
1488d68cff a bunch of warning fixes 2018-08-19 23:55:10 +03:00
sezero
ed2350c8f0 glide2x, sst1, vgdrvr.c: rename gamma() to sst1gamma() 2018-08-19 19:01:56 +03:00
sezero
54e3669349 glide2x, h3: added a Windows (MSVC6) makefile 2018-08-19 17:55:02 +03:00
sezero
ed11fcc3cc glide2x, h3: add windows build dependency 2018-08-19 17:51:00 +03:00
sezero
90d647cfa6 glide2x, h3, minihwc.c: minor warning fixes 2018-08-19 16:45:11 +03:00
sezero
ffb144a87e glide2x, h3, minihwc.c: more build fixes 2018-08-19 16:42:35 +03:00
sezero
415127f697 glide2x, h3, linhwc.c: update P6FENCE macros from glide3 2018-08-19 16:36:33 +03:00
sezero
2b2d13f32e glide2x, h3, gsst.c (grSstWinClose): restrict hwcUnmapBoard() call to linux
-- hwcUnmapBoard() is only in linhwc.c, not in minihwc.c.
2018-08-19 16:17:15 +03:00
sezero
e2a15684a1 glide2x, h3, minihwc.c: build fixes fixes from glide3 2018-08-19 16:15:01 +03:00
sezero
e0d29a1656 glide2x, h3, win_mode.c: build fixes / mysterious bug fixes from glide3 2018-08-19 16:13:40 +03:00
sezero
6d7be29632 glide2x, h3, gdebug.c: fix gdbg_msgfile initializer issue with mingw. 2018-08-19 16:11:01 +03:00
sezero
16f66e6d28 glide2x, cvg/h3: minor mikefile.linux updates 2018-08-19 16:09:13 +03:00
sezero
377f8d78a8 glide2x,cvg/sst1 init: #undef FX_DLL_ENABLE so we don't dllexport the syms 2018-08-19 13:40:20 +03:00
sezero
9f5fb2a342 glide2x, sst1: warning fixes. 2018-08-19 13:25:15 +03:00
sezero
4f59670015 glide2x, sst1/cvg: build fixes, warning fixes. 2018-08-19 12:41:50 +03:00
sezero
eb96ad7944 glide2x, grDrawTriangle() dispatch code for cvg and h3:
It fails to build for linux with the current compiler flags:

- static builds:
gdraw.c: In function `grDrawTriangle':
gdraw.c:757: error: bp cannot be used in asm here

- shared lib (-fPIC) builds:
gdraw.c: In function `grDrawTriangle':
gdraw.c:731: error: PIC register `ebx' clobbered in `asm'

Only if I use '-DBIG_OPT -fomit-frame-pointer', _then_ it builds into:

00000a20 <grDrawTriangle>:
     a20:	a1 2c 00 00 00       	mov    0x2c,%eax
     a25:	ff a0 50 03 00 00    	jmp    *0x350(%eax)
     a2b:	c3                   	ret
     a2c:	8d 74 26 00          	lea    0x0(%esi,%eiz,1),%esi

... which is good but only for static builds.  The PIC build still
fails with the above message with my gcc3.4 or gcc4.x.

So, I moved the x86 dispatch code to a new xdrawtri.asm, for linux,
and even for MSVC without any prologue/epilogue like the following:
  movl (_GlideRoot + curGC),%eax
  jmp  *kTriProcOffset(%eax)

Let's see how this goes.
2018-08-19 10:41:20 +03:00
sezero
d13007941b glide2x, sst1, grDrawTriangle(): directly use the proc from xdraw.asm.
this makes it more like the glide3x version, and fixes windows build
and linkage.  only Watcom build is special-cased: don't know the reason
why it was adjusted that way in gdraw.c but I kept it that way for now.
2018-08-18 22:32:02 +03:00
sezero
bc1d8f3932 glide2x, sst96: we have an initat3d.c now, so replaced that #if 0. 2018-08-18 22:26:11 +03:00
sezero
d917bb66ab glide2x, sst1: windows MSVC 6 build fixes in init 2018-08-18 22:16:37 +03:00
sezero
5672bdf2be glide2x, sst1: Makefile.win32 fix 2018-08-18 22:16:00 +03:00
sezero
5c3ead43e6 glide2x, cvg/h3, fxgasm.c: write kTriProcOffset into fxgasm.h, too. 2018-08-18 20:01:56 +03:00
sezero
6e6171b857 glide2x, cvg: build fixes for MSVC 6 2018-08-18 17:56:51 +03:00
sezero
14b3357ab8 glide2x, h3: converted asm to nasm syntax, adjusted fxgasm.c for it.
it builds for linux now. (not tested though..)
2018-08-18 17:15:02 +03:00
sezero
4e3b368794 glide2x, cvg, fxgasm.c: remove the old 'kTriProcOffsetClean' hack. 2018-08-18 13:23:40 +03:00
sezero
8a425599ef glide2x, sst1: converted asm to nasm syntax, adjusted fxgasm.c for it.
it builds for linux now. (not tested though..)
2018-08-18 13:00:24 +03:00
sezero
8080e4a845 glide2x, cvg, sst1: further makefile updates 2018-08-18 12:58:36 +03:00
sezero
3a00e0af75 glide2x, sst1, makefile.linux: gxdraw.c is needed even with USE_X86=1. 2018-08-18 12:30:50 +03:00
sezero
e42511abcc minor whitespace adjustment 2018-08-18 12:03:50 +03:00
sezero
bfad389fff glide2x, sst1: makefile.linux updates. 2018-08-18 10:10:04 +03:00
sezero
a23359fc29 more glide2x / makefile.linux updates:
remove duplicated -DGLIDE_USE_C_TRISETUP flags.
2018-08-18 10:03:50 +03:00
sezero
e9384d45a3 glide2x, h3: makefile.linux updates:
- there is no such thing as DRI with glide2x
- there are no xdraw3.asm is glide2x tree
- nasm support isn't there yet: gas sources
2018-08-18 01:55:10 +03:00
sezero
cdd969974a glide2x, sst1: remove generated file fxinline.h 2018-08-17 23:38:20 +03:00
sezero
eeb8c98bb9 glide2x,cvg,fpu.c: change movw to movl in double_precision_asm()
Otherwise we get the following warnings: (some compilers error.)

Assembler messages:
Warning: using `%ax' instead of `%eax' due to `w' suffix
2018-08-17 23:35:02 +03:00
sezero
23b0364245 glide2x, cvg: makefile.linux updates. 2018-08-17 23:28:11 +03:00
sezero
62cc477a02 cvg, rcver.h: comment out fxbldno.h and hard-code BUILD_NUMBER [glide2x] 2018-08-17 23:26:15 +03:00
sezero
60d8447b98 glide2x, h3,minihwc: add p6fence stuff for linux, gcc & co. 2018-08-17 23:21:50 +03:00
sezero
fe99a42068 missed doing this in commit 2ee4b4f5 2018-08-17 23:20:20 +03:00
sezero
8844a3f2e7 h3,h5: move CM_Get_DevNode_Key() call to asm so we don't need win9x ddk 2018-08-17 13:28:21 +03:00
sezero
e6797e4fd8 asm: rename TEXT, DATA, CONST macros to SEG_TEXT, SEG_DATA and SEG_CONST
Defining certain keywords in nasm makes it go haywire.
See, https://bugzilla.nasm.us/show_bug.cgi?id=3392505

$ cat 1.asm
%define TEXT  _TEXT     align=1 public use32 class=CODE FLAT
%define DATA  _DATA     align=4 public use32 class=DATA FLAT
%define CONST CONST2    align=4 public use32 class=DATA FLAT

segment TEXT
segment DATA
segment CONST

$ nasm -E 1.asm
%line 4+1 1.asm

[segment _TEXT align=1 public use32 class=CODE FLAT]
[segment _DATA align=4 public use32 class=_DATA align=4 public use32 class=DATA FLAT FLAT]
[segment CONST2 align=4 public use32 class=_DATA align=4 public use32 class=_DATA align=4 public use32 class=DATA FLAT FLAT FLAT]

Either this (with nasm-2.0..nasm-2.09.xx), or it errors out with:
1.asm:6: error: interminable macro recursion
1.asm:7: error: interminable macro recursion
... which happens with nasm-2.10.xx-nasm-2.13.01

The glide3 tree uses this for Watcom builds / obj output format,
and the result is not what is intended.  After the renaming, it
works as expected:

$ cat 1.asm
%define SEG_TEXT   _TEXT    align=1 public use32 class=CODE FLAT
%define SEG_DATA   _DATA    align=4 public use32 class=DATA FLAT
%define SEG_CONST CONST2    align=4 public use32 class=DATA FLAT

segment SEG_TEXT
segment SEG_DATA
segment SEG_CONST

$ nasm -E 1.asm
%line 4+1 1.asm

[segment _TEXT align=1 public use32 class=CODE FLAT]
[segment _DATA align=4 public use32 class=DATA FLAT]
[segment CONST2 align=4 public use32 class=DATA FLAT]
2018-08-16 21:11:10 +03:00
sezero
9d646ac504 cvg, sst1, Makefile.mingw: undefine WINNT for consistency. 2018-08-14 11:35:55 +03:00
sezero
8e9e9acbb1 h5, dos_mode.c: fixed watcom build
FX_CSTYLE wasn't being defined because of missing FX_DLL_DEFINITION.
DJGPP builds aren't affected.
2018-08-14 03:01:02 +03:00
sezero
1ee5e06295 h5, gpio.c: removed watcom workaround for building under dos 2018-08-14 02:40:55 +03:00
sezero
a1f750e924 h3,h5 gdraw.c (grDrawPoint): removed weird ifdef, kept standart version
don't know why it was needed. Visual Studio 6 generates identical output
for both cases, so it was for earlier versions??? huh...
2018-08-14 00:15:40 +03:00
sezero
902edc7a66 gdraw.c, Makefile.mingw: integrate new xdrawtri.asm to build.
h3 and h5 trees now build using MinGW.  will run-test later..
2018-08-13 23:24:02 +03:00
sezero
49be990209 h3, h5: added grDrawTriangle() implementation for MinGW using nasm
grDrawTriangle() for MSVC/x86 is a naked function, so doing it in C
code won't work.  new file: xdrawtri.asm
2018-08-13 23:20:24 +03:00
sezero
04bc43e39c MinGW makefiles 2018-08-13 23:10:00 +03:00
sezero
c195d7acdc remove all makefile.unix files (obsoleted for quite some time..) 2018-08-13 10:28:02 +03:00
sezero
84728cbfb0 sst96, init96.c: make the BufInfo bI[] array static 2018-08-12 21:00:20 +03:00
sezero
542a45b6e9 sst96: mingw inline asm for _inp, _outp, and _outpw. 2018-08-12 20:55:02 +03:00
sezero
b35c0478be sst1, init96.c: coding style tidy-up.
dxdrvr.c: add missing braces around BufDesc[] initializer
2018-08-12 20:10:51 +03:00
sezero
02a608c61c h3,h5, fxglide.h: restrict Unix version of TRISETUP macro to x86 family.
because the inline asm uses the 'd' constraint, and to my knowledge, it
is x86-specific.
2018-08-12 17:23:10 +03:00
sezero
21fa4b55f0 h5, fxglide.h: don't limit forward declaration of struct GrGC_s to gcc 2018-08-12 17:00:02 +03:00
sezero
3e461e9f67 h3,h5, fxglide.h: tidy-up preprocessor checks for TRISETUP macro 2018-08-12 16:47:50 +03:00
sezero
99f02c80e6 linux makefile updates 2018-08-12 15:51:28 +03:00
sezero
76d8804c33 updates to top-level makefiles 2018-08-12 13:37:50 +03:00
sezero
0ff42bceb5 makefile updates 2018-08-12 13:24:24 +03:00
sezero
0652ba3057 h3,h5, gdraw.c: adjust/tidy preprocessor conditions for grDrawTriangle()
and made h3 and h5 versions look more alike
2018-08-12 12:11:28 +03:00
sezero
41324bf11c h3, gdraw.c: apply grDrawPoint() change from h5 commit 9a64ace 2018-08-12 12:10:32 +03:00
sezero
789be06f0f h3, h5, fxgasm.c: write kTriProcOffset into fxgasm.h, too. 2018-08-11 22:30:21 +03:00
sezero
208cbf570f h5: revert fxglide.h part of shamelessness commit 4b715ac
(my commit 8b047bb missed it)
2018-08-11 22:30:21 +03:00
sezero
673403f9cf h5,fxglide.h: adjust USE_STANDARD_TLS_FUNC case of getThreadValueFast() for gcc 2018-08-11 22:30:21 +03:00
sezero
6c40713033 minihwc.c (EnumDisplayMonitors_func): fix warning: 'dllimport' attribute ignored
also make EnumDisplayMonitors_func a proper function pointer type.
2018-08-11 11:03:24 +03:00
sezero
32b399b380 gsfc.c: warning: operation on 'gc->state.shadow.auxBufferAddr' may be undefined 2018-08-11 10:29:20 +03:00
sezero
7bfd3b95f9 minor makefiles update 2018-08-11 02:29:50 +03:00
sezero
2a711e29fe h3, minihwc.c: fix p6Fence for MinGW. 2018-08-11 01:21:10 +03:00
sezero
3b522046d6 h3/minihwc (hwcShareContextData): copy over gcc inline asm support from h5. 2018-08-11 00:32:02 +03:00
sezero
898013970a h3, h5, minihwc: minor warning fixes. 2018-08-11 00:29:35 +03:00
sezero
ca1e7fd506 h3, h5, gdebug.c: fix gdbg_msgfile initializer issue with mingw. 2018-08-11 00:28:15 +03:00
sezero
ccbd5a7b41 h5, minihwc: use local _aligned_malloc implementation with mingw. 2018-08-11 00:26:31 +03:00
sezero
c62583a3ee h3, gthread.c: fix breakage after commiet 797d81af 2018-08-10 21:01:32 +03:00
sezero
93dcdb9390 h3,h5, gdraw.c: minor typo/whitespace fixes and some syncing. 2018-08-10 20:45:20 +03:00
sezero
797d81af4a h3, fxglide.h, gthread.c: copy over gcc compatibility changes from h5. 2018-08-10 20:38:57 +03:00
sezero
8a406cba3d h3, h5: gsfc.c: replace backslash path separators in include directive. 2018-08-10 20:38:32 +03:00
sezero
da4d6857ba sst1, xdraw.asm: don't add _ prefix to exported symbol name with mingw.
Otherwise GNU toolchain fails with the error message:
   "Cannot export _grDrawTriangle@12: symbol not found"

Learning something everyday.
2018-08-10 20:38:15 +03:00
sezero
b6d45d842c sst1, Makefile.win32: remove duplicated gxdraw.obj in objects list. 2018-08-10 20:37:55 +03:00
sezero
355dca22a1 fxvxd.c: gcc inline asm for _inp, _inpw, _inpd, _outp, _outpw, _outpd. 2018-08-10 20:37:33 +03:00
sezero
57230a2161 cvg, parse.c: fixed a format warning from mingw. 2018-08-10 20:37:17 +03:00
sezero
b594bf89aa sst1init.h: remove a weirdness from INIT_PRINTF definition for windows
gcc (mingw) emitted lots of 'left-hand operand of comma expression has
no effect' warnings for it..
2018-08-10 20:36:28 +03:00
sezero
043f38b035 restrict #pragma optimize to Visual Studio builds 2018-08-10 20:36:10 +03:00
sezero
f3ed63fc58 fix parens around truth value warnings. 2018-08-10 20:35:54 +03:00
sezero
d92d50efc8 oeminit.h: fix 'extra tokens at end of #endif directive' warning 2018-08-10 20:35:41 +03:00
sezero
2a7cfdfec7 warning fixes. 2018-08-09 21:50:10 +03:00
sezero
faf890d878 cvg, h5, cpuid.c: fixed strict aliasing issue with newer gcc versions. 2018-08-09 20:51:50 +03:00
sezero
5f69e69154 3dfx.h: minor update for Fx?32 types 2018-08-09 17:55:02 +03:00
sezero
6759df5ead cvg, makefile.linux: remove fxremap.o from objects.
fxremap() is called only in dos and windows builds.
2018-08-09 16:10:50 +03:00
sezero
7dbc64777a apply the commit 721b6fcf changes to h3info.h, too. [glide2x side] 2018-08-09 16:10:01 +03:00
sezero
5c6e58e4e2 apply the commit 721b6fcf changes to ddglobal.h and h3info.h, too. 2018-08-09 15:55:28 +03:00
sezero
b5a555a538 cvg,fxremap.c: only include sst1init.h (for INIT_PRINTF) for dos builds
for others, make INIT_PRINTF() in fxremap.c a nop.
2018-08-09 15:55:01 +03:00
sezero
b4c30b1693 h3cinit.c: made mode_table[] and vgaattr[] static const 2018-08-09 12:51:50 +03:00
sezero
721b6fcf1b cvg, fxremap: removed all unnecessary stuff, made it to use INIT_OUTPUT 2018-08-09 11:56:56 +03:00
sezero
43f6bbc977 cvginfo.h: remove top-level defines and forward declare struct sstregs.
It 'defined' FxU32 and FxBool for if __unix__ is defined and cvgregs.h
not included.  DJGPP does define __unix__, and this caused a mess with
one of my experiments.

I do not see the real need for this.  So, adding a forward declaration
of struct sstregs, replacing all SstRegs* with volatile struct sstregs*
serves the purpose. 3dfx.h (which typedefs FxU32 and FxBool) is always
included before cvginfo.h everywhere in the code, so, there is no need
for 'defining' FxU32 and FxBool here, either.

DJGPP build gives an identical DXE output before and after this change.
2018-08-09 11:50:02 +03:00
sezero
64bae86d19 cvg, fxremap: leave out lots of actually unused code from build.
glide code only calls fxremap() and not fxremap_main(), so silent
is always true, there is no cmdline processing, and nothing can
actually print to console. added a new FXREMAP_EXE ifdef in there
to filter things out.
2018-08-09 02:20:40 +03:00
sezero
43291704cb h5,dos_mode.c,lin_mode.c: made buildVideoModeData and setVideoModeSlave static.
whitespace tidy-up.
2018-08-08 23:55:32 +03:00
sezero
12d926449a cvg, gu.c: added guEncodeRLE16()
this function used to be exported by earlier versions of glide3x.dll in
voodoo2 reference drivers, but later it disappeared. it _is_ present in
glide3x.dll versions for all other voodoo boards, so added it here.
2018-08-08 23:04:10 +03:00
sezero
b62e3fd33c h5, fxglide.h: restored FX_EXPORT in GR_ENTRY definition.
koolsmoky commit 0b8571b (initial checkin of dos win32 glide) commented
it out for who knows why, and that resulted in two of the exports in the
dll to go missing, namely grCheckForRoom and guEncodeRLE16. they are now
back.
2018-08-08 22:39:10 +03:00
sezero
3c54cfde1e cvg,sst1 init: #undef FX_DLL_ENABLE so that we don't dllexport the symbols. 2018-08-08 22:38:50 +03:00
sezero
40ee824879 swlibs, fxpci: #undef FX_DLL_ENABLE, so that we don't dllexport the symbols. 2018-08-08 22:38:27 +03:00
sezero
bc18c519d7 gdebug.c: #undef FX_DLL_ENABLE, so that we don't dllexport the symbols. 2018-08-08 22:38:12 +03:00
sezero
1fe48886a8 gdebug.c: whitespace tidy-up. 2018-08-08 22:37:50 +03:00
sezero
de0e7ca28f fxdll.h: revert koolsmoky commit bab2f1c 'use dllimport for __MSC__ imports'
it was wrong, and was causing LNK4049 warnings.
2018-08-08 22:35:48 +03:00
sezero
1e89ef2670 cvg, Makefile.win32: missed replacing one path separator 2018-08-08 18:55:04 +03:00
sezero
8c917cb2a2 convert win32 Makefiles to crlf, convert path separators to backslash. 2018-08-08 14:56:02 +03:00
sezero
8adf484af7 h3, h5: last of the VC6 and ddraw.h compatibility stuff. 2018-08-08 14:25:50 +03:00
sezero
e710954c4e h5, minihwc.c: VC6 rejects pMinSW in the inline asm.
changed pMinSW mm0,mm3  to
    _asm _emit 0x0f _asm _emit 0xea  _asm _emit 0xc3
2018-08-08 11:10:02 +03:00
sezero
59d59bad72 h5, minihwc.c: VC6 doesn't have _aligned_malloc(). locally implemented. 2018-08-08 11:06:51 +03:00
sezero
380a78de05 h3, h5, minihwc: remove some unused stuff from win_mode.c. minor cleanup. 2018-08-08 10:50:10 +03:00
sezero
42c8b28993 Windows (VC6) build fixes, 03/##: HMONITOR type hack for h3 and h5. 2018-08-08 08:55:02 +03:00
sezero
d6fce294b4 h3, h5, minihwc: don't unconditionally define GDBG_INFO_ON in win_mode.c 2018-08-08 08:50:37 +03:00
sezero
0aa1e159bf Windows (VC6) build fixes, 02/##: grDrawLine() const issue.
this is a hack and need to be fixed properly by constifying other
procedures.
2018-08-08 08:47:00 +03:00
sezero
d6448ee662 Windows (VC6) build fixes, 01/## 2018-08-08 08:45:02 +03:00
sezero
29212e8a14 fxremap.c: warning fixes. 2018-08-07 12:04:40 +03:00
sezero
af4ebfce0c warning fixes and minor cleanup. 2018-08-07 11:58:55 +03:00
sezero
19efdba7e0 swlibs/fxmisc/fximg.c: -Wformat warning fixes 2018-08-07 11:57:45 +03:00
sezero
032b25b708 minor type corrections 2018-08-07 10:37:24 +03:00
sezero
d46910aa23 sst96.c (_grSst96Load32): fix a minor warning after commit 30ec8787 2018-08-06 17:00:02 +03:00
sezero
2ee4b4f583 h3, h5, minihwc: don't unconditionally define GDBG_INFO_ON in minihwc.c
several constifications.  exclude the debug stuff from release builds.
fixed that 'waxRegnames' typo in HWC_WAX_STORE and HWC_WAX_LOAD macros.
2018-08-06 14:10:02 +03:00
sezero
b33d69b0a3 cvg, fxremap.c: make almost everything static.
except for the two exported functions.
also replaced 'null' by 'NULL' (why that 'null' define I wonder..)
2018-08-06 14:00:50 +03:00
sezero
1f08466bc6 sst96: more of making several global vars static:
- initat3d.c: make ClockTableAT3D[] const and static.
- initad3d.c: make const vars  bPowerOff, bHighSpeed,
  and bBypass static.
2018-08-06 14:00:01 +03:00
sezero
30ec87871d sst96: exclude debug stuff from release-builds (regNames & co.) 2018-08-06 13:56:50 +03:00
sezero
f053d6b0cf sst96: constified iRegNames[] 2018-08-06 13:55:02 +03:00
sezero
ef5108ae49 sst96: vgdrvr.c, vg96drvr.c: minor whitespace cleanups. 2018-08-05 17:24:28 +03:00
sezero
9fee9e454d sst96: fix warnings introduced by commit 383731e84 2018-08-05 17:23:37 +03:00
sezero
46226e7d14 revert commit 16a4feb6, define INIT_ACCESS_DIRECT for SST96 DOS builds. 2018-08-05 12:04:04 +03:00
sezero
383731e840 make a few more global vars static. remove glideIdent[] from gglide.c (unused.) 2018-08-05 12:02:59 +03:00
sezero
08e1e599fd xos.inc: fixed 'unterminated string' warning from nasm. 2018-08-05 12:02:59 +03:00
sezero
4f81f1ed1b added a top-level README file. 2018-08-05 12:02:59 +03:00
sezero
ae760389ae glide2x/h3 (linhwc.c/minihwc.c): fix fenceVar with newer gcc versions.
from glide3x tree.
2018-08-05 12:02:59 +03:00
sezero
486276471e add missing Rush files to glide2x side. 2018-08-05 12:02:59 +03:00
sezero
1a273ba12a sst1 cleanup: remove non-existent h3drvr (FX_SST2) stuff [glide2x side] 2018-08-05 12:02:59 +03:00
sezero
8b047bb95c splash and shameless plug updates:
removed experimental splash stuff from h3/h5 for non-windows.
if either of GLIDE_SPLASH or GLIDE_PLUG aren't defined their
respective data are completey excluded from the binary image,
and their respective functions aren't called at all.
2018-08-05 12:02:59 +03:00
sezero
bbbb581698 add a sst96 subdirectory to sst1/lib/ 2018-08-05 12:02:59 +03:00
sezero
cb46d5b49c disable shameless plug overlay and splash screen in DOS builds.
reduces binary size and not really needed.
2018-08-05 12:02:59 +03:00
sezero
8bdf368c58 Makefile.DJ: define a DXE3GEN variable, defaulting to dxe3gen 2018-08-05 12:02:59 +03:00
sezero
720d0b125e DJGPP Makefile updates with some (ugly) cross-build workarounds. 2018-08-05 12:02:59 +03:00
sezero
35be4ad445 sst1 cleanup: remove non-existent h3drvr (FX_SST2) stuff 2018-08-05 12:02:59 +03:00
sezero
dc5f7d0065 commented out some unused static vars 2018-08-05 12:02:59 +03:00
sezero
9b83acbefd linux build fixes 2018-08-05 12:02:59 +03:00
sezero
bc892aff15 cvg: added -DGLIDE_CHIP_BROADCAST=1 and -DGLIDE_BLIT_CLEAR=1 among the CFLAGS.
Windows makefile has them, already.  The linux makefile used to have them but
magically lost them somehow in the glide-devel-branch. Let's see how it goes..
2018-08-05 12:02:59 +03:00
sezero
16a4feb6e6 sst1,initmcrx (initMCRXSetVideo): make Macronix Rush cards function under DOS
achieved by commenting out the INIT_ACCESS_DIRECT ifdef.  maybe just defining
INIT_ACCESS_DIRECT works too? that adds a initAT3DWait(100) call for the AT3D
cards. to be revisited / tested in future...
2018-08-05 12:02:59 +03:00
sezero
78a5774bc8 h5, minihwc.c (hwcInitRegisters): call h4InitPlls() if H4 is defined for v4/5
patch from Frank Sapone <emoaddict15@gmail.com> --- overclocking support with
SSTH3_GRXCLOCK for Voodoo 4/5 cards.
2018-08-05 12:02:59 +03:00
sezero
eea61facf8 h3/h5, linhwc.c, minihwc.c: fix fenceVar with newer gcc versions. build fixes. 2018-08-05 12:02:59 +03:00
sezero
dd7cb10225 cvg, rcver.h: comment out fxbldno.h and hard-code BUILD_NUMBER for now. 2018-08-05 12:02:59 +03:00
sezero
e8c99cbad5 swlibs/newpci/pcilib/fxpci.c (pciGetErrorString): unsigned casts to fix warning 2018-08-05 12:02:59 +03:00
sezero
4092b17053 3dfx.h: change FxI32 and FxU32 to be of long types for Windows and DOS. 2018-08-05 12:02:59 +03:00
sezero
e6d386eb3c sst1, initat3d.c: build / warning fixes. 2018-08-05 12:02:59 +03:00
sezero
8448392757 sst1, init96.c: remove static redeclaration of init96SetupRendering(). 2018-08-05 12:02:59 +03:00
sezero
c2eaa35f54 sst1, gxdraw.c: fix typo introduced by the gcc4.1 strict aliasing fixes 2018-08-05 12:02:59 +03:00
sezero
7415325040 h5, minihwc.h: fix misplaced HWC_EXT_INIT ifdef in struct hwcBoardInfo_s 2018-08-05 12:02:59 +03:00
sezero
5ca0c8b42f h5, gtexdl.c: commented out unused local var 'didcompress' 2018-08-05 12:02:59 +03:00
sezero
fdeb88fac5 h5, gdraw.c: fix build with newer gcc versions. 2018-08-05 12:02:59 +03:00
sezero
14e33eb51d h3, gthread.c: build fix 2018-08-05 12:02:59 +03:00
sezero
d257dd2bc2 h3cinit.c: removed an ugly hack for building under dos. 2018-08-05 12:02:59 +03:00
sezero
371f2af8ec gdebug.c: gdbg_set_file() fixes. 2018-08-05 12:02:59 +03:00
sezero
6a898856bb cvg, splshdat.c: fix missing braces in initializer warning 2018-08-05 12:02:59 +03:00
sezero
de08f2ebbf gsplash.c: changed type of fogTableSize to FxI32 2018-08-05 12:02:59 +03:00
sezero
dde408cf00 added missing newline at end of two files 2018-08-05 12:02:59 +03:00
sezero
76a8dc0416 removed dependency on ctype.h functionality. also simplified NULL usage. 2018-08-05 12:02:59 +03:00
sezero
4819e38cc4 cvg: replaced a build fix hack with a better one 2018-08-05 12:02:59 +03:00
sezero
4fd268232a replaced broken binary files as best as I can 2018-08-05 12:02:43 +03:00
sezero
ec57d92c97 remove two test binaries 2018-08-05 12:02:39 +03:00
sezero
968e385010 removed most of the cvs keywords.
in some files, added back last-revision logs which cvs2git removed:
feel more comfortable that way for now..

also removed all of the .cvsignore files.
2018-08-05 12:02:27 +03:00
sezero
367a3b66c4 fix stupid eol 2018-08-05 12:01:50 +03:00
sezero
2c11e03776 removed some static vars relying on cvs revision number (glide2x side) 2018-08-05 11:58:06 +03:00
sezero
d7086902f1 removed some static vars relying on cvs revision number. 2018-08-05 11:58:00 +03:00
50 changed files with 4342 additions and 1024 deletions

9
.gitignore vendored Normal file
View File

@@ -0,0 +1,9 @@
*.o
*.a
*.lo
*.so
*.exe
fxgasm.h
*.exe
fxgasm
fxinline.h

View File

@@ -71,23 +71,33 @@
#include <linux/mm.h> #include <linux/mm.h>
#include <linux/errno.h> #include <linux/errno.h>
#include <linux/pci.h> #include <linux/pci.h>
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,46) && \ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,46) && \
LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) || \ LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) || \
defined(DEVFS_SUPPORT) defined(DEVFS_SUPPORT)
#include <linux/devfs_fs_kernel.h> #include <linux/devfs_fs_kernel.h>
#define HAVE_DEVFS 1 #define HAVE_DEVFS 1
#else #else
#define HAVE_DEVFS 0 #define HAVE_DEVFS 0
#endif #endif
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,18)
#include <linux/device.h>
#include <linux/err.h>
#define HAVE_CLASS_DEVICE 1
#else
#define HAVE_CLASS_DEVICE 0
#endif
#include <asm/segment.h> #include <asm/segment.h>
#include <asm/ioctl.h> #include <asm/ioctl.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/pgtable.h> #include <asm/pgtable.h>
#include <asm/processor.h> #include <asm/processor.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
#ifdef CONFIG_MTRR #ifdef CONFIG_MTRR
#include <asm/mtrr.h> #include <asm/mtrr.h>
#endif #endif
#define MAJOR_3DFX 107 #define MAJOR_3DFX 107
@@ -112,44 +122,44 @@
#define SC_DATA 0x3c5 #define SC_DATA 0x3c5
#ifndef PCI_VENDOR_ID_3DFX #ifndef PCI_VENDOR_ID_3DFX
#define PCI_VENDOR_ID_3DFX 0x121a #define PCI_VENDOR_ID_3DFX 0x121a
#endif #endif
#ifndef PCI_VENDOR_ID_ALLIANCE #ifndef PCI_VENDOR_ID_ALLIANCE
#define PCI_VENDOR_ID_ALLIANCE 0x1142 #define PCI_VENDOR_ID_ALLIANCE 0x1142
#endif #endif
#ifndef PCI_VENDOR_ID_MACRONIX #ifndef PCI_VENDOR_ID_MACRONIX
#define PCI_VENDOR_ID_MACRONIX 0x10d9 #define PCI_VENDOR_ID_MACRONIX 0x10d9
#endif #endif
#ifndef PCI_DEVICE_ID_3DFX_VOODOO2 #ifndef PCI_DEVICE_ID_3DFX_VOODOO2
#define PCI_DEVICE_ID_3DFX_VOODOO2 2 #define PCI_DEVICE_ID_3DFX_VOODOO2 2
#endif #endif
#ifndef PCI_DEVICE_ID_ALLIANCE_AT3D #ifndef PCI_DEVICE_ID_ALLIANCE_AT3D
#define PCI_DEVICE_ID_ALLIANCE_AT3D 0x643d #define PCI_DEVICE_ID_ALLIANCE_AT3D 0x643d
#endif #endif
#ifndef PCI_DEVICE_ID_MACRONIX_MX86251 #ifndef PCI_DEVICE_ID_MACRONIX_MX86251
#define PCI_DEVICE_ID_MACRONIX_MX86251 0x8626 #define PCI_DEVICE_ID_MACRONIX_MX86251 0x8626
#endif #endif
#ifndef PCI_DEVICE_ID_3DFX_BANSHEE #ifndef PCI_DEVICE_ID_3DFX_BANSHEE
#define PCI_DEVICE_ID_3DFX_BANSHEE 3 #define PCI_DEVICE_ID_3DFX_BANSHEE 3
#endif #endif
#ifndef PCI_DEVICE_ID_3DFX_VOODOO3 #ifndef PCI_DEVICE_ID_3DFX_VOODOO3
#define PCI_DEVICE_ID_3DFX_VOODOO3 5 #define PCI_DEVICE_ID_3DFX_VOODOO3 5
#endif #endif
#ifndef PCI_DEVICE_ID_3DFX_VOODOO4 #ifndef PCI_DEVICE_ID_3DFX_VOODOO4
#define PCI_DEVICE_ID_3DFX_VOODOO4 9 #define PCI_DEVICE_ID_3DFX_VOODOO4 9
#endif #endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,73) #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,73)
#define pci_get_device pci_find_device #define pci_get_device pci_find_device
#define pci_dev_put(dev) #define pci_dev_put(dev)
#endif #endif
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
@@ -198,22 +208,22 @@ static struct pci_card {
* on kernel version. * on kernel version.
*/ */
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,14) #if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,14)
#define VM_OFFSET(vma) (vma->vm_offset) #define VM_OFFSET(vma) (vma->vm_offset)
#define VM_OFFSET_ALIGNED(vma) ((vma->vm_offset) & ~PAGE_MASK) #define VM_OFFSET_ALIGNED(vma) ((vma->vm_offset) & ~PAGE_MASK)
#else #else
#define VM_OFFSET(vma) (vma->vm_pgoff << PAGE_SHIFT) #define VM_OFFSET(vma) (vma->vm_pgoff << PAGE_SHIFT)
#define VM_OFFSET_ALIGNED(vma) ((vma->vm_pgoff) & ~PAGE_MASK) #define VM_OFFSET_ALIGNED(vma) ((vma->vm_pgoff) & ~PAGE_MASK)
#endif #endif
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,10) #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,10)
#define my_remap_page_range(vma, start, ofs, len, prot) \ #define my_remap_page_range(vma, start, ofs, len, prot) \
remap_pfn_range(vma, start, ofs >> PAGE_SHIFT, len, prot) remap_pfn_range(vma, start, ofs >> PAGE_SHIFT, len, prot)
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) #elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
#define my_remap_page_range(vma, start, ofs, len, prot) \ #define my_remap_page_range(vma, start, ofs, len, prot) \
remap_page_range(vma, start, ofs, len, prot) remap_page_range(vma, start, ofs, len, prot)
#else #else
#define my_remap_page_range(vma, start, ofs, len, prot) \ #define my_remap_page_range(vma, start, ofs, len, prot) \
remap_page_range(start, ofs, len, prot) remap_page_range(start, ofs, len, prot)
#endif #endif
struct pioData_t { struct pioData_t {
@@ -256,6 +266,10 @@ static int numCards = 0;
static devfs_handle_t devfs_handle; static devfs_handle_t devfs_handle;
#endif #endif
#endif #endif
#if HAVE_CLASS_DEVICE
static struct class *class_3dfx = NULL;
static struct device *device_3dfx = NULL;
#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
static void findCardType(int vendor, int device) static void findCardType(int vendor, int device)
@@ -303,6 +317,7 @@ static int findCards(void)
{ {
int error; int error;
numCards = 0;
error = pci_register_driver(&driver_3dfx); error = pci_register_driver(&driver_3dfx);
if (error) if (error)
@@ -799,6 +814,11 @@ static struct file_operations fops_3dfx = {
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
static int probe_3dfx(struct pci_dev *dev, const struct pci_device_id *id) static int probe_3dfx(struct pci_dev *dev, const struct pci_device_id *id)
{ {
if (numCards >= MAXCARDS) {
printk("3dfx: too many cards, MAXCARDS=%d\n", MAXCARDS);
return -ENODEV;
}
pci_read_config_dword(dev, PCI_BASE_ADDRESS_0, &cards[numCards].addr0); pci_read_config_dword(dev, PCI_BASE_ADDRESS_0, &cards[numCards].addr0);
pci_read_config_dword(dev, PCI_BASE_ADDRESS_1, &cards[numCards].addr1); pci_read_config_dword(dev, PCI_BASE_ADDRESS_1, &cards[numCards].addr1);
pci_read_config_dword(dev, PCI_BASE_ADDRESS_2, &cards[numCards].addr2); pci_read_config_dword(dev, PCI_BASE_ADDRESS_2, &cards[numCards].addr2);
@@ -833,6 +853,50 @@ static struct pci_driver driver_3dfx = {
}; };
#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) */ #endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) */
#if HAVE_CLASS_DEVICE
static int create_device_3dfx(void)
{
class_3dfx = class_create(THIS_MODULE, "3dfx");
if (IS_ERR(class_3dfx)) {
int ret = PTR_ERR(class_3dfx);
class_3dfx = NULL;
printk("3dfx: class_create() failed, returned %d\n", ret);
return ret;
}
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27)
device_3dfx = device_create(class_3dfx, NULL,
MKDEV(MAJOR_3DFX, DEVICE_VOODOO),
NULL, "3dfx");
#else
device_3dfx = device_create(class_3dfx, NULL,
MKDEV(MAJOR_3DFX, DEVICE_VOODOO),
"3dfx");
#endif
if (IS_ERR(device_3dfx)) {
int ret = PTR_ERR(device_3dfx);
device_3dfx = NULL;
class_destroy(class_3dfx);
class_3dfx = NULL;
printk("3dfx: device_create() failed, returned %d\n", ret);
return ret;
}
return 0;
}
static void destroy_device_3dfx(void)
{
if (device_3dfx)
device_destroy(class_3dfx, MKDEV(MAJOR_3DFX, DEVICE_VOODOO));
if (class_3dfx)
class_destroy(class_3dfx);
device_3dfx = NULL;
class_3dfx = NULL;
}
#endif
#ifdef MODULE #ifdef MODULE
int init_module(void) int init_module(void)
{ {
@@ -840,8 +904,17 @@ int init_module(void)
DEBUGMSG(("3dfx: Entering init_module()\n")); DEBUGMSG(("3dfx: Entering init_module()\n"));
ret = findCards();
if (ret < 0) {
printk("3dfx: findCards() failed, returned %d\n", ret);
return -ENODEV;
}
if ((ret = register_chrdev(MAJOR_3DFX, "3dfx", &fops_3dfx)) < 0) { if ((ret = register_chrdev(MAJOR_3DFX, "3dfx", &fops_3dfx)) < 0) {
printk("3dfx: Unable to register character device with major %d\n", MAJOR_3DFX); printk("3dfx: Unable to register character device with major %d\n", MAJOR_3DFX);
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
pci_unregister_driver(&driver_3dfx);
#endif
return ret; return ret;
} }
@@ -857,22 +930,21 @@ int init_module(void)
&fops_3dfx, NULL); &fops_3dfx, NULL);
#endif #endif
#endif #endif
#if HAVE_CLASS_DEVICE
DEBUGMSG(("3dfx: Successfully registered device 3dfx\n")); ret = create_device_3dfx();
ret = findCards();
if (ret < 0) { if (ret < 0) {
printk("3dfx: findCards() failed, returned %d\n", ret); unregister_chrdev(MAJOR_3DFX, "3dfx");
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
pci_unregister_driver(&driver_3dfx);
#endif
return ret; return ret;
} }
#endif
#ifdef CONFIG_MTRR #ifdef CONFIG_MTRR
ret = setmtrr_3dfx(); ret = setmtrr_3dfx();
if (ret < 0) { if (ret < 0) {
DEBUGMSG(("setmtrr_3dfx() failed, returned %d\n", ret)); DEBUGMSG(("setmtrr_3dfx() failed, returned %d\n", ret));
/*
unregister_chrdev(MAJOR_3DFX, "3dfx");
return ret;
*/
} }
#endif #endif
@@ -893,7 +965,9 @@ void cleanup_module(void)
devfs_unregister(devfs_handle); devfs_unregister(devfs_handle);
#endif #endif
#endif #endif
#if HAVE_CLASS_DEVICE
destroy_device_3dfx();
#endif
unregister_chrdev(MAJOR_3DFX, "3dfx"); unregister_chrdev(MAJOR_3DFX, "3dfx");
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
@@ -906,17 +980,18 @@ long init_3dfx(long mem_start, long mem_end)
{ {
int ret; int ret;
if (register_chrdev(MAJOR_3DFX, "3dfx", &fops_3dfx)) {
DEBUGMSG(("3dfx: Unable to register_chrdev with major %d\n", MAJOR_3DFX));
return 0;
}
ret = findCards(); ret = findCards();
if (ret < 0) { if (ret < 0) {
printk("3dfx: findCards() failed, returned %d\n", ret); printk("3dfx: findCards() failed, returned %d\n", ret);
return 0; return -ENODEV;
} }
if (ret=register_chrdev(MAJOR_3DFX, "3dfx", &fops_3dfx)) {
DEBUGMSG(("3dfx: Unable to register_chrdev with major %d\n", MAJOR_3DFX));
return ret;
}
return mem_start; return mem_start;
} }
#endif /* !MODULE */ #endif /* !MODULE */
@@ -926,7 +1001,7 @@ MODULE_AUTHOR("Daryll Strauss et al.");
MODULE_DESCRIPTION("3dfx glide kernel device driver"); MODULE_DESCRIPTION("3dfx glide kernel device driver");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
#ifdef MODULE_VERSION #ifdef MODULE_VERSION
MODULE_VERSION("2011.05.27"); MODULE_VERSION("2026.03.24");
#endif #endif
#endif #endif

View File

@@ -0,0 +1,5 @@
device3dfx (2.3-1) unstable; urgency=low
* Initial package.
-- RetroDebian <root@retrodebian.local> Thu, 20 Mar 2026 10:00:00 +0000

1
Device3Dfx/debian/compat Normal file
View File

@@ -0,0 +1 @@
5

View File

@@ -0,0 +1,14 @@
Source: device3dfx
Section: misc
Priority: optional
Maintainer: RetroDebian <root@retrodebian.local>
Standards-Version: 3.7.3
Package: device3dfx-modules-_KVERS_
Architecture: any
Provides: device3dfx-modules
Depends: linux-modules-_KVERS_ | linux-image-_KVERS_
Description: Device3Dfx kernel module for Debian Linux kernels
External kernel module providing /dev/3dfx support for 3dfx hardware.
.
This package contains the compiled kernel module for _KVERS_.

37
Device3Dfx/debian/rules Executable file
View File

@@ -0,0 +1,37 @@
#!/usr/bin/make -f
# -*- mode: makefile; coding: utf-8 -*-
PACKAGE=device3dfx-modules
MA_DIR ?= /usr/share/modass
-include $(MA_DIR)/include/generic.make
-include $(MA_DIR)/include/common-rules.make
kdist_config: prep-deb-files
ln -sf ../3dfx_driver.c kbuild/3dfx.c
kdist_clean:
rm -f kbuild/3dfx.c
$(MAKE) -C $(KSRC) M=$(PWD)/kbuild clean
binary-modules:
dh_testroot
dh_clean -k
dh_installdirs
ln -sf ../3dfx_driver.c kbuild/3dfx.c
$(MAKE) -C $(KSRC) M=$(PWD)/kbuild modules
mkdir -p debian/$(PACKAGE)-$(KVERS)/lib/modules/$(KVERS)/extra
cp kbuild/3dfx.ko debian/$(PACKAGE)-$(KVERS)/lib/modules/$(KVERS)/extra/
dh_installdocs
dh_installchangelogs
dh_installmodules
dh_compress
dh_fixperms
dh_installdeb
dh_gencontrol -- -v$(VERSION)
dh_md5sums
dh_builddeb --destdir=$(DEB_DESTDIR)
dh_clean -k

255
LICENSE Normal file
View File

@@ -0,0 +1,255 @@
3DFX GLIDE Source Code General Public License
1. PREAMBLE
This license is for software that provides a 3D graphics application
program interface (API).The license is intended to offer terms similar
to some standard General Public Licenses designed to foster open
standards and unrestricted accessibility to source code. Some of these
licenses require that, as a condition of the license of the software,
any derivative works (that is, new software which is a work containing
the original program or a portion of it) must be available for general
use, without restriction other than for a minor transfer fee, and that
the source code for such derivative works must likewise be made
available. The only restriction is that such derivative works must be
subject to the same General Public License terms as the original work.
This 3dfx GLIDE Source Code General Public License differs from the
standard licenses of this type in that it does not require the entire
derivative work to be made available under the terms of this license
nor is the recipient required to make available the source code for
the entire derivative work. Rather, the license is limited to only the
identifiable portion of the derivative work that is derived from the
licensed software. The precise terms and conditions for copying,
distribution and modification follow.
2. DEFINITIONS
2.1 This License applies to any program (or other "work") which
contains a notice placed by the copyright holder saying it may be
distributed under the terms of this 3dfx GLIDE Source Code General
Public License.
2.2 The term "Program" as used in this Agreement refers to 3DFX's
GLIDE source code and object code and any Derivative Work.
2.3 "Derivative Work" means, for the purpose of the License, that
portion of any work that contains the Program or the identifiable
portion of a work that is derived from the Program, either verbatim or
with modifications and/or translated into another language, and that
performs 3D graphics API operations. It does not include any other
portions of a work.
2.4 "Modifications of the Program" means any work, which includes a
Derivative Work, and includes the whole of such work.
2.5 "License" means this 3dfx GLIDE Source Code General Public License.
2.6 The "Source Code" for a work means the preferred form of the work
for making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, any
associated interface definition files, and the scripts used to control
compilation and installation of the executable work.
2.7 "3dfx" means 3dfx Interactive, Inc.
3. LICENSED ACTIVITIES
3.1 COPYING - You may copy and distribute verbatim copies of the
Program's Source Code as you receive it, in any medium, subject to the
provision of section 3.3 and provided also that:
(a) you conspicuously and appropriately publish on each copy
an appropriate copyright notice (3dfx Interactive, Inc. 1999), a notice
that recipients who wish to copy, distribute or modify the Program can
only do so subject to this License, and a disclaimer of warranty as
set forth in section 5;
(b) keep intact all the notices that refer to this License and
to the absence of any warranty; and
(c) do not make any use of the GLIDE trademark without the prior
written permission of 3dfx, and
(d) give all recipients of the Program a copy of this License
along with the Program or instructions on how to easily receive a copy
of this License.
3.2 MODIFICATION OF THE PROGRAM/DERIVATIVE WORKS - You may modify your
copy or copies of the Program or any portion of it, and copy and
distribute such modifications subject to the provisions of section 3.3
and provided that you also meet all of the following conditions:
(a) you conspicuously and appropriately publish on each copy
of a Derivative Work an appropriate copyright notice, a notice that
recipients who wish to copy, distribute or modify the Derivative Work
can only do so subject to this License, and a disclaimer of warranty
as set forth in section 5;
(b) keep intact all the notices that refer to this License and
to the absence of any warranty; and
(c) give all recipients of the Derivative Work a copy of this
License along with the Derivative Work or instructions on how to easily
receive a copy of this License.
(d) You must cause the modified files of the Derivative Work
to carry prominent notices stating that you changed the files and the
date of any change.
(e) You must cause any Derivative Work that you distribute or
publish to be licensed at no charge to all third parties under the
terms of this License.
(f) You do not make any use of the GLIDE trademark without the
prior written permission of 3dfx.
(g) If the Derivative Work normally reads commands
interactively when run, you must cause it, when started running for
such interactive use, to print or display an announcement as follows:
"COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED THIS
SOFTWARE IS FREE AND PROVIDED "AS IS," WITHOUT WARRANTY OF ANY KIND,
EITHER EXPRESSED OR IMPLIED. THERE IS NO RIGHT TO USE THE GLIDE
TRADEMARK WITHOUT PRIOR WRITTEN PERMISSION OF 3DFX INTERACTIVE,
INC. SEE THE 3DFX GLIDE GENERAL PUBLIC LICENSE FOR A FULL TEXT OF THE
DISTRIBUTION AND NON-WARRANTY PROVISIONS (REQUEST COPY FROM
INFO@3DFX.COM)."
(h) The requirements of this section 3.2 do not apply to the
modified work as a whole but only to the Derivative Work. It is not
the intent of this License to claim rights or contest your rights to
work written entirely by you; rather, the intent is to exercise the
right to control the distribution of Derivative Works.
3.3 DISTRIBUTION
(a) All copies of the Program or Derivative Works which are
distributed must include in the file headers the following language
verbatim:
"THIS SOFTWARE IS SUBJECT TO COPYRIGHT PROTECTION AND IS OFFERED
ONLY PURSUANT TO THE 3DFX GLIDE GENERAL PUBLIC LICENSE. THERE IS NO
RIGHT TO USE THE GLIDE TRADEMARK WITHOUT PRIOR WRITTEN PERMISSION OF
3DFX INTERACTIVE, INC. A COPY OF THIS LICENSE MAY BE OBTAINED FROM
THE DISTRIBUTOR OR BY CONTACTING 3DFX INTERACTIVE INC (info@3dfx.com).
THIS PROGRAM. IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
EXPRESSED OR IMPLIED. SEE THE 3DFX GLIDE GENERAL PUBLIC LICENSE FOR A
FULL TEXT OF THE NON-WARRANTY PROVISIONS.
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.
COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED"
(b) You may distribute the Program or a Derivative Work in
object code or executable form under the terms of Sections 3.1 and 3.2
provided that you also do one of the following:
(1) Accompany it with the complete corresponding
machine-readable source code, which must be distributed under the
terms of Sections 3.1 and 3.2; or,
(2) Accompany it with a written offer, valid for at
least three years, to give any third party, for a charge no more than
your cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 3.1 and 3.2 on a medium
customarily used for software interchange; or,
(3) Accompany it with the information you received as
to the offer to distribute corresponding source code. (This alternative
is allowed only for noncommercial distribution and only if you received
the program in object code or executable form with such an offer, in
accord with Subsection 3.3(b)(2) above.)
(c) The source code distributed need not include anything
that is normally distributed (in either source or binary form) with
the major components (compiler, kernel, and so on) of the operating
system on which the executable runs, unless that component itself
accompanies the executable code.
(d) If distribution of executable code or object code is made
by offering access to copy from a designated place, then offering
equivalent access to copy the source code from the same place counts
as distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
(e) Each time you redistribute the Program or any Derivative
Work, the recipient automatically receives a license from 3dfx and
successor licensors to copy, distribute or modify the Program and
Derivative Works subject to the terms and conditions of the License.
You may not impose any further restrictions on the recipients'
exercise of the rights granted herein. You are not responsible for
enforcing compliance by third parties to this License.
(f) You may not make any use of the GLIDE trademark without
the prior written permission of 3dfx.
(g) You may not copy, modify, sublicense, or distribute the
Program or any Derivative Works except as expressly provided under
this License. Any attempt otherwise to copy, modify, sublicense or
distribute the Program or any Derivative Works is void, and will
automatically terminate your rights under this License. However,
parties who have received copies, or rights, from you under this
License will not have their licenses terminated so long as such
parties remain in full compliance.
4. MISCELLANEOUS
4.1 Acceptance of this License is voluntary. By using, modifying or
distributing the Program or any Derivative Work, you indicate your
acceptance of this License to do so, and all its terms and conditions
for copying, distributing or modifying the Program or works based on
it. Nothing else grants you permission to modify or distribute the
Program or Derivative Works and doing so without acceptance of this
License is in violation of the U.S. and international copyright laws.
4.2 If the distribution and/or use of the Program or Derivative Works
is restricted in certain countries either by patents or by copyrighted
interfaces, the original copyright holder who places the Program under
this License may add an explicit geographical distribution limitation
excluding those countries, so that distribution is permitted only in
or among countries not thus excluded. In such case, this License
incorporates the limitation as if written in the body of this License.
4.3 This License is to be construed according to the laws of the
State of California and you consent to personal jurisdiction in the
State of California in the event it is necessary to enforce the
provisions of this License.
5. NO WARRANTIES
5.1 TO THE EXTENT PERMITTED BY APPLICABLE LAW, THERE IS NO WARRANTY
FOR THE PROGRAM. OR DERIVATIVE WORKS THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE PROGRAM AND ANY DERIVATIVE WORKS"AS IS"
WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY
AND PERFORMANCE OF THE PROGRAM AND ANY DERIVATIVE WORK IS WITH YOU.
SHOULD THE PROGRAM OR ANY DERIVATIVE WORK PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
5.2 IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW WILL 3DFX
INTERACTIVE, INC., OR ANY OTHER COPYRIGHT HOLDER, OR ANY OTHER PARTY
WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM OR DERIVATIVE WORKS AS
PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL,
SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR
INABILITY TO USE THE PROGRAM OR DERIVATIVE WORKS (INCLUDING BUT NOT
LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES
SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM OR
DERIVATIVE WORKS TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH
HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.

5
README Normal file
View File

@@ -0,0 +1,5 @@
This is the source code to 3Dfx Glide for Voodoo graphics accelerators.
It's forked from the original CVS repo of Glide open source project at
sourceforge: https://sourceforge.net/projects/glide/
Source is licensed under 3DFX GLIDE Source Code General Public License.

View File

@@ -1,8 +1,10 @@
/* /*
* CPU detection code * CPU detection code
* *
* $Header$ *
* $Log$ * Revision 1.1.2.2 2006/09/02 03:12:29 guillemj
* Backport glide3 fix for PIC compilation with gcc 4.1 from Hans de Goede.
*
* Revision 1.1.2.1 2004/12/12 15:16:02 koolsmoky * Revision 1.1.2.1 2004/12/12 15:16:02 koolsmoky
* new cpuid * new cpuid
* *
@@ -32,14 +34,17 @@
* *
*/ */
#include <signal.h> #include <signal.h>
#include <setjmp.h> #include <setjmp.h>
#include <string.h> #include <string.h>
#include "cpuid.h" #include "cpuid.h"
typedef unsigned long word32; #if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ > 3)))
typedef unsigned int __attribute__((__may_alias__)) word32;
#else
typedef unsigned int word32;
#endif
/* These are the bit flags that get set on calling cpuid /* These are the bit flags that get set on calling cpuid
* with register eax set to 1 * with register eax set to 1

View File

@@ -129,6 +129,10 @@ main (int argc, char **argv)
OFFSET (gc, cmdTransportInfo.fifoLfbP, "fifoLfbP"); OFFSET (gc, cmdTransportInfo.fifoLfbP, "fifoLfbP");
OFFSET (gc, cmdTransportInfo.lfbLockCount, "lfbLockCount"); OFFSET (gc, cmdTransportInfo.lfbLockCount, "lfbLockCount");
#if GLIDE_DISPATCH_SETUP
OFFSET (gc,curArchProcs.triSetupProc,"kTriProcOffset\t\t");
#endif
SIZEOF (gr.GCs[0].state,"GrState\t"); SIZEOF (gr.GCs[0].state,"GrState\t");
SIZEOF (gr.hwConfig,"GrHwConfiguration"); SIZEOF (gr.hwConfig,"GrHwConfiguration");
SIZEOF (gr.GCs[0],"GC\t"); SIZEOF (gr.GCs[0],"GC\t");

View File

@@ -17,8 +17,10 @@
** **
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED ** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
** **
** $Header$ ** Revision 1.4.2.4 2005/04/25 23:53:59 koolsmoky
** $Log$ ** Fix grDrawTriangle calling convention for Linux.
** Thanks to Ozkan Sezer <sezeroz@gmail.com>.
**
** Revision 1.4.2.3 2005/04/23 18:27:26 koolsmoky ** Revision 1.4.2.3 2005/04/23 18:27:26 koolsmoky
** fixed grDrawTriangle triangle dispatch code ** fixed grDrawTriangle triangle dispatch code
** **
@@ -648,7 +650,8 @@ all_done: /* come here on degenerate lines */
/*--------------------------------------------------------------------------- /*---------------------------------------------------------------------------
** grDrawTriangle ** grDrawTriangle
*/ */
#if (GLIDE_PLATFORM & GLIDE_OS_WIN32) && !GLIDE_USE_C_TRISETUP && !defined(GLIDE_DEBUG) #ifndef HAVE_XDRAWTRI_ASM /* grDrawTriangle() not in asm */
#if defined(_MSC_VER) && !GLIDE_USE_C_TRISETUP && !defined(GLIDE_DEBUG)
__declspec(naked) __declspec(naked)
#endif #endif
GR_ENTRY(grDrawTriangle, void, (const GrVertex *a, const GrVertex *b, const GrVertex *c)) GR_ENTRY(grDrawTriangle, void, (const GrVertex *a, const GrVertex *b, const GrVertex *c))
@@ -692,8 +695,8 @@ GR_ENTRY(grDrawTriangle, void, (const GrVertex *a, const GrVertex *b, const GrVe
all_done: all_done:
GR_END(); GR_END();
#else
#if defined(__MSC__) #elif defined(_MSC_VER)
{ {
__asm { __asm {
mov edx, [_GlideRoot + kCurGCOffset]; mov edx, [_GlideRoot + kCurGCOffset];
@@ -701,59 +704,13 @@ all_done:
jmp eax; jmp eax;
} }
} }
#endif
#if defined( __linux__ )
/* Here's the basic strategy for this dispatch code: #else
* We jump to _GlideRoot.curGC->archDispatchProcs.triSetupProc #error "Write triangle proc dispatch for this compiler"
* which contains code that looks like a function, we leave the
* paramters passed to grDrawTriangle on the stack and the dispatched
* function picks them up. However we have to compensate for
* the compiler pushing anything on the stack. The following describes
* why and when we have to pop.
*
* BIG_OPT: gcc pushes a frame pointer to maintain things, BIG_OPT
* turns on -fomit-frame-pointer so we don't have to pop it.
*
* PIC: When using position independant code gcc stores eip in ebx
* so it saves ebx from the previous call automatically.
* Therefore, once we have the jump address we have to pop ebx
* to restore the stack.
*
* The syntax is further complicated by the fact that gcc can (and will)
* emit code between the asm statements, so they all need to be in a single
* asm statement, wrapped with #ifdef's. This means we have fun with
* deciding if we need to list trashed registers and when we need commas
* between them.
*/
asm (
#if defined(PIC)
"popl %%ebx\n\t"
#endif
#if !defined(BIG_OPT)
"popl %%ebp\n\t"
#endif
"jmp *%0"
: /* no outputs */
: "m" (_GlideRoot.curGC->curArchProcs.triSetupProc)
#if defined (PIC) || !defined (BIG_OPT)
:
#endif
#if defined (PIC)
"ebx"
#endif
#if defined (PIC) && !defined (BIG_OPT)
,
#endif
#if !defined(BIG_OPT)
"ebp"
#endif
);
#endif
#endif #endif
#undef FN_NAME #undef FN_NAME
} /* grDrawTriangle */ } /* grDrawTriangle */
#endif /* HAVE_XDRAWTRI_ASM */
/*--------------------------------------------------------------------------- /*---------------------------------------------------------------------------
** grDrawPlanarPolygon ** grDrawPlanarPolygon

View File

@@ -86,7 +86,7 @@ CDEFS = -DINIT_LINUX -D__3Dfx_PCI_CFG__
LDLIBS = -lm LDLIBS = -lm
# general # general
CDEFS += -DGLIDE_HW_TRI_SETUP=1 -DGLIDE_PACKED_RGB=1 -DGLIDE_TRI_CULLING=1 -DGLIDE_DEFAULT_GAMMA=1.3f -DGLIDE_LIB=1 CDEFS += -DGLIDE_HW_TRI_SETUP=1 -DGLIDE_PACKED_RGB=0 -DGLIDE_TRI_CULLING=1 -DGLIDE_DEFAULT_GAMMA=1.3f -DGLIDE_LIB=1
#CDEFS += -DGLIDE3 -DGLIDE3_ALPHA -DGLIDE3_SCALER #CDEFS += -DGLIDE3 -DGLIDE3_ALPHA -DGLIDE3_SCALER
# special sli buffer clears # special sli buffer clears
@@ -110,6 +110,8 @@ override USE_FIFO = 1
ifeq ($(USE_X86),1) ifeq ($(USE_X86),1)
CDEFS += -DGLIDE_DISPATCH_SETUP=1 -DGLIDE_DISPATCH_DOWNLOAD=1 CDEFS += -DGLIDE_DISPATCH_SETUP=1 -DGLIDE_DISPATCH_DOWNLOAD=1
override USE_FIFO = 1 override USE_FIFO = 1
CDEFS += -DHAVE_XDRAWTRI_ASM=1
override USE_DRAWTRI_ASM = 1
else else
CDEFS += -DGLIDE_USE_C_TRISETUP=1 CDEFS += -DGLIDE_USE_C_TRISETUP=1
endif endif
@@ -151,11 +153,12 @@ override USE_X86 = 1
endif endif
ifeq ($(USE_X86),1) ifeq ($(USE_X86),1)
CFLAGS += -DGL_X86 CFLAGS += -DGL_X86 -DBIG_OPT
OPTFLAGS ?= -O2 -ffast-math OPTFLAGS ?= -O6 -march=pentium2 -mtune=pentium3 -fomit-frame-pointer -funroll-loops \
-fexpensive-optimizations -ffast-math -Wno-unused
else else
CFLAGS += -DGLIDE_USE_C_TRISETUP CFLAGS += -DGLIDE_USE_C_TRISETUP
OPTFLAGS ?= -O2 -ffast-math OPTFLAGS ?= -O6 -march=pentium2 -mtune=pentium3 -ffast-math -Wno-unused
endif endif
# optflags # optflags
@@ -193,6 +196,9 @@ GLIDE_OBJECTS = \
fpu.o \ fpu.o \
xtexdl_def.o xtexdl_def.o
ifeq ($(USE_DRAWTRI_ASM),1)
GLIDE_OBJECTS += xdrawtri.o
endif
ifeq ($(USE_X86),1) ifeq ($(USE_X86),1)
GLIDE_OBJECTS += \ GLIDE_OBJECTS += \
xdraw2_def.o xdraw2_def.o
@@ -283,6 +289,8 @@ xdraw2_3dnow.o: xdraw2.asm
$(AS) -o $@ $(ASFLAGS) -DGL_AMD3D=1 $< $(AS) -o $@ $(ASFLAGS) -DGL_AMD3D=1 $<
xtexdl_3dnow.o: xtexdl.asm xtexdl_3dnow.o: xtexdl.asm
$(AS) -o $@ $(ASFLAGS) -DGL_AMD3D=1 $< $(AS) -o $@ $(ASFLAGS) -DGL_AMD3D=1 $<
xdrawtri.o: xdrawtri.asm
$(AS) -o $@ $(ASFLAGS) $<
#cpuid.lo: cpuid.o #cpuid.lo: cpuid.o
# $(CP) $< $@ # $(CP) $< $@
@@ -296,6 +304,8 @@ xdraw2_3dnow.lo: xdraw2_3dnow.o
$(CP) $< $@ $(CP) $< $@
xtexdl_3dnow.lo: xtexdl_3dnow.o xtexdl_3dnow.lo: xtexdl_3dnow.o
$(CP) $< $@ $(CP) $< $@
xdrawtri.lo: xdrawtri.o
$(CP) $< $@
$(GLIDE_OBJECTS): fxinline.h fxgasm.h $(GLIDE_OBJECTS): fxinline.h fxgasm.h

View File

@@ -1,10 +1,10 @@
#include "fxbldno.h" /*#include "fxbldno.h"*/
#define MANVERSION 2 #define MANVERSION 2
#define MANREVISION 56 #define MANREVISION 56
//#define BUILD_NUMBER 40405 #define BUILD_NUMBER 40405
#ifndef GLIDE3 #ifndef GLIDE3
#define VERSIONSTR "2.56\0" #define VERSIONSTR "2.56\0"

View File

@@ -131,8 +131,8 @@
push tempVal ; fifo space required push tempVal ; fifo space required
call _FifoMakeRoom ; note: updates fifoPtr call _FifoMakeRoom ; note: updates fifoPtr
;add esp, 12 ; remove 3 DWORD arguments from stack add esp, 12 ; remove 3 DWORD arguments from stack
;nop ; filler nop ; filler
%ELSE ; !GLIDE_CULLING %ELSE ; !GLIDE_CULLING
;; Prologue stuff ;; Prologue stuff
@@ -158,8 +158,8 @@
push tempVal ; fifo space needed push tempVal ; fifo space needed
call _FifoMakeRoom ; note: updates fifoPtr call _FifoMakeRoom ; note: updates fifoPtr
;add esp, 12 ; remove 3 DWORD arguments from stack add esp, 12 ; remove 3 DWORD arguments from stack
;nop ; filler nop ; filler
%ENDIF ; GLIDE_CULLING %ENDIF ; GLIDE_CULLING
@@ -1015,7 +1015,7 @@
push eax push eax
call _FifoMakeRoom call _FifoMakeRoom
;add esp, 12 add esp, 12
;; Send triangle parameters ;; Send triangle parameters

View File

@@ -0,0 +1,46 @@
;; THIS SOFTWARE IS SUBJECT TO COPYRIGHT PROTECTION AND IS OFFERED ONLY
;; PURSUANT TO THE 3DFX GLIDE GENERAL PUBLIC LICENSE. THERE IS NO RIGHT
;; TO USE THE GLIDE TRADEMARK WITHOUT PRIOR WRITTEN PERMISSION OF 3DFX
;; INTERACTIVE, INC. A COPY OF THIS LICENSE MAY BE OBTAINED FROM THE
;; DISTRIBUTOR OR BY CONTACTING 3DFX INTERACTIVE INC(info@3dfx.com).
;; THIS PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
;; EXPRESSED OR IMPLIED. SEE THE 3DFX GLIDE GENERAL PUBLIC LICENSE FOR A
;; FULL TEXT OF THE NON-WARRANTY PROVISIONS.
;;
;; 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.
;;
;; COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
;; Adapted from gdraw.c:grDrawTriangle() for nasm
%include "xos.inc"
%include "fxgasm.h"
extrn _GlideRoot
segment SEG_TEXT
align 16
proc grDrawTriangle, 12
;;mov edx, dword [_GlideRoot+curGC]
;;mov eax, dword [edx+kTriProcOffset]
mov eax, dword [_GlideRoot+curGC]
jmp [eax + kTriProcOffset]
endp
align 16
%if XOS == XOS_WIN32
%ifdef __MINGW32__
; GNU LD fails with '_' prefix
export grDrawTriangle@12
%else
export _grDrawTriangle@12
%endif
%endif ; _WIN32

View File

@@ -88,7 +88,7 @@ extrn _FifoMakeRoom, 12
push %2 push %2
push %1 push %1
call _FifoMakeRoom call _FifoMakeRoom
;add esp, 12 add esp, 12
%ENDMACRO ; _grCommandTransportMakeRoom %ENDMACRO ; _grCommandTransportMakeRoom
;;; Definitions of cvg regs and glide root structures. ;;; Definitions of cvg regs and glide root structures.
@@ -166,7 +166,7 @@ proc _grTexDownload_MMX, 24
femms ; we'll use MMX/3DNow!, make sure FPU register cleared femms ; we'll use MMX/3DNow!, make sure FPU register cleared
%ENDIF %ENDIF
%IFDEF GL_MMX %IFDEF GL_MMX
; emms ; we'll use MMX emms ; we'll use MMX
%ENDIF %ENDIF
movd mm3, [esp + _baseAddr$] ; 0 | address of texture to download movd mm3, [esp + _baseAddr$] ; 0 | address of texture to download

1327
glide2x/h3/cinit/h3cinit.c Normal file

File diff suppressed because it is too large Load Diff

132
glide2x/h3/cinit/h3cinit.h Normal file
View File

@@ -0,0 +1,132 @@
/*
** THIS SOFTWARE IS SUBJECT TO COPYRIGHT PROTECTION AND IS OFFERED ONLY
** PURSUANT TO THE 3DFX GLIDE GENERAL PUBLIC LICENSE. THERE IS NO RIGHT
** TO USE THE GLIDE TRADEMARK WITHOUT PRIOR WRITTEN PERMISSION OF 3DFX
** INTERACTIVE, INC. A COPY OF THIS LICENSE MAY BE OBTAINED FROM THE
** DISTRIBUTOR OR BY CONTACTING 3DFX INTERACTIVE INC(info@3dfx.com).
** THIS PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
** EXPRESSED OR IMPLIED. SEE THE 3DFX GLIDE GENERAL PUBLIC LICENSE FOR A
** FULL TEXT OF THE NON-WARRANTY PROVISIONS.
**
** 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.
**
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
*/
#ifndef __H3CINIT_H__
#define __H3CINIT_H__
#include <3dfx.h>
#define H3_GRXCLK_SPEED 100
#define H4_GRXCLK_SPEED 143
#define H4_OEM_GRXCLK_SPEED 141
#define H4_BRINGUP_GRXCLK_SPEED 100
#ifdef H4
#define DEFAULT_GRXCLK_SPEED H4_BRINGUP_GRXCLK_SPEED
#else
#define DEFAULT_GRXCLK_SPEED H3_GRXCLK_SPEED
#endif
FxU32 // return # of MB of memory
h3InitGetMemSize(FxU32 regBase); // init register base
FxU32 // return # of MB of memory
h3InitSgram(FxU32 regBase, // init iegister base
FxU32 sgramMode,
FxU32 sgramMask,
FxU32 sgramColor,
char *vendorName); // NULL or name of SGRAM vendor
void
h3InitPlls(FxU32 regBase, // init iegister base
FxU32 grxSpeedInMHz, // desired GRX clock frequency (MHz)
FxU32 memSpeedInMHz); // desired MEM clock frequency (MHz)
void
h4InitPlls(FxU32 regBase, // init register base
FxU32 deviceID, // H4 or H4_OEM
FxU32 grxSpeedInMHz); // desired clock frequency (MHz)
void
h3InitVga(
FxU32 regBase, // memory base address
FxU32 legacyDecode); // 1=enable VGA decode, 0=disable
void
h3InitVideoProc(
FxU32 regBase, // memory base address
FxU32 vidProcCfg); // vidProcCfg register control bits
FxBool
h3InitSetVideoMode(
FxU32 regBase, // memory base address
FxU32 xRes, // x resolution
FxU32 yRes, // y resolution
FxU32 refresh, // refresh freq
#if defined(H3VDD) && defined(H3_B0)
FxU32 loadClut, // really a bool, should we load the lookup table
FxU32 scanlinedouble); // set scanline double bit and double y?
#else
FxU32 loadClut) ; // initialize clut entries?
#endif
void
h3InitVideoDesktopSurface(
FxU32 regBase,
FxU32 enable, // 1=enable desktop surface (DS), 1=disable
FxU32 tiled, // 0=DS linear, 1=tiled
FxU32 pixFmt, // pixel format of DS
FxU32 clutBypass, // bypass clut for DS?
FxU32 clutSelect, // 0=lower 256 CLUT entries, 1=upper 256
FxU32 startAddress, // board address of beginning of DS
FxU32 stride); // distance between scanlines of the DS, in
// units of bytes for linear DS's and tiles for
// tiled DS's
void
h3InitVideoOverlaySurface(
FxU32 regBase,
FxU32 enable, // 1=enable Overlay surface (OS), 1=disable
FxU32 stereo, // 1=enable OS stereo, 0=disable
FxU32 horizScaling, // 1=enable horizontal scaling, 0=disable
FxU32 dudx, // horizontal scale factor (ignored if not
// scaling)
FxU32 verticalScaling, // 1=enable vertical scaling, 0=disable
FxU32 dvdy, // vertical scale factor (ignored if not
// scaling)
FxU32 filterMode, // duh
FxU32 tiled, // 0=OS linear, 1=tiled
FxU32 pixFmt, // pixel format of OS
FxU32 clutBypass, // bypass clut for OS?
FxU32 clutSelect, // 0=lower 256 CLUT entries, 1=upper 256
FxU32 startAddress, // board address of beginning of OS
FxU32 stride); // distance between scanlines of the OS, in
// units of bytes for linear OS's and tiles for
// tiled OS's
#ifndef H3VDD
void
h3InitMeasureSiProcess(
FxU32 regBase); // init register base
#endif // #ifndef H3VDD
void
h3InitBlockWrite(
FxU32 regBase,
FxU32 enable, // 1=enable block writes, 0=disable
FxU32 threshhold); // block write threshhold
void
h3InitResetAll(
FxU32 regBase); // init register base
#endif /* __H3CINIT_H__ */

View File

@@ -0,0 +1,85 @@
/*
** THIS SOFTWARE IS SUBJECT TO COPYRIGHT PROTECTION AND IS OFFERED ONLY
** PURSUANT TO THE 3DFX GLIDE GENERAL PUBLIC LICENSE. THERE IS NO RIGHT
** TO USE THE GLIDE TRADEMARK WITHOUT PRIOR WRITTEN PERMISSION OF 3DFX
** INTERACTIVE, INC. A COPY OF THIS LICENSE MAY BE OBTAINED FROM THE
** DISTRIBUTOR OR BY CONTACTING 3DFX INTERACTIVE INC(info@3dfx.com).
** THIS PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
** EXPRESSED OR IMPLIED. SEE THE 3DFX GLIDE GENERAL PUBLIC LICENSE FOR A
** FULL TEXT OF THE NON-WARRANTY PROVISIONS.
**
** 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.
**
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
*/
#include <stddef.h>
#ifdef __DJGPP__
#include <fxdpmi.h>
#endif
#if defined(__WATCOMC__)
#include <conio.h>
#define _inp inp
#define _outp outp
#define _inpw inpw
#define _outpw outpw
#define _inpd inpd
#define _outpd outpd
#endif
#ifdef __linux__
#define _inp pioInByte
#define _outp pioOutByte
#define _inpw pioInWord
#define _outpw pioOutWord
#define _inpd pioInLong
#define _outpd pioOutLong
#endif
#define SSTIOADDR(regName) ((FxU16)offsetof(SstIORegs, regName))
#define ISET32(addr, value) _outpd((FxU16) ((FxU16) regBase + (FxU16) (SSTIOADDR(addr))), value)
#define IGET32(addr) _inpd((FxU16) ((FxU16) regBase + (FxU16) (SSTIOADDR(addr))))
#define ISET8PHYS(a,b) {\
FxU16 port = (FxU16) (regBase) + (FxU16) (a);\
GDBG_INFO(120, "OUT8: Port 0x%x Value 0x%x\n", port, b);\
_outp(port, (FxU8) (b));}
#define ISET16PHYS(a,b) {\
FxU16 port = (FxU16)(regBase) + (FxU16)(a);\
GDBG_INFO(120, "OUT16: Port 0x%x Value 0x%x\n", port, b);\
_outpw(port, (FxU16) (b));}
#define IGET8PHYS(a) _inp((FxU16) ((FxU16) (regBase) + (FxU16) (a)))
#define IGET16PHYS(a) _inpw((FxU16) ((FxU16) (regBase) + (FxU16)(a)))
#define CHECKFORROOM while (! (_inp((FxU16) regBase) & (FxU16)(0x3f)))
#define MESSAGE GDBG_PRINTF
#ifdef OLD
#define ISET32(a,b)\
GDBG_INFO(120, "SET32: Register 0x%x Value 0x%x\n", (FxU32) (&((SstIORegs *)regBase)->a) - (FxU32) regBase, b); \
((FxU32) (((SstIORegs *) regBase)->a)) = (FxU32) b
#define IGET32(a) ((FxU32) (((SstIORegs *) regBase)->a))
#endif /* #ifdef OLD */

257
glide2x/h3/cinit/h4oempll.h Normal file
View File

@@ -0,0 +1,257 @@
/*
** Copyright (c) 1995-1999, 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.
**
** File name: h4oempll.h
**
** Description: Avenger OEM PLL table and values.
**
** $History: h4oempll.h $
**
** ***************** Version 2 *****************
** User: Michael Date: 1/08/99 Time: 1:50p
** Updated in $/devel/h3/Win95/dx/minivdd
** Implement the 3Dfx/STB unified header.
**
** ***************** Version 1 *****************
** User: Andrew Date: 12/20/98 Time: 11:10a
** Created in $/devel/h3/Win95/dx/minivdd
** H4 OEM Pll Table
**
** ***************** Version 5 *****************
** User: Pault Date: 11/05/98 Time: 2:07p
** Updated in $/devel/h4/cinit
** The table now goes up to 220 MHz for Avenger. Also, all of the entries
** up through 141 MHz have the M factor set at 24 so the entries can be
** used with Avenger OEM.
**
** ***************** Version 3 *****************
** User: Artg Date: 8/27/98 Time: 11:08a
** Updated in $/devel/h3/Win95/dx/minivdd
** added guard ifdef for redundant plltable define.
**
** ***************** Version 2 *****************
** User: Ken Date: 4/15/98 Time: 6:42p
** Updated in $/devel/h3/win95/dx/minivdd
** added unified header to all files, with revision, etc. info in it
**
*/
//
// generated by gen_plltable.pl at Thu Nov 5 12:38:23 1998
//
#define MIN_PLL_FREQ 30
#define MAX_PLL_FREQ 120
#define MAX_H4_OEM_PLL_FREQ 141
#define MAX_H4_PLL_FREQ 220
FxU32 _h4oempllTable[] = {
// pllCtrl n m k actual(MHz)
// ------- --- --- --- -----------
0x00003460, // 52 24 0 29.737758
0x00003660, // 54 24 0 30.839157
0x00003860, // 56 24 0 31.940555
0x00003A60, // 58 24 0 33.041954
0x00003C60, // 60 24 0 34.143352
0x00003E60, // 62 24 0 35.244751
0x00003F60, // 63 24 0 35.795450
0x00004160, // 65 24 0 36.896848
0x00004360, // 67 24 0 37.998247
0x00004560, // 69 24 0 39.099645
0x00004760, // 71 24 0 40.201044
0x00004860, // 72 24 0 40.751743
0x00004A60, // 74 24 0 41.853142
0x00004C60, // 76 24 0 42.954540
0x00004E60, // 78 24 0 44.055938
0x00005060, // 80 24 0 45.157337
0x00005260, // 82 24 0 46.258735
0x00005360, // 83 24 0 46.809435
0x00005560, // 85 24 0 47.910833
0x00005760, // 87 24 0 49.012232
0x00005960, // 89 24 0 50.113630
0x00005B60, // 91 24 0 51.215028
0x00005C60, // 92 24 0 51.765728
0x00005E60, // 94 24 0 52.867126
0x00006060, // 96 24 0 53.968525
0x00006260, // 98 24 0 55.069923
0x00006460, // 100 24 0 56.171322
0x00006660, // 102 24 0 57.272720
0x00006760, // 103 24 0 57.823419
0x00006960, // 105 24 0 58.924818
0x00006B60, // 107 24 0 60.026216
0x00006D60, // 109 24 0 61.127615
0x00006F60, // 111 24 0 62.229013
0x00007060, // 112 24 0 62.779712
0x00007260, // 114 24 0 63.881111
0x00007460, // 116 24 0 64.982509
0x00007660, // 118 24 0 66.083908
0x00007860, // 120 24 0 67.185306
0x00007960, // 121 24 0 67.736005
0x00007B60, // 123 24 0 68.837404
0x00007D60, // 125 24 0 69.938802
0x00007F60, // 127 24 0 71.040201
0x00008160, // 129 24 0 72.141599
0x00008360, // 131 24 0 73.242998
0x00008460, // 132 24 0 73.793697
0x00008660, // 134 24 0 74.895095
0x00008860, // 136 24 0 75.996494
0x00008A60, // 138 24 0 77.097892
0x00008C60, // 140 24 0 78.199291
0x00008D60, // 141 24 0 78.749990
0x00008F60, // 143 24 0 79.851388
0x00009160, // 145 24 0 80.952787
0x00009360, // 147 24 0 82.054185
0x00009560, // 149 24 0 83.155584
0x00009760, // 151 24 0 84.256982
0x00009860, // 152 24 0 84.807682
0x00009A60, // 154 24 0 85.909080
0x00009C60, // 156 24 0 87.010478
0x00009E60, // 158 24 0 88.111877
0x0000A060, // 160 24 0 89.213275
0x0000A160, // 161 24 0 89.763975
0x0000A360, // 163 24 0 90.865373
0x0000A560, // 165 24 0 91.966772
0x0000A760, // 167 24 0 93.068170
0x0000A960, // 169 24 0 94.169568
0x0000AB60, // 171 24 0 95.270967
0x0000AC60, // 172 24 0 95.821666
0x0000AE60, // 174 24 0 96.923065
0x0000B060, // 176 24 0 98.024463
0x0000B260, // 178 24 0 99.125862
0x0000B460, // 180 24 0 100.227260
0x0000B560, // 181 24 0 100.777959
0x0000B760, // 183 24 0 101.879358
0x0000B960, // 185 24 0 102.980756
0x0000BB60, // 187 24 0 104.082155
0x0000BD60, // 189 24 0 105.183553
0x0000BE60, // 190 24 0 105.734252
0x0000C060, // 192 24 0 106.835651
0x0000C260, // 194 24 0 107.937049
0x0000C460, // 196 24 0 109.038448
0x0000C660, // 198 24 0 110.139846
0x0000C860, // 200 24 0 111.241245
0x0000C960, // 201 24 0 111.791944
0x0000CB60, // 203 24 0 112.893342
0x0000CD60, // 205 24 0 113.994741
0x0000CF60, // 207 24 0 115.096139
0x0000D160, // 209 24 0 116.197538
0x0000D260, // 210 24 0 116.748237
0x0000D460, // 212 24 0 117.849635
0x0000D660, // 214 24 0 118.951034
0x0000D860, // 216 24 0 120.052432
0x0000DA60, // 218 24 0 121.153831
0x0000DC60, // 220 24 0 122.255229
0x0000DD60, // 221 24 0 122.805928
0x0000DF60, // 223 24 0 123.907327
0x0000E160, // 225 24 0 125.008725
0x0000E360, // 227 24 0 126.110124
0x0000E560, // 229 24 0 127.211522
0x0000E660, // 230 24 0 127.762222
0x0000E860, // 232 24 0 128.863620
0x0000EA60, // 234 24 0 129.965018
0x0000EC60, // 236 24 0 131.066417
0x0000EE60, // 238 24 0 132.167815
0x0000F060, // 240 24 0 133.269214
0x0000F160, // 241 24 0 133.819913
0x0000F360, // 243 24 0 134.921312
0x0000F560, // 245 24 0 136.022710
0x0000F760, // 247 24 0 137.124108
0x0000F960, // 249 24 0 138.225507
0x0000FA60, // 250 24 0 138.776206
0x0000FC60, // 252 24 0 139.877605
0x0000FE60, // 254 24 0 140.979003
0x00007528, // 117 10 0 141.988618
0x00001200, // 18 0 0 143.181800
0x0000B340, // 179 16 0 143.977254
0x00004F18, // 79 6 0 144.971573
0x0000310C, // 49 3 0 146.045436
0x00009834, // 152 13 0 146.999981
0x00001D04, // 29 1 0 147.954527
0x0000E350, // 227 20 0 149.039237
0x0000DA4C, // 218 19 0 149.999981
0x00007224, // 114 9 0 150.991716
0x0000882C, // 136 11 0 151.992988
0x0000C944, // 201 17 0 152.978449
0x00002908, // 41 2 0 153.920435
0x0000F754, // 247 21 0 155.009862
0x0000CD44, // 205 17 0 155.992803
0x0000FA54, // 250 21 0 156.877450
0x0000FC54, // 252 21 0 158.122510
0x0000D144, // 209 17 0 159.007157
0x0000BC3C, // 188 15 0 160.026718
0x00002B08, // 43 2 0 161.079525
0x0000D544, // 213 17 0 162.021511
0x0000922C, // 146 11 0 163.006972
0x00007C24, // 124 9 0 164.008244
0x0000F04C, // 240 19 0 164.999979
0x0000FD50, // 253 20 0 165.960723
0x00002104, // 33 1 0 167.045433
0x0000AE34, // 174 13 0 167.999979
0x0000390C, // 57 3 0 168.954524
0x00005D18, // 93 6 0 170.028388
0x0000D540, // 213 16 0 171.022706
0x00001600, // 22 0 0 171.818160
0x00008F28, // 143 10 0 173.011342
0x00009C2C, // 156 11 0 174.020957
0x00006C1C, // 108 7 0 174.999978
0x0000CF3C, // 207 15 0 176.029389
0x00008624, // 134 9 0 177.024771
0x00005514, // 85 5 0 177.954523
0x00001700, // 23 0 0 178.977250
0x00005614, // 86 5 0 179.999977
0x0000AF30, // 175 12 0 181.022704
0x00005714, // 87 5 0 182.045431
0x0000711C, // 113 7 0 182.954522
0x0000A52C, // 165 11 0 183.933543
0x0000A62C, // 166 11 0 185.034942
0x00001800, // 24 0 0 186.136340
0x0000DC3C, // 220 15 0 186.978586
0x0000C334, // 195 13 0 188.045431
0x0000400C, // 64 3 0 188.999976
0x00009024, // 144 9 0 190.041298
0x00002604, // 38 1 0 190.909067
0x0000E23C, // 226 15 0 192.032061
0x0000FE44, // 254 17 0 192.918636
0x00009324, // 147 9 0 193.946256
0x0000AF2C, // 175 11 0 194.947528
0x0000D938, // 217 14 0 195.980089
0x0000E83C, // 232 15 0 197.085536
0x00005110, // 81 4 0 198.068157
0x00008920, // 137 8 0 199.022702
0x0000F940, // 249 16 0 199.659066
0x0000FB40, // 251 16 0 201.249974
0x00007D1C, // 125 7 0 202.045429
0x0000EF3C, // 239 15 0 202.981258
0x00003708, // 55 2 0 204.034065
0x0000E338, // 227 14 0 204.928951
0x0000B92C, // 185 11 0 205.961512
0x00009D24, // 157 9 0 206.962784
0x0000F53C, // 245 15 0 208.034733
0x0000470C, // 71 3 0 209.045428
0x00002A04, // 42 1 0 209.999973
0x0000DB34, // 219 13 0 210.954519
0x0000EB38, // 235 14 0 212.088041
0x00007518, // 117 6 0 212.982927
0x0000FC3C, // 252 15 0 213.930454
0x00001C00, // 28 0 0 214.772700
0x0000B328, // 179 10 0 215.965882
0x0000C32C, // 195 11 0 216.975497
0x0000871C, // 135 7 0 217.954518
0x00009720, // 151 8 0 219.068154
0x0000A724, // 167 9 0 219.979311
};
FxU32 *h4oempllTable = (FxU32*) (_h4oempllTable - MIN_PLL_FREQ);

277
glide2x/h3/cinit/h4pll.h Normal file
View File

@@ -0,0 +1,277 @@
/*
** Copyright (c) 1995-1999, 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.
**
** File name: h4pll.h
**
** Description: Avenger PLL table and values.
**
** $History: h4pll.h $
**
** ***************** Version 2 *****************
** User: Michael Date: 1/08/99 Time: 1:51p
** Updated in $/devel/h3/Win95/dx/minivdd
** Implement the 3Dfx/STB unified header.
**
** ***************** Version 1 *****************
** User: Andrew Date: 11/18/98 Time: 12:27p
** Created in $/devel/h3/Win95/dx/minivdd
** Pll Table for Avenger
**
** ***************** Version 8 *****************
** User: Pault Date: 11/16/98 Time: 3:30p
** Updated in $/devel/h4/cinit
** This version of the table has m=k=1 and is based on the same
** calculations we have been using in the lab. This will not work for
** AvengerOEM.
**
** ***************** Version 7 *****************
** User: Pault Date: 11/15/98 Time: 4:17p
** Updated in $/devel/h4/cinit
** Added missing pllTable definition at the bottom of the file.
**
** ***************** Version 6 *****************
** User: Pault Date: 11/15/98 Time: 2:00p
** Updated in $/devel/h4/cinit
** Temporary table to work with Avenger. This table has k=1. But m values
** are not wedged to 24 below 141 MHz, so this table with not work with
** AvengerOEM.
**
** ***************** Version 5 *****************
** User: Pault Date: 11/05/98 Time: 2:07p
** Updated in $/devel/h4/cinit
** The table now goes up to 220 MHz for Avenger. Also, all of the entries
** up through 141 MHz have the M factor set at 24 so the entries can be
** used with Avenger OEM.
**
** ***************** Version 3 *****************
** User: Artg Date: 8/27/98 Time: 11:08a
** Updated in $/devel/h3/Win95/dx/minivdd
** added guard ifdef for redundant plltable define.
**
** ***************** Version 2 *****************
** User: Ken Date: 4/15/98 Time: 6:42p
** Updated in $/devel/h3/win95/dx/minivdd
** added unified header to all files, with revision, etc. info in it
**
*/
//
// generated by gen_plltable_at.pl at Sun Nov 15 14:16:18 1998
//
#define MIN_PLL_FREQ 30
#define MAX_PLL_FREQ 120
#define MAX_H4_OEM_PLL_FREQ 141
#define MAX_H4_PLL_FREQ 220
FxU32 _h4pllTable[] = {
// pllCtrl n m k actual(MHz)
// ------- --- --- --- -----------
0x00000B05, // 11 1 1 31.022723
0x00000B05, // 11 1 1 31.022723
0x00000B05, // 11 1 1 31.022723
0x00000C05, // 12 1 1 33.409087
0x00000C05, // 12 1 1 33.409087
0x00000D05, // 13 1 1 35.795450
0x00000D05, // 13 1 1 35.795450
0x00000E05, // 14 1 1 38.181813
0x00000E05, // 14 1 1 38.181813
0x00000E05, // 14 1 1 38.181813
0x00000F05, // 15 1 1 40.568177
0x00000F05, // 15 1 1 40.568177
0x00001005, // 16 1 1 42.954540
0x00001005, // 16 1 1 42.954540
0x00001005, // 16 1 1 42.954540
0x00001105, // 17 1 1 45.340903
0x00001105, // 17 1 1 45.340903
0x00001205, // 18 1 1 47.727267
0x00001205, // 18 1 1 47.727267
0x00001305, // 19 1 1 50.113630
0x00001305, // 19 1 1 50.113630
0x00001305, // 19 1 1 50.113630
0x00001405, // 20 1 1 52.499993
0x00001405, // 20 1 1 52.499993
0x00001505, // 21 1 1 54.886357
0x00001505, // 21 1 1 54.886357
0x00001505, // 21 1 1 54.886357
0x00001605, // 22 1 1 57.272720
0x00001605, // 22 1 1 57.272720
0x00001705, // 23 1 1 59.659083
0x00001705, // 23 1 1 59.659083
0x00001805, // 24 1 1 62.045447
0x00001805, // 24 1 1 62.045447
0x00001805, // 24 1 1 62.045447
0x00001905, // 25 1 1 64.431810
0x00001905, // 25 1 1 64.431810
0x00001A05, // 26 1 1 66.818173
0x00001A05, // 26 1 1 66.818173
0x00001A05, // 26 1 1 66.818173
0x00001B05, // 27 1 1 69.204537
0x00001B05, // 27 1 1 69.204537
0x00001C05, // 28 1 1 71.590900
0x00001C05, // 28 1 1 71.590900
0x00001D05, // 29 1 1 73.977263
0x00001D05, // 29 1 1 73.977263
0x00001D05, // 29 1 1 73.977263
0x00001E05, // 30 1 1 76.363627
0x00001E05, // 30 1 1 76.363627
0x00001F05, // 31 1 1 78.749990
0x00001F05, // 31 1 1 78.749990
0x00002005, // 32 1 1 81.136353
0x00002005, // 32 1 1 81.136353
0x00002005, // 32 1 1 81.136353
0x00002105, // 33 1 1 83.522717
0x00002105, // 33 1 1 83.522717
0x00002205, // 34 1 1 85.909080
0x00002205, // 34 1 1 85.909080
0x00002205, // 34 1 1 85.909080
0x00002305, // 35 1 1 88.295443
0x00002305, // 35 1 1 88.295443
0x00002405, // 36 1 1 90.681807
0x00002405, // 36 1 1 90.681807
0x00002505, // 37 1 1 93.068170
0x00002505, // 37 1 1 93.068170
0x00002505, // 37 1 1 93.068170
0x00002605, // 38 1 1 95.454533
0x00002605, // 38 1 1 95.454533
0x00002705, // 39 1 1 97.840897
0x00002705, // 39 1 1 97.840897
0x00002705, // 39 1 1 97.840897
0x00002805, // 40 1 1 100.227260
0x00002805, // 40 1 1 100.227260
0x00002905, // 41 1 1 102.613623
0x00002905, // 41 1 1 102.613623
0x00002A05, // 42 1 1 104.999987
0x00002A05, // 42 1 1 104.999987
0x00002A05, // 42 1 1 104.999987
0x00002B05, // 43 1 1 107.386350
0x00002B05, // 43 1 1 107.386350
0x00002C05, // 44 1 1 109.772713
0x00002C05, // 44 1 1 109.772713
0x00002D05, // 45 1 1 112.159077
0x00002D05, // 45 1 1 112.159077
0x00002D05, // 45 1 1 112.159077
0x00002E05, // 46 1 1 114.545440
0x00002E05, // 46 1 1 114.545440
0x00002F05, // 47 1 1 116.931803
0x00002F05, // 47 1 1 116.931803
0x00002F05, // 47 1 1 116.931803
0x00003005, // 48 1 1 119.318167
0x00003005, // 48 1 1 119.318167
0x00003105, // 49 1 1 121.704530
0x00003105, // 49 1 1 121.704530
0x00003205, // 50 1 1 124.090893
0x00003205, // 50 1 1 124.090893
0x00003205, // 50 1 1 124.090893
0x00003305, // 51 1 1 126.477257
0x00003305, // 51 1 1 126.477257
0x00003405, // 52 1 1 128.863620
0x00003405, // 52 1 1 128.863620
0x00003405, // 52 1 1 128.863620
0x00003505, // 53 1 1 131.249983
0x00003505, // 53 1 1 131.249983
0x00003605, // 54 1 1 133.636347
0x00003605, // 54 1 1 133.636347
0x00003705, // 55 1 1 136.022710
0x00003705, // 55 1 1 136.022710
0x00003705, // 55 1 1 136.022710
0x00003805, // 56 1 1 138.409073
0x00003805, // 56 1 1 138.409073
0x00003905, // 57 1 1 140.795437
0x00003905, // 57 1 1 140.795437
0x00003A05, // 58 1 1 143.181800
0x00003A05, // 58 1 1 143.181800
0x00003A05, // 58 1 1 143.181800
0x00003B05, // 59 1 1 145.568163
0x00003B05, // 59 1 1 145.568163
0x00003C05, // 60 1 1 147.954527
0x00003C05, // 60 1 1 147.954527
0x00003C05, // 60 1 1 147.954527
0x00003D05, // 61 1 1 150.340890
0x00003D05, // 61 1 1 150.340890
0x00003E05, // 62 1 1 152.727253
0x00003E05, // 62 1 1 152.727253
0x00003F05, // 63 1 1 155.113617
0x00003F05, // 63 1 1 155.113617
0x00003F05, // 63 1 1 155.113617
0x00004005, // 64 1 1 157.499980
0x00004005, // 64 1 1 157.499980
0x00004105, // 65 1 1 159.886343
0x00004105, // 65 1 1 159.886343
0x00004105, // 65 1 1 159.886343
0x00004205, // 66 1 1 162.272707
0x00004205, // 66 1 1 162.272707
0x00004305, // 67 1 1 164.659070
0x00004305, // 67 1 1 164.659070
0x0000e721, // 68 1 1 166.81
0x0000e721, // 68 1 1 166.81
0x0000e721, // 68 1 1 166.81
0x00004505, // 69 1 1 169.431797
0x00004505, // 69 1 1 169.431797
0x00004605, // 70 1 1 171.818160
0x00004605, // 70 1 1 171.818160
0x00004605, // 70 1 1 171.818160
0x00004705, // 71 1 1 174.204523
0x00004705, // 71 1 1 174.204523
0x00004805, // 72 1 1 176.590887
0x00004805, // 72 1 1 176.590887
0x00004905, // 73 1 1 178.977250
0x00004905, // 73 1 1 178.977250
0x00004905, // 73 1 1 178.977250
0x00004A05, // 74 1 1 181.363613
0x00004A05, // 74 1 1 181.363613
0x00004B05, // 75 1 1 183.749977
0x00004B05, // 75 1 1 183.749977
0x00004C05, // 76 1 1 186.136340
0x00004C05, // 76 1 1 186.136340
0x00004C05, // 76 1 1 186.136340
0x00004D05, // 77 1 1 188.522703
0x00004D05, // 77 1 1 188.522703
0x00004E05, // 78 1 1 190.909067
0x00004E05, // 78 1 1 190.909067
0x00004E05, // 78 1 1 190.909067
0x00004F05, // 79 1 1 193.295430
0x00004F05, // 79 1 1 193.295430
0x00005005, // 80 1 1 195.681793
0x00005005, // 80 1 1 195.681793
0x00005105, // 81 1 1 198.068157
0x00005105, // 81 1 1 198.068157
0x00005105, // 81 1 1 198.068157
0x00005205, // 82 1 1 200.454520
0x00005205, // 82 1 1 200.454520
0x00005305, // 83 1 1 202.840883
0x00005305, // 83 1 1 202.840883
0x00005305, // 83 1 1 202.840883
0x00005405, // 84 1 1 205.227247
0x00005405, // 84 1 1 205.227247
0x00005505, // 85 1 1 207.613610
0x00005505, // 85 1 1 207.613610
0x00005605, // 86 1 1 209.999973
0x00005605, // 86 1 1 209.999973
0x00005605, // 86 1 1 209.999973
0x00005705, // 87 1 1 212.386337
0x00005705, // 87 1 1 212.386337
0x00005805, // 88 1 1 214.772700
0x00005805, // 88 1 1 214.772700
0x00005905, // 89 1 1 217.159063
0x00005905, // 89 1 1 217.159063
0x00005905, // 89 1 1 217.159063
0x00005A05, // 90 1 1 219.545427
0x00005A05, // 90 1 1 219.545427
};
FxU32 *h4pllTable = (FxU32*) (_h4pllTable - MIN_PLL_FREQ);

110
glide2x/h3/cinit/memtable.h Normal file
View File

@@ -0,0 +1,110 @@
/*
** THIS SOFTWARE IS SUBJECT TO COPYRIGHT PROTECTION AND IS OFFERED ONLY
** PURSUANT TO THE 3DFX GLIDE GENERAL PUBLIC LICENSE. THERE IS NO RIGHT
** TO USE THE GLIDE TRADEMARK WITHOUT PRIOR WRITTEN PERMISSION OF 3DFX
** INTERACTIVE, INC. A COPY OF THIS LICENSE MAY BE OBTAINED FROM THE
** DISTRIBUTOR OR BY CONTACTING 3DFX INTERACTIVE INC(info@3dfx.com).
** THIS PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
** EXPRESSED OR IMPLIED. SEE THE 3DFX GLIDE GENERAL PUBLIC LICENSE FOR A
** FULL TEXT OF THE NON-WARRANTY PROVISIONS.
**
** 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.
**
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
**
** File name: memtable.h
**
** Description: Table to initialize dramInit0 and sgramMode.
**
** $History: memtable.h $
**
** ***************** Version 1 *****************
** User: Sapphire Date: 3/16/99 Time: 7:28p
** Created in $/Releases/Voodoo3/V3_OEM_100/3dfx/devel/H3/cinit
**
** ***************** Version 6 *****************
** User: Michael Date: 1/11/99 Time: 3:53p
** Updated in $/devel/h3/Win95/dx/minivdd
** Implement the 3Dfx/STB unified header.
**
** ***************** Version 5 *****************
** User: Psmith Date: 8/09/98 Time: 7:53a
** Updated in $/devel/h3/cinit
** added Generic SGRAM/SDRAM memory timings that have lower performance
** but will work for all currently-supported chips.
** default memory vendor type changed to Generic from Samsung.
**
** ***************** Version 4 *****************
** User: Psmith Date: 7/31/98 Time: 1:35a
** Updated in $/devel/h3/cinit
** changed block write to 2 cycles for Etron 16Mbit partsd
**
** ***************** Version 3 *****************
** User: Psmith Date: 7/22/98 Time: 9:11a
** Updated in $/devel/h3/cinit
** added sdram support
**
** ***************** Version 2 *****************
** User: Ken Date: 4/15/98 Time: 6:41p
** Updated in $/devel/h3/win95/dx/minivdd
** added unified header to all files, with revision, etc. info in it
**
*/
//
// generated by gen_memtable.pl at Sun Aug 9 07:21:36 1998
//
#define MEM_TYPE_SGRAM 0
#define MEM_TYPE_SDRAM 1
struct memTable_st {
char vendor[8];
FxU32 type;
FxU32 size;
FxU32 dramInit0;
FxU32 sgramMode;
} memTable[] = {
// vendor type size dramInit0 sgramMode
// ---------- ---- ---- --------- ---------
{ "ETRON", MEM_TYPE_SGRAM, 16, 0x001698e9, 0x00000037} ,
{ "ETRON", MEM_TYPE_SGRAM, 8, 0x0016a169, 0x00000037} ,
{ "GENERIC", MEM_TYPE_SDRAM, 16, 0x00169d25, 0x00000037} ,
{ "GENERIC", MEM_TYPE_SGRAM, 16, 0x00179d29, 0x00000037} ,
{ "GENERIC", MEM_TYPE_SGRAM, 8, 0x001fa569, 0x00000037} ,
{ "GLINK", MEM_TYPE_SGRAM, 8, 0x001ea169, 0x00000037} ,
{ "MOSYS", MEM_TYPE_SGRAM, 16, 0x00015495, 0x00000027} ,
{ "MOSYS", MEM_TYPE_SGRAM, 8, 0x00155495, 0x00000027} ,
{ "SAMSUNG", MEM_TYPE_SDRAM, 16, 0x00169d25, 0x00000037} ,
{ "SAMSUNG", MEM_TYPE_SGRAM, 16, 0x00169d25, 0x00000037} ,
{ "SAMSUNG", MEM_TYPE_SGRAM, 8, 0x00169d25, 0x00000037} ,
{ "SIEMENS", MEM_TYPE_SGRAM, 8, 0x0016a169, 0x00000037} ,
{ "TOSHIBA", MEM_TYPE_SGRAM, 8, 0x0016a565, 0x00000037} ,
};
#define MEM_TABLE_SIZE (sizeof(memTable)/sizeof(struct memTable_st))
#define MEM_ETRON_SGRAM_16 0
#define MEM_ETRON_SGRAM_8 1
#define MEM_GENERIC_SDRAM_16 2
#define MEM_GENERIC_SGRAM_16 3
#define MEM_GENERIC_SGRAM_8 4
#define MEM_GLINK_SGRAM_8 5
#define MEM_MOSYS_SGRAM_16 6
#define MEM_MOSYS_SGRAM_8 7
#define MEM_SAMSUNG_SDRAM_16 8
#define MEM_SAMSUNG_SGRAM_16 9
#define MEM_SAMSUNG_SGRAM_8 10
#define MEM_SIEMENS_SGRAM_8 11
#define MEM_TOSHIBA_SGRAM_8 12
#define MEM_DEFAULT_SGRAM_8 MEM_GENERIC_SGRAM_8
#define MEM_DEFAULT_SGRAM_16 MEM_GENERIC_SGRAM_16
#define MEM_DEFAULT_SDRAM_16 MEM_GENERIC_SDRAM_16

446
glide2x/h3/cinit/modetabl.h Normal file
View File

@@ -0,0 +1,446 @@
/*
** THIS SOFTWARE IS SUBJECT TO COPYRIGHT PROTECTION AND IS OFFERED ONLY
** PURSUANT TO THE 3DFX GLIDE GENERAL PUBLIC LICENSE. THERE IS NO RIGHT
** TO USE THE GLIDE TRADEMARK WITHOUT PRIOR WRITTEN PERMISSION OF 3DFX
** INTERACTIVE, INC. A COPY OF THIS LICENSE MAY BE OBTAINED FROM THE
** DISTRIBUTOR OR BY CONTACTING 3DFX INTERACTIVE INC(info@3dfx.com).
** THIS PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
** EXPRESSED OR IMPLIED. SEE THE 3DFX GLIDE GENERAL PUBLIC LICENSE FOR A
** FULL TEXT OF THE NON-WARRANTY PROVISIONS.
**
** 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.
**
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
**
** File name: modetabl.h
**
** Description: Mode table that contains modes and related register values.
**
** $History: modetabl.h $
**
** ***************** Version 1 *****************
** User: Sapphire Date: 3/16/99 Time: 7:28p
** Created in $/Releases/Voodoo3/V3_OEM_100/3dfx/devel/H3/cinit
**
** ***************** Version 25 *****************
** User: Stb_srogers Date: 3/02/99 Time: 4:04p
** Updated in $/devel/h3/Win95/dx/minivdd
** Adding the 960x720 & 1280x960 modes
**
** ***************** Version 24 *****************
** User: Stb_srogers Date: 2/16/99 Time: 5:04p
** Updated in $/devel/h3/win95/dx/minivdd
**
** ***************** Version 22 *****************
** User: Stb_srogers Date: 2/11/99 Time: 6:59p
** Updated in $/devel/h3/win95/dx/minivdd
**
** ***************** Version 21 *****************
** User: Stb_srogers Date: 2/09/99 Time: 11:30a
** Updated in $/devel/h3/win95/dx/minivdd
**
** ***************** Version 20 *****************
** User: Andrew Date: 2/07/99 Time: 4:45p
** Updated in $/devel/h3/Win95/dx/minivdd
** Change the clocks as per Malcolm Gray suggestion and added new modes
** 1600x1024, 1920x1200, and 2048x1536.
**
** ***************** Version 19 *****************
** User: Stb_srogers Date: 1/29/99 Time: 8:08a
** Updated in $/devel/h3/win95/dx/minivdd
**
** ***************** Version 18 *****************
** User: Andrew Date: 1/12/99 Time: 12:40p
** Updated in $/devel/h3/Win95/dx/minivdd
** Removed my changes since complaint mode is 75 Hz
**
** ***************** Version 16 *****************
** User: Michael Date: 1/11/99 Time: 3:54p
** Updated in $/devel/h3/Win95/dx/minivdd
** Implement the 3Dfx/STB unified header.
**
** ***************** Version 15 *****************
** User: Michael Date: 12/31/98 Time: 9:55a
** Updated in $/devel/h3/Win95/dx/minivdd
** STB's customized refresh rates. Customizations are surrounded by
** "#ifdef INCSTBCUST".
**
** ***************** Version 14 *****************
** User: Andrew Date: 8/31/98 Time: 11:26p
** Updated in $/devel/h3/Win95/dx/minivdd
** John's fixes for 800x600
**
** ***************** Version 13 *****************
** User: Andrew Date: 8/20/98 Time: 10:11p
** Updated in $/devel/h3/Win95/dx/minivdd
** Updated 320x240@60,72 400x300 @ 72 & 85, 1792x1392 changed from 72 to
** 75.
**
** ***************** Version 12 *****************
** User: Andrew Date: 7/27/98 Time: 11:12a
** Updated in $/devel/h3/Win95/dx/minivdd
** Added updates for 400x300 modes since SCANLINEDBL was not set in xls
** file
**
** ***************** Version 11 *****************
** User: Andrew Date: 7/21/98 Time: 2:42p
** Updated in $/devel/h3/Win95/dx/minivdd
** Modified to support the new final mode list -- add new refreshs
** 320x200, 320x240, 400x300, 512x384, and 1152x864.
**
** ***************** Version 10 *****************
** User: Andrew Date: 7/04/98 Time: 10:37a
** Updated in $/devel/h3/Win95/dx/minivdd
** Got modetabl.h the right way.....Differences hsync skew on 1920x1440
** and clocks on low-rez modes
**
** ***************** Version 9 *****************
** User: Andrew Date: 6/29/98 Time: 10:58a
** Updated in $/devel/h3/Win95/dx/minivdd
** Changed Dot Clock on 1792x1344 and Refresh Rate from 70 to 72. Changed
** CR04 on 1792x1344 @ 60 Hz
**
** ***************** Version 8 *****************
** User: Andrew Date: 6/24/98 Time: 9:32a
** Updated in $/devel/h3/Win95/dx/minivdd
** New mode additions for 1792x1344 and 1856x1392 plus 1152x864 @ 100
**
** ***************** Version 7 *****************
** User: Andrew Date: 5/19/98 Time: 6:12p
** Updated in $/devel/h3/Win95/dx/minivdd
** changed 1800 to 1808 and changed timing to 1808
**
** ***************** Version 6 *****************
** User: Andrew Date: 5/07/98 Time: 11:24a
** Updated in $/devel/h3/Win95/dx/minivdd
** Added modes 1792x1440 and 1920x1440. 1800x1440 was updated but still
** does not work
**
** ***************** Version 5 *****************
** User: Andrew Date: 4/22/98 Time: 2:58p
** Updated in $/devel/h3/Win95/dx/minivdd
** Changed clock at 1280x960 @ 75 hz and 1600x1200 @ 85 Hz and added
** broken 1800x1440
**
** ***************** Version 4 *****************
** User: Ken Date: 4/15/98 Time: 6:42p
** Updated in $/devel/h3/win95/dx/minivdd
** added unified header to all files, with revision, etc. info in it
**
*/
// Begin STB Changes
// STB-SR 12/23/98 changing modetable
// STB-SR 12/30/98 All but 720x350 and 720x400 work
// STB-SR 01/07/99 720x350 and 720x400 work. I had assumed that SR1 (Sequencer
// Register 1), was always 0x21. Bit 0 defines wether or not the character
// width is 8 or 9. 1->8 pixel wide char, 0->9 pixel char. The actual change
// was made in minivdd\modetabl.h
// STB-SR 02/11/99 Adding STB & 3Dfx unified modes for Voodoo3
#ifdef H4
// If you need to make changes to the modetable, you must also edit
// dd16\h3.c and dd16\setmode.c
// r[0] r[1] r[2] r[3] r[4] r[5] r[6] r[7] r[8] r[9] r[10] r[11] r[12] r[13] r[14] r[15] r[16] r[17] r[18] r[19] r[20]
// x y rr, 0h 1h 2h 3h 4h 5h 6h 7h 9h 10h 11h 12h 15h 16h 1ah 1bh 3c2 SR1 pllctrl0 dacmode
// x y rr, Htotl HDEnE HBlSt HBlEn HSySt HSyEn Vtotl Ovflw MxSLn VSySt VSyEn VDEnE VBlSt VBlEn HExtn VExtn MiscO SR1 pllctrl0 dacmode
// New Standardized modetable for both 3Dfx and STB
{ 640, 480, 60, 0x5f, 0x4f, 0x4f, 0x83, 0x51, 0x9d, 0x0b, 0x3e, 0x40, 0xe9,
0x2b, 0xdf, 0xdf, 0x0c, 0x00, 0x00, 0xcf, 0x21, 0x37, 0xd1, 0x00},
{ 640, 480, 72, 0x63, 0x4f, 0x4f, 0x87, 0x52, 0x97, 0x06, 0x3e, 0x40, 0xe8,
0x2b, 0xdf, 0xdf, 0x07, 0x00, 0x00, 0xcf, 0x21, 0x0f, 0x56, 0x00},
{ 640, 480, 75, 0x64, 0x4f, 0x4f, 0x88, 0x51, 0x99, 0xf2, 0x1f, 0x40, 0xe0,
0x23, 0xdf, 0xdf, 0xf3, 0x00, 0x00, 0xcf, 0x21, 0x0f, 0x56, 0x00},
{ 640, 480, 85, 0x63, 0x4f, 0x4f, 0x87, 0x56, 0x9d, 0xfb, 0x1f, 0x40, 0xe0,
0x23, 0xdf, 0xdf, 0xfc, 0x00, 0x00, 0xcf, 0x21, 0x1f, 0xb3, 0x00},
{ 800, 600, 56, 0x7b, 0x63, 0x63, 0x9f, 0x66, 0x8f, 0x6f, 0xf0, 0x60, 0x58,
0x2a, 0x57, 0x57, 0x70, 0x80, 0x00, 0x0f, 0x21, 0x1f, 0xb3, 0x00},
{ 800, 600, 60, 0x7f, 0x63, 0x63, 0x83, 0x68, 0x18, 0x72, 0xf0, 0x60, 0x58,
0x2c, 0x57, 0x57, 0x73, 0xa0, 0x00, 0x0f, 0x21, 0x27, 0xf4, 0x00},
{ 800, 600, 72, 0x7d, 0x63, 0x63, 0x81, 0x6a, 0x19, 0x98, 0xf0, 0x60, 0x7c,
0x22, 0x57, 0x57, 0x99, 0xa0, 0x00, 0x0f, 0x21, 0x1f, 0xf9, 0x00},
{ 800, 600, 75, 0x7f, 0x63, 0x63, 0x83, 0x65, 0x0f, 0x6f, 0xf0, 0x60, 0x58,
0x2b, 0x57, 0x57, 0x70, 0xa0, 0x00, 0x0f, 0x21, 0x07, 0x51, 0x00},
{ 800, 600, 85, 0x7e, 0x63, 0x63, 0x82, 0x67, 0x0f, 0x75, 0xf0, 0x60, 0x58,
0x2b, 0x57, 0x57, 0x76, 0xa0, 0x00, 0x0f, 0x21, 0x17, 0xda, 0x00},
{ 1024, 768, 60, 0xa3, 0x7f, 0x7f, 0x87, 0x82, 0x93, 0x24, 0xf5, 0x60, 0x02,
0x28, 0xff, 0xff, 0x25, 0x20, 0x00, 0xcf, 0x21, 0x07, 0x6b, 0x00},
{ 1024, 768, 70, 0xa1, 0x7f, 0x7f, 0x85, 0x82, 0x93, 0x24, 0xf5, 0x60, 0x02,
0x28, 0xff, 0xff, 0x25, 0x20, 0x00, 0xcf, 0x21, 0x2a, 0xf9, 0x00},
{ 1024, 768, 75, 0x9f, 0x7f, 0x7f, 0x83, 0x81, 0x8d, 0x1e, 0xf5, 0x60, 0x00,
0x23, 0xff, 0xff, 0x1f, 0x20, 0x00, 0x0f, 0x21, 0x06, 0x40, 0x00},
{ 1024, 768, 85, 0xa7, 0x7f, 0x7f, 0x8b, 0x85, 0x91, 0x26, 0xf5, 0x60, 0x00,
0x23, 0xff, 0xff, 0x27, 0x20, 0x00, 0x0f, 0x21, 0x0e, 0x82, 0x00},
{ 1152, 864, 60, 0xb3, 0x8f, 0x8f, 0x97, 0x93, 0x9f, 0x87, 0xff, 0x60, 0x60,
0x23, 0x5f, 0x5f, 0x88, 0x00, 0x00, 0x0f, 0x21, 0x26, 0xf4, 0x00},
{ 1152, 864, 70, 0xb4, 0x8f, 0x8f, 0x98, 0x93, 0x9f, 0x8e, 0xff, 0x60, 0x60,
0x23, 0x5f, 0x5f, 0x8f, 0x00, 0x00, 0x0f, 0x21, 0x0e, 0x82, 0x00},
{ 1152, 864, 75, 0xc3, 0x8f, 0x8f, 0x87, 0x97, 0x07, 0x82, 0xff, 0x60, 0x60,
0x23, 0x5f, 0x5f, 0x83, 0xa0, 0x00, 0x0f, 0x21, 0x12, 0xb3, 0x00},
{ 1152, 864, 85, 0xbf, 0x8f, 0x8f, 0x83, 0x97, 0x07, 0x8d, 0xff, 0x60, 0x60,
0x23, 0x5f, 0x5f, 0x8e, 0xa0, 0x00, 0x0f, 0x21, 0x06, 0x64, 0x00},
{ 1280, 960, 60, 0xdc, 0x9f, 0x9f, 0x80, 0xab, 0x99, 0xe6, 0xff, 0x60, 0xc0,
0x23, 0xbf, 0xbf, 0xe7, 0xa0, 0x00, 0x0f, 0x21, 0x12, 0xb3, 0x00},
{ 1280, 960, 85, 0xd3, 0x9f, 0x9f, 0x97, 0xa7, 0x1b, 0xf1, 0xff, 0x60, 0xc0,
0x23, 0xbf, 0xbf, 0xf2, 0xa0, 0x00, 0x0f, 0x21, 0x0a, 0xa4, 0x00},
{ 1280, 1024, 60, 0xce, 0x9f, 0x9f, 0x92, 0xa5, 0x13, 0x28, 0x5a, 0x60, 0x00,
0x23, 0xff, 0xff, 0x29, 0xa0, 0x41, 0x0f, 0x21, 0x12, 0xb3, 0x00},
{ 1280, 1024, 75, 0xce, 0x9f, 0x9f, 0x92, 0xa1, 0x13, 0x28, 0x5a, 0x60, 0x00,
0x23, 0xff, 0xff, 0x29, 0xa0, 0x41, 0x0f, 0x21, 0x0a, 0x95, 0x00},
{ 1280, 1024, 85, 0xd3, 0x9f, 0x9f, 0x97, 0xa7, 0x1b, 0x2e, 0x5a, 0x60, 0x00,
0x23, 0xff, 0xff, 0x2f, 0xa0, 0x41, 0x0f, 0x21, 0x05, 0x40, 0x00},
{ 1600, 1024, 60, 0x00, 0xc7, 0xc7, 0x84, 0xcb, 0x1f, 0x2c, 0x5a, 0x60, 0x02,
0x25, 0xff, 0xff, 0x2d, 0x21, 0x41, 0xcf, 0x21, 0x0e, 0xb9, 0x00},
{ 1600, 1024, 76, 0x00, 0xc7, 0xc7, 0x84, 0xcb, 0x1f, 0x2c, 0x5a, 0x60, 0x02,
0x25, 0xff, 0xff, 0x2d, 0x21, 0x41, 0xcf, 0x21, 0x15, 0xa4, 0x00},
{ 1600, 1024, 85, 0x00, 0xc7, 0xc7, 0x84, 0xcb, 0x1f, 0x2c, 0x5a, 0x60, 0x02,
0x25, 0xff, 0xff, 0x2d, 0x21, 0x41, 0xcf, 0x21, 0x09, 0x68, 0x00},
{ 1600, 1200, 60, 0x00, 0xc7, 0xc7, 0x84, 0xcf, 0x07, 0xe0, 0x10, 0x40, 0xb0,
0x23, 0xaf, 0xaf, 0xe1, 0xa1, 0x55, 0x0f, 0x21, 0x19, 0xad, 0x00},
{ 1600, 1200, 65, 0x00, 0xc7, 0xc7, 0x84, 0xcf, 0x07, 0xe0, 0x10, 0x40, 0xb0,
0x23, 0xaf, 0xaf, 0xe1, 0xa1, 0x55, 0x0f, 0x21, 0x21, 0xeb, 0x00},
{ 1600, 1200, 70, 0x00, 0xc7, 0xc7, 0x84, 0xcf, 0x07, 0xe0, 0x10, 0x40, 0xb0,
0x23, 0xaf, 0xaf, 0xe1, 0xa1, 0x55, 0x0f, 0x21, 0x09, 0x64, 0x00},
{ 1600, 1200, 75, 0x00, 0xc7, 0xc7, 0x84, 0xcf, 0x07, 0xe0, 0x10, 0x40, 0xb0,
0x23, 0xaf, 0xaf, 0xe1, 0xa1, 0x55, 0x0f, 0x21, 0x05, 0x50, 0x00},
{ 1600, 1200, 80, 0x00, 0xc7, 0xc7, 0x84, 0xcf, 0x07, 0xe0, 0x10, 0x40, 0xb0,
0x23, 0xaf, 0xaf, 0xe1, 0xa1, 0x55, 0x0f, 0x21, 0x11, 0xad, 0x00},
{ 1600, 1200, 85, 0x00, 0xc7, 0xc7, 0x84, 0xcf, 0x07, 0xe0, 0x10, 0x40, 0xb0,
0x23, 0xaf, 0xaf, 0xe1, 0xa1, 0x55, 0x0f, 0x21, 0x05, 0x5b, 0x00},
{ 1600, 1200, 100, 0x00, 0xc7, 0xc7, 0x84, 0xcf, 0x07, 0xe0, 0x10, 0x40, 0xb0,
0x23, 0xaf, 0xaf, 0xe1, 0xa1, 0x55, 0x0f, 0x21, 0x15, 0xfd, 0x00},
{ 1792, 1344, 60, 0x94, 0x6f, 0x6f, 0x98, 0x77, 0x04, 0x70, 0x1f, 0x40, 0x40,
0x23, 0x3f, 0x3f, 0x71, 0x20, 0x55, 0x4f, 0x21, 0x0d, 0x8d, 0x01},
{ 1792, 1344, 75, 0x95, 0x6f, 0x6f, 0x99, 0x75, 0x03, 0x87, 0x1f, 0x40, 0x40,
0x23, 0x3f, 0x3f, 0x88, 0x20, 0x55, 0x4f, 0x21, 0x15, 0xfd, 0x01},
{ 1856, 1392, 60, 0x99, 0x73, 0x73, 0x9d, 0x79, 0x07, 0x9d, 0x1f, 0x40, 0x70,
0x23, 0x6f, 0x6f, 0x9e, 0x20, 0x55, 0x4f, 0x21, 0x09, 0x78, 0x01},
{ 1856, 1392, 75, 0x9b, 0x73, 0x73, 0x9f, 0x7b, 0x09, 0xda, 0x1f, 0x40, 0x70,
0x23, 0x6f, 0x6f, 0xdb, 0x20, 0x55, 0x4f, 0x21, 0x09, 0x9f, 0x01},
{ 1920, 1080, 60, 0x8f, 0x77, 0x77, 0x93, 0x79, 0x02, 0x63, 0x10, 0x40, 0x3a,
0x2d, 0x37, 0x37, 0x64, 0x20, 0x55, 0xcf, 0x21, 0x05, 0x41, 0x01},
{ 1920, 1080, 72, 0x9b, 0x77, 0x77, 0x9f, 0x7a, 0x08, 0x92, 0x10, 0x40, 0x3a,
0x2d, 0x37, 0x37, 0x93, 0x20, 0x55, 0xcf, 0x21, 0x11, 0xb3, 0x01},
{ 1920, 1200, 60, 0x9d, 0x77, 0x77, 0x81, 0x7b, 0x8b, 0xe0, 0x10, 0x40, 0xb2,
0x25, 0xaf, 0xaf, 0xe1, 0x20, 0x55, 0xcf, 0x21, 0x1d, 0xf2, 0x01},
{ 1920, 1200, 76, 0x9d, 0x77, 0x77, 0x81, 0x7b, 0x8b, 0xe0, 0x10, 0x40, 0xb2,
0x25, 0xaf, 0xaf, 0xe1, 0x20, 0x55, 0xcf, 0x21, 0x15, 0xee, 0x01},
{ 1920, 1440, 60, 0x9e, 0x77, 0x77, 0x82, 0x7f, 0x8c, 0xda, 0x1f, 0x40, 0xa0,
0x23, 0x9f, 0x9f, 0xdb, 0x20, 0x55, 0x4f, 0x21, 0x05, 0x60, 0x01},
{ 1920, 1440, 75, 0xa0, 0x77, 0x77, 0x84, 0x80, 0x8e, 0xda, 0x1f, 0x40, 0xa0,
0x23, 0x9f, 0x9f, 0xdb, 0x20, 0x55, 0x4f, 0x21, 0x09, 0xa4, 0x01},
{ 2048, 1536, 60, 0x98, 0x7f, 0x7f, 0x9c, 0x82, 0x10, 0x3b, 0xba, 0x40, 0x00,
0x23, 0xff, 0xff, 0x3c, 0x20, 0x55, 0x0f, 0x21, 0x09, 0x84, 0x01},
{ 2048, 1536, 75, 0xa1, 0x7f, 0x7f, 0x85, 0x83, 0x91, 0x44, 0xba, 0x40, 0x00,
0x23, 0xff, 0xff, 0x45, 0x20, 0x55, 0x0f, 0x21, 0x05, 0x84, 0x01},
{ 320, 200, 70, 0x2d, 0x27, 0x27, 0x91, 0x28, 0x8e, 0xbf, 0x1f, 0xc0, 0x9c,
0x2e, 0x8f, 0x8f, 0xc0, 0x80, 0x00, 0x4f, 0x21, 0x73, 0xd1, 0x00},
{ 320, 200, 85, 0x2f, 0x27, 0x27, 0x93, 0x29, 0x8d, 0xbb, 0x1f, 0xc0, 0x90,
0x23, 0x8f, 0x8f, 0xbc, 0x80, 0x00, 0x4f, 0x21, 0x0f, 0x2a, 0x00},
{ 320, 240, 60, 0x2d, 0x27, 0x27, 0x91, 0x28, 0x8e, 0x0b, 0x3e, 0xc0, 0xe9,
0x2b, 0xdf, 0xdf, 0x0c, 0x80, 0x00, 0xcf, 0x21, 0x73, 0xd1, 0x00},
{ 320, 240, 72, 0x2f, 0x27, 0x27, 0x93, 0x29, 0x8b, 0x06, 0x3e, 0xc0, 0xe8,
0x2b, 0xdf, 0xdf, 0x07, 0x80, 0x00, 0xcf, 0x21, 0x0f, 0x2a, 0x00},
{ 320, 240, 75, 0x30, 0x27, 0x27, 0x94, 0x28, 0x8c, 0xf2, 0x1f, 0xc0, 0xe0,
0x23, 0xdf, 0xdf, 0xf3, 0x80, 0x00, 0xcf, 0x21, 0x63, 0xe5, 0x00},
{ 320, 240, 85, 0x2f, 0x27, 0x27, 0x93, 0x2a, 0x8e, 0xfb, 0x1f, 0xc0, 0xe0,
0x23, 0xdf, 0xdf, 0xfc, 0x80, 0x00, 0xcf, 0x21, 0x43, 0xb3, 0x00},
{ 400, 300, 60, 0x3d, 0x31, 0x31, 0x81, 0x34, 0x1c, 0x72, 0xf0, 0xe0, 0x58,
0x2c, 0x57, 0x57, 0x73, 0xa0, 0x00, 0x0f, 0x21, 0x3f, 0xbc, 0x00},
{ 400, 300, 72, 0x3c, 0x31, 0x31, 0x80, 0x35, 0x1c, 0x98, 0xf0, 0xe0, 0x7c,
0x22, 0x57, 0x57, 0x99, 0xa0, 0x00, 0x0f, 0x21, 0x43, 0xf9, 0x00},
{ 400, 300, 75, 0x3d, 0x31, 0x31, 0x81, 0x32, 0x17, 0x6f, 0xf0, 0xe0, 0x58,
0x2b, 0x57, 0x57, 0x70, 0xa0, 0x00, 0x0f, 0x21, 0x13, 0x51, 0x00},
{ 400, 300, 85, 0x3d, 0x31, 0x31, 0x81, 0x33, 0x17, 0x75, 0xf0, 0xe0, 0x58,
0x2b, 0x57, 0x57, 0x76, 0xa0, 0x00, 0x0f, 0x21, 0x13, 0x5d, 0x00},
{ 512, 384, 60, 0x4f, 0x3f, 0x3f, 0x93, 0x41, 0x09, 0x24, 0xf5, 0xe0, 0x02,
0x28, 0xff, 0xff, 0x25, 0x20, 0x00, 0xcf, 0x21, 0x2f, 0xea, 0x00},
{ 512, 384, 70, 0x4e, 0x3f, 0x3f, 0x92, 0x41, 0x09, 0x24, 0xf5, 0xe0, 0x02,
0x28, 0xff, 0xff, 0x25, 0x20, 0x00, 0xcf, 0x21, 0x2b, 0xf9, 0x00},
{ 512, 384, 75, 0x4d, 0x3f, 0x3f, 0x91, 0x40, 0x06, 0x1e, 0xf5, 0xe0, 0x00,
0x23, 0xff, 0xff, 0x1f, 0x20, 0x00, 0xcf, 0x21, 0x07, 0x40, 0x00},
{ 512, 384, 85, 0x51, 0x3f, 0x3f, 0x95, 0x42, 0x08, 0x26, 0xf5, 0xe0, 0x00,
0x23, 0xff, 0xff, 0x27, 0x20, 0x00, 0xcf, 0x21, 0x0f, 0x82, 0x00},
{ 640, 400, 70, 0x5f, 0x4f, 0x4f, 0x83, 0x51, 0x9d, 0xbf, 0x1f, 0x40, 0x9c,
0x2e, 0x8f, 0x8f, 0xc0, 0x00, 0x00, 0x4f, 0x21, 0x37, 0xd1, 0x00},
{ 640, 400, 85, 0x63, 0x4f, 0x4f, 0x87, 0x53, 0x9b, 0xbb, 0x1f, 0x40, 0x90,
0x23, 0x8f, 0x8f, 0xbc, 0x00, 0x00, 0x4f, 0x21, 0x0f, 0x56, 0x00},
{ 720, 480, 60, 0x6b, 0x59, 0x59, 0x8f, 0x5b, 0x8a, 0x0b, 0x3e, 0x40, 0xe9,
0x2b, 0xdf, 0xdf, 0x0c, 0x80, 0x00, 0xcf, 0x21, 0x0b, 0x3d, 0x00},
{ 720, 480, 72, 0x6e, 0x59, 0x59, 0x92, 0x5b, 0x8c, 0x06, 0x3e, 0x40, 0xe8,
0x2b, 0xdf, 0xdf, 0x07, 0x80, 0x00, 0xcf, 0x21, 0x2f, 0xfb, 0x00},
{ 720, 480, 85, 0x70, 0x59, 0x59, 0x94, 0x61, 0x89, 0xfb, 0x1f, 0x40, 0xe0,
0x23, 0xdf, 0xdf, 0xfc, 0x80, 0x00, 0xcf, 0x21, 0x1b, 0xb3, 0x00},
{ 720, 576, 72, 0x70, 0x59, 0x59, 0x94, 0x5d, 0x89, 0x80, 0xf0, 0x60, 0x41,
0x25, 0x3f, 0x3f, 0x81, 0x80, 0x00, 0x0f, 0x21, 0x13, 0x8f, 0x00},
{ 720, 576, 100, 0x70, 0x59, 0x59, 0x94, 0x5d, 0x89, 0x80, 0xf0, 0x60, 0x41,
0x25, 0x3f, 0x3f, 0x81, 0x80, 0x00, 0x0f, 0x21, 0x17, 0xe9, 0x00},
#else // #ifdef H4
// STB End Changes
{320, 200, 70, 0x2f, 0x27, 0x27, 0x93, 0x2a, 0x8e, 0xbb, 0x1f, 0x40, 0x91,
0x24, 0x8f, 0x8f, 0xbc, 0x80, 0x00, 0x4f, 0x21, 0xee, 0xdb, 0x00},
{320, 200, 85, 0x2f, 0x27, 0x27, 0x93, 0x2a, 0x8e, 0xbb, 0x1f, 0x40, 0x91,
0x24, 0x8f, 0x8f, 0xbc, 0x80, 0x00, 0x4f, 0x21, 0x37, 0x82, 0x00},
{320, 240, 60, 0x2d, 0x27, 0x27, 0x8f, 0x29, 0x8e, 0x0b, 0x3e, 0x40, 0xe1,
0x24, 0xdf, 0xdf, 0xfc, 0x80, 0x00, 0xcf, 0x21, 0xea, 0xd1, 0x00},
{320, 240, 72, 0x2f, 0x27, 0x27, 0x93, 0x2a, 0x8e, 0x06, 0x3e, 0x40, 0xe1,
0x24, 0xdf, 0xdf, 0xfc, 0x80, 0x00, 0xcf, 0x21, 0x37, 0x82, 0x00},
{320, 240, 85, 0x2f, 0x27, 0x27, 0x93, 0x2a, 0x8e, 0xfb, 0x1f, 0x40, 0xe1,
0x24, 0xdf, 0xdf, 0xfc, 0x80, 0x00, 0xcf, 0x21, 0x3f, 0xa9, 0x00},
{400, 300, 60, 0x3d, 0x31, 0x31, 0x81, 0x34, 0x1c, 0x72, 0xf0, 0x60, 0x59,
0x2d, 0x57, 0x57, 0x73, 0xa0, 0x00, 0x0f, 0x21, 0xf4, 0x56, 0x00},
{400, 300, 72, 0x3c, 0x31, 0x31, 0x80, 0x34, 0x1b, 0x98, 0xf0, 0x60, 0x7d,
0x23, 0x57, 0x57, 0x99, 0xa0, 0x00, 0x0f, 0x21, 0xf4, 0x6c, 0x00},
{400, 300, 85, 0x3d, 0x31, 0x31, 0x80, 0x33, 0x1b, 0x75, 0xf0, 0x60, 0x59,
0x2c, 0x57, 0x57, 0x76, 0xa0, 0x00, 0x0f, 0x21, 0xb8, 0x5d, 0x00},
{512, 384, 60, 0x4f, 0x3f, 0x3f, 0x93, 0x41, 0x0a, 0x24, 0xf5, 0x60, 0x04,
0x2a, 0xff, 0xff, 0x25, 0x20, 0x00, 0xcf, 0x21, 0x5e, 0xe1, 0x00},
{512, 384, 72, 0x4e, 0x3f, 0x3f, 0x92, 0x41, 0x0a, 0x24, 0xf5, 0x60, 0x03,
0x29, 0xff, 0xff, 0x25, 0x20, 0x00, 0xcf, 0x21, 0xbc, 0x82, 0x00},
{512, 384, 75, 0x4d, 0x3f, 0x3f, 0x91, 0x41, 0x07, 0x1e, 0xf5, 0x60, 0x01,
0x24, 0xff, 0xff, 0x1f, 0x20, 0x00, 0x0f, 0x21, 0x2a, 0x82, 0x00},
{512, 384, 85, 0x51, 0x3f, 0x3f, 0x95, 0x43, 0x09, 0x26, 0xf5, 0x60, 0x01,
0x24, 0xff, 0xff, 0x27, 0x20, 0x00, 0x0f, 0x21, 0x36, 0xc4, 0x00},
{640, 350, 85, 0x63, 0x4f, 0x4f, 0x87, 0x54, 0x9c, 0xbb, 0x1f, 0x40, 0x7e,
0x21, 0x5d, 0x5d, 0xbc, 0x20, 0x00, 0x8f, 0x21, 0x36, 0x82, 0x00},
{640, 400, 70, 0x63, 0x4f, 0x4f, 0x87, 0x54, 0x9c, 0xbb, 0x1f, 0x40, 0x91,
0x24, 0x8f, 0x8f, 0xbc, 0x20, 0x00, 0x4f, 0x21, 0xed, 0xdb, 0x00},
{640, 400, 85, 0x63, 0x4f, 0x4f, 0x87, 0x54, 0x9c, 0xbb, 0x1f, 0x40, 0x91,
0x24, 0x8f, 0x8f, 0xbc, 0x20, 0x00, 0x4f, 0x21, 0x36, 0x82, 0x00},
{640, 480, 60, 0x5f, 0x4f, 0x4f, 0x83, 0x52, 0x9e, 0x0b, 0x3e, 0x40, 0xea,
0x2c, 0xdf, 0xdf, 0x0c, 0x20, 0x00, 0xcf, 0x21, 0x7d, 0x72, 0x00},
{640, 480, 72, 0x63, 0x4f, 0x4f, 0x87, 0x56, 0x9b, 0x06, 0x3e, 0x40, 0xe9,
0x2c, 0xdf, 0xdf, 0x07, 0x20, 0x00, 0xcf, 0x21, 0x36, 0x82, 0x00},
{640, 480, 75, 0x64, 0x4f, 0x4f, 0x88, 0x51, 0x99, 0xf2, 0x1f, 0x40, 0xe1,
0x24, 0xdf, 0xdf, 0xf3, 0x20, 0x00, 0xcf, 0x21, 0x36, 0x82, 0x00},
{640, 480, 85, 0x63, 0x4f, 0x4f, 0x87, 0x56, 0x9e, 0xfb, 0x1f, 0x40, 0xe1,
0x24, 0xdf, 0xdf, 0xfc, 0x20, 0x00, 0xcf, 0x21, 0x3e, 0xa9, 0x00},
{640, 480, 100, 0x63, 0x4f, 0x4f, 0x87, 0x56, 0x9e, 0xfb, 0x1f, 0x40, 0xe1,
0x24, 0xdf, 0xdf, 0xfc, 0x20, 0x00, 0xcf, 0x21, 0x58, 0x45, 0x00},
{640, 480, 120, 0x63, 0x4f, 0x4f, 0x87, 0x56, 0x9e, 0xfb, 0x1f, 0x40, 0xe1,
0x24, 0xdf, 0xdf, 0xfc, 0x20, 0x00, 0xcf, 0x21, 0x48, 0x45, 0x00},
{720, 400, 72, 0x70, 0x59, 0x59, 0x94, 0x5e, 0x87, 0xbc, 0x1f, 0x40, 0x91,
0x24, 0x8f, 0x8f, 0xbd, 0xa0, 0x00, 0x4f, 0x21, 0x20, 0x13, 0x00},
{720, 400, 85, 0x70, 0x59, 0x59, 0x94, 0x5e, 0x87, 0xbc, 0x1f, 0x40, 0x91,
0x24, 0x8f, 0x8f, 0xbd, 0xa0, 0x00, 0x4f, 0x21, 0xb8, 0x75, 0x00},
{720, 480, 60, 0x70, 0x59, 0x59, 0x94, 0x5e, 0x87, 0x15, 0x3e, 0x40, 0xe1,
0x24, 0xdf, 0xdf, 0x16, 0xa0, 0x00, 0x4f, 0x21, 0xc4, 0x69, 0x00},
{720, 480, 72, 0x70, 0x59, 0x59, 0x94, 0x5e, 0x87, 0x15, 0x3e, 0x40, 0xe1,
0x24, 0xdf, 0xdf, 0x16, 0xa0, 0x00, 0x4f, 0x21, 0xd8, 0x8b, 0x00},
{720, 576, 72, 0x70, 0x59, 0x59, 0x94, 0x5e, 0x87, 0x80, 0xf0, 0x60, 0x41,
0x24, 0x3f, 0x3f, 0x81, 0xa0, 0x00, 0x4f, 0x21, 0xb0, 0x89, 0x00},
{720, 576, 100, 0x70, 0x59, 0x59, 0x94, 0x5e, 0x87, 0x80, 0xf0, 0x60, 0x41,
0x24, 0x3f, 0x3f, 0x81, 0xa0, 0x00, 0x4f, 0x21, 0xec, 0xfe, 0x00},
{800, 600, 56, 0x7b, 0x63, 0x63, 0x9f, 0x69, 0x99, 0x6f, 0xf0, 0x60, 0x59,
0x2b, 0x57, 0x57, 0x70, 0xa0, 0x00, 0x0f, 0x21, 0x3e, 0xa9, 0x00},
{800, 600, 60, 0x7b, 0x63, 0x63, 0x9f, 0x6a, 0x94, 0x6c, 0xf0, 0x60, 0x59,
0x2c, 0x57, 0x57, 0x6d, 0xa0, 0x00, 0x0f, 0x21, 0x06, 0x1e, 0x00},
{800, 600, 72, 0x7d, 0x63, 0x63, 0x81, 0x68, 0x17, 0x98, 0xf0, 0x60, 0x7d,
0x23, 0x57, 0x57, 0x99, 0x80, 0x00, 0x0f, 0x21, 0x06, 0x28, 0x00},
{800, 600, 75, 0x7f, 0x63, 0x63, 0x83, 0x65, 0x0f, 0x6f, 0xf0, 0x60, 0x59,
0x2c, 0x57, 0x57, 0x70, 0x80, 0x00, 0x0f, 0x21, 0x55, 0x9d, 0x00},
{800, 600, 85, 0x7e, 0x63, 0x63, 0x82, 0x67, 0x0f, 0x75, 0xf0, 0x60, 0x59,
0x2c, 0x57, 0x57, 0x76, 0x80, 0x00, 0x0f, 0x21, 0x31, 0x6c, 0x00},
{800, 600, 100, 0x7e, 0x63, 0x63, 0x82, 0x66, 0x0e, 0x75, 0xf0, 0x60, 0x59,
// 0x2c, 0x57, 0x57, 0x76, 0x80, 0x00, 0x0f, 0x21, 0x8c, 0xa9, 0x00},
0x2c, 0x57, 0x57, 0x76, 0x80, 0x00, 0x0f, 0x21, 0x0b, 0x92, 0x00},
{800, 600, 120, 0x7e, 0x63, 0x63, 0x82, 0x66, 0x0e, 0x75, 0xf0, 0x60, 0x59,
0x2c, 0x57, 0x57, 0x76, 0x80, 0x00, 0x0f, 0x21, 0x24, 0x3b, 0x00},
{1152, 864, 60, 0xb4, 0x8f, 0x8f, 0x98, 0x94, 0x80, 0x8e, 0xff, 0x60, 0x61,
// 0x24, 0x5f, 0x5f, 0x8f, 0x80, 0x00, 0x0f, 0x21, 0x84, 0xc4, 0x00},
0x24, 0x5f, 0x5f, 0x8f, 0x80, 0x00, 0x0f, 0x21, 0x0b, 0xb3, 0x00},
{1152, 864, 75, 0xc3, 0x8f, 0x8f, 0x87, 0x98, 0x08, 0x82, 0xff, 0x60, 0x61,
// 0x24, 0x5f, 0x5f, 0x83, 0xa0, 0x00, 0x0f, 0x21, 0x50, 0xa4, 0x00},
0x24, 0x5f, 0x5f, 0x83, 0xa0, 0x00, 0x0f, 0x21, 0x12, 0xb3, 0x00},
{1152, 864, 85, 0xc0, 0x8f, 0x8f, 0x84, 0x98, 0x08, 0x89, 0xff, 0x60, 0x61,
// 0x24, 0x5f, 0x5f, 0x8a, 0xa0, 0x00, 0x0f, 0x21, 0x6c, 0xf4, 0x00},
0x24, 0x5f, 0x5f, 0x8a, 0xa0, 0x00, 0x0f, 0x21, 0x16, 0xeb, 0x00},
{1152, 864, 100, 0x5f, 0x47, 0x47, 0x83, 0x4c, 0x93, 0x82, 0xff, 0x60, 0x61,
// 0x24, 0x5f, 0x5f, 0x83, 0x20, 0x00, 0x0f, 0x21, 0x40, 0xb3, 0x01},
0x24, 0x5f, 0x5f, 0x83, 0x20, 0x00, 0x0f, 0x21, 0x0a, 0x9f, 0x01},
{1024, 768, 60, 0xa3, 0x7f, 0x7f, 0x87, 0x83, 0x94, 0x24, 0xf5, 0x60, 0x04,
// 0x2a, 0xff, 0xff, 0x25, 0x00, 0x00, 0xcf, 0x21, 0x5d, 0xe1, 0x00},
0x2a, 0xff, 0xff, 0x25, 0x00, 0x00, 0xcf, 0x21, 0x07, 0x6b, 0x00},
{1024, 768, 70, 0xa1, 0x7f, 0x7f, 0x85, 0x83, 0x94, 0x24, 0xf5, 0x60, 0x03,
// 0x29, 0xff, 0xff, 0x25, 0x00, 0x00, 0xcf, 0x21, 0x4d, 0xda, 0x00},
0x29, 0xff, 0xff, 0x25, 0x00, 0x00, 0xcf, 0x21, 0x13, 0xf9, 0x00},
{1024, 768, 72, 0xa1, 0x7f, 0x7f, 0x85, 0x83, 0x94, 0x24, 0xf5, 0x60, 0x03,
0x29, 0xff, 0xff, 0x25, 0x00, 0x00, 0xcf, 0x21, 0x74, 0xa5, 0x00},
{1024, 768, 75, 0x9f, 0x7f, 0x7f, 0x83, 0x82, 0x8e, 0x1e, 0xf5, 0x60, 0x01,
// 0x24, 0xff, 0xff, 0x1f, 0x00, 0x00, 0x0f, 0x21, 0x29, 0x82, 0x00},
0x24, 0xff, 0xff, 0x1f, 0x00, 0x00, 0x0f, 0x21, 0x12, 0x82, 0x00},
{1024, 768, 85, 0xa7, 0x7f, 0x7f, 0x8b, 0x86, 0x92, 0x26, 0xf5, 0x60, 0x01,
// 0x24, 0xff, 0xff, 0x27, 0x00, 0x00, 0x0f, 0x21, 0x35, 0xc4, 0x00},
0x24, 0xff, 0xff, 0x27, 0x00, 0x00, 0x0f, 0x21, 0x0e, 0x82, 0x00},
{1024, 768, 100, 0xa7, 0x7f, 0x7f, 0x8b, 0x86, 0x92, 0x26, 0xf5, 0x60, 0x01,
// 0x24, 0xff, 0xff, 0x27, 0x00, 0x00, 0x0f, 0x21, 0x3c, 0x82, 0x00},
0x24, 0xff, 0xff, 0x27, 0x00, 0x00, 0x0f, 0x21, 0x06, 0x5b, 0x00},
{1024, 768, 120, 0xa7, 0x7f, 0x7f, 0x8b, 0x86, 0x92, 0x26, 0xf5, 0x60, 0x01,
// 0x24, 0xff, 0xff, 0x27, 0x00, 0x00, 0x0f, 0x21, 0x50, 0xcb, 0x00},
0x24, 0xff, 0xff, 0x27, 0x00, 0x00, 0x0f, 0x21, 0x0a, 0x93, 0x00},
{1280, 960, 60, 0xdc, 0x9f, 0x9f, 0x80, 0xac, 0x9a, 0xe6, 0xff, 0x60, 0xc1,
0x24, 0xbf, 0xbf, 0xe7, 0xa0, 0x00, 0x0f, 0x21, 0x50, 0xa4, 0x00},
{1280, 960, 75, 0xcd, 0x9f, 0x9f, 0x91, 0xa4, 0x16, 0xe6, 0xff, 0x60, 0xc1,
0x24, 0xbf, 0xbf, 0xe7, 0xa0, 0x00, 0x0f, 0x21, 0x0c, 0x2a, 0x00},
{1280, 960, 85, 0x67, 0x4f, 0x4f, 0x8b, 0x54, 0x9e, 0xf1, 0xff, 0x60, 0xc1,
0x24, 0xbf, 0xbf, 0xf2, 0x20, 0x00, 0x0f, 0x21, 0x38, 0xa4, 0x01},
{1280, 1024, 60, 0xce, 0x9f, 0x9f, 0x92, 0xa6, 0x14, 0x28, 0x5a, 0x60, 0x01,
// 0x24, 0xff, 0xff, 0x29, 0xa0, 0x41, 0x0f, 0x21, 0x50, 0xa4, 0x00},
0x24, 0xff, 0xff, 0x29, 0xa0, 0x41, 0x0f, 0x21, 0x12, 0xb3, 0x00},
{1280, 1024, 75, 0xce, 0x9f, 0x9f, 0x92, 0xa2, 0x14, 0x28, 0x5a, 0x60, 0x01,
// 0x24, 0xff, 0xff, 0x29, 0xa0, 0x41, 0x0f, 0x21, 0x30, 0x82, 0x00},
0x24, 0xff, 0xff, 0x29, 0xa0, 0x41, 0x0f, 0x21, 0x15, 0x82, 0x00},
{1280, 1024, 85, 0x67, 0x4f, 0x4f, 0x8b, 0x54, 0x9e, 0x2e, 0x5a, 0x60, 0x01,
// 0x24, 0xff, 0xff, 0x2f, 0x20, 0x41, 0x0f, 0x21, 0x28, 0x82, 0x01},
0x24, 0xff, 0xff, 0x2f, 0x20, 0x41, 0x0f, 0x21, 0x11, 0x82, 0x01},
{1280, 1024, 100, 0x67, 0x4f, 0x4f, 0x8b, 0x54, 0x9e, 0x2e, 0x5a, 0x60, 0x01,
// 0x24, 0xff, 0xff, 0x2f, 0x20, 0x41, 0x0f, 0x21, 0x3c, 0xda, 0x01},
0x24, 0xff, 0xff, 0x2f, 0x20, 0x41, 0x0f, 0x21, 0x0a, 0xcd, 0x01},
{1600, 1024, 76, 0x7e, 0x63, 0x63, 0x82, 0x66, 0x0f, 0x2c, 0x5a, 0x60, 0x03,
0x06, 0xff, 0xff, 0x2d, 0x80, 0x41, 0xcf, 0x21, 0x4c, 0xf8, 0x01,},
{1600, 1200, 60, 0x82, 0x63, 0x63, 0x86, 0x68, 0x14, 0xe0, 0x10, 0x40, 0xb1,
// 0x24, 0xaf, 0xaf, 0xe1, 0x80, 0x55, 0x0f, 0x21, 0x44, 0xd5, 0x01},
0x24, 0xaf, 0xaf, 0xe1, 0x80, 0x55, 0x0f, 0x21, 0x0a, 0xb3, 0x01},
{1600, 1200, 65, 0x82, 0x63, 0x63, 0x86, 0x68, 0x14, 0xe0, 0x10, 0x40, 0xb1,
// 0x24, 0xaf, 0xaf, 0xe1, 0x80, 0x55, 0x0f, 0x21, 0x44, 0xe7, 0x01},
0x24, 0xaf, 0xaf, 0xe1, 0x80, 0x55, 0x0f, 0x21, 0x11, 0x91, 0x01},
{1600, 1200, 70, 0x82, 0x63, 0x63, 0x86, 0x68, 0x14, 0xe0, 0x10, 0x40, 0xb1,
// 0x24, 0xaf, 0xaf, 0xe1, 0x80, 0x55, 0x0f, 0x21, 0x34, 0xc4, 0x01},
0x24, 0xaf, 0xaf, 0xe1, 0x80, 0x55, 0x0f, 0x21, 0x0d, 0x82, 0x01},
{1600, 1200, 75, 0x82, 0x63, 0x63, 0x86, 0x68, 0x14, 0xe0, 0x10, 0x40, 0xb1,
// 0x24, 0xaf, 0xaf, 0xe1, 0x80, 0x55, 0x0f, 0x21, 0x30, 0xc4, 0x01},
0x24, 0xaf, 0xaf, 0xe1, 0x80, 0x55, 0x0f, 0x21, 0x09, 0x6f, 0x01},
{1600, 1200, 80, 0x82, 0x63, 0x63, 0x86, 0x68, 0x14, 0xe0, 0x10, 0x40, 0xb1,
// 0x24, 0xaf, 0xaf, 0xe1, 0x80, 0x55, 0x0f, 0x21, 0x24, 0xa4, 0x01},
0x24, 0xaf, 0xaf, 0xe1, 0x80, 0x55, 0x0f, 0x21, 0x11, 0xb3, 0x01},
{1600, 1200, 85, 0x82, 0x63, 0x63, 0x86, 0x68, 0x14, 0xe0, 0x10, 0x40, 0xb1,
// 0x24, 0xaf, 0xaf, 0xe1, 0x80, 0x55, 0x0f, 0x21, 0x0c, 0x4e, 0x01},
0x24, 0xaf, 0xaf, 0xe1, 0x80, 0x55, 0x0f, 0x21, 0x09, 0x7e, 0x01},
{1792, 1344, 60, 0x8e, 0x6f, 0x6f, 0x92, 0x71, 0x1f, 0x74, 0x1f, 0x40, 0x43,
// 0x29, 0x3f, 0x3f, 0x75, 0x80, 0x55, 0x0f, 0x21, 0x30, 0xbf, 0x01},
0x29, 0x3f, 0x3f, 0x75, 0x80, 0x55, 0x0f, 0x21, 0x15, 0xbf, 0x01},
{1792, 1344, 75, 0x94, 0x6f, 0x6f, 0x98, 0x74, 0x01, 0x87, 0x1f, 0x40, 0x4a,
// 0x4d, 0x3f, 0x3f, 0x88, 0x00, 0x55, 0x0f, 0x21, 0x0c, 0x59, 0x01},
0x4d, 0x3f, 0x3f, 0x88, 0x00, 0x55, 0x0f, 0x21, 0x05, 0x6b, 0x01},
{1856, 1392, 60, 0x92, 0x73, 0x73, 0x96, 0x7c, 0x03, 0xa4, 0x1f, 0x40, 0x73,
// 0x29, 0x6f, 0x6f, 0xa5, 0x00, 0x55, 0x0f, 0x21, 0x3c, 0xf7, 0x01},
0x29, 0x6f, 0x6f, 0xa5, 0x00, 0x55, 0x0f, 0x21, 0x15, 0xcb, 0x01},
{1920, 1200, 76, 0x9d, 0x77, 0x77, 0x81, 0x7c, 0x8b, 0xe0, 0x10, 0x40, 0xb3,
0xb6, 0xaf, 0xaf, 0xe1, 0x00, 0x55, 0xcf, 0x21, 0x14, 0x76, 0x01,},
{1920, 1440, 60, 0x9d, 0x77, 0x77, 0x81, 0x7a, 0x87, 0xda, 0x1f, 0x40, 0xa1,
// 0x24, 0x9f, 0x9f, 0xdb, 0x00, 0x55, 0x0f, 0x21, 0x30, 0xe3, 0x01},
0x24, 0x9f, 0x9f, 0xdb, 0x00, 0x55, 0x0f, 0x21, 0x0d, 0xa1, 0x01},
{2048, 1536, 60, 0x98, 0x7f, 0x7f, 0x9c, 0x80, 0x0f, 0x3b, 0xba, 0x40, 0x01,
0x04, 0xff, 0xff, 0x3c, 0x00, 0x55, 0x0f, 0x21, 0x28, 0xc7, 0x01,},
{2048, 1536, 75, 0xa1, 0x7f, 0x7f, 0x85, 0x84, 0x90, 0x44, 0xba, 0x40, 0x01,
0x04, 0xff, 0xff, 0x45, 0x00, 0x55, 0x0f, 0x21, 0x1c, 0xc7, 0x01,},
// STB Begin Changes
#endif // #ifdef H4
// STB End Changes

151
glide2x/h3/cinit/plltable.h Normal file
View File

@@ -0,0 +1,151 @@
/*
** THIS SOFTWARE IS SUBJECT TO COPYRIGHT PROTECTION AND IS OFFERED ONLY
** PURSUANT TO THE 3DFX GLIDE GENERAL PUBLIC LICENSE. THERE IS NO RIGHT
** TO USE THE GLIDE TRADEMARK WITHOUT PRIOR WRITTEN PERMISSION OF 3DFX
** INTERACTIVE, INC. A COPY OF THIS LICENSE MAY BE OBTAINED FROM THE
** DISTRIBUTOR OR BY CONTACTING 3DFX INTERACTIVE INC(info@3dfx.com).
** THIS PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
** EXPRESSED OR IMPLIED. SEE THE 3DFX GLIDE GENERAL PUBLIC LICENSE FOR A
** FULL TEXT OF THE NON-WARRANTY PROVISIONS.
**
** 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.
**
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
**
** File name: plltable.h
**
** Description: The V3 PLL table.
**
** $History: plltable.h $
**
** ***************** Version 1 *****************
** User: Sapphire Date: 3/16/99 Time: 7:28p
** Created in $/Releases/Voodoo3/V3_OEM_100/3dfx/devel/H3/cinit
**
** ***************** Version 4 *****************
** User: Michael Date: 1/12/99 Time: 9:23a
** Updated in $/devel/h3/Win95/dx/minivdd
** Implement the 3Dfx/STB unified header.
**
** ***************** Version 3 *****************
** User: Artg Date: 8/27/98 Time: 11:08a
** Updated in $/devel/h3/Win95/dx/minivdd
** added guard ifdef for redundant plltable define.
**
** ***************** Version 2 *****************
** User: Ken Date: 4/15/98 Time: 6:42p
** Updated in $/devel/h3/win95/dx/minivdd
** added unified header to all files, with revision, etc. info in it
*/
//
// generated by gen_plltable.pl at Thu Apr 9 18:44:30 1998
//
#define MIN_PLL_FREQ 30
#define MAX_PLL_FREQ 120
#if !defined(Host_H3)
FxU32 _pllTable[] = {
// pllCtrl n m k actual(MHz)
// ------- --- --- --- -----------
0x00006B2E, // 107 11 2 30.013108
0x00001806, // 24 1 2 31.022723
0x00007B32, // 123 12 2 31.960223
0x0000511E, // 81 7 2 33.011359
0x0000240A, // 36 2 2 34.005677
0x0000561E, // 86 7 2 34.999996
0x0000772A, // 119 10 2 36.093745
0x00001D06, // 29 1 2 36.988632
0x0000531A, // 83 6 2 38.032666
0x00006B22, // 107 8 2 39.017041
0x00007926, // 121 9 2 40.025821
0x00007C26, // 124 9 2 41.002061
0x00002D0A, // 45 2 2 42.059654
0x00002206, // 34 1 2 42.954540
0x00005416, // 84 5 2 43.977267
0x00005616, // 86 5 2 44.999994
0x00005816, // 88 5 2 46.022721
0x0000671A, // 103 6 2 46.981528
0x0000410E, // 65 3 2 47.965903
0x00002706, // 39 1 2 48.920448
0x00002806, // 40 1 2 50.113630
0x0000370A, // 55 2 2 51.008516
0x0000380A, // 56 2 2 51.903402
0x0000480E, // 72 3 2 52.977266
0x0000771A, // 119 6 2 54.140618
0x0000791A, // 121 6 2 55.035504
0x00007B1A, // 123 6 2 55.930391
0x00007D1A, // 125 6 2 56.825277
0x00004F0E, // 79 3 2 57.988629
0x0000400A, // 64 2 2 59.062492
0x00006B2D, // 107 11 1 60.026216
0x00007E35, // 126 13 1 61.090901
0x00001805, // 24 1 1 62.045447
0x00002A0D, // 42 3 1 62.999992
0x00007B31, // 123 12 1 63.920446
0x0000742D, // 116 11 1 64.982509
0x0000511D, // 81 7 1 66.022719
0x00006525, // 101 9 1 67.035115
0x00002409, // 36 2 1 68.011355
0x00006825, // 104 9 1 68.987595
0x0000561D, // 86 7 1 69.999991
0x00007529, // 117 10 1 70.994309
0x00007729, // 119 10 1 72.187491
0x0000310D, // 49 3 1 73.022718
0x00001D05, // 29 1 1 73.977263
0x00007125, // 113 9 1 74.845032
0x00005319, // 83 6 1 76.065331
0x00002909, // 41 2 1 76.960217
0x00006B21, // 107 8 1 78.034081
0x00001F05, // 31 1 1 78.749990
0x00007925, // 121 9 1 80.051643
0x00006F21, // 111 8 1 80.897717
0x00007C25, // 124 9 1 82.004122
0x0000380D, // 56 3 1 83.045444
0x00002D09, // 45 2 1 84.119308
0x00005D19, // 93 6 1 85.014194
0x00002205, // 34 1 1 85.909080
0x00005315, // 83 5 1 86.931807
0x00005415, // 84 5 1 87.954534
0x00005515, // 85 5 1 88.977261
0x00005615, // 86 5 1 89.999989
0x00005715, // 87 5 1 91.022716
0x00005815, // 88 5 1 92.045443
0x00002505, // 37 1 1 93.068170
0x00006719, // 103 6 1 93.963056
0x00005B15, // 91 5 1 95.113624
0x0000410D, // 65 3 1 95.931806
0x0000781D, // 120 7 1 97.045442
0x00002705, // 39 1 1 97.840897
0x00005111, // 81 4 1 99.034078
0x00002805, // 40 1 1 100.227260
0x00007D1D, // 125 7 1 101.022714
0x00003709, // 55 2 1 102.017033
0x00007119, // 113 6 1 102.911919
0x00003809, // 56 2 1 103.806805
0x00002A05, // 42 1 1 104.999987
0x0000480D, // 72 3 1 105.954532
0x00002B05, // 43 1 1 107.386350
0x00007719, // 119 6 1 108.281236
0x00003B09, // 59 2 1 109.176123
0x00007919, // 121 6 1 110.071009
0x00003C09, // 60 2 1 110.965895
0x00007B19, // 123 6 1 111.860781
0x00004D0D, // 77 3 1 113.113622
0x00007D19, // 125 6 1 113.650554
0x00002E05, // 46 1 1 114.545440
0x00004F0D, // 79 3 1 115.977258
0x00002F05, // 47 1 1 116.931803
0x00004009, // 64 2 1 118.124985
0x0000510D, // 81 3 1 118.840894
0x00006B2C, // 107 11 0 120.052432
};
FxU32 *pllTable = (FxU32*) (_pllTable - MIN_PLL_FREQ);
#endif

View File

@@ -17,8 +17,11 @@
;; ;;
;; COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED ;; COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
;; ;;
;; $Header$ ;; Revision 1.1.1.1.2.1 2006/11/30 09:16:50 guillemj
;; $Log$ ;; Switch to the new "build system", to be in sync with the rest of glide.
;; Backport cpudtect.asm from glide3 for h3.
;; Add fpu.c to cvg.
;;
;; Revision 1.1.1.1.8.1 2003/11/07 13:38:38 dborca ;; Revision 1.1.1.1.8.1 2003/11/07 13:38:38 dborca
;; unite the clans ;; unite the clans
;; ;;
@@ -66,7 +69,7 @@ CPUTypeP6 equ 6h
;;; References to external data: ;;; References to external data:
segment TEXT segment SEG_TEXT
;; ;;
;; _cpu_detect_asm - detect the type of CPU ;; _cpu_detect_asm - detect the type of CPU
;; ;;

View File

@@ -752,29 +752,17 @@ all_done:
* between them. * between them.
*/ */
asm ( asm (
#if defined(PIC) #if defined(PIC)
"popl %%ebx\n\t" "popl %%ebx\n\t"
#endif #endif
#if !defined(BIG_OPT) "jmp *%0"
"popl %%ebp\n\t" :
: "m" (_GlideRoot.curGC->archDispatchProcs.triSetupProc)
#if defined(PIC)
: "ebx"
#endif #endif
"jmp *%0" );
: /* no outputs */
:"m" (_GlideRoot.curGC->archDispatchProcs.triSetupProc)
#if defined (PIC) || !defined (BIG_OPT)
:
#endif
#if defined (PIC)
"ebx"
#endif
#if defined (PIC) && !defined (BIG_OPT)
,
#endif
#if !defined(BIG_OPT)
"ebp"
#endif
);
#endif #endif
#endif #endif
#undef FN_NAME #undef FN_NAME

View File

@@ -112,6 +112,8 @@ override USE_FIFO = 1
ifeq ($(USE_X86),1) ifeq ($(USE_X86),1)
CDEFS += -DGLIDE_DISPATCH_SETUP=1 -DGLIDE_DISPATCH_DOWNLOAD=1 CDEFS += -DGLIDE_DISPATCH_SETUP=1 -DGLIDE_DISPATCH_DOWNLOAD=1
override USE_FIFO = 1 override USE_FIFO = 1
CDEFS += -DHAVE_XDRAWTRI_ASM=1
override USE_DRAWTRI_ASM = 1
else else
CDEFS += -DGLIDE_USE_C_TRISETUP=1 CDEFS += -DGLIDE_USE_C_TRISETUP=1
endif endif
@@ -139,7 +141,7 @@ ASFLAGS = -O6 -felf -D__linux__
ASFLAGS += $(CDEFS) ASFLAGS += $(CDEFS)
# compiler # compiler
CFLAGS = -Wall -W CFLAGS = -Wall
CFLAGS += -I. -I../../incsrc -I../../minihwc -I../../cinit CFLAGS += -I. -I../../incsrc -I../../minihwc -I../../cinit
CFLAGS += -I$(FX_GLIDE_SW)/fxmisc -I$(FX_GLIDE_SW)/newpci/pcilib -I$(FX_GLIDE_SW)/fxmemmap CFLAGS += -I$(FX_GLIDE_SW)/fxmisc -I$(FX_GLIDE_SW)/newpci/pcilib -I$(FX_GLIDE_SW)/fxmemmap
CFLAGS += $(CDEFS) CFLAGS += $(CDEFS)
@@ -150,11 +152,12 @@ override USE_X86 = 1
endif endif
ifeq ($(USE_X86),1) ifeq ($(USE_X86),1)
CFLAGS += -DGL_X86 CFLAGS += -DGL_X86 -DBIG_OPT
OPTFLAGS ?= -O2 -ffast-math OPTFLAGS ?= -O6 -march=pentium2 -mtune=pentium3 -fomit-frame-pointer -funroll-loops \
-fexpensive-optimizations -ffast-math
else else
CFLAGS += -DGLIDE_USE_C_TRISETUP CFLAGS += -DGLIDE_USE_C_TRISETUP
OPTFLAGS ?= -O2 -ffast-math OPTFLAGS ?= -O6 -march=pentium2 -mtune=pentium3 -ffast-math
endif endif
# optflags # optflags
@@ -191,6 +194,9 @@ GLIDE_OBJECTS = \
cpuid.o \ cpuid.o \
xtexdl_def.o xtexdl_def.o
ifeq ($(USE_DRAWTRI_ASM),1)
GLIDE_OBJECTS += xdrawtri.o
endif
ifeq ($(USE_X86),1) ifeq ($(USE_X86),1)
GLIDE_OBJECTS += \ GLIDE_OBJECTS += \
xdraw2_def.o \ xdraw2_def.o \
@@ -256,7 +262,7 @@ $(GLIDE_LIBDIR)/$(GLIDE_SO): $(GLIDE_LIBDIR)/$(GLIDE_SHARED)
ln -fs $(GLIDE_SHARED) $(GLIDE_LIBDIR)/$(GLIDE_SO) ln -fs $(GLIDE_SHARED) $(GLIDE_LIBDIR)/$(GLIDE_SO)
$(GLIDE_LIBDIR)/$(GLIDE_SHARED): $(GLIDE_OBJECTS:.o=.lo) $(GLIDE_LIBDIR)/$(GLIDE_SHARED): $(GLIDE_OBJECTS:.o=.lo)
$(CC) -o $@ -shared -Wl,-soname,$(GLIDE_SONAME) $^ $(LDFLAGS) $(LDLIBS) $(CC) -o $@ -shared -Wl,--no-undefined -Wl,-soname,$(GLIDE_SONAME) $^ $(LDFLAGS) $(LDLIBS)
############################################################################### ###############################################################################
# rules(2) # rules(2)
@@ -274,6 +280,8 @@ xdraw3_3dnow.o: xdraw3.asm
$(AS) -o $@ $(ASFLAGS) -DGL_AMD3D=1 $< $(AS) -o $@ $(ASFLAGS) -DGL_AMD3D=1 $<
xtexdl_3dnow.o: xtexdl.asm xtexdl_3dnow.o: xtexdl.asm
$(AS) -o $@ $(ASFLAGS) -DGL_AMD3D=1 $< $(AS) -o $@ $(ASFLAGS) -DGL_AMD3D=1 $<
xdrawtri.o: xdrawtri.asm
$(AS) -o $@ $(ASFLAGS) $<
cpuid.lo: cpuid.o cpuid.lo: cpuid.o
$(CP) $< $@ $(CP) $< $@
@@ -287,6 +295,8 @@ xdraw3_3dnow.lo: xdraw3_3dnow.o
$(CP) $< $@ $(CP) $< $@
xtexdl_3dnow.lo: xtexdl_3dnow.o xtexdl_3dnow.lo: xtexdl_3dnow.o
$(CP) $< $@ $(CP) $< $@
xdrawtri.lo: xdrawtri.o
$(CP) $< $@
$(GLIDE_OBJECTS): fxinline.h fxgasm.h $(GLIDE_OBJECTS): fxinline.h fxgasm.h
@@ -308,7 +318,7 @@ clean:
-$(RM) ../../cinit/*.o ../../cinit/*.lo -$(RM) ../../cinit/*.o ../../cinit/*.lo
-$(RM) ../../minihwc/*.o ../../minihwc/*.lo -$(RM) ../../minihwc/*.o ../../minihwc/*.lo
-$(RM) $(FX_GLIDE_SW)/newpci/pcilib/*.o $(FX_GLIDE_SW)/newpci/pcilib/*.lo -$(RM) $(FX_GLIDE_SW)/newpci/pcilib/*.o $(FX_GLIDE_SW)/newpci/pcilib/*.lo
-$(RM) $(FX_GLIDE_SW)/fxmisc/linutil.o $(FX_GLIDE_SW)/fxmisc/linutil.lo -$(RM) $(FX_GLIDE_SW)/fxmisc/*.o $(FX_GLIDE_SW)/fxmisc/*.lo
-$(RM) fxinline.h -$(RM) fxinline.h
-$(RM) fxgasm.h -$(RM) fxgasm.h

View File

@@ -56,161 +56,143 @@
; B4 Chip field fix. ; B4 Chip field fix.
;; ;;
TITLE xdraw2.asm %include "xos.inc"
OPTION OLDSTRUCTS
.586P extrn _GlideRoot
.MMX extrn _FifoMakeRoom
.K3D
EXTRN __GlideRoot: DWORD segment SEG_DATA
EXTRN __FifoMakeRoom: NEAR One DD 1.0
_DATA SEGMENT
One DD 03f800000r
Area DD 0 Area DD 0
IF GLIDE_PACKED_RGB %if GLIDE_PACKED_RGB
bias0 DD 0 bias0 DD 0
bias1 DD 0 bias1 DD 0
ENDIF %endif
_DATA ENDS
; Ugly, but seems to workaround the problem with locally defined ; Ugly, but seems to workaround the problem with locally defined
; data segment globals not getting relocated properly when using ; data segment globals not getting relocated properly when using
; djgpp. ; djgpp.
zArea TEXTEQU <One+04h> %define zArea One+04h
;;; Definitions of cvg regs and glide root structures. ;;; Definitions of cvg regs and glide root structures.
INCLUDE fxgasm.h %include "fxgasm.h"
; Arguments (STKOFF = 16 from 4 pushes) ; Arguments (STKOFF = 16 from 4 pushes)
STKOFF = 16 STKOFF equ 16
_va$ = 4 + STKOFF _va$ equ 4 + STKOFF
_vb$ = 8 + STKOFF _vb$ equ 8 + STKOFF
_vc$ = 12 + STKOFF _vc$ equ 12 + STKOFF
PROC_TYPE MACRO procType:=<Default> X equ 0
IFDEF GL_AMD3D Y equ 4
EXITM <__trisetup_3DNow_&procType&@12>
ELSE %MACRO PROC_TYPE 1
EXITM <__trisetup_Default_&procType&@12> %IFDEF GL_AMD3D
ENDIF proc _trisetup_3DNow_%1, 12
ENDM %ELSE
proc _trisetup_Default_%1, 12
%ENDIF
%ENDM
;-------------------------------------------------------------------------- ;--------------------------------------------------------------------------
_TEXT SEGMENT PAGE PUBLIC USE32 'CODE' segment SEG_TEXT
ASSUME DS: FLAT, SS: FLAT
ALIGN 32
PROC_TYPE cull
%define GLIDE_CULLING 1
%define GLIDE_PACK_RGB 0
%define GLIDE_PACK_ALPHA 0
%define GLIDE_GENERIC_SETUP 0
%INCLUDE "xdraw2.inc"
%undef GLIDE_GENERIC_SETUP
%undef GLIDE_PACK_ALPHA
%undef GLIDE_PACK_RGB
%undef GLIDE_CULLING
endp
ALIGN 32 ALIGN 32
PUBLIC PROC_TYPE(cull) %IF GLIDE_PACKED_RGB
PROC_TYPE(cull) PROC NEAR
GLIDE_CULLING textequ <1> PROC_TYPE cull_rgb
GLIDE_PACK_RGB textequ <0>
GLIDE_PACK_ALPHA textequ <0>
GLIDE_GENERIC_SETUP textequ <0>
INCLUDE xdraw2.inc
GLIDE_GENERIC_SETUP textequ <0>
GLIDE_PACK_ALPHA textequ <0>
GLIDE_PACK_RGB textequ <0>
GLIDE_CULLING textequ <0>
PROC_TYPE(cull) ENDP %define GLIDE_CULLING 1
%define GLIDE_PACK_RGB 1
%define GLIDE_PACK_ALPHA 0
%define GLIDE_GENERIC_SETUP 0
%INCLUDE "xdraw2.inc"
%undef GLIDE_GENERIC_SETUP
%undef GLIDE_PACK_ALPHA
%undef GLIDE_PACK_RGB
%undef GLIDE_CULLING
endp
ALIGN 32 ALIGN 32
PROC_TYPE cull_argb
IF GLIDE_PACKED_RGB %define GLIDE_CULLING 1
PUBLIC PROC_TYPE(cull_rgb) %define GLIDE_PACK_RGB 1
PROC_TYPE(cull_rgb) PROC NEAR %define GLIDE_PACK_ALPHA 1
%define GLIDE_GENERIC_SETUP 0
%INCLUDE "xdraw2.inc"
%undef GLIDE_GENERIC_SETUP
%undef GLIDE_PACK_ALPHA
%undef GLIDE_PACK_RGB
%undef GLIDE_CULLING
GLIDE_CULLING textequ <1> endp
GLIDE_PACK_RGB textequ <1> %ENDIF ; GLIDE_PACKED_RGB
GLIDE_PACK_ALPHA textequ <0>
GLIDE_GENERIC_SETUP textequ <0>
INCLUDE xdraw2.inc
GLIDE_GENERIC_SETUP textequ <0>
GLIDE_PACK_ALPHA textequ <0>
GLIDE_PACK_RGB textequ <0>
GLIDE_CULLING textequ <0>
PROC_TPYE(cull_rgb) ENDP
ALIGN 32
PUBLIC PROC_TPYE(cull_argb)
PROC_TPYE(cull_argb) PROC NEAR
GLIDE_CULLING textequ <1>
GLIDE_PACK_RGB textequ <1>
GLIDE_PACK_ALPHA textequ <1>
GLIDE_GENERIC_SETUP textequ <0>
INCLUDE xdraw2.inc
GLIDE_GENERIC_SETUP textequ <0>
GLIDE_PACK_ALPHA textequ <0>
GLIDE_PACK_RGB textequ <0>
GLIDE_CULLING textequ <0>
PROC_TPYE(cull_argb) ENDP
ENDIF ; GLIDE_PACKED_RGB
ALIGN 32 ALIGN 32
PROC_TYPE Default
PUBLIC PROC_TYPE() %define GLIDE_CULLING 0
PROC_TYPE() PROC NEAR %define GLIDE_PACK_RGB 0
%define GLIDE_PACK_ALPHA 0
%define GLIDE_GENERIC_SETUP 0
%INCLUDE "xdraw2.inc"
%undef GLIDE_GENERIC_SETUP
%undef GLIDE_PACK_ALPHA
%undef GLIDE_PACK_RGB
%undef GLIDE_CULLING
GLIDE_CULLING textequ <0> endp
GLIDE_PACK_RGB textequ <0>
GLIDE_PACK_ALPHA textequ <0>
GLIDE_GENERIC_SETUP textequ <0>
INCLUDE xdraw2.inc
GLIDE_GENERIC_SETUP textequ <0>
GLIDE_PACK_ALPHA textequ <0>
GLIDE_PACK_RGB textequ <0>
GLIDE_CULLING textequ <0>
PROC_TYPE() ENDP
ALIGN 32 ALIGN 32
IF GLIDE_PACKED_RGB %IF GLIDE_PACKED_RGB
PUBLIC PROC_TYPE(rgb)
PROC_TPYE(rgb) PROC NEAR
GLIDE_CULLING textequ <0> PROC_TYPE rgb
GLIDE_PACK_RGB textequ <1>
GLIDE_PACK_ALPHA textequ <0>
GLIDE_GENERIC_SETUP textequ <0>
INCLUDE xdraw2.inc
GLIDE_GENERIC_SETUP textequ <0>
GLIDE_PACK_ALPHA textequ <0>
GLIDE_PACK_RGB textequ <0>
GLIDE_CULLING textequ <0>
PROC_TPYE(rgb) ENDP %define GLIDE_CULLING 0
%define GLIDE_PACK_RGB 1
%define GLIDE_PACK_ALPHA 0
%define GLIDE_GENERIC_SETUP 0
%INCLUDE "xdraw2.inc"
%undef GLIDE_GENERIC_SETUP
%undef GLIDE_PACK_ALPHA
%undef GLIDE_PACK_RGB
%undef GLIDE_CULLING
endp
ALIGN 32 ALIGN 32
PROC_TYPE argb
PUBLIC PROC_TPYE(argb) %define GLIDE_CULLING 0
PROC_TPYE(argb) PROC NEAR %define GLIDE_PACK_RGB 1
%define GLIDE_PACK_ALPHA 1
GLIDE_CULLING textequ <0> %define GLIDE_GENERIC_SETUP 0
GLIDE_PACK_RGB textequ <1> %INCLUDE "xdraw2.inc"
GLIDE_PACK_ALPHA textequ <1> %undef GLIDE_GENERIC_SETUP
GLIDE_GENERIC_SETUP textequ <0> %undef GLIDE_PACK_ALPHA
INCLUDE xdraw2.inc %undef GLIDE_PACK_RGB
GLIDE_GENERIC_SETUP textequ <0> %undef GLIDE_CULLING
GLIDE_PACK_ALPHA textequ <0>
GLIDE_PACK_RGB textequ <0>
GLIDE_CULLING textequ <0>
PROC_TPYE(argb) ENDP
ENDIF ; GLIDE_PACKED_RGB
_TEXT ENDS
END
endp
%ENDIF ; GLIDE_PACKED_RGB

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,38 @@
/*
* THIS SOFTWARE IS SUBJECT TO COPYRIGHT PROTECTION AND IS OFFERED ONLY
* PURSUANT TO THE 3DFX GLIDE GENERAL PUBLIC LICENSE. THERE IS NO RIGHT
* TO USE THE GLIDE TRADEMARK WITHOUT PRIOR WRITTEN PERMISSION OF 3DFX
* INTERACTIVE, INC. A COPY OF THIS LICENSE MAY BE OBTAINED FROM THE
* DISTRIBUTOR OR BY CONTACTING 3DFX INTERACTIVE INC(info@3dfx.com).
* THIS PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
* EXPRESSED OR IMPLIED. SEE THE 3DFX GLIDE GENERAL PUBLIC LICENSE FOR A
* FULL TEXT OF THE NON-WARRANTY PROVISIONS.
*
* 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.
*
* COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
*/
/* Adapted from gdraw.c:grDrawTriangle() for gas */
#include "fxgasm.h"
.extern _GlideRoot
.text
.p2align 4,,15
.globl grDrawTriangle
.type grDrawTriangle,@function
grDrawTriangle:
/*movl (_GlideRoot+curGC),%edx
movl kTriProcOffset(%edx),%eax*/
movl (_GlideRoot + curGC),%eax
jmp *kTriProcOffset(%eax)
.p2align 4,,15

View File

@@ -0,0 +1,46 @@
;; THIS SOFTWARE IS SUBJECT TO COPYRIGHT PROTECTION AND IS OFFERED ONLY
;; PURSUANT TO THE 3DFX GLIDE GENERAL PUBLIC LICENSE. THERE IS NO RIGHT
;; TO USE THE GLIDE TRADEMARK WITHOUT PRIOR WRITTEN PERMISSION OF 3DFX
;; INTERACTIVE, INC. A COPY OF THIS LICENSE MAY BE OBTAINED FROM THE
;; DISTRIBUTOR OR BY CONTACTING 3DFX INTERACTIVE INC(info@3dfx.com).
;; THIS PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
;; EXPRESSED OR IMPLIED. SEE THE 3DFX GLIDE GENERAL PUBLIC LICENSE FOR A
;; FULL TEXT OF THE NON-WARRANTY PROVISIONS.
;;
;; 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.
;;
;; COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
;; Adapted from gdraw.c:grDrawTriangle() for nasm
%include "xos.inc"
%include "fxgasm.h"
extrn _GlideRoot
segment SEG_TEXT
align 16
proc grDrawTriangle, 12
;;mov edx, dword [_GlideRoot+curGC]
;;mov eax, dword [edx+kTriProcOffset]
mov eax, dword [_GlideRoot+curGC]
jmp [eax + kTriProcOffset]
endp
align 16
%if XOS == XOS_WIN32
%ifdef __MINGW32__
; GNU LD fails with '_' prefix
export grDrawTriangle@12
%else
export _grDrawTriangle@12
%endif
%endif ; _WIN32

View File

@@ -1,8 +1,9 @@
; ;
; compulsory header for glide3/xdraw* assembly specializations (NASM) ; compulsory header for glide3/xdraw* assembly specializations (NASM)
; ;
; $Header$ ; Revision 1.1.2.1 2006/12/03 04:47:28 guillemj
; $Log$ ; Backported from glide3x.
;
; Revision 1.1.2.3 2004/10/04 08:57:52 dborca ; Revision 1.1.2.3 2004/10/04 08:57:52 dborca
; supporting DOS/OpenWatcom in Assembly files ; supporting DOS/OpenWatcom in Assembly files
; ;
@@ -74,7 +75,7 @@
%macro endp 0 %macro endp 0
%ifnctx proc %ifnctx proc
%error Mismatched `endp'/`proc' %error Mismatched ENDP/PROC
%else %else
%pop %pop
%endif %endif
@@ -105,9 +106,9 @@
;--------------------------------------- ;---------------------------------------
%if XOS == XOS_WIN32 %if XOS == XOS_WIN32
%define TEXT .text align=32 %define SEG_TEXT .text align=32
%define DATA .data align=32 %define SEG_DATA .data align=32
%define CONST .rdata align=32 %define SEG_CONST .rdata align=32
%endif %endif
@@ -116,9 +117,9 @@
;--------------------------------------- ;---------------------------------------
%if XOS == XOS_DJGPP %if XOS == XOS_DJGPP
%define TEXT .text %define SEG_TEXT .text
%define DATA .data %define SEG_DATA .data
%define CONST .rodata %define SEG_CONST .rodata
%endif %endif
@@ -127,9 +128,9 @@
;--------------------------------------- ;---------------------------------------
%if XOS == XOS_LINUX %if XOS == XOS_LINUX
%define TEXT .text align=32 %define SEG_TEXT .text align=32
%define DATA .data align=32 %define SEG_DATA .data align=32
%define CONST .rodata align=32 %define SEG_CONST .rodata align=32
%endif %endif
@@ -138,8 +139,8 @@
;--------------------------------------- ;---------------------------------------
%if XOS == XOS_WATCD %if XOS == XOS_WATCD
%define TEXT _TEXT align=1 public use32 class=CODE FLAT %define SEG_TEXT _TEXT align=1 public use32 class=CODE FLAT
%define DATA _DATA align=4 public use32 class=DATA FLAT %define SEG_DATA _DATA align=4 public use32 class=DATA FLAT
%define CONST CONST2 align=4 public use32 class=DATA FLAT %define SEG_CONST CONST2 align=4 public use32 class=DATA FLAT
%endif %endif

View File

@@ -54,55 +54,46 @@
;; mmx stuff for 3DNow!(tm) capable processors ;; mmx stuff for 3DNow!(tm) capable processors
;; ;;
TITLE xtexdl.asm %include "xos.inc"
OPTION OLDSTRUCTS
.586P
.MMX
.K3D
ifdef USE_PACKET_FIFO
EXTRN __FifoMakeRoom: NEAR
endif
%ifdef USE_PACKET_FIFO
extrn _FifoMakeRoom
%endif
;;; Definitions of cvg regs and glide root structures. ;;; Definitions of cvg regs and glide root structures.
INCLUDE fxgasm.h %INCLUDE "fxgasm.h"
; Arguments (STKOFF = 16 from 4 dword pushes) ; Arguments (STKOFF = 16 from 4 dword pushes)
STACKOFFSET = 16 STACKOFFSET equ 16
_gc$ = 4 + STACKOFFSET _gc$ equ 4 + STACKOFFSET
_baseAddr$ = 8 + STACKOFFSET _baseAddr$ equ 8 + STACKOFFSET
_maxS$ = 12 + STACKOFFSET _maxS$ equ 12 + STACKOFFSET
_minT$ = 16 + STACKOFFSET _minT$ equ 16 + STACKOFFSET
_maxT$ = 20 + STACKOFFSET _maxT$ equ 20 + STACKOFFSET
_texData$ = 24 + STACKOFFSET _texData$ equ 24 + STACKOFFSET
;; NB: The first set of registers (eax, ecx, and edx) are volatile across ;; NB: The first set of registers (eax, ecx, and edx) are volatile across
;; function calls. The remaining registers are supposedly non-volatile ;; function calls. The remaining registers are supposedly non-volatile
;; so they only store things that are non-volatile across the call. ;; so they only store things that are non-volatile across the call.
fifo TEXTEQU <ebp> ; fifo ptr in inner loop %define fifo ebp ; fifo ptr in inner loop
gc TEXTEQU <esi> ; graphics context %define gc esi ; graphics context
dataPtr TEXTEQU <edi> ; pointer to exture data to be downloaded %define dataPtr edi ; pointer to exture data to be downloaded
curT TEXTEQU <ebx> ; counter for texture scan lines (t-coordinate) %define curT ebx ; counter for texture scan lines (t-coordinate)
curS TEXTEQU <ecx> ; texture s-coordinate %define curS ecx ; texture s-coordinate
fRoom TEXTEQU <edx> ; room available in fifo (in bytes) %define fRoom edx ; room available in fifo (in bytes)
GR_FIFO_WRITE MACRO __addr, __offset, __data %MACRO GR_FIFO_WRITE 3
mov [__addr + __offset], __data mov [%1 + _%2], %3
ENDM ; GR_FIFO_WRITE %ENDM ; GR_FIFO_WRITE
;-------------------------------------------------------------------------- ;--------------------------------------------------------------------------
_TEXT SEGMENT PAGE PUBLIC USE32 'CODE' segment SEG_TEXT
ASSUME DS: FLAT, SS: FLAT
ALIGN 32 ALIGN 32
PUBLIC __grTexDownload_3DNow_MMX@24 proc _grTexDownload_3DNow_MMX, 24
__grTexDownload_3DNow_MMX@24 PROC NEAR
push ebx ; save caller's register variable push ebx ; save caller's register variable
mov curT, [esp + _maxT$ - 12] ; curT = maxT mov curT, [esp + _maxT$ - 12] ; curT = maxT
@@ -158,15 +149,15 @@ __grTexDownload_3DNow_MMX@24 PROC NEAR
cmp fRoom, 4 ; enough room for NULL packet in fifo? cmp fRoom, 4 ; enough room for NULL packet in fifo?
jge __mmxAlignFifo ; yes, write NULL packet to align fifo jge __mmxAlignFifo ; yes, write NULL packet to align fifo
ifdef USE_PACKET_FIFO %ifdef USE_PACKET_FIFO
push @Line ; Line # inside this function push __LINE__ ; Line # inside this function
push 0 ; NULL file name push 0 ; NULL file name
push 4 ; fifo space required (bytes) push 4 ; fifo space required (bytes)
call __FifoMakeRoom ; make fifo room call _FifoMakeRoom ; make fifo room
add esp, 12 ; pop 3 DWORD parameters to FifoMakeRoom add esp, 12 ; pop 3 DWORD parameters to FifoMakeRoom
endif %endif
mov fifo, [gc + fifoPtr] ; fifoPtr modified by FifoMakeRoom, reload mov fifo, [gc + fifoPtr] ; fifoPtr modified by FifoMakeRoom, reload
mov fRoom, [gc + fifoRoom] ; fifoRoom modified by FifoMakeRoom, reload mov fRoom, [gc + fifoRoom] ; fifoRoom modified by FifoMakeRoom, reload
@@ -177,7 +168,7 @@ endif
__mmxAlignFifo: __mmxAlignFifo:
mov DWORD PTR [fifo], 0 ; write NULL packet mov DWORD [fifo], 0 ; write NULL packet
sub fRoom, 4 ; fifoRoom -= 4 sub fRoom, 4 ; fifoRoom -= 4
mov [gc + fifoRoom], fRoom ; store new fifoRoom mov [gc + fifoRoom], fRoom ; store new fifoRoom
@@ -193,7 +184,7 @@ __mmxAlignFifo:
__loopT: __loopT:
IFDEF GLIDE_DEBUG %IFDEF GLIDE_DEBUG
;; Make sure that we have a QWORD aligned fifoPtr; force GP if not aligned ;; Make sure that we have a QWORD aligned fifoPtr; force GP if not aligned
@@ -203,7 +194,7 @@ IFDEF GLIDE_DEBUG
xor eax, eax ; create 0 xor eax, eax ; create 0
mov [eax], eax ; move to DS:[0] forces GP mov [eax], eax ; move to DS:[0] forces GP
__alignmentOK: __alignmentOK:
ENDIF ; GLIDE_DEBUG %ENDIF ; GLIDE_DEBUG
;; Compute packet header words ;; Compute packet header words
;; hdr1: downloadSpace[31:30] numWords[21:3] packetType[2:0] ;; hdr1: downloadSpace[31:30] numWords[21:3] packetType[2:0]
@@ -253,15 +244,15 @@ __startDownload:
cmp fRoom, eax ; fifo space available >= fifo space required ? cmp fRoom, eax ; fifo space available >= fifo space required ?
jge __loopT ; yup, write next scan line jge __loopT ; yup, write next scan line
ifdef USE_PACKET_FIFO %ifdef USE_PACKET_FIFO
push @Line ; Line # inside this function push __LINE__ ; Line # inside this function
push 0h ; NULL file name push 0h ; NULL file name
push eax ; fifo space required push eax ; fifo space required
call __FifoMakeRoom ; make fifo room (if fifoPtr QWORD aligned before call _FifoMakeRoom ; make fifo room (if fifoPtr QWORD aligned before
add esp, 12 ; pop 3 DWORD parameters to FifoMakeRoom add esp, 12 ; pop 3 DWORD parameters to FifoMakeRoom
endif %endif
mov fifo, [gc + fifoPtr] ; fifoPtr was modified by FifoMakeRoom, reload mov fifo, [gc + fifoPtr] ; fifoPtr was modified by FifoMakeRoom, reload
mov fRoom, [gc + fifoRoom] ; fifoRoom was modified by FifoMakeRoom, reload mov fRoom, [gc + fifoRoom] ; fifoRoom was modified by FifoMakeRoom, reload
@@ -278,10 +269,7 @@ __dlDone:
pop esi ; restore caller's register variable pop esi ; restore caller's register variable
pop ebx ; restore caller's register variable pop ebx ; restore caller's register variable
ret 24 ; pop 6 DWORD parameters and return ret ; pop 6 DWORD parameters and return
__grTexDownload_3DNow_MMX@24 ENDP endp
_TEXT ENDS
END

1
glide2x/mk.sh Normal file
View File

@@ -0,0 +1 @@
make -f makefile.linux FX_GLIDE_HW=cvg USE_X86=1

View File

@@ -1,7 +0,0 @@
#ifndef __FX_INLINE_H__
#define __FX_INLINE_H__
/* The # of 2-byte entries in the hw fog table */
#define kInternalFogTableEntryCount 0x40UL
#endif /* __FX_INLINE_H__ */

View File

@@ -312,10 +312,10 @@ static GrTexDownloadProc _texDownloadProcs[][2][4] =
_grTexDownload_3DNow_MMX, _grTexDownload_3DNow_MMX,
_grTexDownload_3DNow_MMX, _grTexDownload_3DNow_MMX,
}, },
} },
#endif /* GL_AMD3D */ #endif /* GL_AMD3D */
#if GL_MMX #if GL_MMX
,{ {
{ {
_grTexDownload_Default_8_1, _grTexDownload_Default_8_1,
_grTexDownload_Default_8_2, _grTexDownload_Default_8_2,

View File

@@ -18,12 +18,12 @@
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED ** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
*/ */
#include "fxbldno.h" //#include "fxbldno.h"
#define MANVERSION 3 #define MANVERSION 3
#define MANREVISION 03 #define MANREVISION 03
//#define BUILD_NUMBER 40405 #define BUILD_NUMBER 40405
#ifndef GLIDE3 #ifndef GLIDE3
#define VERSIONSTR "2.44\0" #define VERSIONSTR "2.44\0"

Binary file not shown.

View File

@@ -17,8 +17,9 @@
;; ;;
;; COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED ;; COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
;; ;;
;; $Header$ ;; Revision 1.1.1.1.8.1 2003/11/07 13:38:38 dborca
;; $Log$ ;; unite the clans
;;
;; Revision 1.1.1.1 1999/11/24 21:44:53 joseph ;; Revision 1.1.1.1 1999/11/24 21:44:53 joseph
;; Initial checkin for SourceForge ;; Initial checkin for SourceForge
;; ;;
@@ -63,7 +64,7 @@ CPUTypeP6 equ 6h
;;; References to external data: ;;; References to external data:
segment TEXT segment SEG_TEXT
;; ;;
;; _cpu_detect_asm - detect the type of CPU ;; _cpu_detect_asm - detect the type of CPU
;; ;;

View File

@@ -113,8 +113,8 @@ ifdef DEBUG
CDEFS += -DGDBG_INFO_ON -DGLIDE_DEBUG -DGLIDE_SANITY_ASSERT -DGLIDE_SANITY_SIZE CDEFS += -DGDBG_INFO_ON -DGLIDE_DEBUG -DGLIDE_SANITY_ASSERT -DGLIDE_SANITY_SIZE
endif endif
# other # shameless plug and splash screen - not for linux DRI builds
CDEFS += -DGLIDE_PLUG -DGLIDE_SPLASH #CDEFS += -DGLIDE_PLUG -DGLIDE_SPLASH
ifeq ($(TEXUS2),1) ifeq ($(TEXUS2),1)
CDEFS += -DHAVE_TEXUS2 CDEFS += -DHAVE_TEXUS2
@@ -132,7 +132,7 @@ ASFLAGS = -O6 -felf -D__linux__
ASFLAGS += $(CDEFS) ASFLAGS += $(CDEFS)
# compiler # compiler
CFLAGS = -Wall -W CFLAGS = -Wall
CFLAGS += -I. -I../../incsrc -I../../minihwc -I../../cinit CFLAGS += -I. -I../../incsrc -I../../minihwc -I../../cinit
CFLAGS += -I$(FX_GLIDE_SW)/fxmisc -I$(FX_GLIDE_SW)/newpci/pcilib -I$(FX_GLIDE_SW)/fxmemmap CFLAGS += -I$(FX_GLIDE_SW)/fxmisc -I$(FX_GLIDE_SW)/newpci/pcilib -I$(FX_GLIDE_SW)/fxmemmap
CFLAGS += -I$(FX_GLIDE_SW)/texus2/lib CFLAGS += -I$(FX_GLIDE_SW)/texus2/lib
@@ -278,7 +278,7 @@ $(GLIDE_LIBDIR)/$(GLIDE_SO): $(GLIDE_LIBDIR)/$(GLIDE_SHARED)
ln -fs $(GLIDE_SHARED) $(GLIDE_LIBDIR)/$(GLIDE_SO) ln -fs $(GLIDE_SHARED) $(GLIDE_LIBDIR)/$(GLIDE_SO)
$(GLIDE_LIBDIR)/$(GLIDE_SHARED): $(GLIDE_OBJECTS:.o=.lo) $(GLIDE_LIBDIR)/$(GLIDE_SHARED): $(GLIDE_OBJECTS:.o=.lo)
$(CC) -o $@ -shared -Wl,-soname,$(GLIDE_SONAME) $^ $(LDFLAGS) $(LDLIBS) $(CC) -o $@ -shared -Wl,--no-undefined -Wl,-soname,$(GLIDE_SONAME) $^ $(LDFLAGS) $(LDLIBS)
$(TEXUS_EXEDIR)/$(TEXUS_EXE): $(FX_GLIDE_SW)/texus2/cmd/cmd.c $(GLIDE_LIBDIR)/$(GLIDE_LIB) $(TEXUS_EXEDIR)/$(TEXUS_EXE): $(FX_GLIDE_SW)/texus2/cmd/cmd.c $(GLIDE_LIBDIR)/$(GLIDE_LIB)
ifeq ($(TEXUS2),1) ifeq ($(TEXUS2),1)

View File

@@ -16,9 +16,9 @@
;; ;;
;; COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED ;; COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
;; ;;
;; $Header$ ;; Revision 1.1.1.1.8.1 2003/11/07 13:38:39 dborca
;; $Revision$ ;; unite the clans
;; $Log$ ;;
;; Revision 1.1.1.1 1999/11/24 21:44:58 joseph ;; Revision 1.1.1.1 1999/11/24 21:44:58 joseph
;; Initial checkin for SourceForge ;; Initial checkin for SourceForge
;; ;;
@@ -108,11 +108,11 @@ extrn _grValidateState
movd [fifo], mm1 ; store current param | previous param movd [fifo], mm1 ; store current param | previous param
%ENDMACRO ; WRITE_MM1LOW_FIFO %ENDMACRO ; WRITE_MM1LOW_FIFO
segment DATA segment SEG_DATA
One DD 1.0 One DD 1.0
Area DD 0 Area DD 0
segment CONST segment SEG_CONST
$T2003 DD 12288.0 $T2003 DD 12288.0
$T2005 DD 1.0 $T2005 DD 1.0
$T2006 DD 256.0 $T2006 DD 256.0
@@ -150,7 +150,7 @@ Y equ 4
;-------------------------------------------------------------------------- ;--------------------------------------------------------------------------
segment TEXT segment SEG_TEXT
ALIGN 32 ALIGN 32
PROC_TYPE clip_nocull_invalid PROC_TYPE clip_nocull_invalid

View File

@@ -31,11 +31,11 @@ extrn _grCommandTransportMakeRoom, 12
;;; include listing.inc ;;; include listing.inc
%INCLUDE "fxgasm.h" %INCLUDE "fxgasm.h"
segment CONST segment SEG_CONST
ALIGN 8 ALIGN 8
_F256_F256 DD 256.0, 256.0 _F256_F256 DD 256.0, 256.0
segment DATA segment SEG_DATA
ALIGN 8 ALIGN 8
btab DD 0, 0, 0, 0, 0, 0, 0, 0 btab DD 0, 0, 0, 0, 0, 0, 0, 0
atab DD 0, 0, 0, 0, 0, 0, 0, 0 atab DD 0, 0, 0, 0, 0, 0, 0, 0
@@ -44,7 +44,7 @@ strideinbytes DD 0
vertices DD 0 vertices DD 0
segment TEXT segment SEG_TEXT
ALIGN 32 ALIGN 32
%define _mode 20 %define _mode 20
@@ -2143,14 +2143,14 @@ endp
;;; include listing.inc ;;; include listing.inc
%INCLUDE "fxgasm.h" %INCLUDE "fxgasm.h"
segment CONST segment SEG_CONST
_F1 DD 1.0 _F1 DD 1.0
_F256 DD 256.0 _F256 DD 256.0
_VPF1 DD 1.0 _VPF1 DD 1.0
_VPF256 DD 256.0 _VPF256 DD 256.0
segment DATA segment SEG_DATA
vSize DD 0 vSize DD 0
ccoow DD 0 ccoow DD 0
packetVal DD 0 packetVal DD 0
@@ -2162,7 +2162,7 @@ vPtr0 DD 0
vPtr1 DD 0 vPtr1 DD 0
vPtr2 DD 0 vPtr2 DD 0
segment TEXT segment SEG_TEXT
_pktype equ 20 _pktype equ 20
_type equ 24 _type equ 24

View File

@@ -0,0 +1,67 @@
;; THIS SOFTWARE IS SUBJECT TO COPYRIGHT PROTECTION AND IS OFFERED ONLY
;; PURSUANT TO THE 3DFX GLIDE GENERAL PUBLIC LICENSE. THERE IS NO RIGHT
;; TO USE THE GLIDE TRADEMARK WITHOUT PRIOR WRITTEN PERMISSION OF 3DFX
;; INTERACTIVE, INC. A COPY OF THIS LICENSE MAY BE OBTAINED FROM THE
;; DISTRIBUTOR OR BY CONTACTING 3DFX INTERACTIVE INC(info@3dfx.com).
;; THIS PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
;; EXPRESSED OR IMPLIED. SEE THE 3DFX GLIDE GENERAL PUBLIC LICENSE FOR A
;; FULL TEXT OF THE NON-WARRANTY PROVISIONS.
;;
;; 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.
;;
;; COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
;; Adapted from gdraw.c:grDrawTriangle() for nasm
%include "xos.inc"
%if XOS == XOS_WIN32
%else
%error This source is only meant for x86/Windows
%endif
%include "fxgasm.h"
; tls constants (from fxglide.h)
%define W95_TEB_PTR 0x18
%define W95_TEB_TLS_OFFSET 0x88
%define WNT_TEB_PTR 0x18
%define WNT_TEB_TLS_OFFSET 0xE10
extrn _GlideRoot
segment SEG_TEXT
align 4
proc grDrawTriangle, 12
mov eax, dword [fs:WNT_TEB_PTR]
add eax, dword [_GlideRoot+tlsOffset]
mov edx, dword [eax]
test edx, edx
je L0
mov eax, dword [edx+lostContext]
test eax, eax
je L0
mov eax, dword [eax]
test eax, 1
jnz L0
mov eax, dword [edx+kTriProcOffset]
jmp eax
L0: ; lostContext
; MSVC doesn't emit a RET here in gdraw.obj, which seems wrong.
ret
endp
%ifdef __MINGW32__
; GNU LD fails with '_' prefix
export grDrawTriangle@12
%else
export _grDrawTriangle@12
%endif

View File

@@ -1,8 +1,8 @@
; ;
; compulsory header for glide3/xdraw* assembly specializations (NASM) ; compulsory header for glide3/xdraw* assembly specializations (NASM)
; ;
; $Header$ ; Revision 1.1.2.3 2004/10/04 08:57:52 dborca
; $Log$ ; supporting DOS/OpenWatcom in Assembly files
; ;
; Revision 1.1.2.1 2003/06/07 09:53:25 dborca ; Revision 1.1.2.1 2003/06/07 09:53:25 dborca
; initial checkin for NASM sources ; initial checkin for NASM sources
@@ -71,7 +71,7 @@
%macro endp 0 %macro endp 0
%ifnctx proc %ifnctx proc
%error Mismatched `endp'/`proc' %error Mismatched ENDP/PROC
%else %else
%pop %pop
%endif %endif
@@ -102,9 +102,9 @@
;--------------------------------------- ;---------------------------------------
%if XOS == XOS_WIN32 %if XOS == XOS_WIN32
%define TEXT .text align=32 %define SEG_TEXT .text align=32
%define DATA .data align=32 %define SEG_DATA .data align=32
%define CONST .rdata align=32 %define SEG_CONST .rdata align=32
%macro SET_TLSBASE 1 %macro SET_TLSBASE 1
mov %1, dword [fs:18h] ; get thread local storage base pointer mov %1, dword [fs:18h] ; get thread local storage base pointer
@@ -125,9 +125,9 @@
;--------------------------------------- ;---------------------------------------
%if XOS == XOS_DJGPP %if XOS == XOS_DJGPP
%define TEXT .text %define SEG_TEXT .text
%define DATA .data %define SEG_DATA .data
%define CONST .rodata %define SEG_CONST .rodata
extrn threadValueDJGPP extrn threadValueDJGPP
@@ -148,9 +148,9 @@ extrn threadValueDJGPP
;--------------------------------------- ;---------------------------------------
%if XOS == XOS_LINUX %if XOS == XOS_LINUX
%define TEXT .text align=32 %define SEG_TEXT .text align=32
%define DATA .data align=32 %define SEG_DATA .data align=32
%define CONST .rodata align=32 %define SEG_CONST .rodata align=32
extrn threadValueLinux extrn threadValueLinux
@@ -171,9 +171,9 @@ extrn threadValueLinux
;--------------------------------------- ;---------------------------------------
%if XOS == XOS_WATCD %if XOS == XOS_WATCD
%define TEXT _TEXT align=1 public use32 class=CODE FLAT %define SEG_TEXT _TEXT align=1 public use32 class=CODE FLAT
%define DATA _DATA align=4 public use32 class=DATA FLAT %define SEG_DATA _DATA align=4 public use32 class=DATA FLAT
%define CONST CONST2 align=4 public use32 class=DATA FLAT %define SEG_CONST CONST2 align=4 public use32 class=DATA FLAT
extrn threadValueDJGPP extrn threadValueDJGPP

View File

@@ -16,9 +16,9 @@
;; ;;
;; COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED ;; COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
;; ;;
;; $Header$ ;; Revision 1.1.1.1.8.2 2005/06/09 18:32:29 jwrdegoede
;; $Revision$ ;; Fixed all warnings with gcc4 -Wall -W -Wno-unused-parameter, except for a couple I believe to be a gcc bug. This has been reported to gcc.
;; $Log$ ;;
;; Revision 1.1.1.1.8.1 2003/11/07 13:38:39 dborca ;; Revision 1.1.1.1.8.1 2003/11/07 13:38:39 dborca
;; unite the clans ;; unite the clans
;; ;;
@@ -111,7 +111,7 @@ _texData$ equ 24 + STACKOFFSET
; ;
;-------------------------------------------------------------------------- ;--------------------------------------------------------------------------
segment TEXT segment SEG_TEXT
ALIGN 32 ALIGN 32
@@ -327,7 +327,7 @@ endp
; ;
;-------------------------------------------------------------------------- ;--------------------------------------------------------------------------
segment TEXT segment SEG_TEXT
ALIGN 32 ALIGN 32
@@ -518,7 +518,7 @@ endp
;segment TEXT ;segment SEG_TEXT
ALIGN 32 ALIGN 32

Binary file not shown.

0
swlibs/include/make/ostype Executable file → Normal file
View File