Compare commits
35 Commits
SLIAA-1-0-
...
Glide3-64b
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5653005997 | ||
|
|
cbe7c38855 | ||
|
|
d58fb3563c | ||
|
|
6eb73cf6c1 | ||
|
|
77a9dd13d3 | ||
|
|
3093a8a5f4 | ||
|
|
95b6aa00da | ||
|
|
c025951e50 | ||
|
|
5345122667 | ||
|
|
4e5ad8319b | ||
|
|
ef07fcc06b | ||
|
|
9bcd91c23a | ||
|
|
21130b308d | ||
|
|
7816b80116 | ||
|
|
985b19361e | ||
|
|
2de5d67c15 | ||
|
|
9f97da914e | ||
|
|
ccf55bd6d7 | ||
|
|
32c9fceb2b | ||
|
|
b17cdee744 | ||
|
|
65e9e693f1 | ||
|
|
68adba47ab | ||
|
|
08ef754384 | ||
|
|
bc03716156 | ||
|
|
fc7d1171eb | ||
|
|
5b2cccf44f | ||
|
|
3f90077226 | ||
|
|
f69716c149 | ||
|
|
f3f29b54f5 | ||
|
|
8b7ff82e87 | ||
|
|
13692f96c6 | ||
|
|
f0e606b604 | ||
|
|
ef7301331f | ||
|
|
bc31dae192 | ||
|
|
6acad1fd79 |
@@ -1,816 +0,0 @@
|
||||
/*
|
||||
|
||||
/dev/3dfx device for 2.x kernels with MTRR settings enabled.
|
||||
|
||||
Compile with :
|
||||
|
||||
gcc -O2 -DMODULE -D__KERNEL__ -I/usr/src/linux/include -pipe
|
||||
-fno-strength-reduce -malign-loops=2 -malign-jumps=2
|
||||
-malign-functions=2 -c -o 3dfx.o 3dfx_driver.c
|
||||
|
||||
Add -D__SMP__ if you're running of an multi-processor system.
|
||||
Add -DHAVE_MTRR if you have and want MTRR settings.
|
||||
Add -g -Wall -Wstrict-prototypes -DDEBUG, if you are debugging.
|
||||
|
||||
Original by Daryll Straus.
|
||||
Port to 2.1 kernel by Jon Taylor.
|
||||
setmtrr_3dfx() added by Jens Axboe.
|
||||
Combining 2.0 and 2.1/2.2 kernels into one rpm,
|
||||
resetmtrr_3df(), and using correct pci calls for
|
||||
2.1/2.2 kernels by Carlo Wood.
|
||||
|
||||
ChangeLog
|
||||
|
||||
2000/02/04 Joseph Kain <joseph@3dfx.com>
|
||||
|
||||
* Updated Carlo Woord's email address.
|
||||
|
||||
1999/12/22 Joseph Kain <joseph@3dfx.com>
|
||||
|
||||
* Support for new VMA structure in Kernels 2.3.14 and higher.
|
||||
This patch is based on Dieter Nuetzel's work.
|
||||
|
||||
1999/11/09 Joseph Kain <joseph@3dfx.com>
|
||||
|
||||
* Made cards static to remove conflict with hisax ISDN driver.
|
||||
|
||||
1998/10/30 Carlo Wood <carlo@alinoe.com>
|
||||
|
||||
* Re-included module versions (this source was based on the
|
||||
source by Jon Taylor which was based on an older version
|
||||
by Daryll Straus. I now included the later changes made
|
||||
by Daryll in this source too).
|
||||
* Use pci_find_device for 2.1/2.2 kernels instead of the old
|
||||
pcibios_find_device. Idem pci_present().
|
||||
|
||||
1998/10/21 Carlo Wood <carlo@alinoe.com>
|
||||
|
||||
* Fixed compile bugs related to 2.0 kernels.
|
||||
|
||||
1998/10/21 Carlo Wood <carlo@alinoe.com>
|
||||
|
||||
* `struct file_operations' was changed as of kernel 2.1.118,
|
||||
fixed this module to also work with versions > 2.1.117.
|
||||
|
||||
* Machines that don't have mtrr still need <asm/uaccess.h>.
|
||||
|
||||
1998/10/20 Carlo Wood <carlo@alinoe.com>
|
||||
|
||||
* Finally fixed in init_module() the right way. This time I tested
|
||||
it too (it now really works).
|
||||
|
||||
* Added resetmtrr_3dfx() to clean up the MTRR settings when the
|
||||
module is unloaded. This is not really necessary but its clean.
|
||||
It allows to compare using this device WITH MTRR with another
|
||||
method WITHOUT MTRR, without being confused by sticky MTRR settings
|
||||
for instance.
|
||||
|
||||
1998/10/18 Carlo Wood <carlo@alinoe.com>
|
||||
|
||||
* Forgot the '== -EBUSY' in init_module(), causing the registration of
|
||||
character device to always fail. You need to reboot if you tried
|
||||
the previous version (if there is junk in `cat /proc/devices' major 107).
|
||||
|
||||
1998/10/18 Carlo Wood <carlo@alinoe.com>
|
||||
|
||||
* struct file_operations fops_3dfx was initialized wrong:
|
||||
`release_3dfx' was put on the place of `fsync', causing weird
|
||||
behaviour :).
|
||||
|
||||
* Several warning fixes.
|
||||
|
||||
* setmtrr_3dfx did not always return a value, and the value was
|
||||
ignored, effectively ignoring errors returned by mtrr_add().
|
||||
|
||||
*/
|
||||
|
||||
/* Include this first as it defines things that affect the kernel headers */
|
||||
#include "kinfo.h"
|
||||
#include <linux/version.h>
|
||||
|
||||
#ifndef KERNEL_VERSION
|
||||
#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
|
||||
#endif
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 1, 0)
|
||||
#define KERNEL_VER_2_1
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 1, 115)
|
||||
/* It might work with smaller kernels, but I never tested that */
|
||||
#error "Upgrade your kernel"
|
||||
#endif
|
||||
#else
|
||||
#define copy_to_user memcpy_tofs
|
||||
#define copy_from_user memcpy_fromfs
|
||||
#define pci_present pcibios_present
|
||||
#endif
|
||||
|
||||
#ifdef MODULE
|
||||
#include <linux/module.h>
|
||||
#include <linux/autoconf.h>
|
||||
#if defined(CONFIG_MODVERSIONS) && !defined(MODVERSIONS)
|
||||
#define MODVERSIONS
|
||||
#endif
|
||||
#ifdef MODVERSIONS
|
||||
#include <linux/modversions.h>
|
||||
#endif
|
||||
#else
|
||||
#define MOD_INC_USE_COUNT
|
||||
#define MOD_DEC_USE_COUNT
|
||||
#endif
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <linux/fs.h>
|
||||
#include <linux/mm.h>
|
||||
#include <linux/errno.h>
|
||||
#include <linux/pci.h>
|
||||
#ifndef KERNEL_VER_2_1
|
||||
#include <linux/bios32.h>
|
||||
#endif
|
||||
#include <asm/segment.h>
|
||||
#include <asm/ioctl.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/pgtable.h>
|
||||
#include <asm/processor.h>
|
||||
|
||||
#ifdef KERNEL_VER_2_1
|
||||
#include <asm/uaccess.h>
|
||||
#endif
|
||||
#ifdef HAVE_MTRR
|
||||
#ifdef KERNEL_VER_2_1
|
||||
#include <asm/mtrr.h>
|
||||
#else
|
||||
extern int mtrr_add(unsigned long base, unsigned long size, unsigned int type, char increment);
|
||||
extern int mtrr_del(int reg, unsigned long base, unsigned long size);
|
||||
#define MTRR_TYPE_UNCACHABLE 0
|
||||
#define MTRR_TYPE_WRCOMB 1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define MAJOR_3DFX 107
|
||||
#define DEVICE_VOODOO 0
|
||||
|
||||
#define PCI_VENDOR_ID_LINUX 0x0
|
||||
#define PCI_DEVICE_ID_LINUX 0x2
|
||||
#define PCI_COMMAND_LINUX 0x4
|
||||
#define PCI_REVISION_ID_LINUX 0x8
|
||||
#define PCI_BASE_ADDRESS_0_LINUX 0x10
|
||||
#define PCI_BASE_ADDRESS_1_LINUX 0x14
|
||||
#define SST1_PCI_SPECIAL1_LINUX 0x40
|
||||
#define SST1_PCI_SPECIAL2_LINUX 0x44
|
||||
#define SST1_PCI_SPECIAL3_LINUX 0x48
|
||||
#define SST1_PCI_SPECIAL4_LINUX 0x54
|
||||
|
||||
#define VGA_INPUT_STATUS_1C 0x3DA
|
||||
#define VGA_MISC_OUTPUT_READ 0x3cc
|
||||
#define VGA_MISC_OUTPUT_WRITE 0x3c2
|
||||
#define SC_INDEX 0x3c4
|
||||
#define SC_DATA 0x3c5
|
||||
|
||||
#ifndef PCI_VENDOR_ID_3DFX
|
||||
#define PCI_VENDOR_ID_3DFX 0x121a
|
||||
#endif
|
||||
|
||||
#ifndef PCI_VENDOR_ID_ALLIANCE
|
||||
#define PCI_VENDOR_ID_ALLIANCE 0x1142
|
||||
#endif
|
||||
|
||||
#ifndef PCI_DEVICE_ID_3DFX_VOODOO2
|
||||
#define PCI_DEVICE_ID_3DFX_VOODOO2 2
|
||||
#endif
|
||||
|
||||
#ifndef PCI_DEVICE_ID_ALLIANCE_AT3D
|
||||
#define PCI_DEVICE_ID_ALLIANCE_AT3D 0x643d
|
||||
#endif
|
||||
|
||||
#ifndef PCI_DEVICE_ID_3DFX_BANSHEE
|
||||
#define PCI_DEVICE_ID_3DFX_BANSHEE 3
|
||||
#endif
|
||||
|
||||
#ifndef PCI_DEVICE_ID_3DFX_VOODOO3
|
||||
#define PCI_DEVICE_ID_3DFX_VOODOO3 5
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG
|
||||
#define DEBUGMSG(x) printk x
|
||||
#else
|
||||
#define DEBUGMSG(x)
|
||||
#endif
|
||||
|
||||
/* This macro is for accessing vma->vm_offset or vma->vm_pgoff depending
|
||||
* on kernel version */
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 3, 14)
|
||||
#define VM_OFFSET(vma) (vma->vm_offset)
|
||||
#else
|
||||
#define VM_OFFSET(vma) (vma->vm_pgoff << PAGE_SHIFT)
|
||||
#endif
|
||||
|
||||
struct pioData_t {
|
||||
short port;
|
||||
short size;
|
||||
int device;
|
||||
void *value;
|
||||
};
|
||||
|
||||
struct cardInfo_t {
|
||||
int vendor;
|
||||
int type;
|
||||
int addr0;
|
||||
int addr1;
|
||||
unsigned char bus;
|
||||
unsigned char dev;
|
||||
struct file *curFile;
|
||||
#ifdef HAVE_MTRR
|
||||
int mtrr_buf;
|
||||
int mtrr_ctl;
|
||||
#endif
|
||||
};
|
||||
|
||||
typedef struct pioData_t pioData;
|
||||
typedef struct cardInfo_t cardInfo;
|
||||
|
||||
#ifdef MODULE
|
||||
void cleanup_module(void);
|
||||
#endif
|
||||
|
||||
#define MAXCARDS 16
|
||||
|
||||
static cardInfo cards[MAXCARDS];
|
||||
static int numCards = 0;
|
||||
|
||||
static void findCardType(int vendor, int device)
|
||||
{
|
||||
#ifdef KERNEL_VER_2_1
|
||||
struct pci_dev *dev = NULL;
|
||||
while (numCards < MAXCARDS && (dev = pci_find_device(vendor, device, dev))) {
|
||||
pci_read_config_dword(dev, PCI_BASE_ADDRESS_0, &cards[numCards].addr0);
|
||||
pci_read_config_dword(dev, PCI_BASE_ADDRESS_1, &cards[numCards].addr1);
|
||||
cards[numCards].bus = dev->bus->number;
|
||||
cards[numCards].dev = dev->devfn;
|
||||
#else
|
||||
int i;
|
||||
for (i = 0; numCards < MAXCARDS; i++) {
|
||||
if (pcibios_find_device(vendor, device, i, &cards[numCards].bus, &cards[numCards].dev))
|
||||
return;
|
||||
pcibios_read_config_dword(cards[numCards].bus, cards[numCards].dev, PCI_BASE_ADDRESS_0, &cards[numCards].addr0);
|
||||
pcibios_read_config_dword(cards[numCards].bus, cards[numCards].dev, PCI_BASE_ADDRESS_1, &cards[numCards].addr1);
|
||||
#endif
|
||||
|
||||
cards[numCards].addr0 &= ~0xF;
|
||||
cards[numCards].addr1 &= ~0xF;
|
||||
cards[numCards].vendor = vendor;
|
||||
cards[numCards].type = device;
|
||||
cards[numCards].curFile = 0;
|
||||
|
||||
DEBUGMSG(("3dfx: board vendor %d type %d located at %x/%x bus %d dev %d\n",
|
||||
vendor, device, cards[numCards].addr0, cards[numCards].addr1, cards[numCards].bus, cards[numCards].dev));
|
||||
|
||||
++numCards;
|
||||
}
|
||||
}
|
||||
|
||||
static int findCards(void)
|
||||
{
|
||||
if (!pci_present())
|
||||
return 0;
|
||||
numCards = 0;
|
||||
findCardType(PCI_VENDOR_ID_3DFX, PCI_DEVICE_ID_3DFX_VOODOO);
|
||||
findCardType(PCI_VENDOR_ID_3DFX, PCI_DEVICE_ID_3DFX_VOODOO2);
|
||||
findCardType(PCI_VENDOR_ID_ALLIANCE, 0x643d);
|
||||
findCardType(PCI_VENDOR_ID_3DFX, PCI_DEVICE_ID_3DFX_BANSHEE);
|
||||
findCardType(PCI_VENDOR_ID_3DFX, PCI_DEVICE_ID_3DFX_VOODOO3);
|
||||
return numCards;
|
||||
}
|
||||
|
||||
static int open_3dfx(struct inode *inode, struct file *file)
|
||||
{
|
||||
DEBUGMSG(("3dfx: Entering open_3dfx\n"));
|
||||
if (!numCards) {
|
||||
printk("3dfx: No 3Dfx cards found\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
MOD_INC_USE_COUNT;
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef KERNEL_VER_2_1
|
||||
static int release_3dfx(struct inode *inode, struct file *file)
|
||||
#else
|
||||
static void release_3dfx(struct inode *inode, struct file *file)
|
||||
#endif
|
||||
{
|
||||
int i;
|
||||
|
||||
DEBUGMSG(("3dfx: Entering release_3dfx\n"));
|
||||
for (i = 0; i < numCards; ++i)
|
||||
if (cards[i].curFile == file)
|
||||
cards[i].curFile = 0;
|
||||
MOD_DEC_USE_COUNT;
|
||||
|
||||
#ifdef KERNEL_VER_2_1
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef KERNEL_VER_2_1
|
||||
static int mmap_3dfx(struct file *file, struct vm_area_struct *vma)
|
||||
#else
|
||||
static int mmap_3dfx(struct inode *inode, struct file *file, struct vm_area_struct *vma)
|
||||
#endif
|
||||
{
|
||||
size_t len;
|
||||
int i;
|
||||
|
||||
DEBUGMSG(("3dfx: Entering mmap_3dfx\n"));
|
||||
for (i = 0; i < numCards; ++i) {
|
||||
if ((cards[i].addr0 == VM_OFFSET(vma)) ||
|
||||
(cards[i].addr1 == VM_OFFSET(vma)))
|
||||
break;
|
||||
}
|
||||
if (i == numCards) {
|
||||
DEBUGMSG(("3dfx: Couldn't match address %lx to a card\n",
|
||||
VM_OFFSET(vma)));
|
||||
return -EPERM;
|
||||
}
|
||||
/* This one is a special case, the macro doesn't help */
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 3, 14)
|
||||
if ((vma->vm_offset) & ~PAGE_MASK) {
|
||||
DEBUGMSG(("3dfx: Map request not page aligned\n"));
|
||||
return -ENXIO;
|
||||
}
|
||||
#else
|
||||
if ((vma->vm_pgoff) & ~PAGE_MASK) {
|
||||
DEBUGMSG(("3dfx: Map request not page aligned\n"));
|
||||
return -ENXIO;
|
||||
}
|
||||
#endif
|
||||
len = vma->vm_end - vma->vm_start;
|
||||
if ((len < 0) || (len > 0x2000000)) {
|
||||
DEBUGMSG(("3dfx: Invalid mapping size requested\n"));
|
||||
return -EINVAL;
|
||||
}
|
||||
#if defined(__i386__)
|
||||
pgprot_val(vma->vm_page_prot) |= _PAGE_PCD;
|
||||
#endif
|
||||
if (remap_page_range(vma->vm_start, VM_OFFSET(vma), len,
|
||||
vma->vm_page_prot)) {
|
||||
DEBUGMSG(("3dfx: Page remap failed\n"));
|
||||
return -EAGAIN;
|
||||
}
|
||||
#ifndef KERNEL_VER_2_1
|
||||
vma->vm_inode = inode;
|
||||
inode->i_count++;
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int doQueryBoards(void)
|
||||
{
|
||||
return numCards;
|
||||
}
|
||||
|
||||
static int doQueryFetch(pioData *desc)
|
||||
{
|
||||
int retval;
|
||||
char retchar;
|
||||
short retword;
|
||||
int retlong;
|
||||
|
||||
if (desc->device < 0 || desc->device >= numCards)
|
||||
return -EINVAL;
|
||||
if ((retval = verify_area(VERIFY_WRITE, desc->value, desc->size)))
|
||||
return retval;
|
||||
switch (desc->port) {
|
||||
case PCI_VENDOR_ID_LINUX:
|
||||
if (desc->size != 2)
|
||||
return -EINVAL;
|
||||
copy_to_user(desc->value, &cards[desc->device].vendor, desc->size);
|
||||
return 0;
|
||||
case PCI_DEVICE_ID_LINUX:
|
||||
if (desc->size != 2)
|
||||
return -EINVAL;
|
||||
copy_to_user(desc->value, &cards[desc->device].type, desc->size);
|
||||
return 0;
|
||||
case PCI_BASE_ADDRESS_0_LINUX:
|
||||
if (desc->size != 4)
|
||||
return -EINVAL;
|
||||
copy_to_user(desc->value, &cards[desc->device].addr0, desc->size);
|
||||
return 0;
|
||||
case PCI_BASE_ADDRESS_1_LINUX:
|
||||
if (desc->size != 4)
|
||||
return -EINVAL;
|
||||
copy_to_user(desc->value, &cards[desc->device].addr1, desc->size);
|
||||
return 0;
|
||||
case SST1_PCI_SPECIAL1_LINUX:
|
||||
if (desc->size != 4)
|
||||
return -EINVAL;
|
||||
break;
|
||||
case PCI_REVISION_ID:
|
||||
if (desc->size != 1)
|
||||
return -EINVAL;
|
||||
break;
|
||||
case SST1_PCI_SPECIAL4_LINUX:
|
||||
if (desc->size != 4)
|
||||
return -EINVAL;
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
}
|
||||
switch (desc->size) {
|
||||
case 1:
|
||||
pcibios_read_config_byte(cards[desc->device].bus, cards[desc->device].dev, desc->port, &retchar);
|
||||
copy_to_user(desc->value, &retchar, 1);
|
||||
break;
|
||||
case 2:
|
||||
pcibios_read_config_word(cards[desc->device].bus, cards[desc->device].dev, desc->port, &retword);
|
||||
copy_to_user(desc->value, &retword, 2);
|
||||
break;
|
||||
case 4:
|
||||
pcibios_read_config_dword(cards[desc->device].bus, cards[desc->device].dev, desc->port, &retlong);
|
||||
copy_to_user(desc->value, &retlong, 4);
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int doQueryUpdate(pioData *desc)
|
||||
{
|
||||
int retval;
|
||||
int preval;
|
||||
int mask;
|
||||
char retchar;
|
||||
short retword;
|
||||
int retlong;
|
||||
|
||||
if (desc->device < 0 || desc->device >= numCards)
|
||||
return -EINVAL;
|
||||
if ((retval = verify_area(VERIFY_WRITE, desc->value, desc->size)))
|
||||
return retval;
|
||||
switch (desc->port) {
|
||||
case PCI_COMMAND_LINUX:
|
||||
if (desc->size != 2)
|
||||
return -EINVAL;
|
||||
break;
|
||||
case SST1_PCI_SPECIAL1_LINUX:
|
||||
if (desc->size != 4)
|
||||
return -EINVAL;
|
||||
break;
|
||||
case SST1_PCI_SPECIAL2_LINUX:
|
||||
if (desc->size != 4)
|
||||
return -EINVAL;
|
||||
break;
|
||||
case SST1_PCI_SPECIAL3_LINUX:
|
||||
if (desc->size != 4)
|
||||
return -EINVAL;
|
||||
break;
|
||||
case SST1_PCI_SPECIAL4_LINUX:
|
||||
if (desc->size != 4)
|
||||
return -EINVAL;
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
}
|
||||
pcibios_read_config_dword(cards[desc->device].bus, cards[desc->device].dev, desc->port & ~0x3, &retval);
|
||||
switch (desc->size) {
|
||||
case 1:
|
||||
copy_from_user(&retchar, desc->value, 1);
|
||||
preval = retchar << (8 * (desc->port & 0x3));
|
||||
mask = 0xFF << (8 * (desc->port & 0x3));
|
||||
break;
|
||||
case 2:
|
||||
copy_from_user(&retword, desc->value, 2);
|
||||
preval = retword << (8 * (desc->port & 0x3));
|
||||
mask = 0xFFFF << (8 * (desc->port & 0x3));
|
||||
break;
|
||||
case 4:
|
||||
copy_from_user(&retlong, desc->value, 4);
|
||||
preval = retlong;
|
||||
mask = ~0;
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
}
|
||||
retval = (retval & ~mask) | preval;
|
||||
pcibios_write_config_dword(cards[desc->device].bus, cards[desc->device].dev, desc->port, retval);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int doQuery(unsigned int cmd, unsigned long arg)
|
||||
{
|
||||
pioData desc;
|
||||
int retval;
|
||||
|
||||
if (_IOC_NR(cmd) == 2)
|
||||
return doQueryBoards();
|
||||
if ((retval = verify_area(VERIFY_READ, (void *)arg, sizeof(pioData))))
|
||||
return retval;
|
||||
copy_from_user(&desc, (void *)arg, sizeof(pioData));
|
||||
if (_IOC_NR(cmd) == 3)
|
||||
return doQueryFetch(&desc);
|
||||
if (_IOC_NR(cmd) == 4)
|
||||
return doQueryUpdate(&desc);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
static int doPIORead(pioData *desc)
|
||||
{
|
||||
int retval;
|
||||
char retchar;
|
||||
|
||||
if ((retval = verify_area(VERIFY_WRITE, desc->value, desc->size)))
|
||||
return retval;
|
||||
switch (desc->port) {
|
||||
case VGA_INPUT_STATUS_1C:
|
||||
break;
|
||||
case SC_INDEX:
|
||||
break;
|
||||
case SC_DATA:
|
||||
break;
|
||||
case VGA_MISC_OUTPUT_READ:
|
||||
break;
|
||||
default:
|
||||
return -EPERM;
|
||||
}
|
||||
|
||||
if (desc->size != 1)
|
||||
return -EINVAL;
|
||||
|
||||
retchar = inb(desc->port);
|
||||
copy_to_user(desc->value, &retchar, sizeof(char));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int doPIOWrite(pioData *desc)
|
||||
{
|
||||
int retval;
|
||||
char retchar;
|
||||
|
||||
if ((retval = verify_area(VERIFY_READ, desc->value, desc->size)))
|
||||
return retval;
|
||||
|
||||
switch (desc->port) {
|
||||
case SC_INDEX:
|
||||
break;
|
||||
case SC_DATA:
|
||||
break;
|
||||
case VGA_MISC_OUTPUT_WRITE:
|
||||
break;
|
||||
default:
|
||||
return -EPERM;
|
||||
}
|
||||
|
||||
if (desc->size != 1)
|
||||
return -EINVAL;
|
||||
|
||||
copy_from_user(&retchar, desc->value, sizeof(char));
|
||||
outb(retchar, desc->port);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int doPIO(unsigned int cmd, unsigned long arg)
|
||||
{
|
||||
pioData desc;
|
||||
int retval;
|
||||
|
||||
if ((retval = verify_area(VERIFY_READ, (void *)arg, sizeof(pioData))))
|
||||
return retval;
|
||||
copy_from_user(&desc, (void *)arg, sizeof(pioData));
|
||||
if (_IOC_DIR(cmd) == _IOC_READ)
|
||||
return doPIORead(&desc);
|
||||
if (_IOC_DIR(cmd) == _IOC_WRITE)
|
||||
return doPIOWrite(&desc);
|
||||
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
static int ioctl_3dfx(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg)
|
||||
{
|
||||
DEBUGMSG(("3dfx: Entering ioctl_3dfx, inode %p file %p cmd %x arg %lx\n", inode, file, cmd, arg));
|
||||
switch (_IOC_TYPE(cmd)) {
|
||||
case '3':
|
||||
return doQuery(cmd, arg);
|
||||
case 0:
|
||||
return doPIO(cmd, arg);
|
||||
default:
|
||||
DEBUGMSG(("3dfx: Unknown 3dfx request made\n"));
|
||||
return -EINVAL;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef HAVE_MTRR
|
||||
int setmtrr_3dfx(void)
|
||||
{
|
||||
int i = 0, retval = -2;
|
||||
unsigned char dlc;
|
||||
|
||||
/* First do a bios fixup if this system has a 82441FX chipset */
|
||||
#ifdef KERNEL_VER_2_1
|
||||
struct pci_dev *dev = NULL;
|
||||
if ((dev = pci_find_device(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371SB_0, dev))) {
|
||||
pci_read_config_byte(dev, 0x82, &dlc);
|
||||
if (!(dlc & 1 << 1)) {
|
||||
dlc |= 1 << 1;
|
||||
pci_write_config_byte(dev, 0x82, dlc);
|
||||
printk("3dfx: PIIX3: Enabling Passive Release\n");
|
||||
}
|
||||
}
|
||||
#else
|
||||
unsigned char bus, dev_fn;
|
||||
if (!pcibios_find_device(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371SB_0, i, &bus, &dev_fn)) {
|
||||
pcibios_read_config_byte(bus, dev_fn, 0x82, &dlc);
|
||||
if (!(dlc & 1 << 1)) {
|
||||
dlc |= 1 << 1;
|
||||
pcibios_write_config_byte(bus, dev_fn, 0x82, dlc);
|
||||
printk("3dfx: PIIX3: Enabling Passive Release\n");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Set up the mtrr's */
|
||||
if (numCards == 0)
|
||||
return -EIO;
|
||||
for (i = 0; i < numCards; i++) {
|
||||
if ((cards[i].vendor != PCI_VENDOR_ID_3DFX) ||
|
||||
(cards[i].type>PCI_DEVICE_ID_3DFX_VOODOO3))
|
||||
{
|
||||
cards[i].mtrr_buf = -1; /* Used as flag in resetmtrr_3dfx() */
|
||||
continue;
|
||||
}
|
||||
switch (cards[i].type) {
|
||||
case PCI_DEVICE_ID_3DFX_VOODOO:
|
||||
case PCI_DEVICE_ID_3DFX_VOODOO2:
|
||||
/* Frame buffer to write combining */
|
||||
retval = cards[i].mtrr_buf = mtrr_add(cards[i].addr0, 0x400000, MTRR_TYPE_WRCOMB, 1);
|
||||
if (retval>=0) {
|
||||
retval = cards[i].mtrr_ctl = mtrr_add(cards[i].addr0, 0x1000, MTRR_TYPE_UNCACHABLE, 1);
|
||||
if (retval<0) {
|
||||
mtrr_del(cards[i].mtrr_buf, 0, 0);
|
||||
cards[i].mtrr_buf=-1;
|
||||
}
|
||||
}
|
||||
if (retval < 0) {
|
||||
printk("3dfx: Could not set MTRR for Voodoo card\n");
|
||||
/* Can still run */
|
||||
return 0;
|
||||
}
|
||||
break;
|
||||
case PCI_DEVICE_ID_3DFX_BANSHEE:
|
||||
case PCI_DEVICE_ID_3DFX_VOODOO3:
|
||||
retval = cards[i].mtrr_buf = mtrr_add(cards[i].addr1, 0x1000000, MTRR_TYPE_WRCOMB, 1);
|
||||
if (retval < 0) {
|
||||
printk("3dfx: Could not set MTRR for Voodoo card\n");
|
||||
/* Can still run */
|
||||
return 0;
|
||||
}
|
||||
cards[i].mtrr_ctl=-1;
|
||||
break;
|
||||
default:
|
||||
/* We should never hit this */
|
||||
}
|
||||
}
|
||||
if (retval == -2)
|
||||
{
|
||||
DEBUGMSG(("3dfx: Could not set MTRR for this graphics card\n"));
|
||||
retval = 0; /* Can still run */
|
||||
}
|
||||
#ifdef DEBUG
|
||||
else if (retval >= 0)
|
||||
DEBUGMSG(("3dfx: Successfully set MTRR, mtrr register: %d\n", retval));
|
||||
#endif
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
int resetmtrr_3dfx(void)
|
||||
{
|
||||
int i, ret, retval = 0;
|
||||
for (i = 0; i < numCards; i++) {
|
||||
if (cards[i].mtrr_buf >= 0) {
|
||||
ret = mtrr_del(cards[i].mtrr_buf, 0, 0);
|
||||
if (ret < 0)
|
||||
retval = ret;
|
||||
cards[i].mtrr_buf = -1;
|
||||
if (cards[i].mtrr_ctl >= 0) {
|
||||
ret = mtrr_del(cards[i].mtrr_ctl, 0, 0);
|
||||
if (ret < 0)
|
||||
retval = ret;
|
||||
cards[i].mtrr_ctl = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
|
||||
#endif /* HAVE_MTRR */
|
||||
|
||||
static struct file_operations fops_3dfx = {
|
||||
NULL, /* llseek (2.1) / lseek (2.0) */
|
||||
NULL, /* read */
|
||||
NULL, /* write */
|
||||
NULL, /* readdir */
|
||||
NULL, /* poll (2.1) / select (2.0) */
|
||||
ioctl_3dfx, /* ioctl */
|
||||
mmap_3dfx, /* mmap */
|
||||
open_3dfx, /* open */
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 1, 118)
|
||||
NULL, /* flush (2.1.118+) */
|
||||
#endif
|
||||
release_3dfx, /* release */
|
||||
NULL, /* fsync */
|
||||
NULL, /* fasync */
|
||||
NULL, /* check_media_change */
|
||||
NULL, /* revalidate */
|
||||
#ifdef KERNEL_VER_2_1
|
||||
NULL /* lock (2.1) */
|
||||
#endif
|
||||
};
|
||||
|
||||
#ifdef MODULE
|
||||
int init_module(void)
|
||||
{
|
||||
int ret;
|
||||
DEBUGMSG(("3dfx: Entering init_module()\n"));
|
||||
|
||||
if ((ret = register_chrdev(MAJOR_3DFX, "3dfx", &fops_3dfx)) < 0) {
|
||||
printk("3dfx: Unable to register character device with major %d\n", MAJOR_3DFX);
|
||||
return ret;
|
||||
}
|
||||
DEBUGMSG(("3dfx: Successfully registered device 3dfx\n"));
|
||||
findCards();
|
||||
|
||||
#ifdef HAVE_MTRR
|
||||
ret = setmtrr_3dfx();
|
||||
if (ret < 0)
|
||||
{
|
||||
DEBUGMSG(("setmtrr_3dfx() failed, returned %d\n", ret));
|
||||
unregister_chrdev(MAJOR_3DFX, "3dfx");
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void cleanup_module(void)
|
||||
{
|
||||
DEBUGMSG(("3dfx: Entering cleanup_module\n"));
|
||||
|
||||
#ifdef HAVE_MTRR
|
||||
resetmtrr_3dfx();
|
||||
#endif
|
||||
if (unregister_chrdev(MAJOR_3DFX, "3dfx"))
|
||||
{
|
||||
DEBUGMSG(("3dfx: unregister_chrdev failed\n"));
|
||||
return;
|
||||
}
|
||||
}
|
||||
#else /* !MODULE */
|
||||
|
||||
long init_3dfx(long mem_start, long mem_end)
|
||||
{
|
||||
if (register_chrdev(MAJOR_3DFX, "3dfx", &fops_3dfx))
|
||||
{
|
||||
DEBUGMSG(("3dfx: Unable to register_chrdev with major %d\n", MAJOR_3DFX));
|
||||
return 0;
|
||||
}
|
||||
findCards();
|
||||
|
||||
return mem_start;
|
||||
}
|
||||
#endif /* !MODULE */
|
||||
|
||||
|
||||
#if defined(DEBUG) && defined(KERNEL_VER_2_1)
|
||||
/*
|
||||
* Kludge to get rid of:
|
||||
* ./3dfx.o: unresolved symbol inb
|
||||
* ./3dfx.o: unresolved symbol inl
|
||||
* ./3dfx.o: unresolved symbol inw
|
||||
* ./3dfx.o: unresolved symbol outb
|
||||
* ./3dfx.o: unresolved symbol outl
|
||||
* ./3dfx.o: unresolved symbol outw
|
||||
* when compiling this module with -g during debugging.
|
||||
*/
|
||||
#undef __KERNEL__
|
||||
#define extern
|
||||
#undef _ASM_IO_H
|
||||
#include <asm/io.h>
|
||||
/*
|
||||
* And this is copied from asm/uaccess.h
|
||||
* in order to get rid of
|
||||
* ./3dfx.o: unresolved symbol verify_area
|
||||
* when compiling this module with -g during debugging.
|
||||
*/
|
||||
inline int verify_area(int type, const void * addr, unsigned long size)
|
||||
{
|
||||
return access_ok(type,addr,size) ? 0 : -EFAULT;
|
||||
}
|
||||
|
||||
int a_last_dummy_function(int a)
|
||||
{
|
||||
return a;
|
||||
}
|
||||
#endif
|
||||
@@ -1,160 +0,0 @@
|
||||
Summary: Device driver for 3Dfx boards for 2.x kernels
|
||||
Name: Device3Dfx
|
||||
Version: 2.3
|
||||
Release: 5
|
||||
Icon: 3dfx.gif
|
||||
Source: Device3Dfx.tar.gz
|
||||
License: GPL
|
||||
Group: Drivers
|
||||
|
||||
%changelog
|
||||
|
||||
* Sat Apr 08 2000 Joseph Kain <joseph@3dfx.com>
|
||||
Release 2.3-5
|
||||
- Check both the kernel and the processor for MTRR support before enabling.
|
||||
|
||||
* Wed Jan 04 2000 Joseph Kain <joseph@3dfx.com>
|
||||
Release 2.3-4
|
||||
|
||||
- Forgot to include kinfo.h in 3dfx_driver.c in the last release. This
|
||||
fixes some build problems for SMP kernels.
|
||||
|
||||
* Wed Dec 22 1999 Joseph Kain <joseph@3dfx.com>
|
||||
Release 2.3-3
|
||||
|
||||
- Fixes to the Makefile to stop grepping the header files. Changes to
|
||||
mtrr.c and 3dfx_driver.c to support these Makefile changes.
|
||||
- 3dfx_driver.c now supports 2.3.14+ kernels.
|
||||
|
||||
* Mon Dec 13 1999 Joseph Kain <joseph@3dfx.com>
|
||||
Release 2.3-2
|
||||
|
||||
- Removed depmod -a from the Makefile. This elliminates errors in the
|
||||
build on systems with modules with broken depedancies (Happens on Madrake)
|
||||
- Changed depmod -a to depmod -a > /dev/null in the post and postun to
|
||||
elliminate any warnings/errors with modules that don't have anything
|
||||
to do with Device3Dfx. Warnings scare people.
|
||||
|
||||
* Tue Nov 09 1999 Joseph Kain <joseph@3dfx.com>
|
||||
Release 2.3:
|
||||
|
||||
- Made cards static to remove conflict with hisax ISDN driver.
|
||||
- Removed 3dfx.o from the source distribution
|
||||
|
||||
* Fri Jun 25 1999 Daryll Strauss <daryll@harlot.rb.ca.us>
|
||||
|
||||
Release 2.2:
|
||||
|
||||
- Set MTRR for VB/V3 boards
|
||||
- Allow build without kernel sources installed
|
||||
- Code cleanup
|
||||
- Improvements in /etc/conf.modules setup
|
||||
|
||||
* Sun May 16 1999 Daryll Strauss <daryll@harlot.rb.ca.us>
|
||||
|
||||
Release 2.1:
|
||||
|
||||
- Added support for multiple board mappings
|
||||
- Enlarged size of mappings
|
||||
- Changes to support VB/V3 boards
|
||||
|
||||
* Sun Apr 4 1999 Daryll Strauss <daryll@harlot.rb.ca.us>
|
||||
|
||||
Release 2.0-1:
|
||||
|
||||
- This is just a rename of Michael's version to return it to my original
|
||||
naming scheme.
|
||||
- Added the License field to the spec file.
|
||||
|
||||
* Thu Mar 11 1999 Michael Vance <mkv102@psu.edu>
|
||||
|
||||
Release 2.5-2:
|
||||
|
||||
- Fixed for 2.2.3 kernels because of an mmap() update
|
||||
|
||||
* Fri Oct 30 1998 Carlo Wood <carlo@runaway.xs4all.nl>
|
||||
|
||||
Release 2.5-1:
|
||||
|
||||
- Upped source to Dev3Dfx-2.5.tar.gz
|
||||
- Boosted version number of rpm to the version of the tar.gz.
|
||||
Moved everything to the Makefile, so Dev3Dfx-2.5.tar.gz is
|
||||
self containing and will work without rpm too.
|
||||
|
||||
* Wed Oct 21 1998 Carlo Wood <carlo@runaway.xs4all.nl>
|
||||
|
||||
Release 1.2-5:
|
||||
|
||||
- Upped source to Dev3Dfx-2.4.tar.gz
|
||||
- Removed dangerous and confusing use of /lib/modules/preferred
|
||||
- Removed the use of `uname': It now will compile for the kernel
|
||||
version in /usr/src/linux and not be bothered by the running
|
||||
kernel version.
|
||||
|
||||
* Wed Oct 21 1998 Carlo Wood <carlo@runaway.xs4all.nl>
|
||||
|
||||
Release 1.2-4:
|
||||
|
||||
- Upped source to Dev3Dfx-2.3.tar.gz
|
||||
|
||||
* Mon Oct 19 1998 Carlo Wood <carlo@runaway.xs4all.nl>
|
||||
|
||||
Release 1.2-3:
|
||||
|
||||
- Corrected Summary and Description to refer to 2.x rather
|
||||
then 2.1 kernels.
|
||||
- Removed script lines that write an `option' line to /etc/conf.modules.
|
||||
- Upped source to Dev3Dfx-2.2.tar.gz
|
||||
|
||||
* Sun Oct 18 1998 Carlo Wood <carlo@runaway.xs4all.nl>
|
||||
|
||||
Release 1.2-2:
|
||||
|
||||
- Added OPT_CFLAGS stuff.
|
||||
|
||||
* Sun Oct 18 1998 Carlo Wood <carlo@runaway.xs4all.nl>
|
||||
|
||||
Release 1.2-1:
|
||||
|
||||
- Packaged version 1.2 with support for 2.1 kernels by John Taylor and
|
||||
MTRR settings added by Jens Axboe.
|
||||
|
||||
%description
|
||||
This package installs the 3Dfx device driver to allow access to 3Dfx
|
||||
boards without the user having root privledges. It should work on both
|
||||
2.0 and 2.1/2.2 kernels and set the MTRR settings correctly. It should
|
||||
also work with SMP kernels (2.1/2.2).
|
||||
|
||||
%prep
|
||||
%setup -c
|
||||
|
||||
%build
|
||||
make OPT_CFLAGS="$RPM_OPT_FLAGS"
|
||||
|
||||
%install
|
||||
make RPM_INSTALL="1" install | grep '^/lib/modules/' > modules-file-list
|
||||
|
||||
%post
|
||||
if [ "$1" = 1 ]; then
|
||||
grep -v 3dfx /etc/conf.modules > /etc/conf.modules.tmp
|
||||
echo alias char-major-107 3dfx >> /etc/conf.modules.tmp
|
||||
mv /etc/conf.modules.tmp /etc/conf.modules
|
||||
fi
|
||||
/sbin/depmod -a > /dev/null
|
||||
|
||||
%postun
|
||||
if [ "$1" = 0 ]; then
|
||||
grep -v 3dfx /etc/conf.modules > /etc/conf.modules.tmp
|
||||
mv /etc/conf.modules.tmp /etc/conf.modules
|
||||
fi
|
||||
/sbin/depmod -a > /dev/null
|
||||
|
||||
%verifyscript
|
||||
inconf=`grep 'alias char-major-107 3dfx' /etc/conf.modules`
|
||||
if [ "x$inconf" = "x" ]; then
|
||||
echo "3dfx entry not included in /etc/conf.modules"
|
||||
fi
|
||||
|
||||
%files -f modules-file-list
|
||||
%verify(not mode user group) /dev/3dfx
|
||||
|
||||
@@ -1,127 +0,0 @@
|
||||
###############################################################################
|
||||
# Makefile by Carlo Wood (and others)
|
||||
|
||||
ifeq ($(OPT_CFLAGS),)
|
||||
|
||||
# Determine the machine type
|
||||
ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/)
|
||||
|
||||
# Setup machine dependant compiler flags
|
||||
ifeq ($(ARCH), i386)
|
||||
OPT_CFLAGS = -O2 -m486 -fomit-frame-pointer \
|
||||
-fno-strength-reduce \
|
||||
-malign-loops=2 -malign-jumps=2 -malign-functions=2
|
||||
endif
|
||||
|
||||
ifeq ($(ARCH), alpha)
|
||||
OPT_CFLAGS = -O2 -mno-fp-regs -mcpu=ev4 \
|
||||
-ffixed-8 \
|
||||
-Wa,-mev6 \
|
||||
-fomit-frame-pointer -fno-strict-aliasing
|
||||
endif
|
||||
|
||||
endif # ifeq ($OPT_CFLAGS),)
|
||||
|
||||
CFLAGS := -DMODULE -D__KERNEL__ -I/usr/src/linux/include $(OPT_CFLAGS)
|
||||
|
||||
###############################################################################
|
||||
# You should never need to change anything below.
|
||||
|
||||
all: sanity 3dfx.o
|
||||
|
||||
# Sanity checks
|
||||
sanity:
|
||||
@( \
|
||||
if [ ! -e /usr/src/linux ]; then \
|
||||
echo "Expect kernel source at location /usr/src/linux"; \
|
||||
echo "Sym.link /usr/src/linux -> where you have your sources"; \
|
||||
exit -1; \
|
||||
fi; \
|
||||
if [ ! -r /usr/src/linux/include ]; then \
|
||||
echo "Expect readable headers in /usr/src/linux/include"; \
|
||||
exit -1; \
|
||||
fi; \
|
||||
if [ ! -r /usr/src/linux/include/linux/version.h ]; then \
|
||||
echo "Missing /usr/src/linux/include/linux/version.h"; \
|
||||
echo "Configure and install the kernel first"; \
|
||||
exit -1; \
|
||||
fi; \
|
||||
if [ ! -e /proc/cpuinfo ]; then \
|
||||
echo "You need the /proc file system"; \
|
||||
echo "Reconfigure kernel and say Yes to CONFIG_PROC_FS"; \
|
||||
exit -1; \
|
||||
fi; \
|
||||
)
|
||||
|
||||
kinfo: kinfo.c
|
||||
$(CC) -o kinfo kinfo.c
|
||||
|
||||
kinfo.h: kinfo
|
||||
./kinfo
|
||||
|
||||
ifneq ($(KERNEL_VERSION_MAJOR),2.0)
|
||||
|
||||
###############################################################################
|
||||
# kernel 2.1+
|
||||
|
||||
3dfx.o: kinfo.h 3dfx_driver.c Makefile
|
||||
$(CC) $(CFLAGS) -c -o $@ 3dfx_driver.c
|
||||
|
||||
else
|
||||
|
||||
###############################################################################
|
||||
# Kernel 2.0
|
||||
|
||||
OBJS = 3dfx_driver.o
|
||||
ifneq ($(HAVE_MTRR),)
|
||||
OBJS += mtrrs.o
|
||||
endif
|
||||
|
||||
3dfx.o: kinfo.h $(OBJS) Makefile
|
||||
$(LD) -r -o $@ $(OBJS)
|
||||
|
||||
endif
|
||||
|
||||
###############################################################################
|
||||
|
||||
install:
|
||||
mkdir -p /lib/modules/$(shell ./kinfo --UTS)/misc
|
||||
cp 3dfx.o /lib/modules/$(shell ./kinfo --UTS)/misc/3dfx.o
|
||||
@( \
|
||||
if [ -e /lib/modules/$(shell ./kinfo --UTS)/modules.dep ]; then \
|
||||
indep=`grep 'misc/3dfx.o:' /lib/modules/$(shell ./kinfo --UTS)/modules.dep`; \
|
||||
if [ -z "$$indep" ]; then \
|
||||
echo "/lib/modules/$(shell ./kinfo --UTS)/misc/3dfx.o:" >> /lib/modules/$(shell ./kinfo --UTS)/modules.dep; \
|
||||
echo "" >> /lib/modules/$(shell ./kinfo --UTS)/modules.dep; \
|
||||
fi; \
|
||||
fi; \
|
||||
if [ ! -c /dev/3dfx ]; then \
|
||||
mknod /dev/3dfx c 107 0; \
|
||||
chmod go+w /dev/3dfx; \
|
||||
fi; \
|
||||
if [ "$(RPM_INSTALL)" = "1" ]; then \
|
||||
echo "/lib/modules/$(shell ./kinfo --UTS)/misc/3dfx.o"; \
|
||||
else \
|
||||
inconf=`grep 'alias char-major-107 3dfx' /etc/conf.modules`; \
|
||||
if [ -z "$$inconf" ]; then \
|
||||
echo "alias char-major-107 3dfx" >> /etc/conf.modules; \
|
||||
fi; \
|
||||
fi; \
|
||||
)
|
||||
|
||||
###############################################################################
|
||||
# This is for debugging purposes by the developers:
|
||||
|
||||
clean:
|
||||
rm -f *.o *.s kinfo kinfo.h
|
||||
|
||||
3dfx.s: 3dfx_driver.c Makefile
|
||||
$(CC) $(CFLAGS) -S -c 3dfx_driver.c
|
||||
|
||||
tar:
|
||||
tar czf ../../SOURCES/Dev3Dfx-2.5.tar.gz 3dfx_driver.c mtrrs.c Makefile
|
||||
|
||||
|
||||
debug:
|
||||
make OPT_CFLAGS="-g -Wall -Wstrict-prototypes -DDEBUG"
|
||||
|
||||
@@ -1,67 +0,0 @@
|
||||
/*
|
||||
kinfo.c: A small program that includes several kernel heades
|
||||
and builds a header defining options for 3dfx_driver.c.
|
||||
|
||||
1999/12/22 Joseph Kain <joseph@3dfx.com>
|
||||
|
||||
* Initial version
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
/* These include files will bring in the information we need */
|
||||
#include <linux/autoconf.h>
|
||||
#include <linux/version.h>
|
||||
|
||||
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
/* Here is the strategy. The old Makefile would have grepped the kernel
|
||||
* headers and put these defines on the command line. Now we include
|
||||
* the kernel headers and extract the information. Then we create a
|
||||
* new header with all of the options we need. */
|
||||
|
||||
if (argc == 1)
|
||||
{
|
||||
FILE *f = fopen ("kinfo.h", "w");
|
||||
FILE *p = NULL;
|
||||
int result;
|
||||
char temp[1000];
|
||||
|
||||
#ifdef CONFIG_MTRR
|
||||
/* It is not enough to just check if the kernel supports MTRRs, if the
|
||||
* processor doesn't have MTRRs then its possible (and likely) that
|
||||
* the kernel was still compiled with MTRR support. So we also have to
|
||||
* check the processor has MTRRs. */
|
||||
|
||||
result = system ("grep mtrr /proc/cpuinfo > /dev/null");
|
||||
|
||||
/* See if grep found anything */
|
||||
if (result == 0) /* Grep reported a match */
|
||||
{
|
||||
fprintf (f, "#define HAVE_MTRR\n");
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
fprintf (f, "#define __SMP__\n");
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_MODVERSIONS
|
||||
fprintf (f, "#define MODVERSIONS\n");
|
||||
#endif
|
||||
|
||||
fclose (f);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (strcmp (argv[1], "--UTS") == 0)
|
||||
{
|
||||
printf ("%s", UTS_RELEASE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,935 +0,0 @@
|
||||
/* Generic MTRR (Memory Type Range Register) driver.
|
||||
|
||||
Copyright (C) 1997-1998 Richard Gooch
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
Richard Gooch may be reached by email at rgooch@atnf.csiro.au
|
||||
The postal address is:
|
||||
Richard Gooch, c/o ATNF, P. O. Box 76, Epping, N.S.W., 2121, Australia.
|
||||
|
||||
Source: "Pentium Pro Family Developer's Manual, Volume 3:
|
||||
Operating System Writer's Guide" (Intel document number 242692),
|
||||
section 11.11.7
|
||||
|
||||
ChangeLog
|
||||
|
||||
Prehistory Martin Tischhäuser <martin@ikcbarka.fzk.de>
|
||||
Initial register-setting code (from proform-1.0).
|
||||
19971216 Richard Gooch <rgooch@atnf.csiro.au>
|
||||
Original version for /proc/mtrr interface, SMP-safe.
|
||||
v1.0
|
||||
19971217 Richard Gooch <rgooch@atnf.csiro.au>
|
||||
Bug fix for ioctls()'s.
|
||||
Added sample code in Documentation/mtrr.txt
|
||||
v1.1
|
||||
19971218 Richard Gooch <rgooch@atnf.csiro.au>
|
||||
Disallow overlapping regions.
|
||||
19971219 Jens Maurer <jmaurer@menuett.rhein-main.de>
|
||||
Register-setting fixups.
|
||||
v1.2
|
||||
19971222 Richard Gooch <rgooch@atnf.csiro.au>
|
||||
Fixups for kernel 2.1.75.
|
||||
v1.3
|
||||
19971229 David Wragg <dpw@doc.ic.ac.uk>
|
||||
Register-setting fixups and conformity with Intel conventions.
|
||||
19971229 Richard Gooch <rgooch@atnf.csiro.au>
|
||||
Cosmetic changes and wrote this ChangeLog ;-)
|
||||
19980106 Richard Gooch <rgooch@atnf.csiro.au>
|
||||
Fixups for kernel 2.1.78.
|
||||
v1.4
|
||||
19980119 David Wragg <dpw@doc.ic.ac.uk>
|
||||
Included passive-release enable code (elsewhere in PCI setup).
|
||||
v1.5
|
||||
19980131 Richard Gooch <rgooch@atnf.csiro.au>
|
||||
Replaced global kernel lock with private spinlock.
|
||||
v1.6
|
||||
19980201 Richard Gooch <rgooch@atnf.csiro.au>
|
||||
Added wait for other CPUs to complete changes.
|
||||
v1.7
|
||||
19980202 Richard Gooch <rgooch@atnf.csiro.au>
|
||||
Bug fix in definition of <set_mtrr> for UP.
|
||||
v1.8
|
||||
19980319 Richard Gooch <rgooch@atnf.csiro.au>
|
||||
Fixups for kernel 2.1.90.
|
||||
19980323 Richard Gooch <rgooch@atnf.csiro.au>
|
||||
Move SMP BIOS fixup before secondary CPUs call <calibrate_delay>
|
||||
v1.9
|
||||
19980325 Richard Gooch <rgooch@atnf.csiro.au>
|
||||
Fixed test for overlapping regions: confused by adjacent regions
|
||||
19980326 Richard Gooch <rgooch@atnf.csiro.au>
|
||||
Added wbinvd in <set_mtrr_prepare>.
|
||||
19980401 Richard Gooch <rgooch@atnf.csiro.au>
|
||||
Bug fix for non-SMP compilation.
|
||||
19980418 David Wragg <dpw@doc.ic.ac.uk>
|
||||
Fixed-MTRR synchronisation for SMP and use atomic operations
|
||||
instead of spinlocks.
|
||||
19980418 Richard Gooch <rgooch@atnf.csiro.au>
|
||||
Differentiate different MTRR register classes for BIOS fixup.
|
||||
v1.10
|
||||
19980419 David Wragg <dpw@doc.ic.ac.uk>
|
||||
Bug fix in variable MTRR synchronisation.
|
||||
v1.11
|
||||
19980419 Richard Gooch <rgooch@atnf.csiro.au>
|
||||
Fixups for kernel 2.1.97.
|
||||
v1.12
|
||||
19980421 Richard Gooch <rgooch@atnf.csiro.au>
|
||||
Safer synchronisation across CPUs when changing MTRRs.
|
||||
v1.13
|
||||
19980423 Richard Gooch <rgooch@atnf.csiro.au>
|
||||
Bugfix for SMP systems without MTRR support.
|
||||
v1.14
|
||||
19980427 Richard Gooch <rgooch@atnf.csiro.au>
|
||||
Trap calls to <mtrr_add> and <mtrr_del> on non-MTRR machines.
|
||||
v1.15
|
||||
19980427 Richard Gooch <rgooch@atnf.csiro.au>
|
||||
Use atomic bitops for setting SMP change mask.
|
||||
v1.16
|
||||
19980428 Richard Gooch <rgooch@atnf.csiro.au>
|
||||
Removed spurious diagnostic message.
|
||||
v1.17
|
||||
19980429 Richard Gooch <rgooch@atnf.csiro.au>
|
||||
Moved register-setting macros into this file.
|
||||
Moved setup code from init/main.c to i386-specific areas.
|
||||
v1.18
|
||||
19980502 Richard Gooch <rgooch@atnf.csiro.au>
|
||||
Moved MTRR detection outside conditionals in <mtrr_init>.
|
||||
v1.19
|
||||
19980502 Richard Gooch <rgooch@atnf.csiro.au>
|
||||
Documentation improvement: mention Pentium II and AGP.
|
||||
v1.20
|
||||
19980521 Richard Gooch <rgooch@atnf.csiro.au>
|
||||
Only manipulate interrupt enable flag on local CPU.
|
||||
Allow enclosed uncachable regions.
|
||||
v1.21
|
||||
|
||||
v1.21-- Emil Briggs <briggs@tick.physics.ncsu.edu>
|
||||
Backported to 2.0.x kernels, /proc and ioctl
|
||||
interfaces removed and the result incorporated
|
||||
into the 3dfx device driver. Not SMP safe. If
|
||||
you have an SMP use the 2.2 series kernels.
|
||||
|
||||
v1.22
|
||||
19991222 Joseph Kain <joseph@3dfx.com>
|
||||
Do kernel version checks here instead of in
|
||||
Makefile. The Makefile now only needs the
|
||||
kernel version for install.
|
||||
*/
|
||||
|
||||
|
||||
/* Include this first as it defines things that affect the kernel headers */
|
||||
#include "kinfo.h"
|
||||
|
||||
/* MTRR support is only available in kerenls versioned 2.1.0 or higher.
|
||||
* For earlier kernels this code compiles to nothing. */
|
||||
#include <linux/version.h>
|
||||
|
||||
#ifndef KERNEL_VERSION
|
||||
#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
|
||||
#endif
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 1, 0)
|
||||
|
||||
|
||||
#ifndef _LINUX_MTRR_H
|
||||
#define _LINUX_MTRR_H
|
||||
|
||||
struct mtrr_sentry
|
||||
{
|
||||
unsigned long base; /* Base address */
|
||||
unsigned long size; /* Size of region */
|
||||
unsigned int type; /* Type of region */
|
||||
};
|
||||
|
||||
struct mtrr_gentry
|
||||
{
|
||||
unsigned int regnum; /* Register number */
|
||||
unsigned long base; /* Base address */
|
||||
unsigned long size; /* Size of region */
|
||||
unsigned int type; /* Type of region */
|
||||
};
|
||||
|
||||
|
||||
/* These are the region types */
|
||||
#define MTRR_TYPE_UNCACHABLE 0
|
||||
#define MTRR_TYPE_WRCOMB 1
|
||||
/*#define MTRR_TYPE_ 2*/
|
||||
/*#define MTRR_TYPE_ 3*/
|
||||
#define MTRR_TYPE_WRTHROUGH 4
|
||||
#define MTRR_TYPE_WRPROT 5
|
||||
#define MTRR_TYPE_WRBACK 6
|
||||
#define MTRR_NUM_TYPES 7
|
||||
|
||||
static char *mtrr_strings[MTRR_NUM_TYPES] =
|
||||
{
|
||||
"uncachable", /* 0 */
|
||||
"write-combining", /* 1 */
|
||||
"?", /* 2 */
|
||||
"?", /* 3 */
|
||||
"write-through", /* 4 */
|
||||
"write-protect", /* 5 */
|
||||
"write-back", /* 6 */
|
||||
};
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
/* The following functions are for use by other drivers */
|
||||
extern int mtrr_add (unsigned long base, unsigned long size,
|
||||
unsigned int type, char increment);
|
||||
extern int mtrr_del (int reg, unsigned long base, unsigned long size);
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* _LINUX_MTRR_H */
|
||||
|
||||
#ifdef MODULE
|
||||
#include <linux/autoconf.h>
|
||||
#if defined(CONFIG_MODVERSIONS) && !defined(MODVERSIONS)
|
||||
#define MODVERSIONS
|
||||
#endif
|
||||
#ifdef MODVERSIONS
|
||||
#include <linux/modversions.h>
|
||||
#endif
|
||||
#endif
|
||||
#include <linux/sched.h>
|
||||
#include <linux/tty.h>
|
||||
#include <linux/timer.h>
|
||||
#include <linux/config.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/wait.h>
|
||||
#include <linux/string.h>
|
||||
#include <linux/malloc.h>
|
||||
#include <linux/ioport.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/fs.h>
|
||||
#include <linux/ctype.h>
|
||||
#include <linux/proc_fs.h>
|
||||
#define MTRR_NEED_STRINGS
|
||||
|
||||
#include <asm/io.h>
|
||||
#include <asm/processor.h>
|
||||
#include <asm/system.h>
|
||||
#include <asm/pgtable.h>
|
||||
#include <asm/segment.h>
|
||||
#include <asm/bitops.h>
|
||||
#include <asm/smp_lock.h>
|
||||
#include <asm/atomic.h>
|
||||
#include <linux/smp.h>
|
||||
|
||||
#undef __SMP__
|
||||
|
||||
#define MTRR_VERSION "1.21 (19980521)"
|
||||
|
||||
#define TRUE 1
|
||||
#define FALSE 0
|
||||
|
||||
#define X86_FEATURE_MTRR 0x1000 /* memory type registers */
|
||||
|
||||
#define MTRRcap_MSR 0x0fe
|
||||
#define MTRRdefType_MSR 0x2ff
|
||||
|
||||
#define MTRRphysBase_MSR(reg) (0x200 + 2 * (reg))
|
||||
#define MTRRphysMask_MSR(reg) (0x200 + 2 * (reg) + 1)
|
||||
|
||||
#define NUM_FIXED_RANGES 88
|
||||
#define MTRRfix64K_00000_MSR 0x250
|
||||
#define MTRRfix16K_80000_MSR 0x258
|
||||
#define MTRRfix16K_A0000_MSR 0x259
|
||||
#define MTRRfix4K_C0000_MSR 0x268
|
||||
#define MTRRfix4K_C8000_MSR 0x269
|
||||
#define MTRRfix4K_D0000_MSR 0x26a
|
||||
#define MTRRfix4K_D8000_MSR 0x26b
|
||||
#define MTRRfix4K_E0000_MSR 0x26c
|
||||
#define MTRRfix4K_E8000_MSR 0x26d
|
||||
#define MTRRfix4K_F0000_MSR 0x26e
|
||||
#define MTRRfix4K_F8000_MSR 0x26f
|
||||
|
||||
|
||||
#ifdef __SMP__
|
||||
# define MTRR_CHANGE_MASK_FIXED 0x01
|
||||
# define MTRR_CHANGE_MASK_VARIABLE 0x02
|
||||
# define MTRR_CHANGE_MASK_DEFTYPE 0x04
|
||||
#endif
|
||||
|
||||
/* In the processor's MTRR interface, the MTRR type is always held in
|
||||
an 8 bit field: */
|
||||
typedef u8 mtrr_type;
|
||||
|
||||
#define LINE_SIZE 80
|
||||
#define JIFFIE_TIMEOUT 100
|
||||
|
||||
#define set_mtrr(reg,base,size,type) set_mtrr_up (reg, base, size, type,TRUE)
|
||||
|
||||
|
||||
static unsigned int *usage_table = NULL;
|
||||
|
||||
|
||||
struct set_mtrr_context
|
||||
{
|
||||
unsigned long flags;
|
||||
unsigned long deftype_lo;
|
||||
unsigned long deftype_hi;
|
||||
unsigned long cr4val;
|
||||
};
|
||||
|
||||
/*
|
||||
* Access to machine-specific registers (available on 586 and better only)
|
||||
* Note: the rd* operations modify the parameters directly (without using
|
||||
* pointer indirection), this allows gcc to optimize better
|
||||
*/
|
||||
#define rdmsr(msr,val1,val2) \
|
||||
__asm__ __volatile__("rdmsr" \
|
||||
: "=a" (val1), "=d" (val2) \
|
||||
: "c" (msr))
|
||||
|
||||
#define wrmsr(msr,val1,val2) \
|
||||
__asm__ __volatile__("wrmsr" \
|
||||
: /* no outputs */ \
|
||||
: "c" (msr), "a" (val1), "d" (val2))
|
||||
|
||||
#define rdtsc(low,high) \
|
||||
__asm__ __volatile__("rdtsc" : "=a" (low), "=d" (high))
|
||||
|
||||
#define rdpmc(counter,low,high) \
|
||||
__asm__ __volatile__("rdpmc" \
|
||||
: "=a" (low), "=d" (high) \
|
||||
: "c" (counter))
|
||||
|
||||
|
||||
/* Put the processor into a state where MTRRs can be safely set. */
|
||||
static void set_mtrr_prepare(struct set_mtrr_context *ctxt)
|
||||
{
|
||||
unsigned long tmp;
|
||||
|
||||
/* disable interrupts locally */
|
||||
save_flags (ctxt->flags); cli ();
|
||||
|
||||
/* save value of CR4 and clear Page Global Enable (bit 7) */
|
||||
asm volatile ("movl %%cr4, %0\n\t"
|
||||
"movl %0, %1\n\t"
|
||||
"andb $0x7f, %b1\n\t"
|
||||
"movl %1, %%cr4\n\t"
|
||||
: "=r" (ctxt->cr4val), "=q" (tmp) : : "memory");
|
||||
|
||||
/* disable and flush caches. Note that wbinvd flushes the TLBs as
|
||||
a side-effect. */
|
||||
asm volatile ("movl %%cr0, %0\n\t"
|
||||
"orl $0x40000000, %0\n\t"
|
||||
"wbinvd\n\t"
|
||||
"movl %0, %%cr0\n\t"
|
||||
"wbinvd\n\t"
|
||||
: "=r" (tmp) : : "memory");
|
||||
|
||||
/* disable MTRRs, and set the default type to uncached. */
|
||||
rdmsr(MTRRdefType_MSR, ctxt->deftype_lo, ctxt->deftype_hi);
|
||||
wrmsr(MTRRdefType_MSR, ctxt->deftype_lo & 0xf300UL, ctxt->deftype_hi);
|
||||
} /* End Function set_mtrr_prepare */
|
||||
|
||||
|
||||
/* Restore the processor after a set_mtrr_prepare */
|
||||
static void set_mtrr_done(struct set_mtrr_context *ctxt)
|
||||
{
|
||||
unsigned long tmp;
|
||||
|
||||
/* flush caches and TLBs */
|
||||
asm volatile ("wbinvd" : : : "memory" );
|
||||
|
||||
/* restore MTRRdefType */
|
||||
wrmsr(MTRRdefType_MSR, ctxt->deftype_lo, ctxt->deftype_hi);
|
||||
|
||||
/* enable caches */
|
||||
asm volatile ("movl %%cr0, %0\n\t"
|
||||
"andl $0xbfffffff, %0\n\t"
|
||||
"movl %0, %%cr0\n\t"
|
||||
: "=r" (tmp) : : "memory");
|
||||
|
||||
/* restore value of CR4 */
|
||||
asm volatile ("movl %0, %%cr4"
|
||||
: : "r" (ctxt->cr4val) : "memory");
|
||||
|
||||
/* re-enable interrupts locally (if enabled previously) */
|
||||
restore_flags (ctxt->flags);
|
||||
} /* End Function set_mtrr_done */
|
||||
|
||||
|
||||
/* this function returns the number of variable MTRRs */
|
||||
static unsigned int get_num_var_ranges (void)
|
||||
{
|
||||
unsigned long config, dummy;
|
||||
|
||||
rdmsr(MTRRcap_MSR, config, dummy);
|
||||
return (config & 0xff);
|
||||
} /* End Function get_num_var_ranges */
|
||||
|
||||
|
||||
/* non-zero if we have the write-combining memory type. */
|
||||
static int have_wrcomb (void)
|
||||
{
|
||||
unsigned long config, dummy;
|
||||
|
||||
rdmsr(MTRRcap_MSR, config, dummy);
|
||||
return (config & (1<<10));
|
||||
}
|
||||
|
||||
|
||||
static void get_mtrr (unsigned int reg, unsigned long *base,
|
||||
unsigned long *size, mtrr_type *type)
|
||||
{
|
||||
unsigned long dummy, mask_lo, base_lo;
|
||||
|
||||
rdmsr(MTRRphysMask_MSR(reg), mask_lo, dummy);
|
||||
if ((mask_lo & 0x800) == 0) {
|
||||
/* Invalid (i.e. free) range. */
|
||||
*base = 0;
|
||||
*size = 0;
|
||||
*type = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
rdmsr(MTRRphysBase_MSR(reg), base_lo, dummy);
|
||||
|
||||
/* We ignore the extra address bits (32-35). If someone wants to
|
||||
run x86 Linux on a machine with >4GB memory, this will be the
|
||||
least of their problems. */
|
||||
|
||||
/* Clean up mask_lo so it gives the real address mask. */
|
||||
mask_lo = (mask_lo & 0xfffff000UL);
|
||||
|
||||
/* This works correctly if size is a power of two, i.e. a
|
||||
contiguous range. */
|
||||
*size = ~(mask_lo - 1);
|
||||
|
||||
*base = (base_lo & 0xfffff000UL);
|
||||
*type = (base_lo & 0xff);
|
||||
} /* End Function get_mtrr */
|
||||
|
||||
|
||||
static void set_mtrr_up (unsigned int reg, unsigned long base,
|
||||
unsigned long size, mtrr_type type, int do_safe)
|
||||
/* [SUMMARY] Set variable MTRR register on the local CPU.
|
||||
<reg> The register to set.
|
||||
<base> The base address of the region.
|
||||
<size> The size of the region. If this is 0 the region is disabled.
|
||||
<type> The type of the region.
|
||||
<do_safe> If TRUE, do the change safely. If FALSE, safety measures should
|
||||
be done externally.
|
||||
*/
|
||||
{
|
||||
struct set_mtrr_context ctxt;
|
||||
|
||||
if (do_safe) set_mtrr_prepare (&ctxt);
|
||||
if (size == 0)
|
||||
{
|
||||
/* The invalid bit is kept in the mask, so we simply clear the
|
||||
relevant mask register to disable a range. */
|
||||
wrmsr (MTRRphysMask_MSR (reg), 0, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
wrmsr (MTRRphysBase_MSR (reg), base | type, 0);
|
||||
wrmsr (MTRRphysMask_MSR (reg), ~(size - 1) | 0x800, 0);
|
||||
}
|
||||
if (do_safe) set_mtrr_done (&ctxt);
|
||||
} /* End Function set_mtrr_up */
|
||||
|
||||
|
||||
#ifdef __SMP__
|
||||
|
||||
struct mtrr_var_range
|
||||
{
|
||||
unsigned long base_lo;
|
||||
unsigned long base_hi;
|
||||
unsigned long mask_lo;
|
||||
unsigned long mask_hi;
|
||||
};
|
||||
|
||||
|
||||
/* Get the MSR pair relating to a var range. */
|
||||
static void get_mtrr_var_range (unsigned int index,
|
||||
struct mtrr_var_range *vr)
|
||||
{
|
||||
rdmsr (MTRRphysBase_MSR (index), vr->base_lo, vr->base_hi);
|
||||
rdmsr (MTRRphysMask_MSR (index), vr->mask_lo, vr->mask_hi);
|
||||
} /* End Function get_mtrr_var_range */
|
||||
|
||||
|
||||
/* Set the MSR pair relating to a var range. Returns TRUE if
|
||||
changes are made. */
|
||||
static int set_mtrr_var_range_testing (unsigned int index,
|
||||
struct mtrr_var_range *vr)
|
||||
{
|
||||
unsigned int lo, hi;
|
||||
int changed = FALSE;
|
||||
|
||||
rdmsr(MTRRphysBase_MSR(index), lo, hi);
|
||||
|
||||
if ((vr->base_lo & 0xfffff0ffUL) != (lo & 0xfffff0ffUL)
|
||||
|| (vr->base_hi & 0xfUL) != (hi & 0xfUL)) {
|
||||
wrmsr(MTRRphysBase_MSR(index), vr->base_lo, vr->base_hi);
|
||||
changed = TRUE;
|
||||
}
|
||||
|
||||
rdmsr(MTRRphysMask_MSR(index), lo, hi);
|
||||
|
||||
if ((vr->mask_lo & 0xfffff800UL) != (lo & 0xfffff800UL)
|
||||
|| (vr->mask_hi & 0xfUL) != (hi & 0xfUL)) {
|
||||
wrmsr(MTRRphysMask_MSR(index), vr->mask_lo, vr->mask_hi);
|
||||
changed = TRUE;
|
||||
}
|
||||
|
||||
return changed;
|
||||
}
|
||||
|
||||
|
||||
static void get_fixed_ranges(mtrr_type *frs)
|
||||
{
|
||||
unsigned long *p = (unsigned long *)frs;
|
||||
int i;
|
||||
|
||||
rdmsr(MTRRfix64K_00000_MSR, p[0], p[1]);
|
||||
|
||||
for (i = 0; i < 2; i++)
|
||||
rdmsr(MTRRfix16K_80000_MSR + i, p[2 + i*2], p[3 + i*2]);
|
||||
|
||||
for (i = 0; i < 8; i++)
|
||||
rdmsr(MTRRfix4K_C0000_MSR + i, p[6 + i*2], p[7 + i*2]);
|
||||
}
|
||||
|
||||
|
||||
static int set_fixed_ranges_testing(mtrr_type *frs)
|
||||
{
|
||||
unsigned long *p = (unsigned long *)frs;
|
||||
int changed = FALSE;
|
||||
int i;
|
||||
unsigned long lo, hi;
|
||||
|
||||
rdmsr(MTRRfix64K_00000_MSR, lo, hi);
|
||||
if (p[0] != lo || p[1] != hi) {
|
||||
wrmsr(MTRRfix64K_00000_MSR, p[0], p[1]);
|
||||
changed = TRUE;
|
||||
}
|
||||
|
||||
for (i = 0; i < 2; i++) {
|
||||
rdmsr(MTRRfix16K_80000_MSR + i, lo, hi);
|
||||
if (p[2 + i*2] != lo || p[3 + i*2] != hi) {
|
||||
wrmsr(MTRRfix16K_80000_MSR + i, p[2 + i*2], p[3 + i*2]);
|
||||
changed = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < 8; i++) {
|
||||
rdmsr(MTRRfix4K_C0000_MSR + i, lo, hi);
|
||||
if (p[6 + i*2] != lo || p[7 + i*2] != hi) {
|
||||
wrmsr(MTRRfix4K_C0000_MSR + i, p[6 + i*2], p[7 + i*2]);
|
||||
changed = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
return changed;
|
||||
}
|
||||
|
||||
|
||||
struct mtrr_state
|
||||
{
|
||||
unsigned int num_var_ranges;
|
||||
struct mtrr_var_range *var_ranges;
|
||||
mtrr_type fixed_ranges[NUM_FIXED_RANGES];
|
||||
unsigned char enabled;
|
||||
mtrr_type def_type;
|
||||
};
|
||||
|
||||
|
||||
/* Grab all of the MTRR state for this CPU into *state. */
|
||||
static void get_mtrr_state(struct mtrr_state *state)
|
||||
{
|
||||
unsigned int nvrs, i;
|
||||
struct mtrr_var_range *vrs;
|
||||
unsigned long lo, dummy;
|
||||
|
||||
nvrs = state->num_var_ranges = get_num_var_ranges();
|
||||
vrs = state->var_ranges
|
||||
= kmalloc(nvrs * sizeof(struct mtrr_var_range), GFP_KERNEL);
|
||||
if (vrs == NULL)
|
||||
nvrs = state->num_var_ranges = 0;
|
||||
|
||||
for (i = 0; i < nvrs; i++)
|
||||
get_mtrr_var_range(i, &vrs[i]);
|
||||
|
||||
get_fixed_ranges(state->fixed_ranges);
|
||||
|
||||
rdmsr(MTRRdefType_MSR, lo, dummy);
|
||||
state->def_type = (lo & 0xff);
|
||||
state->enabled = (lo & 0xc00) >> 10;
|
||||
} /* End Function get_mtrr_state */
|
||||
|
||||
|
||||
/* Free resources associated with a struct mtrr_state */
|
||||
static void finalize_mtrr_state(struct mtrr_state *state)
|
||||
{
|
||||
if (state->var_ranges) kfree (state->var_ranges);
|
||||
} /* End Function finalize_mtrr_state */
|
||||
|
||||
|
||||
static unsigned long set_mtrr_state (struct mtrr_state *state,
|
||||
struct set_mtrr_context *ctxt)
|
||||
/* [SUMMARY] Set the MTRR state for this CPU.
|
||||
<state> The MTRR state information to read.
|
||||
<ctxt> Some relevant CPU context.
|
||||
[NOTE] The CPU must already be in a safe state for MTRR changes.
|
||||
[RETURNS] 0 if no changes made, else a mask indication what was changed.
|
||||
*/
|
||||
{
|
||||
unsigned int i;
|
||||
unsigned long change_mask = 0;
|
||||
|
||||
for (i = 0; i < state->num_var_ranges; i++)
|
||||
if (set_mtrr_var_range_testing(i, &state->var_ranges[i]))
|
||||
change_mask |= MTRR_CHANGE_MASK_VARIABLE;
|
||||
|
||||
if (set_fixed_ranges_testing(state->fixed_ranges))
|
||||
change_mask |= MTRR_CHANGE_MASK_FIXED;
|
||||
|
||||
/* set_mtrr_restore restores the old value of MTRRdefType,
|
||||
so to set it we fiddle with the saved value. */
|
||||
if ((ctxt->deftype_lo & 0xff) != state->def_type
|
||||
|| ((ctxt->deftype_lo & 0xc00) >> 10) != state->enabled)
|
||||
{
|
||||
ctxt->deftype_lo |= (state->def_type | state->enabled << 10);
|
||||
change_mask |= MTRR_CHANGE_MASK_DEFTYPE;
|
||||
}
|
||||
|
||||
return change_mask;
|
||||
} /* End Function set_mtrr_state */
|
||||
|
||||
|
||||
static atomic_t undone_count;
|
||||
static void (*handler_func) (struct set_mtrr_context *ctxt, void *info);
|
||||
static void *handler_info;
|
||||
static volatile int wait_barrier_execute = FALSE;
|
||||
static volatile int wait_barrier_cache_enable = FALSE;
|
||||
|
||||
static void sync_handler (void)
|
||||
/* [SUMMARY] Synchronisation handler. Executed by "other" CPUs.
|
||||
[RETURNS] Nothing.
|
||||
*/
|
||||
{
|
||||
struct set_mtrr_context ctxt;
|
||||
|
||||
set_mtrr_prepare (&ctxt);
|
||||
/* Notify master CPU that I'm at the barrier and then wait */
|
||||
atomic_dec (&undone_count);
|
||||
while (wait_barrier_execute) barrier ();
|
||||
/* The master has cleared me to execute */
|
||||
(*handler_func) (&ctxt, handler_info);
|
||||
/* Notify master CPU that I've executed the function */
|
||||
atomic_dec (&undone_count);
|
||||
/* Wait for master to clear me to enable cache and return */
|
||||
while (wait_barrier_cache_enable) barrier ();
|
||||
set_mtrr_done (&ctxt);
|
||||
} /* End Function sync_handler */
|
||||
|
||||
static void do_all_cpus (void (*handler) (struct set_mtrr_context *ctxt,
|
||||
void *info),
|
||||
void *info, int local)
|
||||
/* [SUMMARY] Execute a function on all CPUs, with caches flushed and disabled.
|
||||
[PURPOSE] This function will synchronise all CPUs, flush and disable caches
|
||||
on all CPUs, then call a specified function. When the specified function
|
||||
finishes on all CPUs, caches are enabled on all CPUs.
|
||||
<handler> The function to execute.
|
||||
<info> An arbitrary information pointer which is passed to <<handler>>.
|
||||
<local> If TRUE <<handler>> is executed locally.
|
||||
[RETURNS] Nothing.
|
||||
*/
|
||||
{
|
||||
unsigned long timeout;
|
||||
struct set_mtrr_context ctxt;
|
||||
|
||||
mtrr_hook = sync_handler;
|
||||
handler_func = handler;
|
||||
handler_info = info;
|
||||
wait_barrier_execute = TRUE;
|
||||
wait_barrier_cache_enable = TRUE;
|
||||
/* Send a message to all other CPUs and wait for them to enter the
|
||||
barrier */
|
||||
atomic_set (&undone_count, smp_num_cpus - 1);
|
||||
smp_message_pass (MSG_ALL_BUT_SELF, MSG_MTRR_CHANGE, 0, 0);
|
||||
/* Wait for it to be done */
|
||||
timeout = jiffies + JIFFIE_TIMEOUT;
|
||||
while ( (atomic_read (&undone_count) > 0) && (jiffies < timeout) )
|
||||
barrier ();
|
||||
if (atomic_read (&undone_count) > 0)
|
||||
{
|
||||
panic ("mtrr: timed out waiting for other CPUs\n");
|
||||
}
|
||||
mtrr_hook = NULL;
|
||||
/* All other CPUs should be waiting for the barrier, with their caches
|
||||
already flushed and disabled. Prepare for function completion
|
||||
notification */
|
||||
atomic_set (&undone_count, smp_num_cpus - 1);
|
||||
/* Flush and disable the local CPU's cache and release the barier, which
|
||||
should cause the other CPUs to execute the function. Also execute it
|
||||
locally if required */
|
||||
set_mtrr_prepare (&ctxt);
|
||||
wait_barrier_execute = FALSE;
|
||||
if (local) (*handler) (&ctxt, info);
|
||||
/* Now wait for other CPUs to complete the function */
|
||||
while (atomic_read (&undone_count) > 0) barrier ();
|
||||
/* Now all CPUs should have finished the function. Release the barrier to
|
||||
allow them to re-enable their caches and return from their interrupt,
|
||||
then enable the local cache and return */
|
||||
wait_barrier_cache_enable = FALSE;
|
||||
set_mtrr_done (&ctxt);
|
||||
handler_func = NULL;
|
||||
handler_info = NULL;
|
||||
} /* End Function do_all_cpus */
|
||||
|
||||
|
||||
struct set_mtrr_data
|
||||
{
|
||||
unsigned long smp_base;
|
||||
unsigned long smp_size;
|
||||
unsigned int smp_reg;
|
||||
mtrr_type smp_type;
|
||||
};
|
||||
|
||||
static void set_mtrr_handler (struct set_mtrr_context *ctxt, void *info)
|
||||
{
|
||||
struct set_mtrr_data *data = info;
|
||||
|
||||
set_mtrr_up (data->smp_reg, data->smp_base, data->smp_size, data->smp_type,
|
||||
FALSE);
|
||||
} /* End Function set_mtrr_handler */
|
||||
|
||||
|
||||
|
||||
/* A warning that is common to the module and non-module cases. */
|
||||
/* Some BIOS's are fucked and don't set all MTRRs the same! */
|
||||
#ifdef MODULE
|
||||
static void mtrr_state_warn (unsigned long mask)
|
||||
#else
|
||||
static void mtrr_state_warn (unsigned long mask)
|
||||
#endif
|
||||
{
|
||||
if (!mask) return;
|
||||
if (mask & MTRR_CHANGE_MASK_FIXED)
|
||||
printk ("mtrr: your CPUs had inconsistent fixed MTRR settings\n");
|
||||
if (mask & MTRR_CHANGE_MASK_VARIABLE)
|
||||
printk ("mtrr: your CPUs had inconsistent variable MTRR settings\n");
|
||||
if (mask & MTRR_CHANGE_MASK_DEFTYPE)
|
||||
printk ("mtrr: your CPUs had inconsistent MTRRdefType settings\n");
|
||||
printk ("mtrr: probably your BIOS does not setup all CPUs\n");
|
||||
} /* End Function mtrr_state_warn */
|
||||
|
||||
#ifdef MODULE
|
||||
/* As a module, copy the MTRR state using an IPI handler. */
|
||||
|
||||
static volatile unsigned long smp_changes_mask = 0;
|
||||
|
||||
static void copy_mtrr_state_handler (struct set_mtrr_context *ctxt, void *info)
|
||||
{
|
||||
unsigned long mask, count;
|
||||
struct mtrr_state *smp_mtrr_state = info;
|
||||
|
||||
mask = set_mtrr_state (smp_mtrr_state, ctxt);
|
||||
/* Use the atomic bitops to update the global mask */
|
||||
for (count = 0; count < sizeof mask * 8; ++count)
|
||||
{
|
||||
if (mask & 0x01) set_bit (count, &smp_changes_mask);
|
||||
mask >>= 1;
|
||||
}
|
||||
} /* End Function copy_mtrr_state_handler */
|
||||
|
||||
/* Copies the entire MTRR state of this CPU to all the others. */
|
||||
static void copy_mtrr_state (void)
|
||||
{
|
||||
struct mtrr_state ms;
|
||||
|
||||
get_mtrr_state (&ms);
|
||||
do_all_cpus (copy_mtrr_state_handler, &ms, FALSE);
|
||||
finalize_mtrr_state (&ms);
|
||||
mtrr_state_warn (smp_changes_mask);
|
||||
} /* End Function copy_mtrr_state */
|
||||
|
||||
#endif /* MODULE */
|
||||
#endif /* __SMP__ */
|
||||
|
||||
static char *attrib_to_str (int x)
|
||||
{
|
||||
return (x <= 6) ? mtrr_strings[x] : "?";
|
||||
} /* End Function attrib_to_str */
|
||||
|
||||
static void init_table (void)
|
||||
{
|
||||
int i, max;
|
||||
|
||||
max = get_num_var_ranges ();
|
||||
if ( ( usage_table = kmalloc (max * sizeof *usage_table, GFP_KERNEL) )
|
||||
== NULL )
|
||||
{
|
||||
printk ("mtrr: could not allocate\n");
|
||||
return;
|
||||
}
|
||||
for (i = 0; i < max; i++) usage_table[i] = 1;
|
||||
|
||||
} /* End Function init_table */
|
||||
|
||||
int mtrr_add (unsigned long base, unsigned long size, unsigned int type,
|
||||
char increment)
|
||||
/* [SUMMARY] Add an MTRR entry.
|
||||
<base> The starting (base) address of the region.
|
||||
<size> The size (in bytes) of the region.
|
||||
<type> The type of the new region.
|
||||
<increment> If true and the region already exists, the usage count will be
|
||||
incremented.
|
||||
[RETURNS] The MTRR register on success, else a negative number indicating
|
||||
the error code.
|
||||
[NOTE] This routine uses a spinlock.
|
||||
*/
|
||||
{
|
||||
int i, max;
|
||||
mtrr_type ltype;
|
||||
unsigned long lbase, lsize, last;
|
||||
|
||||
if (!usage_table) init_table();
|
||||
if ( (base & 0xfff) || (size & 0xfff) )
|
||||
{
|
||||
printk ("mtrr: size and base must be multiples of 4kB\n");
|
||||
printk ("mtrr: size: %lx base: %lx\n", size, base);
|
||||
return -EINVAL;
|
||||
}
|
||||
if (base + size < 0x100000)
|
||||
{
|
||||
printk ("mtrr: cannot set region below 1 MByte (0x%lx,0x%lx)\n",
|
||||
base, size);
|
||||
return -EINVAL;
|
||||
}
|
||||
/* Check upper bits of base and last are equal and lower bits are 0 for
|
||||
base and 1 for last */
|
||||
last = base + size - 1;
|
||||
for (lbase = base; !(lbase & 1) && (last & 1);
|
||||
lbase = lbase >> 1, last = last >> 1);
|
||||
if (lbase != last)
|
||||
{
|
||||
printk ("mtrr: base(0x%lx) is not aligned on a size(0x%lx) boundary\n",
|
||||
base, size);
|
||||
return -EINVAL;
|
||||
}
|
||||
if (type >= MTRR_NUM_TYPES)
|
||||
{
|
||||
printk ("mtrr: type: %u illegal\n", type);
|
||||
return -EINVAL;
|
||||
}
|
||||
/* If the type is WC, check that this processor supports it */
|
||||
if ( (type == MTRR_TYPE_WRCOMB) && !have_wrcomb () )
|
||||
{
|
||||
printk ("mtrr: your processor doesn't support write-combining\n");
|
||||
return -ENOSYS;
|
||||
}
|
||||
increment = increment ? 1 : 0;
|
||||
max = get_num_var_ranges ();
|
||||
/* Search for existing MTRR */
|
||||
|
||||
for (i = 0; i < max; ++i)
|
||||
{
|
||||
get_mtrr (i, &lbase, &lsize, <ype);
|
||||
if (base >= lbase + lsize) continue;
|
||||
if ( (base < lbase) && (base + size <= lbase) ) continue;
|
||||
/* At this point we know there is some kind of overlap/enclosure */
|
||||
if ( (base < lbase) || (base + size > lbase + lsize) )
|
||||
{
|
||||
printk ("mtrr: 0x%lx,0x%lx overlaps existing 0x%lx,0x%lx\n",
|
||||
base, size, lbase, lsize);
|
||||
return -EINVAL;
|
||||
}
|
||||
/* New region is enclosed by an existing region */
|
||||
if (ltype != type)
|
||||
{
|
||||
if (type == MTRR_TYPE_UNCACHABLE) continue;
|
||||
printk ( "mtrr: type mismatch for %lx,%lx old: %s new: %s\n",
|
||||
base, size, attrib_to_str (ltype), attrib_to_str (type) );
|
||||
return -EINVAL;
|
||||
}
|
||||
if (increment) ++usage_table[i];
|
||||
return i;
|
||||
}
|
||||
/* Search for an empty MTRR */
|
||||
for (i = 0; i < max; ++i)
|
||||
{
|
||||
get_mtrr (i, &lbase, &lsize, <ype);
|
||||
if (lsize > 0) continue;
|
||||
set_mtrr (i, base, size, type);
|
||||
usage_table[i] = 1;
|
||||
return i;
|
||||
}
|
||||
printk ("mtrr: no more MTRRs available\n");
|
||||
return -ENOSPC;
|
||||
} /* End Function mtrr_add */
|
||||
|
||||
int mtrr_del (int reg, unsigned long base, unsigned long size)
|
||||
/* [SUMMARY] Delete MTRR/decrement usage count.
|
||||
<reg> The register. If this is less than 0 then <<base>> and <<size>> must
|
||||
be supplied.
|
||||
<base> The base address of the region. This is ignored if <<reg>> is >= 0.
|
||||
<size> The size of the region. This is ignored if <<reg>> is >= 0.
|
||||
[RETURNS] The register on success, else a negative number indicating
|
||||
the error code.
|
||||
[NOTE] This routine uses a spinlock.
|
||||
*/
|
||||
{
|
||||
int i, max;
|
||||
mtrr_type ltype;
|
||||
unsigned long lbase, lsize;
|
||||
|
||||
if (!usage_table) init_table();
|
||||
max = get_num_var_ranges ();
|
||||
if (reg < 0)
|
||||
{
|
||||
/* Search for existing MTRR */
|
||||
for (i = 0; i < max; ++i)
|
||||
{
|
||||
get_mtrr (i, &lbase, &lsize, <ype);
|
||||
if ( (lbase == base) && (lsize == size) )
|
||||
{
|
||||
reg = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (reg < 0)
|
||||
{
|
||||
printk ("mtrr: no MTRR for %lx,%lx found\n", base, size);
|
||||
return -EINVAL;
|
||||
}
|
||||
}
|
||||
if (reg >= max)
|
||||
{
|
||||
printk ("mtrr: register: %d too big\n", reg);
|
||||
return -EINVAL;
|
||||
}
|
||||
get_mtrr (reg, &lbase, &lsize, <ype);
|
||||
if (lsize < 1)
|
||||
{
|
||||
printk ("mtrr: MTRR %d not used\n", reg);
|
||||
return -EINVAL;
|
||||
}
|
||||
if (usage_table[reg] < 1)
|
||||
{
|
||||
printk ("mtrr: reg: %d has count=0\n", reg);
|
||||
return -EINVAL;
|
||||
}
|
||||
if (--usage_table[reg] < 1) set_mtrr (reg, 0, 0, 0);
|
||||
return reg;
|
||||
} /* End Function mtrr_del */
|
||||
|
||||
#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(2, 1, 0) */
|
||||
@@ -1,31 +0,0 @@
|
||||
Here are a few notes about building Glide3x from CVS.
|
||||
|
||||
The Glide source trees are branced by platform and the platform names are
|
||||
internal names used at 3dfx. Since these name may not make sense to others
|
||||
here is a quick list.
|
||||
|
||||
sst1: Voodoo Graphics
|
||||
sst96: Voodoo Rush
|
||||
cvg: Voodoo 2
|
||||
h3: Voodoo Banshee/Voodoo 3
|
||||
|
||||
There is a single toplevel makefile for glide2x. To select a build
|
||||
for either sst1, cvg or h3 set FX_GLIDE_HW to either sst1, cvg or h3. The
|
||||
default is to build for h3.
|
||||
|
||||
There are many other environment variables used to control the Glide
|
||||
build. Here is a listing of some of the important ones:
|
||||
|
||||
DEBUG=1: Turn on debugging information, note this disables
|
||||
the asm optimizations.
|
||||
FX_GLIDE_PIC=1: Enable PIC in shared libraries.
|
||||
FX_GLIDE_CTRISETUP=1: Use C versions as opposed to ASM versions of triangle
|
||||
setup code.
|
||||
GL_AMD3D=1: Enable AMD 3DNow! optimizations. Note this is broken
|
||||
on several platforms.
|
||||
|
||||
All glide source trees use a common set of libraries kept in the
|
||||
swlibs branch. In order to build any glide library the swlibs branch
|
||||
must be moved inside the glide3x directory. The swlibs branch is not
|
||||
stored here within the glide2x cvs tree because it is also shared with
|
||||
the glide3x branch.
|
||||
@@ -1,26 +0,0 @@
|
||||
#
|
||||
# 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
|
||||
#
|
||||
# $Revision$
|
||||
# $Date$
|
||||
#
|
||||
|
||||
LDIRT = *.exe *.dll *.bat
|
||||
|
||||
!include $(BUILD_ROOT_SWLIBS)/include/nmake/3dfx.mak
|
||||
@@ -1,26 +0,0 @@
|
||||
#
|
||||
# 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
|
||||
#
|
||||
# $Revision$
|
||||
# $Date$
|
||||
#
|
||||
|
||||
LDIRT = $(patsubst makefile%,,$(wildcard *))
|
||||
|
||||
include $(BUILD_ROOT_SWLIBS)/include/make/3dfx.mak
|
||||
@@ -1,27 +0,0 @@
|
||||
#
|
||||
# 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
|
||||
#
|
||||
# $Revision$
|
||||
# $Date$
|
||||
#
|
||||
|
||||
INSTALL_DESTINATION=$(BUILD_ROOT)\cvg
|
||||
|
||||
!include $(BUILD_ROOT_SWLIBS)\include\nmake\3dfx.mak
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
#
|
||||
# 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
|
||||
#
|
||||
# $Revision$
|
||||
# $Date$
|
||||
#
|
||||
|
||||
|
||||
include $(BUILD_ROOT_SWLIBS)/include/make/3dfx.mak
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
#
|
||||
# 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
|
||||
#
|
||||
# $Revision$
|
||||
# $Date$
|
||||
#
|
||||
|
||||
THISDIR = cmd
|
||||
SUBDIRS = pass
|
||||
|
||||
include $(BUILD_ROOT_SWLIBS)/include/make/3dfx.mak
|
||||
@@ -1,40 +0,0 @@
|
||||
#
|
||||
# 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
|
||||
#
|
||||
# $Revision$
|
||||
# $Date$
|
||||
#
|
||||
|
||||
# local defines, options, includes
|
||||
LCDEFS =
|
||||
LCOPTS =
|
||||
LCINCS = -I$(BUILD_ROOT)/$(FX_GLIDE_HW)/include
|
||||
|
||||
# sources
|
||||
CFILES = pass.c
|
||||
LLDLIBS = -L$(BUILD_ROOT)/$(FX_GLIDE_HW)/lib -lsst1init \
|
||||
-L$(BUILD_ROOT_SWLIBS)/lib -lfxmisc -lfxpci
|
||||
|
||||
|
||||
# targets
|
||||
PROGRAM = pass
|
||||
INSTALL_DESTINATION = $(BUILD_ROOT)/$(FX_GLIDE_HW)
|
||||
|
||||
include $(BUILD_ROOT_SWLIBS)/include/make/3dfx.mak
|
||||
|
||||
@@ -1,48 +0,0 @@
|
||||
/*
|
||||
* 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 <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <3dfx.h>
|
||||
#include <glide.h>
|
||||
#include <sst1init.h>
|
||||
|
||||
/* This should be exported, but isn't yet */
|
||||
#define SST1INIT_MAX_BOARDS 16
|
||||
|
||||
int main (int argc[], char* argv[])
|
||||
{
|
||||
FxU32* sst[SST1INIT_MAX_BOARDS];
|
||||
int num_sst;
|
||||
int i;
|
||||
|
||||
/* Map all the boards in the system */
|
||||
num_sst = 0;
|
||||
do {
|
||||
sst[num_sst] = sst1InitMapBoard (num_sst);
|
||||
} while (sst[num_sst++] != NULL);
|
||||
|
||||
/* Shut them all down */
|
||||
for (i = 0; i < num_sst; i += 1)
|
||||
sst1InitVgaPassCtrl(sst[i], 1);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
#
|
||||
# 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
|
||||
#
|
||||
# $Revision$
|
||||
# $Date$
|
||||
#
|
||||
|
||||
THISDIR = glide
|
||||
!if "$(FX_TARGET)" == "DOS"
|
||||
SUBDIRS = src tests
|
||||
!else
|
||||
SUBDIRS = oem src tests
|
||||
!endif
|
||||
|
||||
!include $(BUILD_ROOT_SWLIBS)/include/nmake/3dfx.mak
|
||||
@@ -1,24 +0,0 @@
|
||||
#
|
||||
# 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
|
||||
#
|
||||
|
||||
THISDIR = glide
|
||||
SUBDIRS = oem src tests
|
||||
|
||||
include $(BUILD_ROOT_SWLIBS)/include/make/3dfx.mak
|
||||
@@ -1,24 +0,0 @@
|
||||
#
|
||||
# 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
|
||||
#
|
||||
|
||||
THISDIR = glide
|
||||
SUBDIRS = oem src tests
|
||||
|
||||
include $(BUILD_ROOT_SWLIBS)/include/make/3dfx.mak
|
||||
@@ -1,52 +0,0 @@
|
||||
/*
|
||||
* 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
|
||||
*
|
||||
* $Header$
|
||||
* $Log$
|
||||
*
|
||||
* 1 7/25/97 9:05a Pgj
|
||||
* generate fxbldno.h which defines BUILD_NUMBER
|
||||
*
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
struct tm locTime;
|
||||
time_t sysTime;
|
||||
char *build;
|
||||
|
||||
time(&sysTime);
|
||||
locTime = *localtime(&sysTime);
|
||||
|
||||
if (build = getenv("BUILD_NUMBER")) {
|
||||
printf("#define BUILD_NUMBER %s\n", build);
|
||||
} else {
|
||||
unsigned short magic;
|
||||
magic = (locTime.tm_yday << 7) |
|
||||
(locTime.tm_hour << 2) |
|
||||
(locTime.tm_min / 15);
|
||||
printf("#define BUILD_NUMBER %d\n", magic);
|
||||
}
|
||||
return 0;
|
||||
|
||||
} /* end main() */
|
||||
@@ -1,63 +0,0 @@
|
||||
#
|
||||
# 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
|
||||
|
||||
!if "$(FX_GLIDE_HW)" == "SST96"
|
||||
GLIDE_SRC_BASE = sst1
|
||||
!else
|
||||
GLIDE_SRC_BASE = $(FX_GLIDE_HW)
|
||||
!endif
|
||||
LCINCS = $(LCINCS) -I$(BUILD_ROOT)\$(GLIDE_SRC_BASE)\include \
|
||||
-I$(BUILD_ROOT)\$(GLIDE_SRC_BASE)\glide\src
|
||||
|
||||
!if "$(DEBUG)" == "1"
|
||||
LCDEFS = -DDEBUG=1
|
||||
!endif
|
||||
|
||||
CFILES = oeminit.c
|
||||
RCFILE = oeminit.rc
|
||||
HEADERS = oeminit.h
|
||||
PRIVATE_HEADERS = rcver.h
|
||||
LIBRARIES = fxoem2x.lib
|
||||
|
||||
INSTALL_DESTINATION = $(BUILD_ROOT)\$(GLIDE_SRC_BASE)
|
||||
|
||||
# Make a static link library for things like the diags.
|
||||
!if "$(FX_DLL_BUILD)" == "1"
|
||||
FX_DLL_LIBRARY = 1
|
||||
!else
|
||||
LCDEFS = $(LCDEFS) -DFX_STATIC_BUILD
|
||||
!endif
|
||||
|
||||
LCDEFS = $(LCDEFS)
|
||||
|
||||
!include $(BUILD_ROOT)\swlibs/include/nmake/3dfx.mak
|
||||
|
||||
!if "$(FX_TARGET)" == "WIN32"
|
||||
!if "$(FX_DLL_BUILD)" != ""
|
||||
fxoem2x.dll:
|
||||
!endif
|
||||
!endif
|
||||
|
||||
fxbldno.exe: fxbldno.c $(HEADERS) $(PRIVATE_HEADERS)
|
||||
$(CC) -o $@ fxbldno.c $(GCDEFS) $(LCDEFS) $(VCDEFS) $(LCOPTS) $(LDFLAGS)
|
||||
|
||||
fxbldno.h: fxbldno.exe
|
||||
fxbldno > fxbldno.h
|
||||
|
||||
oeminit.res: rcver.h fxbldno.h
|
||||
@@ -1,49 +0,0 @@
|
||||
#
|
||||
# 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
|
||||
|
||||
ifeq ($(FX_GLIDE_HW),SST96)
|
||||
GLIDE_SRC_BASE = sst1
|
||||
else
|
||||
GLIDE_SRC_BASE = $(FX_GLIDE_HW)
|
||||
endif
|
||||
LCINCS += -I$(BUILD_ROOT)\$(GLIDE_SRC_BASE)/include \
|
||||
-I$(BUILD_ROOT)/$(GLIDE_SRC_BASE)/glide/src
|
||||
|
||||
ifeq ($(DEBUG),1)
|
||||
DBGOPTS = -DGLIDE_DEBUG -DGDBG_INFO_ON
|
||||
GLIDE_SANITY_ALL = 1
|
||||
endif
|
||||
|
||||
CFILES = oeminit.c
|
||||
|
||||
HEADERS = oeminit.h
|
||||
|
||||
INSTALL_DESTINATION = $(BUILD_ROOT)/$(GLIDE_SRC_BASE)
|
||||
|
||||
LIBRARIES = libfxoem2x.a
|
||||
|
||||
# Make a static link library for things like the diags.
|
||||
ifeq ($(FX_DLL_BUILD),1)
|
||||
FX_DLL_LIBRARY = 1
|
||||
else
|
||||
LCDEFS += -DFX_STATIC_BUILD
|
||||
endif
|
||||
|
||||
include $(BUILD_ROOT)/swlibs/include/make/3dfx.mak
|
||||
|
||||
@@ -1,370 +0,0 @@
|
||||
/*
|
||||
** 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 <stdarg.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#ifndef __linux__
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
#define FX_DLL_DEFINITION
|
||||
#include <3dfx.h>
|
||||
#include <fxdll.h>
|
||||
#include "oeminit.h"
|
||||
|
||||
const OemPciRegister OEM_PCI_VENDOR_ID = { 0x0, 2, OEM_READ_ONLY };
|
||||
const OemPciRegister OEM_PCI_DEVICE_ID = { 0x2, 2, OEM_READ_ONLY };
|
||||
const OemPciRegister OEM_PCI_COMMAND = { 0x4, 2, OEM_READ_WRITE };
|
||||
const OemPciRegister OEM_PCI_STATUS = { 0x6, 2, OEM_READ_WRITE };
|
||||
const OemPciRegister OEM_PCI_REVISION_ID = { 0x8, 1, OEM_READ_ONLY };
|
||||
const OemPciRegister OEM_PCI_CLASS_CODE = { 0x9, 3, OEM_READ_ONLY };
|
||||
const OemPciRegister OEM_PCI_CACHE_LINE_SIZE = { 0xC, 1, OEM_READ_WRITE };
|
||||
const OemPciRegister OEM_PCI_LATENCY_TIMER = { 0xD, 1, OEM_READ_WRITE };
|
||||
const OemPciRegister OEM_PCI_HEADER_TYPE = { 0xE, 1, OEM_READ_ONLY };
|
||||
const OemPciRegister OEM_PCI_BIST = { 0xF, 1, OEM_READ_WRITE };
|
||||
const OemPciRegister OEM_PCI_BASE_ADDRESS_0 = { 0x10, 4, OEM_READ_WRITE };
|
||||
const OemPciRegister OEM_PCI_BASE_ADDRESS_1 = { 0x14, 4, OEM_READ_WRITE };
|
||||
const OemPciRegister OEM_PCI_BASE_ADDRESS_2 = { 0x18, 4, OEM_READ_WRITE };
|
||||
const OemPciRegister OEM_PCI_BASE_ADDRESS_3 = { 0x1C, 4, OEM_READ_WRITE };
|
||||
const OemPciRegister OEM_PCI_BASE_ADDRESS_4 = { 0x20, 4, OEM_READ_WRITE };
|
||||
const OemPciRegister OEM_PCI_BASE_ADDRESS_5 = { 0x24, 4, OEM_READ_WRITE };
|
||||
const OemPciRegister OEM_PCI_BASE_ADDRESS_6 = { 0x28, 4, OEM_READ_WRITE };
|
||||
const OemPciRegister OEM_PCI_BASE_ADDRESS_7 = { 0x2c, 4, OEM_READ_WRITE };
|
||||
const OemPciRegister OEM_PCI_BASE_ADDRESS_8 = { 0x30, 4, OEM_READ_WRITE };
|
||||
|
||||
static FILE* outFile = NULL;
|
||||
|
||||
static const char*
|
||||
myGetenv(const char* envKey)
|
||||
{
|
||||
FxBool callRealGetenvP = FXTRUE;
|
||||
|
||||
#if __WIN32__
|
||||
/* NB: If were being called from cya code in
|
||||
* DllMain(DLL_PROCESS_DETACH) because the current app has called
|
||||
* exit() or dropped off of the end of main the per dll environ
|
||||
* string table has been freed by the c runtime but has not been set
|
||||
* to NULL. Bad things happen if this memory has been unmapped by
|
||||
* the system or if the string cannot be found.
|
||||
*/
|
||||
{
|
||||
HANDLE curProcessHandle = GetCurrentProcess();
|
||||
DWORD exitCode = STILL_ACTIVE;
|
||||
|
||||
callRealGetenvP = ((curProcessHandle != NULL) &&
|
||||
GetExitCodeProcess(curProcessHandle, &exitCode) &&
|
||||
(exitCode == STILL_ACTIVE));
|
||||
}
|
||||
#endif /* __WIN32__ */
|
||||
|
||||
return (callRealGetenvP
|
||||
? getenv(envKey)
|
||||
: NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
MyDebugPrintf(FILE* outputFile, const char* fmtString, ...)
|
||||
{
|
||||
static FxBool debugDumpP = FXFALSE;
|
||||
static FxBool calledP = FXFALSE;
|
||||
|
||||
if (!calledP) {
|
||||
const char* envStr = myGetenv("GDBG_LEVEL");
|
||||
|
||||
debugDumpP = ((envStr != NULL) &&
|
||||
(atoi(envStr) >= 80));
|
||||
|
||||
calledP = FXTRUE;
|
||||
}
|
||||
|
||||
if (debugDumpP) {
|
||||
va_list args;
|
||||
|
||||
#if !DIRECTX
|
||||
va_start(args, fmtString);
|
||||
if (outputFile != NULL) vfprintf(outputFile, fmtString, args);
|
||||
va_end(args);
|
||||
#endif /* !DIRECTX */
|
||||
|
||||
va_start(args, fmtString);
|
||||
{
|
||||
char msgBuf[256];
|
||||
|
||||
vsprintf(msgBuf, fmtString, args);
|
||||
OutputDebugString(msgBuf);
|
||||
}
|
||||
va_end(args);
|
||||
}
|
||||
}
|
||||
|
||||
static struct {
|
||||
const char* resName;
|
||||
GrScreenResolution_t resId;
|
||||
} resTable[] = {
|
||||
{ "320x200", GR_RESOLUTION_320x200 }, /* 0x0 */
|
||||
{ "320x240", GR_RESOLUTION_320x240 }, /* 0x1 */
|
||||
{ "400x256", GR_RESOLUTION_400x256 }, /* 0x2 */
|
||||
{ "512x384", GR_RESOLUTION_512x384 }, /* 0x3 */
|
||||
{ "640x200", GR_RESOLUTION_640x200 }, /* 0x4 */
|
||||
{ "640x350", GR_RESOLUTION_640x350 }, /* 0x5 */
|
||||
{ "640x400", GR_RESOLUTION_640x400 }, /* 0x6 */
|
||||
{ "640x480", GR_RESOLUTION_640x480 }, /* 0x7 */
|
||||
{ "800x600", GR_RESOLUTION_800x600 }, /* 0x8 */
|
||||
{ "960x720", GR_RESOLUTION_960x720 }, /* 0x9 */
|
||||
{ "856x480", GR_RESOLUTION_856x480 }, /* 0xA */
|
||||
{ "512x256", GR_RESOLUTION_512x256 }, /* 0xB */
|
||||
{ "1024x768", GR_RESOLUTION_1024x768 }, /* 0xC */
|
||||
{ "1280x1024", GR_RESOLUTION_1280x1024 }, /* 0xD */
|
||||
{ "1600x1200", GR_RESOLUTION_1600x1200 }, /* 0xE */
|
||||
{ "400x300", GR_RESOLUTION_400x300 } /* 0xF */
|
||||
};
|
||||
|
||||
static const char*
|
||||
GlideRes2String(GrScreenResolution_t res)
|
||||
{
|
||||
int i;
|
||||
const char* retVal = NULL;
|
||||
|
||||
for(i = 0; i < sizeof(resTable) / sizeof(resTable[0]); i++) {
|
||||
if (resTable[i].resId == res) {
|
||||
retVal = resTable[i].resName;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return ((retVal == NULL)
|
||||
? "Unknown"
|
||||
: retVal);
|
||||
}
|
||||
|
||||
static const char*
|
||||
GlideRefresh2String(GrScreenRefresh_t refresh)
|
||||
{
|
||||
static const char* refreshStrings[] = {
|
||||
"60", "70", "72", "75", "80", "90", "100", "85", "120"
|
||||
};
|
||||
|
||||
return ((refresh > sizeof(refreshStrings) / sizeof(refreshStrings[0]))
|
||||
? "Unknown"
|
||||
: refreshStrings[refresh]);
|
||||
}
|
||||
|
||||
static void
|
||||
DumpOemVideoInfo(const OemVideoTimingInfo* videoInfo)
|
||||
{
|
||||
if ((outFile != NULL) && (videoInfo != NULL)) {
|
||||
MyDebugPrintf(outFile, "VideoTimingInfo:\n");
|
||||
MyDebugPrintf(outFile, "\tGlideResolution: (0x%lX : %s)\n",
|
||||
videoInfo->res, GlideRes2String(videoInfo->res));
|
||||
MyDebugPrintf(outFile, "\tGlideRefreshRate: (0x%lX : %s Mhz)\n",
|
||||
videoInfo->refresh, GlideRefresh2String(videoInfo->refresh));
|
||||
MyDebugPrintf(outFile, "\tDepth: %ld\n", videoInfo->depth);
|
||||
MyDebugPrintf(outFile, "\tHSyncOn: 0x%lX\n", videoInfo->hSyncOn);
|
||||
MyDebugPrintf(outFile, "\tHSyncOff: 0x%lX\n", videoInfo->hSyncOff);
|
||||
MyDebugPrintf(outFile, "\tVSyncOn: 0x%lX\n", videoInfo->vSyncOn);
|
||||
MyDebugPrintf(outFile, "\tVSyncOn: 0x%lX\n", videoInfo->vSyncOff);
|
||||
MyDebugPrintf(outFile, "\tHBackPorch: 0x%lX\n", videoInfo->hBackPorch);
|
||||
MyDebugPrintf(outFile, "\tVBackPorch: 0x%lX\n", videoInfo->vBackPorch);
|
||||
MyDebugPrintf(outFile, "\tXDimension: 0x%lX\n", videoInfo->xDimension);
|
||||
MyDebugPrintf(outFile, "\tYDimension: 0x%lX\n", videoInfo->yDimension);
|
||||
MyDebugPrintf(outFile, "\tClkFreq 16bpp: %g\n", videoInfo->clkFreq16bpp);
|
||||
MyDebugPrintf(outFile, "\tClkFreq 24bpp: %g\n", videoInfo->clkFreq24bpp);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
DumpOemInitInfo(const char* fnName, const OemInitInfo* oemInfo)
|
||||
{
|
||||
const char* envStr = myGetenv("GDBG_LEVEL");
|
||||
|
||||
if ((envStr != NULL) && (atoi(envStr) >= 80)) {
|
||||
if (outFile == NULL) outFile = fopen("oemdll.txt", "w");
|
||||
if (outFile != NULL) {
|
||||
MyDebugPrintf(outFile, "%s: \n", fnName);
|
||||
if (oemInfo == NULL) goto __errExit;
|
||||
|
||||
MyDebugPrintf(outFile, "\tVersion: %d.%d\n",
|
||||
(oemInfo->version >> 16UL), (oemInfo->version & 0xFFFFUL));
|
||||
MyDebugPrintf(outFile, "\tVendorId: 0x%lX\n", oemInfo->vendorID);
|
||||
MyDebugPrintf(outFile, "\tSubVendorId: 0x%lX\n", oemInfo->subvendorID);
|
||||
MyDebugPrintf(outFile, "\tDeviceId: 0x%lX\n", oemInfo->deviceID);
|
||||
MyDebugPrintf(outFile, "\tBoardId: 0x%lX\n", oemInfo->boardID);
|
||||
MyDebugPrintf(outFile, "\tHW BaseAddr: 0x%lX\n", (FxU32)oemInfo->linearAddress);
|
||||
MyDebugPrintf(outFile, "\tSliSlaveAddr: 0x%lX\n", (FxU32)oemInfo->slaveAddress);
|
||||
|
||||
DumpOemVideoInfo(&oemInfo->vid);
|
||||
|
||||
__errExit:
|
||||
MyDebugPrintf(outFile, "\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------
|
||||
Function: fxoemInitMapBoard
|
||||
Date: 04-Feb-98
|
||||
Implementor(s): atai
|
||||
Description:
|
||||
null function for oem dll
|
||||
Arguments:
|
||||
oem - information for oem dll
|
||||
Return:
|
||||
-------------------------------------------------------------------*/
|
||||
FX_EXPORT FxU32 FX_CSTYLE fxoemInitMapBoard(OemInitInfo *oem)
|
||||
{
|
||||
#define FN_NAME "fxoemInitMapBoard"
|
||||
|
||||
DumpOemInitInfo(FN_NAME, oem);
|
||||
|
||||
return 1;
|
||||
#undef FN_NAME
|
||||
} /* fxoemInitMapBoard */
|
||||
|
||||
/*-------------------------------------------------------------------
|
||||
Function: fxoemGet
|
||||
Date: 12-Mar-98
|
||||
Implementor(s): atai
|
||||
Description:
|
||||
null function for oem dll
|
||||
Arguments:
|
||||
pname - selector to query oem dll functions
|
||||
plenth - length of the parameter in bytes
|
||||
param - data field
|
||||
Return:
|
||||
size of the parameter. O on error or not supported
|
||||
-------------------------------------------------------------------*/
|
||||
FX_EXPORT FxI32 FX_CSTYLE fxoemGet(FxU32 pname, FxU32 plength, FxI32 *params)
|
||||
{
|
||||
#define FN_NAME "fxoemGet"
|
||||
|
||||
switch(pname) {
|
||||
case FX_OEM_TVOUT:
|
||||
if (plength == 4) {
|
||||
*params = FXFALSE;
|
||||
return 4;
|
||||
}
|
||||
break;
|
||||
case FX_OEM_SLIMASTER:
|
||||
if (plength == 8) {
|
||||
*params = 0;
|
||||
*(params +1) = 0;
|
||||
return 8;
|
||||
}
|
||||
break;
|
||||
case FX_OEM_SLISLAVE:
|
||||
if (plength == 8) {
|
||||
*params = 0;
|
||||
*(params +1) = 0;
|
||||
return 8;
|
||||
}
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
#undef FN_NAME
|
||||
} /* fxoemGet */
|
||||
|
||||
/*-------------------------------------------------------------------
|
||||
Function: fxoemInitVideoTiming
|
||||
Date: 23-Feb-98
|
||||
Implementor(s): atai
|
||||
Description:
|
||||
null function for oem dll
|
||||
Arguments:
|
||||
vid - video timing data
|
||||
Return:
|
||||
1 if video timing is modified
|
||||
0 if video timing is unchanged
|
||||
-------------------------------------------------------------------*/
|
||||
FX_EXPORT FxU32 FX_CSTYLE fxoemInitVideoTiming(OemVideoTimingInfo *vid)
|
||||
{
|
||||
#define FN_NAME "fxoemInitVideoTiming"
|
||||
|
||||
DumpOemVideoInfo(vid);
|
||||
|
||||
return 0;
|
||||
#undef FN_NAME
|
||||
} /* fxoemInitSetVideo */
|
||||
|
||||
/*-------------------------------------------------------------------
|
||||
Function: fxoemInitSetVideo
|
||||
Date: 04-Feb-98
|
||||
Implementor(s): atai
|
||||
Description:
|
||||
null function for oem dll
|
||||
Arguments:
|
||||
oem - information for oem dll
|
||||
Return:
|
||||
-------------------------------------------------------------------*/
|
||||
FX_EXPORT FxU32 FX_CSTYLE fxoemInitSetVideo(OemInitInfo *oem)
|
||||
{
|
||||
#define FN_NAME "fxoemInitSetVideo"
|
||||
|
||||
DumpOemInitInfo(FN_NAME, oem);
|
||||
|
||||
return 1;
|
||||
#undef FN_NAME
|
||||
} /* fxoemInitSetVideo */
|
||||
|
||||
/*-------------------------------------------------------------------
|
||||
Function: fxoemRestoreVideo
|
||||
Date: 04-Feb-98
|
||||
Implementor(s): atai
|
||||
Description:
|
||||
null function for oem dll
|
||||
Arguments:
|
||||
oem - information for oem dll
|
||||
Return:
|
||||
-------------------------------------------------------------------*/
|
||||
FX_EXPORT FxU32 FX_CSTYLE fxoemRestoreVideo(OemInitInfo *oem)
|
||||
{
|
||||
#define FN_NAME "fxoemRestoreVideo"
|
||||
|
||||
DumpOemInitInfo(FN_NAME, oem);
|
||||
if (outFile != NULL) {
|
||||
fclose(outFile);
|
||||
outFile = NULL;
|
||||
}
|
||||
|
||||
return 1;
|
||||
#undef FN_NAME
|
||||
} /* fxoemRestoreVideo */
|
||||
|
||||
/*-------------------------------------------------------------------
|
||||
Function: fxoemControl
|
||||
Date: 23-Feb-98
|
||||
Implementor(s): atai
|
||||
Description:
|
||||
null function for oem dll
|
||||
Arguments:
|
||||
mode - determine whether the VGA display or Voodoo Graphics is visiable
|
||||
Return:
|
||||
-------------------------------------------------------------------*/
|
||||
FX_EXPORT FxU32 FX_CSTYLE fxoemControl(FxU32 mode)
|
||||
{
|
||||
#define FN_NAME "fxoemControlMode"
|
||||
|
||||
DumpOemInitInfo(FN_NAME, NULL);
|
||||
|
||||
return 1;
|
||||
#undef FN_NAME
|
||||
} /* fxoemRestoreVideo */
|
||||
|
||||
|
||||
@@ -1,93 +0,0 @@
|
||||
/*
|
||||
** 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 __OEMINIT_H__
|
||||
#define __OEMINIT_H__
|
||||
|
||||
#define OEMINIT_INVALID_BOARD_ID 0xdeadfeed
|
||||
#define OEMINIT_VERSION 0x10001
|
||||
|
||||
#include "3dfx.h"
|
||||
#define FX_DLL_DEFINITION
|
||||
#include "fxdll.h"
|
||||
#include "sst1vid.h"
|
||||
|
||||
#define FX_OEM_CONTROL_ACTIVATE 1
|
||||
#define FX_OEM_CONTROL_DEACTIVATE 2
|
||||
|
||||
#define FX_OEM_TVOUT 1
|
||||
#define FX_OEM_SLIMASTER 2
|
||||
#define FX_OEM_SLISLAVE 3
|
||||
|
||||
#define FX_OEM_FBI_CONFIG_SHIFT 8
|
||||
|
||||
typedef enum {
|
||||
OEM_READ_ONLY,
|
||||
OEM_WRITE_ONLY,
|
||||
OEM_READ_WRITE
|
||||
} OemPciIOFlag;
|
||||
|
||||
typedef struct {
|
||||
FxU32 regAddress;
|
||||
FxU32 sizeInBytes;
|
||||
OemPciIOFlag rwFlag;
|
||||
} OemPciRegister;
|
||||
|
||||
typedef FxU32 (FX_CALL *PciConfigProc)(OemPciRegister, FxU32, FxU32 *);
|
||||
|
||||
typedef struct {
|
||||
GrScreenResolution_t res;
|
||||
GrScreenRefresh_t refresh;
|
||||
FxU32 depth;
|
||||
FxU32 hSyncOn;
|
||||
FxU32 hSyncOff;
|
||||
FxU32 vSyncOn;
|
||||
FxU32 vSyncOff;
|
||||
FxU32 hBackPorch;
|
||||
FxU32 vBackPorch;
|
||||
FxU32 xDimension;
|
||||
FxU32 yDimension;
|
||||
float clkFreq16bpp;
|
||||
float clkFreq24bpp;
|
||||
} OemVideoTimingInfo;
|
||||
|
||||
typedef struct {
|
||||
FxU32 version; /* Version for this structure */
|
||||
FxU32 vendorID; /* PCI Vendor ID field */
|
||||
FxU32 subvendorID; /* PCI sub Vendor ID field */
|
||||
FxU32 deviceID; /* PCI Device ID field */
|
||||
FxU32 boardID; /* Board ID: defined for Voodoo2 only!!! */
|
||||
FxU32 *linearAddress; /* address for primary board */
|
||||
FxU32 *slaveAddress; /* address for slave board */
|
||||
PciConfigProc fxoemPciWriteConfig;
|
||||
PciConfigProc fxoemPciReadConfig;
|
||||
OemVideoTimingInfo vid;
|
||||
FxU32 reserved[42];
|
||||
} OemInitInfo;
|
||||
|
||||
FX_EXPORT FxU32 FX_CSTYLE fxoemInitMapBoard(OemInitInfo *oem);
|
||||
FX_EXPORT FxI32 FX_CSTYLE fxoemGet(FxU32 pname, FxU32 plength, FxI32 *params);
|
||||
FX_EXPORT FxU32 FX_CSTYLE fxoemInitVideoTiming(OemVideoTimingInfo *vid);
|
||||
FX_EXPORT FxU32 FX_CSTYLE fxoemInitSetVideo(OemInitInfo *oem);
|
||||
FX_EXPORT FxU32 FX_CSTYLE fxoemRestoreVideo(OemInitInfo *oem);
|
||||
FX_EXPORT FxU32 FX_CSTYLE fxoemControl(FxU32 mode);
|
||||
|
||||
#endif __OEMINIT_H__
|
||||
|
||||
@@ -1,71 +0,0 @@
|
||||
/*
|
||||
** 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
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
*/
|
||||
|
||||
#define OFFICIAL 1
|
||||
#define FINAL 1
|
||||
|
||||
#include <fxver.h>
|
||||
#include "rcver.h"
|
||||
#include "fxbldno.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Version
|
||||
//
|
||||
#ifndef GLIDE3
|
||||
#define VERSIONNAME "oeminit2x.dll\0"
|
||||
#else
|
||||
#define VERSIONNAME "oeminit3x.dll\0"
|
||||
#endif
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION MANVERSION, MANREVISION, 0, BUILD_NUMBER
|
||||
PRODUCTVERSION MANVERSION, MANREVISION, 0, BUILD_NUMBER
|
||||
FILEFLAGSMASK 0x0030003FL
|
||||
FILEFLAGS (VER_PRIVATEBUILD|VER_PRERELEASE|VER_DEBUG)
|
||||
|
||||
FILEOS VOS_DOS_WINDOWS32
|
||||
FILETYPE VFT_DRV
|
||||
FILESUBTYPE VFT2_DRV_INSTALLABLE
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "040904E4"
|
||||
BEGIN
|
||||
VALUE "CompanyName", "3Dfx Interactive, Inc.\0"
|
||||
VALUE "FileDescription", "3Dfx Interactive, Inc. OEM DLL\0"
|
||||
VALUE "FileVersion", VERSIONSTR
|
||||
VALUE "InternalName", VERSIONNAME
|
||||
VALUE "LegalCopyright", "Copyright \251 3Dfx Interactive, Inc. 1997\0"
|
||||
VALUE "OriginalFilename", VERSIONNAME
|
||||
VALUE "ProductName", PRODNAME
|
||||
VALUE "ProductVersion", VERSIONSTR
|
||||
VALUE "Graphics Subsystem", HWSTR
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
/* the following line should be extended for localized versions */
|
||||
VALUE "Translation", 0x409, 1252
|
||||
END
|
||||
END
|
||||
@@ -1,47 +0,0 @@
|
||||
/*
|
||||
* 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
|
||||
*/
|
||||
|
||||
#define MANVERSION 2
|
||||
#define MANREVISION 53
|
||||
|
||||
#ifndef GLIDE3
|
||||
#define VERSIONSTR "2.53\0"
|
||||
#else
|
||||
#define VERSIONSTR "3.0\0"
|
||||
#endif
|
||||
|
||||
#if defined(CVG) || defined(VOODOO2)
|
||||
# define HWSTR " Voodoo(tm)\0"
|
||||
# ifdef NT_BUILD
|
||||
# define PRODNAME "Glide(tm) for Voodoo\251 and Windows\256 NT\0"
|
||||
# else
|
||||
# define PRODNAME "Glide(tm) for Voodoo\251 and Windows\256 95/98\0"
|
||||
# endif /* NT_BUILD */
|
||||
#elif defined(H3)
|
||||
# define HWSTR " Banshee(tm)\0"
|
||||
# ifdef NT_BUILD
|
||||
# define PRODNAME "Glide(tm) for Banshee\251 and Windows\256 NT\0"
|
||||
# else
|
||||
# define PRODNAME "Glide(tm) for Banshee\251 and Windows\256 95/98\0"
|
||||
# endif /* NT_BUILD */
|
||||
#else
|
||||
# define PRODNAME "Something really, really important\0"
|
||||
# define HWSTR " Unknown Chip\0"
|
||||
#endif
|
||||
@@ -1,101 +0,0 @@
|
||||
static int banner_width = 180;
|
||||
static int banner_height = 90;
|
||||
static unsigned short banner_data[] = {
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x10a2, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x18e3, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x52aa, 0xad34, 0x10a2, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x2922, 0xacee, 0x39a5, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x93ea, 0xd5d0, 0x944d, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x9383, 0xd506, 0x8beb, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xbc63, 0xd506, 0xd58d, 0x7b6a, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x6a82, 0xd4e4, 0xd504, 0xc54d, 0x2943, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x5202, 0xd4e3, 0xd4e3, 0xd505, 0xcd6d, 0x5aa8, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x3961, 0xc483, 0xd503, 0xd504, 0xd569, 0x8baa, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x5268, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x9364, 0xd4e2, 0xd4e2, 0xd4e2, 0xd505, 0xc54e, 0x4206, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xa3e3, 0xd504, 0xd546, 0xd504, 0xd525, 0xc54d, 0x2103, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x20e1, 0x93a4, 0xcd4c, 0x20e2, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xbc86, 0xd504, 0xd547, 0xd548, 0xd504, 0xd526, 0xbd2f, 0x2944, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x7ae3, 0xd504, 0xd56a, 0xd634, 0xd569, 0xd525, 0xdd69, 0x8369, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x49c3, 0xb487, 0xd504, 0xd528, 0x5246, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x2901, 0x6ac4, 0x1081, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x528a, 0x39e7, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x5a22, 0xd526, 0xd548, 0xd5cf, 0xd613, 0xd527, 0xd505, 0xd548, 0xacae, 0x10a2, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x49a1, 0xcce5, 0xd56a, 0xde12, 0xde98, 0xddce, 0xd548, 0xdd04, 0xc52e, 0x18e3, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x72c5, 0xcce7, 0xd504, 0xd503, 0xd527, 0x7b48, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x49e2, 0x9b83, 0xc4a4, 0xac23, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x5247, 0xc570, 0x736a, 0x10a2, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x9363, 0xd505, 0xd58c, 0xd634, 0xd678, 0xd5f1, 0xd548, 0xd504, 0xd58b, 0x942c, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x18a1, 0xb444, 0xdd48, 0xddf0, 0xde98, 0xdeb9, 0xde55, 0xdd6b, 0xdd03, 0xdd8b, 0x7349, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x2902, 0x9be6, 0xd527, 0xd524, 0xd524, 0xdd03, 0xd526, 0x9c09, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x20e1, 0x72c4, 0xac25, 0xd4e3, 0xd4e3, 0xd4e3, 0x8345, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xbc85, 0xd5cf, 0xacef, 0x4227, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xbc85, 0xd526, 0xd5f1, 0xd698, 0xd6ba, 0xd699, 0xd5cf, 0xd547, 0xd525, 0xd5ae, 0x7b6a, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x8b43, 0xdd04, 0xddae, 0xde76, 0xdeda, 0xdeda, 0xdeba, 0xddcf, 0xdd25, 0xdd47, 0xbd0c, 0x1081, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x4a04, 0xbc86, 0xdd24, 0xdd26, 0xddcf, 0xddcf, 0xdd25, 0xdd26, 0xb4ca, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x41a3, 0x8b64, 0xc4a6, 0xd503, 0xd4e3, 0xd4e3, 0xd4e3, 0xd507, 0x49e4, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x9362, 0xd4e3, 0xd56b, 0xcdb2, 0x83cc, 0x10a2, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x5a22, 0xd525, 0xd548, 0xd613, 0xd6b9, 0xd6ba, 0xd6ba, 0xd677, 0xddae, 0xd527, 0xdd25, 0xd58d, 0x62c8, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x5a22, 0xd505, 0xdd68, 0xde34, 0xdeda, 0xdedb, 0xdedb, 0xdeda, 0xde33, 0xdd8a, 0xdd25, 0xdd8c, 0x6b09, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x72e5, 0xcd06, 0xdd24, 0xdd68, 0xde33, 0xdeb9, 0xde34, 0xdd46, 0xdd25, 0xcd49, 0x20c2, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x18c1, 0x6aa4, 0xa404, 0xd4e4, 0xd504, 0xd549, 0xd5ae, 0xd5ad, 0xd548, 0xd505, 0xbc86, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x5a21, 0xd4e2, 0xd4e3, 0xd506, 0xd58c, 0xb531, 0x5248, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x9363, 0xd504, 0xd5ad, 0xd655, 0xdeba, 0xdeba, 0xdeba, 0xdeba, 0xde76, 0xddae, 0xdd04, 0xdd47, 0xc54d, 0x4a06, 0x0000, 0x0000, 0x0000, 0x2921, 0xbc84, 0xdd46, 0xde11, 0xde98, 0xdedb, 0xdedb, 0xdedb, 0xdeda, 0xdeb8, 0xddf0, 0xdd46, 0xdd47, 0xbcec, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x2922, 0x9c07, 0xdd26, 0xdd26, 0xdd8a, 0xde55, 0xdeb9, 0xdedb, 0xde55, 0xdd8b, 0xdd25, 0xdd47, 0x5246, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x3983, 0x8b65, 0xbcc8, 0xd526, 0xd526, 0xd56a, 0xd612, 0xd676, 0xd698, 0xd5f2, 0xd525, 0xd506, 0x93c7, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x18a1, 0xc462, 0xd4e3, 0xd503, 0xd504, 0xd527, 0xcdd1, 0x8c0d, 0x18e3, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xbc86, 0xd505, 0xd5f1, 0xde98, 0xd6ba, 0xdeda, 0xdedb, 0xdedb, 0xdeba, 0xde55, 0xdd8c, 0xdd25, 0xdd26, 0xbd2e, 0x2943, 0x0000, 0x0000, 0x9b83, 0xdd26, 0xddcd, 0xde77, 0xdeda, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdeda, 0xde33, 0xdd89, 0xdd25, 0xddad, 0x6ae9, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x5204, 0xbca8, 0xdd46, 0xdd48, 0xddcf, 0xdeb8, 0xdeda, 0xdedb, 0xdedb, 0xde97, 0xddee, 0xdd25, 0xdd46, 0x7b68, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x5a44, 0xa3e6, 0xcce5, 0xd504, 0xd547, 0xd58c, 0xd633, 0xd698, 0xd6ba, 0xd6ba, 0xd678, 0xd5d0, 0xd504, 0xd527, 0x6286, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x9b82, 0xd548, 0xd58b, 0xd549, 0xd4e3, 0xd505, 0xd58c, 0xbd51, 0x5aa9, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x5a24, 0xd526, 0xd526, 0xde35, 0xdeba, 0xdeda, 0xdedb, 0xdedb, 0xdedb, 0xdeda, 0xdeb9, 0xde34, 0xdd6a, 0xdd25, 0xdd26, 0xacac, 0x1081, 0x6aa3, 0xd504, 0xdd48, 0xde76, 0xdeda, 0xdedb, 0xdedb, 0xdefb, 0xdedb, 0xdedb, 0xdeda, 0xde97, 0xddcf, 0xdd25, 0xdd47, 0xb4ee, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x7b25, 0xd507, 0xdd24, 0xdd8a, 0xde32, 0xdeb9, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xde97, 0xddef, 0xdd46, 0xdd46, 0x9c2b, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x2922, 0x7b26, 0xbc86, 0xd525, 0xdd04, 0xd546, 0xddd0, 0xde55, 0xd699, 0xd6ba, 0xd6ba, 0xd6ba, 0xd6ba, 0xd634, 0xd58c, 0xd504, 0xc4e9, 0x20c2, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x6a62, 0xd527, 0xd5d0, 0xd656, 0xd5ad, 0xd527, 0xd505, 0xd527, 0xd5b0, 0x944d, 0x2924, 0x0000, 0x0000, 0x0000, 0x0000, 0x9384, 0xd525, 0xd58a, 0xde56, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdeda, 0xdeb9, 0xde55, 0xdd48, 0xdd24, 0xdd24, 0xa3c3, 0xc4a4, 0xdd48, 0xde10, 0xdeb9, 0xdedb, 0xdedb, 0xdefb, 0xdefb, 0xdefb, 0xdedb, 0xdefb, 0xdedb, 0xde54, 0xdd68, 0xdd26, 0xdd8a, 0x5a87, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x2922, 0xa407, 0xdd26, 0xdd45, 0xddab, 0xde55, 0xdeda, 0xdedb, 0xdefb, 0xdedb, 0xdefb, 0xdedb, 0xdeb8, 0xde32, 0xdd46, 0xdd25, 0xb4cb, 0x0000, 0x0000, 0x0000, 0x5224, 0x9be7, 0xcce7, 0xdd04, 0xdd47, 0xdd8b, 0xde11, 0xde97, 0xdeba, 0xdeda, 0xdedb, 0xdedb, 0xdedb, 0xdeba, 0xd6b9, 0xd612, 0xd569, 0xd504, 0xa3e5, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x20e1, 0xc4c5, 0xd5af, 0xd698, 0xd698, 0xd634, 0xd58c, 0xd525, 0xd526, 0xd56a, 0xbd70, 0x62e9, 0x0000, 0x0000, 0x0000, 0xbc85, 0xd526, 0xddf0, 0xde98, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdeb9, 0xde32, 0xdd48, 0xdd25, 0xdd24, 0xdd46, 0xddcd, 0xdeb8, 0xdeda, 0xdedb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xde97, 0xddee, 0xdd46, 0xdd46, 0xacad, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x5224, 0xc4e9, 0xdd25, 0xdd47, 0xde10, 0xde97, 0xdeda, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdeda, 0xde75, 0xdd68, 0xdd25, 0xcd29, 0x3142, 0x7306, 0xb467, 0xd527, 0xdd25, 0xdd48, 0xddce, 0xde54, 0xde98, 0xdeba, 0xdeda, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdeba, 0xde98, 0xd5d0, 0xd546, 0xd526, 0x7305, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x18c2, 0x39a5, 0x10a2, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xa3e4, 0xd56b, 0xd655, 0xd6ba, 0xd6ba, 0xd698, 0xd5f1, 0xd549, 0xd504, 0xd525, 0xd5ad, 0x9c6d, 0x3163, 0x5a23, 0xd525, 0xdd47, 0xde55, 0xdeb9, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdeda, 0xdeb9, 0xde32, 0xddce, 0xddcd, 0xde11, 0xde97, 0xdeda, 0xdedb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xded9, 0xde54, 0xdd47, 0xdd46, 0xddcd, 0x5246, 0x0000, 0x0000, 0x0000, 0x0000, 0x8347, 0xd527, 0xdd46, 0xdd8a, 0xde32, 0xded9, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdeda, 0xde97, 0xddab, 0xdd46, 0xdd24, 0xcd06, 0xdd46, 0xdd46, 0xdd8b, 0xddcd, 0xde76, 0xdeb9, 0xdeda, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdeba, 0xd654, 0xd58b, 0xd525, 0xcd4a, 0x3163, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x3143, 0x5a65, 0x7b27, 0x9bc7, 0xac46, 0xc4a5, 0x93e8, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x72a2, 0xd548, 0xd5f1, 0xd6ba, 0xd6ba, 0xd6ba, 0xd6b9, 0xd656, 0xd5ae, 0xd525, 0xd504, 0xdd47, 0xc4c6, 0xb444, 0xdd26, 0xdd8a, 0xde97, 0xdeba, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefa, 0xde97, 0xddab, 0xdd46, 0xdd67, 0xa48d, 0x0000, 0x0000, 0x3163, 0xac27, 0xdd68, 0xdd45, 0xddcd, 0xde75, 0xdeda, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdeda, 0xde97, 0xddcd, 0xdd47, 0xdd24, 0xdd67, 0xddac, 0xde12, 0xde76, 0xdeda, 0xdeda, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdeba, 0xde12, 0xd569, 0xd526, 0xb468, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x2103, 0x4a26, 0x7307, 0x93a6, 0xa426, 0xbca7, 0xd506, 0xd4e3, 0xd4e2, 0xd4e2, 0xd4e3, 0xb445, 0x18a1, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x3141, 0xcce5, 0xd5ad, 0xd6b9, 0xd6ba, 0xd6ba, 0xd6ba, 0xdeba, 0xde99, 0xd654, 0xd56a, 0xd525, 0xdd03, 0xdd03, 0xdd48, 0xddef, 0xdeb8, 0xdeda, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xded9, 0xde52, 0xdd68, 0xdd45, 0xd5af, 0x4a05, 0x5a65, 0xc4e7, 0xdd46, 0xdd68, 0xddef, 0xde96, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdeda, 0xde76, 0xddef, 0xde31, 0xdeb8, 0xdedb, 0xdedb, 0xdedb, 0xdefb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdeba, 0xddce, 0xdd25, 0xd547, 0x8366, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x39a4, 0x62c7, 0x8388, 0x9c29, 0xb487, 0xccc5, 0xd507, 0xd504, 0xd504, 0xd505, 0xd527, 0xd528, 0xd548, 0xd505, 0xd4e2, 0xc4c6, 0x4182, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xabe2, 0xd56b, 0xd678, 0xd6ba, 0xdeba, 0xd6ba, 0xdeda, 0xdeda, 0xdeba, 0xde98, 0xd5f0, 0xddad, 0xdd8c, 0xddcf, 0xde97, 0xdeba, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xded9, 0xddab, 0xdd45, 0xdd68, 0xc4a7, 0xd548, 0xdd46, 0xdd89, 0xde32, 0xe6d9, 0xdefb, 0xdefb, 0xdefb, 0xe71c, 0xe71c, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdeda, 0xdeda, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdeda, 0xde98, 0xdd8c, 0xdd04, 0xd56b, 0x4a04, 0x0000, 0x2944, 0x5a87, 0x7b48, 0x93e7, 0xac68, 0xc4ea, 0xd56a, 0xd527, 0xd525, 0xd505, 0xd526, 0xd549, 0xd58c, 0xd5d0, 0xd5f3, 0xd635, 0xd656, 0xd655, 0xd58c, 0xd506, 0xccc4, 0x6264, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x7ae2, 0xd549, 0xd634, 0xd6b9, 0xdeba, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdeda, 0xdeda, 0xdeda, 0xdeb9, 0xdeda, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdefb, 0xdefb, 0xdedb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xe71c, 0xe71c, 0xe71c, 0xe6fa, 0xde31, 0xdd89, 0xe546, 0xdd45, 0xe567, 0xddaa, 0xe696, 0xe6fa, 0xe71b, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xdefb, 0xdefb, 0xdefb, 0xe71c, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdedb, 0xdefb, 0xdedb, 0xdedb, 0xdedb, 0xdeda, 0xdeba, 0xde54, 0xdd6b, 0xdd03, 0xcd08, 0xa448, 0xbcc9, 0xd528, 0xd526, 0xd525, 0xd505, 0xd505, 0xd526, 0xd528, 0xd56a, 0xd5ce, 0xd633, 0xd677, 0xd699, 0xd699, 0xd6ba, 0xd6ba, 0xd6ba, 0xd677, 0xd5cf, 0xd506, 0xd505, 0x8345, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x4a48, 0xa48c, 0x940a, 0x734a, 0x4207, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x3961, 0xd506, 0xd5cf, 0xde98, 0xdeba, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xad75, 0x39e7, 0x39e7, 0x39e7, 0x39e7, 0x8430, 0x94b2, 0xb5b6, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71b, 0xe6d9, 0xe653, 0xe5ed, 0xe5cc, 0xe631, 0xe6b8, 0xe6fb, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdedb, 0xdedb, 0xdeda, 0xdeb9, 0xde10, 0xdd49, 0xdd03, 0xdd03, 0xdd04, 0xdd27, 0xd547, 0xd569, 0xd5ae, 0xddf1, 0xd634, 0xd676, 0xd698, 0xd6ba, 0xd6ba, 0xd6ba, 0xd6ba, 0xd6ba, 0xd6ba, 0xd6ba, 0xd6ba, 0xd678, 0xd5f1, 0xd506, 0xd504, 0xa427, 0x1081, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x5a43, 0xc4a5, 0xd505, 0xd56c, 0xbd2d, 0xa4ae, 0x83cc, 0x5ac8, 0x2124, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xb446, 0xddab, 0xde97, 0xdeba, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0x8430, 0x39e7, 0x39e7, 0x39e7, 0x39e7, 0x4208, 0x39e7, 0x4208, 0x738e, 0xa534, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71b, 0xe71b, 0xe71b, 0xe71b, 0xe71b, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xdefb, 0xe71c, 0xe71c, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdedb, 0xdeda, 0xde75, 0xddce, 0xddcd, 0xde11, 0xde54, 0xde55, 0xde77, 0xdeba, 0xdeba, 0xdeba, 0xdeba, 0xdeba, 0xdeba, 0xdeba, 0xd6ba, 0xd6ba, 0xd6ba, 0xd6ba, 0xd6ba, 0xd6ba, 0xd699, 0xd5f2, 0xd547, 0xd504, 0xbc85, 0x2922, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x5a21, 0xc482, 0xd4e3, 0xd504, 0xd505, 0xd527, 0xd56b, 0xcd90, 0xb4cd, 0x942c, 0x734b, 0x39c6, 0x0000, 0x0000, 0x0000, 0x0000, 0x8323, 0xdd47, 0xde54, 0xdeb9, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0x5aeb, 0x39e7, 0x39e7, 0x39e7, 0x4208, 0x39e7, 0x4208, 0x4208, 0x4208, 0x4208, 0x4208, 0xb5b6, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdedb, 0xdedb, 0xdeda, 0xdeda, 0xdeba, 0xdeda, 0xdeda, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xd6ba, 0xd6ba, 0xd6ba, 0xd6ba, 0xd6ba, 0xd6ba, 0xd6ba, 0xd613, 0xd56a, 0xd505, 0xcd08, 0x5204, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x5a21, 0xc4a3, 0xd526, 0xd569, 0xd526, 0xd505, 0xd505, 0xd504, 0xd525, 0xd548, 0xd5ae, 0xbd4e, 0xa48e, 0x838a, 0x5a45, 0x51e2, 0xd506, 0xddf0, 0xde97, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xb5b6, 0x39e7, 0x39e7, 0x39e7, 0x39e7, 0x4208, 0x39e7, 0x4208, 0x4208, 0x4208, 0x4208, 0x4208, 0x4208, 0xad55, 0xdefb, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe71c, 0xe71c, 0xe73c, 0xe73c, 0xe71c, 0xe73c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xdefb, 0xe71c, 0xe71c, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xd6ba, 0xd6ba, 0xd6ba, 0xd6ba, 0xd655, 0xd58d, 0xd503, 0xd549, 0x72e6, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x5a21, 0xc4c6, 0xd5ae, 0xd677, 0xd655, 0xd612, 0xd5cf, 0xd56a, 0xd525, 0xd503, 0xd503, 0xd504, 0xd526, 0xd547, 0xccc4, 0xd505, 0xddce, 0xde77, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xd6ba, 0x738e, 0x39e7, 0x39e7, 0x39e7, 0x39e7, 0x4208, 0x4208, 0x4208, 0x4208, 0x4208, 0x4208, 0x4208, 0x4208, 0x4208, 0xbdd7, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xd6ba, 0xdedb, 0xd6ba, 0xd677, 0xd58c, 0xd526, 0xd505, 0x93c8, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x5a21, 0xccc6, 0xd5cd, 0xd677, 0xd699, 0xd6ba, 0xd6b9, 0xd699, 0xde77, 0xd611, 0xd58b, 0xdd47, 0xdd26, 0xdd26, 0xdd69, 0xde33, 0xdeb8, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdefb, 0xd69a, 0x39e7, 0x39e7, 0x39e7, 0x4208, 0x4208, 0x4208, 0x4208, 0x4208, 0x4208, 0x4208, 0x4208, 0x4208, 0x4208, 0x4208, 0x4228, 0xc638, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xa514, 0xbdd7, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe71c, 0xe73c, 0xe73c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xd6ba, 0xd6ba, 0xd698, 0xd5ad, 0xd526, 0xd505, 0xb48a, 0x18c2, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x5a22, 0xccc6, 0xd5f1, 0xd677, 0xd6ba, 0xdeba, 0xd6ba, 0xdeba, 0xdeba, 0xdeb9, 0xde98, 0xde55, 0xde76, 0xde97, 0xdeb9, 0xdeda, 0xdedb, 0xdedb, 0xdedb, 0xdefb, 0xdefb, 0xdefb, 0xd6ba, 0x8430, 0x39e7, 0x39e7, 0x4208, 0x4208, 0x4208, 0x4208, 0x4208, 0x4208, 0x4208, 0x4208, 0x4208, 0x4208, 0x4228, 0x4228, 0xad55, 0xe71c, 0xe71c, 0xe71c, 0xad75, 0x4228, 0x4a49, 0x7bcf, 0xad75, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdeba, 0xde98, 0xd611, 0xd527, 0xd504, 0xc52b, 0x39a3, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x5a22, 0xccc5, 0xd5f1, 0xd698, 0xd6ba, 0xdeda, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0x8430, 0x39e7, 0x39e7, 0x39e7, 0x4208, 0x4208, 0x4208, 0x4208, 0x4208, 0x4208, 0x4208, 0x4208, 0x4228, 0x4228, 0x4228, 0x7bcf, 0xe71c, 0xe71c, 0xe71c, 0x7bcf, 0x4a49, 0x4a49, 0x4a49, 0x4a49, 0x4a49, 0x8c71, 0xbdf7, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xe73c, 0xef5d, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xad75, 0xe73c, 0xe73c, 0xe73c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xdefb, 0xe71c, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdeda, 0xde98, 0xde33, 0xd547, 0xd525, 0xcd28, 0x6286, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x5a22, 0xcce7, 0xd5f1, 0xde98, 0xdeba, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xc638, 0xb5b6, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xb5b6, 0x9cd3, 0x4208, 0x4208, 0x4208, 0x4208, 0x4228, 0x4228, 0x4228, 0x52aa, 0xce59, 0xe71c, 0xce59, 0x4a49, 0x4a49, 0x4a49, 0x4a49, 0x4a49, 0x4a49, 0x4a49, 0x4a69, 0x4a69, 0xa514, 0xce79, 0xe73c, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0x9cf3, 0x4a49, 0x4a49, 0x9cf3, 0xbdf7, 0xe73c, 0xe73c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdedb, 0xdefb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdeba, 0xde34, 0xdd69, 0xdd25, 0xd569, 0x8389, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x5a22, 0xcce6, 0xd5f0, 0xdeb9, 0xdeda, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xe71c, 0xe71c, 0xe71c, 0xc638, 0x4208, 0x4208, 0x4228, 0x4228, 0x4228, 0x4228, 0x4228, 0xbdf7, 0xe73c, 0x8c71, 0x4a49, 0x4a49, 0x4a49, 0x4a49, 0x4a49, 0x4a69, 0x4a69, 0x4a69, 0x4a69, 0x4a69, 0x4a69, 0x7bef, 0xb596, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xe73c, 0xce79, 0x4a69, 0x4a49, 0x4a49, 0x4a49, 0x4a49, 0xad55, 0x9cf3, 0xe73c, 0xe73c, 0xe73c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdedb, 0xdefb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdeda, 0xde55, 0xddad, 0xdd04, 0xdd26, 0xb4cb, 0x3185, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x5a22, 0xcd09, 0xde11, 0xdeb9, 0xdeba, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xe71c, 0xe71c, 0xe71c, 0xbdd7, 0x4228, 0x4228, 0x4228, 0x4228, 0x4228, 0x4228, 0x4228, 0x9cf3, 0xce59, 0x4a49, 0x4a49, 0x4a49, 0x4a49, 0x4a49, 0x4a69, 0x4a69, 0x4a69, 0x4a69, 0x4a69, 0x4a69, 0x4a69, 0x528a, 0x528a, 0x528a, 0xb5b6, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0x7bef, 0x4a69, 0x4a69, 0x632c, 0x4a49, 0x4a49, 0x528a, 0x4a49, 0x630c, 0x4228, 0xe73c, 0xe73c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdedb, 0xdedb, 0xdedb, 0xdeda, 0xdeb9, 0xddf0, 0xdd47, 0xdd04, 0xdd26, 0xd58b, 0xd5d0, 0xc56f, 0xbcee, 0xa46c, 0x940b, 0x838a, 0x6b09, 0x5247, 0x2123, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x7b03, 0xdd47, 0xde32, 0xdeb9, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdefb, 0xdedb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xe71c, 0xe71c, 0xbdd7, 0xbdd7, 0xbdd7, 0x9cd3, 0x4208, 0x4208, 0x4228, 0x4228, 0x4228, 0x4228, 0x4228, 0x4228, 0x8c71, 0x9cf3, 0x4a49, 0x4a49, 0x4a49, 0x4a49, 0x4a69, 0x4a69, 0x4a69, 0x4a69, 0x4a69, 0x528a, 0x528a, 0x528a, 0x528a, 0x528a, 0x528a, 0x52aa, 0x52aa, 0xc638, 0xef7d, 0xef7d, 0xef7d, 0xef7d, 0xef7d, 0xef7d, 0xef7d, 0xef7d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0x4a69, 0x7bef, 0x4a69, 0x632c, 0x4a69, 0x630c, 0x4a49, 0x7bcf, 0x4a49, 0x8c71, 0x630c, 0x4228, 0xe71c, 0xd6ba, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdedb, 0xdedb, 0xdeba, 0xde75, 0xddef, 0xdd69, 0xdd26, 0xdd26, 0xdd26, 0xdd05, 0xd505, 0xd525, 0xd526, 0xd526, 0xd548, 0xd549, 0xd56c, 0xc4e8, 0xb4a9, 0xa44a, 0x93eb, 0x7b6a, 0x62c8, 0x41e5, 0x18c2, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x5204, 0x8b86, 0xbc86, 0xd505, 0xdd26, 0xddce, 0xdeb9, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xe71c, 0x9492, 0x4208, 0x4208, 0x4208, 0x4208, 0x4208, 0x4228, 0x4228, 0x4228, 0x4228, 0x4228, 0x4228, 0x4a49, 0x7bcf, 0x4a49, 0x4a49, 0x4a49, 0x4a49, 0x4a69, 0x4a69, 0x4a69, 0x4a69, 0x4a69, 0x528a, 0x528a, 0x528a, 0x528a, 0x528a, 0x528a, 0x52aa, 0x52aa, 0x52aa, 0x52aa, 0xbdd7, 0xef7d, 0xef7d, 0xef7d, 0xef7d, 0xef7d, 0xef7d, 0xef7d, 0xef7d, 0xef7d, 0xef7d, 0xef7d, 0xef7d, 0xef5d, 0x9492, 0xb596, 0xc618, 0x7bef, 0x4a69, 0x7bef, 0x4a49, 0x8c71, 0x4a49, 0x4a49, 0xad75, 0x4a49, 0x7bcf, 0x9cf3, 0x4228, 0x8c51, 0xce59, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdeda, 0xdeb9, 0xde76, 0xde54, 0xde33, 0xd611, 0xd5d0, 0xd5ae, 0xd58d, 0xd56b, 0xd549, 0xd527, 0xd525, 0xd504, 0xd4e3, 0xd4e3, 0xd504, 0xd504, 0xd506, 0xbc65, 0x4a25, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x5a44, 0x9385, 0xbc65, 0xd527, 0xdd26, 0xdd46, 0xddad, 0xde55, 0xdeb9, 0xdeda, 0xdedb, 0xdedb, 0xdedb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xe71c, 0xe71c, 0xe71c, 0x630c, 0x4208, 0x4208, 0x4208, 0x4208, 0x4228, 0x4228, 0x4228, 0x4228, 0x4228, 0x4228, 0x4228, 0x4a49, 0x4a49, 0x4a49, 0x4a49, 0x4a49, 0x4a49, 0x4a69, 0x4a69, 0x4a69, 0x4a69, 0x528a, 0x528a, 0x528a, 0x528a, 0x52aa, 0x52aa, 0x52aa, 0x52aa, 0x52aa, 0x52aa, 0x52aa, 0x5acb, 0xad55, 0xef7d, 0xef7d, 0xf79e, 0xef7d, 0xef7d, 0xef7d, 0xef7d, 0xef7d, 0xef7d, 0xef7d, 0xef7d, 0xef7d, 0xc638, 0xd69a, 0xef5d, 0xef5d, 0xc618, 0xc618, 0x4a69, 0x9492, 0x4a49, 0x4a49, 0x4a49, 0x4a49, 0xce79, 0x9cf3, 0x4228, 0x4228, 0x630c, 0x4228, 0x9cd3, 0xbdd7, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdedb, 0xdefb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdeda, 0xdeda, 0xdeba, 0xdeba, 0xd6ba, 0xd6b9, 0xd699, 0xd698, 0xd678, 0xd677, 0xd656, 0xd5f2, 0xd548, 0xd504, 0xd4c2, 0x9bc4, 0x3121, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x5a44, 0x93a6, 0xbca6, 0xd525, 0xd526, 0xdd47, 0xdd8c, 0xde11, 0xde76, 0xdeb9, 0xdeda, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xe71c, 0xe71c, 0xe71c, 0xad55, 0x4208, 0x4208, 0x4208, 0x4208, 0x4228, 0x4228, 0x4228, 0x4228, 0x4228, 0x4228, 0x4228, 0x4a49, 0x4a49, 0x4a49, 0x4a49, 0x4a49, 0x4a49, 0x4a69, 0x4a69, 0x4a69, 0x4a69, 0x528a, 0x528a, 0x528a, 0x528a, 0x52aa, 0x52aa, 0x52aa, 0x52aa, 0x5acb, 0x5acb, 0x5acb, 0x5acb, 0x5acb, 0x5acb, 0xce59, 0xf79e, 0xf79e, 0xf79e, 0xf79e, 0xf79e, 0xf79e, 0xef7d, 0xef7d, 0xef7d, 0xef7d, 0xc638, 0xef7d, 0xef7d, 0xef5d, 0xef5d, 0xef5d, 0xd69a, 0xce59, 0xef5d, 0x9492, 0x8c71, 0x4a49, 0x4a49, 0xbdf7, 0xbdf7, 0x4228, 0x4228, 0x4228, 0x73ae, 0x4228, 0x4208, 0x73ae, 0xbdd7, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdedb, 0xdefb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdeba, 0xd6ba, 0xd6ba, 0xd698, 0xd634, 0xd56a, 0xd505, 0xbc85, 0x6262, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x18c1, 0x5a65, 0x93a4, 0xc4a5, 0xd525, 0xd505, 0xd548, 0xd5ad, 0xd633, 0xde77, 0xdeb9, 0xdeda, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0x8c51, 0x4208, 0x4208, 0x4208, 0x4208, 0x4208, 0x39e7, 0x2165, 0x2185, 0x2186, 0x21c6, 0x2a07, 0x3228, 0x4228, 0x4a49, 0x4a49, 0x4a49, 0x4a69, 0x4a69, 0x4a69, 0x4a69, 0x528a, 0x528a, 0x94b2, 0x8410, 0x52aa, 0x52aa, 0x52aa, 0x5acb, 0x5acb, 0x5acb, 0x5acb, 0x5acb, 0x5acb, 0x5aeb, 0x5aeb, 0x5aeb, 0xf79e, 0xf79e, 0xf79e, 0xf79e, 0xf79e, 0xf79e, 0xf79e, 0xf79e, 0xf79e, 0xbdd7, 0x52aa, 0x52aa, 0xa534, 0xd69a, 0xef7d, 0xef7d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xc618, 0x8c71, 0x7bcf, 0x4a49, 0x4228, 0x4228, 0x8c71, 0xe73c, 0x4228, 0x630c, 0x4208, 0x8c51, 0x8c51, 0xad55, 0xe71c, 0xc638, 0xe71c, 0xe71c, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdeda, 0xd6ba, 0xdeba, 0xd656, 0xd5ce, 0xd527, 0xd4e5, 0x9ba3, 0x2901, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x18c1, 0x6264, 0x9bc5, 0xc4a5, 0xd505, 0xd525, 0xd549, 0xd5ae, 0xd634, 0xde98, 0xdeba, 0xdeda, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0x8c51, 0x4208, 0x4208, 0x4208, 0x4208, 0x4208, 0x1904, 0x08e3, 0x0903, 0x0944, 0x0985, 0x09c6, 0x09e6, 0x09e6, 0x21e7, 0x3a08, 0x4a49, 0x4a69, 0x4a69, 0x4a69, 0x4a69, 0x528a, 0x8410, 0xef7d, 0xef7d, 0xd6ba, 0xad55, 0x8430, 0x5acb, 0x5acb, 0x5acb, 0x5aeb, 0x5aeb, 0x5aeb, 0x5aeb, 0x630c, 0x5aeb, 0xbdf7, 0xf7be, 0xf7be, 0xf7be, 0xf79e, 0xf79e, 0xf79e, 0xf79e, 0xf79e, 0x5acb, 0x52aa, 0x52aa, 0x52aa, 0x528a, 0xd69a, 0xef7d, 0xef7d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0x8c71, 0xbdf7, 0x8430, 0x7bcf, 0x8c71, 0x4228, 0x73ae, 0x4228, 0x630c, 0x4208, 0x9cd3, 0x4208, 0x4208, 0xce79, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdeba, 0xd698, 0xd612, 0xd56b, 0xd504, 0xbc85, 0x5a43, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x20e1, 0x6a83, 0x9bc4, 0xc4c6, 0xd505, 0xd526, 0xd569, 0xd5cf, 0xd655, 0xd698, 0xd6b9, 0xdeba, 0xdeba, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0x8c51, 0x4208, 0x4208, 0x4208, 0x4208, 0x2986, 0x08c3, 0x08e3, 0x0903, 0x0924, 0x0965, 0x09c6, 0x09e7, 0x09e6, 0x09c6, 0x0985, 0x31c7, 0x4a69, 0x4a69, 0x4a69, 0x4a69, 0x4228, 0xad75, 0xf79e, 0xf79e, 0xf79e, 0xf79e, 0xf79e, 0xbdf7, 0x8c51, 0x5aeb, 0x5aeb, 0x630c, 0x630c, 0x630c, 0x630c, 0x630c, 0x8c71, 0xf7be, 0xf7be, 0xf7be, 0xf7be, 0xf7be, 0xf7be, 0xf79e, 0xad75, 0x5acb, 0x5acb, 0x4228, 0x3186, 0x39c7, 0xb596, 0xdefb, 0xef5d, 0xef7d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xbdd7, 0x9492, 0x4228, 0x4228, 0x4228, 0x4228, 0x4208, 0x4208, 0x4208, 0x4208, 0x9cd3, 0xbdf7, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdedb, 0xdefb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdeda, 0xdeb9, 0xde55, 0xd5ad, 0xdd27, 0xd506, 0x93a5, 0x20e1, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x3143, 0x9bc5, 0xc4c5, 0xd4e3, 0xd4e3, 0xd505, 0xd58c, 0xd633, 0xd698, 0xd6b9, 0xd6ba, 0xd6ba, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xe71c, 0xb5b6, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xad55, 0x4208, 0x4208, 0x4208, 0x4208, 0x08e3, 0x08c3, 0x08c3, 0x0903, 0x0924, 0x0965, 0x09a6, 0x09e6, 0x09e7, 0x09c6, 0x0985, 0x0924, 0x4228, 0x4a69, 0x528a, 0x39e7, 0x08c2, 0x2165, 0x632c, 0x8c92, 0xb5b6, 0xd69a, 0xef7d, 0xf7be, 0xf7be, 0x9cf3, 0x630c, 0x630c, 0x630c, 0x632c, 0x632c, 0x632c, 0x632c, 0xdefb, 0xffdf, 0xffdf, 0xffdf, 0xf7be, 0xf7be, 0xdedb, 0x5aeb, 0x5acb, 0x52aa, 0x18e3, 0x0861, 0x0861, 0x4208, 0x73ae, 0x4208, 0x9cd3, 0x9492, 0xd69a, 0xdefb, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xe73c, 0x7bcf, 0x9cf3, 0x8c71, 0x4228, 0x4208, 0x4208, 0x4208, 0x4208, 0x9cd3, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xdefb, 0xe71c, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdeba, 0xde97, 0xde11, 0xdd47, 0xd526, 0xbc86, 0x6244, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x3121, 0x6a82, 0x9b82, 0xbc63, 0xd505, 0xd58b, 0xd612, 0xd677, 0xd6b9, 0xd6ba, 0xdeba, 0xdeda, 0xdeda, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xe71c, 0x738e, 0x39e7, 0xc638, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe73c, 0x9cf3, 0x4208, 0x4228, 0x4228, 0x1924, 0x08c3, 0x08e3, 0x0965, 0x0985, 0x09a6, 0x09e7, 0x0a28, 0x0a28, 0x09e7, 0x09a6, 0x0945, 0x31c6, 0x528a, 0x4a49, 0x0903, 0x08c2, 0x08c2, 0x08c2, 0x0903, 0x0965, 0x0965, 0x3a69, 0x73cf, 0x9d34, 0xce79, 0x9cf3, 0x632c, 0x632c, 0x6b4d, 0x6b4d, 0x6b4d, 0x6b4d, 0xb5b6, 0xffdf, 0xffdf, 0xffdf, 0xffdf, 0xffdf, 0xa514, 0x5aeb, 0x5aeb, 0x39c7, 0x0861, 0x0861, 0x0861, 0x0861, 0x0861, 0x10a2, 0x0861, 0x0861, 0x632c, 0x4228, 0xce59, 0x7bcf, 0xa534, 0xdefb, 0xdedb, 0xe73c, 0xe73c, 0xce79, 0x4228, 0xe73c, 0xce59, 0xbdf7, 0x8c51, 0x4208, 0x4208, 0xbdd7, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xdefb, 0xe71c, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdedb, 0xdedb, 0xdedb, 0xdeb8, 0xde54, 0xdd8c, 0xdd25, 0xd505, 0x93a5, 0x20e1, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x4181, 0x7ae3, 0xa3e5, 0xc4a5, 0xd548, 0xd5cf, 0xde55, 0xde77, 0xdeb9, 0xdeba, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdedb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xe71c, 0xbdd7, 0x39e7, 0x39e7, 0x39e7, 0x8430, 0xce59, 0xe73c, 0xe71c, 0xe73c, 0xad75, 0x4208, 0x4208, 0x4208, 0x2985, 0x08e3, 0x0985, 0x09c6, 0x0a27, 0x0a28, 0x09e7, 0x0a07, 0x0a68, 0x0aa9, 0x0a69, 0x09c6, 0x2165, 0x4a69, 0x2185, 0x08e3, 0x08c2, 0x08c2, 0x08a2, 0x0903, 0x0944, 0x0965, 0x0965, 0x0965, 0x0985, 0x0985, 0x2a28, 0x3a28, 0x52cb, 0x6b4d, 0x6b4d, 0x6b6d, 0x6b6d, 0xad55, 0xffff, 0xffff, 0xffdf, 0xffdf, 0xe71c, 0x630c, 0x630c, 0x52aa, 0x2104, 0x3186, 0x0861, 0x0861, 0x31a6, 0x0861, 0x6b4d, 0x0861, 0x39c7, 0x4a49, 0x6b4d, 0xad55, 0x0861, 0x0861, 0x4a69, 0x0861, 0x8c51, 0x7bcf, 0xbdd7, 0xc618, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xbdf7, 0xce59, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdedb, 0xdeda, 0xde97, 0xddcf, 0xdd46, 0xdd26, 0xbc86, 0x5a43, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x18a1, 0x5202, 0x8b43, 0xac25, 0xcd07, 0xdd8c, 0xddf0, 0xde54, 0xde98, 0xdeda, 0xdeda, 0xdedb, 0xdedb, 0xdedb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xe71c, 0xe71c, 0x8430, 0x39e7, 0x39e7, 0x39e7, 0x4208, 0x4208, 0x4208, 0x8c51, 0x4208, 0x4208, 0x4208, 0x4228, 0x4228, 0x31c7, 0x0944, 0x09a6, 0x09a5, 0x09e7, 0x0a27, 0x0a68, 0x0a28, 0x0a07, 0x0a28, 0x0a89, 0x0a89, 0x09c6, 0x31e7, 0x0903, 0x08e3, 0x08c2, 0x08e3, 0x08c2, 0x08c3, 0x0944, 0x0965, 0x0965, 0x0965, 0x0985, 0x0985, 0x09a6, 0x0985, 0x0965, 0x3a28, 0x632c, 0x738e, 0x738e, 0x738e, 0xffff, 0xffff, 0xffff, 0xffff, 0x9492, 0x632c, 0x630c, 0x5acb, 0x39e7, 0x5acb, 0xc638, 0xc618, 0xbdd7, 0x39e7, 0x7bcf, 0x0861, 0x4208, 0x0861, 0x6b4d, 0x8c51, 0x0861, 0x2945, 0x2945, 0x8430, 0x10a2, 0x10a2, 0x10a2, 0x94b2, 0x738e, 0xdedb, 0xad75, 0xb5b6, 0xe73c, 0xe73c, 0xe73c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdedb, 0xdeb9, 0xde32, 0xdd8a, 0xdd47, 0xd506, 0x8b86, 0x20c1, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x20e1, 0x6262, 0x9384, 0xb465, 0xd548, 0xddce, 0xde33, 0xde76, 0xdeb9, 0xdeda, 0xdedb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0x39e7, 0x39e7, 0x39e7, 0x39e7, 0x4208, 0x4208, 0x4208, 0x4208, 0x4208, 0x4208, 0x4208, 0x4228, 0x4228, 0x4208, 0x31e7, 0x2186, 0x52ca, 0x634d, 0x1144, 0x09a6, 0x0a48, 0x0a89, 0x0a68, 0x0a48, 0x0a68, 0x0a48, 0x0965, 0x0924, 0x08e3, 0x0924, 0x0965, 0x0944, 0x0924, 0x0965, 0x09a6, 0x0985, 0x0965, 0x0965, 0x0985, 0x09a6, 0x0985, 0x0965, 0x0965, 0x1985, 0x632c, 0x73ae, 0x738e, 0xdedb, 0xffff, 0xffff, 0xb596, 0x6b4d, 0x632c, 0x4208, 0x2124, 0x31a6, 0x7bef, 0xe73c, 0xf7be, 0xef5d, 0xc618, 0x528a, 0x4228, 0x73ae, 0x7bcf, 0x8c71, 0x10a2, 0x4a49, 0x94b2, 0x3186, 0x7bcf, 0x2945, 0x4a49, 0x0861, 0x2104, 0x2945, 0x8c51, 0x0861, 0x39c7, 0xdefb, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xdefb, 0xe71c, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdeda, 0xde76, 0xdd8a, 0xdd46, 0xdd25, 0xd56b, 0xac8d, 0x6b09, 0x10a2, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x3961, 0x72c3, 0x9bc4, 0xcce6, 0xddab, 0xde33, 0xdeda, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xe71c, 0xe71c, 0xe71c, 0x8c51, 0x39e7, 0x39e7, 0x4208, 0x4208, 0x4208, 0x4208, 0x4208, 0x4208, 0x4208, 0x4208, 0x4208, 0x4228, 0x4228, 0x3186, 0x0903, 0x0924, 0x0903, 0x08e3, 0x0944, 0x0965, 0x0a68, 0x0aca, 0x0aca, 0x0aa9, 0x0a89, 0x09c6, 0x0924, 0x0903, 0x0985, 0x09c6, 0x09e7, 0x09e6, 0x09a6, 0x09c6, 0x0a27, 0x0a07, 0x09e7, 0x09e7, 0x09e6, 0x09a6, 0x0985, 0x0965, 0x0944, 0x2165, 0x6b6d, 0x7bcf, 0xffff, 0xffff, 0xffff, 0x6b6d, 0x6b4d, 0x5acb, 0x0861, 0x0861, 0x0861, 0x0861, 0xb596, 0xf7be, 0xf7be, 0xf7be, 0x7bef, 0x528a, 0x528a, 0x8410, 0xef7d, 0xdedb, 0xe73c, 0xdedb, 0x7bcf, 0x738e, 0x39c7, 0x2104, 0x0861, 0x10a2, 0x528a, 0x2104, 0x0861, 0x94b2, 0xe71c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdeda, 0xde75, 0xddcd, 0xdd47, 0xdd25, 0xdd47, 0xddce, 0xc56f, 0x8c2d, 0x4207, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x4181, 0xbc85, 0xdd68, 0xde11, 0xdeda, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0x8c51, 0x39e7, 0x4208, 0x4208, 0x4208, 0x4208, 0x4208, 0x4208, 0x4208, 0x4208, 0x4208, 0x4208, 0x4228, 0x39e7, 0x08e3, 0x08e3, 0x0944, 0x0903, 0x08e3, 0x0924, 0x0965, 0x0a48, 0x0aa9, 0x0aea, 0x0b0b, 0x0aca, 0x09c6, 0x0924, 0x0985, 0x0944, 0x0965, 0x09e7, 0x09e7, 0x09e7, 0x09e7, 0x09e7, 0x09e7, 0x0a48, 0x0a89, 0x0aa9, 0x0a89, 0x0a28, 0x09c6, 0x0945, 0x0904, 0x5acb, 0x7bef, 0xc638, 0xe71c, 0xce79, 0x738e, 0x6b4d, 0x2945, 0x0861, 0x0861, 0x0861, 0x0861, 0xa514, 0xf7be, 0xf7be, 0xf7be, 0xbdd7, 0x528a, 0x528a, 0x528a, 0xd6ba, 0xef7d, 0xef7d, 0xef7d, 0xef7d, 0xce59, 0x8c51, 0x94b2, 0xa534, 0xad75, 0x9cd3, 0x4a49, 0x39c7, 0xc638, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdeda, 0xde97, 0xddef, 0xdd69, 0xdd46, 0xdd25, 0xdd47, 0xd5af, 0xacce, 0x6b2a, 0x10a2, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x41a1, 0xc4a6, 0xdd47, 0xde11, 0xdeb8, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0x8c51, 0x39e7, 0x39e7, 0x4208, 0x4208, 0x4208, 0x4208, 0x4208, 0x4208, 0x4208, 0x4228, 0x4228, 0x4228, 0x31a6, 0x08c2, 0x08c2, 0x0924, 0x0904, 0x08e3, 0x0904, 0x09e6, 0x0a48, 0x0a89, 0x0aaa, 0x0aca, 0x0a89, 0x0924, 0x0985, 0x09e7, 0x0985, 0x0944, 0x0944, 0x0985, 0x638d, 0x4aeb, 0x09c6, 0x09c6, 0x09e7, 0x0a48, 0x0aa9, 0x0aca, 0x0aaa, 0x0a89, 0x0a28, 0x0965, 0x3a08, 0x8410, 0x7bef, 0x7bcf, 0x7bcf, 0x738e, 0x4a49, 0x0861, 0x0861, 0x0861, 0x0861, 0x4a49, 0xef5d, 0xffdf, 0xf7be, 0xf7be, 0xdefb, 0x52aa, 0x528a, 0x528a, 0xbdd7, 0xf79e, 0xef7d, 0xef7d, 0xd69a, 0xa514, 0x4208, 0x94b2, 0xd69a, 0xef5d, 0xef5d, 0xce79, 0xd69a, 0xef5d, 0xef5d, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdedb, 0xdeda, 0xde98, 0xde54, 0xddce, 0xdd48, 0xdd25, 0xdd48, 0xdd8c, 0xc570, 0x942d, 0x4a27, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x49c2, 0xc4a5, 0xdd46, 0xddf0, 0xdeb7, 0xdeda, 0xdefb, 0xdefb, 0xdefb, 0xe71c, 0xdefb, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0x8c51, 0x39e7, 0x39e7, 0x4208, 0x4208, 0x4208, 0x4208, 0x4208, 0x4208, 0x4208, 0x4228, 0x4228, 0x39e7, 0x08c2, 0x08c2, 0x0944, 0x0924, 0x0924, 0x0944, 0x0985, 0x09e7, 0x0a28, 0x0a68, 0x0a69, 0x09a5, 0x0944, 0x0985, 0x0985, 0x0985, 0x0965, 0x0965, 0x73cf, 0xffdf, 0xffdf, 0xa534, 0x52cb, 0x3a69, 0x19e7, 0x0a27, 0x0a69, 0x0aa9, 0x0a89, 0x0a89, 0x0a68, 0x1985, 0x7bef, 0x8410, 0x7bef, 0x7bcf, 0x632c, 0x1082, 0x0861, 0x0861, 0x0861, 0x0861, 0xc618, 0xffdf, 0xdedb, 0x9492, 0xb5b6, 0xd6ba, 0x94b2, 0x528a, 0x528a, 0x8410, 0xf79e, 0xc638, 0x9492, 0x4a49, 0x4a49, 0x4a49, 0x4a49, 0x4228, 0x5aeb, 0x8c71, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdedb, 0xdedb, 0xdeda, 0xde97, 0xddf0, 0xdd6a, 0xdd26, 0xdd26, 0xdd47, 0xd58d, 0xaccd, 0x732a, 0x18e3, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x49e2, 0xc4c5, 0xdd46, 0xddef, 0xde98, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xe71c, 0xdefb, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe73c, 0xe73c, 0xe73c, 0xad75, 0x8c51, 0x4208, 0x4208, 0x4208, 0x31a6, 0x31c7, 0x4208, 0x4208, 0x4228, 0x4228, 0x4228, 0x10e3, 0x0924, 0x0965, 0x0944, 0x0944, 0x0944, 0x0924, 0x0944, 0x0985, 0x09a6, 0x0944, 0x08e3, 0x09c6, 0x09a6, 0x0965, 0x0965, 0x0965, 0x21e7, 0xb5b6, 0xa514, 0x632c, 0x632c, 0x6b4d, 0x6b6d, 0x6b6d, 0x428a, 0x0a48, 0x0a89, 0x0a89, 0x0a68, 0x0a27, 0x09c6, 0x73ae, 0x8430, 0x7bef, 0x7bcf, 0x3186, 0x0861, 0x0861, 0x0861, 0x0861, 0x3186, 0xc618, 0xffff, 0xef7d, 0x2124, 0x0861, 0x0861, 0x4228, 0x4a69, 0x528a, 0x528a, 0x8410, 0x4a69, 0x4a69, 0x4a49, 0x4a49, 0x4a49, 0x4a49, 0x4a49, 0x4228, 0x4228, 0xb596, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdedb, 0xdedb, 0xdedb, 0xdeda, 0xde98, 0xde34, 0xddcf, 0xdd47, 0xdd04, 0xd525, 0xd569, 0xc54e, 0x940b, 0x4a27, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x5203, 0xccc5, 0xdd68, 0xde10, 0xdeb9, 0xdedb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe73c, 0xe73c, 0xe73c, 0xe71c, 0xbdf7, 0x9cf3, 0x6b4d, 0x08e3, 0x08e3, 0x2165, 0x31c7, 0x39e7, 0x3a07, 0x7bef, 0x4249, 0x0985, 0x09c6, 0x09a6, 0x0965, 0x0985, 0x1185, 0x1965, 0x0903, 0x08e3, 0x08a2, 0x0924, 0x09c6, 0x09a6, 0x0985, 0x0985, 0x09a6, 0x3a49, 0x5aeb, 0x630c, 0x632c, 0x6b4d, 0x6b4d, 0x6b6d, 0x738e, 0x3208, 0x09e7, 0x0a89, 0x0a89, 0x0a48, 0x09c6, 0x0944, 0xad96, 0x9cd3, 0x8410, 0x52aa, 0x0861, 0x0861, 0x0861, 0x0861, 0x18c3, 0x5aeb, 0x630c, 0xffff, 0xffff, 0x9cd3, 0x0861, 0x0861, 0x0861, 0x39c7, 0x528a, 0x528a, 0x4a69, 0x4a69, 0x4a49, 0x39c7, 0x39e7, 0x4228, 0x4a49, 0x4228, 0x7bcf, 0xad55, 0xd69a, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdedb, 0xdedb, 0xdedb, 0xdeda, 0xdeba, 0xde98, 0xde11, 0xdd6a, 0xd504, 0xd504, 0xd505, 0xd549, 0xb445, 0x7305, 0x2102, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x5a22, 0xcce6, 0xdd69, 0xde10, 0xded9, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0x634d, 0x08c2, 0x08e3, 0x0903, 0x0924, 0x0944, 0x0944, 0x0924, 0x08e3, 0x0944, 0x09a6, 0x09a6, 0x0985, 0x0965, 0x31c7, 0x29a6, 0x08e3, 0x08e3, 0x08c2, 0x0944, 0x0985, 0x0985, 0x0965, 0x0944, 0x21c6, 0x5acb, 0x5aeb, 0x630c, 0x632c, 0x6b4d, 0x6b4d, 0x6b6d, 0x4aaa, 0x0944, 0x0985, 0x0a69, 0x0a68, 0x0a28, 0x09a6, 0x0965, 0x3a69, 0x4228, 0x528a, 0x10a2, 0x0861, 0x0861, 0x0861, 0x0861, 0x4a69, 0x632c, 0x630c, 0xffff, 0xffff, 0xc638, 0x31a6, 0x0861, 0x0861, 0x10a2, 0x4a69, 0x4a69, 0x4208, 0x2965, 0x10a2, 0x0861, 0x0861, 0x1082, 0x39e7, 0x7bcf, 0xdefb, 0xef7d, 0xef7d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdedb, 0xdeda, 0xdeda, 0xdeb9, 0xde97, 0xde54, 0xde12, 0xddcf, 0xdd6a, 0xdd25, 0xd504, 0xc4a4, 0xac04, 0x8b64, 0x6aa4, 0x2943, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x5a42, 0xccc5, 0xdd68, 0xde10, 0xdeb9, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xef5d, 0xe71c, 0x3a28, 0x08a2, 0x08e3, 0x08e3, 0x0924, 0x0944, 0x0965, 0x0944, 0x08e3, 0x08e3, 0x0965, 0x09a6, 0x09a6, 0x0985, 0x1185, 0x0924, 0x08e3, 0x08e3, 0x0924, 0x0924, 0x0944, 0x0965, 0x09a6, 0x11a6, 0x4a8a, 0x5aeb, 0x5aeb, 0x630c, 0x632c, 0x632c, 0x634d, 0x4289, 0x09a6, 0x0965, 0x0985, 0x0a89, 0x0a89, 0x0a27, 0x09c6, 0x0944, 0x0903, 0x0861, 0x0861, 0x0861, 0x0861, 0x0861, 0x0861, 0x31a6, 0x9cf3, 0x630c, 0xa534, 0xb5b6, 0x5aeb, 0x5acb, 0x4228, 0x0861, 0x0861, 0x0861, 0x2945, 0x18e3, 0x0861, 0x0861, 0x0861, 0x0861, 0x0861, 0x0861, 0x0861, 0x0861, 0xb596, 0xef7d, 0xef7d, 0xef7d, 0xef7d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdeda, 0xdeda, 0xdeb8, 0xde54, 0xddee, 0xdd69, 0xdd46, 0xdd26, 0xcce6, 0xb444, 0x9b83, 0x72c2, 0x49c2, 0x1081, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x6242, 0xcce5, 0xdd68, 0xde32, 0xdeb9, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xef5d, 0xef5d, 0xef5d, 0x7bef, 0x08a2, 0x0924, 0x0903, 0x0924, 0x0944, 0x0944, 0x0944, 0x0903, 0x08e3, 0x0985, 0x09c6, 0x0985, 0x0965, 0x0965, 0x0924, 0x0903, 0x0924, 0x09a6, 0x09a6, 0x0965, 0x0944, 0x0965, 0x3a28, 0x5acb, 0x5aeb, 0x5aeb, 0x630c, 0x630c, 0x52aa, 0x2a28, 0x09a6, 0x09a6, 0x0985, 0x09c6, 0x0aa9, 0x0aa9, 0x0a68, 0x09e7, 0x0965, 0x08c3, 0x0861, 0x0861, 0x0861, 0x0861, 0x0861, 0x0861, 0x0861, 0x0861, 0x39c7, 0x630c, 0x5aeb, 0x5aeb, 0x5acb, 0x528a, 0x18e3, 0x0861, 0x0861, 0x0861, 0x0861, 0x0861, 0x0861, 0x0861, 0x0861, 0x0861, 0x0861, 0x4a49, 0x9492, 0xd6ba, 0xef7d, 0xef7d, 0xef7d, 0xef7d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe6fb, 0xded9, 0xde96, 0xde53, 0xde10, 0xddac, 0xdd68, 0xdd45, 0xd505, 0xbc64, 0xa3c4, 0x8303, 0x5a22, 0x20c1, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x6a62, 0xd4e6, 0xdd68, 0xde32, 0xdeb8, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xa555, 0x08a2, 0x0944, 0x0944, 0x0965, 0x0944, 0x0965, 0x0965, 0x0924, 0x0924, 0x0985, 0x0965, 0x0924, 0x0944, 0x0965, 0x0944, 0x0924, 0x0985, 0x09c6, 0x09c6, 0x09e7, 0x09a6, 0x0965, 0x21a6, 0x31e7, 0x3a28, 0x3269, 0x3248, 0x11a6, 0x0985, 0x09e6, 0x09a6, 0x0985, 0x09a6, 0x09e6, 0x0a48, 0x0a89, 0x0a68, 0x0a07, 0x3269, 0x7c10, 0x0861, 0x0861, 0x0861, 0x0861, 0x0861, 0x0861, 0x0861, 0x0861, 0x0861, 0x5acb, 0x52aa, 0x4208, 0x2945, 0x0861, 0x0861, 0x0861, 0x0861, 0x0861, 0x0861, 0x0861, 0x0861, 0x0861, 0x4a69, 0x94b2, 0xce59, 0xef7d, 0xf79e, 0xef7d, 0xef7d, 0xef7d, 0xef7d, 0xef7d, 0xef7d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe71c, 0xe71b, 0xe6fb, 0xe6d9, 0xe674, 0xe630, 0xe5aa, 0xdd68, 0xdd47, 0xdd47, 0xccc6, 0xac25, 0x8b64, 0x6284, 0x3142, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x6aa3, 0xd505, 0xdd48, 0xde54, 0xdeb9, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xce79, 0x0944, 0x0965, 0x0985, 0x0985, 0x0985, 0x0985, 0x09a6, 0x09a6, 0x0985, 0x0985, 0x0965, 0x0945, 0x0985, 0x0985, 0x0965, 0x09a6, 0x0a07, 0x0a07, 0x09e7, 0x09e7, 0x09e7, 0x0985, 0x0924, 0x0944, 0x0985, 0x0a07, 0x09e7, 0x0985, 0x0965, 0x09c6, 0x09c6, 0x0985, 0x0a27, 0x0a48, 0x0a28, 0x0a48, 0x0a48, 0x0a28, 0xa555, 0xb5b6, 0x0861, 0x0861, 0x0861, 0x0861, 0x2104, 0x2124, 0x0861, 0x0861, 0x2945, 0x4228, 0x0861, 0x0861, 0x0861, 0x0861, 0x0861, 0x0861, 0x0861, 0x0861, 0x0861, 0x10a2, 0x3186, 0xb5b6, 0xf79e, 0xf7be, 0xf79e, 0xf79e, 0xf79e, 0xf79e, 0xef7d, 0xef7d, 0xef7d, 0xef7d, 0xef7d, 0xef7d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe71b, 0xe6f9, 0xe631, 0xe5cc, 0xe568, 0xe568, 0xd507, 0xb466, 0x93a5, 0x72a3, 0x4182, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x72c3, 0xd505, 0xdd69, 0xde33, 0xdeb9, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xe71c, 0xdefb, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xb5b6, 0x52eb, 0x09a6, 0x0985, 0x0944, 0x0924, 0x0944, 0x0985, 0x0965, 0x0965, 0x0944, 0x636d, 0x532c, 0x0985, 0x09c6, 0x0a28, 0x0a27, 0x0a28, 0x0a07, 0x0a07, 0x09c6, 0x0965, 0x0944, 0x0944, 0x0965, 0x09e6, 0x0a07, 0x09a6, 0x0965, 0x09c6, 0x09e7, 0x09c6, 0x0a48, 0x0a89, 0x0aca, 0x0aa9, 0x0a69, 0x6c0f, 0xf7be, 0xc618, 0x0861, 0x0861, 0x0861, 0x1082, 0x5acb, 0x6b4d, 0x4228, 0x0861, 0x0861, 0x0861, 0x0861, 0x0861, 0x0861, 0x0861, 0x0861, 0x0861, 0x18c3, 0x0861, 0x0861, 0x2104, 0x4a49, 0xad55, 0xf7be, 0xf7be, 0xf79e, 0xf79e, 0xf79e, 0xf79e, 0xf79e, 0xef7d, 0xef7d, 0xef7d, 0xef7d, 0xef7d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe71b, 0xe6d8, 0xe5ec, 0xe589, 0xe566, 0x9be6, 0x1081, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x72c3, 0xd4e4, 0xdd6a, 0xde32, 0xdeb9, 0xdeda, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xdefb, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe71c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xef7d, 0xef7d, 0xe73c, 0xc659, 0x9d13, 0x73ef, 0x4aca, 0x4289, 0x428a, 0x5b4d, 0x8c92, 0xc638, 0xf79e, 0x9d14, 0x0985, 0x0a69, 0x0a89, 0x0a28, 0x0a07, 0x0a07, 0x0a28, 0x09e7, 0x0985, 0x0944, 0x0924, 0x0944, 0x09c6, 0x0a07, 0x09c6, 0x0965, 0x09a6, 0x0a27, 0x0a28, 0x0a48, 0x0a69, 0x0aca, 0x0aea, 0x53ef, 0xef7d, 0xffff, 0xe73c, 0x18c3, 0x0861, 0x0861, 0x0861, 0x18c3, 0x2965, 0x39c7, 0x0861, 0x0861, 0x0861, 0x0861, 0x0861, 0x0861, 0x2124, 0x7bef, 0xc638, 0xc618, 0x0861, 0x0861, 0x0861, 0x39c7, 0x8410, 0xf7be, 0xf7be, 0xf79e, 0xf79e, 0xf79e, 0xf79e, 0xf79e, 0xf79e, 0xef7d, 0xef7d, 0xef7d, 0xef7d, 0xef7d, 0xef7d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe6f9, 0xe5ee, 0xe567, 0xdd68, 0x8326, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x7ae3, 0xd505, 0xdd04, 0xdd26, 0xdd48, 0xdd69, 0xdd6a, 0xdd8b, 0xdd8b, 0xddab, 0xddab, 0xddcc, 0xddee, 0xddee, 0xde0f, 0xe60f, 0xe630, 0xe674, 0xe6b7, 0xe6d7, 0xe6d8, 0xe6d7, 0xe6f9, 0xe71b, 0xe73c, 0xe73c, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xef7d, 0xef7d, 0xef7d, 0xef7d, 0xef7d, 0xf79e, 0xf79e, 0xf79e, 0xf79e, 0xf79e, 0xf79e, 0xf7be, 0xf7be, 0xf7be, 0xc659, 0x0a07, 0x0a89, 0x0a89, 0x0a28, 0x09c6, 0x09c6, 0x0a07, 0x0a48, 0x0a27, 0x09c6, 0x0985, 0x0985, 0x09c6, 0x0a27, 0x09e6, 0x09a5, 0x09a6, 0x09c6, 0x0a07, 0x0a48, 0x0a68, 0x0a89, 0x7491, 0xef7d, 0xffff, 0xffff, 0xffff, 0x9492, 0x0861, 0x0861, 0x0861, 0x0861, 0x0861, 0x5aeb, 0xad55, 0xb5b6, 0x9492, 0x630c, 0x52aa, 0xad55, 0xe73c, 0xffff, 0xffff, 0xffdf, 0x5acb, 0x0861, 0x0861, 0x10a2, 0x4228, 0xce59, 0x9cf3, 0x632c, 0x9492, 0xd6ba, 0xf79e, 0xf79e, 0xf79e, 0xef7d, 0xef7d, 0xef7d, 0xef7d, 0xef7d, 0xef7d, 0xef7d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xe73c, 0xef5d, 0xe73c, 0xe73c, 0xe73c, 0xe71b, 0xe6d8, 0xe60f, 0xe588, 0xdd69, 0x7b06, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x3961, 0x49c2, 0x5202, 0x5a22, 0x6a62, 0x6aa3, 0x7ae3, 0x8303, 0x8b44, 0x8b64, 0x93a4, 0x9bc5, 0xa3e5, 0xac25, 0xb446, 0xb466, 0xbca6, 0xc4c7, 0xcce7, 0xcd08, 0xd528, 0xdd68, 0xe5cc, 0xe693, 0xe71b, 0xef3c, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xef7d, 0xef7d, 0xef7d, 0xef7d, 0xef7d, 0xf79e, 0xf79e, 0xf79e, 0xf79e, 0xf79e, 0xf79e, 0xf7be, 0xf7be, 0xf7be, 0xf7be, 0xef7d, 0xadd7, 0x84d2, 0x536d, 0x1a68, 0x0a07, 0x09c6, 0x09e6, 0x0a28, 0x0a48, 0x0a48, 0x09e7, 0x0985, 0x0965, 0x0985, 0x09a6, 0x0985, 0x0944, 0x0924, 0x0965, 0x09a6, 0x3aeb, 0xb5d7, 0xffdf, 0xffff, 0xffff, 0xffff, 0xffff, 0xf7be, 0xad55, 0x39e7, 0x0861, 0x0861, 0x0861, 0x52aa, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xb5b6, 0x0861, 0x0861, 0x0861, 0x630c, 0x9cd3, 0x3186, 0x2124, 0x31a6, 0xa534, 0xf79e, 0xf79e, 0xf79e, 0xef7d, 0xf79e, 0xef7d, 0xef7d, 0xef7d, 0xef7d, 0xef7d, 0xef7d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe71b, 0xe6b6, 0xe60f, 0xe567, 0xdd6a, 0x72e6, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x2901, 0xbc86, 0xe60f, 0xe6b6, 0xe73b, 0xef3c, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xef7d, 0xef7d, 0xef7d, 0xef7d, 0xef7d, 0xf79e, 0xf79e, 0xf79e, 0xf79e, 0xf79e, 0xf79e, 0xf7be, 0xf7be, 0xf7be, 0xf7be, 0xffdf, 0xffdf, 0xffdf, 0xffdf, 0xffdf, 0xe75d, 0xce79, 0xa575, 0x7c71, 0x434c, 0x0a89, 0x0a68, 0x0a28, 0x09c6, 0x0944, 0x0924, 0x0965, 0x0965, 0x0944, 0x21c6, 0x634c, 0xb5b6, 0xf79e, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xf79e, 0xce79, 0x9cf3, 0x7bcf, 0x5acb, 0xf79e, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xef7d, 0x9cf3, 0x73ae, 0x39e7, 0x630c, 0xb596, 0x0861, 0x0861, 0x39e7, 0xce59, 0xf79e, 0xf79e, 0xf79e, 0xf79d, 0xef7d, 0xef7d, 0xef7d, 0xef7d, 0xef7d, 0xef7d, 0xef7d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe71c, 0xe696, 0xe5ec, 0xe568, 0xdd48, 0x6ae6, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x20c1, 0xb446, 0xe5aa, 0xe651, 0xe71b, 0xef3c, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xef7d, 0xef7d, 0xef7d, 0xef7d, 0xef7d, 0xf79e, 0xf79e, 0xf79e, 0xf79e, 0xf79e, 0xf7be, 0xf7be, 0xf7be, 0xf7be, 0xffdf, 0xffdf, 0xffdf, 0xffdf, 0xffdf, 0xffdf, 0xffff, 0xffff, 0xffff, 0xffff, 0xffdf, 0xe73c, 0xce9a, 0xb5f7, 0x9d34, 0x94b2, 0x94b2, 0x9d34, 0xad75, 0xc659, 0xef5d, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xf79e, 0xdefb, 0xe71c, 0x94b2, 0x9cf3, 0xad55, 0xf7be, 0xf7be, 0xf79e, 0xf77c, 0xf739, 0xf6f6, 0xef39, 0xef7d, 0xef7d, 0xef7d, 0xef7d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe71b, 0xe6b6, 0xe5cc, 0xe568, 0xd548, 0x62a6, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xa3e5, 0xe5a9, 0xe630, 0xe6f9, 0xef3c, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xef7d, 0xef7d, 0xef7d, 0xef7d, 0xef7d, 0xf79e, 0xf79e, 0xf79e, 0xf79e, 0xf79e, 0xf7be, 0xf7be, 0xf7be, 0xf7be, 0xffdf, 0xffdf, 0xffdf, 0xffdf, 0xffdf, 0xffdf, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffdf, 0xffdf, 0xffdf, 0xffdf, 0xf7be, 0xf7be, 0xf7be, 0xf7be, 0xf79e, 0xf738, 0xf671, 0xf62e, 0xf64f, 0xf64f, 0xee91, 0xeed6, 0xef3a, 0xef5c, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe71c, 0xe71b, 0xe6b7, 0xe5ab, 0xe567, 0xd549, 0x6285, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x8b65, 0xe588, 0xe631, 0xe6f8, 0xef3c, 0xef3c, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xef7d, 0xef7d, 0xef7d, 0xef7d, 0xf79e, 0xf79e, 0xf79e, 0xf79e, 0xf79e, 0xf7be, 0xf7be, 0xf7be, 0xf7be, 0xf7be, 0xffdf, 0xffdf, 0xffdf, 0xffdf, 0xffdf, 0xffdf, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffdf, 0xffdf, 0xffdf, 0xffdf, 0xffdf, 0xffdf, 0xf7be, 0xf7be, 0xf79d, 0xf738, 0xf670, 0xf5ea, 0xf5eb, 0xf62c, 0xee0b, 0xedeb, 0xee0c, 0xee71, 0xeeb5, 0xeef8, 0xef19, 0xef3b, 0xef3c, 0xef3c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe71b, 0xe695, 0xe5cc, 0xe568, 0xd549, 0x6264, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x7b05, 0xe568, 0xe60f, 0xe6d7, 0xe73c, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xef5d, 0xef7d, 0xef7d, 0xef7d, 0xef7d, 0xef7d, 0xf79e, 0xf79e, 0xf79e, 0xf79e, 0xf7be, 0xf7be, 0xf7be, 0xf7be, 0xffdf, 0xf7be, 0xffdf, 0xffdf, 0xffdf, 0xffdf, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xfffe, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffdf, 0xffdf, 0xffdf, 0xffdf, 0xf7be, 0xf7be, 0xf7be, 0xf738, 0xf670, 0xf5eb, 0xd54b, 0x8bca, 0xb4ce, 0xcd6e, 0xe60d, 0xedeb, 0xedca, 0xedeb, 0xedec, 0xee2e, 0xee73, 0xeed7, 0xef1a, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe73c, 0xe71c, 0xe71b, 0xe695, 0xe5cd, 0xe546, 0xd54b, 0x5a45, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x6aa3, 0xdd48, 0xe5ed, 0xe6d7, 0xe73b, 0xe73c, 0xef5d, 0xef5d, 0xef5d, 0xef3b, 0xef19, 0xeef8, 0xeeb4, 0xee71, 0xee70, 0xeed5, 0xf75a, 0xf79e, 0xf79e, 0xf79e, 0xf79e, 0xf7be, 0xf7be, 0xf7be, 0xf7be, 0xffdf, 0xffdf, 0xffdf, 0xffdf, 0xffdf, 0xffdf, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xfffd, 0xff12, 0xfed0, 0xff34, 0xffbb, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffdf, 0xffdf, 0xffdf, 0xffdf, 0xffdf, 0xf7be, 0xf7be, 0xf759, 0xf691, 0xf5eb, 0xcd2c, 0x0000, 0x0000, 0x0000, 0x2924, 0x62e9, 0x93ea, 0xb48a, 0xcd2b, 0xe5cc, 0xedca, 0xeda9, 0xedca, 0xe60e, 0xe674, 0xe6b6, 0xe6d8, 0xe6f9, 0xe6fa, 0xe71b, 0xe71c, 0xe71b, 0xe674, 0xe5ab, 0xe567, 0xcd29, 0x5224, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x5a23, 0xdd48, 0xe5cb, 0xe6b7, 0xe73b, 0xef3c, 0xef3c, 0xef3b, 0xef19, 0xeeb4, 0xee50, 0xedec, 0xedca, 0xdd69, 0xcd29, 0xedea, 0xee2d, 0xf718, 0xf79e, 0xf79e, 0xf79e, 0xf7be, 0xf7be, 0xf7be, 0xf7be, 0xffdf, 0xffdf, 0xffdf, 0xffdf, 0xffdf, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xfffc, 0xff76, 0xff76, 0xfffd, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffba, 0xfed0, 0xfeae, 0xfe8e, 0xfed1, 0xff57, 0xffdd, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffdf, 0xffdf, 0xffdf, 0xffdf, 0xffde, 0xf7be, 0xf79c, 0xf6b3, 0xf60b, 0xdd8c, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x3163, 0x6ac7, 0x93c9, 0xb48a, 0xcd2a, 0xe58a, 0xe5aa, 0xe5cb, 0xe5cc, 0xe5cd, 0xe60f, 0xe673, 0xe6b7, 0xe6d8, 0xe653, 0xe5aa, 0xe567, 0xcd08, 0x5205, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x49e2, 0xcd08, 0xe5cc, 0xe6b5, 0xe71a, 0xe71b, 0xe6f9, 0xeeb5, 0xee30, 0xedcb, 0xedca, 0xd54a, 0xac27, 0x72c5, 0x20c1, 0xa407, 0xedeb, 0xf670, 0xf719, 0xf79e, 0xf79e, 0xf7be, 0xf7be, 0xf7be, 0xf7be, 0xffdf, 0xffdf, 0xffdf, 0xffdf, 0xffdf, 0xffdf, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xfffd, 0xff77, 0xfecf, 0xfecf, 0xff33, 0xfffc, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xfffe, 0xff76, 0xfed0, 0xbceb, 0xc50b, 0xfe8f, 0xfeaf, 0xff13, 0xffbc, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffdf, 0xffdf, 0xffdf, 0xffdf, 0xf7be, 0xf7be, 0xf6d5, 0xf60b, 0xe5ed, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x3984, 0x6ac6, 0x93a7, 0xac47, 0xcce8, 0xe589, 0xe588, 0xe588, 0xe5aa, 0xe5ed, 0xe5cd, 0xe567, 0xe547, 0xcd09, 0x49e4, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x3962, 0xc4a6, 0xe5cb, 0xe672, 0xe6f9, 0xe673, 0xe60f, 0xe5cb, 0xeda9, 0xcd08, 0x9be6, 0x6284, 0x1081, 0x0000, 0x0000, 0x0000, 0xbcc9, 0xedeb, 0xf6b3, 0xf75a, 0xf79e, 0xf7be, 0xf7be, 0xf7be, 0xf7be, 0xf7be, 0xf7be, 0xffdf, 0xffdf, 0xffde, 0xffde, 0xffde, 0xffde, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xfffe, 0xff77, 0xfef1, 0xfed0, 0xfecf, 0xfecf, 0xff54, 0xfffc, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xfffe, 0xff55, 0xfed0, 0x7b69, 0x0000, 0x8389, 0xee2e, 0xfeaf, 0xfed1, 0xff78, 0xffdd, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffdf, 0xffdf, 0xffdf, 0xffdf, 0xffbe, 0xf6f5, 0xf62c, 0xee2e, 0x3163, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x3162, 0x6aa5, 0x93a6, 0xac46, 0xccc6, 0xdd47, 0xe567, 0xdd46, 0xe546, 0xcd09, 0x41c4, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x2901, 0xbc86, 0xe587, 0xe5aa, 0xe5ec, 0xe5a9, 0xe568, 0xc4c7, 0x93a6, 0x5a24, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xdd6a, 0xf60c, 0xf6f7, 0xf77c, 0xf79e, 0xf7be, 0xf7be, 0xf7be, 0xf7be, 0xf7be, 0xffde, 0xffde, 0xffbd, 0xff16, 0xfed2, 0xfef3, 0xff79, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffb9, 0xff32, 0xff12, 0xaced, 0xacec, 0xff11, 0xfed0, 0xff75, 0xfffc, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xfffd, 0xff54, 0xfeb0, 0x41e5, 0x0000, 0x0000, 0x39a4, 0xbccb, 0xfe8f, 0xfe8f, 0xff14, 0xffbb, 0xfffe, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffdf, 0xffdf, 0xffdf, 0xffbe, 0xf6f5, 0xf62c, 0xf64d, 0x4a05, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x3983, 0x6ac4, 0x9385, 0xac25, 0xccc6, 0xc4ea, 0x41c4, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x20c1, 0xac26, 0xe567, 0xe567, 0xdd47, 0xbc87, 0x8b86, 0x49c3, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x41c3, 0xedeb, 0xf64e, 0xf718, 0xf79d, 0xf7be, 0xf7be, 0xf7be, 0xf7be, 0xf7be, 0xffbe, 0xffbd, 0xff59, 0xfeb1, 0xfe6e, 0xfe6d, 0xfe8e, 0xff14, 0xffdd, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xfffe, 0xff55, 0xfef0, 0xde53, 0x2103, 0x0000, 0xacee, 0xff11, 0xff11, 0xff75, 0xfffd, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xfffd, 0xff11, 0xe60e, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x7327, 0xe5ee, 0xfe8f, 0xfed1, 0xff57, 0xffde, 0xffff, 0xffff, 0xffff, 0xffff, 0xffdf, 0xffdf, 0xffdf, 0xffbe, 0xf6f6, 0xf64d, 0xf64d, 0x62a6, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x41a3, 0x41e5, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x9be6, 0xdd27, 0xb446, 0x8324, 0x41a2, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x7b05, 0xf5eb, 0xf690, 0xf739, 0xf79d, 0xf7be, 0xf7be, 0xf7be, 0xf7be, 0xffbd, 0xff7a, 0xfef4, 0xfe6e, 0xfe4d, 0xf66f, 0xee0d, 0xfe6e, 0xfed1, 0xff78, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xff97, 0xff12, 0xf713, 0x62e8, 0x0000, 0x0000, 0x0000, 0xad0e, 0xff32, 0xff11, 0xff75, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xfffc, 0xfef1, 0xc54d, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x3163, 0xb4ab, 0xfe6e, 0xfeaf, 0xfef3, 0xffbb, 0xffde, 0xffff, 0xffff, 0xffff, 0xffdf, 0xffdf, 0xffde, 0xff37, 0xf66e, 0xf64d, 0x7b26, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x41a3, 0x72e5, 0x3121, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x9be7, 0xf60c, 0xf6b3, 0xf75b, 0xf79d, 0xf7be, 0xf7be, 0xf7be, 0xff7b, 0xfef4, 0xfe6f, 0xfe4d, 0xfe90, 0xd5af, 0x6ae8, 0x7b48, 0xfeb0, 0xfe8e, 0xff14, 0xfffe, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xfffb, 0xff33, 0xff33, 0xa4ef, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xad0e, 0xff11, 0xff12, 0xff75, 0xfffe, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xfffc, 0xfef1, 0xa48c, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x6ac6, 0xddcd, 0xfe8e, 0xfeb0, 0xff58, 0xffdd, 0xffff, 0xffff, 0xffff, 0xffdf, 0xffde, 0xff37, 0xf66f, 0xf64d, 0x8b88, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xbca8, 0xf60c, 0xf6f6, 0xf77c, 0xf7be, 0xf7be, 0xf77c, 0xf716, 0xf66f, 0xfe4d, 0xfe4d, 0xe610, 0x83aa, 0x18a2, 0x0000, 0x0000, 0xcd8f, 0xfe6e, 0xfed1, 0xff98, 0xfffe, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xfffd, 0xff54, 0xff11, 0xd674, 0x2123, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xad0e, 0xff11, 0xff11, 0xff75, 0xfffe, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffb9, 0xfef1, 0x7b69, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x2943, 0xa449, 0xf64e, 0xfe8f, 0xff14, 0xff9b, 0xfffe, 0xffff, 0xffdf, 0xffdf, 0xff37, 0xfe8f, 0xf64d, 0x9be8, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xd54a, 0xf62d, 0xf75a, 0xf79d, 0xf77c, 0xf738, 0xf691, 0xfe4d, 0xfe4d, 0xee50, 0xa46c, 0x2943, 0x0000, 0x0000, 0x0000, 0x0000, 0x62a7, 0xfe8f, 0xfeaf, 0xfef2, 0xffdd, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xfffe, 0xffb8, 0xfef1, 0xf6f3, 0x62e9, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xad0d, 0xff11, 0xff11, 0xff97, 0xfffe, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xfffd, 0xff97, 0xfef2, 0x41e5, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x6286, 0xd58d, 0xfe6e, 0xfed1, 0xff37, 0xffbd, 0xffde, 0xffdf, 0xff79, 0xfeb1, 0xfe4d, 0xac49, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x41a3, 0xedeb, 0xf64e, 0xf75a, 0xf75a, 0xf6d4, 0xf62d, 0xf62d, 0xf64f, 0xb4ed, 0x4a06, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xbd2e, 0xfeaf, 0xfeb0, 0xff77, 0xfffe, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xfffb, 0xff33, 0xff32, 0xa4cf, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xaced, 0xff32, 0xff12, 0xffb8, 0xfffe, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xfffd, 0xff96, 0xe650, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x20e2, 0x9c09, 0xf62e, 0xfe8e, 0xfed1, 0xff9c, 0xffde, 0xff79, 0xfed2, 0xfe4d, 0xb48a, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x72e5, 0xf60c, 0xf66f, 0xf6b2, 0xf66f, 0xf62c, 0xf66e, 0xcd8e, 0x6ae8, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x4a06, 0xf690, 0xfeaf, 0xff12, 0xffdc, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xfffc, 0xff76, 0xff32, 0xd652, 0x18c2, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xad0e, 0xff32, 0xff32, 0xffb8, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xfffc, 0xff75, 0xc56e, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x5205, 0xcd2b, 0xfe6e, 0xfeb0, 0xff36, 0xff36, 0xfed2, 0xfe4d, 0xc4ea, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x9bc7, 0xf60b, 0xf60b, 0xf60b, 0xf62c, 0xddce, 0x838a, 0x18a2, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xacad, 0xfeb0, 0xfed0, 0xffb9, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xff98, 0xff11, 0xf714, 0x5ac8, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xad0e, 0xff31, 0xff53, 0xffb8, 0xffff, 0xffff, 0xffff, 0xffff, 0xfffb, 0xff53, 0xa4ac, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x8ba8, 0xeded, 0xfe6d, 0xfe8f, 0xfe8f, 0xfe4d, 0xcd2b, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xb489, 0xf60b, 0xf60c, 0xe60e, 0x9c2a, 0x2943, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x3184, 0xee2f, 0xfed0, 0xff33, 0xffdb, 0xffff, 0xffff, 0xffff, 0xffff, 0xffda, 0xff55, 0xff75, 0x9ccf, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xad0d, 0xff32, 0xff53, 0xffb8, 0xffff, 0xffff, 0xffff, 0xffda, 0xff33, 0x7b89, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x49e4, 0xc4eb, 0xfe4d, 0xfe4d, 0xfe4d, 0xdd6b, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xd54b, 0xee0e, 0xb4ab, 0x41e5, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x940b, 0xfef1, 0xfef1, 0xff98, 0xfffe, 0xffff, 0xffff, 0xfffe, 0xff76, 0xff53, 0xd654, 0x18c2, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xad0d, 0xff32, 0xff33, 0xffd8, 0xffff, 0xfffd, 0xffb8, 0xff13, 0x41e5, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x7b27, 0xe5cc, 0xfe4d, 0xe5ed, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x39c7, 0xc5b4, 0x6ae7, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x2103, 0xde0f, 0xfef1, 0xff34, 0xffdb, 0xffff, 0xffff, 0xff97, 0xff32, 0xf736, 0x52a8, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xaced, 0xff32, 0xff32, 0xffb7, 0xff96, 0xff32, 0xe691, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x3983, 0xb48a, 0xee2f, 0x2103, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x18c3, 0x18c2, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x7348, 0xff12, 0xfef0, 0xff77, 0xfffe, 0xfffc, 0xff33, 0xff74, 0x9c8e, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xad0d, 0xff33, 0xff32, 0xff32, 0xff11, 0xc58e, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x7329, 0x2944, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xcdb0, 0xfed0, 0xff11, 0xff33, 0xff32, 0xff33, 0xd655, 0x18c2, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xad0e, 0xff32, 0xff32, 0xff11, 0xa48c, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x62a7, 0xfed1, 0xfef1, 0xfef1, 0xff12, 0xf734, 0x5268, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xad0d, 0xff53, 0xff32, 0x7b68, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xb52e, 0xff11, 0xff11, 0xff75, 0x948e, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xad0e, 0xfef1, 0x41e5, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x4a05, 0xf6b0, 0xff33, 0xce12, 0x18c2, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x940a, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xa48c, 0xef15, 0x4a47, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x2964, 0x73ac, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
};
|
||||
#define banner_pixel 16200
|
||||
#define MAXR 31
|
||||
#define MINR 0
|
||||
#define MAXG 63
|
||||
#define MING 0
|
||||
#define MAXB 31
|
||||
#define MINB 0
|
||||
@@ -1,47 +0,0 @@
|
||||
/*
|
||||
* 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 <sys/utsname.h>
|
||||
#include <stdio.h>
|
||||
|
||||
int _cpu_detect_asm() {
|
||||
struct utsname name;
|
||||
|
||||
uname(&name);
|
||||
if (!strcmp(name.machine, "i386")) return 3;
|
||||
if (!strcmp(name.machine, "i486")) return 4;
|
||||
if (!strcmp(name.machine, "i586")) return 5;
|
||||
if (!strcmp(name.machine, "i686")) return 6;
|
||||
fprintf(stderr, "Couldn't determine cpu type. Using i586\n");
|
||||
return 5;
|
||||
}
|
||||
|
||||
void single_precision_asm() {
|
||||
asm("push %eax \n fnclex \n fstcw (%esp) \n movl (%esp), %eax \n "
|
||||
"and $0x0000fcff, %eax \n movl %eax, (%esp) \n fldcw (%esp) \n pop %eax");
|
||||
}
|
||||
|
||||
|
||||
void double_precision_asm() {
|
||||
asm("push %eax \n fnclex \n fstcw (%esp) \n movw (%esp), %eax \n "
|
||||
"and $0x0000fcff, %eax \n or $0x000002ff, %eax \n mov %eax, (%esp) \n "
|
||||
"fldcw (%esp) \n pop %eax");
|
||||
}
|
||||
|
||||
@@ -1,127 +0,0 @@
|
||||
#
|
||||
# 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
|
||||
#
|
||||
# $Header$
|
||||
# $Log$
|
||||
# Revision 1.1.1.1 1999/12/07 21:49:08 joseph
|
||||
# Initial checkin into SourceForge.
|
||||
#
|
||||
#
|
||||
# 2 3/04/97 9:10p Dow
|
||||
# Neutered mutiplatform multiheaded monster.
|
||||
#
|
||||
#
|
||||
|
||||
.file "cpudtect.s"
|
||||
|
||||
# 586P
|
||||
# model FLAT,C
|
||||
|
||||
# Data for data segment goes here
|
||||
# DATA SEGMENT DWORD USE32 PUBLIC DATA;
|
||||
# DATA ENDS
|
||||
|
||||
# Some useful constants
|
||||
# CPU Type
|
||||
CPUTypeUnknown .ASSIGNA 0xffffffff
|
||||
CPUTypePrePent .ASSIGNA 4
|
||||
CPUTypeP5 .ASSIGNA 5
|
||||
CPUTypeP6 .ASSIGNA 6
|
||||
|
||||
# References to external data:
|
||||
|
||||
#_TEXT SEGMENT
|
||||
#
|
||||
# _cpu_detect_asm - detect the type of CPU
|
||||
#
|
||||
# USAGE:
|
||||
#
|
||||
# int __cdecl _cpu_detect_asm(void);
|
||||
#
|
||||
# returns 4 for non-pen
|
||||
|
||||
.text
|
||||
.align 4
|
||||
.globl _cpu_detect_asm
|
||||
_cpu_detect_asm:
|
||||
P6Stuff:
|
||||
pusha # save all regs.
|
||||
|
||||
# First, determine whether CPUID instruction is available.
|
||||
# If it's not, then it's a 386 or 486.
|
||||
pushf # push original EFLAGS.
|
||||
pop %eax # pop into eax
|
||||
mov %eax, %ecx # save original EFLAGS in ecx
|
||||
xor $0x200000, %eax # flip ID bit in EFLAGS
|
||||
push %eax # put it back on stack
|
||||
popf # pop into EFLAGS
|
||||
pushf # get EFLAGS back
|
||||
pop %eax # into eax
|
||||
xor %ecx, %eax # check to see if we could toggle ID
|
||||
jz NotPentium # Sorry, not P5 or P6.
|
||||
|
||||
#
|
||||
# Now determine whether it's an intel P6 CPU.
|
||||
#
|
||||
## Is it an Intel CPU?
|
||||
xor %eax, %eax # eax = 0.
|
||||
cpuid # get cpuid
|
||||
xor $0x756e6547, %ebx # "Genu"
|
||||
jnz NotIntel
|
||||
xor $0x49656e69, %edx # "ineI"
|
||||
jnz NotIntel
|
||||
xor $0x6c65746e, %ecx # "ntel"
|
||||
jnz NotIntel #
|
||||
## Verifying architecture family
|
||||
mov $1, %eax
|
||||
cpuid # get family/model/stepping
|
||||
shr $8, %eax # rid of model & stepping number
|
||||
and $0xf, %eax # use only family
|
||||
cmp $6, %eax
|
||||
jl IsP5 # It's a P5
|
||||
## Else it's a P6
|
||||
#
|
||||
# Intel P6 processor.
|
||||
# Make sure it supports Memory Type Range Request registers
|
||||
#
|
||||
IsP6:
|
||||
popa
|
||||
mov $6, %eax #
|
||||
ret # return
|
||||
|
||||
IsP5:
|
||||
popa
|
||||
mov $5, %eax #
|
||||
ret
|
||||
|
||||
NotPentium:
|
||||
popa
|
||||
mov $4, %eax
|
||||
ret
|
||||
|
||||
NotIntel:
|
||||
popa
|
||||
mov $0xffffffff, %eax
|
||||
ret
|
||||
|
||||
.L_end__cpu_detect_asm:
|
||||
.size _cpu_detect_asm,.L_end__cpu_detect_asm-_cpu_detect_asm
|
||||
.END
|
||||
|
||||
|
||||
@@ -1,163 +0,0 @@
|
||||
;;
|
||||
;; 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
|
||||
;;
|
||||
;; $Header$
|
||||
;; $Log$
|
||||
;
|
||||
; 4 5/28/97 8:23a Peter
|
||||
; Merge w/ original glide source
|
||||
;
|
||||
; 2 3/04/97 9:10p Dow
|
||||
; Neutered mutiplatform multiheaded monster.
|
||||
;;
|
||||
;;
|
||||
|
||||
TITLE cpudtect.asm
|
||||
|
||||
.586P
|
||||
.model FLAT,C ; Flat memory, mangle publics with leading '_'
|
||||
|
||||
;; Data for data segment goes here
|
||||
;_DATA SEGMENT DWORD USE32 PUBLIC 'DATA';
|
||||
;_DATA ENDS
|
||||
|
||||
;;; Some useful constants
|
||||
; CPU Type
|
||||
CPUTypeUnknown = 0ffffffffh
|
||||
CPUTypePrePent = 4h
|
||||
CPUTypeP5 = 5h
|
||||
CPUTypeP6 = 6h
|
||||
|
||||
;;; References to external data:
|
||||
|
||||
_TEXT SEGMENT
|
||||
;;
|
||||
;; _cpu_detect_asm - detect the type of CPU
|
||||
;;
|
||||
;; USAGE:
|
||||
;;
|
||||
;; int __cdecl _cpu_detect_asm(void);
|
||||
;;
|
||||
;; returns 4 for non-pen
|
||||
|
||||
PUBLIC _cpu_detect_asm
|
||||
_cpu_detect_asm PROC NEAR
|
||||
P6Stuff:
|
||||
.586
|
||||
pushad ; save all regs.
|
||||
|
||||
; First, determine whether CPUID instruction is available.
|
||||
; If it's not, then it's a 386 or 486.
|
||||
pushfd ; push original EFLAGS.
|
||||
pop eax ; pop into eax
|
||||
mov ecx, eax ; save original EFLAGS in ecx
|
||||
xor eax, 0200000h ; flip ID bit in EFLAGS
|
||||
push eax ; put it back on stack
|
||||
popfd ; pop into EFLAGS
|
||||
pushfd ; get EFLAGS back
|
||||
pop eax ; into eax
|
||||
xor eax, ecx ; check to see if we could toggle ID
|
||||
jz NotPentium ; Sorry, not P5 or P6.
|
||||
|
||||
;
|
||||
; Now determine whether it's an intel P6 CPU.
|
||||
;
|
||||
;; Is it an Intel CPU?
|
||||
xor eax, eax ; eax = 0.
|
||||
cpuid ; get cpuid
|
||||
xor ebx, 0756e6547h ; "Genu"
|
||||
jnz NotIntel
|
||||
xor edx, 049656e69h ; "ineI"
|
||||
jnz NotIntel
|
||||
xor ecx, 06c65746eh ; "ntel"
|
||||
jnz NotIntel ;
|
||||
;; Verifying architecture family
|
||||
mov eax, 1
|
||||
cpuid ; get family/model/stepping
|
||||
shr eax, 8 ; rid of model & stepping number
|
||||
and eax, 0fh ; use only family
|
||||
cmp eax, 6
|
||||
jl IsP5 ; It's a P5
|
||||
;; Else it's a P6
|
||||
;
|
||||
; Intel P6 processor.
|
||||
; Make sure it supports Memory Type Range Request registers
|
||||
;
|
||||
IsP6:
|
||||
popad
|
||||
mov eax, 6 ;
|
||||
ret ; return
|
||||
|
||||
IsP5:
|
||||
popad
|
||||
mov eax, 5 ;
|
||||
ret
|
||||
|
||||
NotPentium:
|
||||
popad
|
||||
mov eax, 4
|
||||
ret
|
||||
|
||||
NotIntel:
|
||||
popad
|
||||
mov eax, 0ffffffffh
|
||||
ret
|
||||
|
||||
_cpu_detect_asm ENDP
|
||||
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; this routine sets the precision to single
|
||||
; which effects all adds, mults, and divs
|
||||
align 4 ;
|
||||
PUBLIC single_precision_asm
|
||||
single_precision_asm PROC NEAR
|
||||
.586
|
||||
push eax ; make room
|
||||
fnclex ; clear pending exceptions
|
||||
fstcw WORD PTR [esp]
|
||||
mov eax, DWORD PTR [esp]
|
||||
and eax, 0000fcffh ; clear bits 9:8
|
||||
mov DWORD PTR [esp], eax
|
||||
fldcw WORD PTR [esp]
|
||||
pop eax
|
||||
ret 0
|
||||
single_precision_asm ENDP
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; this routine sets the precision to double
|
||||
; which effects all adds, mults, and divs
|
||||
align 4 ;
|
||||
PUBLIC double_precision_asm
|
||||
double_precision_asm PROC NEAR
|
||||
.586
|
||||
push eax ; make room
|
||||
fnclex ; clear pending exceptions
|
||||
fstcw WORD PTR [esp]
|
||||
mov eax, DWORD PTR [esp]
|
||||
and eax, 0000fcffh ; clear bits 9:8
|
||||
or eax, 000002ffh ; set 9:8 to 10
|
||||
mov DWORD PTR [esp], eax
|
||||
fldcw WORD PTR [esp]
|
||||
pop eax
|
||||
ret 0
|
||||
double_precision_asm ENDP
|
||||
|
||||
_TEXT ENDS
|
||||
END
|
||||
@@ -1,572 +0,0 @@
|
||||
/*
|
||||
** 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
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
**
|
||||
** 16 2/20/98 11:00a Peter
|
||||
** removed glide3 from glid2 tree
|
||||
*
|
||||
* 15 12/17/97 4:45p Peter
|
||||
* groundwork for CrybabyGlide
|
||||
*
|
||||
* 14 12/15/97 5:51p Atai
|
||||
* disable obsolete glide2 api for glide3
|
||||
*
|
||||
* 13 12/08/97 12:06p Atai
|
||||
* change prototype for grDrawPoint, grDrawLine, grDrawTriangel
|
||||
*
|
||||
* 12 11/18/97 4:36p Peter
|
||||
* chipfield stuff cleanup and w/ direct writes
|
||||
*
|
||||
* 11 11/17/97 4:55p Peter
|
||||
* watcom warnings/chipfield stuff
|
||||
*
|
||||
* 10 11/03/97 3:43p Peter
|
||||
* h3/cvg cataclysm
|
||||
*
|
||||
* 9 10/27/97 1:16p Peter
|
||||
* fixed silliness
|
||||
*
|
||||
* 8 10/27/97 11:10a Peter
|
||||
* starting cleanup
|
||||
*
|
||||
* 7 9/15/97 7:31p Peter
|
||||
* more cmdfifo cleanup, fixed normal buffer clear, banner in the right
|
||||
* place, lfb's are on, Hmmmm.. probably more
|
||||
*
|
||||
* 6 9/04/97 3:32p Peter
|
||||
* starting grouping serial reg writes
|
||||
*
|
||||
* 5 6/06/97 10:47a Peter
|
||||
* texture downloading, fixed 640x480 dimension, changed cvg dep to be the
|
||||
* same as sst1
|
||||
*
|
||||
* 4 5/27/97 1:16p Peter
|
||||
* Basic cvg, w/o cmd fifo stuff.
|
||||
*
|
||||
* 3 5/21/97 6:04a Peter
|
||||
*
|
||||
* 2 3/04/97 9:08p Dow
|
||||
*
|
||||
* 1 12/23/96 1:39p Dow
|
||||
* Changes for multiplatform
|
||||
**
|
||||
*/
|
||||
|
||||
/* Implements multipass drawing */
|
||||
|
||||
#include <3dfx.h>
|
||||
#define FX_DLL_DEFINITION
|
||||
#include <fxdll.h>
|
||||
#include <glide.h>
|
||||
#include "fxglide.h"
|
||||
#include "gump.h"
|
||||
|
||||
/* gump.c */
|
||||
extern GrMPState _gumpState;
|
||||
|
||||
/*
|
||||
** _gumpTexCombineFunction
|
||||
**
|
||||
** Sets the texture combine function. For a dual TMU system this function
|
||||
** will configure the TEXTUREMODE registers as appropriate. For a
|
||||
** single TMU system this function will configure TEXTUREMODE if
|
||||
** possible, or defer operations until grDrawTriangle() is called.
|
||||
*/
|
||||
GR_DDFUNC(_gumpTexCombineFunction, void, (int virtual_tmu))
|
||||
{
|
||||
#define FN_NAME "_gumpTexCombineFunction"
|
||||
FxU32 texmode;
|
||||
GrMPTextureCombineFnc_t tc;
|
||||
|
||||
GR_BEGIN_NOFIFOCHECK("_gumpTexCombineFunction",99);
|
||||
GDBG_INFO_MORE(gc->myLevel,"(%d)\n",virtual_tmu);
|
||||
|
||||
texmode = gc->state.tmu_config[0].textureMode;
|
||||
texmode &= ~(SST_TCOMBINE | SST_TACOMBINE);
|
||||
tc = _gumpState.tc_fnc;
|
||||
|
||||
switch (tc) {
|
||||
case GR_MPTEXTURECOMBINE_ADD:
|
||||
/* tmu0: other + local */
|
||||
/* tmu1: local */
|
||||
/* pass0(tm0): local */
|
||||
/* pass1(tm1): local */
|
||||
if (virtual_tmu == 0) {
|
||||
texmode |= (SST_TC_REPLACE | SST_TCA_REPLACE);
|
||||
} else {
|
||||
texmode |= (SST_TC_REPLACE | SST_TCA_REPLACE);
|
||||
}
|
||||
break;
|
||||
|
||||
case GR_MPTEXTURECOMBINE_MULTIPLY:
|
||||
/* tmu0: other * local */
|
||||
/* tmu1: local */
|
||||
/* pass0(tm0): local */
|
||||
/* pass1(tm1): local */
|
||||
if (virtual_tmu == 0) {
|
||||
texmode |= (SST_TC_REPLACE | SST_TCA_REPLACE);
|
||||
} else {
|
||||
texmode |= (SST_TC_REPLACE | SST_TCA_REPLACE);
|
||||
}
|
||||
break;
|
||||
|
||||
case GR_MPTEXTURECOMBINE_DETAIL0:
|
||||
/* tmu0: (other - local) * lod + local */
|
||||
/* = lod * other + (1 - lod) * local */
|
||||
/* tmu1: local */
|
||||
/* pass0(tm0): (-local) * lod + local */
|
||||
/* = (1 - lod) * local */
|
||||
/* pass1(tm1): (-local) * (1 - lod) + local */
|
||||
/* = lod * local */
|
||||
if (virtual_tmu == 0) {
|
||||
texmode |= (SST_TC_BLEND_LOD | SST_TCA_BLEND_LOD |
|
||||
SST_TC_ZERO_OTHER | SST_TCA_ZERO_OTHER);
|
||||
} else {
|
||||
texmode |= (SST_TC_BLEND_LOD | SST_TCA_BLEND_LOD |
|
||||
SST_TC_REVERSE_BLEND | SST_TCA_REVERSE_BLEND |
|
||||
SST_TC_ZERO_OTHER | SST_TCA_ZERO_OTHER);
|
||||
}
|
||||
break;
|
||||
|
||||
case GR_MPTEXTURECOMBINE_DETAIL1:
|
||||
/* tmu0: (other - local) * (1 - lod) + local */
|
||||
/* = (1 - lod) * other + lod * local */
|
||||
/* tmu1: local */
|
||||
/* pass0(tm0): (-local) * (1 - lod) + local */
|
||||
/* = lod * local */
|
||||
/* pass1(tm1): (-local) * lod + local */
|
||||
/* = (1 - lod) * local */
|
||||
if (virtual_tmu == 0) {
|
||||
texmode |= (SST_TC_BLEND_LOD | SST_TCA_BLEND_LOD |
|
||||
SST_TC_REVERSE_BLEND | SST_TCA_REVERSE_BLEND |
|
||||
SST_TC_ZERO_OTHER | SST_TCA_ZERO_OTHER);
|
||||
} else {
|
||||
texmode |= (SST_TC_BLEND_LOD | SST_TCA_BLEND_LOD |
|
||||
SST_TC_ZERO_OTHER | SST_TCA_ZERO_OTHER);
|
||||
}
|
||||
break;
|
||||
|
||||
case GR_MPTEXTURECOMBINE_TRILINEAR0:
|
||||
/* tmu0: (other - local) * lodbfrac + local */
|
||||
/* = lodbfrac * other + (1 - lodbfrac) * local */
|
||||
/* tmu1: local */
|
||||
/* pass0(tm0): (-local) * lodbfrac + local */
|
||||
/* = (1 - lodbfrac) * local */
|
||||
/* pass1(tm1): (-local) * (1 - lodbfrac) + local */
|
||||
/* = lodbfrac * local */
|
||||
if (virtual_tmu == 0) {
|
||||
texmode |= (SST_TC_BLEND_LODFRAC | SST_TCA_BLEND_LODFRAC |
|
||||
SST_TC_ZERO_OTHER | SST_TCA_ZERO_OTHER);
|
||||
} else {
|
||||
texmode |= (SST_TC_BLEND_LODFRAC | SST_TCA_BLEND_LODFRAC |
|
||||
SST_TC_REVERSE_BLEND | SST_TCA_REVERSE_BLEND |
|
||||
SST_TC_ZERO_OTHER | SST_TCA_ZERO_OTHER);
|
||||
}
|
||||
break;
|
||||
|
||||
case GR_MPTEXTURECOMBINE_TRILINEAR1:
|
||||
/* tmu0: (other - local) * (1 - lodbfrac) + local
|
||||
= (1 - lodbfrac) * other + lodbfrac * local
|
||||
tmu1: local
|
||||
pass0(tm0): (-local) * (1 - lodbfrac) + local
|
||||
= lodbfrac * local
|
||||
pass1(tm1): (-local) * lodbfrac + local
|
||||
= (1 - lodbfrac) * local
|
||||
*/
|
||||
if (virtual_tmu == 0) {
|
||||
texmode |= (SST_TC_BLEND_LODFRAC | SST_TCA_BLEND_LODFRAC |
|
||||
SST_TC_REVERSE_BLEND | SST_TCA_REVERSE_BLEND |
|
||||
SST_TC_ZERO_OTHER | SST_TCA_ZERO_OTHER);
|
||||
} else {
|
||||
texmode |= (SST_TC_BLEND_LODFRAC | SST_TCA_BLEND_LODFRAC |
|
||||
SST_TC_ZERO_OTHER | SST_TCA_ZERO_OTHER);
|
||||
}
|
||||
break;
|
||||
|
||||
case GR_MPTEXTURECOMBINE_SUBTRACT:
|
||||
/*
|
||||
tmu0: other - local
|
||||
tmu1: local
|
||||
doesn't work, alpha blender can't subtract
|
||||
*/
|
||||
GrErrorCallback("_gumpTexCombineFunction: TEXTURE_SUBTRACT not supported", FXFALSE);
|
||||
return;
|
||||
break;
|
||||
|
||||
default:
|
||||
GrErrorCallback("_gumpTexCombineFunction: Unsupported function", FXFALSE);
|
||||
return;
|
||||
break;
|
||||
}
|
||||
|
||||
GR_SET_EXPECTED_SIZE(sizeof(FxU32), 1);
|
||||
{
|
||||
SstRegs* tmuRegs = SST_TMU(hw, 0);
|
||||
|
||||
GR_SET(eChipTMU0, tmuRegs, textureMode, texmode);
|
||||
}
|
||||
GR_CHECK_SIZE();
|
||||
|
||||
GR_END();
|
||||
#undef _gumpTexCombineFunction
|
||||
} /* _gumpTexCombineFunction */
|
||||
|
||||
GR_ENTRY(guMPDrawTriangle, void, (const GrVertex *a, const GrVertex *b, const GrVertex *c))
|
||||
{
|
||||
GR_BEGIN_NOFIFOCHECK("guMPDrawTriangle",98);
|
||||
GDBG_INFO_MORE(gc->myLevel,"(0x%x,0x%x,0x%x)\n",a,b,c);
|
||||
GR_CHECK_F(myName, !a || !b || !c, "NULL pointer passed");
|
||||
|
||||
/* check for multipass texture modes */
|
||||
/* xxx complex multipass mode checks should be moved into gtex/gglide */
|
||||
/* specific color combine modes use texture */
|
||||
/* this is equivalent to
|
||||
fbzColorPath & SST_ENTEXTREMAP
|
||||
cc_state & STATE_CC_REQUIRES_DECAL_STW */
|
||||
/* specific texture combine modes */
|
||||
/* xxx don't even check anymore, because you can't */
|
||||
|
||||
{
|
||||
/* check for not possible on one tmu modes */
|
||||
/* alpha blend enabled (grAlphaBlendMode)
|
||||
xxx some can work, with some cheats, even more
|
||||
low bit alpha switches between iterated and constant rgb
|
||||
(grAlphaControlsITRGBLighting)
|
||||
alpha test (grAlphaTestFunction)
|
||||
xxx actually, NEVER is ok too
|
||||
chromakey
|
||||
*/
|
||||
|
||||
if ((gc->state.fbi_config.alphaMode & SST_ENALPHABLEND) ||
|
||||
(gc->state.fbi_config.fbzColorPath & SST_LOCALSELECT_OVERRIDE_WITH_ATEX) ||
|
||||
(gc->state.fbi_config.alphaMode & SST_ENALPHAFUNC) ||
|
||||
(gc->state.fbi_config.fbzMode & SST_ENCHROMAKEY)) {
|
||||
GrErrorCallback("guMPDrawTriangle: Illegal state", FXFALSE);
|
||||
}
|
||||
|
||||
if (_gumpState.tc_fnc == GR_MPTEXTURECOMBINE_ADD ||
|
||||
_gumpState.tc_fnc == GR_MPTEXTURECOMBINE_DETAIL0 ||
|
||||
_gumpState.tc_fnc == GR_MPTEXTURECOMBINE_DETAIL1 ||
|
||||
_gumpState.tc_fnc == GR_MPTEXTURECOMBINE_TRILINEAR0 ||
|
||||
_gumpState.tc_fnc == GR_MPTEXTURECOMBINE_TRILINEAR1) {
|
||||
/* render pass with all effects */
|
||||
/* select other texture map */
|
||||
/* set alpha blend to add to dest buffer */
|
||||
/* if depth buffering, save depth buffer function,
|
||||
set to z-equal */
|
||||
/* disable fog and color combine bias */
|
||||
/* render other pass */
|
||||
/* restore depth buffer function, restore alpha blend, enable fog
|
||||
and color combine bias */
|
||||
|
||||
FxU32 alphamode, alphamode_orig;
|
||||
FxU32 fbzcolorpath, fbzcolorpath_orig;
|
||||
FxU32 fbzmode, fbzmode_orig;
|
||||
FxU32 fogmode, fogmode_orig;
|
||||
|
||||
alphamode = alphamode_orig = gc->state.fbi_config.alphaMode;
|
||||
fbzcolorpath = fbzcolorpath_orig = gc->state.fbi_config.fbzColorPath;
|
||||
GR_CHECK_SIZE();
|
||||
|
||||
/* first pass */
|
||||
|
||||
/* tmu setup */
|
||||
guTexSource(_gumpState.mmid[0]);
|
||||
_gumpTexCombineFunction(0);
|
||||
|
||||
/* render first pass */
|
||||
grDrawTriangle(a, b, c);
|
||||
|
||||
/* second pass */
|
||||
|
||||
/* xxx may need to copy texture coordinates, see
|
||||
grTexCombineFunction's second parameter. if so,
|
||||
we have to disable the second coordinate when drawing. */
|
||||
|
||||
/* tmu setup */
|
||||
guTexSource(_gumpState.mmid[1]);
|
||||
_gumpTexCombineFunction(1);
|
||||
|
||||
{
|
||||
const FxBool depthP = ((gc->state.fbi_config.fbzMode & SST_ENDEPTHBUFFER) == SST_ENDEPTHBUFFER);
|
||||
const FxBool fogP = ((gc->state.fbi_config.fogMode & SST_ENFOGGING) == SST_ENFOGGING);
|
||||
const FxU32 regCount = (2 + depthP + fogP);
|
||||
const FxU32 regMask = (0x05 | MaskSelect(depthP, 0x08UL) | MaskSelect(fogP, 0x02UL));
|
||||
|
||||
REG_GROUP_BEGIN(BROADCAST_ID, fbzColorPath, regCount, regMask);
|
||||
{
|
||||
/* disable biasing in color combine */
|
||||
/* this can change the parameters output */
|
||||
/* xxx the equivalent of GR_COLORCOMBINE_CCRGB_BLEND_ITRGB_ON_TEXALPHA
|
||||
does not work, you need to do this instead of below.
|
||||
|
||||
if (gc->state.cc_fnc == GR_COLORCOMBINE_CCRGB_BLEND_ITRGB_ON_TEXALPHA)
|
||||
{
|
||||
fbzcolorpath &= ~SST_CC_ADD_CLOCAL;
|
||||
}
|
||||
*/
|
||||
|
||||
fbzcolorpath &= ~(SST_CC_ADD_CLOCAL | SST_CC_ADD_ALOCAL | SST_CC_SUB_CLOCAL);
|
||||
REG_GROUP_SET(hw, fbzColorPath, fbzcolorpath);
|
||||
|
||||
/* disable (fogta * fogColor) bias */
|
||||
/* xxx setting ADD_FOG with fog disabled is harmless */
|
||||
if (fogP) {
|
||||
fogmode = fogmode_orig = gc->state.fbi_config.fogMode;
|
||||
fogmode |= SST_FOGADD;
|
||||
|
||||
REG_GROUP_SET(hw, fogMode, fogmode);
|
||||
}
|
||||
|
||||
/* enable alpha blend to add to destination buffers */
|
||||
alphamode &= ~(SST_RGBSRCFACT | SST_RGBDSTFACT | SST_ASRCFACT | SST_ADSTFACT);
|
||||
alphamode |= (SST_ENALPHABLEND |
|
||||
(SST_A_ONE << SST_RGBSRCFACT_SHIFT) |
|
||||
(SST_A_ONE << SST_RGBDSTFACT_SHIFT) |
|
||||
(SST_A_ONE << SST_ASRCFACT_SHIFT) |
|
||||
(SST_A_ONE << SST_ADSTFACT_SHIFT));
|
||||
|
||||
REG_GROUP_SET(hw, alphaMode, alphamode);
|
||||
|
||||
/* if depth buffering, set to z= mode and disable writes */
|
||||
if (depthP) {
|
||||
fbzmode = fbzmode_orig = gc->state.fbi_config.fbzMode;
|
||||
|
||||
fbzmode &= ~(SST_ZAWRMASK | SST_ZFUNC);
|
||||
fbzmode |= GR_CMP_EQUAL;
|
||||
|
||||
REG_GROUP_SET(hw, fbzMode, fbzmode);
|
||||
}
|
||||
}
|
||||
REG_GROUP_END();
|
||||
|
||||
/* render other pass */
|
||||
grDrawTriangle(a, b, c);
|
||||
|
||||
/* restore */
|
||||
REG_GROUP_BEGIN(BROADCAST_ID, fbzColorPath, regCount, regMask);
|
||||
{
|
||||
/* restore ccu/acu state */
|
||||
REG_GROUP_SET(hw, fbzColorPath, fbzcolorpath_orig);
|
||||
|
||||
/* restore fog state */
|
||||
if (fogP) REG_GROUP_SET(hw, fogMode, fogmode_orig);
|
||||
|
||||
/* restore alpha blending state */
|
||||
REG_GROUP_SET(hw, alphaMode, alphamode_orig);
|
||||
|
||||
/* restore depth buffer state */
|
||||
if (depthP) REG_GROUP_SET(hw, fbzMode, fbzmode_orig);
|
||||
}
|
||||
REG_GROUP_END();
|
||||
}
|
||||
|
||||
goto all_done;
|
||||
} else if (_gumpState.tc_fnc == GR_MPTEXTURECOMBINE_MULTIPLY) {
|
||||
/* disable fog and color combine bias */
|
||||
/* render pass with all other effects */
|
||||
/* select other texture map */
|
||||
/* set alpha blend to multiply to dest buffer */
|
||||
/* if depth buffering, save depth buffer function,
|
||||
set to z-equal */
|
||||
/* disable fog and color combine factor */
|
||||
/* render other pass */
|
||||
/* if fog or color combine w/bias */
|
||||
/* disable tmu */
|
||||
/* set alpha blend to add to dest buffer */
|
||||
/* enable fog and color combine bias */
|
||||
/* render bias pass */
|
||||
/* restore depth buffer function, restore alpha blend, enable fog
|
||||
and color combine bias */
|
||||
|
||||
FxU32 alphamode, alphamode_orig;
|
||||
FxU32 fbzcolorpath, fbzcolorpath_orig;
|
||||
FxU32 fbzmode, fbzmode_orig;
|
||||
FxU32 fogmode, fogmode_orig;
|
||||
|
||||
alphamode = alphamode_orig = gc->state.fbi_config.alphaMode;
|
||||
fbzcolorpath = fbzcolorpath_orig = gc->state.fbi_config.fbzColorPath;
|
||||
|
||||
/* first pass */
|
||||
|
||||
/* tmu setup */
|
||||
|
||||
guTexSource(_gumpState.mmid[0]);
|
||||
_gumpTexCombineFunction(0);
|
||||
|
||||
/* disable bias */
|
||||
{
|
||||
const FxBool depthP = ((gc->state.fbi_config.fbzMode & SST_ENDEPTHBUFFER) == SST_ENDEPTHBUFFER);
|
||||
const FxBool fogP = ((gc->state.fbi_config.fogMode & SST_ENFOGGING) == SST_ENFOGGING);
|
||||
const FxU32 regCount = (2 + depthP + fogP);
|
||||
const FxU32 regMask = (0x05 | MaskSelect(depthP, 0x08UL) | MaskSelect(fogP, 0x02UL));
|
||||
|
||||
REG_GROUP_BEGIN(BROADCAST_ID, fbzColorPath, (1 + fogP), (0x01UL | MaskSelect(fogP, 0x02UL)));
|
||||
{
|
||||
/* disable biasing in color combine */
|
||||
/* this can change the parameters output */
|
||||
/* xxx consult add path for switch version */
|
||||
/* xxx the equivalent of GR_COLORCOMBINE_CCRGB_BLEND_ITRGB_ON_TEXALPHA
|
||||
does not work, you need to do this instead of below.
|
||||
|
||||
if (gc->state.cc_fnc == GR_COLORCOMBINE_CCRGB_BLEND_ITRGB_ON_TEXALPHA)
|
||||
{
|
||||
fbzcolorpath &= ~SST_CC_ADD_CLOCAL;
|
||||
}
|
||||
*/
|
||||
|
||||
fbzcolorpath &= ~(SST_CC_ADD_CLOCAL | SST_CC_ADD_ALOCAL | SST_CC_SUB_CLOCAL);
|
||||
REG_GROUP_SET(hw, fbzColorPath, fbzcolorpath);
|
||||
|
||||
/* disable (fogta * fogColor) bias */
|
||||
/* xxx setting ADD_FOG with fog disabled is harmless */
|
||||
if (fogP) {
|
||||
fogmode = fogmode_orig = gc->state.fbi_config.fogMode;
|
||||
fogmode |= SST_FOGADD;
|
||||
|
||||
REG_GROUP_SET(hw, fogMode, fogmode);
|
||||
}
|
||||
}
|
||||
REG_GROUP_END();
|
||||
|
||||
/* render first pass */
|
||||
grDrawTriangle(a, b, c);
|
||||
|
||||
/* second pass */
|
||||
/* xxx may sometimes need to copy texture coordinates */
|
||||
|
||||
/* tmu setup */
|
||||
guTexSource(_gumpState.mmid[1]);
|
||||
_gumpTexCombineFunction(1);
|
||||
|
||||
REG_GROUP_BEGIN(BROADCAST_ID, fbzColorPath, regCount, regMask);
|
||||
{
|
||||
/* disable factor and bias in color combine--
|
||||
decal, except for the cases that need texture alpha */
|
||||
/* this can change the parameters output */
|
||||
fbzcolorpath = fbzcolorpath_orig;
|
||||
fbzcolorpath &= ~( SST_RGBSELECT |
|
||||
SST_LOCALSELECT |
|
||||
SST_CC_ZERO_OTHER |
|
||||
SST_CC_SUB_CLOCAL |
|
||||
SST_CC_MSELECT |
|
||||
SST_CC_REVERSE_BLEND |
|
||||
SST_CC_ADD_CLOCAL |
|
||||
SST_CC_ADD_ALOCAL |
|
||||
SST_CC_INVERT_OUTPUT |
|
||||
SST_CC_REVERSE_BLEND );
|
||||
|
||||
/* xxx the equivalent of GR_COLORCOMBINE_CCRGB_BLEND_ITRGB_ON_TEXALPHA
|
||||
does not work, you need to do this instead of below.
|
||||
|
||||
if ( gc->state.cc_fnc == GR_COLORCOMBINE_CCRGB_BLEND_ITRGB_ON_TEXALPHA )
|
||||
{
|
||||
xxx see implementation notes on why this isn't implemented yet
|
||||
GrErrorCallback("guDrawTriangleMP: "
|
||||
"MULTIPLY and BLEND_ITRGB_ON_TEXALPHA not implemented yet!", FXFALSE );
|
||||
goto all_done;
|
||||
}
|
||||
*/
|
||||
fbzcolorpath |= SST_RGBSEL_TMUOUT;
|
||||
REG_GROUP_SET(hw, fbzColorPath, fbzcolorpath);
|
||||
|
||||
/* disable fog */
|
||||
if (fogP) REG_GROUP_SET(hw, fogMode, 0);
|
||||
|
||||
/* enable alpha blend to multiply to destination buffers */
|
||||
/* xxx alpha component blender can only handle factors of
|
||||
0 and 1 */
|
||||
alphamode &= ~(SST_RGBSRCFACT | SST_RGBDSTFACT | SST_ASRCFACT | SST_ADSTFACT);
|
||||
alphamode |= (SST_ENALPHABLEND |
|
||||
(SST_A_COLOR << SST_RGBSRCFACT_SHIFT) |
|
||||
(SST_A_ZERO << SST_RGBDSTFACT_SHIFT) |
|
||||
(SST_A_ONE << SST_ASRCFACT_SHIFT) |
|
||||
(SST_A_ZERO << SST_ADSTFACT_SHIFT));
|
||||
|
||||
REG_GROUP_SET(hw, alphaMode, alphamode);
|
||||
|
||||
/* if depth buffering, set to z= mode and disable writes */
|
||||
if (depthP) {
|
||||
fbzmode = fbzmode_orig = gc->state.fbi_config.fbzMode;
|
||||
fbzmode &= ~(SST_ZAWRMASK | SST_ZFUNC);
|
||||
fbzmode |= GR_CMP_EQUAL;
|
||||
|
||||
REG_GROUP_SET(hw, fbzMode, fbzmode);
|
||||
}
|
||||
}
|
||||
REG_GROUP_END();
|
||||
|
||||
/* render second pass */
|
||||
grDrawTriangle(a, b, c);
|
||||
|
||||
/* if bias, third pass */
|
||||
if (fogP) {
|
||||
/* enable alpha blend to add to destination buffers */
|
||||
REG_GROUP_BEGIN(BROADCAST_ID, fogMode, 2, 0x03);
|
||||
{
|
||||
/* disable fog factor, leave fog bias enabled */
|
||||
/* xxx setting ADD_MULT with fog disabled is harmless */
|
||||
fogmode = fogmode_orig;
|
||||
fogmode |= SST_FOGMULT;
|
||||
REG_GROUP_SET(hw, fogMode, fogmode);
|
||||
|
||||
alphamode &= ~(SST_RGBSRCFACT | SST_RGBDSTFACT | SST_ASRCFACT | SST_ADSTFACT);
|
||||
alphamode |= (SST_ENALPHABLEND |
|
||||
(SST_A_ONE << SST_RGBSRCFACT_SHIFT) |
|
||||
(SST_A_ONE << SST_RGBDSTFACT_SHIFT) |
|
||||
(SST_A_ONE << SST_ASRCFACT_SHIFT) |
|
||||
(SST_A_ONE << SST_ADSTFACT_SHIFT));
|
||||
REG_GROUP_SET(hw, alphaMode, alphamode);
|
||||
}
|
||||
REG_GROUP_END();
|
||||
|
||||
/* render third pass */
|
||||
grDrawTriangle(a, b, c);
|
||||
}
|
||||
|
||||
REG_GROUP_BEGIN(BROADCAST_ID, fbzColorPath, regCount, regMask);
|
||||
{
|
||||
/* restore ccu/acu state */
|
||||
REG_GROUP_SET(hw, fbzColorPath, fbzcolorpath_orig);
|
||||
|
||||
/* restore fog state */
|
||||
if (fogP) REG_GROUP_SET(hw, fogMode, fogmode_orig);
|
||||
|
||||
/* restore alpha blending state */
|
||||
REG_GROUP_SET(hw, alphaMode, alphamode_orig);
|
||||
|
||||
/* restore depth buffer state */
|
||||
if (depthP) REG_GROUP_SET(hw, fbzMode, fbzmode_orig);
|
||||
}
|
||||
REG_GROUP_END();
|
||||
}
|
||||
|
||||
goto all_done;
|
||||
} else if (_gumpState.tc_fnc == GR_MPTEXTURECOMBINE_SUBTRACT) {
|
||||
GrErrorCallback("gumpDrawTriangle: GR_MPTEXCOMBINE_SUBTRACT not implemented", FXFALSE);
|
||||
goto all_done;
|
||||
}
|
||||
}
|
||||
|
||||
all_done:
|
||||
GR_END();
|
||||
}
|
||||
|
||||
@@ -1,407 +0,0 @@
|
||||
/*
|
||||
** 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
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
**
|
||||
** 40 6/23/98 5:38p Peter
|
||||
** lfb hinting
|
||||
**
|
||||
** 39 3/17/98 3:00p Peter
|
||||
** removed unused stats
|
||||
**
|
||||
** 38 3/02/98 7:22p Peter
|
||||
** moved internal function to where it is used
|
||||
**
|
||||
** 37 2/20/98 11:00a Peter
|
||||
** removed glide3 from glid2 tree
|
||||
**
|
||||
** 36 2/20/98 9:05a Peter
|
||||
** removed remnants of comdex grot
|
||||
**
|
||||
** 35 1/30/98 4:31p Peter
|
||||
** general clenaup
|
||||
**
|
||||
** 34 1/20/98 10:48a Atai
|
||||
** validate state in grGlideGetState
|
||||
*
|
||||
* 33 1/07/98 10:22a Peter
|
||||
* lod dithering env var
|
||||
*
|
||||
* 32 1/06/98 3:53p Atai
|
||||
* remove grHint, modify grLfbWriteRegion and grGet
|
||||
*
|
||||
* 31 12/17/97 4:05p Atai
|
||||
* added grChromaRange(), grGammaCorrecionRGB(), grRest(), and grGet()
|
||||
* functions
|
||||
*
|
||||
* 30 12/09/97 12:20p Peter
|
||||
* mac glide port
|
||||
*
|
||||
* 29 12/01/97 5:46p Peter
|
||||
* fixed variable names in swizzle
|
||||
*
|
||||
* 28 12/01/97 5:17p Peter
|
||||
*
|
||||
* 27 11/18/97 4:36p Peter
|
||||
* chipfield stuff cleanup and w/ direct writes
|
||||
*
|
||||
* 26 11/14/97 5:02p Peter
|
||||
* more comdex stuff
|
||||
*
|
||||
* 25 11/14/97 12:09a Peter
|
||||
* comdex thing and some other stuff
|
||||
*
|
||||
* 24 11/12/97 2:27p Peter
|
||||
*
|
||||
* 23 11/12/97 11:39a Dow
|
||||
* H3 Stuff
|
||||
*
|
||||
* 22 11/12/97 9:21a Dow
|
||||
* Changed CVG_FIFO to USE_PACKET_FIFO
|
||||
*
|
||||
* 21 11/04/97 4:00p Dow
|
||||
* Banshee Mods
|
||||
*
|
||||
* 20 11/03/97 3:43p Peter
|
||||
* h3/cvg cataclysm
|
||||
*
|
||||
* 19 10/16/97 3:40p Peter
|
||||
* packed rgb
|
||||
*
|
||||
* 18 9/20/97 10:53a Peter
|
||||
* keep track of palette stats
|
||||
*
|
||||
* 17 9/15/97 7:31p Peter
|
||||
* more cmdfifo cleanup, fixed normal buffer clear, banner in the right
|
||||
* place, lfb's are on, Hmmmm.. probably more
|
||||
*
|
||||
* 16 9/10/97 10:13p Peter
|
||||
* fifo logic from GaryT, non-normalized fp first cut
|
||||
*
|
||||
* 15 7/25/97 11:40a Peter
|
||||
* removed dHalf, change field name to match real use for cvg
|
||||
*
|
||||
* 14 7/08/97 2:48p Peter
|
||||
*
|
||||
* 13 6/30/97 3:20p Peter
|
||||
* error callback
|
||||
*
|
||||
* 12 6/23/97 4:43p Peter
|
||||
* cleaned up #defines etc for a nicer tree
|
||||
*
|
||||
**
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
#include <3dfx.h>
|
||||
#include <glidesys.h>
|
||||
|
||||
#define FX_DLL_DEFINITION
|
||||
#include <fxdll.h>
|
||||
#include <glide.h>
|
||||
#include "fxglide.h"
|
||||
|
||||
#include "rcver.h"
|
||||
static char glideIdent[] = "@#%" VERSIONSTR ;
|
||||
|
||||
/* the root of all EVIL */
|
||||
struct _GlideRoot_s GR_CDECL _GlideRoot;
|
||||
/* This is global to speed up the function call wrappers */
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
**
|
||||
*/
|
||||
void
|
||||
_grDisplayStats(void)
|
||||
{
|
||||
int frames = _GlideRoot.stats.bufferSwaps;
|
||||
|
||||
if (frames <= 0) frames = 1;
|
||||
gdbg_info(80,"GLIDE STATISTICS:\n");
|
||||
gdbg_info(80," triangles processed: %7d tris drawn: %7d\n",
|
||||
_GlideRoot.stats.trisProcessed, _GlideRoot.stats.trisDrawn);
|
||||
gdbg_info(80," buffer swaps: %7d tris/frame: %7d , %d\n",
|
||||
_GlideRoot.stats.bufferSwaps,
|
||||
_GlideRoot.stats.trisProcessed/frames,
|
||||
_GlideRoot.stats.trisDrawn/frames);
|
||||
gdbg_info(80," points: %7d pnts/frame: %7d\n",
|
||||
_GlideRoot.stats.pointsDrawn, _GlideRoot.stats.pointsDrawn/frames);
|
||||
gdbg_info(80," lines: %7d lines/frame: %7d\n",
|
||||
_GlideRoot.stats.linesDrawn, _GlideRoot.stats.linesDrawn/frames);
|
||||
gdbg_info(80," texture downloads: %7d texture bytes: %7d\n",
|
||||
_GlideRoot.stats.texDownloads, _GlideRoot.stats.texBytes);
|
||||
gdbg_info(80," palette downloads: %7d palette bytes: %7d\n",
|
||||
_GlideRoot.stats.palDownloads, _GlideRoot.stats.palBytes);
|
||||
gdbg_info(80," NCC downloads: %7d NCC bytes: %7d\n",
|
||||
_GlideRoot.stats.nccDownloads, _GlideRoot.stats.nccBytes);
|
||||
|
||||
#if USE_PACKET_FIFO
|
||||
gdbg_info(80,"\tCommandFifo:\n");
|
||||
gdbg_info(80,"\t\tWraps: %ld\n", _GlideRoot.stats.fifoWraps);
|
||||
if (_GlideRoot.stats.fifoWraps > 0) {
|
||||
gdbg_info(80,"\t\tAvg Drain Depth: %g\n",
|
||||
(double)_GlideRoot.stats.fifoWrapDepth / _GlideRoot.stats.fifoWraps);
|
||||
}
|
||||
gdbg_info(80,"\t\tStalls: %ld\n", _GlideRoot.stats.fifoStalls);
|
||||
if (_GlideRoot.stats.fifoStalls > 0) {
|
||||
gdbg_info(80,"\t\tAvg Stall Depth: %g\n",
|
||||
(double)_GlideRoot.stats.fifoStallDepth / _GlideRoot.stats.fifoStalls);
|
||||
}
|
||||
#endif /* CVG_FIFO */
|
||||
}
|
||||
|
||||
#if !USE_PACKET_FIFO
|
||||
/*
|
||||
** fifoFree is kept in bytes, each fifo entry is 8 bytes, but since there
|
||||
** are headers involved, we assume an average of 2 registers per 8 bytes
|
||||
** or 4 bytes of registers stored in every fifo entry
|
||||
*/
|
||||
void
|
||||
_grReCacheFifo(FxI32 n)
|
||||
{
|
||||
#if !(GLIDE_PLATFORM & GLIDE_HW_H3)
|
||||
GR_DCL_GC;
|
||||
gc->state.fifoFree = ((grSstStatus() >> SST_MEMFIFOLEVEL_SHIFT) & 0xffff)<<2;
|
||||
|
||||
#if 0
|
||||
gc->state.fifoFree -= gc->hwDep.sst1Dep.swFifoLWM + n;
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
FxI32 GR_CDECL
|
||||
_grSpinFifo(FxI32 n)
|
||||
{
|
||||
GR_DCL_GC;
|
||||
do {
|
||||
_grReCacheFifo(n);
|
||||
} while (gc->state.fifoFree < 0);
|
||||
|
||||
return gc->state.fifoFree;
|
||||
}
|
||||
#endif /* !USE_PACKET_FIFO */
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
**
|
||||
*/
|
||||
void
|
||||
_grSwizzleColor(GrColor_t *color)
|
||||
{
|
||||
GR_DCL_GC;
|
||||
FxU32 red, green, blue, alpha;
|
||||
|
||||
switch(gc->state.color_format) {
|
||||
case GR_COLORFORMAT_ARGB:
|
||||
break;
|
||||
|
||||
case GR_COLORFORMAT_ABGR:
|
||||
red = *color & 0x00ff;
|
||||
blue = (*color >> 16) & 0xff;
|
||||
*color &= 0xff00ff00;
|
||||
*color |= ((red << 16) | blue);
|
||||
break;
|
||||
|
||||
case GR_COLORFORMAT_RGBA:
|
||||
blue = (*color & 0x0000ff00) >> 8;
|
||||
green = (*color & 0x00ff0000) >> 16;
|
||||
red = (*color & 0xff000000) >> 24;
|
||||
alpha = (*color & 0x000000ff);
|
||||
*color = (alpha << 24) | (red << 16) | (green << 8) | blue;
|
||||
break;
|
||||
|
||||
case GR_COLORFORMAT_BGRA:
|
||||
blue = (*color & 0xff000000) >> 24;
|
||||
green = (*color & 0x00ff0000) >> 16;
|
||||
red = (*color & 0x0000ff00) >> 8;
|
||||
alpha = (*color & 0x000000ff);
|
||||
*color = (alpha << 24) | (red << 16) | (green << 8) | blue;
|
||||
break;
|
||||
|
||||
default:
|
||||
GR_ASSERT(0);
|
||||
break;
|
||||
}
|
||||
} /* _grSwizzleColor */
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
** grGlideGetVersion
|
||||
** NOTE: allow this to be called before grGlideInit()
|
||||
*/
|
||||
GR_DIENTRY(grGlideGetVersion, void, (char version[80]))
|
||||
{
|
||||
GDBG_INFO(87,"grGlideGetVersion(0x%x) => \"%s\"\n",version,glideIdent+3);
|
||||
GR_ASSERT(version != NULL);
|
||||
strcpy(version,glideIdent+3);
|
||||
} /* grGlideGetVersion */
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
** grGlideGetState
|
||||
*/
|
||||
GR_DIENTRY(grGlideGetState, void, (GrState *state))
|
||||
{
|
||||
GR_BEGIN_NOFIFOCHECK("grGlideGetState",87);
|
||||
GDBG_INFO_MORE(gc->myLevel,"(0x%x)\n",state);
|
||||
GR_ASSERT(state != NULL);
|
||||
|
||||
*state = gc->state;
|
||||
GR_END();
|
||||
} /* grGlideGetState */
|
||||
|
||||
#ifndef GLIDE_ALPHA
|
||||
/*---------------------------------------------------------------------------
|
||||
** grHints
|
||||
*/
|
||||
GR_DIENTRY(grHints, void, (GrHint_t hintType, FxU32 hints))
|
||||
{
|
||||
GR_BEGIN_NOFIFOCHECK("grHints",85);
|
||||
GDBG_INFO_MORE(gc->myLevel,"(%d,0x%x)\n",hintType,hints);
|
||||
|
||||
switch (hintType) {
|
||||
case GR_HINT_STWHINT:
|
||||
if (gc->state.paramHints != hints) {
|
||||
gc->state.paramHints = hints;
|
||||
_grUpdateParamIndex();
|
||||
}
|
||||
break;
|
||||
|
||||
case GR_HINT_FIFOCHECKHINT:
|
||||
/* swFifoLWM is kept internally in bytes, hints are in fifo entries */
|
||||
gc->state.checkFifo = hints;
|
||||
break;
|
||||
|
||||
case GR_HINT_FPUPRECISION:
|
||||
hints ? double_precision_asm() : single_precision_asm();
|
||||
break;
|
||||
|
||||
case GR_HINT_ALLOW_MIPMAP_DITHER:
|
||||
/* Regardless of the game hint, force the user selection */
|
||||
gc->state.allowLODdither = ((_GlideRoot.environment.texLodDither != 0) ||
|
||||
hints);
|
||||
break;
|
||||
|
||||
case GR_HINT_LFB_WRITE:
|
||||
{
|
||||
const FxU32 lfbRange = (((hints * gc->state.screen_height) + 0x1000UL) &
|
||||
~(0x1000UL - 1));
|
||||
|
||||
pciLinearRangeSetPermission((const FxU32)((const FxU8*)gc->base_ptr + 0x200000UL),
|
||||
0x200000UL,
|
||||
FXFALSE);
|
||||
pciLinearRangeSetPermission((const FxU32)gc->lfb_ptr,
|
||||
lfbRange,
|
||||
FXTRUE);
|
||||
pciLinearRangeSetPermission((const FxU32)((const FxU8*)gc->lfb_ptr + lfbRange),
|
||||
0x400000UL - lfbRange,
|
||||
FXFALSE);
|
||||
break;
|
||||
}
|
||||
|
||||
case GR_HINT_LFB_PROTECT:
|
||||
pciLinearRangeSetPermission((const FxU32)((const FxU8*)gc->base_ptr + 0x200000UL),
|
||||
0x200000UL,
|
||||
FXTRUE);
|
||||
pciLinearRangeSetPermission((const FxU32)gc->lfb_ptr,
|
||||
0x400000,
|
||||
FXFALSE);
|
||||
break;
|
||||
|
||||
case GR_HINT_LFB_RESET:
|
||||
pciLinearRangeSetPermission((const FxU32)gc->base_ptr,
|
||||
0x1000000UL,
|
||||
FXTRUE);
|
||||
break;
|
||||
|
||||
default:
|
||||
GR_CHECK_F(myName, 1, "invalid hints type");
|
||||
}
|
||||
GR_END();
|
||||
} /* grHints */
|
||||
#endif
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
** grGlideInit
|
||||
*/
|
||||
GR_DIENTRY(grGlideInit, void, (void))
|
||||
{
|
||||
GDBG_INIT();
|
||||
|
||||
GDBG_INFO(80,"grGlideInit()\n");
|
||||
_GlideInitEnvironment(); /* the main init code */
|
||||
FXUNUSED(*glideIdent);
|
||||
|
||||
#if GDBG_INFO_ON
|
||||
gdbg_error_set_callback(_grErrorCallback);
|
||||
#endif
|
||||
|
||||
grResetTriStats();
|
||||
|
||||
GDBG_INFO(281,"grGlideInit --done---------------------------------------\n");
|
||||
} /* grGlideInit */
|
||||
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
** grGlideShamelessPlug - grGlideShamelessPlug
|
||||
**
|
||||
** Returns:
|
||||
**
|
||||
** Notes:
|
||||
**
|
||||
*/
|
||||
GR_DIENTRY(grGlideShamelessPlug, void, (const FxBool mode))
|
||||
{
|
||||
GDBG_INFO(80,"grGlideShamelessPlug(%d)\n",mode);
|
||||
_GlideRoot.environment.shamelessPlug = mode;
|
||||
} /* grGlideShamelessPlug */
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
** grResetTriStats - Set triangle counters to zero.
|
||||
*/
|
||||
GR_DIENTRY(grResetTriStats, void, (void))
|
||||
{
|
||||
GDBG_INFO(80,"grResetTriStats()\n");
|
||||
_GlideRoot.stats.bufferSwaps = 0;
|
||||
_GlideRoot.stats.linesDrawn = 0;
|
||||
_GlideRoot.stats.trisProcessed = 0;
|
||||
_GlideRoot.stats.trisDrawn = 0;
|
||||
_GlideRoot.stats.texDownloads = 0;
|
||||
_GlideRoot.stats.texBytes = 0;
|
||||
_GlideRoot.stats.palDownloads = 0;
|
||||
_GlideRoot.stats.palBytes = 0;
|
||||
} /* grResetTriStats */
|
||||
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
** grResetTriStats - Set triangle counters to zero.
|
||||
*/
|
||||
GR_DIENTRY(grTriStats, void, (FxU32 *trisProcessed, FxU32 *trisDrawn))
|
||||
{
|
||||
GDBG_INFO(80,"grTriStats() => %d %d\n",
|
||||
_GlideRoot.stats.trisProcessed,
|
||||
_GlideRoot.stats.trisDrawn);
|
||||
*trisProcessed = _GlideRoot.stats.trisProcessed;
|
||||
*trisDrawn = _GlideRoot.stats.trisDrawn;
|
||||
} /* grTriStats */
|
||||
|
||||
void GR_CDECL
|
||||
_grFence(void)
|
||||
{
|
||||
GDBG_INFO(120,"\t\t\t\t\t\t\tFENCE\n");
|
||||
P6FENCE;
|
||||
}
|
||||
@@ -1,581 +0,0 @@
|
||||
/*
|
||||
** 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
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
**
|
||||
** 11 2/20/98 5:31p Peter
|
||||
** crybaby glide
|
||||
**
|
||||
** 10 2/20/98 11:00a Peter
|
||||
** removed glide3 from glid2 tree
|
||||
*
|
||||
* 9 1/08/98 7:09p Peter
|
||||
* real hw stuff modulo makefile change
|
||||
*
|
||||
* 8 1/06/98 6:47p Atai
|
||||
* undo grSplash and remove gu routines
|
||||
*
|
||||
* 7 12/15/97 5:51p Atai
|
||||
* disable obsolete glide2 api for glide3
|
||||
*
|
||||
* 6 5/27/97 1:16p Peter
|
||||
* Basic cvg, w/o cmd fifo stuff.
|
||||
*
|
||||
* 5 5/21/97 6:04a Peter
|
||||
*
|
||||
* 4 5/05/97 4:24p Pgj
|
||||
* Neuter guTexDownloadMipMap error message
|
||||
*
|
||||
* 3 3/18/97 9:07p Dow
|
||||
* Got rid of #$#%#$ // comments
|
||||
*
|
||||
* 2 3/09/97 10:31a Dow
|
||||
* Added GR_DIENTRY for di glide functions
|
||||
*
|
||||
* 1 12/23/96 1:39p Dow
|
||||
* Changes for multiplatform
|
||||
**
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
#include <3dfx.h>
|
||||
#define FX_DLL_DEFINITION
|
||||
#include <fxdll.h>
|
||||
#include <glide.h>
|
||||
#include "fxglide.h"
|
||||
|
||||
/* externals from ditex.c */
|
||||
extern FxU32 _grMipMapHostSize[][16];
|
||||
extern FxU32 _gr_aspect_index_table[];
|
||||
extern FxU32 _gr_aspect_xlate_table[];
|
||||
extern FxU32 _gr_evenOdd_xlate_table[];
|
||||
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
** guTexAllocateMemory
|
||||
*/
|
||||
GR_DIENTRY(guTexAllocateMemory, GrMipMapId_t, ( GrChipID_t tmu,
|
||||
FxU8 odd_even_mask,
|
||||
int width, int height,
|
||||
GrTextureFormat_t format,
|
||||
GrMipMapMode_t mipmap_mode,
|
||||
GrLOD_t small_lod, GrLOD_t large_lod,
|
||||
GrAspectRatio_t aspect_ratio,
|
||||
GrTextureClampMode_t s_clamp_mode,
|
||||
GrTextureClampMode_t t_clamp_mode,
|
||||
GrTextureFilterMode_t minfilter_mode,
|
||||
GrTextureFilterMode_t magfilter_mode,
|
||||
float lod_bias,
|
||||
FxBool trilinear
|
||||
))
|
||||
{
|
||||
FxU32
|
||||
memrequired,
|
||||
memavail,
|
||||
baseAddress,
|
||||
tLod,
|
||||
texturemode,
|
||||
filterMode, /* filter mode bits */
|
||||
clampMode; /* clamp mode bits */
|
||||
|
||||
GrMipMapId_t
|
||||
mmid = (GrMipMapId_t) GR_NULL_MIPMAP_HANDLE;
|
||||
int
|
||||
int_lod_bias;
|
||||
GrTexInfo info;
|
||||
|
||||
GR_BEGIN_NOFIFOCHECK("guTexAllocateMemory",99);
|
||||
GDBG_INFO_MORE(gc->myLevel,"(%d,%d, %d,%d, %d,%d, %d,%d,%d, %d,%d, %d,%d)\n",
|
||||
tmu,odd_even_mask,width,height,format,mipmap_mode,
|
||||
small_lod,large_lod,aspect_ratio,
|
||||
s_clamp_mode,t_clamp_mode, minfilter_mode,magfilter_mode);
|
||||
/*
|
||||
** The constants are actually reverse of each other so the following
|
||||
** test IS valid!
|
||||
*/
|
||||
GR_CHECK_F(myName, small_lod < large_lod, "smallest_lod is larger than large_lod");
|
||||
|
||||
info.smallLod = small_lod;
|
||||
info.largeLod = large_lod;
|
||||
info.aspectRatio = aspect_ratio;
|
||||
info.format = format;
|
||||
memrequired = grTexTextureMemRequired(odd_even_mask, &info);
|
||||
|
||||
/*
|
||||
** Make sure to not cross 2 MByte texture boundry
|
||||
*/
|
||||
if ((gc->tmu_state[tmu].freemem_base < 0x200000) &&
|
||||
(gc->tmu_state[tmu].freemem_base + memrequired > 0x200000))
|
||||
gc->tmu_state[tmu].freemem_base = 0x200000;
|
||||
|
||||
/*
|
||||
** If we have enough memory and a free mip map handle then go for it
|
||||
*/
|
||||
memavail = guTexMemQueryAvail( tmu );
|
||||
|
||||
if ( memavail < memrequired )
|
||||
return (GrMipMapId_t) GR_NULL_MIPMAP_HANDLE;
|
||||
|
||||
if (gc->mm_table.free_mmid >= MAX_MIPMAPS_PER_SST )
|
||||
return (GrMipMapId_t) GR_NULL_MIPMAP_HANDLE;
|
||||
|
||||
/*
|
||||
** Allocate the mip map id
|
||||
*/
|
||||
mmid = gc->mm_table.free_mmid++;
|
||||
|
||||
/*
|
||||
** calculate baseAddress (where LOD 0 would go)
|
||||
*/
|
||||
baseAddress = _grTexCalcBaseAddress( gc->tmu_state[tmu].freemem_base,
|
||||
large_lod,
|
||||
aspect_ratio,
|
||||
format,
|
||||
odd_even_mask );
|
||||
|
||||
GDBG_INFO(gc->myLevel," baseAddress = 0x%x (in bytes)\n",baseAddress);
|
||||
|
||||
/*
|
||||
** reduce available memory to reflect allocation
|
||||
*/
|
||||
gc->tmu_state[tmu].freemem_base += memrequired;
|
||||
|
||||
/*
|
||||
** Create the tLOD register value for this mip map
|
||||
*/
|
||||
int_lod_bias = _grTexFloatLODToFixedLOD( lod_bias );
|
||||
tLod = mipmap_mode==GR_MIPMAP_DISABLE ? large_lod : small_lod;
|
||||
tLod = SST_TLOD_MINMAX_INT(large_lod,tLod);
|
||||
tLod |= _gr_evenOdd_xlate_table[odd_even_mask];
|
||||
tLod |= _gr_aspect_xlate_table[aspect_ratio];
|
||||
tLod |= int_lod_bias << SST_LODBIAS_SHIFT;
|
||||
filterMode = (
|
||||
(minfilter_mode == GR_TEXTUREFILTER_BILINEAR ? SST_TMINFILTER : 0) |
|
||||
(magfilter_mode == GR_TEXTUREFILTER_BILINEAR ? SST_TMAGFILTER : 0)
|
||||
);
|
||||
|
||||
clampMode = (
|
||||
(s_clamp_mode == GR_TEXTURECLAMP_CLAMP ? SST_TCLAMPS : 0) |
|
||||
(t_clamp_mode == GR_TEXTURECLAMP_CLAMP ? SST_TCLAMPT : 0)
|
||||
);
|
||||
|
||||
/*
|
||||
** Create the tTextureMode register value for this mip map
|
||||
*/
|
||||
texturemode = ( format << SST_TFORMAT_SHIFT );
|
||||
texturemode |= SST_TCLAMPW;
|
||||
texturemode |= SST_TPERSP_ST;
|
||||
texturemode |= filterMode;
|
||||
texturemode |= clampMode;
|
||||
|
||||
if ( mipmap_mode == GR_MIPMAP_NEAREST_DITHER )
|
||||
texturemode |= SST_TLODDITHER;
|
||||
|
||||
if ( trilinear ) {
|
||||
texturemode |= SST_TRILINEAR;
|
||||
|
||||
if ( odd_even_mask & GR_MIPMAPLEVELMASK_ODD )
|
||||
tLod |= SST_LOD_ODD;
|
||||
|
||||
if ( odd_even_mask != GR_MIPMAPLEVELMASK_BOTH )
|
||||
tLod |= SST_LOD_TSPLIT;
|
||||
}
|
||||
|
||||
/*
|
||||
** Fill in the mm_table data for this mip map
|
||||
*/
|
||||
gc->mm_table.data[mmid].format = format;
|
||||
gc->mm_table.data[mmid].mipmap_mode = mipmap_mode;
|
||||
gc->mm_table.data[mmid].magfilter_mode = magfilter_mode;
|
||||
gc->mm_table.data[mmid].minfilter_mode = minfilter_mode;
|
||||
gc->mm_table.data[mmid].s_clamp_mode = s_clamp_mode;
|
||||
gc->mm_table.data[mmid].t_clamp_mode = t_clamp_mode;
|
||||
gc->mm_table.data[mmid].tLOD = tLod;
|
||||
gc->mm_table.data[mmid].tTextureMode = texturemode;
|
||||
gc->mm_table.data[mmid].lod_bias = int_lod_bias;
|
||||
gc->mm_table.data[mmid].lod_min = small_lod;
|
||||
gc->mm_table.data[mmid].lod_max = large_lod;
|
||||
gc->mm_table.data[mmid].tmu = tmu;
|
||||
gc->mm_table.data[mmid].odd_even_mask = odd_even_mask;
|
||||
gc->mm_table.data[mmid].tmu_base_address = baseAddress;
|
||||
gc->mm_table.data[mmid].trilinear = trilinear;
|
||||
gc->mm_table.data[mmid].aspect_ratio = aspect_ratio;
|
||||
gc->mm_table.data[mmid].data = 0;
|
||||
/* gc->mm_table.data[mmid].ncc_table = 0; */
|
||||
gc->mm_table.data[mmid].sst = _GlideRoot.current_sst;
|
||||
gc->mm_table.data[mmid].valid = FXTRUE;
|
||||
gc->mm_table.data[mmid].width = width;
|
||||
gc->mm_table.data[mmid].height = height;
|
||||
|
||||
GR_RETURN(mmid);
|
||||
} /* guTexAllocateMemory */
|
||||
|
||||
static void
|
||||
_guTexRebuildRegisterShadows( GrMipMapId_t mmid )
|
||||
{
|
||||
GR_DCL_GC;
|
||||
GrMipMapInfo *mminfo = &gc->mm_table.data[mmid];
|
||||
int texturemode = 0;
|
||||
int tLod = 0;
|
||||
FxU32
|
||||
filterMode, /* filter mode bits of texturemode */
|
||||
clampMode; /* clamp mode bits of texturemode */
|
||||
|
||||
/* build filterMode */
|
||||
filterMode = (
|
||||
(mminfo->minfilter_mode == GR_TEXTUREFILTER_BILINEAR ? SST_TMINFILTER : 0) |
|
||||
(mminfo->magfilter_mode == GR_TEXTUREFILTER_BILINEAR ? SST_TMAGFILTER : 0)
|
||||
);
|
||||
clampMode = (
|
||||
(mminfo->s_clamp_mode == GR_TEXTURECLAMP_CLAMP ? SST_TCLAMPS : 0) |
|
||||
(mminfo->t_clamp_mode == GR_TEXTURECLAMP_CLAMP ? SST_TCLAMPT : 0)
|
||||
);
|
||||
|
||||
/*
|
||||
** build up tTextureMode
|
||||
*/
|
||||
texturemode |= ( mminfo->format << SST_TFORMAT_SHIFT );
|
||||
texturemode |= SST_TCLAMPW;
|
||||
texturemode |= SST_TPERSP_ST;
|
||||
texturemode |= filterMode;
|
||||
texturemode |= clampMode;
|
||||
|
||||
if ( mminfo->mipmap_mode == GR_MIPMAP_NEAREST_DITHER )
|
||||
texturemode |= SST_TLODDITHER;
|
||||
|
||||
if ( mminfo->trilinear )
|
||||
texturemode |= SST_TRILINEAR;
|
||||
|
||||
/*
|
||||
** build up tLOD
|
||||
*/
|
||||
tLod = mminfo->mipmap_mode == GR_MIPMAP_DISABLE ? mminfo->lod_max : mminfo->lod_min;
|
||||
tLod = SST_TLOD_MINMAX_INT(mminfo->lod_max,tLod);
|
||||
tLod |= _gr_evenOdd_xlate_table[mminfo->odd_even_mask];
|
||||
tLod |= _gr_aspect_xlate_table[mminfo->aspect_ratio];
|
||||
tLod |= mminfo->lod_bias << SST_LODBIAS_SHIFT;
|
||||
|
||||
/*
|
||||
** assign them
|
||||
*/
|
||||
mminfo->tTextureMode = texturemode;
|
||||
mminfo->tLOD = tLod;
|
||||
} /* guTexRebuildRegisterShadows */
|
||||
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
** guTexChangeAttributes
|
||||
*/
|
||||
GR_DIENTRY(guTexChangeAttributes, FxBool, ( GrMipMapId_t mmid,
|
||||
int width, int height,
|
||||
GrTextureFormat_t fmt,
|
||||
GrMipMapMode_t mm_mode,
|
||||
GrLOD_t smallest_lod, GrLOD_t largest_lod,
|
||||
GrAspectRatio_t aspect,
|
||||
GrTextureClampMode_t s_clamp_mode,
|
||||
GrTextureClampMode_t t_clamp_mode,
|
||||
GrTextureFilterMode_t minFilterMode,
|
||||
GrTextureFilterMode_t magFilterMode
|
||||
))
|
||||
{
|
||||
GrMipMapInfo *mminfo;
|
||||
|
||||
GR_BEGIN_NOFIFOCHECK("guTexChangeAttributes",88);
|
||||
GDBG_INFO_MORE(gc->myLevel,"(%d, %d,%d, %d,%d, %d,%d,%d, %d,%d, %d,%d)\n",
|
||||
mmid,width,height,fmt,mm_mode,
|
||||
smallest_lod,largest_lod,aspect,
|
||||
s_clamp_mode,t_clamp_mode, minFilterMode,magFilterMode);
|
||||
/*
|
||||
** Make sure that mmid is not NULL
|
||||
*/
|
||||
if ( mmid == GR_NULL_MIPMAP_HANDLE ) {
|
||||
GR_RETURN(FXFALSE);
|
||||
}
|
||||
|
||||
mminfo = &gc->mm_table.data[mmid];
|
||||
|
||||
/*
|
||||
** Fill in the mm_table data for this mip map
|
||||
*/
|
||||
if ( fmt != -1 )
|
||||
mminfo->format = fmt;
|
||||
|
||||
if ( mm_mode != -1 )
|
||||
mminfo->mipmap_mode = mm_mode;
|
||||
|
||||
if ( smallest_lod != -1 )
|
||||
mminfo->lod_min = smallest_lod;
|
||||
if ( largest_lod != -1 )
|
||||
mminfo->lod_max = largest_lod;
|
||||
if ( minFilterMode != -1 )
|
||||
mminfo->minfilter_mode = minFilterMode;
|
||||
if ( magFilterMode != -1 )
|
||||
mminfo->magfilter_mode = magFilterMode;
|
||||
if ( s_clamp_mode != -1 )
|
||||
mminfo->s_clamp_mode = s_clamp_mode;
|
||||
if ( t_clamp_mode != -1 )
|
||||
mminfo->t_clamp_mode = t_clamp_mode;
|
||||
if ( aspect != -1 )
|
||||
mminfo->aspect_ratio = aspect;
|
||||
if ( width != -1 )
|
||||
mminfo->width = width;
|
||||
if ( height != -1 )
|
||||
mminfo->height = height;
|
||||
|
||||
_guTexRebuildRegisterShadows( mmid );
|
||||
GR_RETURN(FXTRUE);
|
||||
} /* guTexChangeAttributes */
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
** grTexCombineFunction - obsolete
|
||||
**
|
||||
*/
|
||||
GR_DIENTRY(grTexCombineFunction, void,
|
||||
(GrChipID_t tmu, GrTextureCombineFnc_t tc))
|
||||
{
|
||||
guTexCombineFunction( tmu, tc );
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
** guTexCombineFunction
|
||||
**
|
||||
** Sets the texture combine function. For a dual TMU system this function
|
||||
** will configure the TEXTUREMODE registers as appropriate. For a
|
||||
** single TMU system this function will configure TEXTUREMODE if
|
||||
** possible, or defer operations until grDrawTriangle() is called.
|
||||
*/
|
||||
GR_DIENTRY(guTexCombineFunction, void,
|
||||
(GrChipID_t tmu, GrTextureCombineFnc_t tc))
|
||||
{
|
||||
GDBG_INFO(99,"guTexCombineFunction(%d,%d)\n",tmu,tc);
|
||||
switch ( tc ) {
|
||||
case GR_TEXTURECOMBINE_ZERO:
|
||||
grTexCombine( tmu, GR_COMBINE_FUNCTION_ZERO, GR_COMBINE_FACTOR_NONE,
|
||||
GR_COMBINE_FUNCTION_ZERO, GR_COMBINE_FACTOR_NONE, FXFALSE, FXFALSE );
|
||||
break;
|
||||
|
||||
case GR_TEXTURECOMBINE_DECAL:
|
||||
grTexCombine( tmu, GR_COMBINE_FUNCTION_LOCAL, GR_COMBINE_FACTOR_NONE,
|
||||
GR_COMBINE_FUNCTION_LOCAL, GR_COMBINE_FACTOR_NONE, FXFALSE, FXFALSE );
|
||||
break;
|
||||
|
||||
case GR_TEXTURECOMBINE_ONE:
|
||||
grTexCombine( tmu, GR_COMBINE_FUNCTION_ZERO, GR_COMBINE_FACTOR_NONE,
|
||||
GR_COMBINE_FUNCTION_ZERO, GR_COMBINE_FACTOR_NONE, FXTRUE, FXTRUE );
|
||||
break;
|
||||
|
||||
case GR_TEXTURECOMBINE_ADD:
|
||||
grTexCombine( tmu, GR_COMBINE_FUNCTION_SCALE_OTHER_ADD_LOCAL, GR_COMBINE_FACTOR_ONE,
|
||||
GR_COMBINE_FUNCTION_SCALE_OTHER_ADD_LOCAL, GR_COMBINE_FACTOR_ONE, FXFALSE, FXFALSE );
|
||||
break;
|
||||
|
||||
case GR_TEXTURECOMBINE_MULTIPLY:
|
||||
grTexCombine( tmu, GR_COMBINE_FUNCTION_SCALE_OTHER, GR_COMBINE_FACTOR_LOCAL,
|
||||
GR_COMBINE_FUNCTION_SCALE_OTHER, GR_COMBINE_FACTOR_LOCAL, FXFALSE, FXFALSE );
|
||||
break;
|
||||
|
||||
case GR_TEXTURECOMBINE_DETAIL:
|
||||
grTexCombine( tmu, GR_COMBINE_FUNCTION_BLEND, GR_COMBINE_FACTOR_ONE_MINUS_DETAIL_FACTOR,
|
||||
GR_COMBINE_FUNCTION_BLEND, GR_COMBINE_FACTOR_ONE_MINUS_DETAIL_FACTOR, FXFALSE, FXFALSE );
|
||||
break;
|
||||
|
||||
case GR_TEXTURECOMBINE_DETAIL_OTHER:
|
||||
grTexCombine( tmu, GR_COMBINE_FUNCTION_BLEND, GR_COMBINE_FACTOR_DETAIL_FACTOR,
|
||||
GR_COMBINE_FUNCTION_BLEND, GR_COMBINE_FACTOR_DETAIL_FACTOR, FXFALSE, FXFALSE );
|
||||
break;
|
||||
|
||||
case GR_TEXTURECOMBINE_TRILINEAR_ODD:
|
||||
grTexCombine( tmu, GR_COMBINE_FUNCTION_BLEND, GR_COMBINE_FACTOR_ONE_MINUS_LOD_FRACTION,
|
||||
GR_COMBINE_FUNCTION_BLEND, GR_COMBINE_FACTOR_ONE_MINUS_LOD_FRACTION, FXFALSE, FXFALSE );
|
||||
break;
|
||||
|
||||
case GR_TEXTURECOMBINE_TRILINEAR_EVEN:
|
||||
grTexCombine( tmu, GR_COMBINE_FUNCTION_BLEND, GR_COMBINE_FACTOR_LOD_FRACTION,
|
||||
GR_COMBINE_FUNCTION_BLEND, GR_COMBINE_FACTOR_LOD_FRACTION, FXFALSE, FXFALSE );
|
||||
break;
|
||||
|
||||
case GR_TEXTURECOMBINE_SUBTRACT:
|
||||
grTexCombine( tmu, GR_COMBINE_FUNCTION_SCALE_OTHER_MINUS_LOCAL, GR_COMBINE_FACTOR_ONE,
|
||||
GR_COMBINE_FUNCTION_SCALE_OTHER_MINUS_LOCAL, GR_COMBINE_FACTOR_ONE, FXFALSE, FXFALSE );
|
||||
break;
|
||||
|
||||
case GR_TEXTURECOMBINE_OTHER:
|
||||
grTexCombine( tmu, GR_COMBINE_FUNCTION_SCALE_OTHER, GR_COMBINE_FACTOR_ONE,
|
||||
GR_COMBINE_FUNCTION_SCALE_OTHER, GR_COMBINE_FACTOR_ONE, FXFALSE, FXFALSE );
|
||||
break;
|
||||
|
||||
default:
|
||||
GrErrorCallback( "guTexCombineFunction: Unsupported function", FXTRUE );
|
||||
break;
|
||||
}
|
||||
} /* guTexCombineFunction */
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
** guTexDownloadMipMap
|
||||
**
|
||||
** Downloads a mip map (previously allocated with guTexAllocateMemory) to
|
||||
** the hardware using the given data and ncctble. The "data" is assumed
|
||||
** to be in row major order from largest mip map to smallest mip map.
|
||||
*/
|
||||
GR_DIENTRY(guTexDownloadMipMap, void,
|
||||
(GrMipMapId_t mmid, const void *src, const GuNccTable
|
||||
*ncc_table ) )
|
||||
{
|
||||
GR_DCL_GC;
|
||||
GrLOD_t lod;
|
||||
const void *ptr = src;
|
||||
|
||||
GDBG_INFO(99,"guTexDownloadMipMap(%d,0x%x,0x%x)\n",mmid,src,ncc_table);
|
||||
GR_ASSERT(gc != NULL);
|
||||
GR_ASSERT(src != NULL);
|
||||
GR_CHECK_F("guTexDownloadMipMap",
|
||||
( mmid == GR_NULL_MIPMAP_HANDLE ) || ( mmid >= gc->mm_table.free_mmid ),
|
||||
"invalid mip map handle passed");
|
||||
|
||||
#if 0 /* Fixme!!! XXX ??? */
|
||||
GR_CHECK_F("guTexDownloadMipMap",
|
||||
gc->mm_table.data[mmid].format == GR_TEXFMT_P_8,
|
||||
"guTex* does not support palletted textures - use grTex* instead");
|
||||
#endif /* 0 */
|
||||
|
||||
/*
|
||||
** Bind data and ncc table to this mip map
|
||||
*/
|
||||
gc->mm_table.data[mmid].data = (void *) ptr;
|
||||
if (gc->mm_table.data[mmid].format == GR_TEXFMT_YIQ_422)
|
||||
gc->mm_table.data[mmid].ncc_table = *ncc_table;
|
||||
|
||||
/*
|
||||
** Start downloading mip map levels, note that ptr is updated by the caller
|
||||
*/
|
||||
for ( lod = gc->mm_table.data[mmid].lod_max; lod <= gc->mm_table.data[mmid].lod_min; lod++ ) {
|
||||
guTexDownloadMipMapLevel( mmid, lod, &ptr );
|
||||
}
|
||||
} /* guTexDownloadMipMap */
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
** guTexDownloadMipMapLevel
|
||||
**
|
||||
** Downloads a single mip map level to a mip map. "src" is considered to be
|
||||
** row major data of the correct aspect ratio and format.
|
||||
*/
|
||||
GR_DIENTRY(guTexDownloadMipMapLevel, void,
|
||||
(GrMipMapId_t mmid, GrLOD_t lod,
|
||||
const void **src_base))
|
||||
{
|
||||
FxU32 i;
|
||||
const GrMipMapInfo *mminfo;
|
||||
GR_DCL_GC;
|
||||
|
||||
GDBG_INFO(99,"guTexDownloadMipMapLevel(%d,%d,0x%x)\n",mmid,lod,src_base);
|
||||
GR_ASSERT(src_base != NULL);
|
||||
mminfo = &gc->mm_table.data[mmid];
|
||||
GR_CHECK_F( "guTexDownloadMipMapLevel",
|
||||
( lod > mminfo->lod_min ) || ( lod < mminfo->lod_max ),
|
||||
"specified lod is out of range");
|
||||
|
||||
/* GMT: replace with array access */
|
||||
/* download this level */
|
||||
i = _grTexCalcBaseAddress( 0,
|
||||
mminfo->lod_max,
|
||||
mminfo->aspect_ratio,
|
||||
mminfo->format,
|
||||
mminfo->odd_even_mask);
|
||||
grTexDownloadMipMapLevel( mminfo->tmu,
|
||||
mminfo->tmu_base_address - i,
|
||||
lod,
|
||||
mminfo->lod_max,
|
||||
mminfo->aspect_ratio,
|
||||
mminfo->format,
|
||||
mminfo->odd_even_mask,
|
||||
(void *)*src_base );
|
||||
|
||||
/* update src_base to point to next mipmap level */
|
||||
*src_base = (void *) (((FxU32)*src_base) +
|
||||
(_grMipMapHostSize[_gr_aspect_index_table[mminfo->aspect_ratio]][lod]
|
||||
<< (mminfo->format>=GR_TEXFMT_16BIT)));
|
||||
|
||||
} /* guTexDownloadMipmapLevel */
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
** guTexGetCurrentMipMap
|
||||
*/
|
||||
GR_DIENTRY(guTexGetCurrentMipMap, GrMipMapId_t, ( GrChipID_t tmu ))
|
||||
{
|
||||
#define FN_NAME "guTexGetCurrentMipMap"
|
||||
GR_BEGIN_NOFIFOCHECK("guTexGetCurrentMipMap",99);
|
||||
GDBG_INFO_MORE(gc->myLevel,"(%d)\n",tmu);
|
||||
GR_CHECK_TMU(FN_NAME, tmu );
|
||||
|
||||
GR_RETURN(gc->state.current_mm[tmu]);
|
||||
#undef FN_NAME
|
||||
} /* guTexGetCurrentMipMap */
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
** guTexGetMipMapInfo
|
||||
*/
|
||||
GR_DIENTRY(guTexGetMipMapInfo, GrMipMapInfo *, ( GrMipMapId_t mmid ))
|
||||
{
|
||||
GR_BEGIN_NOFIFOCHECK("guTexGetMipMapInfo",99);
|
||||
GDBG_INFO_MORE(gc->myLevel,"(%d) => 0x%x\n",mmid,&gc->mm_table.data[mmid]);
|
||||
return &( gc->mm_table.data[mmid] );
|
||||
} /* guTexGetMipMapInfo */
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
** guTexMemQueryAvail
|
||||
**
|
||||
** returns the amount of available texture memory on a specified TMU.
|
||||
*/
|
||||
GR_DIENTRY(guTexMemQueryAvail, FxU32, ( GrChipID_t tmu ))
|
||||
{
|
||||
#define FN_NAME "guTexMemQueryAvail"
|
||||
GR_BEGIN_NOFIFOCHECK("guTexMemQueryAvail",99);
|
||||
GDBG_INFO_MORE(gc->myLevel,"(%d)\n",tmu);
|
||||
GR_CHECK_TMU(FN_NAME, tmu );
|
||||
GR_RETURN(gc->tmu_state[tmu].total_mem - gc->tmu_state[tmu].freemem_base);
|
||||
#undef FN_NAME
|
||||
} /* guTexQueryMemAvail */
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
** guTexMemReset
|
||||
**
|
||||
** Clears out texture buffer memory.
|
||||
*/
|
||||
GR_DIENTRY(guTexMemReset, void, ( void ))
|
||||
{
|
||||
int i;
|
||||
|
||||
GR_BEGIN_NOFIFOCHECK("guTexMemReset",99);
|
||||
GDBG_INFO_MORE(gc->myLevel,"()\n");
|
||||
|
||||
memset( gc->mm_table.data, 0, sizeof( gc->mm_table.data ) );
|
||||
gc->mm_table.free_mmid = 0;
|
||||
|
||||
for ( i = 0; i < gc->num_tmu; i++ ) {
|
||||
gc->state.current_mm[i] = (GrMipMapId_t) GR_NULL_MIPMAP_HANDLE;
|
||||
gc->tmu_state[i].freemem_base = 0;
|
||||
gc->tmu_state[i].ncc_mmids[0] =
|
||||
gc->tmu_state[i].ncc_mmids[1] = GR_NULL_MIPMAP_HANDLE;
|
||||
gc->tmu_state[i].ncc_table[0] =
|
||||
gc->tmu_state[i].ncc_table[1] = 0;
|
||||
}
|
||||
GR_END();
|
||||
} /* guTexMemReset */
|
||||
|
||||
@@ -1,213 +0,0 @@
|
||||
/*
|
||||
** 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
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
**
|
||||
** 22 4/21/98 10:05a Peter
|
||||
** grSstSelect cleanup (Thanks John/Rufus)
|
||||
**
|
||||
** 21 3/17/98 6:50p Peter
|
||||
** sli paired vs active
|
||||
**
|
||||
** 20 2/24/98 10:15a Peter
|
||||
** oem dll muckage
|
||||
**
|
||||
** 19 2/20/98 11:00a Peter
|
||||
** removed glide3 from glid2 tree
|
||||
*
|
||||
* 18 12/17/97 4:05p Atai
|
||||
* added grChromaRange(), grGammaCorrecionRGB(), grRest(), and grGet()
|
||||
* functions
|
||||
*
|
||||
* 17 12/09/97 12:20p Peter
|
||||
* mac glide port
|
||||
*
|
||||
* 16 11/19/97 2:49p Peter
|
||||
* env vars in registry for win32
|
||||
*
|
||||
* 15 11/18/97 4:36p Peter
|
||||
* chipfield stuff cleanup and w/ direct writes
|
||||
*
|
||||
* 14 10/31/97 9:15a Peter
|
||||
* only lie about v2 boards
|
||||
*
|
||||
* 13 10/31/97 8:53a Peter
|
||||
* last lying change, really
|
||||
*
|
||||
* 12 9/05/97 5:29p Peter
|
||||
* changes for direct hw
|
||||
*
|
||||
* 11 6/20/97 9:56a Peter
|
||||
* better lines/pts, hopefully
|
||||
*
|
||||
* 10 6/02/97 4:09p Peter
|
||||
* Compile w/ gcc for Dural
|
||||
*
|
||||
* 9 5/27/97 1:16p Peter
|
||||
* Basic cvg, w/o cmd fifo stuff.
|
||||
*
|
||||
* 8 5/21/97 6:04a Peter
|
||||
*
|
||||
* 7 5/02/97 2:07p Pgj
|
||||
* grSstScreenWidth/Height now FxU32
|
||||
*
|
||||
* 6 3/17/97 6:25a Jdt
|
||||
* Added initDeviceSelect to grSstSelect()
|
||||
*
|
||||
* 5 3/09/97 10:31a Dow
|
||||
* Added GR_DIENTRY for di glide functions
|
||||
*
|
||||
* 4 3/04/97 9:08p Dow
|
||||
*
|
||||
* 3 1/18/97 11:39p Dow
|
||||
* Changed location of _curGCFuncs
|
||||
*
|
||||
* 2 1/16/97 3:39p Dow
|
||||
* Added ref to _curGCFuncs during grSstSelect()
|
||||
*
|
||||
* 1 12/23/96 1:39p Dow
|
||||
* Changes for multiplatform
|
||||
**
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <3dfx.h>
|
||||
|
||||
#include <glidesys.h>
|
||||
|
||||
#define FX_DLL_DEFINITION
|
||||
#include <fxdll.h>
|
||||
#include <glide.h>
|
||||
#include "fxglide.h"
|
||||
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
** grSstQueryBoards
|
||||
**
|
||||
** NOTE: it is OK to call this routine before grGlideInit
|
||||
*/
|
||||
GR_DIENTRY(grSstQueryBoards, FxBool, ( GrHwConfiguration *hwc ))
|
||||
{
|
||||
GDBG_INIT();
|
||||
GDBG_INFO(80,"grSstQueryBoards(0x%x)\n",hwc);
|
||||
|
||||
#if GLIDE_INIT_HAL
|
||||
hwc->num_sst = (_grSstDetectResources()
|
||||
? _GlideRoot.hwConfig.num_sst
|
||||
: 0);
|
||||
#else /* !GLIDE_INIT_HAL */
|
||||
hwc->num_sst = sst1InitNumBoardsInSystem();
|
||||
#endif /* !GLIDE_INIT_HAL */
|
||||
|
||||
return FXTRUE;
|
||||
} /* grSstQueryBoards */
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
** grSstQueryHardware
|
||||
**
|
||||
*/
|
||||
GR_DIENTRY(grSstQueryHardware, FxBool, ( GrHwConfiguration *hwc ))
|
||||
{
|
||||
FxBool retVal;
|
||||
|
||||
GR_BEGIN_NOFIFOCHECK("grSstQueryHardware",80);
|
||||
GDBG_INFO_MORE(gc->myLevel,"(0x%x)\n",hwc);
|
||||
|
||||
/* init and copy the data back to the user's structure */
|
||||
retVal = _GlideRoot.hwConfig.num_sst > 0;
|
||||
*hwc = _GlideRoot.hwConfig;
|
||||
|
||||
#if (GLIDE_PLATFORM & GLIDE_HW_CVG)
|
||||
/* Lie that we are an sst1 for backwards compatability */
|
||||
{
|
||||
int i;
|
||||
const GrSstType reportType = ((GETENV("FX_GLIDE_REPORT_REAL_HW") == NULL)
|
||||
? GR_SSTTYPE_VOODOO
|
||||
: GR_SSTTYPE_Voodoo2);
|
||||
|
||||
for(i = 0; i < _GlideRoot.hwConfig.num_sst; i++) {
|
||||
if (hwc->SSTs[i].type == GR_SSTTYPE_Voodoo2) hwc->SSTs[i].type = reportType;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
GR_RETURN(retVal);
|
||||
} /* grSstQueryHardware */
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
** grSstSelect
|
||||
*/
|
||||
GR_DIENTRY(grSstSelect, void, ( int which ))
|
||||
{
|
||||
GR_BEGIN_NOFIFOCHECK("grSstSelect",80);
|
||||
GDBG_INFO_MORE(gc->myLevel,"(%d)\n",which);
|
||||
|
||||
if ( which >= _GlideRoot.hwConfig.num_sst )
|
||||
GrErrorCallback( "grSstSelect: non-existent SST", FXTRUE );
|
||||
|
||||
_GlideRoot.current_sst = _GlideRoot.gcMap[which];
|
||||
_GlideRoot.curGC = &_GlideRoot.GCs[_GlideRoot.current_sst];
|
||||
|
||||
#ifdef GLIDE_MULTIPLATFORM
|
||||
_GlideRoot.curGCFuncs = _GlideRoot.curGC->gcFuncs;
|
||||
#endif
|
||||
|
||||
GR_END();
|
||||
} /* grSstSelect */
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
** grSstScreenWidth
|
||||
*/
|
||||
GR_DIENTRY(grSstScreenWidth, FxU32, (void))
|
||||
{
|
||||
GR_DCL_GC;
|
||||
GR_ASSERT(gc != NULL);
|
||||
return gc->state.screen_width;
|
||||
} /* grSstScreenWidth */
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
** grSstScreenHeight
|
||||
*/
|
||||
GR_DIENTRY(grSstScreenHeight, FxU32, (void))
|
||||
{
|
||||
GR_DCL_GC;
|
||||
GR_ASSERT(gc != NULL);
|
||||
return gc->state.screen_height;
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
** grSstVidMode - override args to grSstOpen()
|
||||
*/
|
||||
GR_DIENTRY(grSstVidMode, void, (FxU32 whichSst, FxVideoTimingInfo* vidTimings))
|
||||
{
|
||||
GDBG_INFO(80,"grSstVidMode(%d,0x%x)\n",whichSst,vidTimings);
|
||||
#ifdef GLIDE_DEBUG
|
||||
if (whichSst >= MAX_NUM_SST) {
|
||||
char errStr[1028];
|
||||
sprintf(errStr, "grSstVidMode: %ld greater than MAX_NUM_SST (%d)\n",
|
||||
whichSst, MAX_NUM_SST);
|
||||
|
||||
GrErrorCallback(errStr, FXTRUE);
|
||||
}
|
||||
#endif
|
||||
|
||||
_GlideRoot.GCs[whichSst].vidTimings = vidTimings;
|
||||
} /* grSstVidMode */
|
||||
@@ -1,943 +0,0 @@
|
||||
/*
|
||||
** 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
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
*
|
||||
* 17 1/13/98 12:42p Atai
|
||||
* fixed grtexinfo, grVertexLayout, and draw triangle
|
||||
*
|
||||
* 16 1/10/98 4:01p Atai
|
||||
* inititialize vertex layout, viewport, added defines
|
||||
*
|
||||
* 15 1/05/98 6:06p Atai
|
||||
* glide extension stuff
|
||||
*
|
||||
* 14 12/17/97 4:05p Atai
|
||||
* added grChromaRange(), grGammaCorrecionRGB(), grRest(), and grGet()
|
||||
* functions
|
||||
*
|
||||
* 13 12/16/97 11:38a Atai
|
||||
* added grChromaRange()
|
||||
*
|
||||
* 12 12/15/97 5:52p Atai
|
||||
* disable obsolete glide2 api for glide3
|
||||
*
|
||||
* 10 12/12/97 1:30p Atai
|
||||
* remove fp z buffer
|
||||
*
|
||||
* 8 12/08/97 10:44a Atai
|
||||
* added entry point for grCoordinateSpace(), grDepthRange(), and
|
||||
* grViewport()
|
||||
*
|
||||
* 7 11/13/97 4:38p Atai
|
||||
* invalidate lfbMode and c0c1
|
||||
*
|
||||
* 6 11/10/97 5:20p Atai
|
||||
* added factor for grAlphaCombine and remove extra _grChromakeyMode
|
||||
*
|
||||
* 5 11/07/97 11:22a Atai
|
||||
* remove GR_*_SMOOTH. use GR_SMOOTH
|
||||
*
|
||||
* 4 10/15/97 7:33a Dow
|
||||
* Made _grValidateState use central routine for writing data
|
||||
*
|
||||
* 3 10/14/97 4:18p Atai
|
||||
* added grEnable and grDisable
|
||||
*
|
||||
* 2 10/10/97 2:57p Dow
|
||||
* Minor adjustments
|
||||
*
|
||||
* 1 10/09/97 5:19p Dow
|
||||
* State Monster file
|
||||
*/
|
||||
|
||||
#ifdef GLIDE3
|
||||
|
||||
#include <3dfx.h>
|
||||
#include <glidesys.h>
|
||||
|
||||
#define FX_DLL_DEFINITION
|
||||
#include <fxdll.h>
|
||||
#include <glide.h>
|
||||
#include "fxglide.h"
|
||||
|
||||
/*=============================================================================
|
||||
** Replacement state routines.
|
||||
**
|
||||
** These routines store away their arguments, and mark a piece of glide state
|
||||
** as invalid. The next time a rendering primitive is called, the state will
|
||||
** be invalid, and grValidateState will be called. See that routine for more
|
||||
** info.
|
||||
**===========================================================================*/
|
||||
|
||||
/*
|
||||
Some macros for use in this file only
|
||||
*/
|
||||
|
||||
#define STOREARG(function, arg) \
|
||||
gc->state.stateArgs.##function##Args.arg = arg
|
||||
|
||||
#define LOADARG(function, arg) \
|
||||
gc->state.stateArgs.##function##Args.arg
|
||||
|
||||
#define INVALIDATE(regset) \
|
||||
gc->state.invalid |= ##regset##BIT
|
||||
|
||||
#define NOTVALID(regset) \
|
||||
(gc->state.invalid & ##regset##BIT)
|
||||
|
||||
#define SETVALID(regset) \
|
||||
(gc->state.invalid &= ~(##regset##BIT))
|
||||
|
||||
#define ENABLEMODE(mode) \
|
||||
gc->state.grEnableArgs.##mode## = GR_MODE_ENABLE;
|
||||
|
||||
#define DISABLEMODE(mode) \
|
||||
gc->state.grEnableArgs.##mode## = GR_MODE_DISABLE;
|
||||
|
||||
/*-------------------------------------------------------------------
|
||||
Function: grAlphaBlendFunction
|
||||
Date: 06-Oct-97
|
||||
Implementor(s): dow
|
||||
Description:
|
||||
Inform Glide that the Alpha Blend Function has been modified.
|
||||
Arguments:
|
||||
|
||||
Return:
|
||||
-------------------------------------------------------------------*/
|
||||
GR_DIENTRY(grAlphaBlendFunction, void , (GrAlphaBlendFnc_t rgb_sf, GrAlphaBlendFnc_t rgb_df, GrAlphaBlendFnc_t alpha_sf, GrAlphaBlendFnc_t alpha_df) )
|
||||
{
|
||||
#define FN_NAME "grAlphaBlendFunction"
|
||||
GR_BEGIN_NOFIFOCHECK(FN_NAME, 87);
|
||||
|
||||
/* Invalidate AlphaMode */
|
||||
INVALIDATE(alphaMode);
|
||||
|
||||
STOREARG(grAlphaBlendFunction, rgb_sf);
|
||||
STOREARG(grAlphaBlendFunction, rgb_df);
|
||||
STOREARG(grAlphaBlendFunction, alpha_sf);
|
||||
STOREARG(grAlphaBlendFunction, alpha_df);
|
||||
|
||||
#undef FN_NAME
|
||||
} /* grAlphaBlendFunction */
|
||||
|
||||
/*-------------------------------------------------------------------
|
||||
Function: grAlphaTestFunction
|
||||
Date: 06-Oct-97
|
||||
Implementor(s): dow
|
||||
Description:
|
||||
|
||||
Arguments:
|
||||
|
||||
Return:
|
||||
-------------------------------------------------------------------*/
|
||||
GR_DIENTRY(grAlphaTestFunction, void , (GrCmpFnc_t fnc) )
|
||||
{
|
||||
#define FN_NAME "grAlphaTestFunction"
|
||||
GR_BEGIN_NOFIFOCHECK(FN_NAME, 87);
|
||||
|
||||
/* Invalidate AlphaMode */
|
||||
INVALIDATE(alphaMode);
|
||||
|
||||
STOREARG(grAlphaTestFunction, fnc);
|
||||
|
||||
#undef FN_NAME
|
||||
} /* grAlphaTestFunction */
|
||||
|
||||
/*-------------------------------------------------------------------
|
||||
Function: grAlphaTestReferenceValue
|
||||
Date: 06-Oct-97
|
||||
Implementor(s): dow
|
||||
Description:
|
||||
|
||||
Arguments:
|
||||
|
||||
Return:
|
||||
-------------------------------------------------------------------*/
|
||||
GR_DIENTRY(grAlphaTestReferenceValue, void , (GrAlpha_t value) )
|
||||
{
|
||||
#define FN_NAME "grAlphaTestReferenceValue"
|
||||
GR_BEGIN_NOFIFOCHECK(FN_NAME, 87);
|
||||
|
||||
INVALIDATE(alphaMode);
|
||||
|
||||
STOREARG(grAlphaTestReferenceValue,value);
|
||||
|
||||
#undef FN_NAME
|
||||
} /* grAlphaTestReferenceValue */
|
||||
|
||||
/*-------------------------------------------------------------------
|
||||
Function: grAlphaCombine
|
||||
Date: 06-Oct-97
|
||||
Implementor(s): dow
|
||||
Description:
|
||||
|
||||
Arguments:
|
||||
|
||||
Return:
|
||||
-------------------------------------------------------------------*/
|
||||
GR_DIENTRY(grAlphaCombine, void ,
|
||||
(GrCombineFunction_t function, GrCombineFactor_t factor,
|
||||
GrCombineLocal_t local, GrCombineOther_t other, FxBool invert) )
|
||||
{
|
||||
#define FN_NAME "grAlphaCombine"
|
||||
GR_BEGIN_NOFIFOCHECK(FN_NAME, 85);
|
||||
|
||||
INVALIDATE(fbzColorPath);
|
||||
|
||||
STOREARG(grAlphaCombine, function);
|
||||
STOREARG(grAlphaCombine, factor);
|
||||
STOREARG(grAlphaCombine, local);
|
||||
STOREARG(grAlphaCombine, other);
|
||||
STOREARG(grAlphaCombine, invert);
|
||||
|
||||
#undef FN_NAME
|
||||
} /* grAlphaCombine */
|
||||
|
||||
/*-------------------------------------------------------------------
|
||||
Function: grAlphaControlsITRGBLighting
|
||||
Date: 07-Oct-97
|
||||
Implementor(s): dow
|
||||
Description:
|
||||
|
||||
Arguments:
|
||||
|
||||
Return:
|
||||
-------------------------------------------------------------------*/
|
||||
GR_DIENTRY(grAlphaControlsITRGBLighting, void , (FxBool enable) )
|
||||
{
|
||||
#define FN_NAME "grAlphaControlsITRGBLighting"
|
||||
GR_BEGIN_NOFIFOCHECK("grAlphaControlsITRGBLighting",85);
|
||||
|
||||
INVALIDATE(fbzColorPath);
|
||||
|
||||
STOREARG(grAlphaControlsITRGBLighting, enable);
|
||||
|
||||
#undef FN_NAME
|
||||
} /* grAlphaControlsITRGBLighting */
|
||||
|
||||
/*-------------------------------------------------------------------
|
||||
Function: grColorCombine
|
||||
Date: 07-Oct-97
|
||||
Implementor(s): dow
|
||||
Description:
|
||||
|
||||
Arguments:
|
||||
|
||||
Return:
|
||||
-------------------------------------------------------------------*/
|
||||
GR_DIENTRY(grColorCombine, void , (GrCombineFunction_t function,
|
||||
GrCombineFactor_t factor,
|
||||
GrCombineLocal_t local,
|
||||
GrCombineOther_t other, FxBool invert) )
|
||||
{
|
||||
#define FN_NAME "grColorCombine"
|
||||
GR_BEGIN_NOFIFOCHECK("grColorCombine",85);
|
||||
|
||||
INVALIDATE(fbzColorPath);
|
||||
|
||||
STOREARG(grColorCombine, function);
|
||||
STOREARG(grColorCombine, factor);
|
||||
STOREARG(grColorCombine, local);
|
||||
STOREARG(grColorCombine, other);
|
||||
STOREARG(grColorCombine, invert);
|
||||
|
||||
#undef FN_NAME
|
||||
} /* grColorCombine */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------
|
||||
Function: grChromakeyMode
|
||||
Date: 07-Oct-97
|
||||
Implementor(s): dow
|
||||
Description:
|
||||
|
||||
Arguments:
|
||||
|
||||
Return:
|
||||
-------------------------------------------------------------------*/
|
||||
GR_DIENTRY(grChromakeyMode, void , (GrChromakeyMode_t mode) )
|
||||
{
|
||||
#define FN_NAME "grChromakeyMode"
|
||||
GR_BEGIN_NOFIFOCHECK("grChromakeyMode",85);
|
||||
|
||||
INVALIDATE(fbzMode);
|
||||
|
||||
STOREARG(grChromakeyMode, mode);
|
||||
|
||||
#undef FN_NAME
|
||||
} /* grChromakeyMode */
|
||||
|
||||
#if defined(GLIDE3) && defined(GLIDE3_ALPHA)
|
||||
/*-------------------------------------------------------------------
|
||||
Function: grChromaModeExt
|
||||
Date: 05-Jan-98
|
||||
Implementor(s): atai
|
||||
Description:
|
||||
|
||||
Arguments:
|
||||
|
||||
Return:
|
||||
-------------------------------------------------------------------*/
|
||||
void _grChromaModeExt(GrChromakeyMode_t mode)
|
||||
{
|
||||
#define FN_NAME "_grChromaModeExt"
|
||||
GR_BEGIN_NOFIFOCHECK("_grChromaModeExt",85);
|
||||
|
||||
INVALIDATE(fbzMode);
|
||||
|
||||
STOREARG(grChromakeyMode, mode);
|
||||
|
||||
#undef FN_NAME
|
||||
} /* _grChromaModeExt */
|
||||
|
||||
/*-------------------------------------------------------------------
|
||||
Function: _grChromaRangeExt
|
||||
Date: 15-Dec-97
|
||||
Implementor(s): atai
|
||||
Description:
|
||||
|
||||
Arguments:
|
||||
|
||||
Return:
|
||||
-------------------------------------------------------------------*/
|
||||
void _grChromaRangeExt(GrColor_t color, GrColor_t range, GrChromaRangeMode_t mode)
|
||||
{
|
||||
#define FN_NAME "_grChromaRangeExt"
|
||||
GR_BEGIN_NOFIFOCHECK("_grChromaRangeExt",85);
|
||||
|
||||
GR_CHECK_F(myName,
|
||||
(_GlideRoot.hwConfig.SSTs[_GlideRoot.current_sst].type != GR_SSTTYPE_Voodoo2),
|
||||
"grChromaRange not supported.");
|
||||
|
||||
INVALIDATE(chromaKey);
|
||||
|
||||
STOREARG(grChromakeyValue, color);
|
||||
STOREARG(grChromaRange, range);
|
||||
STOREARG(grChromaRange, mode);
|
||||
|
||||
#undef FN_NAME
|
||||
} /* _grChromaRangeExt */
|
||||
#endif
|
||||
|
||||
/*-------------------------------------------------------------------
|
||||
Function: grChromakeyValue
|
||||
Date: 09-Oct-97
|
||||
Implementor(s): dow
|
||||
Description:
|
||||
|
||||
Arguments:
|
||||
|
||||
Return:
|
||||
-------------------------------------------------------------------*/
|
||||
GR_ENTRY(grChromakeyValue, void , (GrColor_t color) )
|
||||
{
|
||||
#define FN_NAME "grChromakeyValue"
|
||||
GR_BEGIN_NOFIFOCHECK("grChromakeyMode",85);
|
||||
|
||||
INVALIDATE(chromaKey);
|
||||
|
||||
STOREARG(grChromakeyValue, color);
|
||||
|
||||
#undef FN_NAME
|
||||
} /* grChromakeyValue */
|
||||
|
||||
/*-------------------------------------------------------------------
|
||||
Function: grDeptMask
|
||||
Date: 07-Oct-97
|
||||
Implementor(s): dow
|
||||
Description:
|
||||
|
||||
Arguments:
|
||||
|
||||
Return:
|
||||
-------------------------------------------------------------------*/
|
||||
GR_DIENTRY(grDepthMask, void , (FxBool enable) )
|
||||
{
|
||||
#define FN_NAME "grDepthMask"
|
||||
|
||||
GR_BEGIN_NOFIFOCHECK(FN_NAME, 85);
|
||||
|
||||
INVALIDATE(fbzMode);
|
||||
|
||||
STOREARG(grDepthMask, enable);
|
||||
|
||||
#undef FN_NAME
|
||||
} /* grDeptMask */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------
|
||||
Function: grDepthBufferFunction
|
||||
Date: 07-Oct-97
|
||||
Implementor(s): dow
|
||||
Description:
|
||||
|
||||
Arguments:
|
||||
|
||||
Return:
|
||||
-------------------------------------------------------------------*/
|
||||
GR_DIENTRY(grDepthBufferFunction, void , (GrCmpFnc_t fnc) )
|
||||
{
|
||||
#define FN_NAME "grDepthBufferFunction"
|
||||
GR_BEGIN_NOFIFOCHECK(FN_NAME, 85);
|
||||
|
||||
INVALIDATE(fbzMode);
|
||||
|
||||
STOREARG(grDepthBufferFunction, fnc);
|
||||
|
||||
#undef FN_NAME
|
||||
} /* grDepthBufferFunction */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------
|
||||
Function: grDepthBufferMode
|
||||
Date: 07-Oct-97
|
||||
Implementor(s): dow
|
||||
Description:
|
||||
|
||||
Arguments:
|
||||
|
||||
Return:
|
||||
-------------------------------------------------------------------*/
|
||||
GR_DIENTRY(grDepthBufferMode, void , (GrDepthBufferMode_t mode) )
|
||||
{
|
||||
#define FN_NAME "grDepthBufferMode"
|
||||
|
||||
GR_BEGIN_NOFIFOCHECK(FN_NAME, 85);
|
||||
|
||||
INVALIDATE(fbzMode);
|
||||
|
||||
STOREARG(grDepthBufferMode, mode);
|
||||
|
||||
#undef FN_NAME
|
||||
} /* grDepthBufferMode */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------
|
||||
Function: grDitherMode
|
||||
Date: 07-Oct-97
|
||||
Implementor(s): dow
|
||||
Description:
|
||||
|
||||
Arguments:
|
||||
|
||||
Return:
|
||||
-------------------------------------------------------------------*/
|
||||
GR_DIENTRY(grDitherMode, void , (GrDitherMode_t mode) )
|
||||
{
|
||||
#define FN_NAME "grDitherMode"
|
||||
|
||||
GR_BEGIN_NOFIFOCHECK(FN_NAME, 85);
|
||||
|
||||
INVALIDATE(fbzMode);
|
||||
|
||||
STOREARG(grDitherMode, mode);
|
||||
|
||||
#undef FN_NAME
|
||||
} /* grDitherMode */
|
||||
|
||||
/*-------------------------------------------------------------------
|
||||
Function: grRenderBuffer
|
||||
Date: 07-Oct-97
|
||||
Implementor(s): dow
|
||||
Description:
|
||||
|
||||
Arguments:
|
||||
|
||||
Return:
|
||||
-------------------------------------------------------------------*/
|
||||
GR_DIENTRY(grRenderBuffer, void , (GrBuffer_t buffer) )
|
||||
{
|
||||
#define FN_NAME "grRenderBuffer"
|
||||
|
||||
GR_BEGIN_NOFIFOCHECK(FN_NAME, 85);
|
||||
|
||||
INVALIDATE(fbzMode);
|
||||
|
||||
STOREARG(grRenderBuffer, buffer);
|
||||
|
||||
#undef FN_NAME
|
||||
} /* grRenderBuffer */
|
||||
|
||||
/*-------------------------------------------------------------------
|
||||
Function: grColorMask
|
||||
Date: 08-Oct-97
|
||||
Implementor(s): dow
|
||||
Description:
|
||||
|
||||
Arguments:
|
||||
|
||||
Return:
|
||||
-------------------------------------------------------------------*/
|
||||
GR_ENTRY(grColorMask, void , (FxBool rgb, FxBool alpha) )
|
||||
{
|
||||
#define FN_NAME "grColorMask"
|
||||
|
||||
GR_BEGIN_NOFIFOCHECK(FN_NAME, 85);
|
||||
|
||||
INVALIDATE(fbzMode);
|
||||
|
||||
STOREARG(grColorMask, rgb);
|
||||
STOREARG(grColorMask, alpha);
|
||||
|
||||
|
||||
#undef FN_NAME
|
||||
} /* grColorMask */
|
||||
|
||||
/*-------------------------------------------------------------------
|
||||
Function: grSstOrigin
|
||||
Date: 08-Oct-97
|
||||
Implementor(s): dow
|
||||
Description:
|
||||
|
||||
Arguments:
|
||||
|
||||
Return:
|
||||
-------------------------------------------------------------------*/
|
||||
GR_DIENTRY(grSstOrigin, void , (GrOriginLocation_t origin) )
|
||||
{
|
||||
#define FN_NAME "grSstOrigin"
|
||||
GR_BEGIN_NOFIFOCHECK(FN_NAME, 83);
|
||||
|
||||
INVALIDATE(chromaKey);
|
||||
|
||||
STOREARG(grSstOrigin, origin);
|
||||
|
||||
#undef FN_NAME
|
||||
} /* grSstOrigin */
|
||||
|
||||
/*-------------------------------------------------------------------
|
||||
Function: grClipWindow
|
||||
Date: 08-Oct-97
|
||||
Implementor(s): dow
|
||||
Description:
|
||||
|
||||
Arguments:
|
||||
|
||||
Return:
|
||||
-------------------------------------------------------------------*/
|
||||
GR_DIENTRY(grClipWindow, void , (FxU32 minx, FxU32 miny, FxU32 maxx,
|
||||
FxU32 maxy) )
|
||||
{
|
||||
#define FN_NAME "grClipWindow"
|
||||
|
||||
GR_BEGIN_NOFIFOCHECK(FN_NAME, 83);
|
||||
|
||||
INVALIDATE(clipRegs);
|
||||
|
||||
STOREARG(grClipWindow, minx);
|
||||
STOREARG(grClipWindow, miny);
|
||||
STOREARG(grClipWindow, maxx);
|
||||
STOREARG(grClipWindow, maxy);
|
||||
|
||||
#undef FN_NAME
|
||||
} /* grClipWindow */
|
||||
|
||||
/*-------------------------------------------------------------------
|
||||
Function: grDepthBiasLevel
|
||||
Date: 08-Oct-97
|
||||
Implementor(s): dow
|
||||
Description:
|
||||
|
||||
Arguments:
|
||||
|
||||
Return:
|
||||
-------------------------------------------------------------------*/
|
||||
GR_DIENTRY(grDepthBiasLevel, void , (FxI16 level) )
|
||||
{
|
||||
#define FN_NAME "grDepthBiasLevel"
|
||||
|
||||
GR_BEGIN_NOFIFOCHECK(FN_NAME, 83);
|
||||
|
||||
INVALIDATE(zaColor);
|
||||
|
||||
STOREARG(grDepthBiasLevel, level);
|
||||
|
||||
#undef FN_NAME
|
||||
} /* grDepthBiasLevel */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------
|
||||
Function: grFogMode
|
||||
Date: 08-Oct-97
|
||||
Implementor(s): dow
|
||||
Description:
|
||||
|
||||
Arguments:
|
||||
|
||||
Return:
|
||||
-------------------------------------------------------------------*/
|
||||
GR_DIENTRY(grFogMode, void , (GrFogMode_t mode) )
|
||||
{
|
||||
#define FN_NAME "grFogMode"
|
||||
|
||||
GR_BEGIN_NOFIFOCHECK(FN_NAME, 83);
|
||||
|
||||
INVALIDATE(fogMode);
|
||||
|
||||
STOREARG(grFogMode, mode);
|
||||
|
||||
#undef FN_NAME
|
||||
} /* grFogMode */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------
|
||||
Function: grFogColorValue
|
||||
Date: 08-Oct-97
|
||||
Implementor(s): dow
|
||||
Description:
|
||||
|
||||
Arguments:
|
||||
|
||||
Return:
|
||||
-------------------------------------------------------------------*/
|
||||
GR_DIENTRY(grFogColorValue, void , (GrColor_t color) )
|
||||
{
|
||||
#define FN_NAME "grFogColorValue"
|
||||
GR_BEGIN_NOFIFOCHECK(FN_NAME, 83);
|
||||
|
||||
INVALIDATE(fogColor);
|
||||
|
||||
STOREARG(grFogColorValue, color);
|
||||
|
||||
#undef FN_NAME
|
||||
} /* grFogColorValue */
|
||||
|
||||
/*-------------------------------------------------------------------
|
||||
Function: grLfbWriteColorFormat
|
||||
Date: 08-Oct-97
|
||||
Implementor(s): dow
|
||||
Description:
|
||||
|
||||
Arguments:
|
||||
|
||||
Return:
|
||||
-------------------------------------------------------------------*/
|
||||
GR_DIENTRY(grLfbWriteColorFormat, void , (GrColorFormat_t colorFormat) )
|
||||
{
|
||||
#define FN_NAME "grLfbWriteColorFormat"
|
||||
|
||||
GR_BEGIN_NOFIFOCHECK(FN_NAME, 82);
|
||||
|
||||
INVALIDATE(lfbMode);
|
||||
|
||||
STOREARG(grLfbWriteColorFormat, colorFormat);
|
||||
|
||||
#undef FN_NAME
|
||||
} /* grLfbWriteColorFormat */
|
||||
|
||||
/*-------------------------------------------------------------------
|
||||
Function: grLfbWriteColorSwizzle
|
||||
Date: 08-Oct-97
|
||||
Implementor(s): dow
|
||||
Description:
|
||||
|
||||
Arguments:
|
||||
|
||||
Return:
|
||||
-------------------------------------------------------------------*/
|
||||
GR_DIENTRY(grLfbWriteColorSwizzle, void , (FxBool swizzleBytes, FxBool
|
||||
swapWords) )
|
||||
{
|
||||
#define FN_NAME "grLfbWriteColorSwizzle"
|
||||
GR_BEGIN_NOFIFOCHECK(FN_NAME, 82);
|
||||
|
||||
INVALIDATE(lfbMode);
|
||||
|
||||
STOREARG(grLfbWriteColorSwizzle, swizzleBytes);
|
||||
STOREARG(grLfbWriteColorSwizzle, swapWords);
|
||||
|
||||
#undef FN_NAME
|
||||
} /* grLfbWriteColorSwizzle */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------
|
||||
Function: grConstantColorValue
|
||||
Date: 08-Oct-97
|
||||
Implementor(s): dow
|
||||
Description:
|
||||
|
||||
Arguments:
|
||||
|
||||
Return:
|
||||
-------------------------------------------------------------------*/
|
||||
GR_DIENTRY(grConstantColorValue, void , (GrColor_t color) )
|
||||
{
|
||||
#define FN_NAME "grConstantColorValue"
|
||||
|
||||
GR_BEGIN_NOFIFOCHECK(FN_NAME, 85);
|
||||
|
||||
INVALIDATE(c0c1);
|
||||
|
||||
STOREARG(grConstantColorValue, color);
|
||||
|
||||
#undef FN_NAME
|
||||
} /* grConstantColorValue */
|
||||
|
||||
|
||||
/*==========================================================================*/
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------
|
||||
Function: grValidateState
|
||||
Date: 08-Oct-97
|
||||
Implementor(s): dow
|
||||
Description:
|
||||
State Validation:
|
||||
Once a rendering primitive has determined that the state is invalid,
|
||||
it calls this routine. grValidateState then goes through valid
|
||||
markers and flushes all invalid state.
|
||||
-------------------------------------------------------------------*/
|
||||
void
|
||||
_grValidateState()
|
||||
{
|
||||
#define FN_NAME "_grValidateState"
|
||||
|
||||
GR_BEGIN_NOFIFOCHECK(FN_NAME, 85);
|
||||
|
||||
if (NOTVALID(alphaMode)) {
|
||||
_grAlphaBlendFunction(LOADARG(grAlphaBlendFunction, rgb_sf),
|
||||
LOADARG(grAlphaBlendFunction, rgb_df),
|
||||
LOADARG(grAlphaBlendFunction, alpha_sf),
|
||||
LOADARG(grAlphaBlendFunction, alpha_df));
|
||||
_grAlphaTestFunction(LOADARG(grAlphaTestFunction, fnc));
|
||||
_grAlphaTestReferenceValue(LOADARG(grAlphaTestReferenceValue, value));
|
||||
|
||||
}
|
||||
|
||||
if (NOTVALID(fbzColorPath)) {
|
||||
_grAlphaCombine(LOADARG(grAlphaCombine, function),
|
||||
LOADARG(grAlphaCombine, factor),
|
||||
LOADARG(grAlphaCombine, local),
|
||||
LOADARG(grAlphaCombine, other),
|
||||
LOADARG(grAlphaCombine, invert));
|
||||
_grAlphaControlsITRGBLighting(LOADARG(grAlphaControlsITRGBLighting,
|
||||
enable));
|
||||
_grColorCombine(LOADARG(grColorCombine, function),
|
||||
LOADARG(grColorCombine, factor),
|
||||
LOADARG(grColorCombine, local),
|
||||
LOADARG(grColorCombine, other),
|
||||
LOADARG(grColorCombine, invert));
|
||||
|
||||
}
|
||||
|
||||
if (NOTVALID(fbzMode)) {
|
||||
_grChromakeyMode(LOADARG(grChromakeyMode, mode));
|
||||
_grDepthMask(LOADARG(grDepthMask, enable));
|
||||
_grDepthBufferFunction(LOADARG(grDepthBufferFunction, fnc));
|
||||
_grDepthBufferMode(LOADARG(grDepthBufferMode, mode));
|
||||
_grDitherMode(LOADARG(grDitherMode, mode));
|
||||
_grRenderBuffer(LOADARG(grRenderBuffer, buffer));
|
||||
_grColorMask(LOADARG(grColorMask, rgb), LOADARG(grColorMask, alpha));
|
||||
_grSstOrigin(LOADARG(grSstOrigin, origin));
|
||||
|
||||
}
|
||||
|
||||
if (NOTVALID(chromaKey)) {
|
||||
#if defined(GLIDE3) && defined(GLIDE3_ALPHA)
|
||||
_grChromaRangeExt(LOADARG(grChromakeyValue, color),LOADARG(grChromaRange, range)
|
||||
, LOADARG(grChromaRange, mode));
|
||||
|
||||
#else
|
||||
_grChromakeyValue(LOADARG(grChromakeyValue, color));
|
||||
#endif
|
||||
}
|
||||
|
||||
if (NOTVALID(clipRegs)) {
|
||||
_grClipWindow(
|
||||
LOADARG(grClipWindow, minx),
|
||||
LOADARG(grClipWindow, miny),
|
||||
LOADARG(grClipWindow, maxx),
|
||||
LOADARG(grClipWindow, maxy));
|
||||
}
|
||||
|
||||
if (NOTVALID(zaColor)) {
|
||||
_grDepthBiasLevel((FxI16) LOADARG(grDepthBiasLevel, level));
|
||||
}
|
||||
|
||||
if (NOTVALID(fogMode)) {
|
||||
_grFogMode(LOADARG(grFogMode, mode));
|
||||
}
|
||||
|
||||
if (NOTVALID(fogColor)) {
|
||||
_grFogColorValue(LOADARG(grFogColorValue, color));
|
||||
}
|
||||
|
||||
if (NOTVALID(lfbMode)) {
|
||||
_grLfbWriteColorFormat(LOADARG(grLfbWriteColorFormat, colorFormat));
|
||||
_grLfbWriteColorSwizzle(LOADARG(grLfbWriteColorSwizzle, swizzleBytes),
|
||||
LOADARG(grLfbWriteColorSwizzle, swapWords));
|
||||
|
||||
}
|
||||
|
||||
if (NOTVALID(c0c1)) {
|
||||
_grConstantColorValue(LOADARG(grConstantColorValue, color));
|
||||
}
|
||||
|
||||
_grUpdateParamIndex();
|
||||
|
||||
_grFlushCommonStateRegs();
|
||||
|
||||
#undef FN_NAME
|
||||
} /* _grValidateState */
|
||||
|
||||
#define IARRAY(p,i) (*((FxU32 *)(p)+(i)))
|
||||
|
||||
/*-------------------------------------------------------------------
|
||||
Function: grEnable
|
||||
Date: 10-Oct-97
|
||||
Implementor(s): atai
|
||||
Description:
|
||||
|
||||
Arguments:
|
||||
|
||||
Return:
|
||||
-------------------------------------------------------------------*/
|
||||
GR_DIENTRY(grEnable, void , (GrEnableMode_t mode) )
|
||||
{
|
||||
#define FN_NAME "grEnable"
|
||||
GR_BEGIN_NOFIFOCHECK(FN_NAME, 85);
|
||||
|
||||
switch (mode) {
|
||||
case GR_AA_ORDERED:
|
||||
ENABLEMODE(primitive_smooth_mode);
|
||||
break;
|
||||
case GR_SHAMELESS_PLUG:
|
||||
ENABLEMODE(shameless_plug_mode);
|
||||
_GlideRoot.environment.shamelessPlug = mode;
|
||||
break;
|
||||
case GR_VIDEO_SMOOTHING:
|
||||
ENABLEMODE(video_smooth_mode);
|
||||
break;
|
||||
case GR_ALLOW_MIPMAP_DITHER:
|
||||
gc->state.allowLODdither = GR_MODE_ENABLE;
|
||||
break;
|
||||
}
|
||||
|
||||
#undef FN_NAME
|
||||
} /* grEnable */
|
||||
|
||||
/*-------------------------------------------------------------------
|
||||
Function: grDisable
|
||||
Date: 10-Oct-97
|
||||
Implementor(s): atai
|
||||
Description:
|
||||
|
||||
Arguments:
|
||||
|
||||
Return:
|
||||
-------------------------------------------------------------------*/
|
||||
GR_DIENTRY(grDisable, void , (GrEnableMode_t mode) )
|
||||
{
|
||||
#define FN_NAME "grDisable"
|
||||
GR_BEGIN_NOFIFOCHECK(FN_NAME, 85);
|
||||
|
||||
switch (mode) {
|
||||
case GR_AA_ORDERED:
|
||||
DISABLEMODE(primitive_smooth_mode);
|
||||
break;
|
||||
case GR_SHAMELESS_PLUG:
|
||||
DISABLEMODE(shameless_plug_mode);
|
||||
break;
|
||||
case GR_VIDEO_SMOOTHING:
|
||||
DISABLEMODE(video_smooth_mode);
|
||||
break;
|
||||
case GR_ALLOW_MIPMAP_DITHER:
|
||||
gc->state.allowLODdither = GR_MODE_DISABLE;
|
||||
break;
|
||||
}
|
||||
|
||||
#undef FN_NAME
|
||||
} /* grDisable */
|
||||
|
||||
/*-------------------------------------------------------------------
|
||||
Function: grCoordinateSpace
|
||||
Date: 01-Dec-97
|
||||
Implementor(s): atai
|
||||
Description:
|
||||
|
||||
Arguments:
|
||||
|
||||
Return:
|
||||
-------------------------------------------------------------------*/
|
||||
GR_DIENTRY(grCoordinateSpace, void , (GrCoordinateSpaceMode_t mode) )
|
||||
{
|
||||
#define FN_NAME "grCoordinateSpace"
|
||||
GR_BEGIN_NOFIFOCHECK(FN_NAME, 85);
|
||||
|
||||
switch (mode) {
|
||||
case GR_WINDOW_COORDS:
|
||||
gc->state.grCoordinateSpaceArgs.coordinate_space_mode = GR_WINDOW_COORDS;
|
||||
break;
|
||||
case GR_CLIP_COORDS:
|
||||
gc->state.grCoordinateSpaceArgs.coordinate_space_mode = GR_CLIP_COORDS;
|
||||
break;
|
||||
}
|
||||
|
||||
#undef FN_NAME
|
||||
} /* grCoordinateSpace */
|
||||
|
||||
/*-------------------------------------------------------------------
|
||||
Function: grDepthRange
|
||||
Date: 01-Dec-97
|
||||
Implementor(s): atai
|
||||
Description:
|
||||
|
||||
Arguments:
|
||||
|
||||
Return:
|
||||
-------------------------------------------------------------------*/
|
||||
GR_DIENTRY(grDepthRange, void , (FxFloat n, FxFloat f) )
|
||||
{
|
||||
#define FN_NAME "grDepthRange"
|
||||
GR_BEGIN_NOFIFOCHECK(FN_NAME, 85);
|
||||
|
||||
gc->state.Viewport.n = n;
|
||||
gc->state.Viewport.f = f;
|
||||
gc->state.Viewport.hdepth = (f - n) * 0.5f * 65535.f;
|
||||
gc->state.Viewport.oz = (f + n) * 0.5f * 65535.f;
|
||||
|
||||
#undef FN_NAME
|
||||
} /* grDepthRange */
|
||||
|
||||
/*-------------------------------------------------------------------
|
||||
Function: grViewport
|
||||
Date: 01-Dec-97
|
||||
Implementor(s): atai
|
||||
Description:
|
||||
|
||||
Arguments:
|
||||
|
||||
Return:
|
||||
-------------------------------------------------------------------*/
|
||||
GR_DIENTRY(grViewport, void , (FxI32 x, FxI32 y, FxI32 width, FxI32 height) )
|
||||
{
|
||||
#define FN_NAME "grViewport"
|
||||
GR_BEGIN_NOFIFOCHECK(FN_NAME, 85);
|
||||
|
||||
gc->state.Viewport.ox = (FxFloat)(x + width * 0.5f);
|
||||
gc->state.Viewport.oy = (FxFloat)(y + height *0.5f);
|
||||
gc->state.Viewport.hwidth = width * 0.5f;
|
||||
gc->state.Viewport.hheight = height * 0.5f;
|
||||
|
||||
#undef FN_NAME
|
||||
} /* grViewport */
|
||||
|
||||
#endif /* GLIDE3 */
|
||||
@@ -1,445 +0,0 @@
|
||||
/*
|
||||
** 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
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
*
|
||||
* 14 1/08/98 4:58p Atai
|
||||
* tex table broadcast, grVertexLayout enable/disable, stq, and some
|
||||
* defines
|
||||
*
|
||||
* 13 12/12/97 10:59a Atai
|
||||
* clip space and viewport
|
||||
*
|
||||
* 12 12/08/97 10:42a Atai
|
||||
* added grDrawVertexArrayLinear()
|
||||
*
|
||||
* 11 11/21/97 6:05p Atai
|
||||
* use one datalist (tsuDataList) in glide3
|
||||
*
|
||||
* 10 11/18/97 6:11p Peter
|
||||
* fixed glide3 muckage
|
||||
*
|
||||
* 9 11/18/97 3:24p Atai
|
||||
* change grParameterData to grVertexLayout
|
||||
* define GR_PARAM_*
|
||||
*
|
||||
* 8 11/07/97 11:22a Atai
|
||||
* remove GR_*_SMOOTH. use GR_SMOOTH
|
||||
*
|
||||
* 7 11/06/97 6:10p Atai
|
||||
* update GrState size
|
||||
* rename grDrawArray to grDrawVertexArray
|
||||
* update _grDrawPoint and _grDrawVertexList
|
||||
*
|
||||
* 6 10/21/97 8:36p Atai
|
||||
* added gr_lines routines
|
||||
* use dword offset
|
||||
*
|
||||
* 5 10/17/97 2:11p Atai
|
||||
* added grContinueArray. We only support non aa mode for now.
|
||||
*
|
||||
* 4 10/14/97 4:34p Atai
|
||||
* filled out the calls to different drawarray routines
|
||||
*
|
||||
* 3 9/29/97 1:26p Dow
|
||||
* Fixed packed color strips/fans
|
||||
*
|
||||
* 2 9/26/97 10:24a Dow
|
||||
* Fixed state muckage in Glide3 parameter data
|
||||
*
|
||||
* 1 9/23/97 2:04p Dow
|
||||
* DI code for strips
|
||||
**
|
||||
*/
|
||||
#ifdef GLIDE3
|
||||
|
||||
#include <3dfx.h>
|
||||
#include <glidesys.h>
|
||||
|
||||
#define FX_DLL_DEFINITION
|
||||
#include <fxdll.h>
|
||||
#include <glide.h>
|
||||
#include "fxglide.h"
|
||||
|
||||
/*-------------------------------------------------------------------
|
||||
Function: grVertexLayout
|
||||
Date: 17-Sep-97
|
||||
Implementor(s): dow
|
||||
Library: Init Code for
|
||||
Description:
|
||||
This routine defines the format for vertex arrays.
|
||||
|
||||
Arguments:
|
||||
param - Type of date-i.e. vertex, color, or texture info:
|
||||
GR_COLOR, GR_VERTEX, GR_TEXTURE0, GR_TEXTURE1
|
||||
components - Which components are specified
|
||||
Valid Components:
|
||||
|
||||
|
||||
So, this table summarizes the legal combinations:
|
||||
Param Type Size Description
|
||||
=======================================================================================================
|
||||
GR_PARAM_XY FxFloat 8 X and Y coordinates. Offset must be zero.
|
||||
GR_PARAM_Z FxFloat 4 Z coordinate.
|
||||
GR_PARAM_A FxFloat 4 Alpha value.
|
||||
GR_PARAM_RGB FxFloat 12 RGB triplet.
|
||||
GR_PARAM_PARGB FxU32 4 Packed ARGB. High-order byte is A, followed by R, G, and B.
|
||||
GR_PARAM_STn FxFloat 8 S and T coordinates for TMU , where n is in the range [0, TBD]
|
||||
GR_PARAM_Wn FxFloat 4
|
||||
|
||||
Return:
|
||||
Nothing ever.
|
||||
-------------------------------------------------------------------*/
|
||||
GR_DIENTRY(grVertexLayout, void , (FxU32 param, FxI32 offset, FxU32 mode) )
|
||||
{
|
||||
#define FN_NAME "grParameterData"
|
||||
GR_BEGIN_NOFIFOCHECK(FN_NAME, 85);
|
||||
|
||||
GDBG_INFO_MORE(gc->myLevel, "(0x%x, 0x%x)\n", param, offset);
|
||||
|
||||
gc->state.vData.vertexInfo.param = param;
|
||||
|
||||
switch (param) {
|
||||
case GR_PARAM_XY:
|
||||
GR_CHECK_F(myName,
|
||||
(offset != 0),
|
||||
"Offset must be zero.");
|
||||
|
||||
gc->state.vData.vertexInfo.offset = offset;
|
||||
gc->state.vData.vertexInfo.mode = mode;
|
||||
break;
|
||||
|
||||
case GR_PARAM_Z:
|
||||
|
||||
gc->state.vData.zInfo.offset = offset;
|
||||
gc->state.vData.zInfo.mode = mode;
|
||||
|
||||
break;
|
||||
|
||||
case GR_PARAM_W:
|
||||
|
||||
gc->state.vData.wInfo.offset = offset;
|
||||
gc->state.vData.wInfo.mode = mode;
|
||||
|
||||
break;
|
||||
|
||||
case GR_PARAM_A:
|
||||
|
||||
gc->state.vData.aInfo.offset = offset;
|
||||
gc->state.vData.colorType = GR_FLOAT;
|
||||
gc->state.vData.aInfo.mode = mode;
|
||||
|
||||
break;
|
||||
case GR_PARAM_RGB:
|
||||
|
||||
gc->state.vData.rgbInfo.offset = offset;
|
||||
gc->state.vData.colorType = GR_FLOAT;
|
||||
gc->state.vData.rgbInfo.mode = mode;
|
||||
|
||||
break;
|
||||
case GR_PARAM_PARGB:
|
||||
|
||||
gc->state.vData.pargbInfo.offset = offset;
|
||||
gc->state.vData.colorType = GR_U8;
|
||||
gc->state.vData.pargbInfo.mode = mode;
|
||||
|
||||
break;
|
||||
case GR_PARAM_ST0:
|
||||
|
||||
gc->state.vData.st0Info.offset = offset;
|
||||
gc->state.vData.st0Info.mode = mode;
|
||||
|
||||
break;
|
||||
case GR_PARAM_ST1:
|
||||
|
||||
gc->state.vData.st1Info.offset = offset;
|
||||
gc->state.vData.st1Info.mode = mode;
|
||||
|
||||
break;
|
||||
case GR_PARAM_Q:
|
||||
|
||||
gc->state.vData.qInfo.offset = offset;
|
||||
gc->state.vData.qInfo.mode = mode;
|
||||
|
||||
break;
|
||||
case GR_PARAM_Q0:
|
||||
|
||||
gc->state.vData.q0Info.offset = offset;
|
||||
gc->state.vData.q0Info.mode = mode;
|
||||
|
||||
break;
|
||||
case GR_PARAM_Q1:
|
||||
|
||||
gc->state.vData.q1Info.offset = offset;
|
||||
gc->state.vData.q1Info.mode = mode;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
#if !GLIDE3_VERTEX_LAYOUT
|
||||
switch (param) {
|
||||
case GR_VERTEX:
|
||||
GR_CHECK_F(myName,
|
||||
!((components == GR_VERTEX_XYZ) ||
|
||||
(components == GR_VERTEX_XYZW)),
|
||||
"Bad Component for Vertex Parameter");
|
||||
gc->state.vData.vertexInfo.components = components;
|
||||
|
||||
GR_CHECK_F(myName, !(type == GR_FLOAT), "Bad Type for Vertex Parameter");
|
||||
gc->state.vData.vertexInfo.type = type;
|
||||
|
||||
gc->state.vData.vertexInfo.offset = offset;
|
||||
|
||||
GDBG_INFO(gc->myLevel, "%s: Vertex Offset = %d\n", FN_NAME,
|
||||
gc->state.vData.vertexInfo.offset);
|
||||
|
||||
break;
|
||||
|
||||
case GR_COLOR:
|
||||
GR_CHECK_F(myName,
|
||||
!((components == GR_COLOR_RGB) || (components == GR_COLOR_RGBA)),
|
||||
"Bad Component for Color Parameter");
|
||||
gc->state.vData.colorInfo.components = components;
|
||||
|
||||
GR_CHECK_F(myName, !((type == GR_FLOAT) || (type == GR_U8)),
|
||||
"Bad Type for Color Parameter");
|
||||
gc->state.vData.colorInfo.type = type;
|
||||
|
||||
gc->state.vData.colorInfo.offset = offset;
|
||||
GDBG_INFO(gc->myLevel, "%s: Color Offset = %d\n", FN_NAME,
|
||||
gc->state.vData.colorInfo.offset);
|
||||
|
||||
break;
|
||||
|
||||
case GR_TEXTURE0:
|
||||
GR_CHECK_F(myName,
|
||||
!((components == GR_TEX_NONE) || (components == GR_TEX_ST) ||
|
||||
(components == GR_TEX_STW)),
|
||||
"Bad Component for Texture Parameter");
|
||||
gc->state.vData.tex0Info.components = components;
|
||||
|
||||
GR_CHECK_F(myName, !(type == GR_FLOAT), "Bad Type for Texture Parameter");
|
||||
gc->state.vData.tex0Info.type == type;
|
||||
|
||||
gc->state.vData.tex0Info.offset = offset;
|
||||
GDBG_INFO(gc->myLevel, "%s: Tex0 Offset = %d\n", FN_NAME,
|
||||
gc->state.vData.tex0Info.offset);
|
||||
|
||||
break;
|
||||
|
||||
case GR_TEXTURE1:
|
||||
GR_CHECK_F(myName,
|
||||
!((components == GR_TEX_NONE) || (components == GR_TEX_ST) ||
|
||||
(components == GR_TEX_STW)),
|
||||
"Bad Component for Texture Parameter");
|
||||
gc->state.vData.tex1Info.components = components;
|
||||
|
||||
GR_CHECK_F(myName, !(type == GR_FLOAT), "Bad Type for Texture Parameter");
|
||||
gc->state.vData.tex1Info.type == type;
|
||||
|
||||
gc->state.vData.tex1Info.offset = offset;
|
||||
GDBG_INFO(gc->myLevel, "%s: Tex1 Offset = %d\n", FN_NAME,
|
||||
gc->state.vData.tex1Info.offset);
|
||||
break;
|
||||
|
||||
default:
|
||||
GR_CHECK_F(myName, 0, "Invalid Parameter");
|
||||
break;
|
||||
|
||||
}
|
||||
#endif /* !GLIDE3_VERTEX_LAYOUT */
|
||||
|
||||
_grRebuildDataList();
|
||||
|
||||
GR_END();
|
||||
#undef FN_NAME
|
||||
} /* grParameterData */
|
||||
|
||||
/*-------------------------------------------------------------------
|
||||
Function: grDrawVertexArray
|
||||
Date: 18-Sep-97
|
||||
Implementor(s): dow
|
||||
Description:
|
||||
|
||||
Arguments:
|
||||
mode: GR_POINTS, GR_LINE_STRIP, GR_POLYGON, GR_TRIANLGE_STRIP,
|
||||
GR_TRIANGLE_FAN, GR_TRIANGLES
|
||||
|
||||
Return:
|
||||
Nothing ever
|
||||
-------------------------------------------------------------------*/
|
||||
GR_DIENTRY(grDrawVertexArray, void , (FxU32 mode, FxU32 Count, void *pointers) )
|
||||
{
|
||||
#define FN_NAME "grDrawVertexArray"
|
||||
GR_BEGIN_NOFIFOCHECK(FN_NAME, 90);
|
||||
|
||||
GDBG_INFO_MORE(gc->myLevel, "(0x%x, 0x%x, 0x%x)\n",
|
||||
mode, Count, pointers);
|
||||
|
||||
#ifdef GDBG_INFO_ON
|
||||
{
|
||||
FxU32 i;
|
||||
for (i = 0; i < Count; i++)
|
||||
GDBG_INFO(110, "%s: pointers[%d] = 0x%x\n",
|
||||
FN_NAME, i, ((float **)pointers)[i]);
|
||||
}
|
||||
#endif
|
||||
|
||||
switch (mode) {
|
||||
case GR_POINTS:
|
||||
if (gc->state.grEnableArgs.primitive_smooth_mode)
|
||||
_grAADrawPoints(GR_VTX_PTR_ARRAY, Count, pointers);
|
||||
else
|
||||
_grDrawPoints(GR_VTX_PTR_ARRAY, Count, pointers);
|
||||
break;
|
||||
case GR_LINE_STRIP:
|
||||
if (gc->state.grEnableArgs.primitive_smooth_mode)
|
||||
_grAADrawLineStrip(GR_VTX_PTR_ARRAY, GR_LINE_STRIP, Count, pointers);
|
||||
else
|
||||
_grDrawLineStrip(GR_VTX_PTR_ARRAY, GR_LINE_STRIP, Count, pointers);
|
||||
break;
|
||||
case GR_LINES:
|
||||
if (gc->state.grEnableArgs.primitive_smooth_mode)
|
||||
_grAADrawLineStrip(GR_VTX_PTR_ARRAY, GR_LINES, Count, pointers);
|
||||
else
|
||||
_grDrawLineStrip(GR_VTX_PTR_ARRAY, GR_LINES, Count, pointers);
|
||||
break;
|
||||
case GR_POLYGON:
|
||||
if (gc->state.grEnableArgs.primitive_smooth_mode)
|
||||
_grAADrawVertexList(kSetupFan, GR_VTX_PTR_ARRAY, Count, pointers);
|
||||
else
|
||||
_grDrawVertexList(kSetupFan, GR_VTX_PTR_ARRAY, Count, pointers);
|
||||
break;
|
||||
|
||||
case GR_TRIANGLE_STRIP:
|
||||
if (gc->state.grEnableArgs.primitive_smooth_mode)
|
||||
_grAADrawVertexList(kSetupStrip, GR_VTX_PTR_ARRAY, Count, pointers);
|
||||
else
|
||||
_grDrawVertexList(kSetupStrip, GR_VTX_PTR_ARRAY, Count, pointers);
|
||||
break;
|
||||
|
||||
case GR_TRIANGLE_FAN:
|
||||
if (gc->state.grEnableArgs.primitive_smooth_mode)
|
||||
_grAADrawVertexList(kSetupFan, GR_VTX_PTR_ARRAY, Count, pointers);
|
||||
else
|
||||
_grDrawVertexList(kSetupFan, GR_VTX_PTR_ARRAY, Count, pointers);
|
||||
break;
|
||||
|
||||
case GR_TRIANGLES:
|
||||
if (gc->state.grEnableArgs.primitive_smooth_mode)
|
||||
if (gc->state.grCoordinateSpaceArgs.coordinate_space_mode == GR_WINDOW_COORDS)
|
||||
_grAADrawTriangles(GR_VTX_PTR_ARRAY, GR_TRIANGLES, Count, pointers);
|
||||
else
|
||||
_grAAVpDrawTriangles(GR_VTX_PTR_ARRAY, GR_TRIANGLES, Count, pointers);
|
||||
else
|
||||
_grDrawTriangles(GR_VTX_PTR_ARRAY, Count, pointers);
|
||||
break;
|
||||
|
||||
}
|
||||
#undef FN_NAME
|
||||
} /* grDrawVertexArray */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------
|
||||
Function: grDrawVertexArrayLinear
|
||||
Date: 04-Dec-97
|
||||
Implementor(s): atai
|
||||
Description:
|
||||
|
||||
Arguments:
|
||||
mode: GR_POINTS, GR_LINE_STRIP, GR_POLYGON, GR_TRIANLGE_STRIP,
|
||||
GR_TRIANGLE_FAN, GR_TRIANGLES
|
||||
|
||||
Return:
|
||||
Nothing ever
|
||||
-------------------------------------------------------------------*/
|
||||
GR_DIENTRY(grDrawVertexArrayLinear, void , (FxU32 mode, FxU32 Count, void *pointers, FxU32 stride) )
|
||||
{
|
||||
#define FN_NAME "grDrawVertexArrayLinear"
|
||||
GR_BEGIN_NOFIFOCHECK(FN_NAME, 90);
|
||||
|
||||
GDBG_INFO_MORE(gc->myLevel, "(0x%x, 0x%x, 0x%x)\n",
|
||||
mode, Count, pointers);
|
||||
|
||||
#ifdef GDBG_INFO_ON
|
||||
{
|
||||
FxU32 i;
|
||||
for (i = 0; i < Count; i++)
|
||||
GDBG_INFO(110, "%s: pointers[%d] = 0x%x\n",
|
||||
FN_NAME, i, (int)pointers + gc->state.vData.vStride * i);
|
||||
}
|
||||
#endif
|
||||
|
||||
gc->state.vData.vStride = stride >> 2;
|
||||
switch (mode) {
|
||||
case GR_POINTS:
|
||||
if (gc->state.grEnableArgs.primitive_smooth_mode)
|
||||
_grAADrawPoints(GR_VTX_PTR, Count, pointers);
|
||||
else
|
||||
_grDrawPoints(GR_VTX_PTR, Count, pointers);
|
||||
break;
|
||||
case GR_LINE_STRIP:
|
||||
if (gc->state.grEnableArgs.primitive_smooth_mode)
|
||||
_grAADrawLineStrip(GR_VTX_PTR, GR_LINE_STRIP, Count, pointers);
|
||||
else
|
||||
_grDrawLineStrip(GR_VTX_PTR, GR_LINE_STRIP, Count, pointers);
|
||||
break;
|
||||
case GR_LINES:
|
||||
if (gc->state.grEnableArgs.primitive_smooth_mode)
|
||||
_grAADrawLineStrip(GR_VTX_PTR, GR_LINES, Count, pointers);
|
||||
else
|
||||
_grDrawLineStrip(GR_VTX_PTR, GR_LINES, Count, pointers);
|
||||
break;
|
||||
case GR_POLYGON:
|
||||
if (gc->state.grEnableArgs.primitive_smooth_mode)
|
||||
_grAADrawVertexList(kSetupFan, GR_VTX_PTR, Count, pointers);
|
||||
else
|
||||
_grDrawVertexList(kSetupFan, GR_VTX_PTR, Count, pointers);
|
||||
break;
|
||||
|
||||
case GR_TRIANGLE_STRIP:
|
||||
if (gc->state.grEnableArgs.primitive_smooth_mode)
|
||||
_grAADrawVertexList(kSetupStrip, GR_VTX_PTR, Count, pointers);
|
||||
else
|
||||
_grDrawVertexList(kSetupStrip, GR_VTX_PTR, Count, pointers);
|
||||
break;
|
||||
|
||||
case GR_TRIANGLE_FAN:
|
||||
if (gc->state.grEnableArgs.primitive_smooth_mode)
|
||||
_grAADrawVertexList(kSetupFan, GR_VTX_PTR, Count, pointers);
|
||||
else
|
||||
_grDrawVertexList(kSetupFan, GR_VTX_PTR, Count, pointers);
|
||||
break;
|
||||
|
||||
case GR_TRIANGLES:
|
||||
if (gc->state.grEnableArgs.primitive_smooth_mode)
|
||||
if (gc->state.grCoordinateSpaceArgs.coordinate_space_mode == GR_WINDOW_COORDS)
|
||||
_grAADrawTriangles(GR_VTX_PTR, GR_TRIANGLES, Count, pointers);
|
||||
else
|
||||
_grAAVpDrawTriangles(GR_VTX_PTR, GR_TRIANGLES, Count, pointers);
|
||||
else
|
||||
_grDrawTriangles(GR_VTX_PTR, Count, pointers);
|
||||
break;
|
||||
|
||||
}
|
||||
#undef FN_NAME
|
||||
} /* grDrawVertexArrayLinear */
|
||||
|
||||
#endif /* GLIDE3 */
|
||||
@@ -1,674 +0,0 @@
|
||||
/*
|
||||
** 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
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
**
|
||||
** 20 6/06/98 12:06p Peter
|
||||
** gmt's trilinear hell bug
|
||||
**
|
||||
** 19 2/20/98 5:31p Peter
|
||||
** crybaby glide
|
||||
**
|
||||
** 18 2/20/98 11:00a Peter
|
||||
** removed glide3 from glid2 tree
|
||||
**
|
||||
** 17 1/30/98 4:31p Peter
|
||||
** general clenaup
|
||||
*
|
||||
* 16 1/13/98 12:42p Atai
|
||||
* fixed grtexinfo, grVertexLayout, and draw triangle
|
||||
*
|
||||
* 15 1/09/98 6:48p Atai
|
||||
* grTexInfo, GR_LOD_* and GR_ASPECT_*
|
||||
*
|
||||
* 13 12/09/97 12:20p Peter
|
||||
* mac glide port
|
||||
*
|
||||
* 12 12/02/97 9:49a Dow
|
||||
* Got rid of Texelfx rev 0 warning
|
||||
*
|
||||
* 11 11/20/97 6:58p Dow
|
||||
* Marked _grTexTextureMemRequired for movement
|
||||
*
|
||||
* 10 8/18/97 3:52p Peter
|
||||
* pre-hw arrival fixes/cleanup
|
||||
*
|
||||
* 9 6/02/97 4:09p Peter
|
||||
* Compile w/ gcc for Dural
|
||||
*
|
||||
* 8 5/27/97 1:16p Peter
|
||||
* Basic cvg, w/o cmd fifo stuff.
|
||||
*
|
||||
* 7 5/21/97 6:04a Peter
|
||||
*
|
||||
* 6 3/15/97 8:09p Jdt
|
||||
* Remove grTexDownloadTable from this file because I added SST-1 only
|
||||
* code to it
|
||||
*
|
||||
* 5 3/09/97 10:31a Dow
|
||||
* Added GR_DIENTRY for di glide functions
|
||||
*
|
||||
* 4 2/12/97 2:09p Hanson
|
||||
* Hopefully removed the rest of my muckage.
|
||||
*
|
||||
* 3 2/12/97 12:34p Dow
|
||||
* Fixed Hanson muckage
|
||||
*
|
||||
* 2 1/18/97 11:41p Dow
|
||||
* Fixed Gary's "Last C Bug" analog
|
||||
* Fixed usage of _grMipMapOffset_Tsplit
|
||||
*
|
||||
* 1 12/23/96 1:39p Dow
|
||||
* Changes for multiplatform
|
||||
**
|
||||
*/
|
||||
|
||||
#include <3dfx.h>
|
||||
|
||||
#define FX_DLL_DEFINITION
|
||||
#include <fxdll.h>
|
||||
#include <glide.h>
|
||||
#include "fxglide.h"
|
||||
|
||||
const FxU32 _gr_aspect_index_table[] =
|
||||
{
|
||||
3,
|
||||
2,
|
||||
1,
|
||||
0,
|
||||
1,
|
||||
2,
|
||||
3,
|
||||
};
|
||||
|
||||
/* size in texels */
|
||||
const FxU32 _grMipMapHostSize[4][16] =
|
||||
{
|
||||
{ /* 1:1 aspect ratio */
|
||||
65536, /* 0 : 256x256 */
|
||||
16384, /* 1 : 128x128 */
|
||||
4096, /* 2 : 64x64 */
|
||||
1024, /* 3 : 32x32 */
|
||||
256, /* 4 : 16x16 */
|
||||
64, /* 5 : 8x8 */
|
||||
16, /* 6 : 4x4 */
|
||||
4, /* 7 : 2x2 */
|
||||
1, /* 8 : 1x1 */
|
||||
},
|
||||
{ /* 2:1 aspect ratio */
|
||||
32768, /* 0 : 256x128 */
|
||||
8192, /* 1 : 128x64 */
|
||||
2048, /* 2 : 64x32 */
|
||||
512, /* 3 : 32x16 */
|
||||
128, /* 4 : 16x8 */
|
||||
32, /* 5 : 8x4 */
|
||||
8, /* 6 : 4x2 */
|
||||
2, /* 7 : 2x1 */
|
||||
1, /* 8 : 1x1 */
|
||||
},
|
||||
{ /* 4:1 aspect ratio */
|
||||
16384, /* 0 : 256x64 */
|
||||
4096, /* 1 : 128x32 */
|
||||
1024, /* 2 : 64x16 */
|
||||
256, /* 3 : 32x8 */
|
||||
64, /* 4 : 16x4 */
|
||||
16, /* 5 : 8x2 */
|
||||
4, /* 6 : 4x1 */
|
||||
2, /* 7 : 2x1 */
|
||||
1, /* 8 : 1x1 */
|
||||
},
|
||||
{ /* 8:1 aspect ratio */
|
||||
8192, /* 0 : 256x32 */
|
||||
2048, /* 1 : 128x16 */
|
||||
512, /* 2 : 64x8 */
|
||||
128, /* 3 : 32x4 */
|
||||
32, /* 4 : 16x2 */
|
||||
8, /* 5 : 8x1 */
|
||||
4, /* 6 : 4x1 */
|
||||
2, /* 7 : 2x1 */
|
||||
1, /* 8 : 1x1 */
|
||||
}
|
||||
};
|
||||
|
||||
const int _grMipMapHostWH[GR_ASPECT_1x8 + 1][GR_LOD_1 + 1][2] =
|
||||
{
|
||||
{
|
||||
{ 256 , 32 },
|
||||
{ 128 , 16 },
|
||||
{ 64 , 8 },
|
||||
{ 32 , 4 },
|
||||
{ 16 , 2 },
|
||||
{ 8 , 1 },
|
||||
{ 4 , 1 },
|
||||
{ 2 , 1 },
|
||||
{ 1 , 1 }
|
||||
},
|
||||
{
|
||||
{ 256 , 64 },
|
||||
{ 128 , 32 },
|
||||
{ 64 , 16 },
|
||||
{ 32 , 8 },
|
||||
{ 16 , 4 },
|
||||
{ 8 , 2 },
|
||||
{ 4 , 1 },
|
||||
{ 2 , 1 },
|
||||
{ 1 , 1 }
|
||||
} ,
|
||||
{
|
||||
{ 256 , 128 },
|
||||
{ 128 , 64 },
|
||||
{ 64 , 32 },
|
||||
{ 32 , 16 },
|
||||
{ 16 , 8 },
|
||||
{ 8 , 4 },
|
||||
{ 4 , 2 },
|
||||
{ 2 , 1 },
|
||||
{ 1 , 1 }
|
||||
},
|
||||
{
|
||||
{ 256 , 256 },
|
||||
{ 128 , 128 },
|
||||
{ 64 , 64 },
|
||||
{ 32 , 32 },
|
||||
{ 16 , 16 },
|
||||
{ 8 , 8 },
|
||||
{ 4 , 4 },
|
||||
{ 2 , 2 },
|
||||
{ 1 , 1 }
|
||||
},
|
||||
{
|
||||
{ 128, 256 },
|
||||
{ 64, 128 },
|
||||
{ 32, 64 },
|
||||
{ 16, 32 },
|
||||
{ 8, 16 },
|
||||
{ 4, 8 },
|
||||
{ 2, 4 },
|
||||
{ 1, 2 },
|
||||
{ 1, 1 }
|
||||
},
|
||||
{
|
||||
{ 64, 256 },
|
||||
{ 32, 128 },
|
||||
{ 16, 64 },
|
||||
{ 8, 32 },
|
||||
{ 4, 16 },
|
||||
{ 2, 8 },
|
||||
{ 1, 4 },
|
||||
{ 1, 2 },
|
||||
{ 1, 1 }
|
||||
},
|
||||
{
|
||||
{ 32, 256 },
|
||||
{ 16, 128 },
|
||||
{ 8, 64 },
|
||||
{ 4, 32 },
|
||||
{ 2, 16 },
|
||||
{ 1, 8 },
|
||||
{ 1, 4 },
|
||||
{ 1, 2 },
|
||||
{ 1, 1 }
|
||||
}
|
||||
};
|
||||
|
||||
/* translates GR_ASPECT_* to bits for the TLOD register */
|
||||
const FxU32 _gr_aspect_xlate_table[] =
|
||||
{
|
||||
(3<< SST_LOD_ASPECT_SHIFT) | SST_LOD_S_IS_WIDER,
|
||||
(2<< SST_LOD_ASPECT_SHIFT) | SST_LOD_S_IS_WIDER,
|
||||
(1<< SST_LOD_ASPECT_SHIFT) | SST_LOD_S_IS_WIDER,
|
||||
0<< SST_LOD_ASPECT_SHIFT,
|
||||
1<< SST_LOD_ASPECT_SHIFT,
|
||||
2<< SST_LOD_ASPECT_SHIFT,
|
||||
3<< SST_LOD_ASPECT_SHIFT
|
||||
};
|
||||
|
||||
const FxU32 _gr_evenOdd_xlate_table[] =
|
||||
{
|
||||
0xFFFFFFFF, /* invalid */
|
||||
SST_LOD_TSPLIT, /* even */
|
||||
SST_LOD_TSPLIT | SST_LOD_ODD, /* odd */
|
||||
0, /* both */
|
||||
};
|
||||
|
||||
/* the size of each mipmap level in texels, 4 is the minimum no matter what */
|
||||
/* index is [aspect_ratio][lod] */
|
||||
static const FxU32 _grMipMapSize[4][16] = {
|
||||
{ /* 8:1 aspect ratio */
|
||||
0x02000, /* 0 : 256x32 */
|
||||
0x00800, /* 1 : 128x16 */
|
||||
0x00200, /* 2 : 64x8 */
|
||||
0x00080, /* 3 : 32x4 */
|
||||
0x00020, /* 4 : 16x2 */
|
||||
0x00010, /* 5 : 8x1 */
|
||||
0x00008, /* 6 : 4x1 */
|
||||
0x00004, /* 7 : 2x1 */
|
||||
0x00004, /* 8 : 1x1 */
|
||||
},
|
||||
{ /* 4:1 aspect ratio */
|
||||
0x04000, /* 0 : 256x64 */
|
||||
0x01000, /* 1 : 128x32 */
|
||||
0x00400, /* 2 : 64x16 */
|
||||
0x00100, /* 3 : 32x8 */
|
||||
0x00040, /* 4 : 16x4 */
|
||||
0x00010, /* 5 : 8x2 */
|
||||
0x00008, /* 6 : 4x1 */
|
||||
0x00004, /* 7 : 2x1 */
|
||||
0x00004, /* 8 : 1x1 */
|
||||
},
|
||||
{ /* 2:1 aspect ratio */
|
||||
0x08000, /* 0 : 256x128 */
|
||||
0x02000, /* 1 : 128x64 */
|
||||
0x00800, /* 2 : 64x32 */
|
||||
0x00200, /* 3 : 32x16 */
|
||||
0x00080, /* 4 : 16x8 */
|
||||
0x00020, /* 5 : 8x4 */
|
||||
0x00008, /* 6 : 4x2 */
|
||||
0x00004, /* 7 : 2x1 */
|
||||
0x00004, /* 8 : 1x1 */
|
||||
},
|
||||
{ /* 1:1 aspect ratio */
|
||||
0x10000, /* 0 : 256x256 */
|
||||
0x04000, /* 1 : 128x128 */
|
||||
0x01000, /* 2 : 64x64 */
|
||||
0x00400, /* 3 : 32x32 */
|
||||
0x00100, /* 4 : 16x16 */
|
||||
0x00040, /* 5 : 8x8 */
|
||||
0x00010, /* 6 : 4x4 */
|
||||
0x00004, /* 7 : 2x2 */
|
||||
0x00004, /* 8 : 1x1 */
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
/* the offset from mipmap level 0 of each mipmap level in texels */
|
||||
/* index is [aspect_ratio][lod] */
|
||||
static FxU32 _grMipMapOffset[4][16];
|
||||
static FxU32 _grMipMapOffset_Tsplit[4][16];
|
||||
|
||||
/* initialize the MipMap Offset arrays */
|
||||
void
|
||||
_grMipMapInit(void)
|
||||
{
|
||||
int ar,lod;
|
||||
|
||||
for (ar=0; ar<4; ar++) { /* for each aspect ratio */
|
||||
_grMipMapOffset[ar][0] = 0; /* start off with offset=0 */
|
||||
for (lod=1; lod<=9; lod++) { /* for each lod, add in prev size */
|
||||
_grMipMapOffset[ar][lod] = _grMipMapOffset[ar][lod-1] +
|
||||
_grMipMapSize[ar][lod-1];
|
||||
}
|
||||
_grMipMapOffset_Tsplit[ar][0] = 0; /* start off with offset=0 */
|
||||
_grMipMapOffset_Tsplit[ar][1] = 0; /* start off with offset=0 */
|
||||
for (lod=2; lod<=9; lod++) { /* for each lod, add in prev size */
|
||||
_grMipMapOffset_Tsplit[ar][lod] = _grMipMapOffset_Tsplit[ar][lod-2] +
|
||||
_grMipMapSize[ar][lod-2];
|
||||
}
|
||||
}
|
||||
} /* _grMipMapInit */
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
** This is not DI anymore. Perhaps all of these size routines need
|
||||
** to be in gtex.c now.
|
||||
*/
|
||||
FxU32
|
||||
_grTexTextureMemRequired( GrLOD_t small_lod, GrLOD_t large_lod,
|
||||
GrAspectRatio_t aspect, GrTextureFormat_t format,
|
||||
FxU32 evenOdd )
|
||||
{
|
||||
FxU32 memrequired;
|
||||
|
||||
GR_CHECK_W("_grTexTextureMemRequired", small_lod < large_lod,
|
||||
"small_lod bigger than large_lod" );
|
||||
GR_CHECK_F( "_grTexTextureMemRequired", evenOdd > GR_MIPMAPLEVELMASK_BOTH || evenOdd == 0,
|
||||
"invalid evenOdd mask" );
|
||||
|
||||
/* mirror aspect ratios */
|
||||
if ( aspect > GR_ASPECT_1x1 ) aspect = GR_ASPECT_1x8 - aspect;
|
||||
|
||||
if ( evenOdd == GR_MIPMAPLEVELMASK_BOTH ) {
|
||||
memrequired = _grMipMapOffset[aspect][small_lod+1];
|
||||
memrequired -= _grMipMapOffset[aspect][large_lod];
|
||||
} else {
|
||||
memrequired = 0;
|
||||
/* construct XOR mask */
|
||||
evenOdd = (evenOdd == GR_MIPMAPLEVELMASK_EVEN);
|
||||
while (large_lod <= small_lod) { /* sum up all the mipmap levels */
|
||||
if ((large_lod ^ evenOdd) & 1) /* that match the XOR mask */
|
||||
memrequired += _grMipMapSize[aspect][large_lod];
|
||||
large_lod++;
|
||||
}
|
||||
}
|
||||
|
||||
if ( format >= GR_TEXFMT_16BIT ) /* convert from texels to bytes */
|
||||
memrequired <<= 1; /* 2 bytes per texel */
|
||||
|
||||
memrequired += 7; /* round up to 8 byte boundary */
|
||||
memrequired &= ~7;
|
||||
return memrequired;
|
||||
} /* _grTexTextureMemRequired */
|
||||
|
||||
FxU16
|
||||
_grTexFloatLODToFixedLOD( float value )
|
||||
{
|
||||
float num_quarters;
|
||||
int new_value;
|
||||
|
||||
num_quarters = ( value + .125F ) / .25F;
|
||||
new_value = ( int ) num_quarters;
|
||||
|
||||
new_value &= 0x003F;
|
||||
|
||||
return new_value;
|
||||
} /* _grTexFloatLODToFixedLOD */
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
** _grTexCalcBaseAddress
|
||||
*/
|
||||
FxU32
|
||||
_grTexCalcBaseAddress( FxU32 start, GrLOD_t large_lod,
|
||||
GrAspectRatio_t aspect, GrTextureFormat_t format,
|
||||
FxU32 odd_even_mask )
|
||||
{
|
||||
FxU32 sum_of_lod_sizes;
|
||||
|
||||
/* mirror aspect ratios */
|
||||
if ( aspect > GR_ASPECT_1x1 ) aspect = GR_ASPECT_1x8 - aspect;
|
||||
|
||||
if ( odd_even_mask == GR_MIPMAPLEVELMASK_BOTH )
|
||||
sum_of_lod_sizes = _grMipMapOffset[aspect][large_lod];
|
||||
else {
|
||||
if (((odd_even_mask == GR_MIPMAPLEVELMASK_EVEN) && (large_lod & 1)) ||
|
||||
((odd_even_mask == GR_MIPMAPLEVELMASK_ODD) && !(large_lod & 1)))
|
||||
large_lod += 1;
|
||||
sum_of_lod_sizes = _grMipMapOffset_Tsplit[aspect][large_lod];
|
||||
}
|
||||
|
||||
if ( format >= GR_TEXFMT_16BIT ) sum_of_lod_sizes <<= 1;
|
||||
|
||||
return ( start - sum_of_lod_sizes );
|
||||
} /* _grTexCalcBaseAddress */
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
** grTexCalcMemRequired
|
||||
*/
|
||||
GR_DIENTRY(grTexCalcMemRequired, FxU32,
|
||||
( GrLOD_t small_lod, GrLOD_t large_lod,
|
||||
GrAspectRatio_t aspect, GrTextureFormat_t format ))
|
||||
{
|
||||
const FxU32 memrequired = _grTexTextureMemRequired(small_lod, large_lod,
|
||||
aspect, format,
|
||||
GR_MIPMAPLEVELMASK_BOTH );
|
||||
|
||||
GDBG_INFO(88,"grTexCalcMemRequired(%d,%d,%d,%d) => 0x%x(%d)\n",
|
||||
small_lod,large_lod,aspect,format,memrequired,memrequired);
|
||||
|
||||
return memrequired;
|
||||
} /* grTexCalcMemRequired */
|
||||
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
** grTexDetailControl
|
||||
*/
|
||||
GR_DIENTRY(grTexDetailControl, void,
|
||||
( GrChipID_t tmu, int lod_bias, FxU8 detail_scale,
|
||||
float detail_max ))
|
||||
{
|
||||
#define FN_NAME "grTexDetailControl"
|
||||
FxU32 tDetail;
|
||||
FxU32 dmax = ( FxU32 ) ( detail_max * _GlideRoot.pool.f255 );
|
||||
FxU32 dscale = detail_scale;
|
||||
|
||||
GR_BEGIN_NOFIFOCHECK("grTexDetailControl",88);
|
||||
GDBG_INFO_MORE(gc->myLevel,"(%d,%d,%g)\n",tmu,detail_scale,detail_max);
|
||||
GR_CHECK_TMU( FN_NAME, tmu );
|
||||
GR_CHECK_F( myName, lod_bias < -32 || lod_bias > 31, "lod_bias out of range" );
|
||||
GR_CHECK_F( myName, detail_scale > 7, "detail_scale out of range" );
|
||||
GR_CHECK_F( myName, detail_max < 0.0 || detail_max > 1.0, "detail_max out of range" );
|
||||
|
||||
tDetail = ( ( lod_bias << SST_DETAIL_BIAS_SHIFT ) & SST_DETAIL_BIAS );
|
||||
tDetail |= ( ( dmax << SST_DETAIL_MAX_SHIFT ) & SST_DETAIL_MAX );
|
||||
tDetail |= ( ( dscale << SST_DETAIL_SCALE_SHIFT ) & SST_DETAIL_SCALE );
|
||||
|
||||
/* MULTIPLAT */
|
||||
_grTexDetailControl( tmu, tDetail );
|
||||
GR_END();
|
||||
#undef FN_NAME
|
||||
} /* grTexDetailControl */
|
||||
|
||||
GR_DIENTRY(grTexMinAddress, FxU32, ( GrChipID_t tmu ))
|
||||
{
|
||||
#define FN_NAME "grTexMinAddress"
|
||||
GR_BEGIN_NOFIFOCHECK("grTexMinAddress",88);
|
||||
GDBG_INFO_MORE(gc->myLevel,"(%d)\n",tmu);
|
||||
GR_CHECK_TMU(FN_NAME, tmu);
|
||||
FXUNUSED( tmu );
|
||||
GR_RETURN(0);
|
||||
#undef FN_NAME
|
||||
} /* grTexMinAddress */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------
|
||||
Function: grTexMaxAddress
|
||||
Date: 6/2
|
||||
Implementor(s): GaryT
|
||||
Library: glide
|
||||
Description:
|
||||
Returns address of maximum extent of texture ram for a given TMU
|
||||
Arguments:
|
||||
tmu
|
||||
Return:
|
||||
the largest valid texture start Address
|
||||
-------------------------------------------------------------------*/
|
||||
GR_DIENTRY(grTexMaxAddress, FxU32, ( GrChipID_t tmu ))
|
||||
{
|
||||
#define FN_NAME "grTexMaxAddress"
|
||||
GR_BEGIN_NOFIFOCHECK("grTexMaxAddress",88);
|
||||
GDBG_INFO_MORE(gc->myLevel,"(%d)\n",tmu);
|
||||
GR_CHECK_TMU(FN_NAME, tmu );
|
||||
GR_RETURN(gc->tmu_state[tmu].total_mem-8);
|
||||
#undef FN_NAME
|
||||
} /* grTexMaxAddress */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------
|
||||
Function: grTexTextureMemRequired
|
||||
Date: 6/2
|
||||
Implementor(s): GaryMcT, Jdt
|
||||
Library: glide
|
||||
Description:
|
||||
Returns the tmu memory required to store the specified mipmap
|
||||
( Gary and I don't like the name of this function, but are
|
||||
a little backed into a corner because of the existence
|
||||
of grTexMemRequired() which does not imply any distinction
|
||||
between texture memory and system ram )
|
||||
Arguments:
|
||||
evenOdd - which set of mipmap levels are to be stored
|
||||
One of:
|
||||
GR_MIPMAPLEVELMASK_EVEN
|
||||
GR_MIPMAPLEVELMASK_ODD
|
||||
GR_MIPMAPLEVELMASK_BOTH
|
||||
info - pointer to GrTexInfo structure defining dimensions
|
||||
of texture
|
||||
Return:
|
||||
offset to be added to current texture base address to calculate next
|
||||
valid texture memory download location
|
||||
-------------------------------------------------------------------*/
|
||||
GR_DIENTRY(grTexTextureMemRequired, FxU32,
|
||||
( FxU32 evenOdd, GrTexInfo *info))
|
||||
{
|
||||
FxU32 memrequired;
|
||||
|
||||
GR_CHECK_F( "grTexTextureMemRequired", !info, "invalid info pointer" );
|
||||
memrequired = _grTexTextureMemRequired(info->smallLod,
|
||||
info->largeLod,
|
||||
info->aspectRatio,
|
||||
info->format,
|
||||
evenOdd );
|
||||
|
||||
GDBG_INFO(88,"grTexTextureMemRequired(%d,0x%x) => 0x%x(%d)\n",
|
||||
evenOdd,info,memrequired,memrequired);
|
||||
return memrequired;
|
||||
} /* grTexTextureMemRequired */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------
|
||||
Function: grTexDownloadMipMap
|
||||
Date: 6/2
|
||||
Implementor(s): GaryMcT, Jdt
|
||||
Library: glide
|
||||
Description:
|
||||
Downloads a texture mipmap to the specified tmu at the specified
|
||||
base address.
|
||||
Arguments:
|
||||
tmu - which tmu
|
||||
startAddress - starting address for texture download,
|
||||
evenOdd - which set of mipmap levels have been downloaded for
|
||||
the selected texture
|
||||
One of:
|
||||
GR_MIPMAPLEVELMASK_EVEN
|
||||
GR_MIPMAPLEVELMASK_ODD
|
||||
GR_MIPMAPLEVELMASK_BOTH
|
||||
info - pointer to GrTexInfo structure defining dimension of
|
||||
texture to be downloaded and containing texture data
|
||||
Return:
|
||||
none
|
||||
-------------------------------------------------------------------*/
|
||||
GR_DIENTRY(grTexDownloadMipMap, void,
|
||||
( GrChipID_t tmu, FxU32 startAddress, FxU32
|
||||
evenOdd, GrTexInfo *info ))
|
||||
{
|
||||
GR_DCL_GC;
|
||||
GrLOD_t lod;
|
||||
char *src_base;
|
||||
FxU32 size = grTexTextureMemRequired( evenOdd, info );
|
||||
|
||||
FXUNUSED(gc);
|
||||
|
||||
GDBG_INFO(89,"grTexDownloadMipMap(%d,0x%x,%d,0x%x\n",tmu,startAddress,evenOdd,info);
|
||||
GR_CHECK_TMU( "grTexDownloadMipMap", tmu );
|
||||
GR_CHECK_COMPATABILITY("grTexDownloadMipMap",
|
||||
startAddress + size > gc->tmu_state[tmu].total_mem,
|
||||
"insufficient texture ram at startAddress" );
|
||||
GR_CHECK_F( "grTexDownloadMipMap", evenOdd > 0x3, "evenOdd mask invalid" );
|
||||
GR_CHECK_F( "grTexDownloadMipMap", !info, "info invalid" );
|
||||
|
||||
if ((startAddress < 0x200000) && (startAddress + size > 0x200000)) {
|
||||
GR_CHECK_COMPATABILITY("grTexDownloadMipMap",
|
||||
((startAddress < 0x200000UL) && (startAddress + size > 0x200000UL)),
|
||||
"mipmap cannot span 2 MB boundary");
|
||||
GrErrorCallback("grTexDownloadMipMap: mipmap cannot span 2 Mbyte boundary", FXTRUE);
|
||||
}
|
||||
|
||||
src_base = (char *)info->data;
|
||||
|
||||
/*---------------------------------------------------------------
|
||||
Download one mipmap level at a time
|
||||
---------------------------------------------------------------*/
|
||||
for(lod = info->largeLod; lod <= info->smallLod; lod++ ) {
|
||||
grTexDownloadMipMapLevel( tmu,
|
||||
startAddress,
|
||||
lod,
|
||||
info->largeLod,
|
||||
info->aspectRatio,
|
||||
info->format,
|
||||
evenOdd,
|
||||
src_base );
|
||||
|
||||
src_base += (_grMipMapHostSize[_gr_aspect_index_table[info->aspectRatio]][lod] <<
|
||||
(info->format >= GR_TEXFMT_16BIT));
|
||||
}
|
||||
} /* grTexDownloadMipMap */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------
|
||||
Function: grTexDownloadTablePartial
|
||||
Date: 6/3
|
||||
Implementor(s): GaryT
|
||||
Library: glide
|
||||
Description:
|
||||
download part of a look up table data to a tmu
|
||||
Arguments:
|
||||
tmu - which tmu
|
||||
type - what type of table to download
|
||||
One of:
|
||||
GR_TEXTABLE_NCC0
|
||||
GR_TEXTABLE_NCC1
|
||||
GR_TEXTABLE_PALETTE
|
||||
void *data - pointer to table data
|
||||
Return:
|
||||
none
|
||||
-------------------------------------------------------------------*/
|
||||
GR_DIENTRY(grTexDownloadTablePartial, void,
|
||||
( GrChipID_t tmu, GrTexTable_t type,
|
||||
void *data, int start, int end ))
|
||||
{
|
||||
#define FN_NAME "grTexDownloadTablePartial"
|
||||
GR_BEGIN_NOFIFOCHECK("grTexDownloadTablePartial",89);
|
||||
GDBG_INFO_MORE(gc->myLevel,"(%d,%d,0x%x, %d,%d)\n",tmu,type,data,start,end);
|
||||
GR_CHECK_TMU(FN_NAME,tmu);
|
||||
GR_CHECK_F(myName, type > 0x2, "invalid table specified");
|
||||
GR_CHECK_F(myName, !data, "invalid data pointer");
|
||||
|
||||
if ( type == GR_TEXTABLE_PALETTE ) /* Need Palette Download Code */
|
||||
_grTexDownloadPalette( tmu, (GuTexPalette *)data, start, end );
|
||||
else { /* Type is an ncc table */
|
||||
_grTexDownloadNccTable( tmu, type, (GuNccTable*)data, start, end );
|
||||
/* Removed redundant call
|
||||
* _grTexDownloadNccTable( tmu, type, (GuNccTable*)data, start, end );
|
||||
*/
|
||||
}
|
||||
GR_END();
|
||||
#undef FN_NAME
|
||||
} /* grTexDownloadTable */
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
** grTexDownloadMipMapLevel
|
||||
*/
|
||||
GR_DIENTRY(grTexDownloadMipMapLevel, void,
|
||||
( GrChipID_t tmu, FxU32 startAddress, GrLOD_t thisLod,
|
||||
GrLOD_t largeLod, GrAspectRatio_t aspectRatio,
|
||||
GrTextureFormat_t format, FxU32 evenOdd, void *data ))
|
||||
{
|
||||
GR_BEGIN_NOFIFOCHECK("grTexDownloadMipMapLevel",89);
|
||||
GDBG_INFO_MORE(gc->myLevel,"(%d,0x%x, %d,%d,%d, %d,%d 0x%x)\n",
|
||||
tmu,startAddress,thisLod,largeLod,aspectRatio,
|
||||
format,evenOdd,data);
|
||||
/*
|
||||
** note for glide3 lod translation:
|
||||
** we are calling gr* routine so the lod data should remain the same
|
||||
*/
|
||||
grTexDownloadMipMapLevelPartial( tmu, startAddress,
|
||||
thisLod, largeLod,
|
||||
aspectRatio, format,
|
||||
evenOdd, data,
|
||||
0, _grMipMapHostWH[aspectRatio][thisLod][1] - 1 );
|
||||
GR_END();
|
||||
} /* grTexDownloadMipmapLevel */
|
||||
|
||||
FxU16 rle_line[256];
|
||||
FxU16 *rle_line_end;
|
||||
|
||||
#if (GLIDE_PLATFORM & (GLIDE_OS_WIN32 | GLIDE_OS_MACOS | GLIDE_OS_UNIX))
|
||||
void rle_decode_line_asm(FxU16 *tlut,FxU8 *src,FxU16 *dest)
|
||||
{
|
||||
/* don't do anything just shut up the compiler */
|
||||
}
|
||||
#endif /* (GLIDE_PLATFORM & (GLIDE_OS_WIN32 | GLIDE_OS_MACOS)) */
|
||||
@@ -1,730 +0,0 @@
|
||||
/*
|
||||
** 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
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
**
|
||||
** 22 3/14/98 1:07p Peter
|
||||
** mac port happiness
|
||||
**
|
||||
** 21 2/20/98 9:05a Peter
|
||||
** removed remnants of comdex grot
|
||||
**
|
||||
** 20 2/11/98 5:22p Peter
|
||||
** added fifo get stuff for hanson
|
||||
**
|
||||
** 19 2/01/98 7:44p Peter
|
||||
** parameter dumping level
|
||||
*
|
||||
* 18 12/17/97 4:45p Peter
|
||||
* groundwork for CrybabyGlide
|
||||
*
|
||||
* 17 12/09/97 12:20p Peter
|
||||
* mac glide port
|
||||
*
|
||||
* 16 12/09/97 10:28a Peter
|
||||
* cleaned up some frofanity
|
||||
*
|
||||
* 15 12/05/97 4:26p Peter
|
||||
* watcom warnings
|
||||
*
|
||||
* 14 12/03/97 11:34a Peter
|
||||
* dos debugging
|
||||
*
|
||||
* 13 11/21/97 3:53p Peter
|
||||
* reset messages are controlled by gdbg_level
|
||||
*
|
||||
* 12 11/19/97 6:04p Peter
|
||||
* actually exit if not reset
|
||||
*
|
||||
* 11 11/18/97 4:36p Peter
|
||||
* chipfield stuff cleanup and w/ direct writes
|
||||
*
|
||||
* 10 11/17/97 4:55p Peter
|
||||
* watcom warnings/chipfield stuff
|
||||
*
|
||||
* 9 11/15/97 9:20p Peter
|
||||
* I am the sorriest f*cker on the face of the planet
|
||||
*
|
||||
**
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#if defined(__WIN32__)
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
#include <3dfx.h>
|
||||
#include <glidesys.h>
|
||||
|
||||
#define FX_DLL_DEFINITION
|
||||
#include <fxdll.h>
|
||||
#include <glide.h>
|
||||
#include "fxglide.h"
|
||||
|
||||
|
||||
#if GDBG_INFO_ON
|
||||
|
||||
static const char*
|
||||
cvgRegNames[] = {
|
||||
"status", /* 0x00 */
|
||||
"intrCtrl", /* 0x01 */
|
||||
"vAx", /* 0x02 */
|
||||
"vAy", /* 0x03 */
|
||||
"vBx", /* 0x04 */
|
||||
"vBy", /* 0x05 */
|
||||
"vCx", /* 0x06 */
|
||||
"vCy", /* 0x07 */
|
||||
"r", /* 0x08 */
|
||||
"g", /* 0x09 */
|
||||
"b", /* 0x0A */
|
||||
"z", /* 0x0B */
|
||||
"a", /* 0x0C */
|
||||
"s", /* 0x0D */
|
||||
"t", /* 0x0E */
|
||||
"w", /* 0x0F */
|
||||
"drdx", /* 0x10 */
|
||||
"dgdx", /* 0x11 */
|
||||
"dbdx", /* 0x12 */
|
||||
"dzdx", /* 0x13 */
|
||||
"dadx", /* 0x14 */
|
||||
"dsdx", /* 0x15 */
|
||||
"dtdx", /* 0x16 */
|
||||
"dwdx", /* 0x17 */
|
||||
"drdy", /* 0x18 */
|
||||
"dgdy", /* 0x19 */
|
||||
"dbdy", /* 0x1A */
|
||||
"dzdy", /* 0x1B */
|
||||
"dady", /* 0x1C */
|
||||
"dsdy", /* 0x1D */
|
||||
"dtdy", /* 0x1E */
|
||||
"dwdy", /* 0x1F */
|
||||
"triangleCMD", /* 0x20 */
|
||||
"reserved021", /* 0x21 */
|
||||
"FvAx", /* 0x22 */
|
||||
"FvAy", /* 0x23 */
|
||||
"FvBx", /* 0x24 */
|
||||
"FvBy", /* 0x25 */
|
||||
"FvCx", /* 0x26 */
|
||||
"FvCy", /* 0x27 */
|
||||
"Fr", /* 0x28 */
|
||||
"Fg", /* 0x29 */
|
||||
"Fb", /* 0x2A */
|
||||
"Fz", /* 0x2B */
|
||||
"Fa", /* 0x2C */
|
||||
"Fs", /* 0x2D */
|
||||
"Ft", /* 0x2E */
|
||||
"Fw", /* 0x2F */
|
||||
"Fdrdx", /* 0x30 */
|
||||
"Fdgdx", /* 0x31 */
|
||||
"Fdbdx", /* 0x32 */
|
||||
"Fdzdx", /* 0x33 */
|
||||
"Fdadx", /* 0x34 */
|
||||
"Fdsdx", /* 0x35 */
|
||||
"Fdtdx", /* 0x36 */
|
||||
"Fdwdx", /* 0x37 */
|
||||
"Fdrdy", /* 0x38 */
|
||||
"Fdgdy", /* 0x39 */
|
||||
"Fdbdy", /* 0x3A */
|
||||
"Fdzdy", /* 0x3B */
|
||||
"Fdady", /* 0x3C */
|
||||
"Fdsdy", /* 0x3D */
|
||||
"Fdtdy", /* 0x3E */
|
||||
"Fdwdy", /* 0x3F */
|
||||
"FtriangleCMD", /* 0x40 */
|
||||
"fbzColorPath", /* 0x41 */
|
||||
"fogMode", /* 0x42 */
|
||||
"alphaMode", /* 0x43 */
|
||||
"fbzMode", /* 0x44 */
|
||||
"lfbMode", /* 0x45 */
|
||||
"clipLeftRight", /* 0x46 */
|
||||
"clipLowYHighY", /* 0x47 */
|
||||
"nopCMD", /* 0x48 */
|
||||
"fastfillCMD", /* 0x49 */
|
||||
"swapbufferCMD", /* 0x4A */
|
||||
"fogColor", /* 0x4B */
|
||||
"zaColor", /* 0x4C */
|
||||
"chromaKey", /* 0x4D */
|
||||
"chromaRange", /* 0x4E */
|
||||
"userIntrCMD", /* 0x4F */
|
||||
"stipple", /* 0x50 */
|
||||
"color0", /* 0x51 */
|
||||
"color1", /* 0x52 */
|
||||
"fbiPixelsIn", /* 0x53 */
|
||||
"fbiChromaFail", /* 0x54 */
|
||||
"fbiZfuncFail", /* 0x55 */
|
||||
"fbiAfuncFail", /* 0x56 */
|
||||
"fbiPixelsOut", /* 0x57 */
|
||||
"fogTable0001", /* 0x58 */
|
||||
"fogTable0203", /* 0x59 */
|
||||
"fogTable0405", /* 0x5A */
|
||||
"fogTable0607", /* 0x5B */
|
||||
"fogTable0809", /* 0x5C */
|
||||
"fogTable0A0B", /* 0x5D */
|
||||
"fogTable0C0D", /* 0x5E */
|
||||
"fogTable0E0F", /* 0x5F */
|
||||
"fogTable1011", /* 0x60 */
|
||||
"fogTable1213", /* 0x61 */
|
||||
"fogTable1415", /* 0x62 */
|
||||
"fogTable1617", /* 0x63 */
|
||||
"fogTable1819", /* 0x64 */
|
||||
"fogTable1A1B", /* 0x65 */
|
||||
"fogTable1C1D", /* 0x66 */
|
||||
"fogTable1E1F", /* 0x67 */
|
||||
"fogTable2021", /* 0x68 */
|
||||
"fogTable2223", /* 0x69 */
|
||||
"fogTable2425", /* 0x6A */
|
||||
"fogTable2627", /* 0x6B */
|
||||
"fogTable2829", /* 0x6C */
|
||||
"fogTable2A2B", /* 0x6D */
|
||||
"fogTable2C2D", /* 0x6E */
|
||||
"fogTable2E2F", /* 0x6F */
|
||||
"fogTable3031", /* 0x70 */
|
||||
"fogTable3233", /* 0x71 */
|
||||
"fogTable3435", /* 0x72 */
|
||||
"fogTable3637", /* 0x73 */
|
||||
"fogTable3839", /* 0x74 */
|
||||
"fogTable3A3B", /* 0x75 */
|
||||
"fogTable3C3D", /* 0x76 */
|
||||
"fogTable3E3F", /* 0x77 */
|
||||
"cmdFifoBaseAddr", /* 0x78 */
|
||||
"cmdFifoBump", /* 0x79 */
|
||||
"cmdFifoRdPtr", /* 0x7A */
|
||||
"cmdFifoAMin", /* 0x7B */
|
||||
"cmdFifoAMax", /* 0x7C */
|
||||
"cmdFifoDepth", /* 0x7D */
|
||||
"cmdFifoHoles", /* 0x7E */
|
||||
"reserved07F", /* 0x7F */
|
||||
"fbiInit4", /* 0x80 */
|
||||
"vRetrace", /* 0x81 */
|
||||
"backPorch", /* 0x82 */
|
||||
"videoDim", /* 0x83 */
|
||||
"fbiInit0", /* 0x84 */
|
||||
"fbiInit1", /* 0x85 */
|
||||
"fbiInit2", /* 0x86 */
|
||||
"fbiInit3", /* 0x87 */
|
||||
"hSync", /* 0x88 */
|
||||
"vSync", /* 0x89 */
|
||||
"clutData", /* 0x8A */
|
||||
"dacData", /* 0x8B */
|
||||
"maxRGBDelta", /* 0x8C */
|
||||
"hBorder", /* 0x8D */
|
||||
"vBorder", /* 0x8E */
|
||||
"borderColor", /* 0x8F */
|
||||
"hvRetrace", /* 0x90 */
|
||||
"fbiInit5", /* 0x91 */
|
||||
"fbiInit6", /* 0x92 */
|
||||
"fbiInit7", /* 0x93 */
|
||||
"reserved094", /* 0x94 */
|
||||
"reserved095", /* 0x95 */
|
||||
"fbiSwapHistory", /* 0x96 */
|
||||
"fbiTriOut", /* 0x97 */
|
||||
"sSetupMode", /* 0x98 */
|
||||
"sVx", /* 0x99 */
|
||||
"sVy", /* 0x9A */
|
||||
"sARGB", /* 0x9B */
|
||||
"sRed", /* 0x9C */
|
||||
"sGreen", /* 0x9D */
|
||||
"sBlue", /* 0x9E */
|
||||
"sAlpha", /* 0x9F */
|
||||
"sVz", /* 0xA0 */
|
||||
"sWb", /* 0xA1 */
|
||||
"sWtmu0", /* 0xA2 */
|
||||
"sS/W0", /* 0xA3 */
|
||||
"sT/W0", /* 0xA4 */
|
||||
"sWtmu1", /* 0xA5 */
|
||||
"sS/Wtmu1", /* 0xA6 */
|
||||
"sT/Wtmu1", /* 0xA7 */
|
||||
"sDrawTriCMD", /* 0xA8 */
|
||||
"sBeginTriCMD", /* 0xA9 */
|
||||
"reserved0AA", /* 0xAA */
|
||||
"reserved0AB", /* 0xAB */
|
||||
"reserved0AC", /* 0xAC */
|
||||
"reserved0AD", /* 0xAD */
|
||||
"reserved0AE", /* 0xAE */
|
||||
"reserved0AF", /* 0xAF */
|
||||
"bltSrcBase", /* 0xB0 */
|
||||
"bltDstBase", /* 0xB1 */
|
||||
"bltXYStrides", /* 0xB2 */
|
||||
"bltSrcChroma", /* 0xB3 */
|
||||
"bltDstChroma", /* 0xB4 */
|
||||
"bltClipX", /* 0xB5 */
|
||||
"bltClipY", /* 0xB6 */
|
||||
"reserved067", /* 0xB7 */
|
||||
"bltSrcXY", /* 0xB8 */
|
||||
"bltDstXY", /* 0xB9 */
|
||||
"bltSize", /* 0xBA */
|
||||
"bltRop", /* 0xBB */
|
||||
"bltColor", /* 0xBC */
|
||||
"reserved067", /* 0xBD */
|
||||
"bltCommand", /* 0xBE */
|
||||
"bltData", /* 0xBF */
|
||||
"textureMode", /* 0xc0 */
|
||||
"tLOD", /* 0xc1 */
|
||||
"tDetail", /* 0xc2 */
|
||||
"texBaseAddr", /* 0xc3 */
|
||||
"texBaseAddr1", /* 0xc4 */
|
||||
"texBaseAddr2", /* 0xc5 */
|
||||
"texBaseAddr38", /* 0xc6 */
|
||||
"trexInit0", /* 0xc7 */
|
||||
"trexInit1", /* 0xc8 */
|
||||
"nccTable0_0", /* 0xc9 */
|
||||
"nccTable0_1", /* 0xca */
|
||||
"nccTable0_2", /* 0xcb */
|
||||
"nccTable0_3", /* 0xcc */
|
||||
"nccTable0_4", /* 0xcd */
|
||||
"nccTable0_5", /* 0xce */
|
||||
"nccTable0_6", /* 0xcf */
|
||||
"nccTable0_7", /* 0xd0 */
|
||||
"nccTable0_8", /* 0xd1 */
|
||||
"nccTable0_9", /* 0xd2 */
|
||||
"nccTable0_A", /* 0xd3 */
|
||||
"nccTable0_B", /* 0xd4 */
|
||||
"nccTable1_0", /* 0xd5 */
|
||||
"nccTable1_1", /* 0xd6 */
|
||||
"nccTable1_2", /* 0xd7 */
|
||||
"nccTable1_3", /* 0xd8 */
|
||||
"nccTable1_4", /* 0xd9 */
|
||||
"nccTable1_5", /* 0xda */
|
||||
"nccTable1_6", /* 0xdb */
|
||||
"nccTable1_7", /* 0xdc */
|
||||
"nccTable1_8", /* 0xdd */
|
||||
"nccTable1_9", /* 0xde */
|
||||
"nccTable1_A", /* 0xdf */
|
||||
"nccTable1_B", /* 0xe0 */
|
||||
"reserved0E1", /* 0xe1 */
|
||||
"reserved0E2", /* 0xe2 */
|
||||
"reserved0E3", /* 0xe3 */
|
||||
"reserved0E4", /* 0xe4 */
|
||||
"reserved0E5", /* 0xe5 */
|
||||
"reserved0E6", /* 0xe6 */
|
||||
"reserved0E7", /* 0xe7 */
|
||||
"reserved0E8", /* 0xe8 */
|
||||
"reserved0E9", /* 0xe9 */
|
||||
"reserved0EA", /* 0xea */
|
||||
"reserved0EB", /* 0xeb */
|
||||
"reserved0EC", /* 0xec */
|
||||
"reserved0ED", /* 0xed */
|
||||
"reserved0EE", /* 0xee */
|
||||
"reserved0EF", /* 0xef */
|
||||
"reserved0F0", /* 0xf0 */
|
||||
"reserved0F1", /* 0xf1 */
|
||||
"reserved0F2", /* 0xf2 */
|
||||
"reserved0F3", /* 0xf3 */
|
||||
"reserved0F4", /* 0xf4 */
|
||||
"reserved0F5", /* 0xf5 */
|
||||
"reserved0F6", /* 0xf6 */
|
||||
"reserved0F7", /* 0xf7 */
|
||||
"reserved0F8", /* 0xf8 */
|
||||
"reserved0F9", /* 0xf9 */
|
||||
"reserved0FA", /* 0xfa */
|
||||
"reserved0FB", /* 0xfb */
|
||||
"reserved0FC", /* 0xfc */
|
||||
"reserved0FD", /* 0xfd */
|
||||
"reserved0FE", /* 0xfe */
|
||||
"reserved0FF", /* 0xff */
|
||||
};
|
||||
|
||||
#define GEN_INDEX(a) ((((FxU32) a) - ((FxU32) gc->reg_ptr)) >> 2)
|
||||
|
||||
void
|
||||
_grFifoWriteDebug(FxU32 addr, FxU32 val, FxU32 fifoPtr)
|
||||
{
|
||||
GR_DCL_GC;
|
||||
FxU32 index = GEN_INDEX(addr);
|
||||
|
||||
GDBG_INFO(gc->myLevel + 199, "Storing to FIFO:\n");
|
||||
GDBG_INFO(gc->myLevel + 199, " FIFO Ptr: 0x%x : 0x%X\n", fifoPtr, gc->cmdTransportInfo.fifoRoom);
|
||||
if (index <= 0xff) {
|
||||
GDBG_INFO(gc->myLevel + 199, " Reg Name: %s\n", cvgRegNames[index]);
|
||||
GDBG_INFO(gc->myLevel + 199, " Reg Num: 0x%X\n", index);
|
||||
} else {
|
||||
const char* strP;
|
||||
const FxU32 offset = (addr - (FxU32)gc->reg_ptr);
|
||||
|
||||
if (offset >= HW_TEXTURE_OFFSET) {
|
||||
strP = "Texture";
|
||||
} else if (offset >= HW_LFB_OFFSET) {
|
||||
strP = "LFB";
|
||||
index = addr;
|
||||
} else if (offset >= HW_FIFO_OFFSET) {
|
||||
strP = "Cmd FIFO";
|
||||
} else {
|
||||
strP = "Woah!";
|
||||
}
|
||||
GDBG_INFO(gc->myLevel + 199, " %s Addr: 0x%X\n",
|
||||
strP, index);
|
||||
}
|
||||
GDBG_INFO(gc->myLevel + 199, " Value: 0x%X 0x%X\n", (index << 2), val);
|
||||
|
||||
GDBG_INFO(120, " SET(0x%X, %ld(0x%X)) 0 %s (0x%X)\n",
|
||||
0x10000000UL + (FxU32)(index << 2), val, val,
|
||||
cvgRegNames[index & 0xFF], fifoPtr);
|
||||
} /* _grFifoWriteDebug */
|
||||
|
||||
void
|
||||
_grFifoFWriteDebug(FxU32 addr, float val, FxU32 fifoPtr)
|
||||
{
|
||||
GR_DCL_GC;
|
||||
FxU32 index = GEN_INDEX(addr);
|
||||
|
||||
GDBG_INFO(gc->myLevel + 200, "Storing to FIFO:\n");
|
||||
GDBG_INFO(gc->myLevel + 200, " FIFO Ptr: 0x%x\n", fifoPtr);
|
||||
if (index <= 0xff) {
|
||||
GDBG_INFO(gc->myLevel + 200, " Reg Name: %s\n", cvgRegNames[index]);
|
||||
GDBG_INFO(gc->myLevel + 200, " Reg Num: 0x%x\n", index);
|
||||
}
|
||||
GDBG_INFO(gc->myLevel + 200, " Value: %4.2f\n", val);
|
||||
|
||||
GDBG_INFO(120, " SET(0x%X, %4.2f (0x%X)) 0 %s\n",
|
||||
0x10000000UL + (FxU32)(index << 2), val, *(const FxU32*)&val,
|
||||
cvgRegNames[index & 0xFF]);
|
||||
} /* _grFifoFWriteDebug */
|
||||
|
||||
extern void
|
||||
_grCVGFifoDump_TriHdr(const FxU32 hdrVal)
|
||||
{
|
||||
GR_DCL_GC;
|
||||
|
||||
/* Dump Packet Header */
|
||||
GDBG_INFO(gc->myLevel + 200, "CMD Fifo Triangle Packet (0x%X)\n", hdrVal);
|
||||
GDBG_INFO(gc->myLevel + 200, " # Vertex: 0x%X\n",
|
||||
(hdrVal & SSTCP_PKT3_NUMVERTEX) >> SSTCP_PKT3_NUMVERTEX_SHIFT);
|
||||
GDBG_INFO(gc->myLevel + 200, " RGB: %s\n",
|
||||
(hdrVal & SSTCP_PKT3_PACKEDCOLOR) ? "Packed" : "Separate");
|
||||
|
||||
GDBG_INFO(gc->myLevel + 200, " StripMode: %s\n",
|
||||
(((hdrVal & (0x01 << 22)) == 0) ? "Strip" : "Fan"));
|
||||
|
||||
GDBG_INFO(gc->myLevel + 200, " Culling: %s\n",
|
||||
(((hdrVal & (0x01 << 23)) == 0) ? "Disable" : "Enable"));
|
||||
|
||||
GDBG_INFO(gc->myLevel + 200, " CullingSign: %s\n",
|
||||
(((hdrVal & (0x01 << 24)) == 0) ? "Positive" : "Negative"));
|
||||
|
||||
GDBG_INFO(gc->myLevel + 200, " PingPongSign: %s\n",
|
||||
(((hdrVal & (0x01 << 25)) == 0) ? "Normal" : "Disable"));
|
||||
|
||||
if (GDBG_GET_DEBUGLEVEL(gc->myLevel + 200)) {
|
||||
const FxU32 temp = (hdrVal & SSTCP_PKT3_PMASK);
|
||||
int i;
|
||||
|
||||
GDBG_INFO(gc->myLevel + 200, " Params: X Y");
|
||||
|
||||
for(i = 10; i <= 17; i++) {
|
||||
static const char* paramSel[] = { "RGB", "Alpha", "Z", "Wb", "W0", "ST[0]", "W1", "ST[1]" };
|
||||
|
||||
if ((temp & (0x01UL << i)) != 0) GDBG_PRINTF("%s ", paramSel[i - 10]);
|
||||
}
|
||||
GDBG_INFO(gc->myLevel + 200, "\n");
|
||||
}
|
||||
|
||||
{
|
||||
const FxU32 temp = (hdrVal & SSTCP_PKT3_CMD) >> SSTCP_PKT3_CMD_SHIFT;
|
||||
const char* tempStr;
|
||||
|
||||
switch(temp) {
|
||||
case 0x00: tempStr = "Independent"; break;
|
||||
case 0x01: tempStr = "NewStrip"; break;
|
||||
case 0x02: tempStr = "ContinueStrip"; break;
|
||||
default: tempStr = "Reserved"; break;
|
||||
}
|
||||
GDBG_INFO(gc->myLevel + 200, " Command: 0x%X(%s)\n", temp, tempStr);
|
||||
}
|
||||
}
|
||||
|
||||
extern void
|
||||
_grCVGFifoDump_Linear(const FxU32* const linearPacketAddr)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
_grErrorCallback(const char* const procName,
|
||||
const char* const format,
|
||||
va_list args)
|
||||
{
|
||||
static FxBool inProcP = FXFALSE;
|
||||
|
||||
if (!inProcP) {
|
||||
static char errMsgBuf[1024];
|
||||
|
||||
inProcP = FXTRUE;
|
||||
{
|
||||
extern void (*GrErrorCallback)( const char *string, FxBool fatal );
|
||||
|
||||
vsprintf(errMsgBuf, format, args);
|
||||
(*GrErrorCallback)(errMsgBuf, (GETENV("FX_ERROR_FAIL") != NULL));
|
||||
}
|
||||
inProcP = FXFALSE;
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* GDBG_INFO_ON */
|
||||
|
||||
#if USE_PACKET_FIFO
|
||||
|
||||
/* Routines privately exported so that the manufacturing diags
|
||||
* and other things can do register writes etc w/o having access
|
||||
* to the glide internals etc.
|
||||
*/
|
||||
extern void
|
||||
_grSet32(volatile FxU32* const sstAddr, const FxU32 val)
|
||||
{
|
||||
#define FN_NAME "_grSet32"
|
||||
GR_DCL_GC;
|
||||
|
||||
GR_ASSERT(sstAddr >= gc->base_ptr);
|
||||
GR_ASSERT(sstAddr < &SST_TMU(gc->reg_ptr, GR_TMU0)->status);
|
||||
|
||||
GR_SET_EXPECTED_SIZE(sizeof(FxU32), 1);
|
||||
GR_SET_INDEX(BROADCAST_ID, gc->reg_ptr, (sstAddr - gc->reg_ptr), val);
|
||||
GR_CHECK_SIZE();
|
||||
#undef FN_NAME
|
||||
}
|
||||
|
||||
extern FxU32
|
||||
_grGet32(volatile FxU32* const sstAddr)
|
||||
{
|
||||
return GR_GET(*sstAddr);
|
||||
}
|
||||
|
||||
#if FIFO_ASSERT_FULL
|
||||
const FxU32 kFifoCheckMask = 0xFFFF;
|
||||
FxU32 gFifoCheckCount = 0;
|
||||
#endif
|
||||
|
||||
void GR_CDECL
|
||||
_FifoMakeRoom(const FxI32 blockSize, const char* fName, const int fLine)
|
||||
{
|
||||
#define FN_NAME "_FifoMakeRoom"
|
||||
FxU32 wrapAddr = 0x00UL;
|
||||
GR_BEGIN_NOFIFOCHECK(FN_NAME, 400);
|
||||
|
||||
GR_ASSERT(blockSize > 0);
|
||||
GR_ASSERT((FxU32)blockSize < gc->cmdTransportInfo.fifoSize);
|
||||
FIFO_ASSERT();
|
||||
|
||||
/* Update the roomToXXX values w/ the # of writes since the last
|
||||
* fifo stall/wrap.
|
||||
*/
|
||||
{
|
||||
const FxI32 writes = (MIN(gc->cmdTransportInfo.roomToReadPtr, gc->cmdTransportInfo.roomToEnd) -
|
||||
gc->cmdTransportInfo.fifoRoom);
|
||||
|
||||
gc->cmdTransportInfo.roomToReadPtr -= writes;
|
||||
gc->cmdTransportInfo.roomToEnd -= writes;
|
||||
|
||||
#if GDBG_INFO_ON
|
||||
GDBG_INFO_MORE(gc->myLevel, ": (%s : %d)\n"
|
||||
"\tfifoBlock: (0x%X : 0x%X)\n"
|
||||
"\tfifoRoom: (0x%X : 0x%X) : (0x%X : 0x%X)\n"
|
||||
"\tfifo hw: (0x%X : 0x%X)\n",
|
||||
((fName == NULL) ? "Unknown" : fName), fLine,
|
||||
(FxU32)gc->cmdTransportInfo.fifoPtr, blockSize,
|
||||
gc->cmdTransportInfo.roomToReadPtr, gc->cmdTransportInfo.roomToEnd,
|
||||
gc->cmdTransportInfo.fifoRoom, writes,
|
||||
HW_FIFO_PTR(FXTRUE), gc->cmdTransportInfo.fifoRead);
|
||||
|
||||
#if !GLIDE_INIT_HAL
|
||||
if (gc->scanline_interleaved) {
|
||||
SstRegs* slaveHw = (SstRegs*)gc->slave_ptr;
|
||||
|
||||
GDBG_INFO_MORE(gc->myLevel, "\tsli: 0x%X : (0x%X : 0x%X : 0x%X)\n",
|
||||
HW_FIFO_PTR(FXFALSE),
|
||||
GR_GET(slaveHw->cmdFifoDepth),
|
||||
GR_GET(slaveHw->cmdFifoHoles),
|
||||
GR_GET(slaveHw->status));
|
||||
}
|
||||
#endif /* !GLIDE_INIT_HAL */
|
||||
#endif /* GDBG_INFO_ON */
|
||||
|
||||
ASSERT_FAULT_IMMED((gc->cmdTransportInfo.roomToReadPtr >= 0) &&
|
||||
(gc->cmdTransportInfo.roomToEnd >= 0));
|
||||
}
|
||||
|
||||
again:
|
||||
/* do we need to stall? */
|
||||
{
|
||||
FxU32 lastHwRead = gc->cmdTransportInfo.fifoRead;
|
||||
FxI32 roomToReadPtr = gc->cmdTransportInfo.roomToReadPtr;
|
||||
|
||||
while (roomToReadPtr < blockSize) {
|
||||
FxU32 curReadPtr = HW_FIFO_PTR(FXTRUE);
|
||||
FxU32 curReadDist = curReadPtr - lastHwRead;
|
||||
|
||||
GR_ASSERT((curReadPtr >= (FxU32)gc->cmdTransportInfo.fifoStart) &&
|
||||
(curReadPtr < (FxU32)gc->cmdTransportInfo.fifoEnd));
|
||||
|
||||
#if !GLIDE_INIT_HAL
|
||||
/* If we're in an sli configuration then we need to make sure
|
||||
* that we don't catch up to either the slave as well.
|
||||
*/
|
||||
if (gc->scanline_interleaved) {
|
||||
const FxU32 slaveReadPtr = HW_FIFO_PTR(FXFALSE);
|
||||
const FxU32 slaveReadDist = (slaveReadPtr - lastHwRead);
|
||||
FxI32 distSlave = (FxI32)slaveReadDist;
|
||||
FxI32 distMaster = (FxI32)curReadDist;
|
||||
|
||||
GR_ASSERT((slaveReadPtr >= (FxU32)gc->cmdTransportInfo.fifoStart) &&
|
||||
(slaveReadPtr < (FxU32)gc->cmdTransportInfo.fifoEnd));
|
||||
|
||||
/* Get the actual absolute distance to the respective fifo ptrs */
|
||||
if (distSlave < 0) distSlave += (FxI32)gc->cmdTransportInfo.fifoSize - FIFO_END_ADJUST;
|
||||
if (distMaster < 0) distMaster += (FxI32)gc->cmdTransportInfo.fifoSize - FIFO_END_ADJUST;
|
||||
|
||||
/* Is the slave closer than the master? */
|
||||
if (distSlave < distMaster) {
|
||||
#if GDBG_INFO_ON
|
||||
{
|
||||
SstRegs* slaveHw = (SstRegs*)gc->slave_ptr;
|
||||
GDBG_INFO(gc->myLevel, " Wait sli: 0x%X : (0x%X : 0x%X : 0x%X)\n"
|
||||
"\tMaster: 0x%X : 0x%X\n"
|
||||
"\tSlave : 0x%X : 0x%X\n",
|
||||
HW_FIFO_PTR(FXFALSE),
|
||||
GR_GET(slaveHw->cmdFifoDepth),
|
||||
GR_GET(slaveHw->cmdFifoHoles),
|
||||
GR_GET(slaveHw->status),
|
||||
curReadPtr, curReadDist,
|
||||
slaveReadPtr, slaveReadDist);
|
||||
}
|
||||
#endif /* GDBG_INFO_ON */
|
||||
|
||||
curReadDist = slaveReadDist;
|
||||
curReadPtr = slaveReadPtr;
|
||||
}
|
||||
}
|
||||
#endif /* !GLIDE_INIT_HAL */
|
||||
|
||||
roomToReadPtr += curReadDist;
|
||||
|
||||
#if (GLIDE_PLATFORM & GLIDE_HW_CVG) && GLIDE_USE_DEBUG_FIFO
|
||||
_GlideRoot.stats.fifoStalls++;
|
||||
_GlideRoot.stats.fifoStallDepth += GR_GET(hw->cmdFifoDepth);
|
||||
#endif
|
||||
/* Have we wrapped yet? */
|
||||
if (lastHwRead > curReadPtr) roomToReadPtr += (FxI32)gc->cmdTransportInfo.fifoSize - FIFO_END_ADJUST;
|
||||
lastHwRead = curReadPtr;
|
||||
}
|
||||
|
||||
GR_ASSERT((lastHwRead >= (FxU32)gc->cmdTransportInfo.fifoStart) &&
|
||||
(lastHwRead < (FxU32)gc->cmdTransportInfo.fifoEnd));
|
||||
|
||||
/* Update cached copies */
|
||||
gc->cmdTransportInfo.fifoRead = lastHwRead;
|
||||
gc->cmdTransportInfo.roomToReadPtr = roomToReadPtr;
|
||||
|
||||
GDBG_INFO(gc->myLevel, " Wait: (0x%X : 0x%X) : 0x%X\n",
|
||||
gc->cmdTransportInfo.roomToReadPtr, gc->cmdTransportInfo.roomToEnd,
|
||||
gc->cmdTransportInfo.fifoRead);
|
||||
}
|
||||
|
||||
/* Do we need to wrap to front? */
|
||||
if (gc->cmdTransportInfo.roomToEnd <= blockSize) {
|
||||
GDBG_INFO(gc->myLevel + 10, " Pre-Wrap: (0x%X : 0x%X) : 0x%X\n",
|
||||
gc->cmdTransportInfo.roomToReadPtr, gc->cmdTransportInfo.roomToEnd,
|
||||
gc->cmdTransportInfo.fifoRead);
|
||||
|
||||
/* Set the jsr packet.
|
||||
* NB: This command must be fenced.
|
||||
*/
|
||||
FIFO_ASSERT();
|
||||
{
|
||||
SET(*gc->cmdTransportInfo.fifoPtr, gc->cmdTransportInfo.fifoJmpHdr);
|
||||
P6FENCE;
|
||||
}
|
||||
FIFO_ASSERT();
|
||||
|
||||
wrapAddr = (FxU32)gc->cmdTransportInfo.fifoPtr;
|
||||
|
||||
/* Update roomXXX fields for the actual wrap */
|
||||
gc->cmdTransportInfo.roomToReadPtr -= gc->cmdTransportInfo.roomToEnd;
|
||||
gc->cmdTransportInfo.roomToEnd = gc->cmdTransportInfo.fifoSize - FIFO_END_ADJUST;
|
||||
|
||||
#if (GLIDE_PLATFORM & GLIDE_HW_CVG) && GLIDE_USE_DEBUG_FIFO
|
||||
_GlideRoot.stats.fifoWraps++;
|
||||
_GlideRoot.stats.fifoWrapDepth += GR_GET(hw->cmdFifoDepth);
|
||||
#endif
|
||||
|
||||
/* Reset fifo ptr to start */
|
||||
gc->cmdTransportInfo.fifoPtr = gc->cmdTransportInfo.fifoStart;
|
||||
|
||||
#if GLIDE_USE_SHADOW_FIFO
|
||||
{
|
||||
FxU32* fifoPtr = gc->cmdTransportInfo.fifoShadowPtr;
|
||||
|
||||
while(fifoPtr < gc->cmdTransportInfo.fifoShadowBase + (kDebugFifoSize >> 2))
|
||||
*fifoPtr++ = 0x00UL;
|
||||
gc->cmdTransportInfo.fifoShadowPtr = gc->cmdTransportInfo.fifoShadowBase;
|
||||
}
|
||||
#endif /* GLIDE_USE_SHADOW_FIFO */
|
||||
|
||||
GDBG_INFO(gc->myLevel + 10, " Post-Wrap: (0x%X : 0x%X) : 0x%X\n",
|
||||
gc->cmdTransportInfo.roomToReadPtr, gc->cmdTransportInfo.roomToEnd,
|
||||
gc->cmdTransportInfo.fifoRead);
|
||||
|
||||
goto again;
|
||||
}
|
||||
|
||||
/* compute room left */
|
||||
gc->cmdTransportInfo.fifoRoom = MIN(gc->cmdTransportInfo.roomToReadPtr, gc->cmdTransportInfo.roomToEnd);
|
||||
|
||||
#if GDBG_INFO_ON
|
||||
#if (GLIDE_PLATFORM & GLIDE_HW_CVG)
|
||||
GDBG_INFO(gc->myLevel, FN_NAME"_Done:\n"
|
||||
"\tfifoBlock: (0x%X : 0x%X)\n"
|
||||
"\tfifoRoom: (0x%X : 0x%X : 0x%X)\n"
|
||||
"\tfifo hw: (0x%X : 0x%X) : (0x%X : 0x%X : 0x%X)\n",
|
||||
(FxU32)gc->cmdTransportInfo.fifoPtr, blockSize,
|
||||
gc->cmdTransportInfo.roomToReadPtr,
|
||||
gc->cmdTransportInfo.roomToEnd, gc->cmdTransportInfo.fifoRoom,
|
||||
HW_FIFO_PTR(FXTRUE), gc->cmdTransportInfo.fifoRead,
|
||||
GR_GET(hw->cmdFifoDepth), GR_GET(hw->cmdFifoHoles), GR_GET(hw->status));
|
||||
#endif
|
||||
|
||||
#if !GLIDE_INIT_HAL
|
||||
if (gc->scanline_interleaved) {
|
||||
SstRegs* slaveHw = (SstRegs*)gc->slave_ptr;
|
||||
|
||||
GDBG_INFO_MORE(gc->myLevel, "\tsli: 0x%X : (0x%X : 0x%X : 0x%X)\n",
|
||||
HW_FIFO_PTR(FXFALSE),
|
||||
GR_GET(slaveHw->cmdFifoDepth),
|
||||
GR_GET(slaveHw->cmdFifoHoles),
|
||||
GR_GET(slaveHw->status));
|
||||
}
|
||||
#endif /* !GLIDE_INIT_HAL */
|
||||
#endif /* GDBG_INFO_ON */
|
||||
|
||||
FIFO_ASSERT();
|
||||
GR_TRACE_EXIT(FN_NAME);
|
||||
#undef FN_NAME
|
||||
}
|
||||
|
||||
extern void
|
||||
_grGetCommandTransportInfo(GrCmdTransportInfo* info)
|
||||
{
|
||||
GR_DCL_GC;
|
||||
|
||||
GR_ASSERT(info != NULL);
|
||||
*info = gc->cmdTransportInfo;
|
||||
}
|
||||
|
||||
#endif /* USE_PACKET_FIFO */
|
||||
@@ -1,52 +0,0 @@
|
||||
/*
|
||||
* 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
|
||||
*
|
||||
* $Header$
|
||||
* $Log$
|
||||
*
|
||||
* 1 7/25/97 9:05a Pgj
|
||||
* generate fxbldno.h which defines BUILD_NUMBER
|
||||
*
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
struct tm locTime;
|
||||
time_t sysTime;
|
||||
char *build;
|
||||
|
||||
time(&sysTime);
|
||||
locTime = *localtime(&sysTime);
|
||||
|
||||
if (build = getenv("BUILD_NUMBER")) {
|
||||
printf("#define BUILD_NUMBER %s\n", build);
|
||||
} else {
|
||||
unsigned short magic;
|
||||
magic = (locTime.tm_yday << 7) |
|
||||
(locTime.tm_hour << 2) |
|
||||
(locTime.tm_min / 15);
|
||||
printf("#define BUILD_NUMBER %d\n", magic);
|
||||
}
|
||||
return 0;
|
||||
|
||||
} /* end main() */
|
||||
@@ -1,208 +0,0 @@
|
||||
/*
|
||||
** 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
|
||||
**
|
||||
** $Revision$
|
||||
** $Date$
|
||||
*/
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <3dfx.h>
|
||||
#include <glidesys.h>
|
||||
|
||||
#define FX_DLL_DEFINITION
|
||||
#include <fxdll.h>
|
||||
#include <glide.h>
|
||||
#include "fxglide.h"
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
* macros for creating assembler offset files
|
||||
*----------------------------------------------------------------------*/
|
||||
|
||||
#ifndef __linux__
|
||||
#define NEWLINE printf("\n")
|
||||
#define COMMENT printf(";----------------------------------------------------------------------\n")
|
||||
|
||||
#define HEADER(str) NEWLINE; COMMENT; \
|
||||
printf("; Assembler offsets for %s struct\n",str);\
|
||||
COMMENT; NEWLINE
|
||||
|
||||
#define OFFSET(p,o,pname) if (hex) \
|
||||
printf("%s\t= %08xh\n",pname,((int)&p.o)-(int)&p); \
|
||||
else printf("%s\t= %10d\n",pname,((int)&p.o)-(int)&p)
|
||||
|
||||
#define OFFSET2(p,o,pname) if (hex) \
|
||||
printf("%s\t= %08xh\n",pname,((int)&o)-(int)&p); \
|
||||
else printf("%s\t= %10d\n",pname,((int)&o)-(int)&p)
|
||||
|
||||
#define SIZEOF(p,pname) if (hex) \
|
||||
printf("SIZEOF_%s\t= %08xh\n",pname,sizeof(p)); \
|
||||
else printf("SIZEOF_%s\t= %10d\n",pname,sizeof(p))
|
||||
|
||||
#else
|
||||
|
||||
#define NEWLINE printf("\n");
|
||||
#define COMMENT printf("#----------------------------------------------------------------------\n")
|
||||
|
||||
#define HEADER(str) NEWLINE; COMMENT; \
|
||||
printf("# Assembler offsets for %s struct\n",str);\
|
||||
COMMENT; NEWLINE
|
||||
|
||||
#define OFFSET(p,o,pname) if (hex) \
|
||||
printf("%s\t .EQU %08x\n",pname,((int)&p.o)-(int)&p); \
|
||||
else printf("%s\t .EQU %10d\n",pname,((int)&p.o)-(int)&p)
|
||||
|
||||
#if (GLIDE_PLATFORM & GLIDE_HW_SST96)
|
||||
#define HWOFFSET(p, o, pname) if (hex) \
|
||||
printf("%s\t .EQU %08x\n",pname,(((int) &p.o)-(int)&p)>>2);\
|
||||
else printf("%s\t .EQU %10d\n",pname,(((int)&p.o)-(int)&p))
|
||||
#endif /* (GLIDE_PLATFORM & GLIDE_HW_SST96) */
|
||||
|
||||
#define OFFSET2(p,o,pname) if (hex) \
|
||||
printf("%s\t .EQU %08x\n",pname,((int)&o)-(int)&p); \
|
||||
else printf("%s\t .EQU %10d\n",pname,((int)&o)-(int)&p)
|
||||
|
||||
#define SIZEOF(p,pname) if (hex) \
|
||||
printf("SIZEOF_%s\t .EQU %08x\n",pname,sizeof(p)); \
|
||||
else printf("SIZEOF_%s\t .EQU %10d\n",pname,sizeof(p))
|
||||
#endif
|
||||
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
int hex=0; /* default is print in decimal */
|
||||
static struct _GlideRoot_s gr;
|
||||
static GrGC gc;
|
||||
|
||||
#if !GLIDE_HW_TRI_SETUP
|
||||
static SstRegs sst;
|
||||
static struct dataList_s dl;
|
||||
#endif /* !GLIDE_HW_TRI_SETUP */
|
||||
|
||||
if (argc > 1) {
|
||||
if (strcmp("-inline", argv[1]) == 0) {
|
||||
SstRegs dummyRegs = { 0x00UL };
|
||||
|
||||
printf("#ifndef __FX_INLINE_H__\n");
|
||||
printf("#define __FX_INLINE_H__\n");
|
||||
printf("\n");
|
||||
|
||||
#if GLIDE_DISPATCH_SETUP
|
||||
printf("#define kCurGCOffset 0x%XUL\n",
|
||||
offsetof(struct _GlideRoot_s, curGC));
|
||||
|
||||
printf("#define kTriProcOffset 0x%XUL\n",
|
||||
offsetof(struct GrGC_s, cmdTransportInfo.triSetupProc));
|
||||
printf("#define kTriProcOffsetClean %d\n",
|
||||
offsetof(struct GrGC_s, cmdTransportInfo.triSetupProc));
|
||||
#endif /* GLIDE_DISPATCH_SETUP */
|
||||
|
||||
printf("/* The # of 2-byte entries in the hw fog table */\n");
|
||||
printf("#define kInternalFogTableEntryCount 0x%XUL\n",
|
||||
sizeof(dummyRegs.fogTable) >> 1);
|
||||
|
||||
printf("\n");
|
||||
printf("#endif /* __FX_INLINE_H__ */\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
hex = 1;
|
||||
}
|
||||
|
||||
HEADER ("SSTREGS");
|
||||
|
||||
NEWLINE;
|
||||
HEADER ("GC");
|
||||
OFFSET (gc,base_ptr,"base_ptr\t");
|
||||
OFFSET (gc,reg_ptr,"reg_ptr\t\t");
|
||||
OFFSET (gc,lfb_ptr,"lfb_ptr\t\t");
|
||||
OFFSET (gc,state.cull_mode,"cull_mode\t");
|
||||
OFFSET (gc, regDataList,"regDataList\t");
|
||||
OFFSET (gc, tsuDataList,"tsuDataList\t");
|
||||
OFFSET (gc, cmdTransportInfo.triPacketHdr, "triPacketHdr");
|
||||
OFFSET (gc, cmdTransportInfo.cullStripHdr, "cullStripHdr");
|
||||
OFFSET (gc, cmdTransportInfo.paramMask, "paramMask");
|
||||
|
||||
OFFSET (gc, cmdTransportInfo.fifoStart, "fifoStart");
|
||||
OFFSET (gc, cmdTransportInfo.fifoEnd, "fifoEnd");
|
||||
OFFSET (gc, cmdTransportInfo.fifoOffset, "fifoOffset");
|
||||
OFFSET (gc, cmdTransportInfo.fifoSize, "fifoSize");
|
||||
OFFSET (gc, cmdTransportInfo.fifoJmpHdr, "fifoJmpHdr");
|
||||
OFFSET (gc, cmdTransportInfo.fifoPtr, "fifoPtr");
|
||||
OFFSET (gc, cmdTransportInfo.fifoRead, "fifoRead");
|
||||
|
||||
OFFSET (gc, cmdTransportInfo.fifoRoom, "fifoRoom");
|
||||
OFFSET (gc, cmdTransportInfo.roomToReadPtr, "roomToReadPtr");
|
||||
OFFSET (gc, cmdTransportInfo.roomToEnd, "roomToEnd");
|
||||
|
||||
OFFSET (gc, cmdTransportInfo.fifoLfbP, "fifoLfbP");
|
||||
OFFSET (gc, cmdTransportInfo.lfbLockCount, "lfbLockCount");
|
||||
|
||||
SIZEOF (gr.GCs[0].state,"GrState\t");
|
||||
SIZEOF (gr.hwConfig,"GrHwConfiguration");
|
||||
SIZEOF (gr.GCs[0],"GC\t");
|
||||
NEWLINE;
|
||||
|
||||
HEADER ("GlideRoot");
|
||||
OFFSET (gr,p6Fencer,"p6Fencer\t");
|
||||
OFFSET (gr,current_sst,"current_sst\t");
|
||||
OFFSET (gr,CPUType,"CPUType\t\t");
|
||||
OFFSET (gr,curGC,"curGC\t\t");
|
||||
OFFSET (gr,curTriSize,"curTriSize\t");
|
||||
|
||||
OFFSET (gr,stats.trisProcessed,"trisProcessed\t");
|
||||
OFFSET (gr,stats.trisDrawn,"trisDrawn\t");
|
||||
|
||||
#if GLIDE_PACKED_RGB
|
||||
OFFSET (gr, pool.ftemp1, "fTemp1");
|
||||
OFFSET (gr, pool.ftemp2, "fTemp2");
|
||||
OFFSET (gr, pool.fBiasHi,"fBiasHi");
|
||||
OFFSET (gr, pool.fBiasLo,"fBiasLo");
|
||||
#endif /* (GLIDE_PLATFORM & GLIDE_HW_CVG) && GLIDE_PACKED_RGB */
|
||||
|
||||
SIZEOF (gr,"GlideRoot");
|
||||
NEWLINE;
|
||||
|
||||
HEADER ("GrVertex");
|
||||
{
|
||||
GrVertex v;
|
||||
|
||||
OFFSET(v, x, "x");
|
||||
OFFSET(v, y, "y");
|
||||
OFFSET(v, r, "r");
|
||||
OFFSET(v, g, "g");
|
||||
OFFSET(v, b, "b");
|
||||
OFFSET(v, a, "a");
|
||||
SIZEOF(v, "GrVertex");
|
||||
}
|
||||
NEWLINE;
|
||||
|
||||
#if !GLIDE_HW_TRI_SETUP
|
||||
HEADER ("dataList");
|
||||
OFFSET (dl,i,"dl_i\t\t");
|
||||
OFFSET (dl,addr,"dl_addr\t\t");
|
||||
SIZEOF (dl,"dataList\t");
|
||||
NEWLINE;
|
||||
#endif /* !GLIDE_HW_TRI_SETUP */
|
||||
|
||||
return 0;
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,558 +0,0 @@
|
||||
/*
|
||||
** 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
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
**
|
||||
** 17 2/20/98 11:00a Peter
|
||||
** removed glide3 from glid2 tree
|
||||
*
|
||||
* 16 1/13/98 7:48p Atai
|
||||
* fixed gu3dfGetInfo, grBufferClear, and GrState size
|
||||
*
|
||||
* 15 1/13/98 12:42p Atai
|
||||
* fixed grtexinfo, grVertexLayout, and draw triangle
|
||||
*
|
||||
* 14 1/09/98 6:48p Atai
|
||||
* grTexInfo, GR_LOD_* and GR_ASPECT_*
|
||||
*
|
||||
* 12 12/17/97 4:45p Peter
|
||||
* groundwork for CrybabyGlide
|
||||
*
|
||||
* 11 12/09/97 12:20p Peter
|
||||
* mac glide port
|
||||
*
|
||||
* 10 6/06/97 5:56p Peter
|
||||
* fixed gcc/dural compilation things
|
||||
*
|
||||
* 9 6/02/97 4:09p Peter
|
||||
* Compile w/ gcc for Dural
|
||||
*
|
||||
* 8 5/27/97 1:16p Peter
|
||||
* Basic cvg, w/o cmd fifo stuff.
|
||||
*
|
||||
* 7 5/21/97 6:05a Peter
|
||||
*
|
||||
* 6 3/09/97 10:31a Dow
|
||||
* Added GR_DIENTRY for di glide functions
|
||||
**
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <3dfx.h>
|
||||
|
||||
#define FX_DLL_DEFINITION
|
||||
#include <fxdll.h>
|
||||
#include <glide.h>
|
||||
#include "fxglide.h"
|
||||
#ifdef __linux__
|
||||
#include <ctype.h>
|
||||
#endif
|
||||
|
||||
extern const int _grMipMapHostWH[GR_ASPECT_1x8 + 1][GR_LOD_1 + 1][2];
|
||||
extern FxU32 _gr_aspect_index_table[];
|
||||
extern FxU32 _grMipMapHostSize[4][16];
|
||||
|
||||
static FxU16 ReadDataShort(FILE *);
|
||||
static FxU32 ReadDataLong(FILE *);
|
||||
static void Read8Bit(FxU8 *dst, FILE *image, int small_lod, int large_lod, GrAspectRatio_t aspect);
|
||||
static void Read16Bit(FxU16 *dst, FILE *image, int small_lod, int large_lod, GrAspectRatio_t aspect);
|
||||
|
||||
#if ((GLIDE_PLATFORM & (GLIDE_OS_DOS32 | GLIDE_OS_WIN32 | GLIDE_OS_MACOS)) != 0)
|
||||
const char *openmode = "rb";
|
||||
#else
|
||||
const char *openmode = "r";
|
||||
#endif
|
||||
|
||||
typedef struct
|
||||
{
|
||||
const char *name;
|
||||
GrTextureFormat_t fmt;
|
||||
FxBool valid;
|
||||
} CfTableEntry;
|
||||
|
||||
|
||||
static FxBool
|
||||
_grGet3dfHeader(FILE* stream, char* const buffer, const FxU32 bufSize)
|
||||
{
|
||||
int numLines = 0;
|
||||
FxU32 bufPos = 0;
|
||||
|
||||
while(numLines < 4) {
|
||||
/* Handle stream errors */
|
||||
if (fgets(buffer + bufPos, bufSize - bufPos, stream) == NULL) break;
|
||||
bufPos += strlen(buffer + bufPos);
|
||||
|
||||
/* fgets includes the '\n' in the buffer. If this is not there
|
||||
* then the buffer is too small so fail.
|
||||
*/
|
||||
if (*(buffer + bufPos - sizeof(char)) != '\n') break;
|
||||
numLines++;
|
||||
}
|
||||
|
||||
return (numLines == 4);
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
** gu3dfGetInfo
|
||||
*/
|
||||
GR_DIENTRY(gu3dfGetInfo, FxBool,
|
||||
(const char *FileName, Gu3dfInfo *Info))
|
||||
{
|
||||
FILE *image_file;
|
||||
FxU32 i;
|
||||
char version[5];
|
||||
char color_format[10];
|
||||
int aspect_width, aspect_height;
|
||||
char buffer[100];
|
||||
int small_lod, large_lod;
|
||||
FxBool ratio_found = FXFALSE;
|
||||
FxBool format_found = FXFALSE;
|
||||
GrAspectRatio_t wh_aspect_table[] =
|
||||
{
|
||||
GR_ASPECT_1x1,
|
||||
GR_ASPECT_1x2,
|
||||
GR_ASPECT_1x4,
|
||||
GR_ASPECT_1x8
|
||||
};
|
||||
GrAspectRatio_t hw_aspect_table[] =
|
||||
{
|
||||
GR_ASPECT_1x1,
|
||||
GR_ASPECT_2x1,
|
||||
GR_ASPECT_4x1,
|
||||
GR_ASPECT_8x1
|
||||
};
|
||||
CfTableEntry cftable[] =
|
||||
{
|
||||
{ "I8", GR_TEXFMT_INTENSITY_8, FXTRUE },
|
||||
{ "A8", GR_TEXFMT_ALPHA_8, FXTRUE },
|
||||
{ "AI44", GR_TEXFMT_ALPHA_INTENSITY_44, FXTRUE },
|
||||
{ "YIQ", GR_TEXFMT_YIQ_422, FXTRUE },
|
||||
{ "RGB332", GR_TEXFMT_RGB_332, FXTRUE },
|
||||
{ "RGB565", GR_TEXFMT_RGB_565, FXTRUE },
|
||||
{ "ARGB8332", GR_TEXFMT_ARGB_8332, FXTRUE },
|
||||
{ "ARGB1555", GR_TEXFMT_ARGB_1555, FXTRUE },
|
||||
{ "AYIQ8422", GR_TEXFMT_AYIQ_8422, FXTRUE },
|
||||
{ "ARGB4444", GR_TEXFMT_ARGB_4444, FXTRUE },
|
||||
{ "AI88", GR_TEXFMT_ALPHA_INTENSITY_88, FXTRUE },
|
||||
{ "P8", GR_TEXFMT_P_8, FXTRUE },
|
||||
{ "AP88", GR_TEXFMT_AP_88, FXTRUE },
|
||||
{ 0, 0, FXFALSE }
|
||||
};
|
||||
|
||||
GDBG_INFO(81,"gu3dfGetInfo(%s,0x%x)\n",FileName,Info);
|
||||
/*
|
||||
** open the filen
|
||||
*/
|
||||
if((image_file = fopen(FileName, openmode)) == NULL) return FXFALSE;
|
||||
if (!_grGet3dfHeader(image_file, buffer, sizeof(buffer))) return FXFALSE;
|
||||
|
||||
/*
|
||||
** grab statistics out of the header
|
||||
*/
|
||||
if(sscanf(buffer,"3df v%s %s lod range: %i %i aspect ratio: %i %i\n",
|
||||
version,
|
||||
color_format,
|
||||
&small_lod, &large_lod,
|
||||
&aspect_width, &aspect_height) == 0)
|
||||
return FXFALSE;
|
||||
|
||||
/*
|
||||
** determine aspect ratio, height, and width
|
||||
*/
|
||||
i = 0;
|
||||
ratio_found = FXFALSE;
|
||||
while ((i < 4) && (!ratio_found)) {
|
||||
if ((aspect_width << i) == aspect_height) {
|
||||
Info->header.aspect_ratio = wh_aspect_table[i];
|
||||
ratio_found = FXTRUE;
|
||||
}
|
||||
|
||||
i++;
|
||||
}
|
||||
|
||||
i = 0;
|
||||
while ((i < 4) && (!ratio_found)) {
|
||||
if ((aspect_height << i) == aspect_width) {
|
||||
Info->header.aspect_ratio = hw_aspect_table[i];
|
||||
ratio_found = FXTRUE;
|
||||
}
|
||||
|
||||
i++;
|
||||
}
|
||||
if (!ratio_found) return FXFALSE;
|
||||
|
||||
/*
|
||||
** determine height and width of the mip map
|
||||
*/
|
||||
if (aspect_width >= aspect_height) {
|
||||
Info->header.width = large_lod;
|
||||
Info->header.height = large_lod / aspect_width;
|
||||
} else {
|
||||
Info->header.height = large_lod;
|
||||
Info->header.width = large_lod / aspect_height;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
** calculate proper LOD values
|
||||
*/
|
||||
/*
|
||||
** note for glide3 lod translation:
|
||||
** we should return the new defines for glide3
|
||||
*/
|
||||
switch (small_lod) {
|
||||
case 1:
|
||||
Info->header.small_lod = GR_LOD_1;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
Info->header.small_lod = GR_LOD_2;
|
||||
break;
|
||||
|
||||
case 4:
|
||||
Info->header.small_lod = GR_LOD_4;
|
||||
break;
|
||||
|
||||
case 8:
|
||||
Info->header.small_lod = GR_LOD_8;
|
||||
break;
|
||||
|
||||
case 16:
|
||||
Info->header.small_lod = GR_LOD_16;
|
||||
break;
|
||||
|
||||
case 32:
|
||||
Info->header.small_lod = GR_LOD_32;
|
||||
break;
|
||||
|
||||
case 64:
|
||||
Info->header.small_lod = GR_LOD_64;
|
||||
break;
|
||||
|
||||
case 128:
|
||||
Info->header.small_lod = GR_LOD_128;
|
||||
break;
|
||||
|
||||
case 256:
|
||||
Info->header.small_lod = GR_LOD_256;
|
||||
break;
|
||||
}
|
||||
|
||||
switch (large_lod) {
|
||||
case 1:
|
||||
Info->header.large_lod = GR_LOD_1;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
Info->header.large_lod = GR_LOD_2;
|
||||
break;
|
||||
|
||||
case 4:
|
||||
Info->header.large_lod = GR_LOD_4;
|
||||
break;
|
||||
|
||||
case 8:
|
||||
Info->header.large_lod = GR_LOD_8;
|
||||
break;
|
||||
|
||||
case 16:
|
||||
Info->header.large_lod = GR_LOD_16;
|
||||
break;
|
||||
|
||||
case 32:
|
||||
Info->header.large_lod = GR_LOD_32;
|
||||
break;
|
||||
|
||||
case 64:
|
||||
Info->header.large_lod = GR_LOD_64;
|
||||
break;
|
||||
|
||||
case 128:
|
||||
Info->header.large_lod = GR_LOD_128;
|
||||
break;
|
||||
|
||||
case 256:
|
||||
Info->header.large_lod = GR_LOD_256;
|
||||
break;
|
||||
}
|
||||
|
||||
/*
|
||||
** determine the color format of the input image
|
||||
*/
|
||||
#ifdef __GNUC__
|
||||
/* This function is not found in libgcc.a */
|
||||
{
|
||||
char* tempStr = (char*)color_format;
|
||||
while(*tempStr != '\0') *tempStr++ = toupper(*tempStr);
|
||||
}
|
||||
#else
|
||||
{
|
||||
extern char* strupr(char*);
|
||||
strupr(color_format);
|
||||
}
|
||||
#endif /* __GNUC__ */
|
||||
|
||||
i = 0;
|
||||
format_found = FXFALSE;
|
||||
while ((cftable[i].name != 0) && (!format_found)) {
|
||||
if (strcmp(color_format, cftable[i].name) == 0) {
|
||||
Info->header.format = cftable[i].fmt;
|
||||
format_found = FXTRUE;
|
||||
}
|
||||
|
||||
i++;
|
||||
}
|
||||
|
||||
/*
|
||||
** close the input file
|
||||
*/
|
||||
if (image_file != NULL) fclose(image_file);
|
||||
|
||||
if (format_found) {
|
||||
FxI32 lod;
|
||||
Info->mem_required = 0;
|
||||
for(lod = Info->header.large_lod; lod <= Info->header.small_lod; lod++) {
|
||||
Info->mem_required += (_grMipMapHostSize[_gr_aspect_index_table[Info->header.aspect_ratio]]
|
||||
[lod] << (Info->header.format >= GR_TEXFMT_16BIT));
|
||||
}
|
||||
}
|
||||
|
||||
return format_found;
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
** gu3dfLoad
|
||||
*/
|
||||
GR_DIENTRY(gu3dfLoad, FxBool, (const char *filename, Gu3dfInfo *info))
|
||||
{
|
||||
FILE *image_file = 0;
|
||||
FxU32 index = 0;
|
||||
char buffer[100] = "";
|
||||
|
||||
GDBG_INFO(81,"gu3dfLoad(%s,0x%x)\n",filename,info);
|
||||
/*
|
||||
** open the file
|
||||
*/
|
||||
if ((image_file = fopen(filename, openmode)) == NULL) return FXFALSE;
|
||||
if (!_grGet3dfHeader(image_file, buffer, sizeof(buffer))) return FXFALSE;
|
||||
|
||||
/*
|
||||
** If necessary, read in the YIQ decompression table
|
||||
*/
|
||||
if ((info->header.format == GR_TEXFMT_YIQ_422) ||
|
||||
(info->header.format == GR_TEXFMT_AYIQ_8422))
|
||||
{
|
||||
/*
|
||||
** read in Y
|
||||
*/
|
||||
for (index = 0; index < 16; index++)
|
||||
info->table.nccTable.yRGB[index] = ((FxI16) ReadDataShort(image_file)) & 0xFF;
|
||||
|
||||
/*
|
||||
** read in I
|
||||
*/
|
||||
for (index = 0; index < 4; index++) {
|
||||
info->table.nccTable.iRGB[index][0] = ((FxI16) ReadDataShort(image_file)) & 0x1FF;
|
||||
info->table.nccTable.iRGB[index][1] = ((FxI16) ReadDataShort(image_file)) & 0x1FF;
|
||||
info->table.nccTable.iRGB[index][2] = ((FxI16) ReadDataShort(image_file)) & 0x1FF;
|
||||
}
|
||||
|
||||
/*
|
||||
** read in Q
|
||||
*/
|
||||
for (index = 0; index < 4; index++) {
|
||||
info->table.nccTable.qRGB[index][0] = ((FxI16) ReadDataShort(image_file)) & 0x1FF;
|
||||
info->table.nccTable.qRGB[index][1] = ((FxI16) ReadDataShort(image_file)) & 0x1FF;
|
||||
info->table.nccTable.qRGB[index][2] = ((FxI16) ReadDataShort(image_file)) & 0x1FF;
|
||||
}
|
||||
|
||||
/*
|
||||
** pack the table Y entries
|
||||
*/
|
||||
for (index = 0; index < 4; index++) {
|
||||
FxU32 packedvalue;
|
||||
|
||||
packedvalue = ((FxU32) info->table.nccTable.yRGB[index*4+0]);
|
||||
packedvalue |= ((FxU32) info->table.nccTable.yRGB[index*4+1]) << 8;
|
||||
packedvalue |= ((FxU32) info->table.nccTable.yRGB[index*4+2]) << 16;
|
||||
packedvalue |= ((FxU32) info->table.nccTable.yRGB[index*4+3]) << 24;
|
||||
|
||||
info->table.nccTable.packed_data[index] = packedvalue;
|
||||
}
|
||||
|
||||
/*
|
||||
** pack the table I entries
|
||||
*/
|
||||
for (index = 0; index < 4; index++) {
|
||||
FxU32 packedvalue;
|
||||
|
||||
packedvalue = ((FxU32) info->table.nccTable.iRGB[index][0]) << 18;
|
||||
packedvalue |= ((FxU32) info->table.nccTable.iRGB[index][1]) << 9;
|
||||
packedvalue |= ((FxU32) info->table.nccTable.iRGB[index][2]) << 0;
|
||||
|
||||
info->table.nccTable.packed_data[index+4] = packedvalue;
|
||||
}
|
||||
|
||||
/*
|
||||
** pack the table Q entries
|
||||
*/
|
||||
for (index = 0; index < 4; index++) {
|
||||
FxU32 packedvalue;
|
||||
|
||||
packedvalue = ((FxU32) info->table.nccTable.qRGB[index][0]) << 18;
|
||||
packedvalue |= ((FxU32) info->table.nccTable.qRGB[index][1]) << 9;;
|
||||
packedvalue |= ((FxU32) info->table.nccTable.qRGB[index][2]) << 0;
|
||||
|
||||
info->table.nccTable.packed_data[index+8] = packedvalue;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
** If necessary, read in the Palette
|
||||
*/
|
||||
if ((info->header.format == GR_TEXFMT_P_8) ||
|
||||
(info->header.format == GR_TEXFMT_AP_88)) {
|
||||
FxU32 i;
|
||||
for(i = 0; i < 256; i++)
|
||||
info->table.palette.data[i] = ReadDataLong(image_file);
|
||||
}
|
||||
|
||||
/*
|
||||
** Read in the image
|
||||
*/
|
||||
switch (info->header.format)
|
||||
{
|
||||
case GR_TEXFMT_INTENSITY_8:
|
||||
case GR_TEXFMT_ALPHA_8:
|
||||
case GR_TEXFMT_ALPHA_INTENSITY_44:
|
||||
case GR_TEXFMT_YIQ_422:
|
||||
case GR_TEXFMT_RGB_332:
|
||||
case GR_TEXFMT_P_8:
|
||||
Read8Bit(info->data, image_file,
|
||||
info->header.small_lod,
|
||||
info->header.large_lod,
|
||||
info->header.aspect_ratio);
|
||||
break;
|
||||
|
||||
case GR_TEXFMT_RGB_565:
|
||||
case GR_TEXFMT_ARGB_8332:
|
||||
case GR_TEXFMT_ARGB_1555:
|
||||
case GR_TEXFMT_AYIQ_8422:
|
||||
case GR_TEXFMT_ARGB_4444:
|
||||
case GR_TEXFMT_ALPHA_INTENSITY_88:
|
||||
case GR_TEXFMT_AP_88:
|
||||
Read16Bit(info->data, image_file,
|
||||
info->header.small_lod,
|
||||
info->header.large_lod,
|
||||
info->header.aspect_ratio);
|
||||
break;
|
||||
|
||||
default:
|
||||
return FXFALSE;
|
||||
}
|
||||
|
||||
/*
|
||||
** close the file
|
||||
*/
|
||||
fclose(image_file);
|
||||
|
||||
return FXTRUE;
|
||||
}
|
||||
|
||||
/*
|
||||
** Read8Bit
|
||||
**
|
||||
** Read in an 8-bit texture map, unpacked.
|
||||
*/
|
||||
static void
|
||||
Read8Bit(FxU8 *data, FILE *image_file,
|
||||
int small_lod, int large_lod,
|
||||
GrAspectRatio_t aspect_ratio)
|
||||
{
|
||||
int lod;
|
||||
int width, height;
|
||||
|
||||
for (lod = large_lod; lod <= small_lod; lod++) {
|
||||
width = _grMipMapHostWH[aspect_ratio][lod][0];
|
||||
height = _grMipMapHostWH[aspect_ratio][lod][1];
|
||||
|
||||
fread(data, sizeof(char), width*height, image_file);
|
||||
data += width*height;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
** Read16Bit
|
||||
**
|
||||
** Read in a 16-bit texture map, unpacked.
|
||||
*/
|
||||
static void Read16Bit(FxU16 *data, FILE *image_file,
|
||||
int small_lod, int large_lod,
|
||||
GrAspectRatio_t aspect_ratio)
|
||||
{
|
||||
int index;
|
||||
int lod;
|
||||
int width, height;
|
||||
|
||||
for (lod = large_lod; lod <= small_lod; lod++) {
|
||||
width = _grMipMapHostWH[aspect_ratio][lod][0];
|
||||
height = _grMipMapHostWH[aspect_ratio][lod][1];
|
||||
|
||||
for (index = 0; index < (width * height); index++) {
|
||||
*data = ReadDataShort(image_file);
|
||||
data++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
** FxU16 ReadDataShort
|
||||
*/
|
||||
static FxU16 ReadDataShort(FILE *fp)
|
||||
{
|
||||
FxU16 b1 = (FxU16)getc(fp);
|
||||
FxU16 b2 = (FxU16)getc(fp);
|
||||
|
||||
#define kShiftB1 8
|
||||
#define kShiftB2 0
|
||||
|
||||
return (((b1 & 0xFF) << kShiftB1) | ((b2 & 0xFF) << kShiftB2));
|
||||
}
|
||||
|
||||
/*
|
||||
** ReadDataLong
|
||||
*/
|
||||
static FxU32 ReadDataLong(FILE *fp)
|
||||
{
|
||||
FxU32 data;
|
||||
FxU8 byte[4];
|
||||
|
||||
fread(byte, 4, 1, fp);
|
||||
data = (((FxU32) byte[0]) << 24) |
|
||||
(((FxU32) byte[1]) << 16) |
|
||||
(((FxU32) byte[2]) << 8) |
|
||||
((FxU32) byte[3]);
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,170 +0,0 @@
|
||||
/*
|
||||
** 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
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
*
|
||||
* 17 1/05/98 6:06p Atai
|
||||
* glide extension stuff
|
||||
*
|
||||
* 16 12/15/97 5:52p Atai
|
||||
* disable obsolete glide2 api for glide3
|
||||
*
|
||||
* 15 11/18/97 4:36p Peter
|
||||
* make thing more translucent
|
||||
*
|
||||
* 14 9/15/97 7:31p Peter
|
||||
* more cmdfifo cleanup, fixed normal buffer clear, banner in the right
|
||||
* place, lfb's are on, Hmmmm.. probably more
|
||||
*
|
||||
* 13 7/26/97 3:04p Peter
|
||||
* gratuitous plug is translucent
|
||||
*
|
||||
* 12 7/08/97 2:48p Peter
|
||||
* shameless plug just uses lfb routines
|
||||
*
|
||||
* 11 5/27/97 1:16p Peter
|
||||
* Basic cvg, w/o cmd fifo stuff.
|
||||
*
|
||||
* 10 5/21/97 6:05a Peter
|
||||
*
|
||||
* 9 5/02/97 2:08p Pgj
|
||||
* screen_width/height now FxU32
|
||||
*
|
||||
* 8 3/16/97 2:24a Jdt
|
||||
* Fixed bug. Didn't initialize info.
|
||||
*
|
||||
* 7 3/12/97 11:51p Jdt
|
||||
* Watcom warning.
|
||||
*
|
||||
* 6 3/12/97 4:20p Jdt
|
||||
* Fixed for VG96 and optimized SST-1
|
||||
*
|
||||
* 5 2/26/97 11:55a Jdt
|
||||
* Updated banner for new lfb api
|
||||
*
|
||||
* 4 12/23/96 1:37p Dow
|
||||
* chagnes for multiplatform glide
|
||||
**
|
||||
*/
|
||||
#include <3dfx.h>
|
||||
#include <glidesys.h>
|
||||
|
||||
#define FX_DLL_DEFINITION
|
||||
#include <fxdll.h>
|
||||
#include <glide.h>
|
||||
#include "fxglide.h"
|
||||
|
||||
#ifdef GLIDE_PLUG
|
||||
#include "banner.inc"
|
||||
#endif
|
||||
|
||||
/* display the translucent 3Dfx powerfield logo */
|
||||
void
|
||||
_grShamelessPlug(void)
|
||||
{
|
||||
#ifdef GLIDE_PLUG
|
||||
GrState state;
|
||||
|
||||
GR_BEGIN_NOFIFOCHECK("_grShamelessPlug", 80);
|
||||
GDBG_INFO_MORE(gc->myLevel, "()\n");
|
||||
|
||||
grGlideGetState(&state);
|
||||
grDisableAllEffects();
|
||||
|
||||
grAlphaCombine(GR_COMBINE_FUNCTION_SCALE_OTHER,
|
||||
GR_COMBINE_FACTOR_ONE,
|
||||
GR_COMBINE_LOCAL_CONSTANT,
|
||||
GR_COMBINE_OTHER_TEXTURE, FXFALSE);
|
||||
grColorCombine(GR_COMBINE_FUNCTION_SCALE_OTHER,
|
||||
GR_COMBINE_FACTOR_ONE,
|
||||
GR_COMBINE_LOCAL_NONE,
|
||||
GR_COMBINE_OTHER_TEXTURE,
|
||||
FXFALSE);
|
||||
grAlphaBlendFunction(GR_BLEND_SRC_ALPHA,
|
||||
GR_BLEND_ONE_MINUS_SRC_ALPHA,
|
||||
GR_BLEND_ZERO, GR_BLEND_ZERO);
|
||||
grClipWindow(0, 0,
|
||||
gc->state.screen_width - 1,
|
||||
gc->state.screen_height - 1);
|
||||
grDepthMask(FXFALSE);
|
||||
grDepthBufferFunction(GR_CMP_ALWAYS);
|
||||
grDepthBufferMode(GR_DEPTHBUFFER_DISABLE);
|
||||
|
||||
#if defined(GLIDE3) && defined(GLIDE3_ALPHA)
|
||||
_grChromaRangeExt(0x0000, 0x0000, GR_CHROMARANGE_RGB_ALL);
|
||||
#else
|
||||
grChromakeyValue(0x0000);
|
||||
#endif
|
||||
|
||||
grChromakeyMode(GR_CHROMAKEY_ENABLE);
|
||||
grLfbConstantAlpha((FxU8) 0x40);
|
||||
grLfbWriteColorFormat(GR_COLORFORMAT_ARGB);
|
||||
|
||||
#if 1
|
||||
/* NB: The banner image is actually upside down. Hence the
|
||||
* negative stride and starting address calculation.
|
||||
*/
|
||||
_grLfbWriteRegion(FXTRUE, GR_BUFFER_BACKBUFFER,
|
||||
gc->state.screen_width - (banner_width + 1),
|
||||
gc->state.screen_height - (banner_height + 1),
|
||||
GR_LFBWRITEMODE_565,
|
||||
banner_width, banner_height,
|
||||
-(banner_width << 1),
|
||||
banner_data + (banner_width * (banner_height - 1)));
|
||||
#else
|
||||
{
|
||||
const FxI32 maxY = gc->state.screen_height - (banner_height + 1);
|
||||
const FxI32 maxX = gc->state.screen_width - (banner_width + 1);
|
||||
static FxI32 y = 0;
|
||||
static FxI32 x = 0;
|
||||
static FxI32 plugDir;
|
||||
|
||||
{
|
||||
const FxI32* maxP;
|
||||
const FxI32* valP;
|
||||
|
||||
if (maxX > maxY) {
|
||||
maxP = &maxY;
|
||||
valP = &y;
|
||||
} else {
|
||||
maxP = &maxX;
|
||||
valP = &x;
|
||||
}
|
||||
|
||||
if (*valP == 0) plugDir = 1;
|
||||
else if (*valP >= *maxP) plugDir = -1;
|
||||
}
|
||||
|
||||
_grLfbWriteRegion(FXTRUE, GR_BUFFER_BACKBUFFER,
|
||||
x += plugDir,
|
||||
y += plugDir,
|
||||
GR_LFBWRITEMODE_565,
|
||||
banner_width, banner_height,
|
||||
-(banner_width << 1),
|
||||
banner_data + (banner_width * (banner_height - 1)));
|
||||
}
|
||||
#endif
|
||||
|
||||
grGlideSetState(&state);
|
||||
|
||||
GR_END();
|
||||
#endif /* GLIDE_PLUG */
|
||||
} /* _grShamelessPlug */
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,277 +0,0 @@
|
||||
/*
|
||||
** 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
|
||||
**
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
**
|
||||
** 28 3/14/98 1:07p Peter
|
||||
** mac port happiness
|
||||
**
|
||||
** 27 2/11/98 5:23p Peter
|
||||
** no more infinite recursion
|
||||
*
|
||||
* 26 12/18/97 2:13p Peter
|
||||
* cleaned up the error code
|
||||
*
|
||||
* 25 12/09/97 12:20p Peter
|
||||
* mac glide port
|
||||
*
|
||||
* 24 12/05/97 4:38p Peter
|
||||
* sli vs assertions
|
||||
*
|
||||
* 23 12/03/97 11:34a Peter
|
||||
* dos debugging
|
||||
*
|
||||
* 22 11/17/97 4:55p Peter
|
||||
* watcom warnings/chipfield stuff
|
||||
*
|
||||
* 21 11/15/97 8:55p Peter
|
||||
* Removed OutputDebugString
|
||||
*
|
||||
* 20 11/15/97 7:43p Peter
|
||||
* more comdex silliness
|
||||
*
|
||||
* 19 11/12/97 2:27p Peter
|
||||
*
|
||||
* 18 11/12/97 11:16a Peter
|
||||
* cleaned up assertions
|
||||
*
|
||||
* 17 11/04/97 5:04p Peter
|
||||
* cataclysm part deux
|
||||
*
|
||||
* 16 11/03/97 4:02p Peter
|
||||
* cataclysm fix
|
||||
*
|
||||
* 15 11/03/97 3:43p Peter
|
||||
* h3/cvg cataclysm
|
||||
*
|
||||
* 14 10/23/97 5:28p Peter
|
||||
* sli fifo thing
|
||||
*
|
||||
* 13 9/24/97 1:29p Peter
|
||||
* more assertion spewage
|
||||
*
|
||||
* 12 9/05/97 5:29p Peter
|
||||
* changes for direct hw
|
||||
*
|
||||
* 11 5/30/97 5:44p Peter
|
||||
* Version that does basic triangles/registers w/ command fifo. Does not
|
||||
* currently download textures correctly.
|
||||
*
|
||||
* 10 5/28/97 9:05a Peter
|
||||
* Merge w/ latest glide changes
|
||||
*
|
||||
* 9 5/27/97 1:16p Peter
|
||||
* Basic cvg, w/o cmd fifo stuff.
|
||||
*
|
||||
* 8 5/21/97 6:05a Peter
|
||||
*
|
||||
* 7 5/20/97 9:47a Pgj
|
||||
* Use OutputDebugString for non-fatal errors under windows
|
||||
*
|
||||
* 6 5/19/97 7:35p Pgj
|
||||
* Print cogent error message if h/w not found
|
||||
*
|
||||
* 5 3/09/97 10:31a Dow
|
||||
* Added GR_DIENTRY for di glide functions
|
||||
*
|
||||
* 4 12/23/96 1:37p Dow
|
||||
* chagnes for multiplatform glide
|
||||
**
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#ifdef __DOS__
|
||||
# include <malloc.h>
|
||||
#endif
|
||||
|
||||
#ifdef __WIN32__
|
||||
# include <windows.h>
|
||||
#endif
|
||||
|
||||
#include <3dfx.h>
|
||||
#define FX_DLL_DEFINITION
|
||||
#include <fxdll.h>
|
||||
#include <glide.h>
|
||||
#include "fxglide.h"
|
||||
|
||||
void (*GrErrorCallback)( const char *string, FxBool fatal );
|
||||
|
||||
void _doGrErrorCallback( const char *name, const char *msg, FxBool fatal )
|
||||
{
|
||||
char buf[1024];
|
||||
|
||||
#if GDBG_INFO_ON
|
||||
/* Neuter any fifo checking from the failing
|
||||
* call. Otherwise entries into the shutdown
|
||||
* calls cause spurious crap.
|
||||
*/
|
||||
if (fatal) {
|
||||
GR_DCL_GC;
|
||||
|
||||
gc->checkCounter =
|
||||
gc->expected_counter = 0;
|
||||
|
||||
gc->checkCounter =
|
||||
gc->checkPtr = 0UL;
|
||||
}
|
||||
#endif /* GDBG_INFO_ON */
|
||||
|
||||
gdbg_printf("%s: %s.\n", name, msg);
|
||||
sprintf(buf,"%s: %s.\n", name, msg);
|
||||
GrErrorCallback(buf, fatal);
|
||||
|
||||
if (fatal) exit(1);
|
||||
}
|
||||
|
||||
GR_DIENTRY(grErrorSetCallback, void,
|
||||
( void (*function) ( const char *string, FxBool fatal ) ))
|
||||
{
|
||||
GDBG_INFO(80,"grErrorSetCallback(0x%x)",function);
|
||||
GrErrorCallback = function;
|
||||
}
|
||||
|
||||
#ifdef __WIN32__
|
||||
void
|
||||
_grErrorWindowsCallback( const char *s, FxBool fatal )
|
||||
{
|
||||
if ( fatal ) {
|
||||
GDBG_ERROR("glide", s);
|
||||
grGlideShutdown();
|
||||
MessageBox(NULL, s, NULL, MB_OK);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
_grErrorDefaultCallback( const char *s, FxBool fatal )
|
||||
{
|
||||
if ( fatal ) {
|
||||
GDBG_ERROR("glide",s);
|
||||
grGlideShutdown();
|
||||
|
||||
#if (GLIDE_PLATFORM & GLIDE_OS_MACOS)
|
||||
{
|
||||
Str255 errBuf;
|
||||
|
||||
errBuf[0] = sprintf((char*)(errBuf + 1), "%s", s);
|
||||
DebugStr(errBuf);
|
||||
}
|
||||
#endif /* (GLIDE_PLATFORM * GLIDE_OS_MACOS) */
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef __DOS__
|
||||
int _guHeapCheck( void )
|
||||
{
|
||||
int i = _heapchk();
|
||||
|
||||
if ( i != _HEAPOK )
|
||||
printf( "heapchk: %d\n", i );
|
||||
|
||||
return ( i == 0 );
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
_grAssert(char *exp, char *fileName, int lineNo)
|
||||
{
|
||||
GR_DCL_GC;
|
||||
GR_DCL_HW;
|
||||
|
||||
/* No recursive re-entry thank you very much */
|
||||
{
|
||||
static FxBool inProcP = FXFALSE;
|
||||
if (inProcP) return;
|
||||
inProcP = FXTRUE;
|
||||
}
|
||||
|
||||
/* dpc - 28 may 1997 - FixMe!
|
||||
* What to do here?
|
||||
*/
|
||||
#if GLIDE_INIT_HAL
|
||||
|
||||
#else /* !GLIDE_INIT_HAL */
|
||||
/* initRestoreVideo(); */
|
||||
sst1InitShutdown(gc->base_ptr);
|
||||
#endif /* !GLIDE_INIT_HAL */
|
||||
|
||||
gdbg_printf("ASSERTION FAILED:\n");
|
||||
gdbg_printf("\tExpression: %s\n", exp);
|
||||
gdbg_printf("\tFile: %s\n", fileName);
|
||||
gdbg_printf("\tLine: %d\n", lineNo);
|
||||
|
||||
#if (GLIDE_PLATFORM & GLIDE_HW_CVG) && USE_PACKET_FIFO
|
||||
/* Spew about the state of the fifo since that's what most of the
|
||||
* assertions are about anyway.
|
||||
*/
|
||||
{
|
||||
gdbg_printf("Command Fifo:\n");
|
||||
gdbg_printf("\tfifoPtr: 0x%X\n"
|
||||
"\tfifoParams: 0x%X : (0x%X : 0x%X)\n"
|
||||
"\tfifoRoom: 0x%X : (0x%X : 0x%X)\n"
|
||||
"\tfifo hw: (0x%X : 0x%X) : (0x%X : 0x%X : 0x%X)\n"
|
||||
"\tStatus: 0x%X\n",
|
||||
gc->cmdTransportInfo.fifoPtr,
|
||||
gc->cmdTransportInfo.fifoStart, gc->cmdTransportInfo.fifoEnd,
|
||||
gc->cmdTransportInfo.fifoSize,
|
||||
gc->cmdTransportInfo.fifoRoom,
|
||||
gc->cmdTransportInfo.roomToReadPtr, gc->cmdTransportInfo.roomToEnd,
|
||||
HW_FIFO_PTR(FXTRUE), gc->cmdTransportInfo.fifoRead,
|
||||
GR_GET(hw->cmdFifoDepth), GR_GET(hw->cmdFifoHoles), GR_GET(hw->cmdFifoBase),
|
||||
GR_GET(hw->status));
|
||||
|
||||
#if !GLIDE_INIT_HAL
|
||||
if (gc->scanline_interleaved) {
|
||||
SstRegs* slaveHw = (SstRegs*)gc->slave_ptr;
|
||||
|
||||
GDBG_INFO_MORE(gc->myLevel, "\tsli: 0x%X : (0x%X : 0x%X : 0x%X)\n",
|
||||
HW_FIFO_PTR(FXFALSE),
|
||||
GR_GET(slaveHw->cmdFifoDepth),
|
||||
GR_GET(slaveHw->cmdFifoHoles),
|
||||
GR_GET(slaveHw->status));
|
||||
}
|
||||
#endif /* !GLIDE_INIT_HAL */
|
||||
|
||||
#if GLIDE_USE_SHADOW_FIFO
|
||||
if (gc->cmdTransportInfo.fifoShadowBase != NULL) {
|
||||
const FxU32* fifoPtr = gc->cmdTransportInfo.fifoShadowBase;
|
||||
|
||||
GDBG_PRINTF("Shadow Fifo: 0x%X\n", gc->cmdTransportInfo.fifoShadowPtr);
|
||||
|
||||
#if 0
|
||||
while(fifoPtr != gc->cmdTransportInfo.fifoShadowPtr) GDBG_PRINTF("0x%X\n", *fifoPtr++);
|
||||
GDBG_PRINTF("\n");
|
||||
|
||||
GDBG_PRINTF("Up to fifo wrap: \n");
|
||||
while(fifoPtr < gc->cmdTransportInfo.fifoShadowBase + (kDebugFifoSize >> 2))
|
||||
GDBG_PRINTF("0x%X\n", *fifoPtr++);
|
||||
#endif
|
||||
|
||||
free(gc->cmdTransportInfo.fifoShadowBase);
|
||||
}
|
||||
#endif /* GLIDE_USE_SHADOW_FIFO */
|
||||
}
|
||||
#endif /* (GLIDE_PLATFORM & GLIDE_HW_CVG) && USE_PACKET_FIFO */
|
||||
|
||||
gdbg_printf("ABNORMAL TERMINATION\n");
|
||||
|
||||
exit(-1);
|
||||
|
||||
} /* _grAssert */
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,71 +0,0 @@
|
||||
/*
|
||||
** 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
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
*/
|
||||
|
||||
#define OFFICIAL 1
|
||||
#define FINAL 1
|
||||
|
||||
#include <fxver.h>
|
||||
#include "rcver.h"
|
||||
#include "fxbldno.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Version
|
||||
//
|
||||
#ifndef GLIDE3
|
||||
#define VERSIONNAME "glide2x.dll\0"
|
||||
#else
|
||||
#define VERSIONNAME "glide3x.dll\0"
|
||||
#endif
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION MANVERSION, MANREVISION, 0, BUILD_NUMBER
|
||||
PRODUCTVERSION MANVERSION, MANREVISION, 0, BUILD_NUMBER
|
||||
FILEFLAGSMASK 0x0030003FL
|
||||
FILEFLAGS (VER_PRIVATEBUILD|VER_PRERELEASE|VER_DEBUG)
|
||||
|
||||
FILEOS VOS_DOS_WINDOWS32
|
||||
FILETYPE VFT_DRV
|
||||
FILESUBTYPE VFT2_DRV_INSTALLABLE
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "040904E4"
|
||||
BEGIN
|
||||
VALUE "CompanyName", "3Dfx Interactive, Inc.\0"
|
||||
VALUE "FileDescription", "3Dfx Interactive, Inc. Glide DLL\0"
|
||||
VALUE "FileVersion", VERSIONSTR
|
||||
VALUE "InternalName", VERSIONNAME
|
||||
VALUE "LegalCopyright", "Copyright \251 3Dfx Interactive, Inc. 1997\0"
|
||||
VALUE "OriginalFilename", VERSIONNAME
|
||||
VALUE "ProductName", PRODNAME
|
||||
VALUE "ProductVersion", VERSIONSTR
|
||||
VALUE "Graphics Subsystem", HWSTR
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
/* the following line should be extended for localized versions */
|
||||
VALUE "Translation", 0x409, 1252
|
||||
END
|
||||
END
|
||||
@@ -1,131 +0,0 @@
|
||||
/*
|
||||
** 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
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
*
|
||||
* 10 12/09/97 12:20p Peter
|
||||
* mac glide port
|
||||
*
|
||||
* 9 11/04/97 4:00p Dow
|
||||
* Banshee Mods
|
||||
*
|
||||
* 8 8/18/97 3:52p Peter
|
||||
* pre-hw arrival fixes/cleanup
|
||||
*
|
||||
* 7 6/02/97 4:09p Peter
|
||||
* Compile w/ gcc for Dural
|
||||
*
|
||||
* 6 5/27/97 1:16p Peter
|
||||
* Basic cvg, w/o cmd fifo stuff.
|
||||
*
|
||||
* 5 5/21/97 6:05a Peter
|
||||
*/
|
||||
#ifndef __GLIDESYS_H__
|
||||
#define __GLIDESYS_H__
|
||||
|
||||
/*
|
||||
n** -----------------------------------------------------------------------
|
||||
** COMPILER/ENVIRONMENT CONFIGURATION
|
||||
** -----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* Endianness is stored in bits [30:31] */
|
||||
#define GLIDE_ENDIAN_SHIFT 30
|
||||
#define GLIDE_ENDIAN_LITTLE (0x1 << GLIDE_ENDIAN_SHIFT)
|
||||
#define GLIDE_ENDIAN_BIG (0x2 << GLIDE_ENDIAN_SHIFT)
|
||||
|
||||
/* OS is stored in bits [0:6] */
|
||||
#define GLIDE_OS_SHIFT 0
|
||||
#define GLIDE_OS_UNIX 0x1
|
||||
#define GLIDE_OS_DOS32 0x2
|
||||
#define GLIDE_OS_WIN32 0x4
|
||||
#define GLIDE_OS_MACOS 0x8
|
||||
#define GLIDE_OS_OS2 0x10
|
||||
#define GLIDE_OS_OTHER 0x40 /* For Proprietary Arcade HW */
|
||||
|
||||
#define GLIDE_SST_SHIFT 7
|
||||
#define GLIDE_SST_HW (0x2 << GLIDE_SST_SHIFT)
|
||||
|
||||
/* Hardware Type is stored in bits [9:13] */
|
||||
#define GLIDE_HW_SHIFT 9
|
||||
#define GLIDE_HW_SST1 (0x1 << GLIDE_HW_SHIFT)
|
||||
#define GLIDE_HW_SST96 (0x2 << GLIDE_HW_SHIFT)
|
||||
#define GLIDE_HW_H3 (0x4 << GLIDE_HW_SHIFT)
|
||||
#define GLIDE_HW_CVG (0x10 << GLIDE_HW_SHIFT)
|
||||
|
||||
/*
|
||||
** Make sure we handle all instances of WIN32
|
||||
*/
|
||||
#ifndef __WIN32__
|
||||
# if defined (_WIN32) || defined (WIN32) || defined(__NT__)
|
||||
# define __WIN32__
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* We need two checks on the OS: one for endian, the other for OS */
|
||||
/* Check for endianness */
|
||||
#if defined(__IRIX__) || defined(__sparc__) || defined(MACOS)
|
||||
# define GLIDE_ENDIAN GLIDE_ENDIAN_BIG
|
||||
#else
|
||||
# define GLIDE_ENDIAN GLIDE_ENDIAN_LITTLE
|
||||
#endif
|
||||
|
||||
/* Check for OS */
|
||||
#if defined(__IRIX__) || defined(__sparc__) || defined(__linux__)
|
||||
# define GLIDE_OS GLIDE_OS_UNIX
|
||||
#elif defined(__DOS__)
|
||||
# define GLIDE_OS GLIDE_OS_DOS32
|
||||
#elif defined(__WIN32__)
|
||||
# define GLIDE_OS GLIDE_OS_WIN32
|
||||
#elif defined(macintosh)
|
||||
# define GLIDE_OS GLIDE_OS_MACOS
|
||||
#else
|
||||
#error "Unknown OS"
|
||||
#endif
|
||||
|
||||
#define GLIDE_SST GLIDE_SST_HW
|
||||
|
||||
/* Check for type of hardware */
|
||||
#ifdef SST96
|
||||
# define GLIDE_HW GLIDE_HW_SST96
|
||||
#elif defined(H3)
|
||||
# define GLIDE_HW GLIDE_HW_H3
|
||||
#elif defined(CVG)
|
||||
# define GLIDE_HW GLIDE_HW_CVG
|
||||
#else /* Default to SST1 */
|
||||
# define GLIDE_HW GLIDE_HW_SST1
|
||||
#endif
|
||||
|
||||
|
||||
#define GLIDE_PLATFORM (GLIDE_ENDIAN | GLIDE_OS | GLIDE_SST | GLIDE_HW)
|
||||
|
||||
/*
|
||||
** Control the number of TMUs
|
||||
*/
|
||||
#ifndef GLIDE_NUM_TMU
|
||||
# define GLIDE_NUM_TMU 2
|
||||
#endif
|
||||
|
||||
|
||||
#if ((GLIDE_NUM_TMU < 0) && (GLIDE_NUM_TMU > 3))
|
||||
# error "GLIDE_NUM_TMU set to an invalid value"
|
||||
#endif
|
||||
|
||||
#endif /* __GLIDESYS_H__ */
|
||||
@@ -1,186 +0,0 @@
|
||||
/*
|
||||
** 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
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
*
|
||||
* 11 1/07/98 11:18a Atai
|
||||
* remove GrMipMapInfo and GrGC.mm_table in glide3
|
||||
*
|
||||
* 10 1/06/98 6:47p Atai
|
||||
* undo grSplash and remove gu routines
|
||||
*
|
||||
* 9 1/05/98 6:04p Atai
|
||||
* move 3df gu related data structure from glide.h to glideutl.h
|
||||
*
|
||||
* 8 12/18/97 2:13p Peter
|
||||
* fogTable cataclysm
|
||||
*
|
||||
* 7 12/15/97 5:52p Atai
|
||||
* disable obsolete glide2 api for glide3
|
||||
*
|
||||
* 6 8/14/97 5:32p Pgj
|
||||
* remove dead code per GMT
|
||||
*
|
||||
* 5 6/12/97 5:19p Pgj
|
||||
* Fix bug 578
|
||||
*
|
||||
* 4 3/05/97 9:36p Jdt
|
||||
* Removed guFbWriteRegion added guEncodeRLE16
|
||||
*
|
||||
* 3 1/16/97 3:45p Dow
|
||||
* Embedded fn protos in ifndef FX_GLIDE_NO_FUNC_PROTO
|
||||
*/
|
||||
|
||||
/* Glide Utility routines */
|
||||
|
||||
#ifndef __GLIDEUTL_H__
|
||||
#define __GLIDEUTL_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if defined(GLIDE3) && defined(GLIDE3_ALPHA)
|
||||
/*
|
||||
** 3DF texture file structs
|
||||
*/
|
||||
|
||||
typedef struct
|
||||
{
|
||||
FxU32 width, height;
|
||||
int small_lod, large_lod;
|
||||
GrAspectRatio_t aspect_ratio;
|
||||
GrTextureFormat_t format;
|
||||
} Gu3dfHeader;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
FxU8 yRGB[16];
|
||||
FxI16 iRGB[4][3];
|
||||
FxI16 qRGB[4][3];
|
||||
FxU32 packed_data[12];
|
||||
} GuNccTable;
|
||||
|
||||
typedef struct {
|
||||
FxU32 data[256];
|
||||
} GuTexPalette;
|
||||
|
||||
typedef union {
|
||||
GuNccTable nccTable;
|
||||
GuTexPalette palette;
|
||||
} GuTexTable;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
Gu3dfHeader header;
|
||||
GuTexTable table;
|
||||
void *data;
|
||||
FxU32 mem_required; /* memory required for mip map in bytes. */
|
||||
} Gu3dfInfo;
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef FX_GLIDE_NO_FUNC_PROTO
|
||||
/*
|
||||
** rendering functions
|
||||
*/
|
||||
|
||||
#ifndef GLIDE3_ALPHA
|
||||
FX_ENTRY void FX_CALL
|
||||
guAADrawTriangleWithClip( const GrVertex *a, const GrVertex
|
||||
*b, const GrVertex *c);
|
||||
|
||||
FX_ENTRY void FX_CALL
|
||||
guDrawTriangleWithClip(
|
||||
const GrVertex *a,
|
||||
const GrVertex *b,
|
||||
const GrVertex *c
|
||||
);
|
||||
|
||||
FX_ENTRY void FX_CALL
|
||||
guDrawPolygonVertexListWithClip( int nverts, const GrVertex vlist[] );
|
||||
|
||||
/*
|
||||
** hi-level rendering utility functions
|
||||
*/
|
||||
FX_ENTRY void FX_CALL
|
||||
guAlphaSource( GrAlphaSource_t mode );
|
||||
|
||||
FX_ENTRY void FX_CALL
|
||||
guColorCombineFunction( GrColorCombineFnc_t fnc );
|
||||
|
||||
FX_ENTRY int FX_CALL
|
||||
guEncodeRLE16( void *dst,
|
||||
void *src,
|
||||
FxU32 width,
|
||||
FxU32 height );
|
||||
|
||||
FX_ENTRY FxU16 * FX_CALL
|
||||
guTexCreateColorMipMap( void );
|
||||
#endif /* !GLIDE3_ALPHA */
|
||||
|
||||
#ifdef GLIDE3
|
||||
FX_ENTRY void FX_CALL
|
||||
guGammaCorrectionRGB( FxFloat red, FxFloat green, FxFloat blue );
|
||||
#endif
|
||||
|
||||
/*
|
||||
** fog stuff
|
||||
*/
|
||||
FX_ENTRY float FX_CALL
|
||||
guFogTableIndexToW( int i );
|
||||
|
||||
FX_ENTRY void FX_CALL
|
||||
guFogGenerateExp( GrFog_t fogtable[], float density );
|
||||
|
||||
FX_ENTRY void FX_CALL
|
||||
guFogGenerateExp2( GrFog_t fogtable[], float density );
|
||||
|
||||
FX_ENTRY void FX_CALL
|
||||
guFogGenerateLinear(GrFog_t fogtable[],
|
||||
float nearZ, float farZ );
|
||||
|
||||
/*
|
||||
** endian stuff
|
||||
*/
|
||||
#ifndef GLIDE3_ALPHA
|
||||
FX_ENTRY FxU32 FX_CALL
|
||||
guEndianSwapWords( FxU32 value );
|
||||
|
||||
FX_ENTRY FxU16 FX_CALL
|
||||
guEndianSwapBytes( FxU16 value );
|
||||
#endif /* !GLIDE3_ALPHA */
|
||||
|
||||
/*
|
||||
** hi-level texture manipulation tools.
|
||||
*/
|
||||
FX_ENTRY FxBool FX_CALL
|
||||
gu3dfGetInfo( const char *filename, Gu3dfInfo *info );
|
||||
|
||||
FX_ENTRY FxBool FX_CALL
|
||||
gu3dfLoad( const char *filename, Gu3dfInfo *data );
|
||||
|
||||
#endif /* FX_GLIDE_NO_FUNC_PROTO */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __GLIDEUTL_H__ */
|
||||
@@ -1,56 +0,0 @@
|
||||
/*
|
||||
** 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
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
*
|
||||
* 6 8/30/97 5:59p Tarolli
|
||||
* cleanups
|
||||
*
|
||||
* 5 5/27/97 1:16p Peter
|
||||
* Basic cvg, w/o cmd fifo stuff.
|
||||
*
|
||||
* 4 5/21/97 6:05a Peter
|
||||
*
|
||||
* 3 3/09/97 10:31a Dow
|
||||
* Added GR_DIENTRY for di glide functions
|
||||
**
|
||||
*/
|
||||
#include <string.h>
|
||||
|
||||
#include <3dfx.h>
|
||||
#define FX_DLL_DEFINITION
|
||||
#include <fxdll.h>
|
||||
#include <glide.h>
|
||||
#include "fxglide.h"
|
||||
|
||||
GR_DIENTRY(guMovieStart, void, ( void ))
|
||||
{
|
||||
GrErrorCallback( "guMovieStart: unsupported", FXFALSE );
|
||||
}
|
||||
|
||||
GR_DIENTRY(guMovieStop, void, ( void ))
|
||||
{
|
||||
GrErrorCallback( "guMovieStop: unsupported", FXFALSE );
|
||||
}
|
||||
|
||||
GR_DIENTRY(guMovieSetName, void, ( const char *name ))
|
||||
{
|
||||
GrErrorCallback( "guMovieSetName: unsupported", FXFALSE );
|
||||
}
|
||||
@@ -1,629 +0,0 @@
|
||||
/*
|
||||
** 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
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
**
|
||||
** 110 6/30/98 6:08p Jeske
|
||||
** fixed bug where we tried to setup MTRRs on old (<p6) systems which
|
||||
** didn't have them.
|
||||
**
|
||||
** 109 5/21/98 5:52p Peter
|
||||
** mismatched pairs
|
||||
**
|
||||
** 108 5/20/98 3:51p Peter
|
||||
** no fifo glide
|
||||
**
|
||||
** 107 5/18/98 12:15p Peter
|
||||
** better point code
|
||||
**
|
||||
** 106 4/21/98 5:53p Peter
|
||||
** slidetect vs hw pointers
|
||||
**
|
||||
** 105 4/08/98 3:52p Peter
|
||||
** point coordinate truncation
|
||||
**
|
||||
** 104 4/06/98 9:55a Peter
|
||||
** sli slave detection for oem dll
|
||||
**
|
||||
** 103 3/17/98 6:50p Peter
|
||||
** sli paired vs active
|
||||
**
|
||||
** 102 3/17/98 3:00p Peter
|
||||
** removed unused stats
|
||||
**
|
||||
** 101 3/13/98 5:08p Peter
|
||||
** doh, got it backwards
|
||||
**
|
||||
** 100 3/13/98 3:39p Peter
|
||||
** voodoo1.5 silliness
|
||||
**
|
||||
** 99 2/20/98 9:05a Peter
|
||||
** removed remnants of comdex grot
|
||||
**
|
||||
** 98 2/11/98 5:25p Peter
|
||||
** detection dialog fixes
|
||||
**
|
||||
** 97 1/30/98 4:51p Peter
|
||||
** fixed sli-detect for multiple pairs
|
||||
**
|
||||
** 96 1/30/98 4:27p Peter
|
||||
** no uswc for sli slave
|
||||
**
|
||||
** 95 1/24/98 12:29p Peter
|
||||
** more caching fun
|
||||
**
|
||||
** 94 1/20/98 11:03a Peter
|
||||
** env var to force triple buffering
|
||||
*
|
||||
* 93 1/16/98 5:41p Peter
|
||||
* fixed sense of lod_dither
|
||||
*
|
||||
* 92 1/14/98 10:22a Peter
|
||||
* no more hacks
|
||||
*
|
||||
* 91 1/08/98 7:09p Peter
|
||||
* real hw stuff modulo makefile change
|
||||
*
|
||||
* 90 1/07/98 11:18a Atai
|
||||
* remove GrMipMapInfo and GrGC.mm_table in glide3
|
||||
*
|
||||
* 89 1/07/98 10:22a Peter
|
||||
* lod dithering env var
|
||||
*
|
||||
* 88 12/17/97 10:08a Peter
|
||||
* fast system comdex twiddling
|
||||
*
|
||||
* 87 12/09/97 4:20p Peter
|
||||
* 0x100 fbiRev ofset for v2
|
||||
*
|
||||
* 86 12/09/97 12:20p Peter
|
||||
* mac glide port
|
||||
*
|
||||
* 85 12/05/97 4:26p Peter
|
||||
* watcom warnings
|
||||
*
|
||||
* 84 12/03/97 2:36p Peter
|
||||
* upped comdex reset defaults
|
||||
*
|
||||
* 83 12/02/97 9:48a Dow
|
||||
* Removed some spurious code I inadvertantly added.
|
||||
*
|
||||
* 82 11/21/97 6:24p Dow
|
||||
* Banshee Lying about being Rush stuf
|
||||
*
|
||||
* 81 11/21/97 11:19a Dow
|
||||
* Made Banshee report Voodoo2
|
||||
*
|
||||
* 80 11/20/97 6:39p Peter
|
||||
* fixed direct_exec w/ csim
|
||||
*
|
||||
* 79 11/19/97 2:49p Peter
|
||||
* env vars in registry for win32
|
||||
*
|
||||
* 78 11/17/97 4:55p Peter
|
||||
* watcom warnings/chipfield stuff
|
||||
*
|
||||
* 77 11/15/97 7:43p Peter
|
||||
* more comdex silliness
|
||||
*
|
||||
* 76 11/14/97 11:10p Peter
|
||||
* open vs hw init confusion
|
||||
*
|
||||
* 75 11/14/97 5:02p Peter
|
||||
* more comdex stuff
|
||||
*
|
||||
* 74 11/14/97 12:09a Peter
|
||||
* comdex thing and some other stuff
|
||||
*
|
||||
* 73 11/12/97 9:54p Peter
|
||||
* fixed all the muckage from new config
|
||||
*
|
||||
* 72 11/12/97 9:37p Dow
|
||||
* Textures on Banshee half work
|
||||
*
|
||||
* 71 11/12/97 9:22a Dow
|
||||
* h3 mods
|
||||
*
|
||||
* 70 11/08/97 3:34p Peter
|
||||
* fixed stupid gdbg_info crasher
|
||||
*
|
||||
* 69 11/04/97 4:00p Dow
|
||||
* Banshee Mods
|
||||
*
|
||||
* 68 11/03/97 3:43p Peter
|
||||
* h3/cvg cataclysm
|
||||
*
|
||||
* 67 11/01/97 12:11p Pgj
|
||||
* glide.dll ---> glide2x.dll
|
||||
*
|
||||
* 66 10/31/97 8:53a Peter
|
||||
* last lying change, really
|
||||
*
|
||||
* 65 10/30/97 3:42p Peter
|
||||
* protected the last bit of nonsense
|
||||
*
|
||||
* 64 10/30/97 3:37p Peter
|
||||
* spoof sst1
|
||||
*
|
||||
* 63 10/29/97 2:45p Peter
|
||||
* C version of Taco's packing code
|
||||
*
|
||||
* 62 10/23/97 5:28p Peter
|
||||
* sli fifo thing
|
||||
*
|
||||
* 61 9/15/97 7:31p Peter
|
||||
* more cmdfifo cleanup, fixed normal buffer clear, banner in the right
|
||||
* place, lfb's are on, Hmmmm.. probably more
|
||||
*
|
||||
* 60 9/10/97 10:13p Peter
|
||||
* fifo logic from GaryT, non-normalized fp first cut
|
||||
*
|
||||
* 59 9/05/97 5:29p Peter
|
||||
* changes for direct hw
|
||||
*
|
||||
* 58 9/01/97 3:18p Peter
|
||||
* correct integer rounding for pts
|
||||
*
|
||||
* 57 8/30/97 5:59p Tarolli
|
||||
* init and hal fixups
|
||||
*
|
||||
* 56 8/30/97 1:19p Peter
|
||||
* first cut at using blit to clear, more to come to do inner rects
|
||||
*
|
||||
* 55 8/18/97 3:52p Peter
|
||||
* pre-hw arrival fixes/cleanup
|
||||
*
|
||||
* 54 7/30/97 2:42p Peter
|
||||
* shared and sanitized
|
||||
*
|
||||
* 53 7/28/97 2:41p Peter
|
||||
* turned sli code back on for cvg, but waiting for hal
|
||||
*
|
||||
* 52 7/25/97 11:40a Peter
|
||||
* removed dHalf, change field name to match real use for cvg
|
||||
*
|
||||
* 51 7/08/97 2:47p Peter
|
||||
* fixed merge stupidity from last checkin
|
||||
*
|
||||
* 50 7/02/97 12:28p Peter
|
||||
* removed spurious NOP, tex dl
|
||||
*
|
||||
* 49 6/24/97 4:02p Peter
|
||||
* proper cmd fifo placement
|
||||
*
|
||||
* 48 6/23/97 4:46p Peter
|
||||
* fixed my ,uckage
|
||||
* 47 6/23/97 4:43p Peter
|
||||
* cleaned up #defines etc for a nicer tree
|
||||
**
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <3dfx.h>
|
||||
#include <glidesys.h>
|
||||
|
||||
#define FX_DLL_DEFINITION
|
||||
#include <fxdll.h>
|
||||
#include <glide.h>
|
||||
#include "fxglide.h"
|
||||
|
||||
/*-------------------------------------------------------------------
|
||||
Function: _grSstDetectResources
|
||||
Date: --
|
||||
Implementor(s): Dow, Gmt, Jdt
|
||||
Library: Glide
|
||||
Description:
|
||||
Discover devices on the PCI bus.
|
||||
Discover configuration of detected devices.
|
||||
Initialize all Glide GC's
|
||||
|
||||
Recognized devices depend upon compile time flags
|
||||
|
||||
This code should NOT initialize the hardware
|
||||
any more than is necessary for discovery of
|
||||
configuration
|
||||
|
||||
Arguments: none
|
||||
Return:
|
||||
FXTRUE - at least one device was detected
|
||||
FXFALSE - no devices were detected.
|
||||
-------------------------------------------------------------------*/
|
||||
FxBool
|
||||
_grSstDetectResources(void)
|
||||
{
|
||||
static FxBool calledP = FXFALSE;
|
||||
FxBool rv = FXFALSE;
|
||||
FxU32 ctx, device;
|
||||
|
||||
GDBG_INFO(280, "_grSstDetectResources()\n");
|
||||
|
||||
#if (GLIDE_PLATFORM & GLIDE_HW_CVG)
|
||||
{
|
||||
#if GLIDE_INIT_HAL
|
||||
HalInfo* halInfo = fxHalInit(0);
|
||||
if (halInfo == NULL) goto __errExit;
|
||||
#else /* !GLIDE_INIT_HAL */
|
||||
FxDeviceInfo dummyDevInfo;
|
||||
#endif /* !GLIDE_INIT_HAL */
|
||||
|
||||
/* The first time through the init code we need to map
|
||||
* all of the boards. Future calls can just grab this
|
||||
* info out of the halInfo that we have here.
|
||||
*/
|
||||
if (!calledP) {
|
||||
FxU32 count = HAL_MAX_BOARDS;
|
||||
FxBool inSliPairP = FXFALSE;
|
||||
GrHwConfiguration* hwConfig = &_GlideRoot.hwConfig;
|
||||
|
||||
/* NB: The hw will initially return fbiRevision == 2, but
|
||||
* the init code does some more dorking w/ stuff and detects
|
||||
* if it is really a CVG and sets it to 4.
|
||||
*/
|
||||
const FxU32 hwRevNum = ((GETENV("FX_GLIDE_HW_REV") == NULL)
|
||||
? 4
|
||||
: atol(GETENV("FX_GLIDE_HW_REV")));
|
||||
|
||||
for(ctx = device = 0; device < count; device++) {
|
||||
const FxDeviceInfo* curDev = NULL;
|
||||
FxBool regInitP = FXFALSE;
|
||||
SstRegs* devRegs;
|
||||
|
||||
#if GLIDE_INIT_HAL
|
||||
devRegs = fxHalMapBoard(device);
|
||||
curDev = halInfo->boardInfo + device;
|
||||
#else /* !GLIDE_INIT_HAL */
|
||||
devRegs = (SstRegs*)sst1InitMapBoard(device);
|
||||
if (devRegs != NULL) {
|
||||
if (sst1InitGetDeviceInfo((FxU32*)devRegs, &dummyDevInfo)) {
|
||||
dummyDevInfo.virtAddr[0] = devRegs;
|
||||
curDev = &dummyDevInfo;
|
||||
}
|
||||
}
|
||||
#endif /* !GLIDE_INIT_HAL */
|
||||
|
||||
if ((devRegs != NULL) &&
|
||||
(curDev != NULL) &&
|
||||
(curDev->fbiRevision >= hwRevNum)) {
|
||||
const FxU32 curSstNum = hwConfig->num_sst;
|
||||
FxU32 i;
|
||||
|
||||
#if (GLIDE_PLATFORM & GLIDE_HW_CVG)
|
||||
/* Internally we always keep the real type. */
|
||||
hwConfig->SSTs[ctx].type = GR_SSTTYPE_Voodoo2;
|
||||
#else
|
||||
#error "What do you think you're doing?"
|
||||
#endif
|
||||
|
||||
#if GLIDE_INIT_HAL
|
||||
if (!fxHalInitRegisters(curDev->virtAddr[0])) goto __errRegFailure;
|
||||
|
||||
#else /* !GLIDE_INIT_HAL */
|
||||
/* dpc - 23 jan 1998 - FixMe!
|
||||
* We set up the caching characteristics here so that we
|
||||
* mimic the actions of the nt driver, where everything is
|
||||
* happy, in win95. However, if this is the slave of an sli
|
||||
* pair then we don't want to waste mtrr's that we're never
|
||||
* really going to write to.
|
||||
*/
|
||||
if (!inSliPairP && (_GlideRoot.CPUType >= 6)) {
|
||||
sst1InitCaching((FxU32*)devRegs, FXTRUE);
|
||||
}
|
||||
|
||||
if (!sst1InitRegisters((FxU32*)devRegs) ||
|
||||
!sst1InitGetDeviceInfo((FxU32*)devRegs, &dummyDevInfo)) goto __errRegFailure;
|
||||
curDev = &dummyDevInfo;
|
||||
#endif /* !GLIDE_INIT_HAL */
|
||||
|
||||
/* Set up pointers to the various address spaces within the hw */
|
||||
_GlideRoot.GCs[ctx].base_ptr = (FxU32*)HW_BASE_PTR(devRegs);
|
||||
_GlideRoot.GCs[ctx].reg_ptr = (FxU32*)HW_REG_PTR(devRegs);
|
||||
_GlideRoot.GCs[ctx].lfb_ptr = (FxU32*)HW_LFB_PTR(devRegs);
|
||||
_GlideRoot.GCs[ctx].tex_ptr = (FxU32*)HW_TEX_PTR(devRegs);
|
||||
|
||||
/* Video parameters */
|
||||
_GlideRoot.GCs[ctx].grSstRez = GR_RESOLUTION_NONE;
|
||||
_GlideRoot.GCs[ctx].grSstRefresh = curDev->fbiVideoRefresh;
|
||||
|
||||
/* Chip configuration */
|
||||
_GlideRoot.GCs[ctx].num_tmu = curDev->numberTmus;
|
||||
_GlideRoot.GCs[ctx].fbuf_size = hwConfig->SSTs[curSstNum].sstBoard.Voodoo2Config.fbRam;
|
||||
|
||||
/* Independet board or physical sli master */
|
||||
if (!inSliPairP) {
|
||||
_GlideRoot.gcMap[curSstNum] = _GlideRoot.gcNum;
|
||||
|
||||
/* Voodoo^2 glide2x returns that it is an sst1, but the
|
||||
* revision is bumped so that developers can really tell.
|
||||
* Additionally, we now have the fun on Voodoo^1.5 which is
|
||||
* just a Voodoo^2 in a 2200 configuration.
|
||||
*/
|
||||
hwConfig->SSTs[curSstNum].sstBoard.Voodoo2Config.fbiRev = (curDev->fbiRevision +
|
||||
((curDev->numberTmus == 1)
|
||||
? 0x080
|
||||
: 0x100));
|
||||
|
||||
hwConfig->SSTs[curSstNum].sstBoard.Voodoo2Config.fbRam = curDev->fbiMemSize;
|
||||
hwConfig->SSTs[curSstNum].sstBoard.Voodoo2Config.nTexelfx = curDev->numberTmus;
|
||||
hwConfig->SSTs[curSstNum].sstBoard.Voodoo2Config.sliDetect = curDev->sliDetected;
|
||||
|
||||
for(i = 0; i < curDev->numberTmus; i++) {
|
||||
const FxU32 curTmuMemSize = curDev->tmuMemSize[i];
|
||||
|
||||
hwConfig->SSTs[curSstNum].sstBoard.Voodoo2Config.tmuConfig[i].tmuRev = curDev->tmuRevision;
|
||||
hwConfig->SSTs[curSstNum].sstBoard.Voodoo2Config.tmuConfig[i].tmuRam = curTmuMemSize;
|
||||
}
|
||||
|
||||
hwConfig->num_sst++;
|
||||
}
|
||||
|
||||
/* Clear the tmu state */
|
||||
for(i = 0; i < curDev->numberTmus; i++) {
|
||||
const FxU32 curTmuMemSize = curDev->tmuMemSize[i];
|
||||
|
||||
memset(&_GlideRoot.GCs[ctx].tmu_state[i], 0, sizeof(_GlideRoot.GCs[ctx].tmu_state[i]));
|
||||
_GlideRoot.GCs[ctx].tmu_state[i].total_mem = (curTmuMemSize << 20);
|
||||
|
||||
_GlideRoot.GCs[ctx].tmu_state[i].ncc_mmids[0] =
|
||||
_GlideRoot.GCs[ctx].tmu_state[i].ncc_mmids[1] = GR_NULL_MIPMAP_HANDLE;
|
||||
}
|
||||
|
||||
/* sst1GetDeviceInfo will not return any pairing information
|
||||
* until after the boards are paired w/ sst1InitSli which we
|
||||
* have not yet done. Currently we assume that the next
|
||||
* discovered board will be the slave.
|
||||
*/
|
||||
_GlideRoot.GCs[ctx].scanline_interleaved = curDev->sliDetected;
|
||||
_GlideRoot.GCs[ctx].sliPairP = curDev->sliPaired;
|
||||
_GlideRoot.GCs[ctx].slave_ptr = NULL;
|
||||
|
||||
/* Are we currenly mapping a physcial sli-slave? */
|
||||
if (curDev->sliDetected && inSliPairP) {
|
||||
_GlideRoot.GCs[ctx - 1].slave_ptr = _GlideRoot.GCs[ctx].base_ptr;
|
||||
|
||||
/* Report the minimum of the two boards' memory if they
|
||||
* are different. The hw does not care becuase it is just
|
||||
* not going to access the memory.
|
||||
*/
|
||||
{
|
||||
const FxU32 curSstNum = hwConfig->num_sst - 1;
|
||||
GrTMUConfig_t* tmuConfig = hwConfig->SSTs[curSstNum].sstBoard.Voodoo2Config.tmuConfig;
|
||||
|
||||
/* Fbi memory */
|
||||
if ((FxU32)hwConfig->SSTs[curSstNum].sstBoard.Voodoo2Config.fbRam != curDev->fbiMemSize) {
|
||||
hwConfig->SSTs[curSstNum].sstBoard.Voodoo2Config.fbRam = curDev->fbiMemSize;
|
||||
}
|
||||
|
||||
/* Tmu memory */
|
||||
for(i = 0; i < curDev->numberTmus; i++) {
|
||||
if ((FxU32)tmuConfig[i].tmuRam != curDev->tmuMemSize[i]) {
|
||||
tmuConfig[i].tmuRam = MIN((FxU32)tmuConfig[i].tmuRam, curDev->tmuMemSize[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* On an sli system the boards cannot be addressed
|
||||
* separately so pairing and detection are different things,
|
||||
* and we need to keep track of these paired boards as an
|
||||
* atomic unit.
|
||||
*/
|
||||
inSliPairP = (curDev->sliPaired ? !inSliPairP : FXFALSE);
|
||||
|
||||
/* This device is ready to go. */
|
||||
regInitP = FXTRUE;
|
||||
_GlideRoot.gcNum++;
|
||||
_GlideRoot.GCs[ctx].hwInitP = FXTRUE;
|
||||
|
||||
rv = FXTRUE;
|
||||
ctx++;
|
||||
|
||||
__errRegFailure:
|
||||
/* For some reason we failed to init the board that we just mapped. */
|
||||
if (!regInitP && (devRegs != NULL)) {
|
||||
#if GLIDE_INIT_HAL
|
||||
fxHalShutdown(devRegs);
|
||||
#else /* !GLIDE_INIT_HAL */
|
||||
if (_GlideRoot.CPUType >= 6) {
|
||||
sst1InitCaching((FxU32*)devRegs, FXFALSE);
|
||||
}
|
||||
pciUnmapPhysical((FxU32)devRegs, 0x1000000UL);
|
||||
#endif /* !GLIDE_INIT_HAL */
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Done setting up. Don't do the silly mapping thing again. */
|
||||
calledP = FXTRUE;
|
||||
} else {
|
||||
/* Did we previously find boards? */
|
||||
rv = (_GlideRoot.hwConfig.num_sst != 0);
|
||||
}
|
||||
|
||||
goto __errExit; /* Keep warnings happy */
|
||||
__errExit:
|
||||
;
|
||||
}
|
||||
#else
|
||||
# error "Write code for this chip"
|
||||
#endif
|
||||
|
||||
return rv;
|
||||
} /* _grSstDetectResources */
|
||||
|
||||
|
||||
static void
|
||||
displayBoardInfo(int i, GrHwConfiguration *hwc)
|
||||
{
|
||||
if ((hwc->SSTs[i].type == GR_SSTTYPE_VOODOO) ||
|
||||
(hwc->SSTs[i].type == GR_SSTTYPE_Voodoo2)) {
|
||||
int tmuNum;
|
||||
|
||||
GDBG_INFO(80,"SST board %d: 3Dfx Voodoo%s\n",
|
||||
i, ((hwc->SSTs[i].type == GR_SSTTYPE_VOODOO) ? " Graphics" : "^2"));
|
||||
if (hwc->SSTs[i].sstBoard.VoodooConfig.sliDetect) {
|
||||
GDBG_INFO(80,"\tScanline Interleaved\n");
|
||||
}
|
||||
|
||||
GDBG_INFO(80,"\tPixelfx rev 0x%lX with %d MB Frame Buffer\n",
|
||||
hwc->SSTs[i].sstBoard.VoodooConfig.fbiRev,
|
||||
hwc->SSTs[i].sstBoard.VoodooConfig.fbRam);
|
||||
GDBG_INFO(80,"\t%d Texelfx chips:\n",
|
||||
hwc->SSTs[i].sstBoard.VoodooConfig.nTexelfx);
|
||||
for (tmuNum = 0;
|
||||
tmuNum < hwc->SSTs[i].sstBoard.VoodooConfig.nTexelfx;
|
||||
tmuNum++) {
|
||||
GDBG_INFO(80,"\t\tTexelfx %d: Rev 0x%lX, %d MB Texture\n", tmuNum,
|
||||
hwc->SSTs[i].sstBoard.VoodooConfig.tmuConfig[tmuNum].tmuRev,
|
||||
hwc->SSTs[i].sstBoard.VoodooConfig.tmuConfig[tmuNum].tmuRam);
|
||||
}
|
||||
} else if (hwc->SSTs[i].type == GR_SSTTYPE_SST96) {
|
||||
GDBG_INFO(80,"SST board %d: 3Dfx Voodoo Rush\n", i);
|
||||
GDBG_INFO(80,"\tFBI Jr. with %d MB Frame Buffer\n",
|
||||
hwc->SSTs[i].sstBoard.SST96Config.fbRam);
|
||||
GDBG_INFO(80,"\tTexelfx chips: 1\n");
|
||||
} else {
|
||||
GDBG_INFO(80,"error: SSTs %d: unknown type\n",i);
|
||||
}
|
||||
} /* displayBoardInfo */
|
||||
|
||||
#if defined(FX_DLL_ENABLE) && (GLIDE_PLATFORM & GLIDE_OS_WIN32)
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
void
|
||||
_GlideInitEnvironment(void)
|
||||
{
|
||||
#define FN_NAME "_GlideInitEnvironment"
|
||||
int i;
|
||||
|
||||
if (_GlideRoot.initialized) /* only execute once */
|
||||
return;
|
||||
GDBG_INIT(); /* init the GDEBUG libraray */
|
||||
GDBG_INFO(80,"%s()\n", FN_NAME);
|
||||
|
||||
#ifdef __WIN32__
|
||||
grErrorSetCallback(_grErrorWindowsCallback);
|
||||
#else
|
||||
grErrorSetCallback(_grErrorDefaultCallback);
|
||||
#endif /* __WIN32__ */
|
||||
|
||||
#ifdef GLIDE_DEBUG
|
||||
GDBG_INFO(0,"GLIDE DEBUG LIBRARY\n"); /* unconditional display */
|
||||
#endif
|
||||
|
||||
#if defined(FX_DLL_ENABLE) && (GLIDE_PLATFORM & GLIDE_OS_WIN32)
|
||||
{ /* GMT: display the DLL pathname for sanity checking */
|
||||
char buf[132];
|
||||
if (GetModuleFileName(GetModuleHandle("glide2x.dll"), buf, sizeof(buf))) {
|
||||
#ifdef GLIDE_DEBUG
|
||||
GDBG_INFO(0,"DLL path: %s\n",buf); /* unconditional display */
|
||||
#else
|
||||
GDBG_INFO(80,"DLL path: %s\n",buf);
|
||||
#endif
|
||||
} /* silent failure */
|
||||
}
|
||||
#endif
|
||||
|
||||
_GlideRoot.CPUType = _cpu_detect_asm();
|
||||
if (GETENV("FX_CPU")) _GlideRoot.CPUType = atoi(GETENV("FX_CPU"));
|
||||
|
||||
/* Check for user environment tweaks */
|
||||
{
|
||||
const char* envStr;
|
||||
|
||||
#define GLIDE_GETENV(__envVar, __defVal) \
|
||||
(((envStr = GETENV(__envVar)) == NULL) ? (__defVal) : atol(envStr))
|
||||
|
||||
_GlideRoot.environment.triBoundsCheck = (GETENV("FX_GLIDE_BOUNDS_CHECK") != NULL);
|
||||
_GlideRoot.environment.noSplash = (GETENV("FX_GLIDE_NO_SPLASH") != NULL);
|
||||
_GlideRoot.environment.shamelessPlug = (GETENV("FX_GLIDE_SHAMELESS_PLUG") != NULL);
|
||||
_GlideRoot.environment.ignoreReopen = (GETENV("FX_GLIDE_IGNORE_REOPEN") != NULL);
|
||||
_GlideRoot.environment.disableDitherSub = (GETENV("FX_GLIDE_NO_DITHER_SUB") != NULL);
|
||||
_GlideRoot.environment.texLodDither = ((GETENV("FX_GLIDE_LOD_DITHER") == NULL)
|
||||
? 0x00UL
|
||||
: SST_TLODDITHER);
|
||||
|
||||
_GlideRoot.environment.nColorBuffer = GLIDE_GETENV("FX_GLIDE_ALLOC_COLOR", -1L);
|
||||
_GlideRoot.environment.nAuxBuffer = GLIDE_GETENV("FX_GLIDE_ALLOC_AUX", -1L);
|
||||
_GlideRoot.environment.swFifoLWM = GLIDE_GETENV("FX_GLIDE_LWM", -1L);
|
||||
|
||||
_GlideRoot.environment.swapInterval = GLIDE_GETENV("FX_GLIDE_SWAPINTERVAL", -1L);
|
||||
if ((envStr != NULL) && (_GlideRoot.environment.swapInterval < 0)) {
|
||||
_GlideRoot.environment.swapInterval = 0;
|
||||
}
|
||||
|
||||
_GlideRoot.environment.snapshot = GLIDE_GETENV("FX_SNAPSHOT", 0);
|
||||
|
||||
GDBG_INFO(80," triBoundsCheck: %d\n",_GlideRoot.environment.triBoundsCheck);
|
||||
GDBG_INFO(80," swapInterval: %d\n",_GlideRoot.environment.swapInterval);
|
||||
GDBG_INFO(80," noSplash: %d\n",_GlideRoot.environment.noSplash);
|
||||
GDBG_INFO(80," shamelessPlug: %d\n",_GlideRoot.environment.shamelessPlug);
|
||||
GDBG_INFO(80," cpu: %d\n",_GlideRoot.CPUType);
|
||||
GDBG_INFO(80," snapshot: %d\n",_GlideRoot.environment.snapshot);
|
||||
GDBG_INFO(80," disableDitherSub: %d\n",_GlideRoot.environment.disableDitherSub);
|
||||
}
|
||||
|
||||
/* constant pool */
|
||||
_GlideRoot.pool.f0 = 0.0F;
|
||||
_GlideRoot.pool.fHalf= 0.5F;
|
||||
_GlideRoot.pool.f1 = 1.0F;
|
||||
_GlideRoot.pool.f255 = 255.0F;
|
||||
|
||||
#if GLIDE_PACKED_RGB
|
||||
_GlideRoot.pool.fBiasHi = (float)(0x01 << 15);
|
||||
_GlideRoot.pool.fBiasLo = (float)(0x01 << 23);
|
||||
#endif /* GLIDE_PACKED_RGB */
|
||||
|
||||
_GlideRoot.current_sst = 0; /* make sure there's a valid GC */
|
||||
_GlideRoot.curGC = &_GlideRoot.GCs[0]; /* just for 'booting' the library */
|
||||
{
|
||||
const FxBool hwDetectP = _grSstDetectResources();
|
||||
|
||||
if (!hwDetectP) {
|
||||
char s[128];
|
||||
const char* errStr = s;
|
||||
|
||||
if (pciGetErrorCode() == PCI_ERR_NOERR) {
|
||||
#ifndef __linux__
|
||||
sprintf(s, "%s: glide2x.dll expected %s, none detected\n",
|
||||
FN_NAME, GLIDE_DRIVER_NAME);
|
||||
#else
|
||||
sprintf(s, "%s: libglide2x.so expected %s, none detected\n",
|
||||
FN_NAME, GLIDE_DRIVER_NAME);
|
||||
#endif
|
||||
} else {
|
||||
errStr = pciGetErrorString();
|
||||
}
|
||||
|
||||
GrErrorCallback(errStr, FXTRUE);
|
||||
}
|
||||
|
||||
/* GMT: this isn't really necessary since GlideRoot is static */
|
||||
for (i = 0; i < _GlideRoot.hwConfig.num_sst; i++) {
|
||||
_GlideRoot.GCs[i].mm_table.free_mmid = 0;
|
||||
displayBoardInfo(i, &_GlideRoot.hwConfig);
|
||||
}
|
||||
|
||||
_grMipMapInit();
|
||||
_GlideRoot.initialized = hwDetectP; /* save this for the end */
|
||||
}
|
||||
} /* _GlideInitEnvironment */
|
||||
@@ -1,956 +0,0 @@
|
||||
/*
|
||||
** 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
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
**
|
||||
** 26 2/20/98 11:00a Peter
|
||||
** removed glide3 from glid2 tree
|
||||
**
|
||||
** 25 2/17/98 3:21p Peter
|
||||
** no splash w/o deepth buffer
|
||||
**
|
||||
** 24 1/28/98 1:12p Peter
|
||||
** Stupid swap state form gratuitous splash screen
|
||||
*
|
||||
* 23 1/09/98 6:48p Atai
|
||||
* grTexInfo, GR_LOD_* and GR_ASPECT_*
|
||||
*
|
||||
* 21 1/06/98 6:47p Atai
|
||||
* undo grSplash and remove gu routines
|
||||
*
|
||||
* 20 12/18/97 2:13p Peter
|
||||
* fogTable cataclysm
|
||||
*
|
||||
* 19 12/15/97 5:52p Atai
|
||||
* disable obsolete glide2 api for glide3
|
||||
*
|
||||
* 18 12/09/97 10:20a Peter
|
||||
* removed extraneous cruft
|
||||
*
|
||||
* 17 11/14/97 5:03p Peter
|
||||
* picking up the torch... removed #!@#$% c++ comments
|
||||
*
|
||||
* 16 10/23/97 5:30p Peter
|
||||
* packed rgb happiness
|
||||
*
|
||||
* 15 7/31/97 11:14a Peter
|
||||
* merge w/ sst1 glide tree, hopefully
|
||||
*
|
||||
* 13 7/07/97 3:05p Dow
|
||||
* Moved fouled clears
|
||||
*
|
||||
* 12 3/18/97 9:07p Dow
|
||||
* Got rid of #$#%#$ // comments
|
||||
*
|
||||
* 11 3/16/97 12:42a Jdt
|
||||
* Removed watcom warning
|
||||
*
|
||||
* 10 3/13/97 10:53p Jdt
|
||||
* Rewrote with simple optimizations. Changed prototype for
|
||||
* multi-resolution, and running as a better shameless plug.
|
||||
*
|
||||
* 9 3/13/97 2:52a Jdt
|
||||
* Added arguments to splash.
|
||||
*
|
||||
* 8 3/09/97 10:31a Dow
|
||||
* Added GR_DIENTRY for di glide functions
|
||||
*
|
||||
* 7 3/01/97 6:24p Jdt
|
||||
* Made splash force yorigin.
|
||||
*
|
||||
* 6 1/02/97 1:06p Dow
|
||||
* Fixed state bug
|
||||
*
|
||||
* 3 11/17/96 11:16p Garymct
|
||||
* Updated grSplash code to set all of the necessary state itself rather
|
||||
* than expecting the caller to do so.
|
||||
*/
|
||||
#include <math.h>
|
||||
|
||||
#include <3dfx.h>
|
||||
#define FX_DLL_DEFINITION
|
||||
#include <fxdll.h>
|
||||
#include <glide.h>
|
||||
|
||||
#include "fxglide.h"
|
||||
#include "fxinline.h"
|
||||
|
||||
/*-----------------------------
|
||||
Constants
|
||||
-----------------------------*/
|
||||
#define MAX_NUM_VERTS 2556
|
||||
|
||||
#define FADEIN_END_PERCENT (0.3f)
|
||||
#define FADEOUT_BEGIN_PERCENT (0.8f)
|
||||
|
||||
#define SPIN_FRAMES 25
|
||||
#define SPIN_START 26
|
||||
|
||||
#define NO_TABLE ((GrTexTable_t)(~0))
|
||||
|
||||
/*-----------------------------
|
||||
Macros
|
||||
-----------------------------*/
|
||||
#define SNAP_BIAS ((float)(3<<18))
|
||||
#define SNAP_COORD(X) ((X)+SNAP_BIAS)
|
||||
|
||||
/*-----------------------------
|
||||
Types
|
||||
-----------------------------*/
|
||||
typedef struct {
|
||||
float x, y, z; /* object space coordinates */
|
||||
float nx, ny, nz; /* object space vertex normal for lighting */
|
||||
float s, t; /* pre-glide-ified texture coordinates */
|
||||
} Vert;
|
||||
|
||||
typedef struct {
|
||||
int v[3]; /* vertex indices into array of vertes for face */
|
||||
int mat_index; /* material index */
|
||||
int aa_edge_flags;
|
||||
} Face;
|
||||
|
||||
typedef float Vector[3];
|
||||
typedef float Matrix[16];
|
||||
|
||||
typedef FxU32 Palette[256];
|
||||
typedef struct {
|
||||
FxU8 yRGB[16];
|
||||
FxI16 iRGB[4][3];
|
||||
FxI16 qRGB[4][3];
|
||||
FxU32 packed_data[12];
|
||||
} NCCTable;
|
||||
typedef union {
|
||||
Palette palette;
|
||||
NCCTable nccTable;
|
||||
} TextureTable;
|
||||
|
||||
/*-----------------------------
|
||||
Globals
|
||||
-----------------------------*/
|
||||
/* xScale, xOffset, yScale, yOffset */
|
||||
static float viewPort[4] = {
|
||||
480.0f, 320.0f,
|
||||
480.0f, 240.0f
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
GrTexInfo info;
|
||||
FxU32 addr;
|
||||
GrTexTable_t tableType;
|
||||
TextureTable tableData;
|
||||
} Texture;
|
||||
|
||||
static int do_phong = 0;
|
||||
static int pass;
|
||||
static int fog;
|
||||
static int useTextures;
|
||||
static Vector light = { -0.57735f, -0.57735f, -0.57735f };
|
||||
static Vector transformed_verts[MAX_NUM_VERTS];
|
||||
static Vector transformed_norms[MAX_NUM_VERTS];
|
||||
|
||||
#include "splshdat.c"
|
||||
|
||||
static Texture textImage;
|
||||
static Texture hiliteImage;
|
||||
static Texture shadowImage;
|
||||
|
||||
static FxU32 nextFreeBase;
|
||||
|
||||
/*-----------------------------
|
||||
Privates
|
||||
-----------------------------*/
|
||||
static void
|
||||
sourceTexture(Texture *texture)
|
||||
{
|
||||
static Texture *lastTexture;
|
||||
|
||||
if (texture != lastTexture && useTextures) {
|
||||
grTexSource(GR_TMU0,
|
||||
texture->addr,
|
||||
GR_MIPMAPLEVELMASK_BOTH,
|
||||
&texture->info);
|
||||
if (texture->tableType != NO_TABLE) {
|
||||
grTexDownloadTable(GR_TMU0,
|
||||
texture->tableType,
|
||||
&texture->tableData);
|
||||
}
|
||||
lastTexture = texture;
|
||||
}
|
||||
}
|
||||
|
||||
static GrTexTable_t
|
||||
texTableType(GrTextureFormat_t format)
|
||||
{
|
||||
GrTexTable_t rv = (GrTexTable_t)NO_TABLE;
|
||||
|
||||
switch(format) {
|
||||
case GR_TEXFMT_YIQ_422:
|
||||
case GR_TEXFMT_AYIQ_8422:
|
||||
rv = GR_TEXTABLE_NCC0;
|
||||
break;
|
||||
|
||||
case GR_TEXFMT_P_8:
|
||||
case GR_TEXFMT_AP_88:
|
||||
rv = GR_TEXTABLE_PALETTE;
|
||||
break;
|
||||
}
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
static void
|
||||
downloadTexture(Texture *texture, Gu3dfInfo *info)
|
||||
{
|
||||
texture->info.data = info->data;
|
||||
texture->info.smallLod = info->header.small_lod;
|
||||
texture->info.largeLod = info->header.large_lod;
|
||||
texture->info.aspectRatio = info->header.aspect_ratio;
|
||||
texture->info.format = info->header.format;
|
||||
|
||||
texture->addr = nextFreeBase;
|
||||
nextFreeBase += grTexTextureMemRequired(GR_MIPMAPLEVELMASK_BOTH,
|
||||
&texture->info);
|
||||
grTexDownloadMipMap(GR_TMU0,
|
||||
texture->addr,
|
||||
GR_MIPMAPLEVELMASK_BOTH,
|
||||
&texture->info);
|
||||
|
||||
texture->tableType = texTableType(info->header.format);
|
||||
switch(texture->tableType) {
|
||||
case GR_TEXTABLE_NCC0:
|
||||
case GR_TEXTABLE_NCC1:
|
||||
case GR_TEXTABLE_PALETTE:
|
||||
texture->tableData = *(TextureTable*)(&info->table);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
createTextures(void)
|
||||
{
|
||||
Gu3dfInfo *info;
|
||||
|
||||
/* Download the texture for the "3D" part of the model. */
|
||||
info = (Gu3dfInfo*)&text_3dfinfo;
|
||||
info->data = (void *)text_3dfinfo_image;
|
||||
|
||||
downloadTexture(&textImage, info);
|
||||
|
||||
/* Download the texture for the specular highlight. */
|
||||
info = (Gu3dfInfo *)&hilite_3dfinfo;
|
||||
info->data = (void *)hilite_3dfinfo_image;
|
||||
downloadTexture(&hiliteImage, info);
|
||||
|
||||
/* Download the texture for the shadow. */
|
||||
info = (Gu3dfInfo *)&shadow_3dfinfo;
|
||||
info->data = (void *)shadow_3dfinfo_image;
|
||||
downloadTexture(&shadowImage, info);
|
||||
}
|
||||
|
||||
static void
|
||||
vecMatMult(float *dstVec, float *srcVec, float *matrix)
|
||||
{
|
||||
dstVec[0] = (srcVec[0] * matrix[0] +
|
||||
srcVec[1] * matrix[4] +
|
||||
srcVec[2] * matrix[8] +
|
||||
matrix[12]);
|
||||
|
||||
dstVec[1] = (srcVec[0] * matrix[1] +
|
||||
srcVec[1] * matrix[5] +
|
||||
srcVec[2] * matrix[9] +
|
||||
matrix[13]);
|
||||
|
||||
dstVec[2] = (srcVec[0] * matrix[2] +
|
||||
srcVec[1] * matrix[6] +
|
||||
srcVec[2] * matrix[10] +
|
||||
matrix[14]);
|
||||
}
|
||||
|
||||
static void
|
||||
normMatMult(float *dstVec, float *srcVec, float *matrix)
|
||||
{
|
||||
dstVec[0] = (srcVec[0] * matrix[0] +
|
||||
srcVec[1] * matrix[4] +
|
||||
srcVec[2] * matrix[8]);
|
||||
|
||||
dstVec[1] = (srcVec[0] * matrix[1] +
|
||||
srcVec[1] * matrix[5] +
|
||||
srcVec[2] * matrix[9]);
|
||||
|
||||
dstVec[2] = (srcVec[0] * matrix[2] +
|
||||
srcVec[1] * matrix[6] +
|
||||
srcVec[2] * matrix[10]);
|
||||
}
|
||||
|
||||
static void
|
||||
xfAndProj(int frame, int obj)
|
||||
{
|
||||
int vertex;
|
||||
float *matrix;
|
||||
|
||||
matrix = &mat[frame][obj][0];
|
||||
|
||||
for(vertex = 0; vertex < num_verts[obj]; vertex++) {
|
||||
float *srcVec;
|
||||
float *dstVec;
|
||||
float oow;
|
||||
|
||||
/* transform point */
|
||||
srcVec = (float*)&(vert[obj][vertex].x);
|
||||
dstVec = (float*)transformed_verts[vertex];
|
||||
vecMatMult(dstVec, srcVec, matrix);
|
||||
|
||||
/* project point */
|
||||
oow = 1.0f / dstVec[2];
|
||||
dstVec[0] = dstVec[0] * oow * viewPort[0] + viewPort[1] + SNAP_BIAS;
|
||||
dstVec[1] = dstVec[1] * oow * viewPort[2] + viewPort[3] + SNAP_BIAS;
|
||||
|
||||
/* transform normal */
|
||||
srcVec = (float*)&(vert[obj][vertex].nx);
|
||||
dstVec = (float*)transformed_norms[vertex];
|
||||
normMatMult(dstVec, srcVec, matrix);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
setupMaterial(int material_index)
|
||||
{
|
||||
switch(material_index) {
|
||||
case 0: /* 3d */
|
||||
if(pass == 1) {
|
||||
sourceTexture(&textImage);
|
||||
grColorCombine(GR_COMBINE_FUNCTION_SCALE_OTHER,
|
||||
GR_COMBINE_FACTOR_LOCAL,
|
||||
GR_COMBINE_LOCAL_ITERATED,
|
||||
GR_COMBINE_OTHER_TEXTURE,
|
||||
FXFALSE);
|
||||
do_phong = 1;
|
||||
} else if (pass == 0xbeef) {
|
||||
/* Pantone 320C - 3D Green */
|
||||
grConstantColorValue(0x00989100);
|
||||
grColorCombine(GR_COMBINE_FUNCTION_SCALE_OTHER,
|
||||
GR_COMBINE_FACTOR_LOCAL,
|
||||
GR_COMBINE_LOCAL_CONSTANT,
|
||||
GR_COMBINE_OTHER_ITERATED,
|
||||
FXFALSE);
|
||||
} else {
|
||||
sourceTexture(&hiliteImage);
|
||||
grColorCombine(GR_COMBINE_FUNCTION_SCALE_OTHER,
|
||||
GR_COMBINE_FACTOR_ONE,
|
||||
GR_COMBINE_LOCAL_NONE,
|
||||
GR_COMBINE_OTHER_TEXTURE,
|
||||
FXFALSE);
|
||||
}
|
||||
break;
|
||||
case 1: /* fx */
|
||||
if (pass == 0xbeef) {
|
||||
/* Black - fx */
|
||||
grConstantColorValue(0x00);
|
||||
grColorCombine(GR_COMBINE_FUNCTION_SCALE_OTHER,
|
||||
GR_COMBINE_FACTOR_LOCAL,
|
||||
GR_COMBINE_LOCAL_CONSTANT,
|
||||
GR_COMBINE_OTHER_ITERATED,
|
||||
FXFALSE);
|
||||
do_phong = 1;
|
||||
} else {
|
||||
sourceTexture(&hiliteImage);
|
||||
grColorCombine(GR_COMBINE_FUNCTION_SCALE_OTHER,
|
||||
GR_COMBINE_FACTOR_ONE,
|
||||
GR_COMBINE_LOCAL_NONE,
|
||||
GR_COMBINE_OTHER_TEXTURE,
|
||||
FXFALSE);
|
||||
do_phong = 1;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
case 3:
|
||||
case 4:
|
||||
grColorCombine(GR_COMBINE_FUNCTION_LOCAL,
|
||||
GR_COMBINE_FACTOR_NONE,
|
||||
GR_COMBINE_LOCAL_ITERATED,
|
||||
GR_COMBINE_OTHER_NONE,
|
||||
FXFALSE);
|
||||
do_phong = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
calculateIntensity(int material_index,
|
||||
Vector intensity_factor,
|
||||
int frame)
|
||||
{
|
||||
switch(material_index) {
|
||||
case 0:
|
||||
/* 3d */
|
||||
intensity_factor[0] = 1.0f;
|
||||
intensity_factor[1] = 1.0f;
|
||||
intensity_factor[2] = 1.0f;
|
||||
break;
|
||||
case 1:
|
||||
/* fx */
|
||||
intensity_factor[0] = 0.125f;
|
||||
intensity_factor[1] = 0.125f;
|
||||
intensity_factor[2] = 0.125f;
|
||||
break;
|
||||
case 2:
|
||||
/* cyan */
|
||||
intensity_factor[0] = (10.0f / 255.0f);
|
||||
intensity_factor[1] = (75.0f / 255.0f);
|
||||
intensity_factor[2] = (120.0f / 255.0f);
|
||||
break;
|
||||
case 3:
|
||||
/* white */
|
||||
intensity_factor[0] = 1.0f;
|
||||
intensity_factor[1] = 1.0f;
|
||||
intensity_factor[2] = 1.0f;
|
||||
break;
|
||||
case 4:
|
||||
/* yellow */
|
||||
intensity_factor[0] = (248.0f / 255.0f);
|
||||
intensity_factor[1] = (204.0f / 255.0f);
|
||||
intensity_factor[2] = 0.0f;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
drawFaces(int frame, int objnum)
|
||||
{
|
||||
int facenum;
|
||||
int material_index;
|
||||
float intensity_factor[3];
|
||||
GrVertex gvert[3];
|
||||
static int prev_mat_index = 0xffff;
|
||||
int i;
|
||||
FxBool aa_a, aa_b, aa_c;
|
||||
|
||||
for(facenum = 0; facenum < num_faces[objnum]; facenum++) {
|
||||
material_index = face[objnum][facenum].mat_index;
|
||||
if(material_index != prev_mat_index) {
|
||||
setupMaterial(material_index);
|
||||
calculateIntensity(material_index,
|
||||
intensity_factor, frame);
|
||||
prev_mat_index = material_index;
|
||||
}
|
||||
|
||||
if((material_index != 0) && (pass == 2))
|
||||
continue;
|
||||
|
||||
aa_a = aa_b = aa_c = FXFALSE;
|
||||
if(face[objnum][facenum].aa_edge_flags & 4)
|
||||
aa_a = FXTRUE;
|
||||
if(face[objnum][facenum].aa_edge_flags & 2)
|
||||
aa_b = FXTRUE;
|
||||
if(face[objnum][facenum].aa_edge_flags & 1)
|
||||
aa_c = FXTRUE;
|
||||
|
||||
for(i = 0; i < 3; i++) {
|
||||
float *transformed_vert, *transformed_norm;
|
||||
Vert *v;
|
||||
int vertnum;
|
||||
float factor;
|
||||
|
||||
vertnum = face[objnum][facenum].v[i];
|
||||
transformed_vert = transformed_verts[vertnum];
|
||||
transformed_norm = transformed_norms[vertnum];
|
||||
v = &vert[objnum][vertnum];
|
||||
|
||||
gvert[i].x = transformed_vert[0];
|
||||
gvert[i].y = transformed_vert[1];
|
||||
gvert[i].oow = 1.0f / transformed_vert[2];
|
||||
gvert[i].tmuvtx[0].oow = gvert[i].oow;
|
||||
gvert[i].tmuvtx[0].sow = v->s * gvert[i].oow;
|
||||
gvert[i].tmuvtx[0].tow = v->t * gvert[i].oow;
|
||||
|
||||
factor = ((light[0] * transformed_norm[0] +
|
||||
light[1] * transformed_norm[1] +
|
||||
light[2] * transformed_norm[2])+ 1.0f) * 127.5f;
|
||||
|
||||
gvert[i].r = factor * intensity_factor[0];
|
||||
gvert[i].g = factor * intensity_factor[1];
|
||||
gvert[i].b = factor * intensity_factor[2];
|
||||
gvert[i].a = 255.0f;
|
||||
}
|
||||
|
||||
if(pass == 2) {
|
||||
for(i = 0; i < 3; i++) {
|
||||
float *transformed_norm;
|
||||
|
||||
transformed_norm =
|
||||
transformed_norms[face[objnum][facenum].v[i]];
|
||||
|
||||
gvert[i].tmuvtx[0].sow = gvert[i].oow *
|
||||
(128.0f + transformed_norm[0] * 128.0f);
|
||||
gvert[i].tmuvtx[0].tow = gvert[i].oow *
|
||||
(128.0f + transformed_norm[1] * 128.0f);
|
||||
|
||||
gvert[i].r = intensity_factor[0] * 255.0f;
|
||||
gvert[i].g = intensity_factor[1] * 255.0f;
|
||||
gvert[i].b = intensity_factor[2] * 255.0f;
|
||||
}
|
||||
|
||||
grDrawTriangle(&gvert[0], &gvert[1], &gvert[2]);
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
grAlphaBlendFunction(GR_BLEND_SRC_ALPHA, GR_BLEND_ONE_MINUS_SRC_ALPHA,
|
||||
GR_BLEND_ONE, GR_BLEND_ZERO);
|
||||
/* Do this if 3D. */
|
||||
if(material_index == 0) {
|
||||
/*
|
||||
* Draw the textured 3D without specular.
|
||||
*/
|
||||
sourceTexture(&textImage);
|
||||
#if 0
|
||||
grColorCombine(GR_COMBINE_FUNCTION_SCALE_OTHER,
|
||||
GR_COMBINE_FACTOR_LOCAL,
|
||||
GR_COMBINE_LOCAL_ITERATED,
|
||||
GR_COMBINE_OTHER_TEXTURE,
|
||||
FXFALSE);
|
||||
#endif
|
||||
grAADrawTriangle(&gvert[0], &gvert[1], &gvert[2],
|
||||
aa_a, aa_b, aa_c);
|
||||
} else if(material_index != 1) {
|
||||
/*
|
||||
* Just go ahead and draw for things that don't
|
||||
* have specular highlights.
|
||||
*/
|
||||
grAADrawTriangle(&gvert[0], &gvert[1], &gvert[2],
|
||||
aa_a, aa_b, aa_c);
|
||||
}
|
||||
|
||||
if(do_phong && (material_index != 0)) {
|
||||
/*
|
||||
* figure out texture coords in [0..255.0f] based on the normal
|
||||
* the specular highlight.
|
||||
*/
|
||||
for(i = 0; i < 3; i++) {
|
||||
float *transformed_norm;
|
||||
|
||||
transformed_norm =
|
||||
transformed_norms[face[objnum][facenum].v[i]];
|
||||
|
||||
gvert[i].tmuvtx[0].sow = gvert[i].oow *
|
||||
(128.0f + transformed_norm[0] * 128.0f);
|
||||
gvert[i].tmuvtx[0].tow = gvert[i].oow *
|
||||
(128.0f + transformed_norm[1] * 128.0f);
|
||||
|
||||
gvert[i].r = intensity_factor[0] * 255.0f;
|
||||
gvert[i].g = intensity_factor[1] * 255.0f;
|
||||
gvert[i].b = intensity_factor[2] * 255.0f;
|
||||
}
|
||||
|
||||
grAADrawTriangle(&gvert[0], &gvert[1], &gvert[2],
|
||||
aa_a, aa_b, aa_c);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
intersectLineWithZPlane(Vector result, Vector p1,
|
||||
Vector p2, float z)
|
||||
{
|
||||
float t;
|
||||
|
||||
t = (z - p1[2]) / (p2[2] - p1[2]);
|
||||
result[0] = p1[0] + (p2[0] - p1[0]) * t;
|
||||
result[1] = p1[1] + (p2[1] - p1[1]) * t;
|
||||
result[2] = z;
|
||||
}
|
||||
|
||||
static float
|
||||
vectorMag(float *v)
|
||||
{
|
||||
return (float)sqrt(v[0] * v[0] + v[1] * v[1] + v[2] * v[2]);
|
||||
}
|
||||
|
||||
static void
|
||||
drawShadow(int frame, int shadow_object_index,
|
||||
int receiver_object_index, Vector light_position)
|
||||
{
|
||||
float *shadow_object_matrix;
|
||||
float *receiver_object_matrix;
|
||||
Vector view_verts[4];
|
||||
Vector projected_view_verts[4];
|
||||
int i;
|
||||
|
||||
Vector local_verts[4] = {
|
||||
{ -280.0f, 0.0f, -160.0f },
|
||||
{ -280.0f, 0.0f, 150.0f },
|
||||
{ 280.0f, 0.0f, 150.0f },
|
||||
{ 280.0f, 0.0f, -160.0f }
|
||||
};
|
||||
|
||||
float texcoords[4][2] = {
|
||||
{ 10.5f, 127.5f },
|
||||
{ 10.5f, 0.5f },
|
||||
{ 255.0f, 0.5f },
|
||||
{ 255.0f, 127.5f }
|
||||
};
|
||||
|
||||
GrVertex gvert[4];
|
||||
GrVertex projected_gvert[4];
|
||||
GrVertex light_gvert;
|
||||
|
||||
/*
|
||||
* The point relative to the back part of the shield that
|
||||
* the shadow is going to be projected onto.
|
||||
*/
|
||||
Vector shadow_light;
|
||||
|
||||
shadow_light[0] = light_position[0];
|
||||
shadow_light[1] = light_position[1];
|
||||
shadow_light[2] = light_position[2];
|
||||
|
||||
shadow_object_matrix = &mat[frame][shadow_object_index][0];
|
||||
receiver_object_matrix = &mat[frame][receiver_object_index][0];
|
||||
|
||||
/*
|
||||
* Offset the light by the Z position of
|
||||
* the backplane that we are projected
|
||||
* onto.
|
||||
*/
|
||||
shadow_light[2] += receiver_object_matrix[14];
|
||||
|
||||
for(i = 0; i < 4; i++) {
|
||||
vecMatMult(view_verts[i], local_verts[i], shadow_object_matrix);
|
||||
|
||||
/*
|
||||
* project . . .
|
||||
*/
|
||||
gvert[i].oow = 1.0f / view_verts[i][2];
|
||||
gvert[i].x =
|
||||
view_verts[i][0] * gvert[i].oow * viewPort[0] +
|
||||
viewPort[1] + SNAP_BIAS;
|
||||
gvert[i].y =
|
||||
view_verts[i][1] * gvert[i].oow * viewPort[2] +
|
||||
viewPort[3] + SNAP_BIAS;
|
||||
|
||||
/*
|
||||
* Set up texture coordinates.
|
||||
*/
|
||||
gvert[i].tmuvtx[0].sow = texcoords[i][0] * gvert[i].oow;
|
||||
gvert[i].tmuvtx[0].tow = texcoords[i][1] * gvert[i].oow;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Intersect each line formed by the light source and a
|
||||
* particular corner of the shadow object with the
|
||||
* plane which the texture is to be projected onto.
|
||||
*/
|
||||
for(i = 0; i < 4; i++) {
|
||||
Vector tmpvect;
|
||||
float q;
|
||||
|
||||
#if GLIDE_PACKED_RGB
|
||||
/* dpc - 22 oct 1997 - FixMe!
|
||||
* These are left uninitialized, yet they are being sent to the
|
||||
* hw, probably because some other state is not being correctly
|
||||
* setup. This doesn't seem to affect the 'correctness' of the
|
||||
* splash screen so I'm not investigating it any more.
|
||||
*/
|
||||
projected_gvert[i].r =
|
||||
projected_gvert[i].g =
|
||||
projected_gvert[i].b =
|
||||
projected_gvert[i].a = 0.0f;
|
||||
#endif /* GLIDE_PACKED_RGB */
|
||||
|
||||
intersectLineWithZPlane(projected_view_verts[i],
|
||||
shadow_light,
|
||||
view_verts[i],
|
||||
receiver_object_matrix[14] - 26.0f);
|
||||
projected_gvert[i].oow = 1.0f / projected_view_verts[i][2];
|
||||
projected_gvert[i].x = (projected_view_verts[i][0] * projected_gvert[i].oow * viewPort[0] +
|
||||
viewPort[1] + SNAP_BIAS);
|
||||
projected_gvert[i].y = (projected_view_verts[i][1] * projected_gvert[i].oow * viewPort[2] +
|
||||
viewPort[3] + SNAP_BIAS);
|
||||
|
||||
tmpvect[0] = projected_view_verts[i][0] - shadow_light[0];
|
||||
tmpvect[1] = projected_view_verts[i][1] - shadow_light[1];
|
||||
tmpvect[2] = projected_view_verts[i][2] - shadow_light[2];
|
||||
q = vectorMag(tmpvect);
|
||||
|
||||
/*
|
||||
* Set up texture coordinates.
|
||||
*/
|
||||
projected_gvert[i].tmuvtx[0].oow = projected_gvert[i].oow * q;
|
||||
projected_gvert[i].tmuvtx[0].sow = texcoords[i][0] * projected_gvert[i].oow;
|
||||
projected_gvert[i].tmuvtx[0].tow = texcoords[i][1] * projected_gvert[i].oow;
|
||||
}
|
||||
|
||||
light_gvert.oow = 1.0f / shadow_light[2];
|
||||
light_gvert.x = shadow_light[0] * light_gvert.oow * viewPort[0] + viewPort[1] + SNAP_BIAS;
|
||||
light_gvert.y = shadow_light[1] * light_gvert.oow * viewPort[2] + viewPort[3] + SNAP_BIAS;
|
||||
|
||||
/*
|
||||
* Draw a segment between the light and the point which hits
|
||||
* the surface that the light is being projected onto.
|
||||
*/
|
||||
grColorCombine(GR_COMBINE_FUNCTION_SCALE_OTHER,
|
||||
GR_COMBINE_FACTOR_ONE,
|
||||
GR_COMBINE_LOCAL_NONE,
|
||||
GR_COMBINE_OTHER_TEXTURE,
|
||||
FXFALSE);
|
||||
sourceTexture(&shadowImage);
|
||||
|
||||
grAlphaBlendFunction(GR_BLEND_DST_COLOR, GR_BLEND_ZERO,
|
||||
GR_BLEND_ONE, GR_BLEND_ZERO);
|
||||
|
||||
grDrawTriangle(&projected_gvert[0],
|
||||
&projected_gvert[1],
|
||||
&projected_gvert[2]);
|
||||
grDrawTriangle(&projected_gvert[0],
|
||||
&projected_gvert[2],
|
||||
&projected_gvert[3]);
|
||||
grDrawTriangle(&projected_gvert[0],
|
||||
&projected_gvert[2],
|
||||
&projected_gvert[1]);
|
||||
grDrawTriangle(&projected_gvert[0],
|
||||
&projected_gvert[3],
|
||||
&projected_gvert[2]);
|
||||
|
||||
grAlphaBlendFunction(GR_BLEND_ONE, GR_BLEND_ZERO,
|
||||
GR_BLEND_ONE, GR_BLEND_ZERO);
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------
|
||||
Function: grSplash
|
||||
Date: 3/13
|
||||
Implementor(s): GaryMcT
|
||||
Library: Glide
|
||||
Description:
|
||||
Render the opening splash screen animation, or render
|
||||
a single frame of the splash screen.
|
||||
Arguments:
|
||||
x, y - upper left hand coord of window
|
||||
w, h - width and height of window to render
|
||||
_frame - frame number to render (~0 to render all frames)
|
||||
Return:
|
||||
none
|
||||
-------------------------------------------------------------------*/
|
||||
GR_DIENTRY(grSplash,void,(float x,float y,float w,float h,FxU32 _frame))
|
||||
{
|
||||
GrState oldState;
|
||||
int frame;
|
||||
Vector lights[] = {
|
||||
{ 5.0f, 300.0f, -1500.0f },
|
||||
{ 5.0f, 150.0f, -1000.0f },
|
||||
{ -30.0f, 150.0f, -1000.0f },
|
||||
{ -30.0f, 100.0f, -1000.0f },
|
||||
{ 30.0f, 70.0f, -1000.0f },
|
||||
};
|
||||
GrFog_t fogTable[kInternalFogTableEntryCount];
|
||||
int fadeInFrames, fadeOutFrames;
|
||||
|
||||
GR_BEGIN_NOFIFOCHECK("grSplash", 85);
|
||||
GDBG_INFO_MORE(gc->myLevel,"(%f,%f,%f,%f,%d)\n",
|
||||
x, y, w, h, _frame);
|
||||
|
||||
/* Check Screen Dimensions and Check Avail of Depth Buffer */
|
||||
if ((x > gc->state.screen_width) ||
|
||||
((x+w) > gc->state.screen_width) ||
|
||||
(y > gc->state.screen_height) ||
|
||||
((y+h) > gc->state.screen_height))
|
||||
return;
|
||||
|
||||
if (gc->state.screen_height == 640) {
|
||||
if (gc->fbuf_size == 1) {
|
||||
return;
|
||||
}
|
||||
} else if (gc->state.screen_width == 800) {
|
||||
if ((gc->fbuf_size == 1) ||
|
||||
(gc->fbuf_size == 2)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (gc->grAuxBuf == 0) return;
|
||||
|
||||
if (!(gc->state.fbi_config.fbzMode & SST_YORIGIN)) {
|
||||
y = ((gc->state.screen_height - 1.0f) - (h-1.0f)) - y;
|
||||
}
|
||||
|
||||
viewPort[0] = w * (480.0f / 640.0f);
|
||||
viewPort[1] = x + (w / 2.0f);
|
||||
viewPort[2] = h;
|
||||
viewPort[3] = y + (h / 2.0f);
|
||||
|
||||
grGlideGetState(&oldState);
|
||||
|
||||
grSstOrigin(GR_ORIGIN_LOWER_LEFT);
|
||||
|
||||
if (_frame == 0) {
|
||||
createTextures();
|
||||
useTextures = 1;
|
||||
} else {
|
||||
useTextures = 0;
|
||||
}
|
||||
|
||||
grAlphaTestFunction(GR_CMP_ALWAYS);
|
||||
grChromakeyMode(GR_CHROMAKEY_DISABLE);
|
||||
grConstantColorValue(0xffffffff);
|
||||
grDepthBufferMode(GR_DEPTHBUFFER_WBUFFER);
|
||||
grDepthMask(FXTRUE);
|
||||
grAlphaCombine(GR_COMBINE_FUNCTION_LOCAL,
|
||||
GR_COMBINE_FACTOR_NONE,
|
||||
GR_COMBINE_LOCAL_ITERATED,
|
||||
GR_COMBINE_OTHER_NONE,
|
||||
FXFALSE);
|
||||
grAlphaBlendFunction(GR_BLEND_ONE, GR_BLEND_ZERO,
|
||||
GR_BLEND_ONE, GR_BLEND_ZERO);
|
||||
if (useTextures)
|
||||
grTexCombine(GR_TMU0,
|
||||
GR_COMBINE_FUNCTION_LOCAL, GR_COMBINE_FACTOR_NONE,
|
||||
GR_COMBINE_FUNCTION_NONE, GR_COMBINE_FACTOR_NONE,
|
||||
FXFALSE, FXFALSE);
|
||||
else
|
||||
grTexCombine(GR_TMU0,
|
||||
GR_COMBINE_FUNCTION_ZERO, GR_COMBINE_FACTOR_NONE,
|
||||
GR_COMBINE_FUNCTION_NONE, GR_COMBINE_FACTOR_NONE,
|
||||
FXTRUE, FXFALSE);
|
||||
grTexMipMapMode(GR_TMU0,
|
||||
GR_MIPMAP_NEAREST,
|
||||
FXFALSE);
|
||||
grTexFilterMode(GR_TMU0,
|
||||
GR_TEXTUREFILTER_BILINEAR,
|
||||
GR_TEXTUREFILTER_BILINEAR);
|
||||
grDepthBufferFunction(GR_CMP_LEQUAL);
|
||||
grCullMode(GR_CULL_NEGATIVE);
|
||||
/* grClipWindow((int)x, (int)y, (int)(x+w), (int)(y+h)); */
|
||||
grFogColorValue(0x0);
|
||||
|
||||
fadeInFrames = (int)(((float)total_num_frames) * FADEIN_END_PERCENT);
|
||||
fadeOutFrames = (int)(((float)total_num_frames) *
|
||||
(1.0f - FADEOUT_BEGIN_PERCENT));
|
||||
|
||||
if (_frame == 0) { /* Render Whole Animation */
|
||||
for(frame = 1; frame < total_num_frames; frame++) {
|
||||
int i;
|
||||
|
||||
/* Set Fog Value For This Frame */
|
||||
if(frame < fadeInFrames) {
|
||||
unsigned char fval = (((unsigned char)0xFF) -
|
||||
((unsigned char)(255.0f * (float)(frame + 1) / (float)fadeInFrames)));
|
||||
for(i = 0; i < kInternalFogTableEntryCount; i++) fogTable[i] = fval;
|
||||
grFogMode(GR_FOG_WITH_TABLE);
|
||||
grFogTable(fogTable);
|
||||
fog = 1;
|
||||
} else if(frame > total_num_frames-fadeOutFrames) {
|
||||
unsigned char fval = (((unsigned char)0xFF) -
|
||||
(unsigned char)(255.0f* ((float)(total_num_frames - frame))/
|
||||
((float)fadeOutFrames)));
|
||||
for(i = 0; i < kInternalFogTableEntryCount; i++)
|
||||
fogTable[i] = fval;
|
||||
grFogMode(GR_FOG_WITH_TABLE);
|
||||
grFogTable(fogTable);
|
||||
fog = 1;
|
||||
} else {
|
||||
grFogMode(GR_FOG_DISABLE);
|
||||
fog = 0;
|
||||
}
|
||||
|
||||
grBufferClear(0x00000000, 0, GR_WDEPTHVALUE_FARTHEST);
|
||||
|
||||
pass = 1;
|
||||
|
||||
/*
|
||||
* Avoid Z-aliasing between the shield and the 3dfx by
|
||||
* not writing Z for the shield.
|
||||
*/
|
||||
|
||||
grDepthMask(FXFALSE);
|
||||
/* cyan part of shield */
|
||||
xfAndProj(frame, 2);
|
||||
drawFaces(frame, 2);
|
||||
|
||||
/* yellow and white part of shield. */
|
||||
xfAndProj(frame, 0);
|
||||
drawFaces(frame, 0);
|
||||
|
||||
/*
|
||||
* Reanable writes to the depth-buffer.
|
||||
*/
|
||||
grDepthMask(FXTRUE);
|
||||
|
||||
/*
|
||||
* Draw the shadow projected from the 3Dfx logo onto
|
||||
* the rest of the powershield.
|
||||
*/
|
||||
grDepthBufferFunction(GR_CMP_ALWAYS);
|
||||
grFogMode(GR_FOG_DISABLE);
|
||||
drawShadow(frame, 1, 0, lights[0]);
|
||||
if (fog) grFogMode(GR_FOG_WITH_TABLE); /* hack around mp fog */
|
||||
grDepthBufferFunction(GR_CMP_LEQUAL);
|
||||
|
||||
/* 3Dfx logo */
|
||||
xfAndProj(frame, 1);
|
||||
drawFaces(frame, 1);
|
||||
grAlphaBlendFunction(GR_BLEND_ONE, GR_BLEND_ONE,
|
||||
GR_BLEND_ONE, GR_BLEND_ZERO);
|
||||
|
||||
pass = 2;
|
||||
drawFaces(frame, 1);
|
||||
pass = 1;
|
||||
grAlphaBlendFunction(GR_BLEND_ONE, GR_BLEND_ZERO,
|
||||
GR_BLEND_ONE, GR_BLEND_ZERO);
|
||||
|
||||
grBufferSwap(2);
|
||||
}
|
||||
} else { /* Render One Frame */
|
||||
frame = ((_frame>>1) % SPIN_FRAMES)+SPIN_START;
|
||||
|
||||
grColorMask(FXFALSE, FXFALSE);
|
||||
grBufferClear(0x00000000, 0, GR_WDEPTHVALUE_FARTHEST);
|
||||
grColorMask(FXTRUE, FXFALSE);
|
||||
|
||||
pass = 0xbeef;
|
||||
|
||||
/* 3Dfx logo */
|
||||
xfAndProj(frame, 1);
|
||||
drawFaces(frame, 1);
|
||||
}
|
||||
|
||||
/* Get rid of the remnants on teh screen just in case
|
||||
* the app (like PowerRender) doesn't do it itself yet
|
||||
* assumes that the screen is clear.
|
||||
*/
|
||||
if (frame == 0) {
|
||||
int i;
|
||||
|
||||
for(i = 0; i < gc->grColBuf; i++) {
|
||||
grBufferClear(0x00000000, 0, GR_WDEPTHVALUE_FARTHEST);
|
||||
grBufferSwap(0);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Clean up after yourself!
|
||||
*/
|
||||
grGlideSetState(&oldState);
|
||||
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,241 +0,0 @@
|
||||
/*
|
||||
** 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
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
*
|
||||
* 4 5/27/97 1:16p Peter
|
||||
* Basic cvg, w/o cmd fifo stuff.
|
||||
*
|
||||
* 3 5/21/97 6:05a Peter
|
||||
**
|
||||
*/
|
||||
#ifndef __GSSTDEF_H__
|
||||
#define __GSSTDEF_H__
|
||||
|
||||
|
||||
#if (GLIDE_PLATFORM & GLIDE_HW_CVG)
|
||||
#include <cvg.h>
|
||||
#else
|
||||
#include <sst.h>
|
||||
#endif
|
||||
|
||||
/*----------------- SST chip layout -----------------------*/
|
||||
typedef enum
|
||||
{
|
||||
SSTR_STATUS,
|
||||
SSTR_RESERVED0,
|
||||
SSTR_VAX,
|
||||
SSTR_VAY,
|
||||
SSTR_VBX,
|
||||
SSTR_VBY,
|
||||
SSTR_VCX,
|
||||
SSTR_VCY,
|
||||
#ifdef GLIDE_USE_ALT_REGMAP
|
||||
SSTR_R,
|
||||
SSTR_DRDX,
|
||||
SSTR_DRDY,
|
||||
|
||||
SSTR_G,
|
||||
SSTR_DGDX,
|
||||
SSTR_DGDY,
|
||||
|
||||
SSTR_B,
|
||||
SSTR_DBDX,
|
||||
SSTR_DBDY,
|
||||
|
||||
SSTR_Z,
|
||||
SSTR_DZDX,
|
||||
SSTR_DZDY,
|
||||
|
||||
SSTR_A,
|
||||
SSTR_DADX,
|
||||
SSTR_DADY,
|
||||
|
||||
SSTR_S,
|
||||
SSTR_DSDX,
|
||||
SSTR_DSDY,
|
||||
|
||||
SSTR_T,
|
||||
SSTR_DTDX,
|
||||
SSTR_DTDY,
|
||||
|
||||
SSTR_W,
|
||||
SSTR_DWDX,
|
||||
SSTR_DWDY,
|
||||
#else
|
||||
SSTR_R,
|
||||
SSTR_G,
|
||||
SSTR_B,
|
||||
SSTR_Z,
|
||||
SSTR_A,
|
||||
SSTR_S,
|
||||
SSTR_T,
|
||||
SSTR_W,
|
||||
|
||||
SSTR_DRDX,
|
||||
SSTR_DGDX,
|
||||
SSTR_DBDX,
|
||||
SSTR_DZDX,
|
||||
SSTR_DADX,
|
||||
SSTR_DSDX,
|
||||
SSTR_DTDX,
|
||||
SSTR_DWDX,
|
||||
|
||||
SSTR_DRDY,
|
||||
SSTR_DGDY,
|
||||
SSTR_DBDY,
|
||||
SSTR_DZDY,
|
||||
SSTR_DADY,
|
||||
SSTR_DSDY,
|
||||
SSTR_DTDY,
|
||||
SSTR_DWDY,
|
||||
#endif
|
||||
SSTR_TRIANGLECMD,
|
||||
SSTR_RESERVED1,
|
||||
|
||||
SSTR_FVAX,
|
||||
SSTR_FVAY,
|
||||
SSTR_FVBX,
|
||||
SSTR_FVBY,
|
||||
SSTR_FVCX,
|
||||
SSTR_FVCY,
|
||||
#ifdef GLIDE_USE_ALT_REGMAP
|
||||
SSTR_FR,
|
||||
SSTR_FDRDX,
|
||||
SSTR_FDRDY,
|
||||
|
||||
SSTR_FG,
|
||||
SSTR_FDGDX,
|
||||
SSTR_FDGDY,
|
||||
|
||||
SSTR_FB,
|
||||
SSTR_FDBDX,
|
||||
SSTR_FDBDY,
|
||||
|
||||
SSTR_FZ,
|
||||
SSTR_FDZDX,
|
||||
SSTR_FDZDY,
|
||||
|
||||
SSTR_FA,
|
||||
SSTR_FDADX,
|
||||
SSTR_FDADY,
|
||||
|
||||
SSTR_FS,
|
||||
SSTR_FDSDX,
|
||||
SSTR_FDSDY,
|
||||
|
||||
SSTR_FT,
|
||||
SSTR_FDTDX,
|
||||
SSTR_FDTDY,
|
||||
|
||||
SSTR_FW,
|
||||
SSTR_FDWDX,
|
||||
SSTR_FDWDY,
|
||||
#else
|
||||
SSTR_FR,
|
||||
SSTR_FG,
|
||||
SSTR_FB,
|
||||
SSTR_FZ,
|
||||
SSTR_FA,
|
||||
SSTR_FS,
|
||||
SSTR_FT,
|
||||
SSTR_FW,
|
||||
|
||||
SSTR_FDRDX,
|
||||
SSTR_FDGDX,
|
||||
SSTR_FDBDX,
|
||||
SSTR_FDZDX,
|
||||
SSTR_FDADX,
|
||||
SSTR_FDSDX,
|
||||
SSTR_FDTDX,
|
||||
SSTR_FDWDX,
|
||||
|
||||
SSTR_FDRDY,
|
||||
SSTR_FDGDY,
|
||||
SSTR_FDBDY,
|
||||
SSTR_FDZDY,
|
||||
SSTR_FDADY,
|
||||
SSTR_FDSDY,
|
||||
SSTR_FDTDY,
|
||||
SSTR_FDWDY,
|
||||
#endif
|
||||
SSTR_FTRIANGLECMD,
|
||||
SSTR_FBZCOLORPATH,
|
||||
SSTR_FOGMODE,
|
||||
SSTR_ALPHAMODE,
|
||||
SSTR_FBZMODE,
|
||||
SSTR_LFBMODE,
|
||||
SSTR_CLIPLEFTRIGHT,
|
||||
SSTR_CLIPBOTTOMTOP,
|
||||
|
||||
SSTR_NOPCMD,
|
||||
SSTR_FASTFILLCMD,
|
||||
SSTR_SWAPBUFFERCMD,
|
||||
SSTR_FOGCOLOR,
|
||||
SSTR_ZACOLOR,
|
||||
SSTR_CHROMAKEY,
|
||||
SSTR_RESERVED2,
|
||||
SSTR_RESERVED3,
|
||||
|
||||
SSTR_STIPPLE,
|
||||
SSTR_C0,
|
||||
SSTR_C1,
|
||||
|
||||
SSTR_FBIPIXELSIN,
|
||||
SSTR_FBICHROMAFAIL,
|
||||
SSTR_FBIZFUNCFAIL,
|
||||
SSTR_FBIAFUNCFAIL,
|
||||
SSTR_FBIPIXELSOUT,
|
||||
|
||||
SSTR_FOGTABLE,
|
||||
SSTR_RESERVED8 = SSTR_FOGTABLE + 32,
|
||||
|
||||
SSTR_FBIINIT4 = SSTR_RESERVED8 + 8,
|
||||
SSTR_VRETRACE,
|
||||
SSTR_BACKPORCH,
|
||||
SSTR_VIDEODIMENSIONS,
|
||||
SSTR_FBIINIT0,
|
||||
SSTR_FBIINIT1,
|
||||
SSTR_FBIINIT2,
|
||||
SSTR_FBIINIT3,
|
||||
|
||||
SSTR_HSYNC,
|
||||
SSTR_VSYNC,
|
||||
SSTR_CLUTDATA,
|
||||
SSTR_DACDATA,
|
||||
SSTR_MAX_RGB_DELTA,
|
||||
SSTR_RESERVED51,
|
||||
|
||||
SSTR_TEXTUREMODE = SSTR_RESERVED51 + 51,
|
||||
SSTR_TLOD,
|
||||
SSTR_TDETAIL,
|
||||
SSTR_TEXBASEADDR,
|
||||
SSTR_TEXBASEADDR1,
|
||||
SSTR_TEXBASEADDR2,
|
||||
SSTR_TEXBASEADDR38,
|
||||
SSTR_TEXINIT0,
|
||||
SSTR_TEXINIT1,
|
||||
|
||||
SSTR_NCCTABLE0,
|
||||
SSTR_NCCTABLE1 = SSTR_NCCTABLE0 + 12,
|
||||
SSTR_END_OF_REGISTER_SET
|
||||
} GrSstRegister;
|
||||
|
||||
#endif /* __GSSTDEF_H__ */
|
||||
@@ -1,302 +0,0 @@
|
||||
/*
|
||||
** 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
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
*
|
||||
* 19 12/12/97 12:43p Atai
|
||||
* move i and dateElem into the set up loop
|
||||
*
|
||||
* 17 12/08/97 10:38a Atai
|
||||
* added grDrawVertexArrayLinear()
|
||||
*
|
||||
* 16 11/21/97 6:05p Atai
|
||||
* use one datalist (tsuDataList) in glide3
|
||||
*
|
||||
* 15 11/06/97 6:10p Atai
|
||||
* update GrState size
|
||||
* rename grDrawArray to grDrawVertexArray
|
||||
* update _grDrawPoint and _grDrawVertexList
|
||||
*
|
||||
* 14 11/04/97 6:35p Atai
|
||||
* 1. sync with data structure changes
|
||||
* 2. break up aa triangle routine
|
||||
*
|
||||
* 13 11/04/97 4:57p Atai
|
||||
* use byte offset
|
||||
*
|
||||
* 12 11/03/97 3:43p Peter
|
||||
* h3/cvg cataclysm
|
||||
*
|
||||
* 11 10/17/97 2:11p Atai
|
||||
* added grContinueArray. We only support non aa mode for now.
|
||||
*
|
||||
* 10 10/16/97 1:50p Atai
|
||||
* fix drawarray bugs
|
||||
*
|
||||
* 9 10/14/97 6:16p Atai
|
||||
* reverse triangle order in _grAADrawVertexList
|
||||
*
|
||||
* 8 10/14/97 5:41p Atai
|
||||
* added _grAADrawVertexList()
|
||||
*
|
||||
* 7 10/14/97 4:57p Dow
|
||||
* Clamping
|
||||
*
|
||||
* 6 10/09/97 8:02p Dow
|
||||
* State Monster 1st Cut
|
||||
*
|
||||
* 5 10/08/97 11:32a Peter
|
||||
* pre-computed packet headers for packet 3
|
||||
*
|
||||
* 4 9/29/97 1:26p Dow
|
||||
* Fixed packed color strips/fans
|
||||
*
|
||||
* 3 9/26/97 10:24a Dow
|
||||
* Fixed state Muckage in Glide3 parameter data
|
||||
*
|
||||
* 2 9/23/97 2:35p Dow
|
||||
* One less loop
|
||||
*
|
||||
* 1 9/23/97 2:04p Dow
|
||||
* DD code for strips
|
||||
**
|
||||
*/
|
||||
#ifdef GLIDE3
|
||||
#include <3dfx.h>
|
||||
#include <glidesys.h>
|
||||
|
||||
#define FX_DLL_DEFINITION
|
||||
#include <fxdll.h>
|
||||
#include <glide.h>
|
||||
#include "fxglide.h"
|
||||
|
||||
/*-------------------------------------------------------------------
|
||||
Function: _grDrawVertexList
|
||||
Date: 18-Sep-97
|
||||
Implementor(s): dow
|
||||
Description:
|
||||
Sends a triangle strip to CVG.
|
||||
Arguments:
|
||||
|
||||
Return:
|
||||
-------------------------------------------------------------------*/
|
||||
void FX_CSTYLE
|
||||
_grDrawVertexList(FxU32 type, FxI32 mode, FxI32 count, void *pointers)
|
||||
{
|
||||
#define FN_NAME "_grDrawVertexList"
|
||||
|
||||
/*
|
||||
** simplified code
|
||||
*/
|
||||
FxU32
|
||||
vNum = 0,
|
||||
vSize;
|
||||
float
|
||||
**lPtrs = (float **) pointers;
|
||||
FxI32 stride = mode;
|
||||
FxU32
|
||||
sCount = count, set = 0, pktype = SSTCP_PKT3_BDDDDD;
|
||||
|
||||
GR_BEGIN_NOFIFOCHECK(FN_NAME, 90);
|
||||
|
||||
GDBG_INFO_MORE(gc->myLevel, "(type = 0x%x, count = %d, pointers = 0x%x)\n",
|
||||
type, count, pointers);
|
||||
|
||||
GR_FLUSH_STATE();
|
||||
|
||||
vSize = gc->state.vData.vSize;
|
||||
if (stride == 0)
|
||||
stride = gc->state.vData.vStride;
|
||||
|
||||
/* Draw the first (or possibly only) set. This is necessary because
|
||||
the packet is 3_BDDDDDD, and in the next set, the packet is
|
||||
3_DDDDDD */
|
||||
/*
|
||||
** We try to make tstrip code simple to read. We combine the original code
|
||||
** into a single loop by adding an extra packet type assignment at the end of the loop.
|
||||
** Also, the debugging code are removed temporarily.
|
||||
*/
|
||||
if (gc->state.grCoordinateSpaceArgs.coordinate_space_mode == GR_WINDOW_COORDS) {
|
||||
while (count > 0) {
|
||||
FxI32 k, vcount = count >= 15 ? 15 : count;
|
||||
GR_SET_EXPECTED_SIZE(vcount * vSize, 1);
|
||||
TRI_STRIP_BEGIN(type, vcount, vSize, pktype);
|
||||
/*
|
||||
** If we use a while loop, the compiler will increment vNum and store the value back
|
||||
** to the memory at every loop. In a for loop, vNum data are kept in a register.
|
||||
** After the loop complete, the vNum data are written back to memory.
|
||||
*/
|
||||
for (k = 0; k < vcount; k++) {
|
||||
FxU32 i, dataElem;
|
||||
float *vPtr;
|
||||
|
||||
vPtr = pointers;
|
||||
if (mode)
|
||||
vPtr = *(float **)vPtr;
|
||||
(float *)pointers += stride;
|
||||
|
||||
TRI_SETF(FARRAY(vPtr, GR_VERTEX_X_OFFSET << 2));
|
||||
dataElem = 0;
|
||||
TRI_SETF(FARRAY(vPtr, GR_VERTEX_Y_OFFSET << 2));
|
||||
i = gc->tsuDataList[dataElem];
|
||||
while (i != GR_DLIST_END) {
|
||||
TRI_SETF(FARRAY(vPtr, i));
|
||||
dataElem++;
|
||||
i = gc->tsuDataList[dataElem];
|
||||
}
|
||||
}
|
||||
TRI_END;
|
||||
GR_CHECK_SIZE();
|
||||
count -= 15;
|
||||
pktype = SSTCP_PKT3_DDDDDD;
|
||||
}
|
||||
}
|
||||
else {
|
||||
/*
|
||||
* first cut of clip space coordinate code, no optimization.
|
||||
*/
|
||||
float oow;
|
||||
|
||||
while (count > 0) {
|
||||
FxI32 k, vcount = count >= 15 ? 15 : count;
|
||||
GR_SET_EXPECTED_SIZE(vcount * vSize, 1);
|
||||
TRI_STRIP_BEGIN(type, vcount, vSize, pktype);
|
||||
for (k = 0; k < vcount; k++) {
|
||||
float *vPtr;
|
||||
|
||||
vPtr = pointers;
|
||||
if (mode)
|
||||
vPtr = *(float **)vPtr;
|
||||
oow = 1.0f / FARRAY(vPtr, gc->state.vData.wInfo.offset);
|
||||
/* x, y */
|
||||
TRI_SETF(FARRAY(vPtr, GR_VERTEX_X_OFFSET << 2)
|
||||
*oow*gc->state.Viewport.hwidth + gc->state.Viewport.ox);
|
||||
TRI_SETF(FARRAY(vPtr, GR_VERTEX_Y_OFFSET << 2)
|
||||
*oow*gc->state.Viewport.hheight + gc->state.Viewport.oy);
|
||||
(float *)pointers += stride;
|
||||
|
||||
TRI_VP_SETFS(vPtr, oow);
|
||||
}
|
||||
TRI_END;
|
||||
GR_CHECK_SIZE();
|
||||
count -= 15;
|
||||
pktype = SSTCP_PKT3_DDDDDD;
|
||||
}
|
||||
}
|
||||
|
||||
#undef FN_NAME
|
||||
} /* _grDrawVertexList */
|
||||
|
||||
/*-------------------------------------------------------------------
|
||||
Function: _grAADrawVertexList
|
||||
Date: 14-Oct-97
|
||||
Implementor(s): atai
|
||||
Description:
|
||||
Sends an aa triangle strip/fan to CVG.
|
||||
Arguments:
|
||||
|
||||
Return:
|
||||
-------------------------------------------------------------------*/
|
||||
void FX_CSTYLE
|
||||
_grAADrawVertexList(FxU32 type, FxI32 mode, FxI32 count, void *pointers)
|
||||
{
|
||||
#define FN_NAME "_grAADrawVertexList"
|
||||
|
||||
GR_DCL_GC;
|
||||
FxU32 vNum = 0;
|
||||
FxU32 sCount = count;
|
||||
float
|
||||
**lPtrs = (float **) pointers;
|
||||
float *v[3];
|
||||
FxBool flip = FXFALSE;
|
||||
FxU32 fbzModeOld; /* Squirrel away current fbzMode */
|
||||
FxI32 stride = mode;
|
||||
|
||||
if (sCount <= 2) return;
|
||||
|
||||
_grDrawVertexList(type, mode, count, pointers);
|
||||
|
||||
fbzModeOld = gc->state.fbi_config.fbzMode;
|
||||
gc->state.fbi_config.fbzMode &= ~(SST_ZAWRMASK);
|
||||
/* gc->state.invalid |= fbzModeBIT; */
|
||||
GR_FLUSH_STATE();
|
||||
if (stride == 0)
|
||||
stride = gc->state.vData.vStride;
|
||||
|
||||
sCount-=2;
|
||||
if (type == kSetupFan) {
|
||||
v[0] = (mode == 0) ? pointers : *(float **)pointers;
|
||||
while (sCount--) {
|
||||
(float *)pointers += stride;
|
||||
if (mode) {
|
||||
v[1] = *(float **)pointers;
|
||||
v[2] = *((float **)pointers+1);
|
||||
} else {
|
||||
v[1] = pointers;
|
||||
v[2] = (float *)pointers+stride;
|
||||
}
|
||||
if (gc->state.grCoordinateSpaceArgs.coordinate_space_mode == GR_WINDOW_COORDS)
|
||||
_grAADrawTriangles(1, type, 3, v);
|
||||
else
|
||||
_grAAVpDrawTriangles(1, type, 3, v);
|
||||
}
|
||||
}
|
||||
else if (type == kSetupStrip){
|
||||
while (sCount--) {
|
||||
if (flip) {
|
||||
if (mode) {
|
||||
v[0] = *((float **)pointers+1);
|
||||
v[1] = *(float **)pointers;
|
||||
v[2] = *((float **)pointers+2);
|
||||
} else {
|
||||
v[0] = (float *)pointers+stride;
|
||||
v[1] = pointers;
|
||||
v[2] = (float *)pointers+(stride<<1);
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (mode) {
|
||||
v[0] = *(float **)pointers;
|
||||
v[1] = *((float **)pointers+1);
|
||||
v[2] = *((float **)pointers+2);
|
||||
} else {
|
||||
v[0] = pointers;
|
||||
v[1] = (float *)pointers+stride;
|
||||
v[2] = (float *)pointers+(stride<<1);
|
||||
}
|
||||
}
|
||||
if (gc->state.grCoordinateSpaceArgs.coordinate_space_mode == GR_WINDOW_COORDS)
|
||||
_grAADrawTriangles(1, type, 3, v);
|
||||
else
|
||||
_grAAVpDrawTriangles(1, type, 3, v);
|
||||
(float *)pointers += stride;
|
||||
flip = ~flip;
|
||||
}
|
||||
flip = ~flip;
|
||||
}
|
||||
|
||||
gc->state.fbi_config.fbzMode = fbzModeOld;
|
||||
gc->state.invalid |= fbzModeBIT;
|
||||
GR_FLUSH_STATE();
|
||||
|
||||
#undef FN_NAME
|
||||
} /* _grAADrawVertexList */
|
||||
|
||||
#endif
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,822 +0,0 @@
|
||||
/*
|
||||
** 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
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
**
|
||||
** 61 5/18/98 12:11p Peter
|
||||
** removed unnecesasry fencing
|
||||
**
|
||||
** 60 4/29/98 2:32p Peter
|
||||
** fixed texture palette broadcast
|
||||
**
|
||||
** 59 3/30/98 2:46p Peter
|
||||
** fixed texture download muckage
|
||||
**
|
||||
** 58 3/29/98 10:54p Jdt
|
||||
** Unset GLIDE_POINTCAST_PALETTE
|
||||
**
|
||||
** 57 2/20/98 5:31p Peter
|
||||
** crybaby glide
|
||||
**
|
||||
** 56 2/20/98 11:00a Peter
|
||||
** removed glide3 from glid2 tree
|
||||
**
|
||||
** 55 2/02/98 2:14p Atai
|
||||
** fixed palette broadcasts in _grTexDownloadNccTable and
|
||||
** _grTexDownloadPalette
|
||||
*
|
||||
* 54 1/09/98 6:48p Atai
|
||||
* grTexInfo, GR_LOD_* and GR_ASPECT_*
|
||||
*
|
||||
* 53 1/08/98 7:09p Peter
|
||||
* real hw stuff modulo makefile change
|
||||
*
|
||||
* 52 1/08/98 4:58p Atai
|
||||
* tex table broadcast, grVertexLayout enable/disable, stq, and some
|
||||
* defines
|
||||
*
|
||||
* 51 1/08/98 11:06a Dow
|
||||
* Set palette downloads to broadcast.
|
||||
*
|
||||
* 50 12/11/97 4:15p Peter
|
||||
* fixed assertions
|
||||
*
|
||||
* 49 12/09/97 12:20p Peter
|
||||
* mac glide port
|
||||
*
|
||||
* 48 12/05/97 4:26p Peter
|
||||
* watcom warnings
|
||||
*
|
||||
* 47 12/02/97 9:48a Dow
|
||||
* Got rid of Texelfx rev 0 warning
|
||||
*
|
||||
* 46 11/21/97 1:03p Peter
|
||||
* small texture download problem
|
||||
*
|
||||
* 45 11/20/97 6:57p Dow
|
||||
* Texture Downloads for Banshee
|
||||
*
|
||||
* 44 11/18/97 4:36p Peter
|
||||
* chipfield stuff cleanup and w/ direct writes
|
||||
*
|
||||
* 43 11/17/97 4:55p Peter
|
||||
* watcom warnings/chipfield stuff
|
||||
*
|
||||
* 42 11/14/97 12:09a Peter
|
||||
* comdex thing and some other stuff
|
||||
*
|
||||
* 41 11/12/97 11:16a Peter
|
||||
* cleaned up assertions
|
||||
*
|
||||
* 40 11/05/97 1:50p Peter
|
||||
* fixed partial palette downloads
|
||||
*
|
||||
* 39 11/03/97 3:43p Peter
|
||||
* h3/cvg cataclysm
|
||||
*
|
||||
* 38 10/08/97 11:33a Peter
|
||||
* reg group for palette download
|
||||
*
|
||||
* 37 9/15/97 7:31p Peter
|
||||
* more cmdfifo cleanup, fixed normal buffer clear, banner in the right
|
||||
* place, lfb's are on, Hmmmm.. probably more
|
||||
*
|
||||
* 36 9/04/97 3:32p Peter
|
||||
* starting grouping serial reg writes
|
||||
*
|
||||
* 35 8/18/97 3:52p Peter
|
||||
* pre-hw arrival fixes/cleanup
|
||||
*
|
||||
* 34 7/26/97 5:18p Peter
|
||||
* fixed macro muckage
|
||||
*
|
||||
* 33 7/08/97 2:49p Peter
|
||||
*
|
||||
* 32 7/02/97 12:28p Peter
|
||||
* removed spurious NOP, tex dl
|
||||
*
|
||||
* 31 6/30/97 3:22p Peter
|
||||
* cmd fifo sanity
|
||||
*
|
||||
**
|
||||
*/
|
||||
|
||||
#include <3dfx.h>
|
||||
#define FX_DLL_DEFINITION
|
||||
#include <fxdll.h>
|
||||
#include <glide.h>
|
||||
#include "fxglide.h"
|
||||
|
||||
/* externals from gtex.c */
|
||||
extern FxU32 _gr_aspect_xlate_table[];
|
||||
extern FxU32 _gr_evenOdd_xlate_table[];
|
||||
extern const int _grMipMapHostWH[GR_ASPECT_1x8 + 1][GR_LOD_1 + 1][2];
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
** _grTexDownloadNccTable
|
||||
**
|
||||
** Downloads an ncctable to the specified _physical_ TMU(s). This
|
||||
** function is called internally by Glide and should not be executed
|
||||
** by an application.
|
||||
*/
|
||||
GR_DDFUNC(_grTexDownloadNccTable,
|
||||
void,
|
||||
(GrChipID_t tmu, FxU32 which, const GuNccTable *table, int start, int end))
|
||||
{
|
||||
#define FN_NAME "_grTexDownloadNccTable"
|
||||
GR_BEGIN_NOFIFOCHECK(FN_NAME,89);
|
||||
GDBG_INFO_MORE(gc->myLevel,"(%d,%d, 0x%x, %d,%d)\n",tmu,which,table,start,end);
|
||||
GR_ASSERT(start==0);
|
||||
GR_ASSERT(end==11);
|
||||
|
||||
/* check for null pointer */
|
||||
if (table == NULL) return;
|
||||
|
||||
_GlideRoot.stats.palDownloads++;
|
||||
_GlideRoot.stats.palBytes += (end-start+1)<<2;
|
||||
|
||||
if (gc->tmu_state[tmu].ncc_table[which] != table) {
|
||||
SstRegs* texHW;
|
||||
int i;
|
||||
#ifdef GLIDE_POINTCAST_PALETTE
|
||||
texHW = SST_TMU(hw,tmu);
|
||||
#else
|
||||
texHW = SST_CHIP(hw,0xe);
|
||||
#endif
|
||||
|
||||
if (which == 0) {
|
||||
#ifdef GLIDE_POINTCAST_PALETTE
|
||||
REG_GROUP_BEGIN((0x02UL << tmu), nccTable0, 12, 0x0FFF);
|
||||
#else
|
||||
REG_GROUP_BEGIN(0x0EUL, nccTable0, 12, 0x0FFF);
|
||||
#endif
|
||||
for (i = 0; i < 12; i++) REG_GROUP_SET(texHW, nccTable0[i], table->packed_data[i]);
|
||||
REG_GROUP_END();
|
||||
} else {
|
||||
#ifdef GLIDE_POINTCAST_PALETTE
|
||||
REG_GROUP_BEGIN((0x02UL << tmu), nccTable1, 12, 0x0FFF);
|
||||
#else
|
||||
REG_GROUP_BEGIN(0x0EUL, nccTable1, 12, 0x0FFF);
|
||||
#endif
|
||||
for (i = 0; i < 12; i++) REG_GROUP_SET(texHW, nccTable1[i], table->packed_data[i]);
|
||||
REG_GROUP_END();
|
||||
}
|
||||
|
||||
gc->tmu_state[tmu].ncc_table[which] = table;
|
||||
}
|
||||
|
||||
GR_END();
|
||||
#undef FN_NAME
|
||||
} /* _grTexDownloadNccTable */
|
||||
|
||||
/*-------------------------------------------------------------------
|
||||
Function: _grTexDownloadPalette
|
||||
Date: 6/9
|
||||
Implementor(s): jdt
|
||||
Library: Glide
|
||||
Description:
|
||||
Private function to download a palette to the specified tmu
|
||||
Arguments:
|
||||
tmu - which tmu to download the palette to
|
||||
pal - the pallete data
|
||||
start - beginning index to download
|
||||
end - ending index to download
|
||||
Return:
|
||||
none
|
||||
-------------------------------------------------------------------*/
|
||||
GR_DDFUNC(_grTexDownloadPalette,
|
||||
void,
|
||||
(GrChipID_t tmu, GuTexPalette *pal, int start, int end))
|
||||
{
|
||||
#define FN_NAME "_grTexDownloadPalette"
|
||||
GR_BEGIN_NOFIFOCHECK(FN_NAME, 89);
|
||||
GDBG_INFO_MORE(gc->myLevel,"(%d,0x%x, %d,%d)\n",tmu,pal,start,end);
|
||||
|
||||
GR_CHECK_F(FN_NAME, pal == NULL, "pal invalid");
|
||||
GR_CHECK_F(FN_NAME, start < 0, "invalid start index");
|
||||
GR_CHECK_F(FN_NAME, end > 255, "invalid end index");
|
||||
|
||||
/* NOTE:
|
||||
**
|
||||
** This code broadcasts the palette because in the future, we will
|
||||
** only support one global texture palette no matter how many TMUs
|
||||
** there are. This is fallout from the fact that future hardware
|
||||
** has a unified memory architecture.
|
||||
**
|
||||
** Source licensees (meaning arcade or LBE vendors that) require the
|
||||
** one palette/tmu mode should define GLIDE_POINTCAST_PALETTE on
|
||||
** the command line for this file. Understand, however, that this
|
||||
** will not work on future hardware.
|
||||
*/
|
||||
|
||||
#ifdef GLIDE_POINTCAST_PALETTE
|
||||
/*
|
||||
** FURTHER NOTE:
|
||||
** There is a sublety (nice way of saying BUG) here.
|
||||
** If TMU0 is specified, then the palette will be broadcast to all
|
||||
** TMUS. So, if the user downloads TMU1's palette, then TMU0's
|
||||
** palette, TMU0's palette will be on *both* TMUs. This is a
|
||||
** pretty strong indicator that no one is using separate palettes
|
||||
** on different TMUs.
|
||||
*/
|
||||
hw = SST_TMU(hw,tmu);
|
||||
#else
|
||||
hw = SST_CHIP(hw,0xE);
|
||||
#endif
|
||||
|
||||
_GlideRoot.stats.palDownloads++;
|
||||
_GlideRoot.stats.palBytes += ((end - start + 1) << 2);
|
||||
|
||||
/* We divide the writes into 3 chunks trying to group things into
|
||||
* complete 8 word grouped packets to fit the nccTable palette
|
||||
* format: stuff before the 8 word alignment, aligned writes, and
|
||||
* stuff after the 8 word alignment to the end. The slop regions
|
||||
* are one packet apiece.
|
||||
*/
|
||||
{
|
||||
#ifdef GLIDE_POINTCAST_PALETTE
|
||||
const FifoChipField chipId = (FifoChipField)(0x02UL << tmu);
|
||||
#else
|
||||
const FifoChipField chipId = (FifoChipField)0x0EUL;
|
||||
#endif
|
||||
const int endSlop = (end & ~0x07);
|
||||
const int startSlop = MIN(((start + 8) & ~0x07) - 1, end);
|
||||
int i = start;
|
||||
|
||||
/* Is the start of the palette range unaligned or is the end of
|
||||
* the range less than a completely aligned range?
|
||||
*/
|
||||
if (((start & 0x07) != 0) || (end < ((start + 8) & ~0x07))) {
|
||||
const FxI32 slopCount = startSlop - start + 1;
|
||||
GR_ASSERT((slopCount > 0) && (slopCount <= 8));
|
||||
|
||||
REG_GROUP_BEGIN(chipId, nccTable0[4 + (start & 0x07)],
|
||||
slopCount, (0xFF >> (8 - slopCount)));
|
||||
while(i < start + slopCount) {
|
||||
REG_GROUP_SET(hw, nccTable0[4 + (i & 0x07)],
|
||||
(0x80000000 | ((i & 0xFE) << 23) | pal->data[i] & 0xFFFFFF));
|
||||
i++;
|
||||
}
|
||||
REG_GROUP_END();
|
||||
}
|
||||
|
||||
/* Do all of the aligned palette ranges. */
|
||||
while(i < endSlop) {
|
||||
const int endIndex = i + 8;
|
||||
|
||||
REG_GROUP_BEGIN(chipId, nccTable0[4], 8, 0xFF);
|
||||
while(i < endIndex) {
|
||||
REG_GROUP_SET(hw, nccTable0[4 + (i & 0x07)],
|
||||
(0x80000000 | ((i & 0xFE) << 23) | pal->data[i] & 0xFFFFFF));
|
||||
i++;
|
||||
}
|
||||
REG_GROUP_END();
|
||||
}
|
||||
|
||||
/* Do we have any more slop at the end of the ragne? */
|
||||
if (i <= end) {
|
||||
const FxU32 slopCount = end - endSlop + 1;
|
||||
|
||||
REG_GROUP_BEGIN(chipId, nccTable0[4],
|
||||
slopCount, (0xFF >> (8 - slopCount)));
|
||||
while(i <= end) {
|
||||
REG_GROUP_SET(hw, nccTable0[4 + (i & 0x07)],
|
||||
(0x80000000 | ((i & 0xFE) << 23) | pal->data[i] & 0xFFFFFF));
|
||||
i++;
|
||||
}
|
||||
REG_GROUP_END();
|
||||
}
|
||||
}
|
||||
|
||||
GR_END();
|
||||
#undef FN_NAME
|
||||
} /* _grTexDownloadPalette */
|
||||
|
||||
/*-------------------------------------------------------------------
|
||||
Function: grTexDownloadTable
|
||||
Date: 6/3
|
||||
Implementor(s): jdt, GaryMcT
|
||||
Library: glide
|
||||
Description:
|
||||
download look up table data to a tmu
|
||||
Arguments:
|
||||
tmu - which tmu
|
||||
type - what type of table to download
|
||||
One of:
|
||||
GR_TEXTABLE_NCC0
|
||||
GR_TEXTABLE_NCC1
|
||||
GR_TEXTABLE_PALETTE
|
||||
void *data - pointer to table data
|
||||
Return:
|
||||
none
|
||||
-------------------------------------------------------------------*/
|
||||
GR_ENTRY(grTexDownloadTable,
|
||||
void,
|
||||
(GrChipID_t tmu, GrTexTable_t type, void *data))
|
||||
{
|
||||
#define FN_NAME "grTexDownloadTable"
|
||||
GR_BEGIN_NOFIFOCHECK("grTexDownloadTable",89);
|
||||
GDBG_INFO_MORE(gc->myLevel,"(%d,%d,0x%x)\n",tmu,type,data);
|
||||
GR_CHECK_TMU(FN_NAME,tmu);
|
||||
GR_CHECK_F(FN_NAME, type > GR_TEXTABLE_PALETTE, "invalid table specified");
|
||||
GR_CHECK_F(FN_NAME, !data, "invalid data pointer");
|
||||
|
||||
if (type == GR_TEXTABLE_PALETTE) /* Need Palette Download Code */
|
||||
_grTexDownloadPalette(tmu, (GuTexPalette *)data, 0, 255);
|
||||
else { /* Type is an ncc table */
|
||||
_grTexDownloadNccTable(tmu, type, (GuNccTable*)data, 0, 11);
|
||||
/* _grTexDownloadNccTable(tmu, type, (GuNccTable*)data, 0, 11); */
|
||||
}
|
||||
GR_END();
|
||||
#undef FN_NAME
|
||||
} /* grTexDownloadTable */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------
|
||||
Function: grTexDownloadMipMapLevelPartial
|
||||
Date: 6/2
|
||||
Implementor(s): GaryMcT, Jdt
|
||||
Library: glide
|
||||
Description:
|
||||
Downloads a mipmap level to the specified tmu at the given
|
||||
texture start address
|
||||
Arguments:
|
||||
tmu - which tmu
|
||||
startAddress - starting address for texture download,
|
||||
this should be some value between grTexMinAddress()
|
||||
and grTexMaxAddress()
|
||||
thisLod - lod constant that describes the mipmap level
|
||||
to be downloaded
|
||||
largeLod - largest level of detail in complete mipmap to
|
||||
be downloaded at startAddress of which level to
|
||||
be downloaded is a part
|
||||
aspectRatio - aspect ratio of this mipmap
|
||||
format - format of mipmap image data
|
||||
evenOdd - which set of mipmap levels have been downloaded for
|
||||
the selected texture
|
||||
One of:
|
||||
GR_MIPMAPLEVELMASK_EVEN
|
||||
GR_MIPMAPLEVELMASK_ODD
|
||||
GR_MIPMAPLEVELMASK_BOTH
|
||||
data - pointer to mipmap data
|
||||
Return:
|
||||
none
|
||||
-------------------------------------------------------------------*/
|
||||
|
||||
GR_ENTRY(grTexDownloadMipMapLevelPartial,
|
||||
void,
|
||||
(GrChipID_t tmu, FxU32 startAddress,
|
||||
GrLOD_t thisLod, GrLOD_t largeLod, GrAspectRatio_t aspectRatio,
|
||||
GrTextureFormat_t format, FxU32 evenOdd, void *data, int t, int max_t))
|
||||
{
|
||||
const FifoChipField chipId = (FifoChipField)(0x02UL << tmu);
|
||||
FxI32 sh;
|
||||
FxU32 max_s, width, tmu_baseaddress;
|
||||
#define FN_NAME "grTexDownloadMipMapLevelPartial"
|
||||
|
||||
GR_BEGIN_NOFIFOCHECK(FN_NAME, 89);
|
||||
GDBG_INFO_MORE(gc->myLevel,"(%d,0x%x, %d,%d,%d, %d,%d 0x%x, %d,%d)\n",
|
||||
tmu,startAddress,thisLod,largeLod,aspectRatio,
|
||||
format,evenOdd,data,t,max_t);
|
||||
|
||||
/* Check fo silly things */
|
||||
{
|
||||
const FxU32 size = _grTexTextureMemRequired(thisLod, thisLod,
|
||||
aspectRatio, format, evenOdd);
|
||||
|
||||
GR_CHECK_TMU(FN_NAME, tmu);
|
||||
GR_CHECK_COMPATABILITY(FN_NAME,
|
||||
startAddress + size > gc->tmu_state[tmu].total_mem,
|
||||
"insufficient texture ram at startAddress");
|
||||
GR_CHECK_COMPATABILITY(FN_NAME,
|
||||
startAddress & 0x7,
|
||||
"unaligned startAddress");
|
||||
GR_CHECK_F(FN_NAME, thisLod > GR_LOD_1,
|
||||
"thisLod invalid");
|
||||
GR_CHECK_F(FN_NAME, largeLod > GR_LOD_1,
|
||||
"largeLod invalid");
|
||||
GR_CHECK_F(FN_NAME, thisLod < largeLod,
|
||||
"thisLod may not be larger than largeLod");
|
||||
GR_CHECK_F(FN_NAME, aspectRatio > GR_ASPECT_1x8 ||
|
||||
aspectRatio < GR_ASPECT_8x1,
|
||||
"aspectRatio invalid");
|
||||
GR_CHECK_F(FN_NAME, evenOdd > 0x3 || evenOdd == 0,
|
||||
"evenOdd mask invalid");
|
||||
GR_CHECK_F(FN_NAME, !data,
|
||||
"invalid data pointer");
|
||||
GR_CHECK_F(FN_NAME, max_t >= _grMipMapHostWH[aspectRatio][thisLod][1],
|
||||
"invalid end row");
|
||||
|
||||
if ((startAddress < 0x200000) && (startAddress + size > 0x200000))
|
||||
GrErrorCallback("grTexDownloadMipMapLevelPartial: mipmap level cannot span 2 Mbyte boundary",
|
||||
FXTRUE);
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------
|
||||
Skip this level entirely if not in odd/even mask
|
||||
------------------------------------------------------------*/
|
||||
if (!(evenOdd & (thisLod & 0x1 ? GR_MIPMAPLEVELMASK_ODD:GR_MIPMAPLEVELMASK_EVEN)))
|
||||
goto all_done;
|
||||
|
||||
{
|
||||
/*------------------------------------------------------------
|
||||
Compute Base Address Given Start Address Offset
|
||||
------------------------------------------------------------*/
|
||||
const FxU32 baseAddress = _grTexCalcBaseAddress(startAddress,
|
||||
largeLod,
|
||||
aspectRatio,
|
||||
format,
|
||||
evenOdd) >> 3;
|
||||
|
||||
/*------------------------------------------------------------
|
||||
Compute pertinant contents of tLOD and texMode registers
|
||||
------------------------------------------------------------*/
|
||||
FxU32 tLod = SST_TLOD_MINMAX_INT(largeLod, GR_LOD_1);
|
||||
FxU32 texMode = format << SST_TFORMAT_SHIFT;
|
||||
|
||||
tLod |= _gr_evenOdd_xlate_table[evenOdd];
|
||||
tLod |= _gr_aspect_xlate_table[aspectRatio];
|
||||
|
||||
if (gc->state.tmu_config[tmu].textureMode & SST_SEQ_8_DOWNLD) {
|
||||
sh = 2;
|
||||
texMode |= SST_SEQ_8_DOWNLD;
|
||||
} else {
|
||||
sh = 3;
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------
|
||||
Update TLOD, texMode, baseAddress
|
||||
------------------------------------------------------------*/
|
||||
hw = SST_TMU(hw,tmu);
|
||||
REG_GROUP_BEGIN(chipId, textureMode, 3, 0x0B);
|
||||
{
|
||||
REG_GROUP_SET(hw, textureMode, texMode);
|
||||
REG_GROUP_SET(hw, tLOD, tLod);
|
||||
REG_GROUP_SET(hw, texBaseAddr, baseAddress);
|
||||
}
|
||||
REG_GROUP_END();
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------
|
||||
Determine max_s
|
||||
------------------------------------------------------------*/
|
||||
width = _grMipMapHostWH[aspectRatio][thisLod][0];
|
||||
max_s = width >> ((format < GR_TEXFMT_16BIT)
|
||||
? 2 /* 8-bit texture */
|
||||
: 1); /* 16-bit texture */
|
||||
if (max_s <= 0) max_s = 1;
|
||||
|
||||
_GlideRoot.stats.texBytes += max_s * (max_t - t + 1) * 4;
|
||||
|
||||
/*------------------------------------------------------------
|
||||
Compute Physical Write Pointer
|
||||
------------------------------------------------------------*/
|
||||
tmu_baseaddress = (FxU32)gc->tex_ptr;
|
||||
tmu_baseaddress += (((FxU32)tmu) << 21) + (((FxU32)thisLod) << 17);
|
||||
|
||||
/*------------------------------------------------------------
|
||||
Handle 8-bit Textures
|
||||
------------------------------------------------------------*/
|
||||
if (format < GR_TEXFMT_16BIT) { /* 8 bit textures */
|
||||
/* Hoisted initialization */
|
||||
FxU32 tex_address = tmu_baseaddress + TEX_ROW_ADDR_INCR(t, thisLod);
|
||||
const FxU8* src8 = (const FxU8*)data;
|
||||
|
||||
switch(width) {
|
||||
case 1:
|
||||
for (; t <= max_t; t++) {
|
||||
LINEAR_WRITE_BEGIN(1, kLinearWriteTex,
|
||||
(FxU32)tex_address - (FxU32)gc->tex_ptr,
|
||||
0x00UL, 0x00UL);
|
||||
LINEAR_WRITE_SET_8(tex_address, (const FxU32)*(const FxU8*)src8);
|
||||
LINEAR_WRITE_END();
|
||||
|
||||
src8 += width;
|
||||
tex_address += TEX_ROW_ADDR_INCR(1, thisLod);
|
||||
}
|
||||
break;
|
||||
|
||||
case 2:
|
||||
for (; t <= max_t; t++) {
|
||||
LINEAR_WRITE_BEGIN(1, kLinearWriteTex,
|
||||
(FxU32)tex_address - (FxU32)gc->tex_ptr,
|
||||
0x00UL, 0x00UL);
|
||||
LINEAR_WRITE_SET_8(tex_address, (const FxU32)*(const FxU16*)src8);
|
||||
LINEAR_WRITE_END();
|
||||
|
||||
src8 += width;
|
||||
tex_address += TEX_ROW_ADDR_INCR(1, thisLod);
|
||||
}
|
||||
break;
|
||||
|
||||
case 4:
|
||||
for (; t <= max_t; t++) {
|
||||
LINEAR_WRITE_BEGIN(1, kLinearWriteTex,
|
||||
(FxU32)tex_address - (FxU32)gc->tex_ptr,
|
||||
0x00UL, 0x00UL);
|
||||
LINEAR_WRITE_SET_8(tex_address, *(const FxU32*)src8);
|
||||
LINEAR_WRITE_END();
|
||||
|
||||
src8 += width;
|
||||
tex_address += TEX_ROW_ADDR_INCR(1, thisLod);
|
||||
}
|
||||
break;
|
||||
|
||||
default: { /* >4xN texture */
|
||||
const FxU32 texAddrInc = ((sh == 3)
|
||||
? 16 /* Old TMUs */
|
||||
: 8);/* New TMUs */
|
||||
|
||||
for (; t <= max_t; t++) {
|
||||
FxU32 s;
|
||||
|
||||
tex_address = tmu_baseaddress + TEX_ROW_ADDR_INCR(t, thisLod);
|
||||
|
||||
LINEAR_WRITE_BEGIN(max_s, kLinearWriteTex,
|
||||
(FxU32)tex_address - (FxU32)gc->tex_ptr,
|
||||
0x00UL, 0x00UL);
|
||||
for (s = 0; s < max_s; s+=2) {
|
||||
const FxU32 t0 = *(const FxU32*)(src8 );
|
||||
const FxU32 t1 = *(const FxU32*)(src8 + sizeof(FxU32));
|
||||
|
||||
LINEAR_WRITE_SET_8(tex_address , t0);
|
||||
LINEAR_WRITE_SET_8(tex_address + sizeof(FxU32), t1);
|
||||
|
||||
tex_address += texAddrInc;
|
||||
src8 += (sizeof(FxU32) << 1);
|
||||
}
|
||||
LINEAR_WRITE_END();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else { /* 16-bit Textures */
|
||||
/* Hoisted initialization */
|
||||
FxU32 tex_address = tmu_baseaddress + TEX_ROW_ADDR_INCR(t, thisLod);
|
||||
const FxU16* src16 = (const FxU16*)data;
|
||||
|
||||
/* Cases 1, 2 don't need inner loops for s */
|
||||
switch(width) {
|
||||
case 1:
|
||||
for (; t <= max_t; t++) {
|
||||
LINEAR_WRITE_BEGIN(1, kLinearWriteTex,
|
||||
(FxU32)tex_address - (FxU32)gc->tex_ptr,
|
||||
0x00UL, 0x00UL);
|
||||
LINEAR_WRITE_SET_16(tex_address, (const FxU32)*(const FxU16*)src16);
|
||||
LINEAR_WRITE_END();
|
||||
|
||||
src16 += width;
|
||||
tex_address += TEX_ROW_ADDR_INCR(1, thisLod);
|
||||
}
|
||||
break;
|
||||
|
||||
case 2:
|
||||
for (; t <= max_t; t++) {
|
||||
LINEAR_WRITE_BEGIN(1, kLinearWriteTex,
|
||||
(FxU32)tex_address - (FxU32)gc->tex_ptr,
|
||||
0x00UL, 0x00UL);
|
||||
LINEAR_WRITE_SET_16(tex_address, *(const FxU32*)src16);
|
||||
LINEAR_WRITE_END();
|
||||
|
||||
src16 += width;
|
||||
tex_address += TEX_ROW_ADDR_INCR(1, thisLod);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
for (; t <= max_t; t++) {
|
||||
FxU32 s;
|
||||
|
||||
tex_address = tmu_baseaddress + TEX_ROW_ADDR_INCR(t, thisLod);
|
||||
|
||||
/* Loop unrolled to process 2 dwords per iteration */
|
||||
LINEAR_WRITE_BEGIN(max_s, kLinearWriteTex,
|
||||
(FxU32)tex_address - (FxU32)gc->tex_ptr,
|
||||
0x00UL, 0x00UL);
|
||||
for (s = 0; s < max_s; s += 2) {
|
||||
const FxU32 t0 = *(const FxU32*)(src16 );
|
||||
const FxU32 t1 = *(const FxU32*)(src16 + 2);
|
||||
|
||||
GDBG_INFO(195, "s = %d, t= %d, address = 0x%x\n",
|
||||
s, t, (FxU32) tex_address - (FxU32) gc->tex_ptr + 0x200000);
|
||||
LINEAR_WRITE_SET_16(tex_address , t0);
|
||||
LINEAR_WRITE_SET_16(tex_address + 4, t1);
|
||||
|
||||
tex_address += 8;
|
||||
src16 += 4;
|
||||
}
|
||||
|
||||
LINEAR_WRITE_END();
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------
|
||||
Restore TLOD, texMode, baseAddress
|
||||
------------------------------------------------------------*/
|
||||
REG_GROUP_BEGIN(chipId, textureMode, 3, 0x0B);
|
||||
{
|
||||
REG_GROUP_SET(hw, textureMode, gc->state.tmu_config[tmu].textureMode);
|
||||
REG_GROUP_SET(hw, tLOD, gc->state.tmu_config[tmu].tLOD);
|
||||
REG_GROUP_SET(hw, texBaseAddr, gc->state.tmu_config[tmu].texBaseAddr);
|
||||
}
|
||||
REG_GROUP_END();
|
||||
|
||||
all_done:
|
||||
_GlideRoot.stats.texDownloads++;
|
||||
#undef FN_NAME
|
||||
} /* grTexDownloadMipmapLevelPartial */
|
||||
|
||||
/*
|
||||
Let me take this opportunity to register my formal opposition to
|
||||
this function. Either we do this or we don't. Let's not hack like
|
||||
this.
|
||||
|
||||
CHD
|
||||
*/
|
||||
|
||||
GR_ENTRY(ConvertAndDownloadRle,
|
||||
void,
|
||||
(GrChipID_t tmu, FxU32 startAddress,
|
||||
GrLOD_t thisLod, GrLOD_t largeLod, GrAspectRatio_t aspectRatio,
|
||||
GrTextureFormat_t format, FxU32 evenOdd,
|
||||
FxU8 *bm_data, long bm_h,
|
||||
FxU32 u0, FxU32 v0,
|
||||
FxU32 width, FxU32 height, FxU32 dest_width, FxU32 dest_height, FxU16 *tlut))
|
||||
{
|
||||
const FifoChipField chipId = (FifoChipField)(0x02UL << tmu);
|
||||
FxI32 sh;
|
||||
FxU32 max_s,s,t,max_t,tex_address, tmu_baseaddress;
|
||||
FxU32 tLod, texMode, baseAddress,size;
|
||||
FxU32 offset,expected_size;
|
||||
unsigned long i;
|
||||
FxU16 *src;
|
||||
extern FxU16 rle_line[256]; /* diTex.c */
|
||||
extern FxU16 *rle_line_end; /* ditex.c */
|
||||
#define FN_NAME "ConvertAndDownloadRLE"
|
||||
GR_BEGIN_NOFIFOCHECK(FN_NAME, 89);
|
||||
|
||||
/* make sure even number */
|
||||
width&=0xFFFFFFFE;
|
||||
|
||||
max_s=width>>1;
|
||||
max_t=height;
|
||||
|
||||
GDBG_INFO_MORE(gc->myLevel,"(%d,0x%x, %d,%d,%d, %d,%d 0x%x, %d)\n",
|
||||
tmu,startAddress,thisLod,largeLod,aspectRatio,
|
||||
format,evenOdd,bm_data,max_t);
|
||||
|
||||
size = _grTexTextureMemRequired(thisLod, thisLod, aspectRatio, format, evenOdd);
|
||||
GR_CHECK_TMU(FN_NAME, tmu);
|
||||
GR_CHECK_F(FN_NAME, startAddress + size > gc->tmu_state[tmu].total_mem,
|
||||
"insufficient texture ram at startAddress");
|
||||
GR_CHECK_F(FN_NAME, startAddress & 0x7, "unaligned startAddress");
|
||||
GR_CHECK_F(FN_NAME, thisLod > GR_LOD_1, "thisLod invalid");
|
||||
GR_CHECK_F(FN_NAME, largeLod > GR_LOD_1, "largeLod invalid");
|
||||
GR_CHECK_F(FN_NAME, thisLod < largeLod, "thisLod may not be larger than largeLod");
|
||||
GR_CHECK_F(FN_NAME, aspectRatio > GR_ASPECT_1x8 ||
|
||||
aspectRatio < GR_ASPECT_8x1,
|
||||
"aspectRatio invalid");
|
||||
GR_CHECK_F(FN_NAME, evenOdd > 0x3 || evenOdd == 0, "evenOdd mask invalid");
|
||||
GR_CHECK_F(FN_NAME, !bm_data, "invalid data pointer");
|
||||
GR_CHECK_F(FN_NAME, (dest_height-1) >= (FxU32)_grMipMapHostWH[aspectRatio][thisLod][1],
|
||||
"invalid end row");
|
||||
|
||||
if ((startAddress < 0x200000) && (startAddress + size > 0x200000))
|
||||
GrErrorCallback("grTexDownloadMipMapLevelPartial: mipmap level cannot span 2 Mbyte boundary",
|
||||
FXTRUE);
|
||||
|
||||
/*------------------------------------------------------------
|
||||
Skip this level entirely if not in odd/even mask
|
||||
------------------------------------------------------------*/
|
||||
if (!(evenOdd & (thisLod & 0x1 ? GR_MIPMAPLEVELMASK_ODD:GR_MIPMAPLEVELMASK_EVEN)))
|
||||
goto all_done;
|
||||
|
||||
/*------------------------------------------------------------
|
||||
Compute Base Address Given Start Address Offset
|
||||
------------------------------------------------------------*/
|
||||
baseAddress = _grTexCalcBaseAddress(startAddress,
|
||||
largeLod,
|
||||
aspectRatio,
|
||||
format,
|
||||
evenOdd);
|
||||
baseAddress >>= 3;
|
||||
#if H3
|
||||
baseAddress = ((baseAddress << 3) & ~0x0F);
|
||||
#endif
|
||||
|
||||
/*------------------------------------------------------------
|
||||
Compute Physical Write Pointer
|
||||
------------------------------------------------------------*/
|
||||
tmu_baseaddress = (FxU32)gc->tex_ptr;
|
||||
tmu_baseaddress += (((FxU32)tmu)<<21) + (((FxU32)thisLod)<<17);
|
||||
|
||||
/*------------------------------------------------------------
|
||||
Compute pertinant contents of tLOD and texMode registers
|
||||
------------------------------------------------------------*/
|
||||
tLod = SST_TLOD_MINMAX_INT(largeLod, GR_LOD_1);
|
||||
tLod |= _gr_evenOdd_xlate_table[evenOdd];
|
||||
tLod |= _gr_aspect_xlate_table[aspectRatio];
|
||||
texMode = format << SST_TFORMAT_SHIFT;
|
||||
if (gc->state.tmu_config[tmu].textureMode & SST_SEQ_8_DOWNLD) {
|
||||
sh = 2;
|
||||
texMode |= SST_SEQ_8_DOWNLD;
|
||||
} else {
|
||||
sh = 3;
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------
|
||||
Update TLOD, texMode, baseAddress
|
||||
------------------------------------------------------------*/
|
||||
hw = SST_TMU(hw,tmu);
|
||||
REG_GROUP_BEGIN(chipId, textureMode, 3, 0x0B);
|
||||
{
|
||||
REG_GROUP_SET(hw, textureMode, texMode);
|
||||
REG_GROUP_SET(hw, tLOD, tLod);
|
||||
REG_GROUP_SET(hw, texBaseAddr, baseAddress);
|
||||
}
|
||||
REG_GROUP_END();
|
||||
|
||||
_GlideRoot.stats.texBytes += dest_width * (dest_height) * 2;
|
||||
|
||||
/* here I can do my writes and conversion and I will be so happy */
|
||||
offset=4+bm_h;
|
||||
for (i=0; i<v0; i++)
|
||||
offset += bm_data[4+i];
|
||||
|
||||
max_s=dest_width>>1;
|
||||
expected_size=max_s*5;
|
||||
|
||||
rle_line_end=rle_line+width+u0;
|
||||
for(t=0;t<max_t;t++) {
|
||||
tex_address = tmu_baseaddress + TEX_ROW_ADDR_INCR(t, thisLod);
|
||||
src = rle_line + u0;
|
||||
|
||||
rle_decode_line_asm(tlut,&bm_data[offset],rle_line);
|
||||
|
||||
LINEAR_WRITE_BEGIN(max_s, kLinearWriteTex,
|
||||
(FxU32)tex_address - (FxU32)gc->tex_ptr,
|
||||
0x00UL, 0x00UL);
|
||||
for(s = 0; s < max_s; s++) {
|
||||
LINEAR_WRITE_SET(tex_address + (s << 2), *(FxU32 *) src);
|
||||
src += 2;
|
||||
}
|
||||
LINEAR_WRITE_END();
|
||||
|
||||
offset+=bm_data[4+i++];
|
||||
}
|
||||
|
||||
if (dest_height>height) {
|
||||
tex_address = tmu_baseaddress + TEX_ROW_ADDR_INCR(t, thisLod);
|
||||
src=rle_line+u0;
|
||||
|
||||
LINEAR_WRITE_BEGIN(max_s, kLinearWriteTex,
|
||||
(FxU32)tex_address - (FxU32)gc->tex_ptr,
|
||||
0x00UL, 0x00UL);
|
||||
for(s = 0; s < max_s; s++) {
|
||||
LINEAR_WRITE_SET(tex_address + (s << 2), *(FxU32 *) src);
|
||||
src += 2;
|
||||
}
|
||||
LINEAR_WRITE_END();
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------
|
||||
Restore TLOD, texMode, baseAddress
|
||||
------------------------------------------------------------*/
|
||||
REG_GROUP_BEGIN(chipId, textureMode, 3, 0x0B);
|
||||
{
|
||||
REG_GROUP_SET(hw, textureMode, gc->state.tmu_config[tmu].textureMode);
|
||||
REG_GROUP_SET(hw, tLOD, gc->state.tmu_config[tmu].tLOD);
|
||||
REG_GROUP_SET(hw, texBaseAddr, gc->state.tmu_config[tmu].texBaseAddr);
|
||||
}
|
||||
REG_GROUP_END();
|
||||
|
||||
all_done:
|
||||
_GlideRoot.stats.texDownloads++;
|
||||
#undef FN_NAME
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,449 +0,0 @@
|
||||
/*
|
||||
** 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
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
*
|
||||
* 14 12/18/97 2:13p Peter
|
||||
* fogTable cataclysm
|
||||
*
|
||||
* 13 5/27/97 1:16p Peter
|
||||
* Basic cvg, w/o cmd fifo stuff.
|
||||
*
|
||||
* 12 5/21/97 6:05a Peter
|
||||
*
|
||||
* 11 3/09/97 10:31a Dow
|
||||
* Added GR_DIENTRY for di glide functions
|
||||
*
|
||||
* 10 3/05/97 9:36p Jdt
|
||||
* Added guEncodeRLE16
|
||||
*
|
||||
* 9 12/23/96 1:37p Dow
|
||||
* chagnes for multiplatform glide
|
||||
**
|
||||
*/
|
||||
|
||||
#include <3dfx.h>
|
||||
|
||||
#define FX_DLL_DEFINITION
|
||||
#include <fxdll.h>
|
||||
#include <glide.h>
|
||||
#include "fxglide.h"
|
||||
|
||||
#if ( (GLIDE_PLATFORM & GLIDE_SST_HW) && (GLIDE_PLATFORM & GLIDE_HW_SST1) )
|
||||
#include <sst1init.h>
|
||||
#endif
|
||||
|
||||
#include "fxinline.h"
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
** guAlphaSource
|
||||
*/
|
||||
GR_DIENTRY(guAlphaSource, void, ( GrAlphaSource_t mode ))
|
||||
{
|
||||
GDBG_INFO(99,"guAlphaSource(%d)\n",mode);
|
||||
switch ( mode ) {
|
||||
case GR_ALPHASOURCE_CC_ALPHA:
|
||||
grAlphaCombine( GR_COMBINE_FUNCTION_LOCAL,
|
||||
GR_COMBINE_FACTOR_NONE,
|
||||
GR_COMBINE_LOCAL_CONSTANT,
|
||||
GR_COMBINE_OTHER_NONE,
|
||||
FXFALSE );
|
||||
break;
|
||||
|
||||
case GR_ALPHASOURCE_ITERATED_ALPHA:
|
||||
grAlphaCombine( GR_COMBINE_FUNCTION_LOCAL,
|
||||
GR_COMBINE_FACTOR_NONE,
|
||||
GR_COMBINE_LOCAL_ITERATED,
|
||||
GR_COMBINE_OTHER_NONE,
|
||||
FXFALSE );
|
||||
break;
|
||||
|
||||
case GR_ALPHASOURCE_TEXTURE_ALPHA:
|
||||
grAlphaCombine( GR_COMBINE_FUNCTION_SCALE_OTHER,
|
||||
GR_COMBINE_FACTOR_ONE,
|
||||
GR_COMBINE_LOCAL_NONE,
|
||||
GR_COMBINE_OTHER_TEXTURE,
|
||||
FXFALSE );
|
||||
break;
|
||||
|
||||
case GR_ALPHASOURCE_TEXTURE_ALPHA_TIMES_ITERATED_ALPHA:
|
||||
grAlphaCombine( GR_COMBINE_FUNCTION_SCALE_OTHER,
|
||||
GR_COMBINE_FACTOR_LOCAL,
|
||||
GR_COMBINE_LOCAL_ITERATED,
|
||||
GR_COMBINE_OTHER_TEXTURE,
|
||||
FXFALSE );
|
||||
break;
|
||||
|
||||
default:
|
||||
GR_CHECK_F("grAlphaSource", 1, "unknown alpha source mode");
|
||||
break;
|
||||
}
|
||||
|
||||
/* xxx not needed at the moment, should update grFogxxx
|
||||
_grVerifyNeedForITAlpha();
|
||||
*/
|
||||
} /* guAlphaSource */
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
** guColorCombineFunction
|
||||
*/
|
||||
GR_DIENTRY(guColorCombineFunction, void, ( GrColorCombineFnc_t fnc ))
|
||||
{
|
||||
GDBG_INFO(99,"guColorCombineFunction(%d)\n",fnc);
|
||||
|
||||
/* gross hack to get ITRGB_DELTA0 modes working */
|
||||
_grColorCombineDelta0Mode( FXFALSE );
|
||||
|
||||
switch ( fnc )
|
||||
{
|
||||
case GR_COLORCOMBINE_ZERO:
|
||||
grColorCombine( GR_COMBINE_FUNCTION_ZERO, GR_COMBINE_FACTOR_NONE, GR_COMBINE_LOCAL_NONE, GR_COMBINE_OTHER_NONE, FXFALSE );
|
||||
break;
|
||||
|
||||
case GR_COLORCOMBINE_CCRGB:
|
||||
grColorCombine( GR_COMBINE_FUNCTION_LOCAL, GR_COMBINE_FACTOR_NONE, GR_COMBINE_LOCAL_CONSTANT, GR_COMBINE_OTHER_NONE, FXFALSE );
|
||||
break;
|
||||
|
||||
case GR_COLORCOMBINE_ITRGB_DELTA0:
|
||||
_grColorCombineDelta0Mode( FXTRUE );
|
||||
/* FALL THRU */
|
||||
case GR_COLORCOMBINE_ITRGB:
|
||||
grColorCombine( GR_COMBINE_FUNCTION_LOCAL, GR_COMBINE_FACTOR_NONE, GR_COMBINE_LOCAL_ITERATED, GR_COMBINE_OTHER_NONE, FXFALSE );
|
||||
break;
|
||||
|
||||
case GR_COLORCOMBINE_DECAL_TEXTURE:
|
||||
grColorCombine( GR_COMBINE_FUNCTION_SCALE_OTHER, GR_COMBINE_FACTOR_ONE, GR_COMBINE_LOCAL_NONE, GR_COMBINE_OTHER_TEXTURE, FXFALSE );
|
||||
break;
|
||||
|
||||
case GR_COLORCOMBINE_TEXTURE_TIMES_CCRGB:
|
||||
grColorCombine( GR_COMBINE_FUNCTION_SCALE_OTHER, GR_COMBINE_FACTOR_LOCAL, GR_COMBINE_LOCAL_CONSTANT, GR_COMBINE_OTHER_TEXTURE, FXFALSE );
|
||||
break;
|
||||
|
||||
case GR_COLORCOMBINE_TEXTURE_TIMES_ITRGB_DELTA0:
|
||||
_grColorCombineDelta0Mode( FXTRUE );
|
||||
/* FALL THRU */
|
||||
case GR_COLORCOMBINE_TEXTURE_TIMES_ITRGB:
|
||||
grColorCombine( GR_COMBINE_FUNCTION_SCALE_OTHER, GR_COMBINE_FACTOR_LOCAL, GR_COMBINE_LOCAL_ITERATED, GR_COMBINE_OTHER_TEXTURE, FXFALSE );
|
||||
break;
|
||||
|
||||
case GR_COLORCOMBINE_TEXTURE_TIMES_ITRGB_ADD_ALPHA:
|
||||
grColorCombine( GR_COMBINE_FUNCTION_SCALE_OTHER_ADD_LOCAL_ALPHA, GR_COMBINE_FACTOR_LOCAL, GR_COMBINE_LOCAL_ITERATED, GR_COMBINE_OTHER_TEXTURE, FXFALSE );
|
||||
break;
|
||||
|
||||
case GR_COLORCOMBINE_TEXTURE_TIMES_ALPHA:
|
||||
grColorCombine( GR_COMBINE_FUNCTION_SCALE_OTHER, GR_COMBINE_FACTOR_LOCAL_ALPHA, GR_COMBINE_LOCAL_NONE, GR_COMBINE_OTHER_TEXTURE, FXFALSE );
|
||||
break;
|
||||
|
||||
case GR_COLORCOMBINE_TEXTURE_TIMES_ALPHA_ADD_ITRGB:
|
||||
grColorCombine( GR_COMBINE_FUNCTION_SCALE_OTHER_ADD_LOCAL, GR_COMBINE_FACTOR_LOCAL_ALPHA, GR_COMBINE_LOCAL_ITERATED, GR_COMBINE_OTHER_TEXTURE, FXFALSE );
|
||||
break;
|
||||
|
||||
case GR_COLORCOMBINE_TEXTURE_ADD_ITRGB:
|
||||
grColorCombine( GR_COMBINE_FUNCTION_SCALE_OTHER_ADD_LOCAL, GR_COMBINE_FACTOR_ONE, GR_COMBINE_LOCAL_ITERATED, GR_COMBINE_OTHER_TEXTURE, FXFALSE );
|
||||
break;
|
||||
|
||||
case GR_COLORCOMBINE_TEXTURE_SUB_ITRGB:
|
||||
grColorCombine( GR_COMBINE_FUNCTION_SCALE_OTHER_MINUS_LOCAL, GR_COMBINE_FACTOR_ONE, GR_COMBINE_LOCAL_ITERATED, GR_COMBINE_OTHER_TEXTURE, FXFALSE );
|
||||
break;
|
||||
|
||||
case GR_COLORCOMBINE_CCRGB_BLEND_ITRGB_ON_TEXALPHA:
|
||||
grColorCombine( GR_COMBINE_FUNCTION_BLEND, GR_COMBINE_FACTOR_TEXTURE_ALPHA, GR_COMBINE_LOCAL_CONSTANT, GR_COMBINE_OTHER_ITERATED, FXFALSE );
|
||||
break;
|
||||
|
||||
case GR_COLORCOMBINE_DIFF_SPEC_A:
|
||||
grColorCombine( GR_COMBINE_FUNCTION_SCALE_OTHER_ADD_LOCAL, GR_COMBINE_FACTOR_LOCAL_ALPHA, GR_COMBINE_LOCAL_ITERATED, GR_COMBINE_OTHER_TEXTURE, FXFALSE );
|
||||
break;
|
||||
|
||||
case GR_COLORCOMBINE_DIFF_SPEC_B:
|
||||
grColorCombine( GR_COMBINE_FUNCTION_SCALE_OTHER_ADD_LOCAL_ALPHA, GR_COMBINE_FACTOR_LOCAL, GR_COMBINE_LOCAL_ITERATED, GR_COMBINE_OTHER_TEXTURE, FXFALSE );
|
||||
break;
|
||||
|
||||
case GR_COLORCOMBINE_ONE:
|
||||
grColorCombine( GR_COMBINE_FUNCTION_ZERO, GR_COMBINE_FACTOR_NONE, GR_COMBINE_LOCAL_NONE, GR_COMBINE_OTHER_NONE, FXTRUE );
|
||||
break;
|
||||
|
||||
default:
|
||||
GR_CHECK_F("grColorCombineFunction", 1, "unsupported color combine function");
|
||||
break;
|
||||
}
|
||||
} /* guColorCombineFunction */
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
** guEndianSwapWords
|
||||
*/
|
||||
GR_DIENTRY(guEndianSwapWords, FxU32, ( FxU32 value ))
|
||||
{
|
||||
return ( ( value & 0xFFFF0000 ) >> 16 ) | ( value << 16 );
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
** guEndianSwapBytes
|
||||
*/
|
||||
GR_DIENTRY(guEndianSwapBytes, FxU16, ( FxU16 value ))
|
||||
{
|
||||
return ( ( value & 0xFF00 ) >> 8 ) | ( value << 8 );
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
** guFogTableIndexToW
|
||||
*/
|
||||
GR_DIENTRY(guFogTableIndexToW, float, ( int i ))
|
||||
{
|
||||
return (float)pow(2.0,3.0+(double)(i>>2)) / (8-(i&3));
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
** guFogGenerateExp
|
||||
*/
|
||||
GR_DIENTRY(guFogGenerateExp, void,
|
||||
( GrFog_t fogtable[], float density ))
|
||||
{
|
||||
int i;
|
||||
float f;
|
||||
float scale;
|
||||
float dp;
|
||||
|
||||
GDBG_INFO(99,"guFogGenerateExp(0x%x,%g)\n",fogtable,density);
|
||||
dp = density * guFogTableIndexToW( kInternalFogTableEntryCount - 1 );
|
||||
scale = 1.0F / ( 1.0F - ( float ) exp( -dp ) );
|
||||
|
||||
for ( i = 0; i < kInternalFogTableEntryCount; i++ ) {
|
||||
dp = density * guFogTableIndexToW( i );
|
||||
f = ( 1.0F - ( float ) exp( -dp ) ) * scale;
|
||||
|
||||
if ( f > 1.0F )
|
||||
f = 1.0F;
|
||||
else if ( f < 0.0F )
|
||||
f = 0.0F;
|
||||
|
||||
f *= 255.0F;
|
||||
fogtable[i] = ( GrFog_t ) f;
|
||||
}
|
||||
} /* guFogGenerateExp */
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
** guFogGenerateExp2
|
||||
*/
|
||||
GR_DIENTRY(guFogGenerateExp2, void,
|
||||
( GrFog_t fogtable[], float density ))
|
||||
{
|
||||
int i;
|
||||
float f;
|
||||
float scale;
|
||||
float dp;
|
||||
|
||||
GDBG_INFO(99,"guFogGenerateExp2(0x%x,%g)\n",fogtable,density);
|
||||
dp = density * guFogTableIndexToW( kInternalFogTableEntryCount - 1 );
|
||||
scale = 1.0F / ( 1.0F - ( float ) exp( -( dp * dp ) ) );
|
||||
|
||||
for ( i = 0; i < kInternalFogTableEntryCount; i++ ) {
|
||||
dp = density * guFogTableIndexToW( i );
|
||||
f = ( 1.0F - ( float ) exp( -( dp * dp ) ) ) * scale;
|
||||
|
||||
if ( f > 1.0F )
|
||||
f = 1.0F;
|
||||
else if ( f < 0.0F )
|
||||
f = 0.0F;
|
||||
|
||||
f *= 255.0F;
|
||||
fogtable[i] = ( GrFog_t ) f;
|
||||
}
|
||||
} /* guFogGenerateExp2 */
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
** guFogGenerateLinear
|
||||
*/
|
||||
GR_DIENTRY(guFogGenerateLinear, void,
|
||||
( GrFog_t fogtable[kInternalFogTableEntryCount],
|
||||
float nearZ, float farZ ))
|
||||
{
|
||||
int i;
|
||||
float world_w;
|
||||
float f;
|
||||
|
||||
GDBG_INFO(99,"guFogGenerateLinear(0x%x,%g,%g)\n",fogtable,nearZ,farZ);
|
||||
for ( i = 0; i < kInternalFogTableEntryCount; i++ ) {
|
||||
world_w = guFogTableIndexToW( i );
|
||||
if ( world_w > 65535.0F )
|
||||
world_w = 65535.0F;
|
||||
|
||||
f = ( world_w - nearZ ) / ( farZ - nearZ );
|
||||
if ( f > 1.0F )
|
||||
f = 1.0F;
|
||||
else if ( f < 0.0F )
|
||||
f = 0.0F;
|
||||
f *= 255.0F;
|
||||
fogtable[i] = ( GrFog_t ) f;
|
||||
}
|
||||
} /* guFogGenerateLinear */
|
||||
|
||||
/*
|
||||
** setlevel
|
||||
*/
|
||||
static void
|
||||
setlevel( FxU16 *data, FxU16 color, int width, int height )
|
||||
{
|
||||
int s, t;
|
||||
|
||||
for ( t = 0; t < height; t++ )
|
||||
{
|
||||
for ( s = 0; s < width; s++ )
|
||||
{
|
||||
*data = color;
|
||||
data++;
|
||||
}
|
||||
}
|
||||
} /* setlevel */
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
** guTexCreateColorMipMap
|
||||
*/
|
||||
GR_DIENTRY(guTexCreateColorMipMap, FxU16 *, ( void ))
|
||||
{
|
||||
FxU32 memrequired;
|
||||
FxU16 *data;
|
||||
FxU16 *start;
|
||||
|
||||
GDBG_INFO(99,"guTexCreateColorMipMap()\n");
|
||||
memrequired = 2 * ( 256 * 256 + 128 * 128 + 64 * 64 + 32 * 32 + 16 * 16 + 8 * 8 + 4 * 4 + 2 * 2 + 1 * 1 );
|
||||
start = data = malloc( memrequired );
|
||||
if ( !data )
|
||||
return 0;
|
||||
|
||||
setlevel( data, 0xF800, 256, 256 );
|
||||
setlevel( data += 256*256, 0x07e0, 128, 128 );
|
||||
setlevel( data += 128*128, 0x001F, 64, 64 );
|
||||
setlevel( data += 64*64, 0xFFFF, 32, 32);
|
||||
setlevel( data += 32*32, 0x0000, 16, 16 );
|
||||
setlevel( data += 16*16, 0xF800, 8, 8);
|
||||
setlevel( data += 8*8, 0x07e0, 4, 4 );
|
||||
setlevel( data += 4*4, 0x001f, 2, 2 );
|
||||
setlevel( data += 2*2, 0xFFFF, 1, 1 );
|
||||
|
||||
return start;
|
||||
} /* guTexCreateColoMipMap */
|
||||
|
||||
/* GMT: this code used to be in the code above but I removed it for
|
||||
readability, the first section was case(1) the second section
|
||||
was a replacement for the simple 32-bit copy loop
|
||||
*/
|
||||
#if 0
|
||||
|
||||
/* GMT: from what I can tell its not bad to perform unaligned DWORD
|
||||
loads on a P5, so we use the case 2) all the time
|
||||
in fact, its twice as fast as doing aligned short copies
|
||||
*/
|
||||
if ((dstX ^ (((FxU32)src)>>1)) & 1) {
|
||||
/* case 1) a simple 16-bit copy loop */
|
||||
for (x=0; x < w; x++) {
|
||||
GR_SET16(lfbPtr[x], ((FxU16 *)src)[x]);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
/* GMT: I tried to unroll the loop but for some reason the
|
||||
code scheduling was such that it was slower
|
||||
I think it had to do with the way the 2 mov instructions paired
|
||||
Perhaps they were unaligned in the cache?
|
||||
*/
|
||||
FxU32 a,b;
|
||||
FxU32 *s = (FxU32 *)src;
|
||||
FxU32 *d = lfbPtr;
|
||||
|
||||
while (d < &lfbPtr[w-1]) {
|
||||
a = s[0];
|
||||
b = s[1];
|
||||
GR_SET(d[0], a);
|
||||
GR_SET(d[1], b);
|
||||
s += 2;
|
||||
d += 2;
|
||||
}
|
||||
if (w & 1) {
|
||||
GR_SET(d[0], s[0]);
|
||||
}
|
||||
#endif
|
||||
|
||||
/*-------------------------------------------------------------------
|
||||
Function: guEncodeRle
|
||||
Date: 3/5/96
|
||||
Implementor(s): jdt
|
||||
Library: Glide Utilities
|
||||
Description:
|
||||
Encode an RGB565 image into RLE16 format
|
||||
Arguments:
|
||||
dst - destination rle image data ( NULL for bytecount only )
|
||||
src - source rgb565 image data
|
||||
width - width of source data
|
||||
height - height of source data
|
||||
Return:
|
||||
number of bytes in encoded rle image
|
||||
-------------------------------------------------------------------*/
|
||||
GR_ENTRY( guEncodeRLE16, int, ( void *dst, void *src, FxU32 width, FxU32 height ))
|
||||
{
|
||||
int byteCount = 0;
|
||||
int sourceImageSizeInWords;
|
||||
FxU16 *srcPixels;
|
||||
FxU32 *dstPixels;
|
||||
|
||||
sourceImageSizeInWords = width * height;
|
||||
|
||||
srcPixels = src;
|
||||
|
||||
if ( dst ) {
|
||||
dstPixels = dst;
|
||||
while( sourceImageSizeInWords-- ) {
|
||||
short length = 1;
|
||||
short color = *srcPixels;
|
||||
int lookAhead = 1;
|
||||
|
||||
while( (sourceImageSizeInWords-length)&&
|
||||
(color == srcPixels[lookAhead]) ) {
|
||||
length++;
|
||||
lookAhead++;
|
||||
}
|
||||
|
||||
*dstPixels = ((((FxU32)length)<<16) | ((FxU32)color));
|
||||
dstPixels++;
|
||||
|
||||
byteCount+=4;
|
||||
|
||||
srcPixels+=length;
|
||||
sourceImageSizeInWords-=length;
|
||||
}
|
||||
} else {
|
||||
while( sourceImageSizeInWords-- ) {
|
||||
short length = 1;
|
||||
short color = *srcPixels;
|
||||
int lookAhead = 1;
|
||||
|
||||
while( (sourceImageSizeInWords-length)&&
|
||||
(color == srcPixels[lookAhead]) ) {
|
||||
length++;
|
||||
lookAhead++;
|
||||
}
|
||||
|
||||
byteCount+=4;
|
||||
srcPixels+=length;
|
||||
sourceImageSizeInWords-=length;
|
||||
}
|
||||
}
|
||||
return byteCount;
|
||||
}
|
||||
@@ -1,444 +0,0 @@
|
||||
/*
|
||||
** 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
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
*
|
||||
* 12 12/15/97 5:52p Atai
|
||||
* disable obsolete glide2 api for glide3
|
||||
*
|
||||
* 11 12/09/97 12:20p Peter
|
||||
* mac glide port
|
||||
*
|
||||
* 10 12/08/97 12:06p Atai
|
||||
* change prototype for grDrawPoint, grDrawLine, grDrawTriangel
|
||||
*
|
||||
* 9 8/18/97 3:52p Peter
|
||||
* pre-hw arrival fixes/cleanup
|
||||
*
|
||||
* 8 7/31/97 11:14a Peter
|
||||
* merge w/ sst1 glide tree, hopefully
|
||||
*
|
||||
* 5 6/27/97 4:16p Atai
|
||||
* fixed guDrawTriangleWithClip bug (#484) by removing +1.0F and -1.0F in
|
||||
* intersectTop(), intersectBottom(), intersectLeft(), and
|
||||
* intersectRight() routine
|
||||
*
|
||||
* 4 3/09/97 10:31a Dow
|
||||
* Added GR_DIENTRY for di glide functions
|
||||
**
|
||||
*/
|
||||
|
||||
#include <3dfx.h>
|
||||
|
||||
#define FX_DLL_DEFINITION
|
||||
#include <fxdll.h>
|
||||
#include <glide.h>
|
||||
#include "fxglide.h"
|
||||
|
||||
/* Moved per GMT cleanup */
|
||||
#define GU_PRIM_MAX_VERTICES 100
|
||||
|
||||
static void
|
||||
calcParams(const GrVertex *a, const GrVertex *b, GrVertex *isect, float d)
|
||||
{
|
||||
GR_DCL_GC;
|
||||
if (gc->state.paramIndex & STATE_REQUIRES_IT_DRGB) {
|
||||
isect->r = a->r + d * ( b->r - a->r );
|
||||
isect->g = a->g + d * ( b->g - a->g );
|
||||
isect->b = a->b + d * ( b->b - a->b );
|
||||
}
|
||||
|
||||
if (gc->state.paramIndex & STATE_REQUIRES_IT_ALPHA) {
|
||||
isect->a = a->a + d * ( b->a - a->a );
|
||||
}
|
||||
|
||||
if (gc->state.paramIndex & STATE_REQUIRES_OOZ) {
|
||||
isect->ooz = a->ooz + d * ( b->ooz - a->ooz );
|
||||
}
|
||||
|
||||
if (gc->state.paramIndex & STATE_REQUIRES_OOW_FBI) {
|
||||
isect->oow = a->oow + d * ( b->oow - a->oow);
|
||||
}
|
||||
|
||||
if (gc->state.paramIndex & STATE_REQUIRES_ST_TMU0) {
|
||||
isect->tmuvtx[0].oow =
|
||||
a->tmuvtx[0].oow + d * ( b->tmuvtx[0].oow - a->tmuvtx[0].oow );
|
||||
isect->tmuvtx[0].sow =
|
||||
a->tmuvtx[0].sow + d * ( b->tmuvtx[0].sow - a->tmuvtx[0].sow );
|
||||
isect->tmuvtx[0].tow =
|
||||
a->tmuvtx[0].tow + d * ( b->tmuvtx[0].tow - a->tmuvtx[0].tow );
|
||||
}
|
||||
|
||||
if (gc->state.paramIndex & STATE_REQUIRES_ST_TMU1) {
|
||||
isect->tmuvtx[1].oow =
|
||||
a->tmuvtx[1].oow + d * ( b->tmuvtx[1].oow - a->tmuvtx[1].oow );
|
||||
isect->tmuvtx[1].sow =
|
||||
a->tmuvtx[1].sow + d * ( b->tmuvtx[1].sow - a->tmuvtx[1].sow );
|
||||
isect->tmuvtx[1].tow =
|
||||
a->tmuvtx[1].tow + d * ( b->tmuvtx[1].tow - a->tmuvtx[1].tow );
|
||||
}
|
||||
|
||||
#if (GLIDE_NUM_TMU > 2)
|
||||
if (gc->state.paramIndex & STATE_REQUIRES_ST_TMU2) {
|
||||
isect->tmuvtx[2].oow =
|
||||
a->tmuvtx[2].oow + d * ( b->tmuvtx[2].oow - a->tmuvtx[2].oow );
|
||||
isect->tmuvtx[2].sow =
|
||||
a->tmuvtx[2].sow + d * ( b->tmuvtx[2].sow - a->tmuvtx[2].sow );
|
||||
isect->tmuvtx[2].tow =
|
||||
a->tmuvtx[2].tow + d * ( b->tmuvtx[2].tow - a->tmuvtx[2].tow );
|
||||
}
|
||||
#endif
|
||||
|
||||
} /* calcParams */
|
||||
|
||||
static void
|
||||
intersectTop( const GrVertex *a, const GrVertex *b, GrVertex *intersect )
|
||||
{
|
||||
GR_DCL_GC;
|
||||
float
|
||||
d = ( gc->state.clipwindowf_ymin - a->y ) / ( b->y - a->y );
|
||||
|
||||
intersect->x = a->x + d * ( b->x - a->x );
|
||||
intersect->y = gc->state.clipwindowf_ymin;
|
||||
|
||||
calcParams(a, b, intersect, d);
|
||||
|
||||
} /* intersectTop */
|
||||
|
||||
static void
|
||||
intersectBottom( const GrVertex *a, const GrVertex *b, GrVertex *intersect )
|
||||
{
|
||||
GR_DCL_GC;
|
||||
float
|
||||
d = ( gc->state.clipwindowf_ymax - a->y ) / ( b->y - a->y );
|
||||
|
||||
intersect->x = a->x + d * ( b->x - a->x );
|
||||
intersect->y = gc->state.clipwindowf_ymax;
|
||||
|
||||
calcParams(a, b, intersect, d);
|
||||
|
||||
} /* intersectBottom */
|
||||
|
||||
static void
|
||||
intersectRight( const GrVertex *a, const GrVertex *b, GrVertex *intersect )
|
||||
{
|
||||
GR_DCL_GC;
|
||||
float
|
||||
d = ( gc->state.clipwindowf_xmax - a->x ) / ( b->x - a->x );
|
||||
|
||||
intersect->x = gc->state.clipwindowf_xmax;
|
||||
intersect->y = a->y + d * ( b->y - a->y );
|
||||
|
||||
calcParams(a, b, intersect, d);
|
||||
|
||||
} /* intersectRight */
|
||||
|
||||
static void
|
||||
intersectLeft( const GrVertex *a, const GrVertex *b, GrVertex *intersect )
|
||||
{
|
||||
GR_DCL_GC;
|
||||
float
|
||||
d = ( gc->state.clipwindowf_xmin - a->x ) / ( b->x - a->x );
|
||||
|
||||
intersect->x = gc->state.clipwindowf_xmin;
|
||||
intersect->y = a->y + d * ( b->y - a->y );
|
||||
|
||||
calcParams(a, b, intersect, d);
|
||||
|
||||
} /* intersectLeft */
|
||||
|
||||
static FxBool
|
||||
aboveYMin(const GrVertex *p)
|
||||
{
|
||||
GR_DCL_GC;
|
||||
return (( p->y > gc->state.clipwindowf_ymin ) ? FXTRUE : FXFALSE);
|
||||
} /* aboveYMin */
|
||||
|
||||
|
||||
static FxBool
|
||||
belowYMax(const GrVertex *p)
|
||||
{
|
||||
GR_DCL_GC;
|
||||
return (( p->y < gc->state.clipwindowf_ymax ) ? FXTRUE : FXFALSE);
|
||||
} /* belowYMax */
|
||||
|
||||
static FxBool
|
||||
aboveXMin(const GrVertex *p)
|
||||
{
|
||||
GR_DCL_GC;
|
||||
return (( p->x > gc->state.clipwindowf_xmin ) ? FXTRUE : FXFALSE );
|
||||
} /* aboveXMin */
|
||||
|
||||
static FxBool
|
||||
belowXMax(const GrVertex *p)
|
||||
{
|
||||
GR_DCL_GC;
|
||||
return (( p->x < gc->state.clipwindowf_xmax ) ? FXTRUE : FXFALSE );
|
||||
} /* belowXMax */
|
||||
|
||||
/*
|
||||
** shClipPolygon
|
||||
*/
|
||||
static void
|
||||
shClipPolygon(
|
||||
const GrVertex invertexarray[],
|
||||
GrVertex outvertexarray[],
|
||||
int inlength, int *outlength,
|
||||
FxBool (*inside)(const GrVertex *p),
|
||||
void (*intersect)(
|
||||
const GrVertex *a,
|
||||
const GrVertex *b,
|
||||
GrVertex *intersect )
|
||||
)
|
||||
{
|
||||
GrVertex
|
||||
s, p /*, intersection */;
|
||||
int
|
||||
j;
|
||||
|
||||
*outlength = 0;
|
||||
|
||||
s = invertexarray[inlength-1];
|
||||
for ( j = 0; j < inlength; j++ ) {
|
||||
p = invertexarray[j];
|
||||
if ( inside( &p ) ) {
|
||||
if ( inside( &s ) ) {
|
||||
outvertexarray[*outlength] = p;
|
||||
(*outlength)++;
|
||||
}else {
|
||||
#if 0
|
||||
intersect( &s, &p, &intersection );
|
||||
outvertexarray[*outlength] = intersection;
|
||||
#else
|
||||
intersect( &s, &p, &outvertexarray[*outlength] );
|
||||
#endif
|
||||
(*outlength)++;
|
||||
outvertexarray[*outlength] = p;
|
||||
(*outlength)++;
|
||||
}
|
||||
} else {
|
||||
if ( inside( &s ) ) {
|
||||
#if 0
|
||||
intersect( &s, &p, &intersection );
|
||||
outvertexarray[*outlength] = intersection;
|
||||
#else
|
||||
intersect( &s, &p, &outvertexarray[*outlength] );
|
||||
#endif
|
||||
(*outlength)++;
|
||||
}
|
||||
}
|
||||
s = p;
|
||||
}
|
||||
} /* shClipPolygon */
|
||||
|
||||
#ifndef GLIDE3_ALPHA
|
||||
/*---------------------------------------------------------------------------
|
||||
** guDrawTriangleWithClip
|
||||
**
|
||||
** NOTE: This routine snaps vertices by adding a large number then
|
||||
** subtracting that same number again. In order for this to work
|
||||
** you MUST set up the FPU to work in single precision mode. Code
|
||||
** to perform this is listed in the Appendix to the Glide Programmer's
|
||||
** Guide.
|
||||
*/
|
||||
static const float vertex_snap_constant = ( float ) ( 1L << 19 );
|
||||
|
||||
GR_DIENTRY(guDrawTriangleWithClip, void,
|
||||
(const GrVertex *a, const GrVertex *b, const GrVertex *c ))
|
||||
{
|
||||
GR_DCL_GC;
|
||||
GrVertex
|
||||
output_array[8],
|
||||
output_array2[8],
|
||||
input_array[3];
|
||||
int
|
||||
i,
|
||||
outlength;
|
||||
|
||||
GDBG_INFO_MORE(99,"guDrawTriangleWithClip(0x%x,0x%x,0x%x)\n",a,b,c);
|
||||
|
||||
/*
|
||||
** perform trivial accept
|
||||
*/
|
||||
if (
|
||||
( a->x >= gc->state.clipwindowf_xmin) &&
|
||||
( a->x < gc->state.clipwindowf_xmax ) &&
|
||||
( a->y >= gc->state.clipwindowf_ymin ) &&
|
||||
( a->y < gc->state.clipwindowf_ymax ) &&
|
||||
( b->x >= gc->state.clipwindowf_xmin ) &&
|
||||
( b->x < gc->state.clipwindowf_xmax ) &&
|
||||
( b->y >= gc->state.clipwindowf_ymin ) &&
|
||||
( b->y < gc->state.clipwindowf_ymax ) &&
|
||||
( c->x >= gc->state.clipwindowf_xmin ) &&
|
||||
( c->x < gc->state.clipwindowf_xmax ) &&
|
||||
( c->y >= gc->state.clipwindowf_ymin ) &&
|
||||
( c->y < gc->state.clipwindowf_ymax )
|
||||
)
|
||||
{
|
||||
#ifdef GLIDE3
|
||||
grDrawTriangle( (void *)a, (void *)b, (void *)c );
|
||||
#else
|
||||
grDrawTriangle( a, b, c );
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
** go ahead and clip and render
|
||||
*/
|
||||
input_array[0] = *a;
|
||||
input_array[1] = *b;
|
||||
input_array[2] = *c;
|
||||
|
||||
shClipPolygon( input_array, output_array, 3, &outlength, belowXMax, intersectRight );
|
||||
shClipPolygon( output_array, output_array2, outlength, &outlength, belowYMax, intersectBottom );
|
||||
shClipPolygon( output_array2, output_array, outlength, &outlength, aboveXMin, intersectLeft );
|
||||
shClipPolygon( output_array, output_array2, outlength, &outlength, aboveYMin, intersectTop );
|
||||
|
||||
/*
|
||||
** snap vertices then decompose the n-gon into triangles
|
||||
*/
|
||||
#if defined ( __WATCOMC__ ) || defined ( __MSC__ ) || defined(__DJGPP__) || \
|
||||
defined(__GNUC__) || defined(__MWERKS__)
|
||||
for ( i = 0; i < outlength; i++ ) {
|
||||
output_array2[i].x += vertex_snap_constant;
|
||||
output_array2[i].x -= vertex_snap_constant;
|
||||
output_array2[i].y += vertex_snap_constant;
|
||||
output_array2[i].y -= vertex_snap_constant;
|
||||
}
|
||||
#else
|
||||
# error VERTEX SNAPPING MUST BE IMPLEMENTED FOR THIS COMPILER
|
||||
#endif
|
||||
grDrawPolygonVertexList( outlength, output_array2 );
|
||||
} /* guDrawTriangleWithClip */
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
** guAADrawTriangleWithClip
|
||||
*/
|
||||
GR_DIENTRY(guAADrawTriangleWithClip, void,
|
||||
(const GrVertex *a, const GrVertex *b, const GrVertex *c ))
|
||||
{
|
||||
GR_DCL_GC;
|
||||
GrVertex
|
||||
output_array[8],
|
||||
output_array2[8],
|
||||
input_array[3];
|
||||
int
|
||||
i,
|
||||
ilist[10],
|
||||
outlength;
|
||||
|
||||
GDBG_INFO_MORE(99,"guAADrawTriangleWithClip(0x%x,0x%x,0x%x)\n",a,b,c);
|
||||
|
||||
/*
|
||||
** perform trivial accept
|
||||
*/
|
||||
if (
|
||||
( a->x >= gc->state.clipwindowf_xmin) &&
|
||||
( a->x < gc->state.clipwindowf_xmax ) &&
|
||||
( a->y >= gc->state.clipwindowf_ymin ) &&
|
||||
( a->y < gc->state.clipwindowf_ymax ) &&
|
||||
( b->x >= gc->state.clipwindowf_xmin ) &&
|
||||
( b->x < gc->state.clipwindowf_xmax ) &&
|
||||
( b->y >= gc->state.clipwindowf_ymin ) &&
|
||||
( b->y < gc->state.clipwindowf_ymax ) &&
|
||||
( c->x >= gc->state.clipwindowf_xmin ) &&
|
||||
( c->x < gc->state.clipwindowf_xmax ) &&
|
||||
( c->y >= gc->state.clipwindowf_ymin ) &&
|
||||
( c->y < gc->state.clipwindowf_ymax )
|
||||
)
|
||||
{
|
||||
grAADrawTriangle( a, b, c, FXTRUE, FXTRUE, FXTRUE );
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
** go ahead and clip and render
|
||||
*/
|
||||
input_array[0] = *a;
|
||||
input_array[1] = *b;
|
||||
input_array[2] = *c;
|
||||
|
||||
shClipPolygon( input_array, output_array, 3, &outlength, belowXMax, intersectRight );
|
||||
shClipPolygon( output_array, output_array2, outlength, &outlength, belowYMax, intersectBottom );
|
||||
shClipPolygon( output_array2, output_array, outlength, &outlength, aboveXMin, intersectLeft );
|
||||
shClipPolygon( output_array, output_array2, outlength, &outlength, aboveYMin, intersectTop );
|
||||
|
||||
/*
|
||||
** snap vertices then decompose the n-gon into triangles
|
||||
*/
|
||||
#if defined(__WATCOMC__) || defined(__MSC__) || defined (__DJGPP__) || \
|
||||
defined(__GNUC__) || defined(__MWERKS__)
|
||||
for ( i = 0; i < outlength; i++ ) {
|
||||
output_array2[i].x += vertex_snap_constant;
|
||||
output_array2[i].x -= vertex_snap_constant;
|
||||
output_array2[i].y += vertex_snap_constant;
|
||||
output_array2[i].y -= vertex_snap_constant;
|
||||
ilist[i] = i;
|
||||
}
|
||||
|
||||
ilist[outlength] = 0;
|
||||
#else
|
||||
# error VERTEX SNAPPING MUST BE IMPLEMENTED FOR THIS COMPILER
|
||||
#endif
|
||||
grAADrawPolygon( outlength, ilist, output_array2 );
|
||||
} /* guAADrawTriangleWithClip */
|
||||
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
** guDrawPolygonVertexListWithClip
|
||||
*/
|
||||
GR_DIENTRY(guDrawPolygonVertexListWithClip, void,
|
||||
( int nverts, const GrVertex vlist[] ))
|
||||
{
|
||||
GrVertex
|
||||
output_array[GU_PRIM_MAX_VERTICES+8],
|
||||
output_array2[GU_PRIM_MAX_VERTICES+8];
|
||||
int
|
||||
i,
|
||||
outlength;
|
||||
|
||||
GDBG_INFO_MORE(99,"guDrawPolygonVertexListWithClip(%d,0x%x)\n",nverts,vlist);
|
||||
/*
|
||||
** go ahead and clip and render
|
||||
*/
|
||||
shClipPolygon( vlist, output_array, nverts, &outlength, belowXMax, intersectRight );
|
||||
shClipPolygon( output_array, output_array2, outlength, &outlength, belowYMax, intersectBottom );
|
||||
shClipPolygon( output_array2, output_array, outlength, &outlength, aboveXMin, intersectLeft );
|
||||
shClipPolygon( output_array, output_array2, outlength, &outlength, aboveYMin, intersectTop );
|
||||
|
||||
/*
|
||||
** snap vertices then decompose the n-gon into triangles
|
||||
*/
|
||||
#if defined(__WATCOMC__) || defined(__MSC__) || defined(__DJGPP__) || \
|
||||
defined(__GNUC__) || defined(__MWERKS__)
|
||||
for ( i = 0; i < outlength; i++ ) {
|
||||
output_array2[i].x += vertex_snap_constant;
|
||||
output_array2[i].x -= vertex_snap_constant;
|
||||
output_array2[i].y += vertex_snap_constant;
|
||||
output_array2[i].y -= vertex_snap_constant;
|
||||
}
|
||||
#else
|
||||
# error VERTEX SNAPPING MUST BE IMPLEMENTED FOR THIS COMPILER
|
||||
#endif
|
||||
grDrawPolygonVertexList( outlength, output_array2 );
|
||||
} /* guDrawPolygonVertexListWithClip */
|
||||
|
||||
#endif /* !GLIDE3_ALPHA */
|
||||
@@ -1,105 +0,0 @@
|
||||
/*
|
||||
** 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
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
*
|
||||
* 10 12/09/97 12:20p Peter
|
||||
* mac glide port
|
||||
*
|
||||
* 9 11/12/97 5:12p Pgj
|
||||
* stubs for evil guFb{Read|Write}Region() calls
|
||||
*
|
||||
* 8 5/27/97 1:16p Peter
|
||||
* Basic cvg, w/o cmd fifo stuff.
|
||||
*
|
||||
* 7 5/21/97 6:05a Peter
|
||||
*
|
||||
* 6 3/09/97 10:31a Dow
|
||||
* Added GR_DIENTRY for di glide functions
|
||||
*
|
||||
* 5 12/23/96 1:37p Dow
|
||||
* chagnes for multiplatform glide
|
||||
**
|
||||
*/
|
||||
|
||||
/* Implements multipass drawing */
|
||||
|
||||
#include <3dfx.h>
|
||||
#define FX_DLL_DEFINITION
|
||||
#include <fxdll.h>
|
||||
#include <glide.h>
|
||||
#include "fxglide.h"
|
||||
#include "gump.h"
|
||||
|
||||
/* CHD BUG this belongs in fxglide.h */
|
||||
void FX_CSTYLE
|
||||
_gumpTexCombineFunction( int virtual_tmu );
|
||||
|
||||
GrMPState _gumpState;
|
||||
|
||||
GR_DIENTRY(guMPInit, void, ( void ))
|
||||
{
|
||||
int i;
|
||||
|
||||
GDBG_INFO(98,"guMPInit()\n");
|
||||
for (i = 0; i < GLIDE_NUM_VIRTUAL_TMU; i += 1)
|
||||
{
|
||||
_gumpState.mmid[i] = (GrMipMapId_t) GR_NULL_MIPMAP_HANDLE;
|
||||
}
|
||||
_gumpState.tc_fnc = GR_MPTEXTURECOMBINE_ADD;
|
||||
}
|
||||
|
||||
GR_DIENTRY(guMPTexCombineFunction, void,
|
||||
( GrMPTextureCombineFnc_t tc_fnc ))
|
||||
{
|
||||
GDBG_INFO(98,"guMPTexCombineFunction(%d)\n",tc_fnc);
|
||||
_gumpState.tc_fnc = tc_fnc;
|
||||
}
|
||||
|
||||
GR_DIENTRY(guMPTexSource, void,
|
||||
( GrChipID_t virtual_tmu, GrMipMapId_t mmid ))
|
||||
{
|
||||
GR_DCL_GC;
|
||||
FXUNUSED( gc );
|
||||
GDBG_INFO(98,"guMPTexSource(%d,%d)\n",virtual_tmu,mmid);
|
||||
GR_CHECK_TMU("guMPTexSource",virtual_tmu);
|
||||
_gumpState.mmid[virtual_tmu] = mmid;
|
||||
}
|
||||
|
||||
extern FX_ENTRY void FX_CALL
|
||||
guFbReadRegion( const int srcX, const int srcY, const int w, const int h, const void *dst, const int strideInBytes );
|
||||
|
||||
extern FX_ENTRY void FX_CALL
|
||||
guFbWriteRegion( const int dstX, const int dstY, const int w, const int h, const void *src, const int strideInBytes);
|
||||
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
** guFbReadRegion XXX obsolete
|
||||
*/
|
||||
GR_ENTRY(guFbReadRegion, void, ( const int srcX, const int srcY, const int w, const int h, const void *dst, const int strideInBytes ) )
|
||||
{
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
** guFbWriteRegion XXX obsolete
|
||||
*/
|
||||
GR_ENTRY(guFbWriteRegion, void, ( const int dstX, const int dstY, const int w, const int h, const void *src, const int strideInBytes))
|
||||
{
|
||||
}
|
||||
@@ -1,59 +0,0 @@
|
||||
/*
|
||||
** 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
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
**
|
||||
*/
|
||||
|
||||
/* Multipass drawing */
|
||||
|
||||
#ifndef __GUMP_H__
|
||||
#define __GUMP_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define GLIDE_NUM_VIRTUAL_TMU 2 /* Number of virtual TMUs */
|
||||
|
||||
typedef FxU32 GrMPTextureCombineFnc_t;
|
||||
#define GR_MPTEXTURECOMBINE_ADD 0x0 /* */
|
||||
#define GR_MPTEXTURECOMBINE_MULTIPLY 0x1 /* */
|
||||
#define GR_MPTEXTURECOMBINE_DETAIL0 0x2 /* */
|
||||
#define GR_MPTEXTURECOMBINE_DETAIL1 0x3 /* */
|
||||
#define GR_MPTEXTURECOMBINE_TRILINEAR0 0x4 /* */
|
||||
#define GR_MPTEXTURECOMBINE_TRILINEAR1 0x5 /* */
|
||||
#define GR_MPTEXTURECOMBINE_SUBTRACT 0x6 /* */
|
||||
|
||||
typedef struct {
|
||||
GrMipMapId_t mmid[GLIDE_NUM_VIRTUAL_TMU];
|
||||
GrMPTextureCombineFnc_t tc_fnc;
|
||||
} GrMPState;
|
||||
|
||||
FX_ENTRY void FX_CALL guMPInit( void );
|
||||
FX_ENTRY void FX_CALL guMPTexCombineFunction( GrMPTextureCombineFnc_t tc );
|
||||
FX_ENTRY void FX_CALL guMPTexSource( GrChipID_t virtual_tmu, GrMipMapId_t mmid );
|
||||
FX_ENTRY void FX_CALL guMPDrawTriangle( const GrVertex *a, const GrVertex *b, const GrVertex *c );
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __GUMP_H__ */
|
||||
@@ -1,211 +0,0 @@
|
||||
/*
|
||||
** 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
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
**
|
||||
** 22 2/20/98 5:31p Peter
|
||||
** crybaby glide
|
||||
**
|
||||
** 21 2/20/98 11:00a Peter
|
||||
** removed glide3 from glid2 tree
|
||||
*
|
||||
* 20 1/07/98 10:22a Peter
|
||||
* lod dithering env var
|
||||
*
|
||||
* 19 1/06/98 6:47p Atai
|
||||
* undo grSplash and remove gu routines
|
||||
*
|
||||
* 18 12/17/97 4:45p Peter
|
||||
* groundwork for CrybabyGlide
|
||||
*
|
||||
* 17 12/02/97 9:49a Dow
|
||||
* rid the world of the "Setting the same state twice" message
|
||||
*
|
||||
* 16 11/20/97 6:59p Dow
|
||||
* Fixed baseAddress for Banshee (the Devil's Own Test still uses guTex
|
||||
* Stuff).
|
||||
*
|
||||
* 15 11/18/97 4:36p Peter
|
||||
* chipfield stuff cleanup and w/ direct writes
|
||||
*
|
||||
* 14 11/17/97 4:55p Peter
|
||||
* watcom warnings/chipfield stuff
|
||||
*
|
||||
* 13 11/03/97 3:43p Peter
|
||||
* h3/cvg cataclysm
|
||||
*
|
||||
* 12 9/15/97 7:31p Peter
|
||||
* more cmdfifo cleanup, fixed normal buffer clear, banner in the right
|
||||
* place, lfb's are on, Hmmmm.. probably more
|
||||
*
|
||||
* 11 9/04/97 3:32p Peter
|
||||
* starting grouping serial reg writes
|
||||
*
|
||||
* 10 6/06/97 10:47a Peter
|
||||
* texture downloading, fixed 640x480 dimension, changed cvg dep to be the
|
||||
* same as sst1
|
||||
*
|
||||
* 9 5/27/97 1:16p Peter
|
||||
* Basic cvg, w/o cmd fifo stuff.
|
||||
*
|
||||
* 8 5/21/97 6:05a Peter
|
||||
*
|
||||
* 7 3/04/97 9:08p Dow
|
||||
*
|
||||
* 6 12/23/96 1:37p Dow
|
||||
* chagnes for multiplatform glide
|
||||
*
|
||||
* 5 11/18/96 9:14a Sellers
|
||||
* added checking for crossing of 2 MByte texture boundry
|
||||
**
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
#include <3dfx.h>
|
||||
#define FX_DLL_DEFINITION
|
||||
#include <fxdll.h>
|
||||
#include <glide.h>
|
||||
#include "fxglide.h"
|
||||
|
||||
/* externals from gtex.c and gtexdl.c */
|
||||
extern FxU32 _grMipMapHostSize[][16];
|
||||
extern FxU32 _gr_aspect_index_table[];
|
||||
extern FxU32 _gr_aspect_xlate_table[];
|
||||
extern FxU32 _gr_evenOdd_xlate_table[];
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
** guTexSource
|
||||
*/
|
||||
|
||||
GR_ENTRY(guTexSource, void, (GrMipMapId_t mmid))
|
||||
{
|
||||
#define FN_NAME "guTexSource"
|
||||
FxU32 texMode, tLod;
|
||||
FxU32 oldtexMode;
|
||||
FxU32 baseAddress;
|
||||
int tmu;
|
||||
const GrMipMapInfo *mminfo;
|
||||
|
||||
GR_BEGIN_NOFIFOCHECK("guTexSource",99);
|
||||
GDBG_INFO_MORE(gc->myLevel,"(%d)\n",mmid);
|
||||
|
||||
/* Make sure that mmid is not NULL */
|
||||
if (mmid == GR_NULL_MIPMAP_HANDLE) return;
|
||||
|
||||
/* get a pointer to the relevant GrMipMapInfo struct */
|
||||
mminfo = &gc->mm_table.data[mmid];
|
||||
tmu = mminfo->tmu;
|
||||
|
||||
GR_CHECK_TMU(FN_NAME, tmu);
|
||||
|
||||
gc->state.current_mm[tmu] = mmid;
|
||||
|
||||
/* Set up new glide state for this mmid */
|
||||
gc->state.tmu_config[tmu].mmMode = mminfo->mipmap_mode;
|
||||
gc->state.tmu_config[tmu].smallLod = mminfo->lod_min;
|
||||
gc->state.tmu_config[tmu].largeLod = mminfo->lod_max;
|
||||
gc->state.tmu_config[tmu].evenOdd = mminfo->odd_even_mask;
|
||||
gc->state.tmu_config[tmu].nccTable = 0;
|
||||
|
||||
/* Set up base address, texMode, and tLod registers */
|
||||
#if (GLIDE_PLATFORM & GLIDE_HW_H3)
|
||||
baseAddress = mminfo->tmu_base_address + 0x200000;
|
||||
#else
|
||||
baseAddress = mminfo->tmu_base_address >> 3;
|
||||
#endif
|
||||
texMode = mminfo->tTextureMode;
|
||||
tLod = mminfo->tLOD;
|
||||
|
||||
oldtexMode = gc->state.tmu_config[tmu].textureMode;
|
||||
oldtexMode &= ~(SST_TFORMAT | SST_TCLAMPT |
|
||||
SST_TCLAMPS | SST_TNCCSELECT |
|
||||
SST_TLODDITHER | SST_TCLAMPW |
|
||||
SST_TMAGFILTER | SST_TMINFILTER |
|
||||
SST_TRILINEAR);
|
||||
texMode |= oldtexMode;
|
||||
if (!gc->state.allowLODdither) texMode &= ~SST_TLODDITHER;
|
||||
|
||||
/* Download the NCC table, if needed. */
|
||||
if ((mminfo->format == GR_TEXFMT_YIQ_422) ||
|
||||
(mminfo->format == GR_TEXFMT_AYIQ_8422)) {
|
||||
int table; /* ncc table we'll use */
|
||||
|
||||
/* See if it's already down there */
|
||||
if (gc->tmu_state[tmu].ncc_mmids[0] == mmid) {
|
||||
/* Table 0 has what we need, so make it current */
|
||||
table = 0;
|
||||
} else if (gc->tmu_state[tmu].ncc_mmids[1] == mmid) {
|
||||
/* Table 1 has what we need, so make it current */
|
||||
table = 1;
|
||||
} else {
|
||||
/*
|
||||
** it's not down there, so we need to pick the table and
|
||||
** download it
|
||||
*/
|
||||
/* Which table should we use? */
|
||||
table = gc->tmu_state[tmu].next_ncc_table;
|
||||
|
||||
/* Download NCC table */
|
||||
_grTexDownloadNccTable(tmu, table, &mminfo->ncc_table, 0, 11);
|
||||
|
||||
/* Set the mmid so we known it's down there */
|
||||
gc->tmu_state[tmu].ncc_mmids[table] = mmid;
|
||||
|
||||
/* Set the state to know which table was the LRA */
|
||||
gc->tmu_state[tmu].next_ncc_table = (table == 0 ? 1 : 0);
|
||||
} /* we had to download it */
|
||||
|
||||
/*
|
||||
** Setting the TNCCSelect bit to 0 selects table 0, setting it to 1
|
||||
** selects table 1
|
||||
*/
|
||||
if (table == 0)
|
||||
texMode &= ~(SST_TNCCSELECT);
|
||||
else
|
||||
texMode |= SST_TNCCSELECT;
|
||||
} /* if it's an NCC texture */
|
||||
|
||||
/* Force LOD dithering if the user asked for it.
|
||||
*
|
||||
* NB: There is a performance hit for this, but it does
|
||||
* look better.
|
||||
*/
|
||||
texMode |= _GlideRoot.environment.texLodDither;
|
||||
|
||||
/* Write relevant registers out to hardware */
|
||||
hw = SST_TMU(hw, tmu);
|
||||
REG_GROUP_BEGIN((0x02UL << tmu), textureMode, 3, 0x0B);
|
||||
{
|
||||
REG_GROUP_SET(hw, textureMode, texMode);
|
||||
REG_GROUP_SET(hw, tLOD, tLod);
|
||||
REG_GROUP_SET(hw, texBaseAddr, baseAddress);
|
||||
}
|
||||
REG_GROUP_END();
|
||||
|
||||
/* update shadows */
|
||||
gc->state.tmu_config[tmu].texBaseAddr = baseAddress;
|
||||
gc->state.tmu_config[tmu].textureMode = texMode;
|
||||
gc->state.tmu_config[tmu].tLOD = tLod;
|
||||
|
||||
GR_END();
|
||||
#undef FN_NAME
|
||||
} /* guTexSource */
|
||||
|
||||
|
||||
@@ -1,583 +0,0 @@
|
||||
/*
|
||||
** 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
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
**
|
||||
** 61 3/17/98 3:00p Peter
|
||||
** removed vertex sorting
|
||||
*
|
||||
* 60 12/01/97 6:13p Peter
|
||||
* non-packet3 tsu triangles ooz vs z
|
||||
*
|
||||
* 59 11/21/97 3:20p Peter
|
||||
* direct writes tsu registers
|
||||
*
|
||||
* 58 11/18/97 4:36p Peter
|
||||
* chipfield stuff cleanup and w/ direct writes
|
||||
*
|
||||
* 57 11/17/97 4:55p Peter
|
||||
* watcom warnings/chipfield stuff
|
||||
*
|
||||
* 56 11/12/97 9:54p Peter
|
||||
* fixed all the muckage from new config
|
||||
*
|
||||
* 55 11/03/97 4:38p Peter
|
||||
* yapc fix
|
||||
*
|
||||
* 54 11/01/97 10:01a Peter
|
||||
* tri dispatch stuff
|
||||
*
|
||||
* 53 10/29/97 2:45p Peter
|
||||
* C version of Taco's packing code
|
||||
*
|
||||
* 52 10/27/97 5:59p Peter
|
||||
* removed some debugging code
|
||||
*
|
||||
* 51 10/21/97 3:22p Peter
|
||||
* hand pack rgb
|
||||
*
|
||||
* 50 10/19/97 12:51p Peter
|
||||
* no tsu happiness
|
||||
*
|
||||
* 49 10/19/97 10:59a Peter
|
||||
* fixed p1 tsu writes
|
||||
*
|
||||
* 48 10/17/97 3:15p Peter
|
||||
* removed unused addr field from datalist
|
||||
*
|
||||
* 47 10/17/97 10:15a Peter
|
||||
* packed rgb state cleanup
|
||||
*
|
||||
* 46 10/16/97 5:33p Peter
|
||||
* argb != rgba
|
||||
*
|
||||
* 45 10/16/97 3:40p Peter
|
||||
* packed rgb
|
||||
*
|
||||
* 44 10/16/97 10:31a Peter
|
||||
* fixed hoopti tsu-subtractor unsorted
|
||||
*
|
||||
* 43 10/15/97 5:53p Peter
|
||||
* hoopti tri compare code
|
||||
*
|
||||
* 42 10/10/97 4:33p Peter
|
||||
* non-packet3 tsu triangles
|
||||
*
|
||||
* 41 10/08/97 5:19p Peter
|
||||
* optinally clamp only texture params
|
||||
*
|
||||
* 40 10/08/97 11:32a Peter
|
||||
* pre-computed packet headers for packet 3
|
||||
*
|
||||
* 39 9/20/97 4:42p Peter
|
||||
* tri_setf fixup/big fifo
|
||||
*
|
||||
* 38 9/16/97 2:50p Peter
|
||||
* fixed watcom unhappiness w/ static initializers
|
||||
*
|
||||
* 37 9/15/97 7:31p Peter
|
||||
* more cmdfifo cleanup, fixed normal buffer clear, banner in the right
|
||||
* place, lfb's are on, Hmmmm.. probably more
|
||||
*
|
||||
* 36 9/10/97 10:13p Peter
|
||||
* fifo logic from GaryT, non-normalized fp first cut
|
||||
*
|
||||
* 35 9/03/97 2:11p Peter
|
||||
* start gdbg_info cleanup, fixed zero area no-tsu triangle muckage
|
||||
*
|
||||
* 34 9/01/97 3:19p Peter
|
||||
* no-tsu w from vertex not tmuvtx
|
||||
*
|
||||
* 33 8/31/97 4:06p Peter
|
||||
* no tsu fix
|
||||
*
|
||||
* 32 8/31/97 12:04p Peter
|
||||
* hacked no-tsu code
|
||||
*
|
||||
* 31 7/25/97 11:40a Peter
|
||||
* removed dHalf, change field name to match real use for cvg
|
||||
*
|
||||
* 30 6/30/97 3:22p Peter
|
||||
* cmd fifo sanity
|
||||
*
|
||||
* 29 6/24/97 4:02p Peter
|
||||
* proper cmd fifo placement
|
||||
*
|
||||
* 28 6/23/97 4:43p Peter
|
||||
* cleaned up #defines etc for a nicer tree
|
||||
**
|
||||
*/
|
||||
|
||||
#include <3dfx.h>
|
||||
#include <glidesys.h>
|
||||
|
||||
#define FX_DLL_DEFINITION
|
||||
#include <fxdll.h>
|
||||
#include <glide.h>
|
||||
#include "fxglide.h"
|
||||
|
||||
#ifdef GDBG_INFO_ON
|
||||
/* Some debugging information */
|
||||
static char *indexNames[] = {
|
||||
"GR_VERTEX_X_OFFSET", /* 0 */
|
||||
"GR_VERTEX_Y_OFFSET", /* 1 */
|
||||
"GR_VERTEX_Z_OFFSET", /* 2 */
|
||||
"GR_VERTEX_R_OFFSET", /* 3 */
|
||||
"GR_VERTEX_G_OFFSET", /* 4 */
|
||||
"GR_VERTEX_B_OFFSET", /* 5 */
|
||||
"GR_VERTEX_OOZ_OFFSET", /* 6 */
|
||||
"GR_VERTEX_A_OFFSET", /* 7 */
|
||||
"GR_VERTEX_OOW_OFFSET", /* 8 */
|
||||
"GR_VERTEX_SOW_TMU0_OFFSET", /* 9 */
|
||||
"GR_VERTEX_TOW_TMU0_OFFSET", /* 10 */
|
||||
"GR_VERTEX_OOW_TMU0_OFFSET", /* 11 */
|
||||
"GR_VERTEX_SOW_TMU1_OFFSET", /* 12 */
|
||||
"GR_VERTEX_TOW_TMU1_OFFSET", /* 13 */
|
||||
"GR_VERTEX_OOW_TMU1_OFFSET" /* 14 */
|
||||
};
|
||||
#endif
|
||||
|
||||
/*
|
||||
** _trisetup_nogradients
|
||||
**
|
||||
** This routine does all the setup needed for drawing a triangle. It
|
||||
** is intended to be an exact specification for the mechanisim used
|
||||
** to pass vertices to the assembly language triangle setup code, and
|
||||
** as such has no optimizations at all. Whenever a 'shortcut'
|
||||
** routine to draw triangles (such as for antialiasing, fast lines,
|
||||
** fast spans, polygons, etc) is needed, this code should be used as
|
||||
** the starting point.
|
||||
**
|
||||
*/
|
||||
GR_DDFUNC(_trisetup_nogradients,
|
||||
FxI32,
|
||||
(const GrVertex *va, const GrVertex *vb, const GrVertex *vc))
|
||||
{
|
||||
#define FN_NAME "_trisetup_nogradients"
|
||||
GR_DCL_GC;
|
||||
|
||||
_GlideRoot.stats.trisProcessed++;
|
||||
|
||||
#if GLIDE_TRI_CULLING
|
||||
{
|
||||
const float *fa = &va->x;
|
||||
const float *fb = &vb->x;
|
||||
const float *fc = &vc->x;
|
||||
float dxAB, dxBC, dyAB, dyBC;
|
||||
|
||||
/* Compute Area */
|
||||
dxAB = fa[GR_VERTEX_X_OFFSET] - fb[GR_VERTEX_X_OFFSET];
|
||||
dxBC = fb[GR_VERTEX_X_OFFSET] - fc[GR_VERTEX_X_OFFSET];
|
||||
|
||||
dyAB = fa[GR_VERTEX_Y_OFFSET] - fb[GR_VERTEX_Y_OFFSET];
|
||||
dyBC = fb[GR_VERTEX_Y_OFFSET] - fc[GR_VERTEX_Y_OFFSET];
|
||||
|
||||
/* Stash the area in the float pool for easy access */
|
||||
_GlideRoot.pool.ftemp1 = dxAB * dyBC - dxBC * dyAB;
|
||||
|
||||
#define FloatVal(__f) (((__f) < 786432.875) ? (__f) : ((__f) - 786432.875))
|
||||
{
|
||||
const FxI32 j = *(FxI32*)&_GlideRoot.pool.ftemp1;
|
||||
const FxU32 culltest = (gc->state.cull_mode << 31UL);
|
||||
|
||||
/* Zero-area triangles are BAD!! */
|
||||
if ((j & 0x7FFFFFFF) == 0) {
|
||||
GDBG_INFO(291, FN_NAME": Culling (%g %g) (%g %g) (%g %g) : (%g : 0x%X : 0x%X)\n",
|
||||
FloatVal(fa[0]), FloatVal(fa[1]),
|
||||
FloatVal(fb[0]), FloatVal(fb[1]),
|
||||
FloatVal(fc[0]), FloatVal(fc[1]),
|
||||
_GlideRoot.pool.ftemp1, gc->state.cull_mode, culltest);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Backface culling, use sign bit as test */
|
||||
if ((gc->state.cull_mode != GR_CULL_DISABLE) && (((FxI32)(j ^ culltest)) >= 0)) {
|
||||
GDBG_INFO(291, FN_NAME": Culling (%g %g) (%g %g) (%g %g) : (%g : 0x%X : 0x%X)\n",
|
||||
FloatVal(fa[0]), FloatVal(fa[1]),
|
||||
FloatVal(fb[0]), FloatVal(fb[1]),
|
||||
FloatVal(fc[0]), FloatVal(fc[1]),
|
||||
_GlideRoot.pool.ftemp1, gc->state.cull_mode, culltest);
|
||||
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif /* GLIDE_TRI_CULLING */
|
||||
|
||||
/* Stuff for using hw tsu */
|
||||
#if GLIDE_HW_TRI_SETUP
|
||||
{
|
||||
const float* vectorArray[3];
|
||||
|
||||
/* Load up the real vertices */
|
||||
vectorArray[0] = &va->x;
|
||||
vectorArray[1] = &vb->x;
|
||||
vectorArray[2] = &vc->x;
|
||||
|
||||
#if GLIDE_PACKET3_TRI_SETUP
|
||||
GR_SET_EXPECTED_SIZE(_GlideRoot.curTriSize, 1);
|
||||
TRI_BEGIN();
|
||||
{
|
||||
int vectorIndex;
|
||||
|
||||
for(vectorIndex = 0; vectorIndex < sizeof(vectorArray) / sizeof(float*); vectorIndex++) {
|
||||
const float* const vector = vectorArray[vectorIndex];
|
||||
|
||||
/* Triangle vertex coordinages (x, y) */
|
||||
TRI_SETF(vector[GR_VERTEX_X_OFFSET]);
|
||||
TRI_SETF(vector[GR_VERTEX_Y_OFFSET]);
|
||||
|
||||
/* Other triangle parameters */
|
||||
{
|
||||
const int* dataList = gc->tsuDataList;
|
||||
|
||||
#if GLIDE_PACKED_RGB
|
||||
{
|
||||
FxBool doColorP = FXFALSE;
|
||||
FxU32 packedColor = 0x00;
|
||||
|
||||
if (*dataList == (GR_VERTEX_R_OFFSET << 2)) {
|
||||
packedColor = (RGBA_COMP_CLAMP(FARRAY(vector, (GR_VERTEX_B_OFFSET << 2)), B) |
|
||||
RGBA_COMP_CLAMP(FARRAY(vector, (GR_VERTEX_G_OFFSET << 2)), G) |
|
||||
RGBA_COMP_CLAMP(FARRAY(vector, (GR_VERTEX_R_OFFSET << 2)), R));
|
||||
dataList++;
|
||||
doColorP = FXTRUE;
|
||||
}
|
||||
|
||||
if (*dataList == (GR_VERTEX_A_OFFSET << 2)) {
|
||||
packedColor |= RGBA_COMP_CLAMP(FARRAY(vector, (GR_VERTEX_A_OFFSET << 2)), A);
|
||||
dataList++;
|
||||
doColorP = FXTRUE;
|
||||
}
|
||||
|
||||
if (doColorP) TRI_SET(packedColor);
|
||||
}
|
||||
#endif /* GLIDE_PACKED_RGB */
|
||||
|
||||
#if GLIDE_FP_CLAMP_TEX
|
||||
while(*dataList != 0) {
|
||||
TRI_SETF(FARRAY(vector, *dataList));
|
||||
dataList++;
|
||||
}
|
||||
|
||||
dataList++;
|
||||
#endif /* GLIDE_FP_CLAMP_TEX */
|
||||
|
||||
while(*dataList != 0) {
|
||||
TRI_SETF_CLAMP(FARRAY(vector, *dataList));
|
||||
dataList++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
TRI_END;
|
||||
GR_CHECK_SIZE();
|
||||
#else /* !GLIDE_PACKET3_TRI_SETUP */
|
||||
{
|
||||
GR_DCL_HW;
|
||||
int vectorIndex;
|
||||
FxU32 sMode = (gc->cmdTransportInfo.paramMask >> SSTCP_PKT3_PMASK_SHIFT);
|
||||
FxU32 paramMask = (sMode & 0xFF);
|
||||
FxU32 paramCount;
|
||||
|
||||
/* Convert packet 3 paramMask into sMode format */
|
||||
sMode = (paramMask | ((sMode & 0xF000) << 4));
|
||||
|
||||
{
|
||||
const FxBool hasColor = ((sMode & 0x01) != 0);
|
||||
const FxBool hasAlpha = ((sMode & 0x02) != 0);
|
||||
const FxBool hasZ = ((sMode & 0x04) != 0);
|
||||
const FxBool hasWb = ((sMode & 0x08) != 0);
|
||||
const FxBool hasW0 = ((sMode & 0x10) != 0);
|
||||
const FxBool hasST0 = ((sMode & 0x20) != 0);
|
||||
const FxBool hasW1 = ((sMode & 0x40) != 0);
|
||||
const FxBool hasST1 = ((sMode & 0x80) != 0);
|
||||
|
||||
/* We always send vertex XY */
|
||||
paramCount = 2;
|
||||
paramMask = 0x03;
|
||||
|
||||
/* Build parameter data for reg group packet */
|
||||
#if GLIDE_PACKED_RGB
|
||||
if (hasColor || hasAlpha) {
|
||||
paramCount += 1;
|
||||
paramMask |= 0x04;
|
||||
}
|
||||
#else /* !GLIDE_PACKED_RGB */
|
||||
if (hasColor) {
|
||||
paramCount += 3;
|
||||
paramMask |= 0x38;
|
||||
}
|
||||
if (hasAlpha) {
|
||||
paramCount += 1;
|
||||
paramMask |= 0x40;
|
||||
}
|
||||
#endif /* !GLIDE_PACKED_RGB */
|
||||
|
||||
if (hasZ) {
|
||||
paramCount += 1;
|
||||
paramMask |= 0x80;
|
||||
}
|
||||
if (hasWb) {
|
||||
paramCount += 1;
|
||||
paramMask |= 0x100;
|
||||
}
|
||||
if (hasW0) {
|
||||
paramCount += 1;
|
||||
paramMask |= 0x200;
|
||||
}
|
||||
if (hasST0) {
|
||||
paramCount += 2;
|
||||
paramMask |= 0xC00;
|
||||
}
|
||||
if (hasW1) {
|
||||
paramCount += 1;
|
||||
paramMask |= 0x1000;
|
||||
}
|
||||
if (hasST1) {
|
||||
paramCount += 2;
|
||||
paramMask |= 0x6000;
|
||||
}
|
||||
|
||||
/* Set mode once for teh whole triangle */
|
||||
GR_SET_EXPECTED_SIZE(sizeof(FxU32), 1);
|
||||
GR_SET(BROADCAST_ID, hw, sSetupMode, sMode);
|
||||
GR_CHECK_SIZE();
|
||||
|
||||
for(vectorIndex = 0; vectorIndex < sizeof(vectorArray) / sizeof(float*); vectorIndex++) {
|
||||
const GrVertex* curVertex = (const GrVertex*)vectorArray[vectorIndex];
|
||||
|
||||
REG_GROUP_BEGIN(BROADCAST_ID, sVx, paramCount, paramMask);
|
||||
{
|
||||
REG_GROUP_SETF(hw, sVx, curVertex->x);
|
||||
REG_GROUP_SETF(hw, sVy, curVertex->y);
|
||||
|
||||
#if GLIDE_PACKED_RGB
|
||||
if (hasColor || hasAlpha) {
|
||||
FxU32 packedVal = 0x00;
|
||||
|
||||
if (hasColor) packedVal = ((RGBA_COMP_CLAMP(curVertex->b) << 0UL) |
|
||||
(RGBA_COMP_CLAMP(curVertex->g) << 8UL) |
|
||||
(RGBA_COMP_CLAMP(curVertex->r) << 16UL));
|
||||
if (hasAlpha) packedVal |= (RGBA_COMP_CLAMP(curVertex->a) << 24UL);
|
||||
|
||||
REG_GROUP_SET(hw, sARGB, packedVal);
|
||||
}
|
||||
#else /* !GLIDE_PACKED_RGB */
|
||||
if (hasColor) {
|
||||
REG_GROUP_SETF(hw, sRed, curVertex->r);
|
||||
REG_GROUP_SETF(hw, sGreen, curVertex->g);
|
||||
REG_GROUP_SETF(hw, sBlue, curVertex->b);
|
||||
}
|
||||
if (hasAlpha) REG_GROUP_SETF(hw, sAlpha, curVertex->a);
|
||||
#endif /* !GLIDE_PACKED_RGB */
|
||||
|
||||
if (hasZ) REG_GROUP_SETF(hw, sVz, curVertex->ooz);
|
||||
if (hasWb) REG_GROUP_SETF(hw, sOowfbi, curVertex->oow);
|
||||
|
||||
/* TMU0 */
|
||||
if (hasW0) REG_GROUP_SETF(hw, sOow0, curVertex->tmuvtx[0].oow);
|
||||
if (hasST0) {
|
||||
REG_GROUP_SETF(hw, sSow0, curVertex->tmuvtx[0].sow);
|
||||
REG_GROUP_SETF(hw, sTow0, curVertex->tmuvtx[0].tow);
|
||||
}
|
||||
|
||||
/* TMU1 */
|
||||
if (hasW1) REG_GROUP_SETF(hw, sOow1, curVertex->tmuvtx[1].oow);
|
||||
if (hasST1) {
|
||||
REG_GROUP_SETF(hw, sSow1, curVertex->tmuvtx[1].sow);
|
||||
REG_GROUP_SETF(hw, sTow1, curVertex->tmuvtx[1].tow);
|
||||
}
|
||||
}
|
||||
REG_GROUP_END();
|
||||
|
||||
GR_SET_EXPECTED_SIZE(sizeof(FxU32), 1);
|
||||
if (vectorIndex == 0) {
|
||||
GR_SET(BROADCAST_ID, hw, sBeginTriCMD, 0);
|
||||
} else {
|
||||
GR_SET(BROADCAST_ID, hw, sDrawTriCMD, 0);
|
||||
}
|
||||
GR_CHECK_SIZE();
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif /* !GLIDE_PACKET3_TRI_SETUP */
|
||||
|
||||
goto __triDrawn;
|
||||
}
|
||||
#endif /* GLIDE_HW_TRI_SETUP */
|
||||
|
||||
#if !GLIDE_HW_TRI_SETUP
|
||||
#if !defined(GLIDE_TRI_CULLING) || !GLIDE_TRI_CULLING
|
||||
#error "GLIDE_TRI_CULLING must be enabled to sort vertices"
|
||||
#endif
|
||||
|
||||
{
|
||||
GR_DCL_HW;
|
||||
|
||||
TRI_NO_TSU_BEGIN(FXTRUE);
|
||||
{
|
||||
const float ooa = _GlideRoot.pool.f1 / _GlideRoot.pool.ftemp1;
|
||||
volatile FxU32* hwAddr = &hw->FvA.x;
|
||||
|
||||
/* Divide the deltas by the area for gradient calculation. */
|
||||
dxBC *= ooa;
|
||||
dyAB *= ooa;
|
||||
dxAB *= ooa;
|
||||
dyBC *= ooa;
|
||||
|
||||
GDBG_INFO(85, FN_NAME": No-TSU Triangle area: (%g %g) : (%g %g %g %g)\n",
|
||||
_GlideRoot.pool.ftemp1, ooa,
|
||||
dxAB, dxBC, dyAB, dyBC);
|
||||
|
||||
/* write out X & Y for vertex A */
|
||||
TRI_NO_TSU_SETF(hwAddr++, fa[GR_VERTEX_X_OFFSET]);
|
||||
TRI_NO_TSU_SETF(hwAddr++, fa[GR_VERTEX_Y_OFFSET]);
|
||||
|
||||
/* write out X & Y for vertex B */
|
||||
TRI_NO_TSU_SETF(hwAddr++, fb[GR_VERTEX_X_OFFSET]);
|
||||
TRI_NO_TSU_SETF(hwAddr++, fb[GR_VERTEX_Y_OFFSET]);
|
||||
|
||||
/* write out X & Y for vertex C */
|
||||
TRI_NO_TSU_SETF(hwAddr++, fc[GR_VERTEX_X_OFFSET]);
|
||||
TRI_NO_TSU_SETF(hwAddr++, fc[GR_VERTEX_Y_OFFSET]);
|
||||
|
||||
/* Send down the starting parameter values, these come from
|
||||
* the sorted vertex A.
|
||||
*/
|
||||
{
|
||||
int i = GR_VERTEX_R_OFFSET;
|
||||
|
||||
while(i < GR_VERTEX_OOW_OFFSET) {
|
||||
TRI_NO_TSU_SETF(hwAddr++, fa[i++]);
|
||||
}
|
||||
|
||||
/* Skip fbi oow */
|
||||
i++;
|
||||
|
||||
/* FixMe? We currently only do one tmu. */
|
||||
while(i < GR_VERTEX_OOW_TMU0_OFFSET) {
|
||||
TRI_NO_TSU_SETF(hwAddr++, fa[i]);
|
||||
i++;
|
||||
}
|
||||
|
||||
TRI_NO_TSU_SETF(hwAddr++, fa[GR_VERTEX_OOW_OFFSET]);
|
||||
}
|
||||
|
||||
/* Send the x gradients */
|
||||
{
|
||||
int i = GR_VERTEX_R_OFFSET;
|
||||
|
||||
while(i < GR_VERTEX_OOW_OFFSET) {
|
||||
const float curGrad = (((fa[i] - fb[i]) * dyBC) -
|
||||
((fb[i] - fc[i]) * dyAB));
|
||||
|
||||
GDBG_INFO(285, FN_NAME": Gradient 0x%X : %g %g %g : %g\n",
|
||||
((FxU32)hwAddr - (FxU32)hw) >> 2,
|
||||
fa[i], fb[i], fc[i], curGrad);
|
||||
|
||||
TRI_NO_TSU_SETF(hwAddr++, curGrad);
|
||||
i++;
|
||||
}
|
||||
|
||||
/* Skip fbi oow */
|
||||
i++;
|
||||
|
||||
/* FixMe? We currently only do one tmu. */
|
||||
while(i < GR_VERTEX_OOW_TMU0_OFFSET) {
|
||||
const float curGrad = (((fa[i] - fb[i]) * dyBC) -
|
||||
((fb[i] - fc[i]) * dyAB));
|
||||
|
||||
GDBG_INFO(285, FN_NAME": Gradient 0x%X : %g %g %g : %g\n",
|
||||
((FxU32)hwAddr - (FxU32)hw) >> 2,
|
||||
fa[i], fb[i], fc[i], curGrad);
|
||||
|
||||
TRI_NO_TSU_SETF(hwAddr++, curGrad);
|
||||
i++;
|
||||
}
|
||||
|
||||
{
|
||||
const float curGrad = (((fa[GR_VERTEX_OOW_OFFSET] - fb[GR_VERTEX_OOW_OFFSET]) * dyBC) -
|
||||
((fb[GR_VERTEX_OOW_OFFSET] - fc[GR_VERTEX_OOW_OFFSET]) * dyAB));
|
||||
|
||||
TRI_NO_TSU_SETF(hwAddr++, curGrad);
|
||||
}
|
||||
}
|
||||
|
||||
/* Send the y gradients */
|
||||
{
|
||||
int i = GR_VERTEX_R_OFFSET;
|
||||
|
||||
while(i < GR_VERTEX_OOW_OFFSET) {
|
||||
const float curGrad = (((fb[i] - fc[i]) * dxAB) -
|
||||
((fa[i] - fb[i]) * dxBC));
|
||||
|
||||
GDBG_INFO(285, FN_NAME": Gradient 0x%X : %g %g %g : %g\n",
|
||||
((FxU32)hwAddr - (FxU32)hw) >> 2,
|
||||
fa[i], fb[i], fc[i], curGrad);
|
||||
|
||||
TRI_NO_TSU_SETF(hwAddr++, curGrad);
|
||||
i++;
|
||||
}
|
||||
|
||||
/* Skip fbi oow */
|
||||
i++;
|
||||
|
||||
/* FixMe? We currently only do one tmu. */
|
||||
while(i < GR_VERTEX_OOW_TMU0_OFFSET) {
|
||||
const float curGrad = (((fb[i] - fc[i]) * dxAB) -
|
||||
((fa[i] - fb[i]) * dxBC));
|
||||
|
||||
GDBG_INFO(285, FN_NAME": Gradient 0x%X : %g %g %g : %g\n",
|
||||
((FxU32)hwAddr - (FxU32)hw) >> 2,
|
||||
fa[i], fb[i], fc[i], curGrad);
|
||||
|
||||
TRI_NO_TSU_SETF(hwAddr++, curGrad);
|
||||
i++;
|
||||
}
|
||||
|
||||
{
|
||||
const float curGrad = (((fb[GR_VERTEX_OOW_OFFSET] - fc[GR_VERTEX_OOW_OFFSET]) * dxAB) -
|
||||
((fa[GR_VERTEX_OOW_OFFSET] - fb[GR_VERTEX_OOW_OFFSET]) * dxBC));
|
||||
|
||||
TRI_NO_TSU_SETF(hwAddr++, curGrad);
|
||||
}
|
||||
}
|
||||
|
||||
/* Draw the triangle by writing the area to the triangleCMD register */
|
||||
TRI_NO_TSU_SETF(hwAddr, _GlideRoot.pool.ftemp1);
|
||||
_GlideRoot.stats.trisDrawn++;
|
||||
}
|
||||
TRI_NO_TSU_END();
|
||||
}
|
||||
|
||||
goto __triDrawn;
|
||||
#endif /* !GLIDE_HW_TRI_SETUP */
|
||||
|
||||
__triDrawn:
|
||||
/* If we made it this far then we drew the triangle */
|
||||
_GlideRoot.stats.trisDrawn++;
|
||||
GR_CHECK_SIZE();
|
||||
|
||||
return 1;
|
||||
|
||||
#undef FN_NAME
|
||||
} /* _trisetup_nogradients */
|
||||
@@ -1,314 +0,0 @@
|
||||
#
|
||||
# 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
|
||||
|
||||
TAG_REGEXP = $(BUILD_ROOT)\$(FX_GLIDE_HW)\glide\src\glide.rx
|
||||
|
||||
# Compile for specific hardware
|
||||
!if "$(FX_GLIDE_HW)" == "CVG"
|
||||
FX_GLIDE_REAL_HW= 1
|
||||
|
||||
!if "$(FX_GLIDE_CTRISETUP)" == ""
|
||||
FX_GLIDE_CTRISETUP = 0
|
||||
!endif
|
||||
|
||||
HWSPEC = fifo.c
|
||||
LCDEFS = $(LCDEFS) -DCVG \
|
||||
-DGLIDE_CHIP_BROADCAST=1 -DGLIDE_DEFAULT_GAMMA=1.3f
|
||||
LCDEFS = $(LCDEFS) \
|
||||
-DGLIDE_BLIT_CLEAR=1 \
|
||||
!else if "$(FX_GLIDE_HW)" == "H3"
|
||||
FX_GLIDE_REAL_HW= 1
|
||||
FX_GLIDE_NO_FIFO= 1
|
||||
FX_GLIDE_CTRISETUP = 1
|
||||
HWSPEC = fifo.c
|
||||
LCDEFS = $(LCDEFS) -DH3 \
|
||||
-DGLIDE_HW_TRI_SETUP=1 -DGLIDE_PACKET3_TRI_SETUP=0
|
||||
!else
|
||||
!error "FX_GLIDE_HW == unknown value (H3|CVG)"
|
||||
!endif
|
||||
|
||||
|
||||
!if "$(FX_GLIDE_VTUNE)"!=""
|
||||
OTSOPTS = /Zi
|
||||
LLDOPTS = /DEBUG
|
||||
!endif
|
||||
|
||||
!if "$(DEBUG)" == "1"
|
||||
DBGOPTS = -DGLIDE_DEBUG -DGDBG_INFO_ON
|
||||
GLIDE_SANITY_ALL = 1
|
||||
!endif
|
||||
|
||||
!if "$(FX_COMPILER)" == "MICROSOFT"
|
||||
DBGOPTS = $(DBGOPTS) /WX
|
||||
!endif
|
||||
|
||||
!if "$(FX_GLIDE_HW)" == ""
|
||||
!error "FX_GLIDE_HW not defined"
|
||||
!endif
|
||||
|
||||
# Display Options
|
||||
DSPOPTS =
|
||||
SUBLIBRARIES =
|
||||
!if ("$(HAL_HW)" != "")
|
||||
DSPOPTS = $(DSPOPTS) -DHAL_HW=1
|
||||
SUBLIBRARIES = $(SUBLIBRARIES) $(BUILD_ROOT)\$(FX_GLIDE_HW)\lib\sst1init.lib
|
||||
!endif
|
||||
!if !defined(DSPOPTS)
|
||||
!error "Unknown HAL_* configuration"
|
||||
!endif
|
||||
|
||||
# GLIDE_HW_TRI_SETUP: Use the hw TSU for triangle rendering.
|
||||
!if "$(FX_GLIDE_SW_SETUP)" == "1"
|
||||
LCDEFS = $(LCDEFS) -DGLIDE_HW_TRI_SETUP=0 -DGLIDE_TRI_CULLING=1
|
||||
FX_GLIDE_CTRISETUP = 1
|
||||
!else # HW Setup
|
||||
# Do culling test in sw for independent triangles
|
||||
CULL_MODE = -DGLIDE_TRI_CULLING=0
|
||||
!if "$(FX_GLIDE_HW_CULL)" != "1"
|
||||
CULL_MODE = -DGLIDE_TRI_CULLING=1
|
||||
!endif
|
||||
DSPOPTS = $(DSPOPTS) $(CULL_MODE)
|
||||
|
||||
# Send a single DWORD ARGB rather than 4 fp values, at
|
||||
# the cost of doing the conversion.
|
||||
!if "$(FX_GLIDE_PACK_RGB)" == "1"
|
||||
LCDEFS = $(LCDEFS) -DGLIDE_PACKED_RGB=1
|
||||
!endif
|
||||
|
||||
!endif # HW Tri Setup
|
||||
|
||||
!if "$(FX_GLIDE_NO_FIFO)" != "1"
|
||||
FIFODEFS = -DUSE_PACKET_FIFO=1 \
|
||||
-DGLIDE_HW_TRI_SETUP=1 -DGLIDE_PACKET3_TRI_SETUP=1 \
|
||||
|
||||
!if "$(FX_GLIDE_DEBUG_FIFO)" == "1"
|
||||
# GLIDE_USE_DEBUG_FIFO: Run w/ the small fifo to cause me/glide more stress
|
||||
# FIFO_ASSERT_FULL: Check hw depth/fifo a lot (slow)
|
||||
LCDEFS = $(LCDEFS) \
|
||||
-DGLIDE_USE_DEBUG_FIFO=1 -DFIFO_ASSERT_FULL=1 \
|
||||
-DASSERT_FAULT=0 #-DGLIDE_SANITY_SIZE=1
|
||||
!endif # FX_GLIDE_DEBUG_FIFO
|
||||
!else # FX_GLIDE_NO_FIFO == 1
|
||||
FX_GLIDE_CTRISETUP = 1
|
||||
FIFODEFS = -DGLIDE_HW_TRI_SETUP=1
|
||||
!endif
|
||||
|
||||
# Optimization Options
|
||||
# This is for turning on and off algorithmic optimizations,
|
||||
# not flags to the C compiler. Usually this involves
|
||||
# enabling/disabling assembly language code, but it can also
|
||||
# change the way C code works, or how C code generates data to be
|
||||
# used by various pieces of code.
|
||||
# Usually these are set with environment variables or arguments to
|
||||
# nmake.
|
||||
#
|
||||
|
||||
# Turn on/off assembly language trisetup code.
|
||||
# (C on is Assembly off) (A ssembly T ri S etup OPTS)
|
||||
!if "$(FX_GLIDE_CTRISETUP)" == "1"
|
||||
ASMTRISETUP =
|
||||
ATSOPTS = -DGLIDE_USE_C_TRISETUP
|
||||
CFILES = gxdraw.c
|
||||
!else
|
||||
ASMTRISETUP = xdraw2.asm
|
||||
DSPOPTS = $(DSPOPTS) -DGLIDE_DISPATCH_SETUP=1 -DGLIDE_PACKED_RGB=0
|
||||
!endif
|
||||
|
||||
OPTOPTS = $(GRMOPTS) $(OTSOPTS) $(ATSOPTS)
|
||||
|
||||
# local defines, begin with basics and then add on
|
||||
LCDEFS = $(LCDEFS) -DGLIDE_LIB
|
||||
|
||||
!if "$(FX_GLIDE_CRYBABY)" == "1"
|
||||
LCDEFS = $(LCDEFS) -DGLIDE_CHECK_COMPATABILITY=1
|
||||
!endif
|
||||
|
||||
# Turn Off/On compilation of shameless plug
|
||||
!if "$(FX_GLIDE_NO_PLUG)" == "1"
|
||||
!else
|
||||
LCDEFS = $(LCDEFS) -DGLIDE_PLUG
|
||||
!endif
|
||||
|
||||
# Turn Off/On splash screen
|
||||
!if "$(FX_GLIDE_NO_SPLASH)" == "1"
|
||||
!else
|
||||
LCDEFS = $(LCDEFS) -DGLIDE_SPLASH
|
||||
!endif
|
||||
|
||||
!if "$(FX_PCI_TARGET)" == "NT"
|
||||
LCDEFS = $(LCDEFS) -DNT_BUILD
|
||||
!endif
|
||||
|
||||
#Glide 3 Stuff, for migration all
|
||||
!if "$(FX_GLIDE3)" != ""
|
||||
LCDEFS = $(LCDEFS) -DGLIDE3
|
||||
GLIDE3FILES = gstrip.c distrip.c distate.c diget.c
|
||||
!endif
|
||||
|
||||
#Glide 3. remove migration stuff
|
||||
!if "$(FX_GLIDE3_ALPHA)" != ""
|
||||
LCDEFS = $(LCDEFS) -DGLIDE3_ALPHA
|
||||
GLIDE3FILES = gstrip.c distrip.c distate.c diget.c
|
||||
!endif
|
||||
|
||||
!if defined(GLIDE_SANITY_ALL) || defined(GLIDE_SANITY_SIZE)
|
||||
LCDEFS = $(LCDEFS) -DGLIDE_SANITY_SIZE
|
||||
!endif
|
||||
!if defined(GLIDE_SANITY_ALL) || defined(GLIDE_SANITY_ASSERT)
|
||||
LCDEFS = $(LCDEFS) -DGLIDE_SANITY_ASSERT
|
||||
!endif
|
||||
|
||||
# Local Defs, Includes, and Options (C)
|
||||
LCINCS = $(LCINCS) -I$(BUILD_ROOT)\$(FX_GLIDE_HW)\include
|
||||
LCOPTS = $(DBGOPTS) $(DSPOPTS) $(OPTOPTS)
|
||||
|
||||
# Local Defs, Includes, and Options (ASM)
|
||||
LADEFS = $(LADEFS) $(ASM_REGMAP_DEFS)
|
||||
LAINCS = -I$(BUILD_ROOT)\$(FX_GLIDE_HW)\include
|
||||
LAOPTS = $(DBGOPTS) $(DSPOPTS) $(OPTOPTS) /Fl /Sa
|
||||
|
||||
AFILES = $(ASMTRISETUP) cpudtect.asm
|
||||
|
||||
# sources
|
||||
HEADERS = glide.h gump.h glidesys.h glideutl.h
|
||||
PRIVATE_HEADERS = fxglide.h gsstdef.h fxinline.h
|
||||
|
||||
INSTALL_DESTINATION = $(BUILD_ROOT)\$(FX_GLIDE_HW)
|
||||
|
||||
CFILES = $(CFILES) gsplash.c g3df.c gu.c guclip.c gpci.c gump.c\
|
||||
diglide.c disst.c ditex.c gbanner.c gerror.c\
|
||||
gmovie.c digutex.c ddgump.c gaa.c gdraw.c\
|
||||
gglide.c glfb.c gsst.c gtex.c gtexdl.c\
|
||||
gutex.c $(HWSPEC) $(GLIDE3FILES)
|
||||
|
||||
OFILES = $(CFILES:.c=.obj)
|
||||
|
||||
OTHER_CFILES = fxgasm.c fxbldno.c fxinline.h
|
||||
|
||||
CODFILES = $(CFILES:.c=.cod)
|
||||
|
||||
# targets
|
||||
LDIRT = fxgasm.obj fxgasm.exe fxgasm.h fxinline.h fxbldno.obj fxbldno.exe fxbldno.h
|
||||
|
||||
!if "$(FX_GLIDE3)" == "1"
|
||||
LIBRARIES = glide3x.lib
|
||||
!else
|
||||
LIBRARIES = glide2x.lib
|
||||
!endif
|
||||
RCFILE = glide.rc
|
||||
|
||||
# Make a static link library for things like the diags.
|
||||
!if "$(FX_DLL_BUILD)" == "1"
|
||||
FX_DLL_LIBRARY = 1
|
||||
!else
|
||||
LCDEFS = $(LCDEFS) -DFX_STATIC_BUILD
|
||||
!endif
|
||||
|
||||
|
||||
LCDEFS = $(LCDEFS) $(FIFODEFS)
|
||||
|
||||
!include $(BUILD_ROOT)\swlibs/include/nmake/3dfx.mak
|
||||
|
||||
codfiles: $(CODFILES)
|
||||
xdraw2.obj : xdraw2.asm xdraw2.inc fxgasm.h fxinline.h
|
||||
|
||||
ctags: $(CFILES)
|
||||
ctags $(CFILES)
|
||||
|
||||
gbanner.obj : banner.inc
|
||||
gsplash.obj : splshdat.c
|
||||
|
||||
!if "$(FX_TARGET)" == "WIN32"
|
||||
!if "$(FX_DLL_BUILD)" != ""
|
||||
glide2x.dll:
|
||||
del fxbldno.h
|
||||
!endif
|
||||
!endif
|
||||
|
||||
!if "$(FX_TARGET)" == "DOS"
|
||||
!if "$(FX_DLL_BUILD)" != ""
|
||||
|
||||
glimport.obj: glimport.asm
|
||||
|
||||
IMPORT_DEPS = $(BUILD_ROOT)\swlibs\lib\dllload.lib \
|
||||
$(DLLLOADS) glimport.obj
|
||||
|
||||
glide2x.lib: $(IMPORT_DEPS)
|
||||
if exist glide2x.lib del glide2x.lib
|
||||
wlib glide2x.lib +$(BUILD_ROOT)\swlibs\lib\dllload.lib +glimport.obj
|
||||
!if "$(FX_WATCOM_REG_CALL)" != "1"
|
||||
wlib glide2x.lib +$(BUILD_ROOT)\swlibs\lib\dllloads.obj
|
||||
!endif
|
||||
if exist $(BUILD_ROOT)\$(FX_GLIDE_HW)\lib\glide2x.lib attrib -r $(BUILD_ROOT)\$(FX_GLIDE_HW)\lib\glide2x.lib
|
||||
if exist $(BUILD_ROOT)\$(FX_GLIDE_HW)\lib\glide2x.lib del $(BUILD_ROOT)\$(FX_GLIDE_HW)\lib\glide2x.lib
|
||||
xcopy /d /k /r /i /s /q glide2x.lib $(BUILD_ROOT)\$(FX_GLIDE_HW)\lib
|
||||
attrib +r $(BUILD_ROOT)\$(FX_GLIDE_HW)\lib\glide2x.lib
|
||||
|
||||
|
||||
!endif
|
||||
!endif
|
||||
|
||||
!if "$(FX_COMPILER)" == "WATCOM"
|
||||
#------------------------------------------------------------
|
||||
# special rul for makeing glideapi.obj under WATCOM
|
||||
#
|
||||
|
||||
glideapi.obj : glideapi.c
|
||||
set $(CC_ENV_VAR)=-d2 $(GCFLAGS) $(LCFLAGS) $(VCFLAGS)
|
||||
$(CC) glideapi.c
|
||||
!endif
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# special rules for making FXGASM.H
|
||||
#
|
||||
fxgasm.exe: fxgasm.c $(HEADERS) gsstdef.h fxglide.h Makefile
|
||||
!if "$(FX_COMPILER)" == "MICROSOFT"
|
||||
$(CC) -o $@ fxgasm.c $(GCDEFS) $(LCDEFS) $(VCDEFS) $(LCOPTS) \
|
||||
-I$(BUILD_ROOT)\$(FX_GLIDE_HW)\include -I$(BUILD_ROOT)\swlibs\include $(LDFLAGS)
|
||||
!else if "$(FX_COMPILER)" == "WATCOM"
|
||||
set WCC386=$(CFLAGS)
|
||||
wcl386 fxgasm.c
|
||||
!endif
|
||||
fxgasm.h: fxgasm.exe
|
||||
fxgasm -hex > fxgasm.h
|
||||
fxinline.h: fxgasm.exe
|
||||
fxgasm -inline > fxinline.h
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# special rules for making FXBLDNO.H
|
||||
#
|
||||
|
||||
fxbldno.exe: fxbldno.c $(HEADERS) $(PRIVATE_HEADERS)
|
||||
!if "$(FX_COMPILER)" == "MICROSOFT"
|
||||
$(CC) -o $@ fxbldno.c $(GCDEFS) $(LCDEFS) $(VCDEFS) $(LCOPTS) $(LDFLAGS)
|
||||
!else if "$(FX_COMPILER)" == "WATCOM"
|
||||
set WCC386=$(CFLAGS)
|
||||
wcl386 fxbldno.c
|
||||
!endif
|
||||
|
||||
fxbldno.h: fxbldno.exe
|
||||
fxbldno > fxbldno.h
|
||||
|
||||
glide.res: rcver.h fxbldno.h
|
||||
gglide.obj: rcver.h
|
||||
|
||||
!if "$(FX_GLIDE_CTRISETUP)" != "1"
|
||||
gdraw.obj: fxinline.h
|
||||
!endif
|
||||
|
||||
@@ -1,263 +0,0 @@
|
||||
#
|
||||
# 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
|
||||
|
||||
TAG_REGEXP = $(BUILD_ROOT)/$(FX_GLIDE_HW)/glide/src/glide.rx
|
||||
|
||||
|
||||
# Compile for specific hardware
|
||||
ifeq ($(FX_GLIDE_HW),cvg)
|
||||
FX_GLIDE_REAL_HW= 1
|
||||
FX_GLIDE_CTRISETUP = 0
|
||||
|
||||
HWSPEC = fifo.c
|
||||
LCDEFS += -DCVG \
|
||||
-DGLIDE_CHIP_BROADCAST=1 -DGLIDE_DEFAULT_GAMMA=1.3 \
|
||||
-DGLIDE_BLIT_CLEAR=1
|
||||
|
||||
else
|
||||
ifeq ($(FX_GLIDE_HW),H3)
|
||||
FX_GLIDE_REAL_HW= 1
|
||||
FX_GLIDE_NO_FIFO= 1
|
||||
FX_GLIDE_CTRISETUP = 1
|
||||
HWSPEC = fifo.c
|
||||
LCDEFS += -DH3 \
|
||||
-DGLIDE_HW_TRI_SETUP=1 -DGLIDE_PACKET3_TRI_SETUP=0
|
||||
else
|
||||
error "FX_GLIDE_HW == unknown value (H3|CVG)"
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(DEBUG),1)
|
||||
DBGOPTS = -DGLIDE_DEBUG -DGDBG_INFO_ON
|
||||
GLIDE_SANITY_ALL = 1
|
||||
endif
|
||||
|
||||
ifeq ($(FX_GLIDE_HW),)
|
||||
error "FX_GLIDE_HW not defined"
|
||||
endif
|
||||
|
||||
# Display Options
|
||||
DSPOPTS =
|
||||
SUBLIBRARIES =
|
||||
|
||||
ifeq ($(HAL_HW),1)
|
||||
DSPOPTS += -DHAL_HW=1
|
||||
SUBLIBRARIES += $(BUILD_ROOT)/$(FX_GLIDE_HW)/lib/libsst1init.a \
|
||||
$(BUILD_ROOT_SWLIBS)/lib/libfxmisc.a \
|
||||
$(BUILD_ROOT_SWLIBS)/lib/libfxpci.a
|
||||
endif
|
||||
ifeq ($(DSPOPTS),)
|
||||
error "Unknown HAL_* configuration"
|
||||
endif
|
||||
|
||||
# GLIDE_HW_TRI_SETUP: Use the hw TSU for triangle rendering.
|
||||
# GLIDE_TRI_CULLING: Cull backfaced/zero area triangles in sw before the fifo.
|
||||
# NB: This must be set if GLIDE_HW_TRI_SETUP=0
|
||||
ifeq ($(FX_GLIDE_SW_SETUP),1)
|
||||
LCDEFS += -DGLIDE_HW_TRI_SETUP=0 -DGLIDE_TRI_CULLING=1
|
||||
FX_GLIDE_CTRISETUP = 1
|
||||
else
|
||||
# Do culling test in sw for independent triangles
|
||||
CULL_MODE = -DGLIDE_TRI_CULLING=0
|
||||
ifeq ($(FX_GLIDE_HW_CULL),1)
|
||||
CULL_MODE = -DGLIDE_TRI_CULLING=1
|
||||
endif
|
||||
DSPOPTS += $(CULL_MODE)
|
||||
|
||||
# Send a single DWORD ARGB rather than 4 fp values, at
|
||||
# the cost of doing the conversion.
|
||||
ifeq ($(FX_GLIDE_PACK_RGB),1)
|
||||
LCDEFS += -DGLIDE_PACKED_RGB=1
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
ifneq ($(FX_GLIDE_NO_FIFO),1)
|
||||
FIFODEFS = -DUSE_PACKET_FIFO=1 \
|
||||
-DGLIDE_HW_TRI_SETUP=1 -DGLIDE_PACKET3_TRI_SETUP=1
|
||||
|
||||
ifeq ($(FX_GLIDE_DEBUG_FIFO),1)
|
||||
# GLIDE_USE_DEBUG_FIFO: Run w/ the small fifo to cause me/glide more stress
|
||||
# FIFO_ASSERT_FULL: Check hw depth/fifo a lot (slow)
|
||||
LCDEFS += -DGLIDE_USE_DEBUG_FIFO=1 -DFIFO_ASSERT_FULL=1 \
|
||||
-DASSERT_FAULT=0 #-DGLIDE_SANITY_SIZE=1
|
||||
endif
|
||||
else
|
||||
FX_GLIDE_CTRISETUP = 1
|
||||
FIFODEFS = -DGLIDE_HW_TRI_SETUP=1
|
||||
endif
|
||||
|
||||
# Optimization Options
|
||||
# This is for turning on and off algorithmic optimizations,
|
||||
# not flags to the C compiler. Usually this involves
|
||||
# enabling/disabling assembly language code, but it can also
|
||||
# change the way C code works, or how C code generates data to be
|
||||
# used by various pieces of code.
|
||||
# Usually these are set with environment variables or arguments to
|
||||
# nmake.
|
||||
#
|
||||
|
||||
# Turn on/off assembly language trisetup code.
|
||||
# (C on is Assembly off) (A ssembly T ri S etup OPTS)
|
||||
ifeq ($(FX_GLIDE_CTRISETUP),1)
|
||||
ASMTRISETUP =
|
||||
ATSOPTS = -DGLIDE_USE_C_TRISETUP
|
||||
CFILES = gxdraw.c
|
||||
else
|
||||
ASMTRISETUP = xdraw2.S
|
||||
DSPOPTS += -DGLIDE_DISPATCH_SETUP=1 -DGLIDE_PACKED_RGB=0
|
||||
endif
|
||||
|
||||
OPTOPTS = $(GRMOPTS) $(OTSOPTS) $(ATSOPTS)
|
||||
|
||||
# local defines, begin with basics and then add on
|
||||
LCDEFS += -DGLIDE_LIB
|
||||
|
||||
ifeq ($(FX_GLIDE_CRYBABY),1)
|
||||
LCDEFS += -DGLIDE_CHECK_COMPATABILITY=1
|
||||
endif
|
||||
|
||||
# Turn Off/On compilation of shameless plug
|
||||
ifeq ($(FX_GLIDE_NO_PLUG),1)
|
||||
else
|
||||
LCDEFS += -DGLIDE_PLUG
|
||||
endif
|
||||
|
||||
# Turn Off/On splash screen
|
||||
ifeq ($(FX_GLIDE_NO_SPLASH),1)
|
||||
else
|
||||
LCDEFS += -DGLIDE_SPLASH
|
||||
endif
|
||||
|
||||
#Glide 3 Stuff, for migration all
|
||||
ifneq ($(FX_GLIDE3),)
|
||||
LCDEFS += -DGLIDE3
|
||||
GLIDE3FILES = gstrip.c distrip.c distate.c diget.c
|
||||
endif
|
||||
|
||||
#Glide 3. remove migration stuff
|
||||
ifneq ($(FX_GLIDE3_ALPHA),)
|
||||
LCDEFS += -DGLIDE3_ALPHA
|
||||
GLIDE3FILES = gstrip.c distrip.c distate.c diget.c
|
||||
endif
|
||||
|
||||
ifneq ($(GLIDE_SANITY_ALL)$(GLIDE_SANITY_SIZE),)
|
||||
LCDEFS += -DGLIDE_SANITY_SIZE
|
||||
endif
|
||||
ifneq ($(GLIDE_SANITY_ALL)$(GLIDE_SANITY_ASSERT),)
|
||||
LCDEFS += -DGLIDE_SANITY_ASSERT
|
||||
endif
|
||||
|
||||
# Local Defs, Includes, and Options (C)
|
||||
LCINCS += -I$(BUILD_ROOT)/$(FX_GLIDE_HW)/include
|
||||
LCOPTS = $(DBGOPTS) $(DSPOPTS) $(OPTOPTS)
|
||||
|
||||
# Local Defs, Includes, and Options (ASM)
|
||||
LADEFS += $(ASM_REGMAP_DEFS)
|
||||
LAINCS = -I$(BUILD_ROOT)/$(FX_GLIDE_HW)/include
|
||||
LAOPTS = $(DBGOPTS) $(DSPOPTS) $(OPTOPTS)
|
||||
|
||||
AFILES = $(ASMTRISETUP)
|
||||
|
||||
# sources
|
||||
HEADERS = glide.h gump.h glidesys.h glideutl.h
|
||||
PRIVATE_HEADERS = fxglide.h gsstdef.h fxinline.h
|
||||
|
||||
INSTALL_DESTINATION = $(BUILD_ROOT)/$(FX_GLIDE_HW)
|
||||
|
||||
CFILES += gsplash.c g3df.c gu.c guclip.c gpci.c gump.c\
|
||||
diglide.c disst.c ditex.c gbanner.c gerror.c\
|
||||
gmovie.c digutex.c ddgump.c gaa.c gdraw.c\
|
||||
gglide.c glfb.c gsst.c gtex.c gtexdl.c\
|
||||
gutex.c $(HWSPEC) $(GLIDE3FILES) \
|
||||
cpudetect.c
|
||||
|
||||
OFILES = $(CFILES:.c=.o)
|
||||
|
||||
OTHER_CFILES = fxgasm.c fxbldno.c fxinline.h
|
||||
|
||||
CODFILES = $(CFILES:.c=.cod)
|
||||
|
||||
# targets
|
||||
LDIRT = fxgasm.o fxgasm fxgasm.h fxinline.h fxbldno.o fxbldno fxbldno.h
|
||||
|
||||
ifeq ($(FX_GLIDE3),1)
|
||||
LIBRARIES = libglide3.a
|
||||
SHARED_LIBRARY = libglide3.so.3.01
|
||||
else
|
||||
LIBRARIES = libglide.a
|
||||
SHARED_LIBRARY = libglide.so.2.53
|
||||
endif
|
||||
RCFILE = glide.rc
|
||||
|
||||
# Make a static link library for things like the diags.
|
||||
ifeq ($(FX_DLL_BUILD),1)
|
||||
FX_DLL_LIBRARY = 1
|
||||
else
|
||||
LCDEFS += -DFX_STATIC_BUILD
|
||||
endif
|
||||
|
||||
|
||||
LCDEFS += $(FIFODEFS)
|
||||
|
||||
include $(BUILD_ROOT)/swlibs/include/make/3dfx.mak
|
||||
|
||||
codfiles: $(CODFILES)
|
||||
|
||||
ctags: $(CFILES)
|
||||
ctags $(CFILES)
|
||||
|
||||
gbanner.o : banner.inc
|
||||
gsplash.o : splshdat.c
|
||||
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# special rules for making FXGASM.H
|
||||
#
|
||||
fxgasm: fxgasm.c $(HEADERS) gsstdef.h fxglide.h
|
||||
$(CC) -o $@ fxgasm.c $(GCDEFS) $(LCDEFS) $(VCDEFS) $(LCOPTS) \
|
||||
-I$(BUILD_ROOT)/$(FX_GLIDE_HW)/include -I$(BUILD_ROOT)/swlibs/include $(LDFLAGS)
|
||||
|
||||
fxgasm.h: fxgasm
|
||||
./fxgasm > fxgasm.h
|
||||
fxinline.h: fxgasm
|
||||
./fxgasm -inline > fxinline.h
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# special rules for making FXBLDNO.H
|
||||
#
|
||||
|
||||
fxbldno: fxbldno.c $(HEADERS) $(PRIVATE_HEADERS)
|
||||
$(CC) -o $@ fxbldno.c $(GCDEFS) $(LCDEFS) $(VCDEFS) $(LCOPTS) $(LDFLAGS)
|
||||
|
||||
fxbldno.h: fxbldno.exe
|
||||
fxbldno > fxbldno.h
|
||||
|
||||
glide.res: rcver.h fxbldno.h
|
||||
gglide.obj: rcver.h
|
||||
|
||||
ifeq ($(FX_GLIDE_CTRISETUP),1)
|
||||
gdraw.o: fxinline.h
|
||||
endif
|
||||
|
||||
xdraw2.o : xdraw2.S xdraw2.inc.S fxgasm.h fxinline.h
|
||||
gasp xdraw2.S $(ASM_OPTS) $(LAOPTS) | as -V -Qy -o xdraw2.o
|
||||
|
||||
cpudtect.o :
|
||||
gasp cpudtect.S $(LAOPTS) | as -V -Qy -o cpudtect.o
|
||||
@@ -1,28 +0,0 @@
|
||||
|
||||
#define MANVERSION 2
|
||||
#define MANREVISION 53
|
||||
|
||||
#ifndef GLIDE3
|
||||
#define VERSIONSTR "2.53\0"
|
||||
#else
|
||||
#define VERSIONSTR "3.0\0"
|
||||
#endif
|
||||
|
||||
#if defined(CVG) || defined(VOODOO2)
|
||||
# define HWSTR " Voodoo(tm)\0"
|
||||
# ifdef NT_BUILD
|
||||
# define PRODNAME "Glide(tm) for Voodoo\251 and Windows\256 NT\0"
|
||||
# else
|
||||
# define PRODNAME "Glide(tm) for Voodoo\251 and Windows\256 95/98\0"
|
||||
# endif /* NT_BUILD */
|
||||
#elif defined(H3)
|
||||
# define HWSTR " Banshee(tm)\0"
|
||||
# ifdef NT_BUILD
|
||||
# define PRODNAME "Glide(tm) for Banshee\251 and Windows\256 NT\0"
|
||||
# else
|
||||
# define PRODNAME "Glide(tm) for Banshee\251 and Windows\256 95/98\0"
|
||||
# endif /* NT_BUILD */
|
||||
#else
|
||||
# define PRODNAME "Something really, really important\0"
|
||||
# define HWSTR "Unknown Chip\0"
|
||||
#endif
|
||||
@@ -1,41 +0,0 @@
|
||||
GDEBUG levels:
|
||||
|
||||
Level Description
|
||||
----- ------------------------------------------------
|
||||
80 init routines
|
||||
81 gu3df*
|
||||
82 grLfb*
|
||||
83 grSst*
|
||||
84 grSstStatus, grSstIsBusy, grSstVideoLine
|
||||
85 gr* misc state routines
|
||||
86 grBuffer*
|
||||
87 grDisableAllEffects, grGlide?etState
|
||||
88 grTex* attribute routines
|
||||
89 grTex* download routines
|
||||
90 grDrawPoint
|
||||
91 grDrawLine
|
||||
92 grDrawTriangle
|
||||
93 grDrawPolygon*
|
||||
94 grDrawAAPoint
|
||||
95 grDrawAALine
|
||||
96 grDrawAATriangle
|
||||
97 grDrawAAPolygon*
|
||||
98 guMP* routines
|
||||
99 gu* misc. routines
|
||||
280 internal init routines
|
||||
281 routine exit traces
|
||||
282 dataList values
|
||||
|
||||
GLIDE_PLATFORM:
|
||||
|
||||
GLIDE_HARDWARE:
|
||||
Defined if GLIDE should use the actual SST hardware.
|
||||
|
||||
GLIDE_HW_*:
|
||||
GLIDE_HW_SST1:
|
||||
This macro is for compiling
|
||||
GLIDE_HW_SST96:
|
||||
This macro is for compiling Glide for SST96
|
||||
GLIDE_HW_H3:
|
||||
This macro is for compiling Glide for H3
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,259 +0,0 @@
|
||||
## 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
|
||||
##
|
||||
## $Header$
|
||||
## $Revision$
|
||||
## $Log$
|
||||
## Revision 1.2 1999/12/11 00:42:21 joseph
|
||||
## Changed \(.data) to .section .data to fix build errors with binutils 2.9.5.
|
||||
##
|
||||
## Revision 1.1.1.1 1999/12/07 21:49:13 joseph
|
||||
## Initial checkin into SourceForge.
|
||||
##
|
||||
##
|
||||
##
|
||||
## 7 5/18/98 12:16p Peter
|
||||
## culling enabling
|
||||
#
|
||||
# 6 1/15/98 1:12p Peter
|
||||
# dispatch w/o packing
|
||||
#
|
||||
# 5 11/06/97 3:47p Peter
|
||||
#
|
||||
# 4 11/04/97 5:04p Peter
|
||||
# cataclysm part deux
|
||||
#
|
||||
# 3 11/01/97 10:01a Peter
|
||||
# tri dispatch stuff
|
||||
#
|
||||
# 2 10/30/97 6:53p Peter
|
||||
# first real cut at tri asm
|
||||
#
|
||||
# 1 10/30/97 4:29p Peter
|
||||
# asm tri code
|
||||
#
|
||||
# 2 7/07/97 2:14p Jdt
|
||||
# assembly now on par with C code.
|
||||
#
|
||||
# 1 7/07/97 8:37a Jdt
|
||||
# B4 Chip field fix.
|
||||
##
|
||||
|
||||
.file "xdraw2.s"
|
||||
#OPTION OLDSTRUCTS
|
||||
# 586P
|
||||
|
||||
# This was xdraw2.s but I renamed it for now to work with the shared
|
||||
# swlibs. It hasn't changed to the format used in the .S files for
|
||||
# the Voodoo3 Glide soruces.
|
||||
|
||||
# some useful floating load and store macros <ala gmt>
|
||||
#flds TEXTEQU <fld DWORD PTR>
|
||||
#fsubs TEXTEQU <fsub DWORD PTR>
|
||||
#fmuls TEXTEQU <fmul DWORD PTR>
|
||||
|
||||
.align 4
|
||||
.section .data
|
||||
One .DATA 0x03f800000
|
||||
Area .DATA 0
|
||||
dxAB .DATA 0
|
||||
dxBC .DATA 0
|
||||
dyAB .DATA 0
|
||||
dyBC .DATA 0
|
||||
culltest .DATA 0
|
||||
|
||||
## Extra junk to pad out to the next cache line.
|
||||
bias0 .DATA 0
|
||||
pad1 .DATA 0
|
||||
pad2 .DATA 0
|
||||
pad3 .DATA 0
|
||||
pad4 .DATA 0
|
||||
pad5 .DATA 0
|
||||
pad6 .DATA 0
|
||||
pad7 .DATA 0
|
||||
bias1 .DATA 0
|
||||
|
||||
# _DATA ENDS
|
||||
|
||||
# Ugly, but seems to workaround the problem with locally defined
|
||||
# data segment globals not getting relocated properly when using
|
||||
# djgpp.
|
||||
|
||||
zArea .EQU One+0x04
|
||||
zdxAB .EQU One+0x08
|
||||
zdxBC .EQU One+0x0c
|
||||
zdyAB .EQU One+0x10
|
||||
zdyBC .EQU One+0x14
|
||||
zculltest .EQU One+0x18
|
||||
|
||||
### Definitions of cvg regs and glide root structures.
|
||||
.INCLUDE "fxgasm.h"
|
||||
|
||||
## enables/disables trisProcessed and trisDrawn counters
|
||||
STATS .ASSIGNA 1
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# Arguments : STKOFF = 16 from 4 pushes
|
||||
#.AIF \&GLIDE_DEBUG EQ 1
|
||||
#STKOFF .EQU 20
|
||||
#.AELSE
|
||||
STKOFF .EQU 16
|
||||
#.AENDI
|
||||
_va$ .EQU 4 + STKOFF
|
||||
_vb$ .EQU 8 + STKOFF
|
||||
_vc$ .EQU 12 + STKOFF
|
||||
|
||||
X .EQU 0
|
||||
Y .EQU 4
|
||||
# edx is used as index, loading from *src
|
||||
gc .REG (%esi) # points to graphics context
|
||||
|
||||
.text
|
||||
|
||||
.align 4
|
||||
.globl _trisetup_cull
|
||||
.type _trisetup_cull, @function
|
||||
_trisetup_cull:
|
||||
# .code
|
||||
|
||||
.MACRO SYMNAME prefix
|
||||
.LCULL\prefix:
|
||||
.ENDM
|
||||
|
||||
.MACRO SYMNAMEOP op prefix
|
||||
\op .LCULL\prefix
|
||||
.ENDM
|
||||
|
||||
GLIDE_CULLING .ASSIGNA 1
|
||||
GLIDE_PACK_RGB .ASSIGNA 0
|
||||
GLIDE_PACK_ALPHA .ASSIGNA 0
|
||||
GLIDE_GENERIC_SETUP .ASSIGNA 0
|
||||
.INCLUDE "xdraw2.inc.S"
|
||||
GLIDE_GENERIC_SETUP .ASSIGNA 0
|
||||
GLIDE_PACK_ALPHA .ASSIGNA 0
|
||||
GLIDE_PACK_RGB .ASSIGNA 0
|
||||
GLIDE_CULLING .ASSIGNA 0
|
||||
.L_end_trisetup_cull:
|
||||
.size _trisetup_cull,.L_end_trisetup_cull-_trisetup_cull
|
||||
|
||||
.MACRO SYMNAME prefix
|
||||
.LNOCULL\prefix:
|
||||
.ENDM
|
||||
|
||||
.MACRO SYMNAMEOP op prefix
|
||||
\op .LNOCULL\prefix
|
||||
.ENDM
|
||||
.AIF \&GLIDE_PACKED_RGB EQ 1
|
||||
.align 4
|
||||
.globl _trisetup_cull_rgb
|
||||
.type _trisetup_cull_rgb, @function
|
||||
_trisetup_cull_rgb:
|
||||
# .code
|
||||
|
||||
GLIDE_CULLING .ASSIGNA 1
|
||||
GLIDE_PACK_RGB .ASSIGNA 1
|
||||
GLIDE_PACK_ALPHA .ASSIGNA 0
|
||||
GLIDE_GENERIC_SETUP .ASSIGNA 0
|
||||
.INCLUDE "xdraw2.inc.S"
|
||||
GLIDE_GENERIC_SETUP .ASSIGNA 0
|
||||
GLIDE_PACK_ALPHA .ASSIGNA 0
|
||||
GLIDE_PACK_RGB .ASSIGNA 0
|
||||
GLIDE_CULLING .ASSIGNA 0
|
||||
.L_end_trisetup_cull_rgb:
|
||||
.size _trisetup_cull_rgb,.L_end_trisetup_cull_rgb-_trisetup_cull_rgb
|
||||
|
||||
.align 4
|
||||
.globl _trisetup_cull_argb
|
||||
.type _trisetup_cull_argb, @function
|
||||
_trisetup_cull_argb:
|
||||
# .code
|
||||
|
||||
GLIDE_CULLING .ASSIGNA 1
|
||||
GLIDE_PACK_RGB .ASSIGNA 1
|
||||
GLIDE_PACK_ALPHA .ASSIGNA 1
|
||||
GLIDE_GENERIC_SETUP .ASSIGNA 0
|
||||
.INCLUDE "xdraw2.inc.S"
|
||||
GLIDE_GENERIC_SETUP .ASSIGNA 0
|
||||
GLIDE_PACK_ALPHA .ASSIGNA 0
|
||||
GLIDE_PACK_RGB .ASSIGNA 0
|
||||
GLIDE_CULLING .ASSIGNA 0
|
||||
.L_end_trisetup_cull_argb:
|
||||
.size _trisetup_cull_argb,.L_end_trisetup_cull_argb-_trisetup_cull_argb
|
||||
|
||||
.AENDI
|
||||
.align 4
|
||||
.global _trisetup
|
||||
.type _trisetup, @function
|
||||
_trisetup:
|
||||
# .code
|
||||
|
||||
GLIDE_CULLING .ASSIGNA 0
|
||||
GLIDE_PACK_RGB .ASSIGNA 0
|
||||
GLIDE_PACK_ALPHA .ASSIGNA 0
|
||||
GLIDE_GENERIC_SETUP .ASSIGNA 0
|
||||
.INCLUDE "xdraw2.inc.S"
|
||||
GLIDE_GENERIC_SETUP .ASSIGNA 0
|
||||
GLIDE_PACK_ALPHA .ASSIGNA 0
|
||||
GLIDE_PACK_RGB .ASSIGNA 0
|
||||
GLIDE_CULLING .ASSIGNA 0
|
||||
.L_end_trisetup:
|
||||
.size _trisetup,.L_end_trisetup-_trisetup
|
||||
|
||||
.AIF \&GLIDE_PACKED_RGB EQ 1
|
||||
.align 4
|
||||
.globl _trisetup_rgb
|
||||
.type _trisetup_rgb, @function
|
||||
_trisetup_rgb:
|
||||
# .code
|
||||
|
||||
GLIDE_CULLING .ASSIGNA 0
|
||||
GLIDE_PACK_RGB .ASSIGNA 1
|
||||
GLIDE_PACK_ALPHA .ASSIGNA 0
|
||||
GLIDE_GENERIC_SETUP .ASSIGNA 0
|
||||
.INCLUDE "xdraw2.inc.S"
|
||||
GLIDE_GENERIC_SETUP .ASSIGNA 0
|
||||
GLIDE_PACK_ALPHA .ASSIGNA 0
|
||||
GLIDE_PACK_RGB .ASSIGNA 0
|
||||
GLIDE_CULLING .ASSIGNA 0
|
||||
.L_end_trisetup_rgb:
|
||||
.size _trisetup_rgb,.L_end_trisetup_rgb-_trisetup_rgb
|
||||
|
||||
.align 4
|
||||
.globl _trisetup_argb
|
||||
.type _trisetup_argb, @function
|
||||
_trisetup_argb:
|
||||
# .code
|
||||
|
||||
GLIDE_CULLING .ASSIGNA 0
|
||||
GLIDE_PACK_RGB .ASSIGNA 1
|
||||
GLIDE_PACK_ALPHA .ASSIGNA 1
|
||||
GLIDE_GENERIC_SETUP .ASSIGNA 0
|
||||
INCLUDE xdraw2.inc
|
||||
GLIDE_GENERIC_SETUP .ASSIGNA 0
|
||||
GLIDE_PACK_ALPHA .ASSIGNA 0
|
||||
GLIDE_PACK_RGB .ASSIGNA 0
|
||||
GLIDE_CULLING .ASSIGNA 0
|
||||
.L_end_trisetup_argb:
|
||||
.size _trisetup_argb,.L_end_trisetup_argb-_trisetup_argb
|
||||
.AENDI
|
||||
|
||||
#_TEXT ENDS
|
||||
.END
|
||||
|
||||
|
||||
|
||||
@@ -1,220 +0,0 @@
|
||||
;; 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
|
||||
;;
|
||||
;; $Header$
|
||||
;; $Revision$
|
||||
;; $Log$
|
||||
;;
|
||||
;; 7 5/18/98 12:16p Peter
|
||||
;; culling enabling
|
||||
;
|
||||
; 6 1/15/98 1:12p Peter
|
||||
; dispatch w/o packing
|
||||
;
|
||||
; 5 11/06/97 3:47p Peter
|
||||
;
|
||||
; 4 11/04/97 5:04p Peter
|
||||
; cataclysm part deux
|
||||
;
|
||||
; 3 11/01/97 10:01a Peter
|
||||
; tri dispatch stuff
|
||||
;
|
||||
; 2 10/30/97 6:53p Peter
|
||||
; first real cut at tri asm
|
||||
;
|
||||
; 1 10/30/97 4:29p Peter
|
||||
; asm tri code
|
||||
;
|
||||
; 2 7/07/97 2:14p Jdt
|
||||
; assembly now on par with C code.
|
||||
;
|
||||
; 1 7/07/97 8:37a Jdt
|
||||
; B4 Chip field fix.
|
||||
;;
|
||||
|
||||
TITLE xdraw2.asm
|
||||
OPTION OLDSTRUCTS
|
||||
.586P
|
||||
|
||||
.model FLAT,C ; Flat memory, mangle publics with leading '_'
|
||||
|
||||
; some useful floating load and store macros <ala gmt>
|
||||
flds TEXTEQU <fld DWORD PTR>
|
||||
fsubs TEXTEQU <fsub DWORD PTR>
|
||||
fmuls TEXTEQU <fmul DWORD PTR>
|
||||
|
||||
_DATA SEGMENT
|
||||
One DD 03f800000r
|
||||
Area DD 0
|
||||
dxAB DD 0
|
||||
dxBC DD 0
|
||||
dyAB DD 0
|
||||
dyBC DD 0
|
||||
culltest DD 0
|
||||
|
||||
;; Extra junk to pad out to the next cache line.
|
||||
bias0 DD 0
|
||||
pad1 DD 0
|
||||
pad2 DD 0
|
||||
pad3 DD 0
|
||||
pad4 DD 0
|
||||
pad5 DD 0
|
||||
pad6 DD 0
|
||||
pad7 DD 0
|
||||
bias1 DD 0
|
||||
_DATA ENDS
|
||||
|
||||
; Ugly, but seems to workaround the problem with locally defined
|
||||
; data segment globals not getting relocated properly when using
|
||||
; djgpp.
|
||||
|
||||
zArea TEXTEQU <One+04h>
|
||||
zdxAB TEXTEQU <One+08h>
|
||||
zdxBC TEXTEQU <One+0ch>
|
||||
zdyAB TEXTEQU <One+10h>
|
||||
zdyBC TEXTEQU <One+14h>
|
||||
zculltest TEXTEQU <One+18h>
|
||||
|
||||
;;; Definitions of cvg regs and glide root structures.
|
||||
INCLUDE fxgasm.h
|
||||
|
||||
;; enables/disables trisProcessed and trisDrawn counters
|
||||
STATS = 1
|
||||
|
||||
;--------------------------------------------------------------------------
|
||||
; Arguments (STKOFF = 16 from 4 pushes)
|
||||
STKOFF = 16
|
||||
_va$ = 4 + STKOFF
|
||||
_vb$ = 8 + STKOFF
|
||||
_vc$ = 12 + STKOFF
|
||||
|
||||
X = 0
|
||||
Y = 4
|
||||
; edx is used as index, loading from *src
|
||||
gc TEXTEQU <esi> ; points to graphics context
|
||||
|
||||
_TEXT SEGMENT
|
||||
|
||||
align 4
|
||||
PUBLIC _trisetup_cull@12
|
||||
_trisetup_cull@12 PROC NEAR
|
||||
.code
|
||||
|
||||
GLIDE_CULLING textequ <1>
|
||||
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>
|
||||
|
||||
_trisetup_cull@12 ENDP
|
||||
|
||||
IF GLIDE_PACKED_RGB
|
||||
align 4
|
||||
PUBLIC _trisetup_cull_rgb@12
|
||||
_trisetup_cull_rgb@12 PROC NEAR
|
||||
.code
|
||||
|
||||
GLIDE_CULLING textequ <1>
|
||||
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>
|
||||
|
||||
_trisetup_cull_rgb@12 ENDP
|
||||
|
||||
align 4
|
||||
PUBLIC _trisetup_cull_argb@12
|
||||
_trisetup_cull_argb@12 PROC NEAR
|
||||
.code
|
||||
|
||||
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>
|
||||
|
||||
_trisetup_cull_argb@12 ENDP
|
||||
ENDIF ; GLIDE_PACKED_RGB
|
||||
|
||||
align 4
|
||||
PUBLIC _trisetup@12
|
||||
_trisetup@12 PROC NEAR
|
||||
.code
|
||||
|
||||
GLIDE_CULLING textequ <0>
|
||||
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>
|
||||
|
||||
_trisetup@12 ENDP
|
||||
|
||||
IF GLIDE_PACKED_RGB
|
||||
align 4
|
||||
PUBLIC _trisetup_rgb@12
|
||||
_trisetup_rgb@12 PROC NEAR
|
||||
.code
|
||||
|
||||
GLIDE_CULLING textequ <0>
|
||||
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>
|
||||
|
||||
_trisetup_rgb@12 ENDP
|
||||
|
||||
align 4
|
||||
PUBLIC _trisetup_argb@12
|
||||
_trisetup_argb@12 PROC NEAR
|
||||
.code
|
||||
|
||||
GLIDE_CULLING textequ <0>
|
||||
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>
|
||||
|
||||
_trisetup_argb@12 ENDP
|
||||
ENDIF ; GLIDE_PACKED_RGB
|
||||
|
||||
_TEXT ENDS
|
||||
END
|
||||
@@ -1,310 +0,0 @@
|
||||
;; -*-asm-*-
|
||||
;; 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
|
||||
;;
|
||||
;; $Header$
|
||||
;; $Revision$
|
||||
;; $Log$
|
||||
;
|
||||
; 2 10/30/97 6:53p Peter
|
||||
; first real cut at tri asm
|
||||
;
|
||||
; 1 10/30/97 4:29p Peter
|
||||
; asm tri code
|
||||
;
|
||||
; 2 7/07/97 2:14p Jdt
|
||||
; assembly now on par with C code.
|
||||
;
|
||||
; 1 7/07/97 8:37a Jdt
|
||||
; B4 Chip field fix.
|
||||
;;
|
||||
|
||||
TITLE xdraw2.inc
|
||||
.586P
|
||||
|
||||
EXTRN _GlideRoot:DWORD
|
||||
EXTRN _FifoMakeRoom:NEAR
|
||||
|
||||
|
||||
; Ugly, but seems to workaround the problem with locally defined
|
||||
; data segment globals not getting relocated properly when using
|
||||
; djgpp.
|
||||
|
||||
zArea TEXTEQU <One+04h>
|
||||
zdxAB TEXTEQU <One+08h>
|
||||
zdxBC TEXTEQU <One+0ch>
|
||||
zdyAB TEXTEQU <One+10h>
|
||||
zdyBC TEXTEQU <One+14h>
|
||||
zculltest TEXTEQU <One+18h>
|
||||
|
||||
gc TEXTEQU <esi> ; points to graphics context
|
||||
|
||||
;; Prologue stuff
|
||||
push esi
|
||||
push edi
|
||||
|
||||
push ebx
|
||||
push ebp
|
||||
|
||||
mov gc, [_GlideRoot + curGC] ;; GR_DCL_GC
|
||||
|
||||
align 4
|
||||
IF GLIDE_CULLING
|
||||
fa TEXTEQU <eax> ; vtx a from caller
|
||||
fb TEXTEQU <ebx> ; vtx b from caller
|
||||
fc TEXTEQU <ecx> ; vtx c from caller
|
||||
|
||||
cull TEXTEQU <edx>
|
||||
intArea TEXTEQU <ebp> ; temp Y storage
|
||||
|
||||
;; Pre-load the current culling mode before all of the
|
||||
;; floating point area stuff.
|
||||
mov cull, [gc + cull_mode]
|
||||
mov fa, [esp + _va$]
|
||||
|
||||
mov fb, [esp + _vb$]
|
||||
mov fc, [esp + _vc$]
|
||||
|
||||
shl cull, 31 ; culltest << 31
|
||||
|
||||
Area_Computation:
|
||||
; 47-3
|
||||
; jmp ret_pop0f
|
||||
flds [fa + X] ; xa
|
||||
fsubs [fb + X] ; dxAB
|
||||
flds [fb + X] ; | xb
|
||||
fsubs [fc + X] ; | dxBC
|
||||
flds [fb + Y] ; | | yb
|
||||
fsubs [fc + Y] ; | | dyBC
|
||||
flds [fa + Y] ; | | | ya
|
||||
fsubs [fb + Y] ; | | | dyAB
|
||||
fld st(3) ; | | | | dxAB
|
||||
fmul st, st(2) ; | | | | t0 t0=dxAB*dyBC
|
||||
fld st(3) ; | | | | | dxBC
|
||||
fmul st, st(2) ; | | | | | t1 t1=dxBC*dyAB
|
||||
fsubp st(1),st ; | | | | area
|
||||
fst zArea ; | | | | area
|
||||
|
||||
;; Pop temp things from the sw culling off the fp stack
|
||||
fstp st(0) ; 4
|
||||
fstp st(0) ; 3
|
||||
fstp st(0) ; 2
|
||||
fstp st(0) ; 1
|
||||
fstp st(0) ; 0
|
||||
|
||||
mov intArea, zArea ; j = *(long *)&area
|
||||
xor eax, eax ; Clear the return value (0 == culled)
|
||||
|
||||
; Zero Area Triangle Check
|
||||
and intArea, 7fffffffh ; if ((j & 0x7FFFFFFF) == 0)
|
||||
jz __triDone
|
||||
|
||||
;; Triangle area check vs culling mode
|
||||
mov intArea, zArea ; reload area just in case we're culling
|
||||
xor intArea, cull ; if (j ^ (culltest << 31))
|
||||
|
||||
jge __triDone
|
||||
ENDIF ; GLIDE_CULLING
|
||||
|
||||
align 4
|
||||
;; Check to make sure that we have enough room for
|
||||
;; the complete triangle packet.
|
||||
mov eax, [_GlideRoot + curTriSize]
|
||||
mov ebx, [gc + fifoRoom]
|
||||
|
||||
add eax, 4
|
||||
cmp ebx, eax
|
||||
|
||||
jge __triBegin
|
||||
|
||||
push @Line
|
||||
push 0h
|
||||
|
||||
push eax
|
||||
call _FifoMakeRoom
|
||||
|
||||
add esp, 12
|
||||
|
||||
;; Send triangle parameters
|
||||
|
||||
dlp TEXTEQU <ebx> ; points to dataList structure
|
||||
fifo TEXTEQU <ebp> ; points to next entry in fifo
|
||||
vertex TEXTEQU <edx> ; the current vertex
|
||||
vOffset TEXTEQU <ecx> ; Current vertex offset
|
||||
|
||||
packCol TEXTEQU <edi>
|
||||
tempVal TEXTEQU <edi>
|
||||
|
||||
GR_FIFO_WRITE MACRO __addr, __offset, __data
|
||||
mov [__addr + __offset], __data
|
||||
ENDM ; GR_FIFO_WRITE
|
||||
|
||||
align 4
|
||||
__triBegin:
|
||||
mov fifo, [gc + fifoPtr] ; Fetch Fifo Ptr
|
||||
mov vOffset, 4 ; Starting vertex
|
||||
|
||||
mov eax, [gc + triPacketHdr] ; Packet 3 header
|
||||
nop
|
||||
|
||||
GR_FIFO_WRITE fifo, 0, eax ; Write packet header to fifo
|
||||
add fifo, 4 ; Advance fifo for hdr & x/y coordinate
|
||||
|
||||
align 4
|
||||
__vertexStart:
|
||||
mov vertex, [esp + STKOFF + vOffset] ; Current vertex
|
||||
add fifo, 8
|
||||
|
||||
nop ; Avoid p5 agi w/ load of vertex ptr
|
||||
nop
|
||||
|
||||
mov eax, DWORD PTR [vertex + x] ; X
|
||||
lea dlp, [gc + tsuDataList] ; Reset the dataList
|
||||
|
||||
GR_FIFO_WRITE fifo, -8, eax ; PCI write X
|
||||
mov eax, DWORD PTR [vertex + y] ; Y
|
||||
|
||||
xor packCol, packCol ; Clear packed color
|
||||
GR_FIFO_WRITE fifo, -4, eax ; PCI write Y
|
||||
|
||||
IF GLIDE_PACK_RGB
|
||||
fld DWORD PTR [vertex + b] ; B
|
||||
fadd DWORD PTR _GlideRoot + fBiasLo ; BC GC
|
||||
|
||||
fld DWORD PTR [vertex + g] ; G B
|
||||
fadd DWORD PTR _GlideRoot + fBiasHi ; GC B
|
||||
|
||||
fld DWORD PTR [vertex + r] ; R GC BC
|
||||
fadd DWORD PTR _GlideRoot + fBiasHi ; RC GC BC
|
||||
|
||||
fxch st(2) ; BC GC RC
|
||||
fstp DWORD PTR bias0 ; GC RC
|
||||
|
||||
fstp DWORD PTR bias1 ; RC
|
||||
mov packCol, DWORD PTR bias0 ; B + bias
|
||||
|
||||
fstp DWORD PTR bias0
|
||||
mov eax, DWORD PTR bias1 ; G + bias
|
||||
|
||||
IF GLIDE_PACK_ALPHA
|
||||
fld DWORD PTR [vertex + a]
|
||||
fadd DWORD PTR _GlideRoot + fBiasHi
|
||||
|
||||
and packCol, 00FFh ; B color component
|
||||
and eax, 0000FF00h ; G component << 8
|
||||
|
||||
add dlp, 8 ; Packed RGB + A dataList entry
|
||||
nop
|
||||
|
||||
or packCol, eax ; 0000GGBB
|
||||
nop
|
||||
|
||||
fstp DWORD PTR bias1
|
||||
mov eax, DWORD PTR bias0 ; R + bias
|
||||
|
||||
mov esi, DWORD PTR bias1 ; A + bias
|
||||
and eax, 0000FF00h ; R component << 8
|
||||
|
||||
and esi, 0FFFFFF00h ; A component << 8
|
||||
shl eax, 8 ; R << 16
|
||||
|
||||
or packCol, eax ; 00RRGGBB
|
||||
shl esi, 16 ; A << 16
|
||||
|
||||
or packCol, esi ; AARRGGBB
|
||||
nop
|
||||
ELSE ; !GLIDE_PACK_ALPHA
|
||||
and packCol, 00FFh ; B color component
|
||||
and eax, 0000FF00h ; G component << 8
|
||||
|
||||
add dlp, 4 ; Next dataList item
|
||||
or packCol, eax
|
||||
|
||||
mov eax, DWORD PTR bias0 ; R + bias
|
||||
and eax, 0000FF00h ; R component << 8
|
||||
|
||||
shl eax, 8 ; R << 16
|
||||
or packCol, eax ; 00RRGGBB
|
||||
ENDIF ; !GLIDE_PACK_ALPHA
|
||||
|
||||
GR_FIFO_WRITE fifo, 0, packCol ; PCI write packed color value
|
||||
add fifo, 4
|
||||
ENDIF ; GLIDE_PACK_RGB
|
||||
|
||||
__doParams:
|
||||
mov eax, DWORD PTR [dlp] ; Get first offset from the data list
|
||||
add dlp, 4 ; dlp++
|
||||
|
||||
cmp eax, 0 ; Are we done?
|
||||
je __nextVertex
|
||||
|
||||
;; Not using align directive here because it sometimes
|
||||
;; introduces an agi for the eax use below.
|
||||
nop
|
||||
nop
|
||||
|
||||
__paramLoop:
|
||||
mov tempVal, DWORD PTR [eax + vertex] ; Get the parameter from teh vertex
|
||||
add fifo, 4 ; fifoPtr += sizeof(FxU32)
|
||||
|
||||
mov eax, DWORD PTR [dlp] ; offset = *(dlp + 1)
|
||||
add dlp, 4 ; dlp++
|
||||
|
||||
cmp eax, 0 ; Are we done?
|
||||
GR_FIFO_WRITE fifo, -4, tempVal ; *fifoPtr = data
|
||||
|
||||
jne SHORT __paramLoop
|
||||
|
||||
align 4
|
||||
__nextVertex:
|
||||
;; On to the next vertex
|
||||
add vOffset, 4
|
||||
mov gc, [_GlideRoot + curGC] ; Reload gc incase we trashed it as a temp
|
||||
|
||||
cmp vOffset, 16 ; Offset of one past last vertex?
|
||||
jne __vertexStart
|
||||
|
||||
;; Update gc->fifoPtr and gc->fifoRoom
|
||||
mov eax, fifo
|
||||
mov ebx, [gc + fifoPtr]
|
||||
|
||||
mov [gc + fifoPtr], fifo
|
||||
sub eax, ebx
|
||||
|
||||
mov ebx, [_GlideRoot + trisDrawn] ; _GlideRoot.stats.trisDrawn++;
|
||||
sub [gc + fifoRoom], eax
|
||||
|
||||
add ebx, 1
|
||||
mov [_GlideRoot + trisDrawn], ebx
|
||||
|
||||
;; return 1 (triangle drawn)
|
||||
mov eax, 1h
|
||||
|
||||
__triDone:
|
||||
;; Restore trashed registers
|
||||
mov esi, [_GlideRoot + trisProcessed]
|
||||
pop ebp
|
||||
|
||||
add esi, 1 ; _GlideRoot.stats.trisProcessed++;
|
||||
pop ebx
|
||||
|
||||
pop edi
|
||||
mov [_GlideRoot + trisProcessed], esi
|
||||
|
||||
pop esi
|
||||
ret 12
|
||||
@@ -1,315 +0,0 @@
|
||||
## -*-asm-*-
|
||||
## 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
|
||||
##
|
||||
## $Header$
|
||||
## $Revision$
|
||||
## $Log$
|
||||
## Revision 1.1.1.1 1999/12/07 21:49:13 joseph
|
||||
## Initial checkin into SourceForge.
|
||||
##
|
||||
#
|
||||
# 2 10/30/97 6:53p Peter
|
||||
# first real cut at tri asm
|
||||
#
|
||||
# 1 10/30/97 4:29p Peter
|
||||
# asm tri code
|
||||
#
|
||||
# 2 7/07/97 2:14p Jdt
|
||||
# assembly now on par with C code.
|
||||
#
|
||||
# 1 7/07/97 8:37a Jdt
|
||||
# B4 Chip field fix.
|
||||
##
|
||||
|
||||
.file "xdraw2.inc.s"
|
||||
#.586P
|
||||
|
||||
#EXTRN _GlideRoot:DWORD
|
||||
#EXTRN _FifoMakeRoom:NEAR
|
||||
|
||||
# Ugly, but seems to workaround the problem with locally defined
|
||||
# data segment globals not getting relocated properly when using
|
||||
# djgpp.
|
||||
|
||||
#zArea .EQU One+4
|
||||
#zdxAB .EQU One+8
|
||||
#zdxBC .EQU One+12
|
||||
#zdyAB .EQU One+16
|
||||
#zdyBC .EQU One+20
|
||||
#zculltest .EQU One+24
|
||||
|
||||
gc .REG (%esi) # points to graphics context
|
||||
|
||||
## Prologue stuff
|
||||
push %esi
|
||||
push %edi
|
||||
|
||||
push %ebx
|
||||
push %ebp
|
||||
|
||||
mov (_GlideRoot + curGC), gc ## GR_DCL_GC
|
||||
|
||||
.align 4
|
||||
.AIF \&GLIDE_CULLING EQ 1
|
||||
fa .REG (%eax) # vtx a from caller
|
||||
fb .REG (%ebx) # vtx b from caller
|
||||
fc .REG (%ecx) # vtx c from caller
|
||||
|
||||
cull .REG (%edx)
|
||||
intArea .REG (%ebp) # temp Y storage
|
||||
|
||||
## Pre-load the current culling mode before all of the
|
||||
## floating point area stuff.
|
||||
mov cull_mode(gc), cull
|
||||
mov _va$(%esp), fa
|
||||
|
||||
mov _vb$(%esp), fb
|
||||
mov _vc$(%esp), fc
|
||||
|
||||
shl $31, cull
|
||||
|
||||
SYMNAME Area_Computation
|
||||
# 47-3
|
||||
# jmp ret_pop0f
|
||||
flds X(fa) # xa
|
||||
fsubs X(fb) # dxAB
|
||||
flds X(fb) # | xb
|
||||
fsubs X(fc) # | dxBC
|
||||
flds Y(fb) # | | yb
|
||||
fsubs Y(fc) # | | dyBC
|
||||
flds Y(fa) # | | | ya
|
||||
fsubs Y(fb) # | | | dyAB
|
||||
fld %st(3) # | | | | dxAB
|
||||
fmul %st(2), %st # | | | | t0 t0=dxAB*dyBC
|
||||
fld %st(3) # | | | | | dxBC
|
||||
fmul %st(2), %st # | | | | | t1 t1=dxBC*dyAB
|
||||
fsubrp %st, %st(1) # | | | | area
|
||||
fsts zArea # | | | | area
|
||||
|
||||
## Pop temp things from the sw culling off the fp stack
|
||||
fstp %st # 4
|
||||
fstp %st # 3
|
||||
fstp %st # 2
|
||||
fstp %st # 1
|
||||
fstp %st # 0
|
||||
|
||||
mov zArea, intArea # j = *(long *)&area
|
||||
xor %eax, %eax # Clear the returnv value (0 == culled)
|
||||
|
||||
# Zero Area Triangle Check
|
||||
and $0x7fffffff, intArea # if ((j & 0x7FFFFFFF) == 0)
|
||||
SYMNAMEOP jz, __triDone
|
||||
|
||||
## Triangle area check vs culling mode
|
||||
mov zArea, intArea
|
||||
xor cull, intArea
|
||||
|
||||
SYMNAMEOP jge, __triDone
|
||||
|
||||
.AENDI
|
||||
.align 4
|
||||
## Check to make sure that we have enough room for
|
||||
## the complete triangle packet.
|
||||
mov (_GlideRoot + curTriSize), %eax
|
||||
mov fifoRoom(gc), %ebx
|
||||
|
||||
add $4, %eax
|
||||
cmp %eax, %ebx
|
||||
|
||||
SYMNAMEOP jge, __triBegin
|
||||
|
||||
push $0
|
||||
push $0
|
||||
|
||||
push %eax
|
||||
call _FifoMakeRoom
|
||||
|
||||
add $12, %esp
|
||||
|
||||
## Send triangle parameters
|
||||
|
||||
dlp .REG (%ebx) # points to dataList structure
|
||||
fifo .REG (%ebp) # points to next entry in fifo
|
||||
vertex .REG (%edx) # the current vertex
|
||||
vOffset .REG (%ecx) # Current vertex offset
|
||||
|
||||
packCol .REG (%edi)
|
||||
tempVal .REG (%edi)
|
||||
|
||||
.MACRO GR_FIFO_WRITE __addr __offset __data
|
||||
mov \__data, \__offset(\__addr)
|
||||
.ENDM # GR_FIFO_WRITE
|
||||
|
||||
.align 4
|
||||
SYMNAME __triBegin
|
||||
mov fifoPtr(gc), fifo # Fetch Fifo Ptr
|
||||
mov $4, vOffset # Starting vertex
|
||||
|
||||
mov triPacketHdr(gc), %eax # Packet 3 header
|
||||
nop
|
||||
|
||||
# Write packet header to fifo
|
||||
GR_FIFO_WRITE fifo, 0, %eax
|
||||
add $4, fifo # Advance fifo for hdr & x/y coordinate
|
||||
|
||||
.align 4
|
||||
SYMNAME __vertexStart
|
||||
mov STKOFF(%esp,vOffset), vertex # Current vertex
|
||||
add $8, fifo
|
||||
|
||||
nop # Avoid p5 agi w/ load of vertex ptr
|
||||
nop
|
||||
|
||||
movl X(vertex), %eax # X
|
||||
lea tsuDataList(gc), dlp # Reset the dataList
|
||||
# PCI write X
|
||||
GR_FIFO_WRITE fifo, -8, %eax
|
||||
movl Y(vertex), %eax # Y
|
||||
|
||||
xor packCol, packCol # Clear packed color
|
||||
# PCI write Y
|
||||
GR_FIFO_WRITE fifo, -4, %eax
|
||||
|
||||
.AIF \&GLIDE_PACK_RGB EQ 1
|
||||
fldl b(vertex) # B
|
||||
faddl (_GlideRoot + fBiasLo) # BC GC
|
||||
|
||||
fldl g(vertex) # G B
|
||||
faddl (_GlideRoot + fBiasHi) # GC B
|
||||
|
||||
fldl r(vertex) # R GC BC
|
||||
faddl (_GlideRoot + fBiasHi) # RC GC BC
|
||||
|
||||
fxch %st(2) # BC GC RC
|
||||
fstpl bias0 # GC RC
|
||||
|
||||
fstpl bias1 # RC
|
||||
movl bias0, packCol # B + bias
|
||||
|
||||
fstpl bias0
|
||||
movl bias1, %eax # G + bias
|
||||
|
||||
.AIF \&GLIDE_PACK_ALPHA EQ 1
|
||||
fldl a(vertex)
|
||||
faddl (_GlideRoot + fBiasHi)
|
||||
|
||||
and $0x00FF, packCol # B color component
|
||||
and $0x0000FF00, %eax # G component << 8
|
||||
|
||||
add $8, dlp # Packed RGB + A dataList entry
|
||||
nop
|
||||
|
||||
or %eax, packCol # 0000GGBB
|
||||
nop
|
||||
|
||||
fstpl bias1
|
||||
movl bias0, %eax # R + bias
|
||||
|
||||
movl bias1, %esi # A + bias
|
||||
and $0x0000FF00, %eax # R component << 8
|
||||
|
||||
and $0x0FFFFFF00, %esi # A component << 8
|
||||
shl $8, eax # R << 16
|
||||
|
||||
or %eax, packCol # 00RRGGBB
|
||||
shl $16, %esi # A << 16
|
||||
|
||||
or %esi, packCol # AARRGGBB
|
||||
nop
|
||||
.AELSE # !GLIDE_PACK_ALPHA
|
||||
and $0x00FF, packCol # B color component
|
||||
and $0x0000FF00, %eax # G component << 8
|
||||
|
||||
add $4, dlp # Next dataList item
|
||||
or %eax, packCol
|
||||
|
||||
movl bias0, %eax # R + bias
|
||||
and $0x0000FF00, %eax # R component << 8
|
||||
|
||||
shl $8, eax # R << 16
|
||||
or %eax, packCol # 00RRGGBB
|
||||
.AENDI # !GLIDE_PACK_ALPHA
|
||||
|
||||
# PCI write packed color value
|
||||
GR_FIFO_WRITE fifo, 0, packCol
|
||||
add $4, fifo
|
||||
.AENDI # GLIDE_PACK_RGB
|
||||
|
||||
SYMNAME __doParams
|
||||
movl (dlp), %eax # Get first offset from the data list
|
||||
add $4, dlp # dlp++
|
||||
|
||||
cmp $0, %eax # Are we done?
|
||||
SYMNAMEOP je, __nextVertex
|
||||
|
||||
## Not using align directive here because it sometimes
|
||||
## introduces an agi for the eax use below.
|
||||
nop
|
||||
nop
|
||||
SYMNAME __paramLoop
|
||||
movl (%eax, vertex), tempVal
|
||||
add $4, fifo
|
||||
|
||||
movl (dlp), %eax
|
||||
add $4, dlp
|
||||
|
||||
cmp $0, %eax
|
||||
GR_FIFO_WRITE fifo, -4, tempVal
|
||||
|
||||
SYMNAMEOP jne, __paramLoop
|
||||
|
||||
.align 4
|
||||
SYMNAME __nextVertex
|
||||
## On to the next vertex
|
||||
add $4, vOffset
|
||||
mov (_GlideRoot + curGC), gc # Reload gc incase we trashed it as a temp
|
||||
|
||||
cmp $16, vOffset # Offset of one past last vertex?
|
||||
|
||||
SYMNAMEOP jne, __vertexStart
|
||||
|
||||
## Update gc->fifoPtr and gc->fifoRoom
|
||||
mov fifo, %eax
|
||||
mov fifoPtr(gc), %ebx
|
||||
|
||||
mov fifo, fifoPtr(gc)
|
||||
sub %ebx, %eax
|
||||
|
||||
mov (_GlideRoot + trisDrawn), %ebx
|
||||
sub %eax, fifoRoom(gc)
|
||||
|
||||
add $1, %ebx
|
||||
mov %ebx, (_GlideRoot + trisDrawn)
|
||||
|
||||
## return 1 (triangle drawn)
|
||||
mov $1, %eax
|
||||
|
||||
SYMNAME __triDone
|
||||
## Restore trashed registers
|
||||
mov (_GlideRoot + trisProcessed), %esi
|
||||
pop %ebp
|
||||
|
||||
add $1, %esi
|
||||
pop %ebx
|
||||
|
||||
pop %edi
|
||||
mov %esi, (_GlideRoot + trisProcessed)
|
||||
|
||||
pop %esi
|
||||
ret
|
||||
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,65 +0,0 @@
|
||||
@echo off
|
||||
REM
|
||||
REM if FX_GLIDE_TEST_SRCIMG is not initiated, the default directory is
|
||||
REM \3dfx\devel\sst1\glide\images
|
||||
REM if FX_GLIDE_TEST_DSTIMG is not initiated, the default directory is
|
||||
REM \3dfx\devel\sst1\glide\images
|
||||
REM if FX_GLIDE_TEST_DIFFIMG is not initiated, the default directory is
|
||||
REM \3dfx\devel\sst1\glide\images
|
||||
REM
|
||||
if [%FX_GLIDE_TEST_DIFFIMG%]==[] goto Default1
|
||||
|
||||
goto Output1
|
||||
|
||||
:Default1
|
||||
set FX_GLIDE_TEST_DIFFIMG=%BUILD_ROOT_SST1%\glide\images
|
||||
|
||||
:Output1
|
||||
set ddir=%FX_GLIDE_TEST_DIFFIMG%
|
||||
|
||||
if [%FX_GLIDE_TEST_SRCIMG%]==[] goto Default2
|
||||
|
||||
goto Output2
|
||||
|
||||
:Default2
|
||||
set FX_GLIDE_TEST_SRCIMG=%BUILD_ROOT_SST1%\glide\images
|
||||
|
||||
:Output2
|
||||
set sdir=%FX_GLIDE_TEST_SRCIMG%
|
||||
|
||||
if [%FX_GLIDE_TEST_DSTIMG%]==[] goto Default3
|
||||
|
||||
goto Output3
|
||||
|
||||
:Default3
|
||||
set FX_GLIDE_TEST_DSTIMG=%BUILD_ROOT_SST1%\glide\images
|
||||
|
||||
:Output3
|
||||
set tdir=%FX_GLIDE_TEST_DSTIMG%
|
||||
|
||||
@echo on
|
||||
isub -v %sdir%\test00.vgm %tdir%\test00.tst %ddir%\test00.tga
|
||||
isub -v %sdir%\test01.vgm %tdir%\test01.tst %ddir%\test01.tga
|
||||
isub -v %sdir%\test02.vgm %tdir%\test02.tst %ddir%\test02.tga
|
||||
isub -v %sdir%\test03.vgm %tdir%\test03.tst %ddir%\test03.tga
|
||||
isub -v %sdir%\test04.vgm %tdir%\test04.tst %ddir%\test04.tga
|
||||
isub -v %sdir%\test05.vgm %tdir%\test05.tst %ddir%\test05.tga
|
||||
isub -v %sdir%\test06.vgm %tdir%\test06.tst %ddir%\test06.tga
|
||||
isub -v %sdir%\test07.vgm %tdir%\test07.tst %ddir%\test07.tga
|
||||
isub -v %sdir%\test08.vgm %tdir%\test08.tst %ddir%\test08.tga
|
||||
isub -v %sdir%\test09_0.vgm %tdir%\test09_0.tst %ddir%\test09_0.tga
|
||||
isub -v %sdir%\test09_1.vgm %tdir%\test09_1.tst %ddir%\test09_1.tga
|
||||
isub -v %sdir%\test10_0.vgm %tdir%\test10_0.tst %ddir%\test10_0.tga
|
||||
isub -v %sdir%\test10_1.vgm %tdir%\test10_1.tst %ddir%\test10_1.tga
|
||||
isub -v %sdir%\test13.vgm %tdir%\test13.tst %ddir%\test13.tga
|
||||
isub -v %sdir%\test16.vgm %tdir%\test16.tst %ddir%\test16.tga
|
||||
isub -v %sdir%\test17_0.vgm %tdir%\test17_0.tst %ddir%\test17_0.tga
|
||||
isub -v %sdir%\test17_1.vgm %tdir%\test17_1.tst %ddir%\test17_1.tga
|
||||
isub -v %sdir%\test17_2.vgm %tdir%\test17_2.tst %ddir%\test17_2.tga
|
||||
isub -v %sdir%\test17_3.vgm %tdir%\test17_3.tst %ddir%\test17_3.tga
|
||||
isub -v %sdir%\test17_4.vgm %tdir%\test17_4.tst %ddir%\test17_4.tga
|
||||
isub -v %sdir%\test18.vgm %tdir%\test18.tst %ddir%\test18.tga
|
||||
isub -v %sdir%\test19_0.vgm %tdir%\test19_0.tst %ddir%\test19_0.tga
|
||||
isub -v %sdir%\test19_1.vgm %tdir%\test19_1.tst %ddir%\test19_1.tga
|
||||
isub -v %sdir%\test19_2.vgm %tdir%\test19_2.tst %ddir%\test19_2.tga
|
||||
isub -v %sdir%\test19_3.vgm %tdir%\test19_3.tst %ddir%\test19_3.tga
|
||||
Binary file not shown.
@@ -1,443 +0,0 @@
|
||||
/*
|
||||
** Copyright (c) 1997, 3Dfx Interactive, Inc.
|
||||
** All Rights Reserved.
|
||||
**
|
||||
** This is UNPUBLISHED PROPRIETARY SOURCE CODE of 3Dfx Interactive, Inc.;
|
||||
** the contents of this file may not be disclosed to third parties, copied or
|
||||
** duplicated in any form, in whole or in part, without the prior written
|
||||
** permission of 3Dfx Interactive, Inc.
|
||||
**
|
||||
** RESTRICTED RIGHTS LEGEND:
|
||||
** Use, duplication or disclosure by the Government is subject to restrictions
|
||||
** as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
|
||||
** and Computer Software clause at DFARS 252.227-7013, and/or in similar or
|
||||
** successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
|
||||
** rights reserved under the Copyright Laws of the United States.
|
||||
**
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#ifndef __linux__
|
||||
#include <conio.h>
|
||||
#endif
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <glide.h>
|
||||
#include "tlib.h"
|
||||
|
||||
typedef struct {
|
||||
FxU32 signature;
|
||||
FxU16 width;
|
||||
FxU16 height;
|
||||
FxU8 depth;
|
||||
FxU8 type;
|
||||
void *data;
|
||||
} LFB_Img;
|
||||
|
||||
GrHwConfiguration hwconfig;
|
||||
static char version[80];
|
||||
|
||||
static const char name[] = "display";
|
||||
static const char purpose[] = "display a 16 bit frame buffer (565 format) dump out";
|
||||
static const char usage[] = "-n <frames> -r <res> -s srcimage -t testimage";
|
||||
|
||||
static const char *renderBufferString[] = {
|
||||
"GR_BUFFER_FRONTBUFFER",
|
||||
"GR_BUFFER_BACKBUFFER "
|
||||
};
|
||||
|
||||
static const char *sourceFormatString[] = {
|
||||
"GR_LFB_SRC_FMT_565 ",
|
||||
"GR_LFB_SRC_FMT_555 ",
|
||||
"GR_LFB_SRC_FMT_1555 ",
|
||||
"INVALID FORMAT ",
|
||||
"GR_LFB_SRC_FMT_888 ",
|
||||
"GR_LFB_SRC_FMT_8888 ",
|
||||
"INVALID FORMAT ",
|
||||
"INVALID FORMAT ",
|
||||
"INVALID FORMAT ",
|
||||
"INVALID FORMAT ",
|
||||
"INVALID FORMAT ",
|
||||
"INVALID FORMAT ",
|
||||
"GR_LFB_SRC_FMT_565_DEPTH ",
|
||||
"GR_LFB_SRC_FMT_555_DEPTH ",
|
||||
"GR_LFB_SRC_FMT_1555_DEPTH",
|
||||
"GR_LFB_SRC_FMT_ZA16 "
|
||||
};
|
||||
|
||||
|
||||
void main( int argc, char **argv) {
|
||||
char match;
|
||||
char **remArgs;
|
||||
int rv;
|
||||
|
||||
GrScreenResolution_t resolution = GR_RESOLUTION_640x480;
|
||||
float scrWidth = 640.0f;
|
||||
float scrHeight = 480.0f;
|
||||
int frames = -1;
|
||||
char srcfname[80], dstfname[80];
|
||||
FILE *fp;
|
||||
void *mem;
|
||||
FxU32 filesize;
|
||||
LFB_Img src, dst, diff;
|
||||
FxBool txtdisplay = FXTRUE;
|
||||
|
||||
void *image;
|
||||
FxU32 bpp;
|
||||
|
||||
GrLfbSrcFmt_t sourceFormat;
|
||||
|
||||
static FxU32 imageWidth;
|
||||
static FxU32 imageHeight;
|
||||
|
||||
static void imageConvert( void *dst,
|
||||
void *src,
|
||||
GrLfbSrcFmt_t format,
|
||||
FxU32 *bpp );
|
||||
|
||||
srcfname[0] = 0;
|
||||
dstfname[0] = 0;
|
||||
|
||||
/* Process Command Line Arguments */
|
||||
while( rv = tlGetOpt( argc, argv, "nrst", &match, &remArgs ) ) {
|
||||
if ( rv == -1 ) {
|
||||
printf( "Unrecognized command line argument\n" );
|
||||
printf( "%s %s\n", name, usage );
|
||||
printf( "Available resolutions:\n%s\n",
|
||||
tlGetResolutionList() );
|
||||
return;
|
||||
}
|
||||
switch( match ) {
|
||||
case 'n':
|
||||
frames = atoi( remArgs[0] );
|
||||
break;
|
||||
case 'r':
|
||||
resolution = tlGetResolutionConstant( remArgs[0],
|
||||
&scrWidth,
|
||||
&scrHeight );
|
||||
break;
|
||||
case 's':
|
||||
strcpy(srcfname, remArgs[0]);
|
||||
break;
|
||||
case 't':
|
||||
strcpy(dstfname, remArgs[0]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
tlSetScreen( scrWidth, scrHeight );
|
||||
|
||||
grGlideGetVersion( version );
|
||||
|
||||
printf( "%s:\n%s\n", name, purpose );
|
||||
printf( "%s\n", version );
|
||||
printf( "Resolution: %s\n", tlGetResolutionString( resolution ) );
|
||||
if ( frames == -1 ) {
|
||||
printf( "Press A Key To Begin Test.\n" );
|
||||
tlGetCH();
|
||||
}
|
||||
|
||||
/* Initialize Glide */
|
||||
grGlideInit();
|
||||
assert( grSstQueryHardware( &hwconfig ) );
|
||||
grSstSelect( 0 );
|
||||
assert( grSstWinOpen( 0,
|
||||
resolution,
|
||||
GR_REFRESH_60Hz,
|
||||
GR_COLORFORMAT_ABGR,
|
||||
GR_ORIGIN_UPPER_LEFT,
|
||||
2, 1 ) );
|
||||
|
||||
tlConSet( 0.0f, 0.0f, 1.0f, 1.0f,
|
||||
60, 30, 0xffffff );
|
||||
|
||||
/* Set up Render State - disable dithering */
|
||||
grDitherMode( GR_DITHER_DISABLE );
|
||||
|
||||
/* Load src image from disk */
|
||||
|
||||
if (srcfname[0]) {
|
||||
fp = fopen(srcfname, "rb");
|
||||
if (fp == NULL)
|
||||
srcfname[0] = 0;
|
||||
else {
|
||||
fseek(fp, 0, SEEK_END);
|
||||
filesize = ftell(fp);
|
||||
rewind(fp);
|
||||
|
||||
/* readng the LFB file header */
|
||||
fread(&src.signature, 4, 1, fp);
|
||||
if (src.signature != IMAGE_SRLE) {
|
||||
printf("%s file type incorrect\n");
|
||||
return;
|
||||
}
|
||||
fread(&src.width, 2, 1, fp);
|
||||
fread(&src.height, 2, 1, fp);
|
||||
fread(&src.depth, 1, 1, fp);
|
||||
fread(&src.type, 1, 1, fp);
|
||||
|
||||
mem = malloc(filesize-6);
|
||||
src.data = malloc(src.width*src.height*(src.depth/8));
|
||||
/* reading the LFB data */
|
||||
fread(mem, filesize-6, 1, fp);
|
||||
/* Simple16BitDecode(src.width,src.height,mem,src.data); */
|
||||
SimpleRleDecode(src.width,src.height,2,mem,src.data);
|
||||
|
||||
free(mem);
|
||||
fclose(fp);
|
||||
}
|
||||
}
|
||||
|
||||
/* Load dst image from disk */
|
||||
|
||||
if (dstfname[0]) {
|
||||
fp = fopen(dstfname, "rb");
|
||||
if (fp == NULL)
|
||||
dstfname[0] = 0;
|
||||
else {
|
||||
fseek(fp, 0, SEEK_END);
|
||||
filesize = ftell(fp);
|
||||
rewind(fp);
|
||||
|
||||
/* readng the LFB file header */
|
||||
fread(&dst.signature, 4, 1, fp);
|
||||
if (dst.signature != IMAGE_SRLE) {
|
||||
printf("%s file type incorrect\n");
|
||||
return;
|
||||
}
|
||||
fread(&dst.width, 2, 1, fp);
|
||||
fread(&dst.height, 2, 1, fp);
|
||||
fread(&dst.depth, 1, 1, fp);
|
||||
fread(&dst.type, 1, 1, fp);
|
||||
|
||||
mem = malloc(filesize-6);
|
||||
dst.data = malloc(dst.width*dst.height*(dst.depth/8));
|
||||
/* reading the LFB data */
|
||||
fread(mem, filesize-6, 1, fp);
|
||||
SimpleRleDecode(dst.width,dst.height,2,mem,dst.data);
|
||||
|
||||
free(mem);
|
||||
fclose(fp);
|
||||
}
|
||||
}
|
||||
|
||||
diff.width = 0;
|
||||
diff.height = 0;
|
||||
|
||||
if (srcfname[0] && dstfname[0]) {
|
||||
FxU32 count;
|
||||
FxU16 *srcptr, *dstptr, *difptr;
|
||||
|
||||
if ((src.width == dst.width) && (src.height == dst.height)) {
|
||||
diff.width = src.width;
|
||||
diff.height = src.height;
|
||||
diff.depth = src.depth;
|
||||
diff.data = malloc(diff.width*diff.height*(diff.depth/8));
|
||||
count = diff.width * diff.height;
|
||||
srcptr = src.data;
|
||||
dstptr = dst.data;
|
||||
difptr = diff.data;
|
||||
while (count) {
|
||||
if (*srcptr == *dstptr)
|
||||
*difptr = 0;
|
||||
else
|
||||
*difptr = *srcptr ^ *dstptr;
|
||||
srcptr++; dstptr++; difptr++;
|
||||
count--;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
sourceFormat = GR_LFB_SRC_FMT_565;
|
||||
|
||||
if (srcfname[0]) {
|
||||
imageWidth = src.width;
|
||||
imageHeight = src.height;
|
||||
image = calloc( imageWidth * imageHeight, sizeof( FxU32 ) );
|
||||
imageConvert( image, src.data, sourceFormat, &bpp );
|
||||
}
|
||||
else if (dstfname[0]) {
|
||||
imageWidth = dst.width;
|
||||
imageHeight = dst.height;
|
||||
image = calloc( imageWidth * imageHeight, sizeof( FxU32 ) );
|
||||
imageConvert( image, dst.data, sourceFormat, &bpp );
|
||||
}
|
||||
if ( ( imageWidth > (FxU32)scrWidth ) ||
|
||||
( imageHeight > (FxU32)scrHeight ) )
|
||||
return;
|
||||
|
||||
while( frames-- ) {
|
||||
|
||||
grBufferClear( 0x00303030, 0, 0 );
|
||||
|
||||
|
||||
grLfbWriteRegion( GR_BUFFER_BACKBUFFER,
|
||||
0, 0, sourceFormat,
|
||||
imageWidth, imageHeight, imageWidth*bpp, image );
|
||||
tlConClear();
|
||||
if (txtdisplay) {
|
||||
tlConOutput("1 - lfb source format (%s)\n",
|
||||
sourceFormatString[sourceFormat] );
|
||||
if (srcfname[0])
|
||||
tlConOutput("s - display source image\n");
|
||||
else
|
||||
tlConOutput("no source image\n");
|
||||
if (dstfname[0])
|
||||
tlConOutput("t - display test image\n");
|
||||
else
|
||||
tlConOutput("no test image\n");
|
||||
if (srcfname[0] && dstfname[0]) {
|
||||
if (diff.width > 0)
|
||||
tlConOutput("d - display differences\n");
|
||||
else
|
||||
tlConOutput("source and test image size are not the same\n");
|
||||
}
|
||||
|
||||
tlConOutput("space - turn on/off text display\n");
|
||||
|
||||
tlConOutput("any other key to quit\n\n");
|
||||
}
|
||||
|
||||
/*
|
||||
tlConOutput( "1 - lfb source format (%s)\n"
|
||||
"+/- - change width of source image copied\n"
|
||||
"s - display source image\n"
|
||||
"t - display test image\n"
|
||||
"d - display differences\n"
|
||||
"any other key to quit\n\n",
|
||||
sourceFormatString[sourceFormat] );
|
||||
*/
|
||||
|
||||
tlConRender();
|
||||
grBufferSwap( 1 );
|
||||
while( tlKbHit() ) {
|
||||
switch( tlGetCH() ) {
|
||||
case '1':
|
||||
break;
|
||||
case '+':
|
||||
break;
|
||||
case '-':
|
||||
break;
|
||||
case 's':
|
||||
if (srcfname[0]) {
|
||||
imageWidth = src.width;
|
||||
imageHeight = src.height;
|
||||
imageConvert( image, src.data, sourceFormat, &bpp );
|
||||
}
|
||||
break;
|
||||
case 't':
|
||||
if (dstfname[0]) {
|
||||
imageWidth = dst.width;
|
||||
imageHeight = dst.height;
|
||||
imageConvert( image, dst.data, sourceFormat, &bpp );
|
||||
}
|
||||
break;
|
||||
case 'd':
|
||||
if (diff.width > 0)
|
||||
imageConvert( image, diff.data, sourceFormat, &bpp );
|
||||
break;
|
||||
case ' ':
|
||||
txtdisplay = !txtdisplay;
|
||||
break;
|
||||
default:
|
||||
frames = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
grGlideShutdown();
|
||||
if (srcfname[0])
|
||||
free(src.data);
|
||||
if (dstfname[0])
|
||||
free(dst.data);
|
||||
if (srcfname[0] && dstfname[0])
|
||||
free(diff.data);
|
||||
free(image);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
static void imageConvert( void *dst, void *src,
|
||||
GrLfbSrcFmt_t format, FxU32 *bpp ) {
|
||||
FxU32 x, y;
|
||||
FxU32 *longData = dst;
|
||||
FxU16 *shortData = dst;
|
||||
FxU16 *srcData = src;
|
||||
FxU32 longStride = 640;
|
||||
FxU32 shortStride = 640;
|
||||
FxU32 longColor;
|
||||
FxU16 shortColor;
|
||||
|
||||
switch( format ) {
|
||||
case GR_LFB_SRC_FMT_565:
|
||||
case GR_LFB_SRC_FMT_555:
|
||||
case GR_LFB_SRC_FMT_1555:
|
||||
*bpp = 2;
|
||||
break;
|
||||
case GR_LFB_SRC_FMT_888:
|
||||
case GR_LFB_SRC_FMT_8888:
|
||||
case GR_LFB_SRC_FMT_565_DEPTH:
|
||||
case GR_LFB_SRC_FMT_1555_DEPTH:
|
||||
case GR_LFB_SRC_FMT_555_DEPTH:
|
||||
*bpp = 4;
|
||||
break;
|
||||
}
|
||||
|
||||
for( y = 0; y < 480; y++ ) {
|
||||
for( x = 0; x < 640; x++ ) {
|
||||
switch( format ) {
|
||||
case GR_LFB_SRC_FMT_565:
|
||||
shortData[y*shortStride+x] =
|
||||
srcData[y*640+x];
|
||||
break;
|
||||
case GR_LFB_SRC_FMT_555:
|
||||
case GR_LFB_SRC_FMT_1555:
|
||||
shortColor = srcData[y*640+x];
|
||||
shortColor =
|
||||
(0x8000) | // Alpha == 1
|
||||
((shortColor >> 1) & 0x7C00) |
|
||||
((shortColor >> 1) & 0x03E0) |
|
||||
((shortColor) & 0x1f);
|
||||
shortData[y*shortStride+x] =
|
||||
shortColor;
|
||||
break;
|
||||
case GR_LFB_SRC_FMT_888:
|
||||
case GR_LFB_SRC_FMT_8888:
|
||||
longColor = srcData[y*640+x];
|
||||
longColor =
|
||||
(0xFF000000) |
|
||||
((longColor<<8)&0x00F80000) |
|
||||
((longColor<<5)&0x0000FC00) |
|
||||
((longColor<<3)&0x000000F8);
|
||||
longData[y*longStride+x] = longColor;
|
||||
break;
|
||||
case GR_LFB_SRC_FMT_565_DEPTH:
|
||||
longColor = srcData[y*640+x];
|
||||
longData[y*longStride+x] = longColor;
|
||||
break;
|
||||
case GR_LFB_SRC_FMT_1555_DEPTH:
|
||||
case GR_LFB_SRC_FMT_555_DEPTH:
|
||||
longColor = srcData[y*640+x];
|
||||
longColor =
|
||||
(0x00008000) |
|
||||
((longColor>>1) & 0x00007C00) |
|
||||
((longColor>>1) & 0x000003E0) |
|
||||
((longColor ) & 0x0000001f);
|
||||
longData[y*longStride+x] = longColor;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,198 +0,0 @@
|
||||
/*
|
||||
** Copyright (c) 1997, 3Dfx Interactive, Inc.
|
||||
** All Rights Reserved.
|
||||
**
|
||||
** This is UNPUBLISHED PROPRIETARY SOURCE CODE of 3Dfx Interactive, Inc.;
|
||||
** the contents of this file may not be disclosed to third parties, copied or
|
||||
** duplicated in any form, in whole or in part, without the prior written
|
||||
** permission of 3Dfx Interactive, Inc.
|
||||
**
|
||||
** RESTRICTED RIGHTS LEGEND:
|
||||
** Use, duplication or disclosure by the Government is subject to restrictions
|
||||
** as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
|
||||
** and Computer Software clause at DFARS 252.227-7013, and/or in similar or
|
||||
** successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
|
||||
** rights reserved under the Copyright Laws of the United States.
|
||||
**
|
||||
*/
|
||||
|
||||
#ifndef __linux__
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#ifndef __linux__
|
||||
#include <conio.h>
|
||||
#endif
|
||||
#include <assert.h>
|
||||
|
||||
#include <time.h>
|
||||
|
||||
#include <glide.h>
|
||||
#include "tlib.h"
|
||||
|
||||
#define H3D_RED 0x000000ff
|
||||
#define H3D_GREEN 0x0000ff00
|
||||
#define H3D_YELLOW 0x0000ffff
|
||||
#define H3D_BLACK 0x00000000
|
||||
|
||||
GrHwConfiguration hwconfig;
|
||||
static char version[80];
|
||||
static int scrWidth, scrHeight, boxwidth, boxheight, origin;
|
||||
|
||||
void init(void) {
|
||||
GrState state;
|
||||
|
||||
grGlideGetState(&state);
|
||||
|
||||
grColorCombine( GR_COMBINE_FUNCTION_LOCAL, GR_COMBINE_FACTOR_NONE,
|
||||
GR_COMBINE_LOCAL_CONSTANT, GR_COMBINE_OTHER_NONE, FXFALSE );
|
||||
|
||||
grColorMask(FXTRUE,0); // make sure color buf is on
|
||||
grDepthBufferFunction( GR_CMP_ALWAYS );
|
||||
|
||||
grBufferClear( 0x00, 0, GR_ZDEPTHVALUE_FARTHEST );
|
||||
|
||||
grGlideSetState(&state);
|
||||
}
|
||||
|
||||
void drawBoxes(int w, int h, unsigned long c1, unsigned long c2) {
|
||||
GrVertex p1,p2,p3,p4;
|
||||
|
||||
p1.x = 1.f;
|
||||
p1.y = 1.f;
|
||||
p2.x = (float)w;
|
||||
p2.y = 1.f;
|
||||
p3.x = 1.f;
|
||||
p3.y = (float)h;
|
||||
p4.x = (float)w;
|
||||
p4.y = (float)h;
|
||||
grConstantColorValue( c1 );
|
||||
grDrawLine(&p1,&p2);
|
||||
grDrawLine(&p1,&p3);
|
||||
grDrawLine(&p3,&p4);
|
||||
grDrawLine(&p2,&p4);
|
||||
grDrawLine(&p1,&p4);
|
||||
grDrawLine(&p2,&p3);
|
||||
|
||||
p1.y += origin;
|
||||
p2.y += origin;
|
||||
p3.y += origin;
|
||||
p4.y += origin;
|
||||
grConstantColorValue( c2 );
|
||||
grDrawLine(&p1,&p2);
|
||||
grDrawLine(&p1,&p3);
|
||||
grDrawLine(&p3,&p4);
|
||||
grDrawLine(&p2,&p4);
|
||||
grDrawLine(&p1,&p4);
|
||||
grDrawLine(&p2,&p3);
|
||||
}
|
||||
|
||||
void main( int argc, char **argv) {
|
||||
int keepworking = 1;
|
||||
GrScreenResolution_t resolution;
|
||||
int frames = -1;
|
||||
int redraw = 1;
|
||||
int redrawPattern = 0;
|
||||
int patternon = 1;
|
||||
|
||||
#ifdef H3D
|
||||
resolution = GR_RESOLUTION_640x240_AUTOFLIPPED;
|
||||
#else
|
||||
resolution = GR_RESOLUTION_640x480;
|
||||
#endif
|
||||
|
||||
/* Initialize Glide */
|
||||
grGlideInit();
|
||||
grGlideGetVersion( version );
|
||||
grSstQueryHardware( &hwconfig );
|
||||
grSstSelect( 0 );
|
||||
if ( grSstWinOpen( 0, resolution, GR_REFRESH_60Hz, GR_COLORFORMAT_ABGR, GR_ORIGIN_UPPER_LEFT, 2,1 ) ) {
|
||||
grColorCombine( GR_COMBINE_FUNCTION_LOCAL,
|
||||
GR_COMBINE_FACTOR_NONE,
|
||||
GR_COMBINE_LOCAL_CONSTANT,
|
||||
GR_COMBINE_OTHER_NONE,
|
||||
FXFALSE );
|
||||
|
||||
} else {
|
||||
keepworking = 0;
|
||||
}
|
||||
grRenderBuffer( GR_BUFFER_BACKBUFFER );
|
||||
|
||||
scrWidth = grSstScreenWidth();
|
||||
scrHeight = grSstScreenHeight();
|
||||
origin = (int)scrHeight-240; // top of right eye buffer
|
||||
boxheight = (int)240;
|
||||
boxwidth = (int)scrWidth;
|
||||
|
||||
while( keepworking) {
|
||||
|
||||
while( tlKbHit() ) {
|
||||
switch( tlGetCH() ) {
|
||||
case '=' :
|
||||
case '+' :
|
||||
// move origin of 2nd page causes both box heights to resize
|
||||
if (origin < (scrHeight-1.f))
|
||||
{
|
||||
origin++;
|
||||
boxheight--;
|
||||
redraw = 1;
|
||||
}
|
||||
break;
|
||||
case '_':
|
||||
case '-' :
|
||||
if (origin > ((scrHeight/2)-1.f))
|
||||
{
|
||||
origin--;
|
||||
boxheight++;
|
||||
redraw = 1;
|
||||
}
|
||||
break;
|
||||
case '.' :
|
||||
// move origin of 2nd page causes both box heights to resize
|
||||
if (origin < (scrHeight-1.f))
|
||||
{
|
||||
origin++;
|
||||
boxheight--;
|
||||
}
|
||||
break;
|
||||
case ',' :
|
||||
if (origin > ((scrHeight/2)-1.f))
|
||||
{
|
||||
origin--;
|
||||
boxheight++;
|
||||
}
|
||||
break;
|
||||
case 'p':
|
||||
patternon ^= 1;
|
||||
redrawPattern = 1;
|
||||
break;
|
||||
case 'q':
|
||||
keepworking = 0;
|
||||
break;
|
||||
case ' ':
|
||||
redraw = 1;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (redraw) {
|
||||
grColorMask(FXTRUE,0);
|
||||
grBufferClear( 0, 0, 0 );
|
||||
drawBoxes(boxwidth,boxheight,H3D_RED,H3D_YELLOW);
|
||||
redraw = 0;
|
||||
grBufferSwap( 1 );
|
||||
} else if (redrawPattern) {
|
||||
#ifdef H3D
|
||||
grHints(GR_HINT_H3DENABLE,patternon); // set the pattern on or off
|
||||
#endif
|
||||
redrawPattern = 0;
|
||||
}
|
||||
}
|
||||
grGlideShutdown();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1,289 +0,0 @@
|
||||
/*
|
||||
** Copyright (c) 1997, 3Dfx Interactive, Inc.
|
||||
** All Rights Reserved.
|
||||
**
|
||||
** This is UNPUBLISHED PROPRIETARY SOURCE CODE of 3Dfx Interactive, Inc.;
|
||||
** the contents of this file may not be disclosed to third parties, copied or
|
||||
** duplicated in any form, in whole or in part, without the prior written
|
||||
** permission of 3Dfx Interactive, Inc.
|
||||
**
|
||||
** RESTRICTED RIGHTS LEGEND:
|
||||
** Use, duplication or disclosure by the Government is subject to restrictions
|
||||
** as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
|
||||
** and Computer Software clause at DFARS 252.227-7013, and/or in similar or
|
||||
** successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
|
||||
** rights reserved under the Copyright Laws of the United States.
|
||||
**
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#ifndef __linux__
|
||||
#include <conio.h>
|
||||
#endif
|
||||
#include <assert.h>
|
||||
|
||||
#include <glide.h>
|
||||
#include "tlib.h"
|
||||
|
||||
|
||||
GrHwConfiguration hwconfig;
|
||||
static char version[80];
|
||||
|
||||
static const char name[] = "test24";
|
||||
static const char purpose[] = "anti-aliased lines test";
|
||||
static const char usage[] = "-n <frames> -r <res>";
|
||||
|
||||
static int rRandom(int s, int e);
|
||||
static unsigned int iRandom (unsigned int maxr);
|
||||
|
||||
typedef enum { NORMAL, ANTIALIASED } Mode;
|
||||
|
||||
void main( int argc, char **argv) {
|
||||
char match;
|
||||
char **remArgs;
|
||||
int rv;
|
||||
|
||||
#ifdef H3D
|
||||
GrScreenResolution_t resolution = GR_RESOLUTION_640x240_AUTOFLIPPED;
|
||||
float scrWidth = 640.0f;
|
||||
float scrHeight = 240.0f;
|
||||
#else
|
||||
GrScreenResolution_t resolution = GR_RESOLUTION_640x480;
|
||||
float scrWidth = 640.0f;
|
||||
float scrHeight = 480.0f;
|
||||
#endif
|
||||
int frames = -1;
|
||||
|
||||
Mode mode;
|
||||
|
||||
int i;
|
||||
#ifdef H3D
|
||||
int eye,offset;
|
||||
#endif
|
||||
static TlVertex3D srcVerts[100];
|
||||
float angle;
|
||||
|
||||
// GrFog_t fogtable[GR_FOG_TABLE_SIZE];
|
||||
|
||||
/* Process Command Line Arguments */
|
||||
while( rv = tlGetOpt( argc, argv, "nr", &match, &remArgs ) ) {
|
||||
if ( rv == -1 ) {
|
||||
printf( "Unrecognized command line argument\n" );
|
||||
printf( "%s %s\n", name, usage );
|
||||
printf( "Available resolutions:\n%s\n",
|
||||
tlGetResolutionList() );
|
||||
return;
|
||||
}
|
||||
switch( match ) {
|
||||
case 'n':
|
||||
frames = atoi( remArgs[0] );
|
||||
break;
|
||||
case 'r':
|
||||
resolution = tlGetResolutionConstant( remArgs[0],
|
||||
&scrWidth,
|
||||
&scrHeight );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
tlSetScreen( scrWidth, scrHeight );
|
||||
|
||||
grGlideGetVersion( version );
|
||||
|
||||
printf( "%s:\n%s\n", name, purpose );
|
||||
printf( "%s\n", version );
|
||||
printf( "Resolution: %s\n", tlGetResolutionString( resolution ) );
|
||||
if ( frames == -1 ) {
|
||||
printf( "Press A Key To Begin Test.\n" );
|
||||
tlGetCH();
|
||||
}
|
||||
|
||||
/* Initialize Glide */
|
||||
grGlideInit();
|
||||
assert( grSstQueryHardware( &hwconfig ) );
|
||||
grSstSelect( 0 );
|
||||
assert( grSstWinOpen( 0,
|
||||
resolution,
|
||||
GR_REFRESH_60Hz,
|
||||
GR_COLORFORMAT_ABGR,
|
||||
GR_ORIGIN_LOWER_LEFT,
|
||||
2, 1 ) );
|
||||
|
||||
tlConSet( 0.0f, 0.0f, 1.0f, 0.5f,
|
||||
60, 15, 0xffffff );
|
||||
|
||||
/* Set up Render State - flat shading - alpha blending */
|
||||
grColorCombine( GR_COMBINE_FUNCTION_LOCAL,
|
||||
GR_COMBINE_FACTOR_NONE,
|
||||
GR_COMBINE_LOCAL_CONSTANT,
|
||||
GR_COMBINE_OTHER_NONE,
|
||||
FXFALSE );
|
||||
grAlphaCombine( GR_COMBINE_FUNCTION_LOCAL,
|
||||
GR_COMBINE_FACTOR_NONE,
|
||||
GR_COMBINE_LOCAL_ITERATED,
|
||||
GR_COMBINE_OTHER_NONE,
|
||||
FXFALSE );
|
||||
grAlphaBlendFunction( GR_BLEND_SRC_ALPHA, GR_BLEND_ONE_MINUS_SRC_ALPHA,
|
||||
GR_BLEND_ZERO, GR_BLEND_ZERO );
|
||||
|
||||
/* Initialize Source 3D data - One Hundred Random Points within
|
||||
a 1x1 box */
|
||||
for( i = 0; i < 100; i++ ) {
|
||||
srcVerts[i].x = (((float)rRandom( 0, 100 )) / 100.0f ) - 0.5f;
|
||||
srcVerts[i].y = (((float)rRandom( 0, 100 )) / 100.0f ) - 0.5f;
|
||||
srcVerts[i].z = (((float)rRandom( 0, 100 )) / 100.0f ) - 0.5f;
|
||||
srcVerts[i].w = 1.0f;
|
||||
}
|
||||
|
||||
#define RED 0x000000ff
|
||||
#define BLUE 0x00ff0000
|
||||
|
||||
angle = 0.0f;
|
||||
mode = ANTIALIASED;
|
||||
|
||||
tlConOutput( "a - toggles anti-aliasing\n" );
|
||||
tlConOutput( "Press any key to quit\n\n" );
|
||||
|
||||
while( frames-- && tlOkToRender()) {
|
||||
GrVertex vtxA, vtxB;
|
||||
static TlVertex3D xfVerts[100];
|
||||
static TlVertex3D prjVerts[100];
|
||||
|
||||
// if (hwconfig.SSTs[0].type == GR_SSTTYPE_SST96) {
|
||||
tlGetDimsByConst(resolution,
|
||||
&scrWidth,
|
||||
&scrHeight );
|
||||
#ifdef H3D
|
||||
grClipWindow(0, 0, grSstScreenWidth(), grSstScreenHeight());
|
||||
#else
|
||||
grClipWindow(0, 0, (FxU32) scrWidth, (FxU32) scrHeight);
|
||||
#endif
|
||||
// }
|
||||
|
||||
grBufferClear( 0x0, 0, GR_ZDEPTHVALUE_FARTHEST );
|
||||
|
||||
/* 3D Transformations */
|
||||
angle += 1.0f;
|
||||
if ( angle > 359.0f ) angle = 0.0f;
|
||||
|
||||
tlSetMatrix( tlIdentity() );
|
||||
tlMultMatrix( tlYRotation( angle ) );
|
||||
tlMultMatrix( tlTranslation( 0.0f, 0.0f, 1.3f ) );
|
||||
|
||||
tlTransformVertices( xfVerts, srcVerts, 100 );
|
||||
tlProjectVertices( prjVerts, xfVerts, 100 );
|
||||
|
||||
grConstantColorValue( 0xffffffff );
|
||||
|
||||
switch( mode ) {
|
||||
case NORMAL:
|
||||
tlConOutput( "NORMAL LINES \r" );
|
||||
break;
|
||||
case ANTIALIASED:
|
||||
tlConOutput( "ANTIALIASED LINES \r" );
|
||||
break;
|
||||
}
|
||||
|
||||
#define SNAP_BIAS ((float)(3<<18))
|
||||
|
||||
#ifdef H3D
|
||||
for( eye = 0; eye < 2; eye++) {
|
||||
offset = (int)(eye * (grSstScreenHeight() - scrHeight)); // y offset for right eye
|
||||
grClipWindow(0, offset, (FxU32) scrWidth, (FxU32) scrHeight + offset);
|
||||
|
||||
for( i = 0; i < 100; i+=2 ) {
|
||||
vtxA.oow = 1.0f / prjVerts[i].w;
|
||||
vtxA.x = (tlScaleX( prjVerts[i].x ) + (((eye*2)-1)*(vtxA.oow-.5f)*16));
|
||||
vtxA.x += SNAP_BIAS;
|
||||
vtxA.y = tlScaleY( prjVerts[i].y ) + offset;
|
||||
vtxA.y += SNAP_BIAS;
|
||||
vtxA.a = 255.0f;
|
||||
|
||||
vtxB.oow = 1.0f / prjVerts[i+1].w;
|
||||
vtxB.x = SNAP_BIAS + (tlScaleX( prjVerts[i+1].x ) + (((eye*2)-1)*(vtxB.oow-.5f)*16));
|
||||
vtxB.y = SNAP_BIAS+tlScaleY( prjVerts[i+1].y ) + offset;
|
||||
vtxB.a = 255.0f;
|
||||
switch( mode ) {
|
||||
case NORMAL:
|
||||
grDrawLine( &vtxA, &vtxB );
|
||||
break;
|
||||
case ANTIALIASED:
|
||||
grAADrawLine( &vtxA, &vtxB );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
for( i = 0; i < 100; i+=2 ) {
|
||||
vtxA.x = SNAP_BIAS+tlScaleX( prjVerts[i].x );
|
||||
vtxA.y = SNAP_BIAS+tlScaleY( prjVerts[i].y );
|
||||
vtxA.oow = 1.0f / prjVerts[i].w;
|
||||
vtxA.a = 255.0f;
|
||||
vtxB.x = SNAP_BIAS+tlScaleX( prjVerts[i+1].x );
|
||||
vtxB.y = SNAP_BIAS+tlScaleY( prjVerts[i+1].y );
|
||||
vtxB.oow = 1.0f / prjVerts[i+1].w;
|
||||
vtxB.a = 255.0f;
|
||||
switch( mode ) {
|
||||
case NORMAL:
|
||||
grDrawLine( &vtxA, &vtxB );
|
||||
break;
|
||||
case ANTIALIASED:
|
||||
grAADrawLine( &vtxA, &vtxB );
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
grBufferSwap( 1 );
|
||||
grSstIdle();
|
||||
|
||||
while( tlKbHit() ) {
|
||||
switch( tlGetCH() ) {
|
||||
case 'a':
|
||||
case 'A':
|
||||
mode++;
|
||||
mode%=2;
|
||||
break;
|
||||
default:
|
||||
frames = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
grGlideShutdown();
|
||||
return;
|
||||
}
|
||||
|
||||
static unsigned long randx = 1;
|
||||
|
||||
static unsigned int iRandom (unsigned int maxr)
|
||||
{
|
||||
unsigned int n,retval;
|
||||
|
||||
if (maxr > 0xFFFFFFF) {
|
||||
do {
|
||||
retval = iRandom(0xFFFFFFF);
|
||||
retval |= iRandom(maxr>>28)<<28;
|
||||
} while (retval > maxr);
|
||||
return retval;
|
||||
}
|
||||
for (n=1; n<32; n++)
|
||||
if (((unsigned)1 << n) > maxr) break;
|
||||
do {
|
||||
randx = randx*1103515245 + 12345;
|
||||
retval = (randx & 0x7fffffff) >> (31-n);
|
||||
} while (retval > maxr);
|
||||
return retval;
|
||||
}
|
||||
|
||||
static int rRandom(int s, int e)
|
||||
{
|
||||
return s + iRandom(e-s);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Binary file not shown.
File diff suppressed because one or more lines are too long
@@ -1,145 +0,0 @@
|
||||
#
|
||||
# Copyright (c) 1995, 3Dfx Interactive, Inc.
|
||||
# All Rights Reserved.
|
||||
#
|
||||
# This is UNPUBLISHED PROPRIETARY SOURCE CODE of 3Dfx Interactive, Inc.;
|
||||
# the contents of this file may not be disclosed to third parties, copied or
|
||||
# duplicated in any form, in whole or in part, without the prior written
|
||||
# permission of 3Dfx Interactive, Inc.
|
||||
#
|
||||
# RESTRICTED RIGHTS LEGEND:
|
||||
# Use, duplication or disclosure by the Government is subject to restrictions
|
||||
# as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
|
||||
# and Computer Software clause at DFARS 252.227-7013, and/or in similar or
|
||||
# successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
|
||||
# rights reserved under the Copyright Laws of the United States.
|
||||
#
|
||||
|
||||
|
||||
LDIRT= *.exe *.map *.sys *.obj *.lib
|
||||
|
||||
!ifdef FX_NO_GLIDE_SWDIAGS
|
||||
!include $(BUILD_ROOT_SWLIBS)/include/nmake/3dfx.mak
|
||||
!else
|
||||
!if "$(FX_GLIDE_DSP_TARGET)"=="SIM"
|
||||
LCDEFS = $(LCDEFS) -DGLIDE_SIMULATOR
|
||||
LLDLIBS = $(LLDLIBS) $(BUILD_ROOT_SWLIBS)\lib\wing32.lib
|
||||
!endif
|
||||
|
||||
LCINCS = $(LCINCS) -I$(BUILD_ROOT_SST1)\include
|
||||
|
||||
!if "$(FX_COMPILER)"=="WATCOM"
|
||||
LIBOBJS = tlib.lib plib.lib
|
||||
!else
|
||||
LIBOBJS = tlib.obj plib.obj
|
||||
!endif
|
||||
|
||||
!if "$(FX_TARGET)"=="WIN32"
|
||||
FX_TARGET_MINOR=WIN95
|
||||
!endif
|
||||
|
||||
LLDLIBS = $(LLDLIBS) $(BUILD_ROOT_SST1)\lib\glide2x.lib $(LIBOBJS)
|
||||
|
||||
PRIVATE_HEADERS = tlib.h tlib.c plib.h plib.c tldata.inc
|
||||
|
||||
CFILES = display.c \
|
||||
test00.c \
|
||||
test01.c \
|
||||
test02.c \
|
||||
test03.c \
|
||||
test04.c \
|
||||
test05.c \
|
||||
test06.c \
|
||||
test07.c \
|
||||
test08.c \
|
||||
test09.c \
|
||||
test10.c \
|
||||
test11.c \
|
||||
test12.c \
|
||||
test13.c \
|
||||
test14.c \
|
||||
test15.c \
|
||||
test16.c \
|
||||
test17.c \
|
||||
test18.c \
|
||||
test19.c \
|
||||
test20.c \
|
||||
test21.c \
|
||||
test22.c \
|
||||
test23.c \
|
||||
test24.c \
|
||||
test25.c \
|
||||
test26.c \
|
||||
test27.c \
|
||||
test28.c \
|
||||
test29.c \
|
||||
qatest00.c \
|
||||
qatest01.c \
|
||||
h3dtst01.c \
|
||||
h3dtst02.c
|
||||
|
||||
PROGRAMS = $(CFILES:.c=.exe)
|
||||
|
||||
DATAFILES = alpha.3df decal1.3df lava.3df light.3df matt1.3df miro.3df \
|
||||
argb1555.3df argb4444.3df argb8332.3df argb8888.3df \
|
||||
ayiq.3df yiq.3df p8.3df ap88.3df rgb332.3df rgb565.3df
|
||||
|
||||
!include $(BUILD_ROOT_SWLIBS)/include/nmake/3dfx.mak
|
||||
|
||||
$(PROGRAMS): $(LLDLIBS)
|
||||
|
||||
!if "$(FX_COMPILER)"=="WATCOM"
|
||||
!if "$(FX_TARGET)"=="DOS"
|
||||
tlib.lib: tlib.obj
|
||||
wlib -b -c -n -q -p=512 tlib tlib.obj
|
||||
plib.lib: plib.obj
|
||||
wlib -b -c -n -q -p=512 plib plib.obj
|
||||
!else
|
||||
tlib.lib: tlib.obj
|
||||
wlib -b -c -n -q -p=512 tlib tlib.obj
|
||||
plib.lib: plib.obj
|
||||
wlib -b -c -n -q -p=512 plib plib.obj
|
||||
!endif
|
||||
!endif
|
||||
|
||||
test00: test00.exe
|
||||
test01: test01.exe
|
||||
test02: test02.exe
|
||||
test03: test03.exe
|
||||
test04: test04.exe
|
||||
test05: test05.exe
|
||||
test06: test06.exe
|
||||
test07: test07.exe
|
||||
test08: test08.exe
|
||||
test09: test09.exe
|
||||
test10: test10.exe
|
||||
test11: test11.exe
|
||||
test12: test12.exe
|
||||
test13: test13.exe
|
||||
test14: test14.exe
|
||||
test15: test15.exe
|
||||
test16: test16.exe
|
||||
test17: test17.exe
|
||||
test18: test18.exe
|
||||
test19: test19.exe
|
||||
test20: test20.exe
|
||||
test21: test21.exe
|
||||
test22: test22.exe
|
||||
test23: test23.exe
|
||||
test24: test24.exe
|
||||
test25: test25.exe
|
||||
test26: test26.exe
|
||||
test27: test27.exe
|
||||
test28: test28.exe
|
||||
test29: test29.exe
|
||||
test30: test30.exe
|
||||
test31: test31.exe
|
||||
qatest00: qatest00.exe
|
||||
qatest01: qatest01.exe
|
||||
h3dtst01: h3dtst01.exe
|
||||
h3dtst02: h3dtst02.exe
|
||||
|
||||
foo: foo.exe
|
||||
display:display.exe
|
||||
|
||||
!endif
|
||||
@@ -1,15 +0,0 @@
|
||||
|
||||
CFLAGS = -I. -I/usr/include/glide
|
||||
|
||||
SRCS = $(wildcard test*.c)
|
||||
OBJS = $(SRCS:.c=.o)
|
||||
EXECS = $(basename $(SRCS))
|
||||
LIB_OBJS = tlib.o
|
||||
|
||||
all: $(EXECS)
|
||||
|
||||
clean:
|
||||
rm $(EXECS) *.o
|
||||
|
||||
$(EXECS): $(OBJS) $(LIB_OBJS)
|
||||
$(CC) -o $@ $@.o $(LIB_OBJS) -lglide -lm
|
||||
@@ -1,71 +0,0 @@
|
||||
#
|
||||
# Copyright (c) 1995, 3Dfx Interactive, Inc.
|
||||
# All Rights Reserved.
|
||||
#
|
||||
# This is UNPUBLISHED PROPRIETARY SOURCE CODE of 3Dfx Interactive, Inc.;
|
||||
# the contents of this file may not be disclosed to third parties, copied or
|
||||
# duplicated in any form, in whole or in part, without the prior written
|
||||
# permission of 3Dfx Interactive, Inc.
|
||||
#
|
||||
# RESTRICTED RIGHTS LEGEND:
|
||||
# Use, duplication or disclosure by the Government is subject to restrictions
|
||||
# as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
|
||||
# and Computer Software clause at DFARS 252.227-7013, and/or in similar or
|
||||
# successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
|
||||
# rights reserved under the Copyright Laws of the United States.
|
||||
#
|
||||
|
||||
|
||||
LDIRT= $(PROGRAMS)
|
||||
|
||||
LIBOBJS = tlib.o plib.o
|
||||
|
||||
LLDLIBS = $(LIBOBJS) -lglide
|
||||
|
||||
PRIVATE_HEADERS = tlib.h tlib.c plib.h plib.c tldata.inc
|
||||
|
||||
CFILES = display.c \
|
||||
test00.c \
|
||||
test01.c \
|
||||
test02.c \
|
||||
test03.c \
|
||||
test04.c \
|
||||
test05.c \
|
||||
test06.c \
|
||||
test07.c \
|
||||
test08.c \
|
||||
test09.c \
|
||||
test10.c \
|
||||
test11.c \
|
||||
test12.c \
|
||||
test13.c \
|
||||
test14.c \
|
||||
test15.c \
|
||||
test16.c \
|
||||
test17.c \
|
||||
test18.c \
|
||||
test19.c \
|
||||
test20.c \
|
||||
test21.c \
|
||||
test22.c \
|
||||
test23.c \
|
||||
test24.c \
|
||||
test25.c \
|
||||
test26.c \
|
||||
test27.c \
|
||||
test28.c \
|
||||
test29.c \
|
||||
qatest00.c \
|
||||
qatest01.c \
|
||||
h3dtst01.c \
|
||||
h3dtst02.c
|
||||
|
||||
PROGRAMS = $(CFILES:.c=)
|
||||
|
||||
DATAFILES = alpha.3df decal1.3df lava.3df light.3df matt1.3df miro.3df \
|
||||
argb1555.3df argb4444.3df argb8332.3df argb8888.3df \
|
||||
ayiq.3df yiq.3df p8.3df ap88.3df rgb332.3df rgb565.3df
|
||||
|
||||
include $(BUILD_ROOT_SWLIBS)/include/make/3dfx.mak
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@@ -1,140 +0,0 @@
|
||||
/*
|
||||
** Copyright (c) 1997, 3Dfx Interactive, Inc.
|
||||
** All Rights Reserved.
|
||||
**
|
||||
** This is UNPUBLISHED PROPRIETARY SOURCE CODE of 3Dfx Interactive, Inc.;
|
||||
** the contents of this file may not be disclosed to third parties, copied or
|
||||
** duplicated in any form, in whole or in part, without the prior written
|
||||
** permission of 3Dfx Interactive, Inc.
|
||||
**
|
||||
** RESTRICTED RIGHTS LEGEND:
|
||||
** Use, duplication or disclosure by the Government is subject to restrictions
|
||||
** as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
|
||||
** and Computer Software clause at DFARS 252.227-7013, and/or in similar or
|
||||
** successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
|
||||
** rights reserved under the Copyright Laws of the United States.
|
||||
**
|
||||
**
|
||||
** $Revision$
|
||||
** $Date$
|
||||
**
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _PLIB_H_
|
||||
#define _PLIB_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef enum { topOfMipMap, btmOfMipMap } mipMapEnd_t;
|
||||
|
||||
typedef FxU8 hTexId_t;
|
||||
#define H_NULL 0x0
|
||||
#define H_FSTTEXID 0x1
|
||||
|
||||
typedef struct {
|
||||
unsigned int isDownloadable : 1; /* should tex be downloaded? */
|
||||
unsigned int isMultibase : 1; /* downloaded as multibase? */
|
||||
unsigned int isTrilinear : 1; /* downloaded as EVEN/ODD? */
|
||||
unsigned int isBeenPopd : 1; /* has it been pop'd? - not used */
|
||||
unsigned int isDirty : 1; /* has it been touched? - not used */
|
||||
} tlTxMnFlags_t;
|
||||
|
||||
typedef struct {
|
||||
TlTexture* lpTlTextureInfo;
|
||||
GrLOD_t origLargeLod; /* for pop 'n' push */
|
||||
GrLOD_t origSmallLod; /* for pop 'n' push */
|
||||
/* I need a min of 5 start addresses worst case - Trilinear Multibase
|
||||
** The unions contain start addresses that are mutually exclusive
|
||||
** ps, if the order of these unions ever change, some shit will seriously
|
||||
** break, especially in plTxMnTexSource() */
|
||||
union u0_u { /* can you believe softice doesn't understand unnamed unions? */
|
||||
FxU32 bothAdd; /* BOTH linear start */
|
||||
FxU32 evenAdd; /* EVEN linear start */
|
||||
FxU32 multiR0Add; /* BOTH multi 1st range start */
|
||||
FxU32 multiR0EvenAdd; /* EVEN multi 1st range start */
|
||||
} u0;
|
||||
union u1_u {
|
||||
FxU32 oddAdd; /* ODD linear start */
|
||||
FxU32 multiR1Add; /* BOTH multi 2nd range start */
|
||||
FxU32 multiR1OddAdd; /* ODD multi 2nd range start */
|
||||
} u1;
|
||||
union u2_u {
|
||||
FxU32 multiR2Add; /* BOTH multi 3rd range start */
|
||||
FxU32 multiR2EvenAdd; /* EVEN multi 3rd range start */
|
||||
} u2;
|
||||
union u3_u {
|
||||
FxU32 multiR3Add; /* BOTH multi 4th range start */
|
||||
FxU32 multiR3OddAdd; /* EVEN multi 4th range start */
|
||||
} u3;
|
||||
union u4_u {
|
||||
FxU32 multiR3EvenAdd; /* ODD multi 4th range start */
|
||||
} u4; /* just for consistency */
|
||||
tlTxMnFlags_t flags;
|
||||
} tlTxMnTexture_t;
|
||||
|
||||
/* exposed function prototypes for TxMn */
|
||||
hTexId_t plTxMnLoadTxMngr( TlTexture* lpTexture );
|
||||
void plTxMnDownloadAll( );
|
||||
void plTxMnTexSource( hTexId_t deTexId, FxU32 deMipMask );
|
||||
void plTxMnReset( hTexId_t deTexId );
|
||||
void plTxMnSetDownload( hTexId_t theTexId, FxBool bDownLoad );
|
||||
FxBool plTxMnGetMultibase( hTexId_t deTexId );
|
||||
void plTxMnSetMultibase( hTexId_t deTexId, FxBool bMultibase );
|
||||
FxBool plTxMnGetTrilinear( hTexId_t deTexId );
|
||||
void plTxMnSetTrilinear( hTexId_t theTexId, FxBool bTrilinear );
|
||||
FxBool plTxMnGetMultiRevOrder( );
|
||||
void plTxMnSetMultiOffsetFix( FxBool bOffsetFix );
|
||||
FxBool plTxMnGetMultiOffsetFix( );
|
||||
void plTxMnSetMultiRevOrder( FxBool bOrder );
|
||||
void plTxMnGetInfo( hTexId_t deTexHndl, GrTexInfo *deGrTexInfo );
|
||||
void plTxMnDwnldMipMapLod( hTexId_t dstTexId, hTexId_t srcTexId, GrLOD_t deLod );
|
||||
void plTxMnDwnldMipMapLodPrtl( hTexId_t dstTexId, hTexId_t srcTexId, GrLOD_t deLod,
|
||||
int nFstRow, int nLstRow );
|
||||
|
||||
/* public helper function prototypes */
|
||||
void plPopLod( hTexId_t hCurrTexture, mipMapEnd_t mipMapEnd );
|
||||
void plPushLod( hTexId_t hCurrTexture, mipMapEnd_t mipMapEnd );
|
||||
void plCreateTlTexture( TlTexture *disTlTexture, FxU16 daColors[] );
|
||||
|
||||
/* static helper prototypes */
|
||||
static void prSetBeenPopd( hTexId_t deTexId, FxBool bBeenPopd );
|
||||
static FxU32 prGetLodSize( GrTexInfo *const disTexInfo, GrLOD_t disLOD );
|
||||
static FxU32 prTexMultiMemRequired( FxU32 deMipMask, GrTexBaseRange_t deRange,
|
||||
GrTexInfo* deTexInfo );
|
||||
static void prGetLod( GrTexInfo *lpTexInfo, GrLOD_t deLod, void *data );
|
||||
static void prPopLod( GrTexInfo *lpDeTexInfo, mipMapEnd_t deMipMapEnd );
|
||||
static void prPushLod( GrTexInfo *lpDeTexInfo, mipMapEnd_t deMipMapEnd );
|
||||
static FxU32 prGetTxMnAdd( hTexId_t deTexId, GrLOD_t deLod );
|
||||
static int prGetLodWidth( GrLOD_t lod, GrAspectRatio_t aspect );
|
||||
static int prGetLodHeight( GrLOD_t lod, GrAspectRatio_t aspect );
|
||||
static FxU32 prGetMultiMemBump( const GrTexInfo *const deTexInfo,
|
||||
GrTexBaseRange_t deTexBase,
|
||||
FxU32 deMipMask );
|
||||
|
||||
|
||||
|
||||
|
||||
/* some macros to play with the bit fields */
|
||||
#define IS_DOWNLOADABLE( tex ) (tex).flags.isDownloadable ? FXTRUE : FXFALSE
|
||||
#define IS_MULTIBASE( tex ) (tex).flags.isMultibase ? FXTRUE : FXFALSE
|
||||
#define IS_BEENPOPD( tex ) (tex).flags.isBeenPopd ? FXTRUE : FXFALSE
|
||||
#define IS_TRILINEAR( tex ) (tex).flags.isTrilinear ? FXTRUE : FXFALSE
|
||||
#define IS_DIRTY( tex ) (tex).flags.isDirty ? FXTRUE : FXFALSE
|
||||
#define SET_DOWNLOADABLE( tex, b ) (tex).flags.isDownloadable = b
|
||||
#define SET_MULTIBASE( tex, b ) (tex).flags.isMultibase = b
|
||||
#define SET_TRILINEAR( tex, b ) (tex).flags.isTrilinear = b
|
||||
#define SET_BEENPOPD( tex, b ) (tex).flags.isBeenPopd = b
|
||||
#define SET_DIRTY( tex, b ) (tex).flags.isDirty = b
|
||||
|
||||
|
||||
#ifdef NDEBUG
|
||||
#undef NDEBUG
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,91 +0,0 @@
|
||||
/*
|
||||
** Copyright (c) 1997, 3Dfx Interactive, Inc.
|
||||
** All Rights Reserved.
|
||||
**
|
||||
** This is UNPUBLISHED PROPRIETARY SOURCE CODE of 3Dfx Interactive, Inc.;
|
||||
** the contents of this file may not be disclosed to third parties, copied or
|
||||
** duplicated in any form, in whole or in part, without the prior written
|
||||
** permission of 3Dfx Interactive, Inc.
|
||||
**
|
||||
** RESTRICTED RIGHTS LEGEND:
|
||||
** Use, duplication or disclosure by the Government is subject to restrictions
|
||||
** as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
|
||||
** and Computer Software clause at DFARS 252.227-7013, and/or in similar or
|
||||
** successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
|
||||
** rights reserved under the Copyright Laws of the United States.
|
||||
**
|
||||
*/
|
||||
|
||||
#ifndef _QATEST00_H_
|
||||
#define _QATEST00_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define RED_565 0xF800
|
||||
#define GRN_565 0x07E0
|
||||
#define BLU_565 0x001F
|
||||
#define RED_1555 0x7C00
|
||||
#define GRN_1555 0x03E0
|
||||
#define BLU_1555 0x001F
|
||||
#define RED_4444 0x0F00
|
||||
#define GRN_4444 0x00F0
|
||||
#define BLU_4444 0x000F
|
||||
#define RED_332 0x00E0
|
||||
#define GRN_332 0x001C
|
||||
#define BLU_332 0x0003
|
||||
#define RED_8332 0x00E0
|
||||
#define GRN_8332 0x001C
|
||||
#define BLU_8332 0x0003
|
||||
|
||||
#define RED 0x000000ff
|
||||
#define BLUE 0x00ff0000
|
||||
|
||||
typedef enum { DISABLE, NEAREST, TRILINEAR, DITHRD_NREST, DITHRD_TRILIN } MipMapMode_t;
|
||||
typedef enum { SCALE_IN=1, SCALE_OUT=-1 } ScaleDir_t; //sign
|
||||
typedef enum { SCALE_1=0, SCALE_2, SCALE_4, SCALE_8, SCALE_16, SCALE_32 } ScaleAmt_t;//bitwise shift factor
|
||||
typedef enum { BOTH_POINT, MIN_BILNEAR, MAG_BILNEAR, BOTH_BILNEAR } FilterMode_t;
|
||||
|
||||
typedef struct {
|
||||
float fStartX, fEndX;
|
||||
float rStartX, rEndX;
|
||||
float fStartY, fEndY;
|
||||
float rStartY, rEndY;
|
||||
GrLOD_t currLod;
|
||||
} surfInfo_t;
|
||||
|
||||
typedef struct {
|
||||
const char *lpzTexFileName;
|
||||
TlTexture *lpTlTexture;
|
||||
hTexId_t hTexture;
|
||||
surfInfo_t surfInfo;
|
||||
} myTexture_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
float sMult;
|
||||
float tMult;
|
||||
} TexCoordFactors;
|
||||
|
||||
|
||||
static void doHelp( void );
|
||||
static hTexId_t doLoadTexture( const char *lpzFileName, GrTexInfo *tEtTexInfo,
|
||||
FxU16 *yColors, FxBool isDwnldble );
|
||||
static void doUnloadTextures( );
|
||||
static void doScaleScreenSurf( hTexId_t deTexId, ScaleDir_t deDir, ScaleAmt_t deAmt );
|
||||
static void getFgVerts( hTexId_t deTexId, GrVertex *deFgVerts );
|
||||
static int getLodWidth( GrLOD_t lod, GrAspectRatio_t aspect );
|
||||
static int getLodHeight( GrLOD_t lod, GrAspectRatio_t aspect );
|
||||
static void getLodToDwnld( );
|
||||
static void getLodPrtlToDwnld( );
|
||||
static void doResetFgVerts( hTexId_t deTexId );
|
||||
|
||||
#ifdef NDEBUG
|
||||
#undef NDEBUG
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
@@ -1,169 +0,0 @@
|
||||
/*
|
||||
** Copyright (c) 1997, 3Dfx Interactive, Inc.
|
||||
** All Rights Reserved.
|
||||
**
|
||||
** This is UNPUBLISHED PROPRIETARY SOURCE CODE of 3Dfx Interactive, Inc.;
|
||||
** the contents of this file may not be disclosed to third parties, copied or
|
||||
** duplicated in any form, in whole or in part, without the prior written
|
||||
** permission of 3Dfx Interactive, Inc.
|
||||
**
|
||||
** RESTRICTED RIGHTS LEGEND:
|
||||
** Use, duplication or disclosure by the Government is subject to restrictions
|
||||
** as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
|
||||
** and Computer Software clause at DFARS 252.227-7013, and/or in similar or
|
||||
** successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
|
||||
** rights reserved under the Copyright Laws of the United States.
|
||||
**
|
||||
**
|
||||
** $Revision$
|
||||
** $Date$
|
||||
**
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#ifndef __linux__
|
||||
#include <conio.h>
|
||||
#endif
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <glide.h>
|
||||
#include "tlib.h"
|
||||
|
||||
#define RED_565 0xF800
|
||||
#define GRN_565 0x07E0
|
||||
#define BLU_565 0x001F
|
||||
#define INVBLU_565 0xFFE0
|
||||
#define INVGRN_565 0xF81F
|
||||
#define INVRED_565 0x07FF
|
||||
#define WHT_565 0xFFFF
|
||||
#define BLK_565 0x0000
|
||||
|
||||
#define NUM_X_BLCKS 7
|
||||
#define NUM_Y_BLCKS 7
|
||||
|
||||
GrHwConfiguration hwconfig;
|
||||
static char version[80];
|
||||
|
||||
static const char name[] = "QATEST01";
|
||||
static const char purpose[] = "Buffer Swap Alliance bug";
|
||||
static const char usage[] = "-n <frames> -r <res> -d <filename>";
|
||||
|
||||
|
||||
void
|
||||
main( int argc, char **argv)
|
||||
{
|
||||
/* Definitions */
|
||||
char match;
|
||||
char **remArgs;
|
||||
int rv;
|
||||
|
||||
GrScreenResolution_t resolution = GR_RESOLUTION_640x480;
|
||||
float scrWidth = 640.0f;
|
||||
float scrHeight = 480.0f;
|
||||
int frames = -1;
|
||||
|
||||
GrLfbInfo_t myLfbInfo;
|
||||
int nBlckWdth;
|
||||
int nBlckHght;
|
||||
|
||||
FxU16 yBlckClrs[NUM_Y_BLCKS][NUM_X_BLCKS] =
|
||||
{{RED_565, GRN_565, BLU_565, INVRED_565, INVGRN_565, INVBLU_565, WHT_565},
|
||||
{RED_565, GRN_565, BLU_565, INVRED_565, INVGRN_565, INVBLU_565, WHT_565},
|
||||
{RED_565, GRN_565, BLU_565, INVRED_565, INVGRN_565, INVBLU_565, WHT_565},
|
||||
{RED_565, GRN_565, BLU_565, INVRED_565, INVGRN_565, INVBLU_565, WHT_565},
|
||||
{RED_565, GRN_565, BLU_565, INVRED_565, INVGRN_565, INVBLU_565, WHT_565},
|
||||
{RED_565, GRN_565, BLU_565, INVRED_565, INVGRN_565, INVBLU_565, WHT_565},
|
||||
{BLK_565, BLK_565, BLK_565, BLK_565, BLK_565, BLK_565, BLK_565}};
|
||||
|
||||
|
||||
/* Initializations */
|
||||
nBlckWdth = ((int) scrWidth / NUM_X_BLCKS);
|
||||
nBlckHght = ((int) scrHeight / NUM_Y_BLCKS);
|
||||
|
||||
/* Code */
|
||||
/* Process Command Line Arguments */
|
||||
while( rv = tlGetOpt( argc, argv, "nrd", &match, &remArgs ) ) {
|
||||
if ( rv == -1 ) {
|
||||
printf( "Unrecognized command line argument\n" );
|
||||
printf( "%s %s\n", name, usage );
|
||||
printf( "Available resolutions:\n%s\n",
|
||||
tlGetResolutionList() );
|
||||
return;
|
||||
}
|
||||
switch( match ) {
|
||||
case 'n':
|
||||
frames = atoi( remArgs[0] );
|
||||
break;
|
||||
case 'r':
|
||||
resolution = tlGetResolutionConstant( remArgs[0],
|
||||
&scrWidth,
|
||||
&scrHeight );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
tlSetScreen( scrWidth, scrHeight );
|
||||
|
||||
grGlideGetVersion( version );
|
||||
|
||||
printf( "%s:\n%s\n", name, purpose );
|
||||
printf( "%s\n", version );
|
||||
printf( "Resolution: %s\n", tlGetResolutionString( resolution ) );
|
||||
if ( frames == -1 ) {
|
||||
printf( "Press A Key To Begin Test.\n" );
|
||||
tlGetCH();
|
||||
}
|
||||
|
||||
/* Initialize Glide */
|
||||
grGlideInit();
|
||||
assert( grSstQueryHardware( &hwconfig ) );
|
||||
grSstSelect( 0 );
|
||||
assert( grSstWinOpen( 0, resolution, GR_REFRESH_60Hz, GR_COLORFORMAT_ABGR,
|
||||
GR_ORIGIN_UPPER_LEFT, 2, 1 ) );
|
||||
|
||||
myLfbInfo.size = sizeof(GrLfbInfo_t);
|
||||
if ( !grLfbLock(GR_LFB_WRITE_ONLY, GR_BUFFER_BACKBUFFER, GR_LFBWRITEMODE_565,
|
||||
GR_ORIGIN_UPPER_LEFT, FXFALSE, &myLfbInfo))
|
||||
frames=0;
|
||||
|
||||
while ( frames-- )
|
||||
{
|
||||
int i, j, k, l;
|
||||
FxU16 *lpPxl;
|
||||
FxU32 stride = myLfbInfo.strideInBytes;
|
||||
void *tmpLfb;
|
||||
|
||||
tmpLfb = (void*) ((FxU16*)myLfbInfo.lfbPtr + 1 + 2*stride/2);
|
||||
grBufferClear( 0xffffff, 0, GR_WDEPTHVALUE_FARTHEST );
|
||||
|
||||
for (i=0; i < NUM_Y_BLCKS; ++i) {
|
||||
for (j=0; j < NUM_X_BLCKS; ++j) {
|
||||
lpPxl = ((FxU16 *) tmpLfb + j*nBlckWdth) +
|
||||
(i*nBlckHght*stride/2);
|
||||
for(k=0; k < nBlckHght; ++k) {
|
||||
for (l=0; l < nBlckWdth; ++l) {
|
||||
*lpPxl = yBlckClrs[i][j];
|
||||
++lpPxl;
|
||||
}
|
||||
lpPxl += (stride/2 - nBlckWdth); /* inc in pixel space */
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
grBufferSwap( 1 );
|
||||
if (hwconfig.SSTs[0].type == GR_SSTTYPE_SST96) {
|
||||
tlGetDimsByConst(resolution,
|
||||
&scrWidth,
|
||||
&scrHeight );
|
||||
|
||||
grClipWindow(0, 0, (FxU32) scrWidth, (FxU32) scrHeight);
|
||||
}
|
||||
|
||||
if ( tlKbHit() ) frames = 0;
|
||||
}
|
||||
grLfbUnlock( GR_LFB_WRITE_ONLY, GR_BUFFER_BACKBUFFER );
|
||||
grGlideShutdown();
|
||||
return;
|
||||
}
|
||||
Binary file not shown.
File diff suppressed because one or more lines are too long
@@ -1,48 +0,0 @@
|
||||
@echo off
|
||||
REM
|
||||
REM if FX_GLIDE_TEST_SRCIMG is not initiated, the default directory is
|
||||
REM \3dfx\devel\sst1\glide\images
|
||||
REM
|
||||
if [%FX_GLIDE_TEST_SRCIMG%]==[] goto Default
|
||||
|
||||
goto Output
|
||||
|
||||
:Default
|
||||
set FX_GLIDE_TEST_SRCIMG=%BUILD_ROOT_SST1%\glide\images
|
||||
|
||||
:Output
|
||||
set sdir=%FX_GLIDE_TEST_SRCIMG%
|
||||
|
||||
@echo on
|
||||
test00 -d %sdir%\test00.vgm
|
||||
sleep 1
|
||||
test01 -d %sdir%\test01.vgm
|
||||
sleep 1
|
||||
test02 -d %sdir%\test02.vgm
|
||||
sleep 1
|
||||
test03 -d %sdir%\test03.vgm
|
||||
sleep 1
|
||||
test04 -d %sdir%\test04.vgm
|
||||
sleep 1
|
||||
test05 -d %sdir%\test05.vgm
|
||||
sleep 1
|
||||
test06 -d %sdir%\test06.vgm
|
||||
sleep 1
|
||||
test07 -d %sdir%\test07.vgm
|
||||
sleep 1
|
||||
test08 -d %sdir%\test08.vgm
|
||||
sleep 1
|
||||
test09 -d %sdir%\test09.vgm
|
||||
sleep 1
|
||||
test10 -d %sdir%\test10.vgm
|
||||
sleep 1
|
||||
test13 -d %sdir%\test13.vgm
|
||||
sleep 1
|
||||
test16 -d %sdir%\test16.vgm
|
||||
sleep 1
|
||||
test17 -d %sdir%\test17.vgm
|
||||
sleep 1
|
||||
test18 -d %sdir%\test18.vgm
|
||||
sleep 1
|
||||
test19 -d %sdir%\test19.vgm
|
||||
sleep 1
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user