glide3x/sst1: replaced several [unsigned] long type usage with FxI32/FxU32

should fix issue noted at
e8f60ad8bb (commitcomment-40186242)

the glide2x tree in whole needs a similar massage..
This commit is contained in:
Ozkan Sezer
2020-10-07 23:00:40 +03:00
parent fe35279d12
commit acddb52685
15 changed files with 218 additions and 218 deletions

View File

@@ -190,7 +190,7 @@ void
_grSwizzleColor( GrColor_t *color ) _grSwizzleColor( GrColor_t *color )
{ {
GR_DCL_GC; GR_DCL_GC;
unsigned long red, green, blue, alpha; FxU32 red, green, blue, alpha;
switch( gc->state.color_format ) { switch( gc->state.color_format ) {
case GR_COLORFORMAT_ARGB: case GR_COLORFORMAT_ARGB:

View File

@@ -109,7 +109,7 @@ extern const int _grMipMapHostWH[G3_ASPECT_TRANSLATE(GR_ASPECT_LOG2_1x8)+1][G3_L
GR_DDFUNC(_grTexDownloadNccTable, void, ( GrChipID_t tmu, FxU32 which, const GuNccTable *table, int start, int end )) GR_DDFUNC(_grTexDownloadNccTable, void, ( GrChipID_t tmu, FxU32 which, const GuNccTable *table, int start, int end ))
{ {
int i; int i;
unsigned long *hwNCC; FxU32 *hwNCC;
GR_BEGIN_NOFIFOCHECK("_grTexDownloadNccTable",89); GR_BEGIN_NOFIFOCHECK("_grTexDownloadNccTable",89);
GDBG_INFO_MORE((gc->myLevel,"(%d,%d, 0x%x, %d,%d)\n",tmu,which,table,start,end)); GDBG_INFO_MORE((gc->myLevel,"(%d,%d, 0x%x, %d,%d)\n",tmu,which,table,start,end));

View File

@@ -36,7 +36,7 @@ int main( int argc, char **argv) {
char filename[256]; char filename[256];
FxU8 subframe = 0; FxU8 subframe = 0;
unsigned long chromaColor; FxU32 chromaColor;
/* Initialize Glide */ /* Initialize Glide */
grGlideInit(); grGlideInit();

View File

@@ -211,7 +211,7 @@ int main( int argc, char **argv) {
return 0; return 0;
} }
static unsigned long randx = 1; static unsigned int randx = 1;
static unsigned int iRandom (unsigned int maxr) static unsigned int iRandom (unsigned int maxr)
{ {

View File

@@ -32,11 +32,11 @@ int main( int argc, char **argv) {
int frames = -1; int frames = -1;
TlTexture baseTexture; TlTexture baseTexture;
unsigned long baseTextureAddr; FxU32 baseTextureAddr;
TlTexture lightTexture; TlTexture lightTexture;
unsigned long lightTextureAddr; FxU32 lightTextureAddr;
TlTexture detailTexture; TlTexture detailTexture;
unsigned long detailTextureAddr; FxU32 detailTextureAddr;
TlVertex3D srcVerts[4]; TlVertex3D srcVerts[4];
float distance, dDelta; float distance, dDelta;

View File

@@ -30,9 +30,9 @@ int main( int argc, char **argv) {
int frames = -1; int frames = -1;
TlTexture baseTexture; TlTexture baseTexture;
unsigned long baseTextureAddr; FxU32 baseTextureAddr;
TlTexture lightTexture; TlTexture lightTexture;
unsigned long lightTextureAddr; FxU32 lightTextureAddr;
FxI32 ftsize = 0; FxI32 ftsize = 0;
GrFog_t *fogtable = NULL; GrFog_t *fogtable = NULL;

View File

@@ -231,7 +231,7 @@ int main( int argc, char **argv) {
return 0; return 0;
} }
static unsigned long randx = 1; static unsigned int randx = 1;
static unsigned int iRandom (unsigned int maxr) static unsigned int iRandom (unsigned int maxr)
{ {

View File

@@ -12,7 +12,7 @@
#include "tlib.h" #include "tlib.h"
#define SNAP_COORD(v) ( ( v ) = (( float )( ( long )( ( v ) * 16 ) )) / 16.0f ) #define SNAP_COORD(v) ( ( v ) = (( float )( ( FxI32 )( ( v ) * 16 ) )) / 16.0f )
int hwconfig; int hwconfig;
static const char *version; static const char *version;
@@ -236,7 +236,7 @@ int main( int argc, char **argv) {
return 0; return 0;
} }
static unsigned long randx = 1; static unsigned int randx = 1;
static unsigned int iRandom (unsigned int maxr) static unsigned int iRandom (unsigned int maxr)
{ {

View File

@@ -13,7 +13,7 @@
#include "tlib.h" #include "tlib.h"
#define SNAP_COORD(v) ( ( v ) = (( float )( ( long )( ( v ) * 16 ) )) / 16.0f ) #define SNAP_COORD(v) ( ( v ) = (( float )( ( FxI32 )( ( v ) * 16 ) )) / 16.0f )
#define WREFWIDTH 640.f #define WREFWIDTH 640.f
#define WREFHEIGHT 480.f #define WREFHEIGHT 480.f

View File

@@ -155,7 +155,7 @@ doNothing:
return 0; return 0;
} }
static unsigned long randx = 1; static unsigned int randx = 1;
static unsigned int iRandom (unsigned int maxr) static unsigned int iRandom (unsigned int maxr)
{ {

View File

@@ -45,7 +45,7 @@ int main( int argc, char **argv) {
GrFog_t *fogtable = NULL; GrFog_t *fogtable = NULL;
TlTexture baseTexture; TlTexture baseTexture;
unsigned long baseTextureAddr; FxU32 baseTextureAddr;
FogVertex vtxA, vtxB, vtxC, vtxD; FogVertex vtxA, vtxB, vtxC, vtxD;
TlVertex3D srcVerts[4]; TlVertex3D srcVerts[4];
TlVertex3D xfVerts[4]; TlVertex3D xfVerts[4];

View File

@@ -32,7 +32,7 @@ int main( int argc, char **argv) {
char filename[256]; char filename[256];
TlTexture baseTexture; TlTexture baseTexture;
unsigned long baseTextureAddr; FxU32 baseTextureAddr;
GrVertex vtxA, vtxB, vtxC, vtxD; GrVertex vtxA, vtxB, vtxC, vtxD;
GrTexChromakeyMode_t texchroma = GR_TEXCHROMA_DISABLE_EXT; GrTexChromakeyMode_t texchroma = GR_TEXCHROMA_DISABLE_EXT;
char *extstr; char *extstr;

View File

@@ -28,7 +28,7 @@ int main( int argc, char **argv) {
iFailures = 0, iStatusAt = 0, iFailures = 0, iStatusAt = 0,
viewport[4]; viewport[4];
GrContext_t context; GrContext_t context;
unsigned long hWndMain = tlGethWnd(); FxU32 hWndMain = tlGethWnd();
printf ( "Test36 - Glide resolution checker. All output goes to the console.\n\n" ); printf ( "Test36 - Glide resolution checker. All output goes to the console.\n\n" );
tlGetCH (); tlGetCH ();

View File

@@ -139,7 +139,7 @@ static ResToRes resTable[] = {
{ "400x300", GR_RESOLUTION_400x300, 400.0f, 300.0f } /* 0xF */ { "400x300", GR_RESOLUTION_400x300, 400.0f, 300.0f } /* 0xF */
}; };
static long resTableSize = sizeof( resTable ) / sizeof( ResToRes ); static int resTableSize = sizeof( resTable ) / sizeof( ResToRes );
void void
tlGetDimsByConst(const int resConst, float *w, float *h) tlGetDimsByConst(const int resConst, float *w, float *h)
@@ -369,7 +369,7 @@ float tlScaleY( float coord ) {
-------------------------------------------------------------------*/ -------------------------------------------------------------------*/
static unsigned char fontTable[128][2]; static unsigned char fontTable[128][2];
static GrTexInfo fontInfo; static GrTexInfo fontInfo;
static unsigned long fontAddress; static FxU32 fontAddress;
static const char fontString[] = "ABCDEFGHIJKLMN" static const char fontString[] = "ABCDEFGHIJKLMN"
"OPQRSTUVWXYZ01" "OPQRSTUVWXYZ01"
"23456789.,;:*-" "23456789.,;:*-"

View File

@@ -34,7 +34,7 @@ extern "C" {
// end up looking like twos complement numbers (they carry out from the '1') // end up looking like twos complement numbers (they carry out from the '1')
#define FLOAT_FIX(f,fracbits) ((f)+(float)(3<<(22-(fracbits)))) #define FLOAT_FIX(f,fracbits) ((f)+(float)(3<<(22-(fracbits))))
#define SST_FLOAT(f,scale,shift) (unsigned long)((f)*((scale)*(float)(1<<shift))) #define SST_FLOAT(f,scale,shift) (FxU32)((f)*((scale)*(float)(1<<shift)))
#define SST_TLOD_MINMAX(lodmin,lodmax) \ #define SST_TLOD_MINMAX(lodmin,lodmax) \
(((lodmin) << (SST_LODMIN_SHIFT)) | \ (((lodmin) << (SST_LODMIN_SHIFT)) | \
((lodmax) << (SST_LODMAX_SHIFT))) ((lodmax) << (SST_LODMAX_SHIFT)))
@@ -48,16 +48,16 @@ extern "C" {
// these crazy macros returns the sign of a number (1 if >= 0; -1 if < 0) // these crazy macros returns the sign of a number (1 if >= 0; -1 if < 0)
#define ISIGN(x) (((x) | 0x40000000) >> 30) #define ISIGN(x) (((x) | 0x40000000) >> 30)
#define FSIGN(f) ISIGN(*(long *)&f) #define FSIGN(f) ISIGN(*(FxI32 *)&f)
typedef struct vertex_Rec { typedef struct vertex_Rec {
unsigned long x; // 12.4 format FxU32 x; // 12.4 format
unsigned long y; // 12.4 FxU32 y; // 12.4
} vtxRec; } vtxRec;
// 256 color palette tables // 256 color palette tables
typedef struct { typedef struct {
unsigned long argb[256]; FxU32 argb[256];
} Pal256; } Pal256;
#define BIT(n) (1<<(n)) #define BIT(n) (1<<(n))
@@ -605,93 +605,93 @@ typedef struct {
typedef struct sstregs { // THE CHIP typedef struct sstregs { // THE CHIP
#ifndef SST96 #ifndef SST96
// EXTERNAL registers // EXTERNAL registers
unsigned long status; // chip status, Read Only FxU32 status; // chip status, Read Only
unsigned long reserved0; FxU32 reserved0;
vtxRec vA; // Vertex A,B,C vtxRec vA; // Vertex A,B,C
vtxRec vB; vtxRec vB;
vtxRec vC; vtxRec vC;
long r; // 12.12 Parameters FxI32 r; // 12.12 Parameters
long g; // 12.12 FxI32 g; // 12.12
long b; // 12.12 FxI32 b; // 12.12
long z; // 20.12 FxI32 z; // 20.12
long a; // 12.12 FxI32 a; // 12.12
long s; // 14.18 FxI32 s; // 14.18
long t; // 14.18 FxI32 t; // 14.18
long w; // 2.30 FxI32 w; // 2.30
long drdx; // X Gradients FxI32 drdx; // X Gradients
long dgdx; FxI32 dgdx;
long dbdx; FxI32 dbdx;
long dzdx; FxI32 dzdx;
long dadx; FxI32 dadx;
long dsdx; FxI32 dsdx;
long dtdx; FxI32 dtdx;
long dwdx; FxI32 dwdx;
long drdy; // Y Gradients FxI32 drdy; // Y Gradients
long dgdy; FxI32 dgdy;
long dbdy; FxI32 dbdy;
long dzdy; FxI32 dzdy;
long dady; FxI32 dady;
long dsdy; FxI32 dsdy;
long dtdy; FxI32 dtdy;
long dwdy; FxI32 dwdy;
unsigned long triangleCMD; // execute a triangle command (float) FxU32 triangleCMD; // execute a triangle command (float)
unsigned long reserved1; FxU32 reserved1;
vtxRec FvA; // floating point version vtxRec FvA; // floating point version
vtxRec FvB; vtxRec FvB;
vtxRec FvC; vtxRec FvC;
long Fr; // floating point version FxI32 Fr; // floating point version
long Fg; FxI32 Fg;
long Fb; FxI32 Fb;
long Fz; FxI32 Fz;
long Fa; FxI32 Fa;
long Fs; FxI32 Fs;
long Ft; FxI32 Ft;
long Fw; FxI32 Fw;
long Fdrdx; FxI32 Fdrdx;
long Fdgdx; FxI32 Fdgdx;
long Fdbdx; FxI32 Fdbdx;
long Fdzdx; FxI32 Fdzdx;
long Fdadx; FxI32 Fdadx;
long Fdsdx; FxI32 Fdsdx;
long Fdtdx; FxI32 Fdtdx;
long Fdwdx; FxI32 Fdwdx;
long Fdrdy; FxI32 Fdrdy;
long Fdgdy; FxI32 Fdgdy;
long Fdbdy; FxI32 Fdbdy;
long Fdzdy; FxI32 Fdzdy;
long Fdady; FxI32 Fdady;
long Fdsdy; FxI32 Fdsdy;
long Fdtdy; FxI32 Fdtdy;
long Fdwdy; FxI32 Fdwdy;
unsigned long FtriangleCMD; // execute a triangle command FxU32 FtriangleCMD; // execute a triangle command
unsigned long fbzColorPath; // color select and combine FxU32 fbzColorPath; // color select and combine
unsigned long fogMode; // fog Mode FxU32 fogMode; // fog Mode
unsigned long alphaMode; // alpha Mode FxU32 alphaMode; // alpha Mode
unsigned long fbzMode; // framebuffer and Z mode FxU32 fbzMode; // framebuffer and Z mode
unsigned long lfbMode; // linear framebuffer Mode FxU32 lfbMode; // linear framebuffer Mode
unsigned long clipLeftRight; // (6)10(6)10 FxU32 clipLeftRight; // (6)10(6)10
unsigned long clipBottomTop; // (6)10(6)10 FxU32 clipBottomTop; // (6)10(6)10
unsigned long nopCMD; // execute a nop command FxU32 nopCMD; // execute a nop command
unsigned long fastfillCMD; // execute a fast fill command FxU32 fastfillCMD; // execute a fast fill command
unsigned long swapbufferCMD;// execute a swapbuffer command FxU32 swapbufferCMD;// execute a swapbuffer command
unsigned long fogColor; // (8)888 FxU32 fogColor; // (8)888
unsigned long zaColor; // 8(8)16 FxU32 zaColor; // 8(8)16
unsigned long chromaKey; // (8)888 FxU32 chromaKey; // (8)888
unsigned long reserved2; FxU32 reserved2;
unsigned long reserved3; FxU32 reserved3;
unsigned long stipple; // 32 bits, MSB masks pixels FxU32 stipple; // 32 bits, MSB masks pixels
unsigned long c0; // 8.8.8.8 (ARGB) FxU32 c0; // 8.8.8.8 (ARGB)
unsigned long c1; // 8.8.8.8 (ARGB) FxU32 c1; // 8.8.8.8 (ARGB)
struct { // statistic gathering variables struct { // statistic gathering variables
unsigned int fbiPixelsIn; unsigned int fbiPixelsIn;
unsigned int fbiChromaFail; unsigned int fbiChromaFail;
@@ -700,38 +700,38 @@ typedef struct sstregs { // THE CHIP
unsigned int fbiPixelsOut; unsigned int fbiPixelsOut;
} stats; } stats;
unsigned long fogTable[32]; // 64 entries, 2 per word, 2 bytes each FxU32 fogTable[32]; // 64 entries, 2 per word, 2 bytes each
unsigned long reserved8[8]; FxU32 reserved8[8];
unsigned long fbiInit4; FxU32 fbiInit4;
unsigned long vRetrace; FxU32 vRetrace;
unsigned long backPorch; FxU32 backPorch;
unsigned long videoDimensions; FxU32 videoDimensions;
unsigned long fbiInit0; FxU32 fbiInit0;
unsigned long fbiInit1; FxU32 fbiInit1;
unsigned long fbiInit2; FxU32 fbiInit2;
unsigned long fbiInit3; FxU32 fbiInit3;
unsigned long hSync; FxU32 hSync;
unsigned long vSync; FxU32 vSync;
unsigned long clutData; FxU32 clutData;
unsigned long dacData; FxU32 dacData;
unsigned long videoFilterRgbThreshold; FxU32 videoFilterRgbThreshold;
unsigned long reserved35[35]; // reserved51 became reserved35, FxU32 reserved35[35]; // reserved51 became reserved35,
// Grabbed remaining 16 for sst-96 // Grabbed remaining 16 for sst-96
//======================================================================== //========================================================================
// Please treat as the SST-96 area. // Please treat as the SST-96 area.
// These belong in the SST_CHROMARANGE register // These beFxI32 in the SST_CHROMARANGE register
#define SST_CHROMARANGE_BLUE_EX BIT(24) // Blue value in exclusive mode #define SST_CHROMARANGE_BLUE_EX BIT(24) // Blue value in exclusive mode
#define SST_CHROMARANGE_GREEN_EX BIT(25) // Green value in exclusive mode #define SST_CHROMARANGE_GREEN_EX BIT(25) // Green value in exclusive mode
#define SST_CHROMARANGE_RED_EX BIT(26) // Red value in exclusive mode #define SST_CHROMARANGE_RED_EX BIT(26) // Red value in exclusive mode
#define SST_CHROMARANGE_BLOCK_OR BIT(27) // Union of all colors. #define SST_CHROMARANGE_BLOCK_OR BIT(27) // Union of all colors.
#define SST_ENCHROMARANGE BIT(28) #define SST_ENCHROMARANGE BIT(28)
// These belong in the clipLeftRight and clipTopBottom Registers. // These beFxI32 in the clipLeftRight and clipTopBottom Registers.
#define SST_ENRECTCLIP01 BIT(31) // #define SST_ENRECTCLIP01 BIT(31) //
#define SST_RECTCLIP_EX BIT(31) // #define SST_RECTCLIP_EX BIT(31) //
@@ -750,35 +750,35 @@ typedef struct sstregs { // THE CHIP
#define SST_DEVICE_ID_SST97 4 #define SST_DEVICE_ID_SST97 4
unsigned long chromaRange; // SST-96 specific FxU32 chromaRange; // SST-96 specific
unsigned long clipLeftRight1; // SST-96 specific FxU32 clipLeftRight1; // SST-96 specific
unsigned long clipBottomTop1; // SST-96 specific FxU32 clipBottomTop1; // SST-96 specific
unsigned long colBufferSetup; // SST-96 specific FxU32 colBufferSetup; // SST-96 specific
unsigned long auxBufferSetup; // SST-96 specific FxU32 auxBufferSetup; // SST-96 specific
unsigned long texChipSel; // SST-96 specific FxU32 texChipSel; // SST-96 specific
unsigned long swapPendCmd; // SST-96 specific FxU32 swapPendCmd; // SST-96 specific
unsigned long reservedSST96[9]; // SST-96 specific FxU32 reservedSST96[9]; // SST-96 specific
// End SST-96 area // End SST-96 area
//======================================================================== //========================================================================
unsigned long textureMode; // texture Mode FxU32 textureMode; // texture Mode
unsigned long tLOD; // texture LOD settings FxU32 tLOD; // texture LOD settings
unsigned long tDetail; // texture detail settings FxU32 tDetail; // texture detail settings
unsigned long texBaseAddr; // current texture base address FxU32 texBaseAddr; // current texture base address
unsigned long texBaseAddr1; FxU32 texBaseAddr1;
unsigned long texBaseAddr2; FxU32 texBaseAddr2;
unsigned long texBaseAddr38; FxU32 texBaseAddr38;
unsigned long trexInit0; // hardware init bits FxU32 trexInit0; // hardware init bits
unsigned long trexInit1; // hardware init bits FxU32 trexInit1; // hardware init bits
unsigned long nccTable0[12]; // NCC decode tables, bits are packed FxU32 nccTable0[12]; // NCC decode tables, bits are packed
unsigned long nccTable1[12]; // 4 words Y, 4 words I, 4 words Q FxU32 nccTable1[12]; // 4 words Y, 4 words I, 4 words Q
#else #else
/* EXTERNAL registers */ /* EXTERNAL registers */
unsigned long status; /* chip status, Read Only */ FxU32 status; /* chip status, Read Only */
unsigned long reserved001; /* reserved001 */ FxU32 reserved001; /* reserved001 */
/* Fixed point version */ /* Fixed point version */
vtxRec vA; /* Vertex A,B,C */ vtxRec vA; /* Vertex A,B,C */
@@ -786,35 +786,35 @@ typedef struct sstregs { // THE CHIP
vtxRec vC; vtxRec vC;
/* Parameters, X gradients, Y gradients */ /* Parameters, X gradients, Y gradients */
long r; /* 12.12 */ FxI32 r; /* 12.12 */
long drdx; /* 12.12 */ FxI32 drdx; /* 12.12 */
long drdy; FxI32 drdy;
long g; FxI32 g;
long dgdx; FxI32 dgdx;
long dgdy; FxI32 dgdy;
long b; FxI32 b;
long dbdx; FxI32 dbdx;
long dbdy; FxI32 dbdy;
long z; /* 20.12 */ FxI32 z; /* 20.12 */
long dzdx; /* 20.12 */ FxI32 dzdx; /* 20.12 */
long dzdy; /* ??? 12.12 */ FxI32 dzdy; /* ??? 12.12 */
long a; /* 12.12 */ FxI32 a; /* 12.12 */
long dadx; /* 12.12 */ FxI32 dadx; /* 12.12 */
long dady; FxI32 dady;
long s; /* 14.18 */ FxI32 s; /* 14.18 */
long dsdx; /* 14.18 */ FxI32 dsdx; /* 14.18 */
long dsdy; FxI32 dsdy;
long t; FxI32 t;
long dtdx; FxI32 dtdx;
long dtdy; FxI32 dtdy;
long w; /* 2.30 */ FxI32 w; /* 2.30 */
long dwdx; /* 2.30 */ FxI32 dwdx; /* 2.30 */
long dwdy; FxI32 dwdy;
unsigned long triangleCMD; /* execute a triangle command (fixed) */ FxU32 triangleCMD; /* execute a triangle command (fixed) */
unsigned long reserved021; FxU32 reserved021;
/* Floating point version */ /* Floating point version */
vtxRec FvA; vtxRec FvA;
@@ -850,54 +850,54 @@ typedef struct sstregs { // THE CHIP
float Fdwdy; float Fdwdy;
/* commands except for triangleCMD */ /* commands except for triangleCMD */
unsigned long FtriangleCMD; /* execute a triangle command (float) */ FxU32 FtriangleCMD; /* execute a triangle command (float) */
unsigned long reserved041; /* required cmd spacer for SST-96 */ FxU32 reserved041; /* required cmd spacer for SST-96 */
unsigned long nopCMD; /* execute a nop command */ FxU32 nopCMD; /* execute a nop command */
unsigned long reserved043; /* required cmd spacer for SST-96 */ FxU32 reserved043; /* required cmd spacer for SST-96 */
unsigned long fastfillCMD; /* execute a fast fill command */ FxU32 fastfillCMD; /* execute a fast fill command */
unsigned long reserved045; /* required cmd spacer for SST-96 */ FxU32 reserved045; /* required cmd spacer for SST-96 */
unsigned long swapbufferCMD; /* execute a swapbuffer command */ FxU32 swapbufferCMD; /* execute a swapbuffer command */
unsigned long reserved047; /* required cmd spacer for SST-96 */ FxU32 reserved047; /* required cmd spacer for SST-96 */
unsigned long swappendCMD; /* increment swap pending count */ FxU32 swappendCMD; /* increment swap pending count */
unsigned long reserved049; /* required cmd spacer for SST-96 */ FxU32 reserved049; /* required cmd spacer for SST-96 */
unsigned long reserved04A[6]; /* 0x04A to 0x04F */ FxU32 reserved04A[6]; /* 0x04A to 0x04F */
/* state registers */ /* state registers */
unsigned long fbzColorPath; /* color select and combine */ FxU32 fbzColorPath; /* color select and combine */
unsigned long fogMode; /* fog Mode */ FxU32 fogMode; /* fog Mode */
unsigned long alphaMode; /* alpha Mode */ FxU32 alphaMode; /* alpha Mode */
unsigned long reserved053; FxU32 reserved053;
unsigned long fbzMode; /* color and auxiliary buffer control */ FxU32 fbzMode; /* color and auxiliary buffer control */
unsigned long stipple; /* 32 bits, MSB masks pixels */ FxU32 stipple; /* 32 bits, MSB masks pixels */
unsigned long c0; /* 8.8.8.8 (ARGB) */ FxU32 c0; /* 8.8.8.8 (ARGB) */
unsigned long c1; /* 8.8.8.8 (ARGB) */ FxU32 c1; /* 8.8.8.8 (ARGB) */
unsigned long fogColor; /* (8)888 */ FxU32 fogColor; /* (8)888 */
unsigned long zaColor; /* 8(8)16 */ FxU32 zaColor; /* 8(8)16 */
unsigned long chromaKey; /* (8)888 */ FxU32 chromaKey; /* (8)888 */
unsigned long chromaRange; /* Chroma Range compare Values, Modes & Enable */ FxU32 chromaRange; /* Chroma Range compare Values, Modes & Enable */
unsigned long reserved05C[4]; /* 0x05C to 0x05F */ FxU32 reserved05C[4]; /* 0x05C to 0x05F */
unsigned long colBufferSetup; /* color buffer base address, stride, and mode */ FxU32 colBufferSetup; /* color buffer base address, stride, and mode */
unsigned long auxBufferSetup; /* auxiliary buffer base address, stride */ FxU32 auxBufferSetup; /* auxiliary buffer base address, stride */
unsigned long clipLeftRight; /* (6)10(6)10 */ FxU32 clipLeftRight; /* (6)10(6)10 */
unsigned long clipBottomTop; /* (6)10(6)10 */ FxU32 clipBottomTop; /* (6)10(6)10 */
unsigned long clipLeftRight1; /* (6)10(6)10 */ FxU32 clipLeftRight1; /* (6)10(6)10 */
unsigned long clipBottomTop1; /* (6)10(6)10 */ FxU32 clipBottomTop1; /* (6)10(6)10 */
unsigned long reserved066[10]; /* 0x066 to 0x06F */ FxU32 reserved066[10]; /* 0x066 to 0x06F */
unsigned long fogTable[32]; /* 64 entries, 2 per word, 2 bytes each */ FxU32 fogTable[32]; /* 64 entries, 2 per word, 2 bytes each */
unsigned long fbijrInit0; /* FBIjr Hardware Init 0 - General */ FxU32 fbijrInit0; /* FBIjr Hardware Init 0 - General */
unsigned long fbijrInit1; /* FBIjr Hardware Init 1 - PUMA */ FxU32 fbijrInit1; /* FBIjr Hardware Init 1 - PUMA */
unsigned long fbijrInit2; /* FBIjr Hardware Init 2 - MEM FIFO Setup */ FxU32 fbijrInit2; /* FBIjr Hardware Init 2 - MEM FIFO Setup */
unsigned long fbijrInit3; /* FBIjr Hardware Init 3 - CMD FIFO Setup */ FxU32 fbijrInit3; /* FBIjr Hardware Init 3 - CMD FIFO Setup */
unsigned long fbijrInit4; /* FBIjr Hardware Init 4 - CMD FIFO Entry Count */ FxU32 fbijrInit4; /* FBIjr Hardware Init 4 - CMD FIFO Entry Count */
unsigned long fbijrInit5; /* FBIjr Hardware Init 5 - CMD FIFO Read Pointer */ FxU32 fbijrInit5; /* FBIjr Hardware Init 5 - CMD FIFO Read Pointer */
unsigned long reserved096[10]; /* 0x096 to 0x09F */ FxU32 reserved096[10]; /* 0x096 to 0x09F */
unsigned long fbijrVersion; /* FBIjr Version (company, device, & board */ FxU32 fbijrVersion; /* FBIjr Version (company, device, & board */
struct { /* statistic gathering variables */ struct { /* statistic gathering variables */
unsigned int fbiPixelsIn; /* Pixel counter (number pixels processed) */ unsigned int fbiPixelsIn; /* Pixel counter (number pixels processed) */
unsigned int fbiChromaFail; /* Pixel counter (number pixels failed Chroma test) */ unsigned int fbiChromaFail; /* Pixel counter (number pixels failed Chroma test) */
@@ -905,25 +905,25 @@ typedef struct sstregs { // THE CHIP
unsigned int fbiAfuncFail; /* Pixel counter (number pixels failed Alpha test) */ unsigned int fbiAfuncFail; /* Pixel counter (number pixels failed Alpha test) */
unsigned int fbiPixelsOut; /* Pixel counter (number pixels drawn) */ unsigned int fbiPixelsOut; /* Pixel counter (number pixels drawn) */
} stats; } stats;
unsigned long reserved0A6[10]; /* 0x0A6 to 0x0AF */ FxU32 reserved0A6[10]; /* 0x0A6 to 0x0AF */
unsigned long reserved0B0[15]; /* 0x0B0 to 0x0BE */ FxU32 reserved0B0[15]; /* 0x0B0 to 0x0BE */
unsigned long texChipSel; /* Texture Write Chip select */ FxU32 texChipSel; /* Texture Write Chip select */
/* TMU registers */ /* TMU registers */
unsigned long textureMode; /* texture Mode */ FxU32 textureMode; /* texture Mode */
unsigned long tLOD; /* texture LOD settings */ FxU32 tLOD; /* texture LOD settings */
unsigned long tDetail; /* texture detail settings */ FxU32 tDetail; /* texture detail settings */
unsigned long texBaseAddr; /* current texture base address */ FxU32 texBaseAddr; /* current texture base address */
unsigned long texBaseAddr1; FxU32 texBaseAddr1;
unsigned long texBaseAddr2; FxU32 texBaseAddr2;
unsigned long texBaseAddr38; FxU32 texBaseAddr38;
unsigned long trexInit0; /* hardware init bits */ FxU32 trexInit0; /* hardware init bits */
unsigned long trexInit1; /* hardware init bits */ FxU32 trexInit1; /* hardware init bits */
unsigned long nccTable0[12]; /* NCC decode tables, bits are packed */ FxU32 nccTable0[12]; /* NCC decode tables, bits are packed */
unsigned long nccTable1[12]; /* 4 words Y, 4 words I, 4 words Q */ FxU32 nccTable1[12]; /* 4 words Y, 4 words I, 4 words Q */
unsigned long reserved0E1[31]; /* 0x0E1 to 0x0FF */ FxU32 reserved0E1[31]; /* 0x0E1 to 0x0FF */
#endif #endif
} Sstregs; } Sstregs;
@@ -1093,9 +1093,9 @@ do { \
#define SST_TEX_ADDRESS(sst) (0x600000+(FxU32)(sst)) #define SST_TEX_ADDRESS(sst) (0x600000+(FxU32)(sst))
#endif #endif
extern unsigned long sstMipMapSize[4][16]; extern FxU32 sstMipMapSize[4][16];
extern unsigned long sstMipMapOffset[4][16]; extern FxU32 sstMipMapOffset[4][16];
extern unsigned long sstMipMapOffset_Tsplit[4][16]; extern FxU32 sstMipMapOffset_Tsplit[4][16];
extern void sstMemoryConfig(int fbiMem, int trex0Mem,int trex1Mem,int trex2Mem); extern void sstMemoryConfig(int fbiMem, int trex0Mem,int trex1Mem,int trex2Mem);