sst1/sst96: some whitespace/style cleanup.

also removed commented out code from glide3x _grChromaRangeExt(),
guGammaCorrectionRGB() and grLoadGammaTable().

the djgpp dxe output is still exactly the same.
This commit is contained in:
sezero
2018-11-05 19:35:55 +03:00
parent 426c3988a3
commit c468e627e7
9 changed files with 170 additions and 244 deletions

View File

@@ -223,7 +223,7 @@
#include <glidesys.h> #include <glidesys.h>
#include <sst1vid.h> #include <sst1vid.h>
#if ( GLIDE_PLATFORM & GLIDE_HW_SST96 ) #if (GLIDE_PLATFORM & GLIDE_HW_SST96)
#include <init.h> #include <init.h>
#endif #endif
@@ -255,8 +255,8 @@ _grInt10Handler() {
#ifdef H3D #ifdef H3D
#include <windows.h> #include <windows.h>
#define F_PATTERN 0 // flippy pattern (sst96) #define F_PATTERN 0 /* flippy pattern (sst96) */
#define T_PATTERN 1 // tippy pattern (sst1) #define T_PATTERN 1 /* tippy pattern (sst1) */
typedef struct patColor_t { unsigned char r,g,b; } patColor; typedef struct patColor_t { unsigned char r,g,b; } patColor;
@@ -276,7 +276,7 @@ static patColor sigPattern[] = { // signature color pattern
static patColor disableColor[2] = {PAT_BLACK,PAT_BLACK}; // turn off adapter static patColor disableColor[2] = {PAT_BLACK,PAT_BLACK}; // turn off adapter
#if ( GLIDE_PLATFORM & GLIDE_HW_SST1 ) #if ( GLIDE_PLATFORM & GLIDE_HW_SST1 )
static patColor enableColor[2] = {PAT_YELLOW,PAT_BLACK}; // use top and bottom mode 1 static patColor enableColor[2] = {PAT_YELLOW,PAT_BLACK}; // use top and bottom mode 1
#elif ( GLIDE_PLATFORM & GLIDE_HW_SST96 ) #elif ( GLIDE_PLATFORM & GLIDE_HW_SST96 )
static patColor enableColor[2] = {PAT_GREEN,PAT_BLACK}; // use pageflip mode static patColor enableColor[2] = {PAT_GREEN,PAT_BLACK}; // use pageflip mode
@@ -372,10 +372,10 @@ void setAutoflip(int enable) {
initAT3DSetTiles(1,gc->state.num_buffers); initAT3DSetTiles(1,gc->state.num_buffers);
} /* setup regs for pageflipping */ } /* setup regs for pageflipping */
#endif #endif
grDepthBufferFunction( GR_CMP_ALWAYS ); grDepthBufferFunction( GR_CMP_ALWAYS );
grDepthMask( FXFALSE ); grDepthMask( FXFALSE );
grColorCombine( GR_COMBINE_FUNCTION_LOCAL, GR_COMBINE_FACTOR_NONE, grColorCombine( GR_COMBINE_FUNCTION_LOCAL, GR_COMBINE_FACTOR_NONE,
GR_COMBINE_LOCAL_CONSTANT, GR_COMBINE_OTHER_NONE, GR_COMBINE_LOCAL_CONSTANT, GR_COMBINE_OTHER_NONE,
FXFALSE ); FXFALSE );
@@ -385,12 +385,12 @@ void setAutoflip(int enable) {
lineRight.x = (float)scrWidth-1; lineRight.x = (float)scrWidth-1;
lineLeft.z = lineRight.z = 0.f; lineLeft.z = lineRight.z = 0.f;
lineLeft.ooz = lineRight.ooz = 65535.f; lineLeft.ooz = lineRight.ooz = 65535.f;
#if ( GLIDE_PLATFORM & GLIDE_HW_SST1 ) #if ( GLIDE_PLATFORM & GLIDE_HW_SST1 )
lineLeft.y = lineRight.y = 2.f; lineLeft.y = lineRight.y = 2.f;
#elif ( GLIDE_PLATFORM & GLIDE_HW_SST96 ) #elif ( GLIDE_PLATFORM & GLIDE_HW_SST96 )
lineLeft.y = lineRight.y = grSstScreenHeight() - H3DHEIGHT_FROM_REZ(gc->grSstRez) + 2.f; lineLeft.y = lineRight.y = grSstScreenHeight() - H3DHEIGHT_FROM_REZ(gc->grSstRez) + 2.f;
#endif #endif
grColorMask(FXTRUE,0); grColorMask(FXTRUE,0);
grDepthBufferFunction( GR_CMP_ALWAYS ); grDepthBufferFunction( GR_CMP_ALWAYS );
grClipWindow(0,0,grSstScreenWidth(),grSstScreenHeight()); grClipWindow(0,0,grSstScreenWidth(),grSstScreenHeight());
@@ -400,7 +400,6 @@ void setAutoflip(int enable) {
grRenderBuffer(GR_BUFFER_BACKBUFFER); grRenderBuffer(GR_BUFFER_BACKBUFFER);
grBufferClear( 0x00, 0, GR_ZDEPTHVALUE_FARTHEST ); grBufferClear( 0x00, 0, GR_ZDEPTHVALUE_FARTHEST );
grBufferSwap(1); grBufferSwap(1);
grBufferClear( 0x00, 0, GR_ZDEPTHVALUE_FARTHEST ); grBufferClear( 0x00, 0, GR_ZDEPTHVALUE_FARTHEST );
grSstOrigin(GR_ORIGIN_UPPER_LEFT); grSstOrigin(GR_ORIGIN_UPPER_LEFT);
@@ -409,24 +408,24 @@ void setAutoflip(int enable) {
grConstantColorValue( patColorToGR(sigPattern[line],format) ); grConstantColorValue( patColorToGR(sigPattern[line],format) );
drawlinefb(&lineLeft, &lineRight); drawlinefb(&lineLeft, &lineRight);
lineLeft.y = ++lineRight.y; lineLeft.y = ++lineRight.y;
grConstantColorValue( 0 ); grConstantColorValue( 0 );
drawlinefb(&lineLeft, &lineRight); drawlinefb(&lineLeft, &lineRight);
lineLeft.y = ++lineRight.y; lineLeft.y = ++lineRight.y;
} }
for (line = 0; line < 2; line++) { for (line = 0; line < 2; line++) {
grConstantColorValue( patColorToGR(enable?(getGetIntKeyValue("\\SOFTWARE\\H3D\\TBMODE")==1?enableColor[line]:enableColor2[line]):disableColor[line],format) ); grConstantColorValue( patColorToGR(enable?(getGetIntKeyValue("\\SOFTWARE\\H3D\\TBMODE")==1?enableColor[line]:enableColor2[line]):disableColor[line],format) );
drawlinefb(&lineLeft, &lineRight); drawlinefb(&lineLeft, &lineRight);
lineLeft.y = ++lineRight.y; lineLeft.y = ++lineRight.y;
grConstantColorValue( 0 ); grConstantColorValue( 0 );
drawlinefb(&lineLeft, &lineRight); drawlinefb(&lineLeft, &lineRight);
lineLeft.y = ++lineRight.y; lineLeft.y = ++lineRight.y;
} }
// wait for adapter sync-up // wait for adapter sync-up
#if ( GLIDE_PLATFORM & GLIDE_HW_SST1 ) #if ( GLIDE_PLATFORM & GLIDE_HW_SST1 )
for(line = 40; line>0; line--) { for(line = 40; line>0; line--) {
#elif ( GLIDE_PLATFORM & GLIDE_HW_SST96 ) #elif ( GLIDE_PLATFORM & GLIDE_HW_SST96 )
for(line = 20; line>0; line--) { for(line = 20; line>0; line--) {
@@ -446,7 +445,7 @@ void setAutoflip(int enable) {
grGlideSetState(&state); // restore app. state grGlideSetState(&state); // restore app. state
// restore // restore
#if (GLIDE_PLATFORM & GLIDE_HW_SST1) #if (GLIDE_PLATFORM & GLIDE_HW_SST1)
if (GR_RESOLUTION_IS_AUTOFLIPPED(gc->grSstRez)) { if (GR_RESOLUTION_IS_AUTOFLIPPED(gc->grSstRez)) {
if (enable==1) { if (enable==1) {
@@ -482,36 +481,36 @@ void setAutoflip(int enable) {
Initialize the selected SST Initialize the selected SST
Initialization has 4 Steps Initialization has 4 Steps
Video Init - Video Init -
In the full screen case this includes setting the requested In the full screen case this includes setting the requested
resolution/refresh state and allocating any necessary OS resolution/refresh state and allocating any necessary OS
resource for the GC. resource for the GC.
In the windowed case, this involves acquiring all necessary In the windowed case, this involves acquiring all necessary
surfaces for rendering, back buffer and memory fifo surfaces for rendering, back buffer and memory fifo
Also perform any work necessary to enable access to 3D Also perform any work necessary to enable access to 3D
registers registers
Command Transport Init: Command Transport Init:
Assuming video registers are in a reset state, initialize Assuming video registers are in a reset state, initialize
the appropriate command transport mechanism. All writes the appropriate command transport mechanism. All writes
to hardware prior to this action are direct writes, to hardware prior to this action are direct writes,
afterwards, most commands will go throught the command afterwards, most commands will go throught the command
transport transport
GC Init - GC Init -
Initialize the current GC based on the user requested Initialize the current GC based on the user requested
open parameters and command transport data reported open parameters and command transport data reported
during initialization. during initialization.
3D State Init - 3D State Init -
Push an initial state onto all of the 3D state registers. Push an initial state onto all of the 3D state registers.
Arguments: Arguments:
hwnd - pointer to a window handle or null. If NULL, then hwnd - pointer to a window handle or null. If NULL, then
the application window handle will be inferred though the application window handle will be inferred though
the GetActiveWindow() api. the GetActiveWindow() api.
resolution - either one of the pre-defined glide resolutions, resolution - either one of the pre-defined glide resolutions,
@@ -533,17 +532,17 @@ void setAutoflip(int enable) {
Return: Return:
FXTRUE - glide successfully acquired the necessary resources and a FXTRUE - glide successfully acquired the necessary resources and a
is ready for rendering is ready for rendering
FXFALSE - glide was unsuccessful in getting the necessary resources, FXFALSE - glide was unsuccessful in getting the necessary resources,
or the requested configuration is unavailble on the host or the requested configuration is unavailble on the host
hardware - any calls to glide rendering routines will result hardware - any calls to glide rendering routines will result
in undefined behavior. in undefined behavior.
-------------------------------------------------------------------*/ -------------------------------------------------------------------*/
GR_ENTRY(grSstWinOpen, FxBool, ( GR_ENTRY(grSstWinOpen, FxBool, (
FxU32 hWnd, FxU32 hWnd,
GrScreenResolution_t resolution, GrScreenResolution_t resolution,
GrScreenRefresh_t refresh, GrScreenRefresh_t refresh,
GrColorFormat_t format, GrColorFormat_t format,
GrOriginLocation_t origin, GrOriginLocation_t origin,
int nColBuffers, int nColBuffers,
int nAuxBuffers)) int nAuxBuffers))
{ {
@@ -553,8 +552,8 @@ GR_ENTRY(grSstWinOpen, FxBool, (
int xres, yres, fbStride; int xres, yres, fbStride;
#if (GLIDE_PLATFORM & GLIDE_OS_WIN32) #if (GLIDE_PLATFORM & GLIDE_OS_WIN32)
FARPROC FARPROC
oemInitMapBoard = NULL, oemInitMapBoard = NULL,
oemInitSetVideo = NULL, oemInitSetVideo = NULL,
oemInitVideoTiming = NULL; oemInitVideoTiming = NULL;
OemInitInfo oemi; OemInitInfo oemi;
sst1VideoTimingStruct *sstVideoRez = NULL, tvVidtiming; sst1VideoTimingStruct *sstVideoRez = NULL, tvVidtiming;
@@ -579,7 +578,7 @@ GR_ENTRY(grSstWinOpen, FxBool, (
if (!rv) { if (!rv) {
GDBG_INFO(( gc->myLevel, GDBG_INFO(( gc->myLevel,
"grSstWinOpen failed because sst1 cannot really triple buffer\n")); "grSstWinOpen failed because sst1 cannot really triple buffer\n"));
goto BAILOUT; goto BAILOUT;
} }
#endif /* (GLIDE_PLATFORM & GLIDE_HW_SST1) */ #endif /* (GLIDE_PLATFORM & GLIDE_HW_SST1) */
@@ -595,7 +594,7 @@ GR_ENTRY(grSstWinOpen, FxBool, (
if (!(pciOpen() && if (!(pciOpen() &&
(initMapBoard(_GlideRoot.current_sst) != NULL))) return FXFALSE; (initMapBoard(_GlideRoot.current_sst) != NULL))) return FXFALSE;
} }
#if (GLIDE_PLATFORM & GLIDE_OS_WIN32) && (!defined(GLIDE_DEBUG) || (GLIDE_DEBUG == 0)) #if (GLIDE_PLATFORM & GLIDE_OS_WIN32) && (!defined(GLIDE_DEBUG) || (GLIDE_DEBUG == 0))
/* /*
** load fxoem2x.dll and map board ** load fxoem2x.dll and map board
@@ -625,9 +624,9 @@ GR_ENTRY(grSstWinOpen, FxBool, (
/*------------------------------------------------------ /*------------------------------------------------------
Validate and Parse Arguments Validate and Parse Arguments
------------------------------------------------------*/ ------------------------------------------------------*/
/* /*
FIXME!! jdt FIXME!! jdt
There needs to be one large table of resolutions vs. There needs to be one large table of resolutions vs.
nColBuffers vs. nAuxBuffers that specifies required nColBuffers vs. nAuxBuffers that specifies required
ram and vald/invalid configurations ram and vald/invalid configurations
@@ -673,8 +672,8 @@ GR_ENTRY(grSstWinOpen, FxBool, (
} }
} }
#endif #endif
#if ( 1 ) #if ( 1 )
/*------------------------------------------------------ /*------------------------------------------------------
Video Init Video Init
------------------------------------------------------*/ ------------------------------------------------------*/
@@ -701,7 +700,7 @@ GR_ENTRY(grSstWinOpen, FxBool, (
oemi.vid.yDimension = tvVidtiming.yDimension; oemi.vid.yDimension = tvVidtiming.yDimension;
oemi.vid.clkFreq16bpp = tvVidtiming.clkFreq16bpp; oemi.vid.clkFreq16bpp = tvVidtiming.clkFreq16bpp;
oemi.vid.clkFreq24bpp = tvVidtiming.clkFreq24bpp; oemi.vid.clkFreq24bpp = tvVidtiming.clkFreq24bpp;
if (gc->oemInit) { if (gc->oemInit) {
oemInitVideoTiming = GetProcAddress(gc->oemInit, "_fxoemInitVideoTiming@4"); oemInitVideoTiming = GetProcAddress(gc->oemInit, "_fxoemInitVideoTiming@4");
if (oemInitVideoTiming && oemInitMapBoard) if (oemInitVideoTiming && oemInitMapBoard)
@@ -766,22 +765,22 @@ GR_ENTRY(grSstWinOpen, FxBool, (
gc->nopCMD = FXFALSE; gc->nopCMD = FXFALSE;
# if ( GLIDE_PLATFORM & GLIDE_HW_SST1 ) # if ( GLIDE_PLATFORM & GLIDE_HW_SST1 )
grHints( GR_HINT_FIFOCHECKHINT, grHints( GR_HINT_FIFOCHECKHINT,
fifoInfo.hwDep.vgFIFOData.memFifoStatusLwm + 0x100 ); fifoInfo.hwDep.vgFIFOData.memFifoStatusLwm + 0x100 );
_grReCacheFifo( 0 ); _grReCacheFifo( 0 );
# elif ( GLIDE_PLATFORM & GLIDE_HW_SST96 ) # elif ( GLIDE_PLATFORM & GLIDE_HW_SST96 )
gc->hwDep.sst96Dep.writesSinceFence = 0; gc->hwDep.sst96Dep.writesSinceFence = 0;
#if (GLIDE_PLATFORM & GLIDE_OS_DOS32) && ( GLIDE_PLATFORM & GLIDE_HW_SST96 ) && defined(GLIDE_DEBUG) #if (GLIDE_PLATFORM & GLIDE_OS_DOS32) && defined(GLIDE_DEBUG)
/* Set int 10h interrupt handler */ /* Set int 10h interrupt handler */
gc->hwDep.sst96Dep.int10Called = FXFALSE; gc->hwDep.sst96Dep.int10Called = FXFALSE;
gc->hwDep.sst96Dep.prevInt10 = NULL; gc->hwDep.sst96Dep.prevInt10 = NULL;
GDBG_INFO((80, "Storing old int 10h interrupt handler (0x%x)\n", gc->hwDep.sst96Dep.prevInt10)); GDBG_INFO((80, "Storing old int 10h interrupt handler (0x%x)\n", gc->hwDep.sst96Dep.prevInt10));
GDBG_INFO((80, "Overriding int 10h interrupt handler\n")); GDBG_INFO((80, "Overriding int 10h interrupt handler\n"));
_dos_setvect(0x10, _grInt10Handler); _dos_setvect(0x10, _grInt10Handler);
#endif #endif
gc->fifoData = fifoInfo; gc->fifoData = fifoInfo;
GDBG_INFO((120, "After Init: fifoPtr = 0x%x\n", GDBG_INFO((120, "After Init: fifoPtr = 0x%x\n",
@@ -819,7 +818,7 @@ GR_ENTRY(grSstWinOpen, FxBool, (
gc->lockPtrs[GR_LFB_WRITE_ONLY] = (FxU32)-1; gc->lockPtrs[GR_LFB_WRITE_ONLY] = (FxU32)-1;
gc->lfbSliOk = 0; gc->lfbSliOk = 0;
gc->fbStride = fbStride; gc->fbStride = fbStride;
/* Initialize the read/write registers to all 0 */ /* Initialize the read/write registers to all 0 */
gc->state.fbi_config.fbzColorPath = 0; gc->state.fbi_config.fbzColorPath = 0;
gc->state.fbi_config.fogMode = 0; gc->state.fbi_config.fogMode = 0;
@@ -834,7 +833,7 @@ GR_ENTRY(grSstWinOpen, FxBool, (
gc->state.fbi_config.stipple = 0; gc->state.fbi_config.stipple = 0;
gc->state.fbi_config.color0 = 0; gc->state.fbi_config.color0 = 0;
gc->state.fbi_config.color1 = 0; gc->state.fbi_config.color1 = 0;
for (tmu = 0; tmu < gc->num_tmu; tmu += 1) for (tmu = 0; tmu < gc->num_tmu; tmu += 1)
{ {
FxU32 textureMode = (FxU32)SST_SEQ_8_DOWNLD; FxU32 textureMode = (FxU32)SST_SEQ_8_DOWNLD;
if ( (_GlideRoot.hwConfig.SSTs[_GlideRoot.current_sst].type == if ( (_GlideRoot.hwConfig.SSTs[_GlideRoot.current_sst].type ==
@@ -856,17 +855,17 @@ GR_ENTRY(grSstWinOpen, FxBool, (
gc->state.tmu_config[tmu].largeLod = GR_LOD_1; gc->state.tmu_config[tmu].largeLod = GR_LOD_1;
gc->state.tmu_config[tmu].evenOdd = GR_MIPMAPLEVELMASK_BOTH; gc->state.tmu_config[tmu].evenOdd = GR_MIPMAPLEVELMASK_BOTH;
gc->state.tmu_config[tmu].nccTable = GR_NCCTABLE_NCC0; gc->state.tmu_config[tmu].nccTable = GR_NCCTABLE_NCC0;
} }
/*------------------------------------------------------ /*------------------------------------------------------
3D State Init 3D State Init
------------------------------------------------------*/ ------------------------------------------------------*/
GDBG_INFO((gc->myLevel, " 3D State Init\n" )); GDBG_INFO((gc->myLevel, " 3D State Init\n" ));
gc->state.fbi_config.fbzMode = gc->state.fbi_config.fbzMode =
SST_ENRECTCLIP | SST_ENRECTCLIP |
SST_ENZBIAS | SST_ENZBIAS |
SST_DRAWBUFFER_BACK; SST_DRAWBUFFER_BACK;
grHints(GR_HINT_ALLOW_MIPMAP_DITHER, 0); grHints(GR_HINT_ALLOW_MIPMAP_DITHER, 0);
grSstOrigin( origin ); grSstOrigin( origin );
grAlphaBlendFunction( GR_BLEND_ONE , GR_BLEND_ZERO, grAlphaBlendFunction( GR_BLEND_ONE , GR_BLEND_ZERO,
@@ -993,7 +992,7 @@ GR_ENTRY(grSstWinOpen, FxBool, (
Shutdown has 4 steps Shutdown has 4 steps
3D Idle 3D Idle
the 3D engine must be idled to make sure that there are no the 3D engine must be idled to make sure that there are no
commands executing in the transport when the registers are commands executing in the transport when the registers are
reset reset
@@ -1029,27 +1028,27 @@ GR_ENTRY( grSstWinClose, void, ( void ) )
--------------------------*/ --------------------------*/
GDBG_INFO(( gc->myLevel, " 3D Idle\n" )); GDBG_INFO(( gc->myLevel, " 3D Idle\n" ));
initIdle(); initIdle();
/*-------------------------- /*--------------------------
GC Reset GC Reset
--------------------------*/ --------------------------*/
GDBG_INFO(( gc->myLevel, " GC Reset\n" )); GDBG_INFO(( gc->myLevel, " GC Reset\n" ));
gc->open = FXFALSE; gc->open = FXFALSE;
gc->closedP = FXTRUE; gc->closedP = FXTRUE;
/*-------------------------- /*--------------------------
Command Transport Disable Command Transport Disable
--------------------------*/ --------------------------*/
GDBG_INFO(( gc->myLevel, " Command Transport Disable\n" )); GDBG_INFO(( gc->myLevel, " Command Transport Disable\n" ));
initDisableTransport(); initDisableTransport();
#if (GLIDE_PLATFORM & GLIDE_OS_DOS32) && (GLIDE_PLATFORM & GLIDE_HW_SST96) && defined(GLIDE_DEBUG) #if (GLIDE_PLATFORM & GLIDE_OS_DOS32) && (GLIDE_PLATFORM & GLIDE_HW_SST96) && defined(GLIDE_DEBUG)
GDBG_INFO((80, "Restoring int 10h interrupt handler (0x%x)\n", gc->hwDep.sst96Dep.prevInt10)); GDBG_INFO((80, "Restoring int 10h interrupt handler (0x%x)\n", gc->hwDep.sst96Dep.prevInt10));
_dos_setvect(0x10, NULL); _dos_setvect(0x10, NULL);
#endif #endif
/*-------------------------- /*--------------------------
Video Restore Video Restore
--------------------------*/ --------------------------*/
GDBG_INFO(( gc->myLevel, " Restore Video\n" )); GDBG_INFO(( gc->myLevel, " Restore Video\n" ));
initRestoreVideo(); initRestoreVideo();
@@ -1062,22 +1061,22 @@ GR_ENTRY( grSstWinClose, void, ( void ) )
} }
#endif #endif
} }
GR_END(); GR_END();
#undef FN_NAME #undef FN_NAME
} /* grSstWinClose */ } /* grSstWinClose */
GR_ENTRY(grSstControl, FxBool, ( GrControl_t code )) GR_ENTRY(grSstControl, FxBool, ( GrControl_t code ))
{ {
#define FN_NAME "grSstControl" #define FN_NAME "grSstControl"
GDBG_INFO((41, "%s: code = 0x%x, windowsInit = %d\n", FN_NAME, GDBG_INFO((41, "%s: code = 0x%x, windowsInit = %d\n", FN_NAME,
code, _GlideRoot.windowsInit)); code, _GlideRoot.windowsInit));
if (_GlideRoot.windowsInit) { if (_GlideRoot.windowsInit) {
#if (GLIDE_PLATFORM & GLIDE_HW_SST96) #if (GLIDE_PLATFORM & GLIDE_HW_SST96)
/* For VG96, windows haven't been created, so there's no point /* For VG96, windows haven't been created, so there's no point
* trying to control it. * trying to control it.
*/ */
/* Believe it or not, the following code really should be bracketed /* Believe it or not, the following code really should be bracketed
like this. The reason is that GR_BEGIN_NOFIFOCHECK seg faults like this. The reason is that GR_BEGIN_NOFIFOCHECK seg faults
@@ -1090,9 +1089,9 @@ GR_ENTRY(grSstControl, FxBool, ( GrControl_t code ))
xRes, yRes, xRes, yRes,
clipLeftRight, clipBottomTop; clipLeftRight, clipBottomTop;
FxU32 nTries; FxU32 nTries;
GR_BEGIN_NOFIFOCHECK(FN_NAME,80); GR_BEGIN_NOFIFOCHECK(FN_NAME,80);
/* We're either cleaning up or closed so forget about this one. */ /* We're either cleaning up or closed so forget about this one. */
if (gc->closedP) goto __done; if (gc->closedP) goto __done;
xRes = initControl(code); xRes = initControl(code);
@@ -1105,24 +1104,24 @@ GR_ENTRY(grSstControl, FxBool, ( GrControl_t code ))
} }
} }
#endif #endif
GDBG_INFO((80, "%s: initControl returned 0x%x\n", FN_NAME, xRes)); GDBG_INFO((80, "%s: initControl returned 0x%x\n", FN_NAME, xRes));
if (!xRes) return FXFALSE; if (!xRes) return FXFALSE;
yRes = xRes >> 16; yRes = xRes >> 16;
xRes = xRes & 0xffff; xRes = xRes & 0xffff;
/* !! FIXME +++ this call should properly update the gc->fbStride, /* !! FIXME +++ this call should properly update the gc->fbStride,
this information is known only to the init layer and needs to be this information is known only to the init layer and needs to be
exposed, it is only really necessary to lfblock right now, exposed, it is only really necessary to lfblock right now,
and therefore is returned by initGetBufferPtr */ and therefore is returned by initGetBufferPtr */
gc->state.screen_width = xRes; gc->state.screen_width = xRes;
gc->state.screen_height = yRes; gc->state.screen_height = yRes;
/* Wait for Idle. */ /* Wait for Idle. */
nTries = 0; nTries = 0;
do { do {
if (nTries++ > 999) { if (nTries++ > 999) {
@@ -1132,7 +1131,7 @@ GR_ENTRY(grSstControl, FxBool, ( GrControl_t code ))
} }
status = GET(hw->status); status = GET(hw->status);
} while (status & 0x1); } while (status & 0x1);
/* Set ClipRect Via direct writes */ /* Set ClipRect Via direct writes */
@@ -1159,16 +1158,15 @@ GR_ENTRY(grSstControl, FxBool, ( GrControl_t code ))
#endif #endif
return ctrlflag; return ctrlflag;
#endif #endif
} }
GDBG_INFO((41, "%s: Returning TRUE\n", FN_NAME)); GDBG_INFO((41, "%s: Returning TRUE\n", FN_NAME));
return FXTRUE; return FXTRUE;
} /* grSstControl */ } /* grSstControl */
/*--------------------------------------------------------------------------- /*---------------------------------------------------------------------------
** grSstPerfStats ** grSstPerfStats
*/ */
GR_ENTRY(grSstPerfStats, void, (GrSstPerfStats_t *pStats)) GR_ENTRY(grSstPerfStats, void, (GrSstPerfStats_t *pStats))
{ {
@@ -1218,7 +1216,7 @@ GR_ENTRY(grSstPerfStats, void, (GrSstPerfStats_t *pStats))
sst1InitSliPciOwner(gc->base_ptr, SST_SLI_MASTER_OWNPCI); sst1InitSliPciOwner(gc->base_ptr, SST_SLI_MASTER_OWNPCI);
} }
#endif #endif
GR_END(); GR_END();
} /* grSstPerfStats */ } /* grSstPerfStats */
@@ -1302,7 +1300,7 @@ GR_ENTRY(grSstIsBusy, FxBool, (void))
} }
if ((busy = initBusy()) == FXFALSE) if ((busy = initBusy()) == FXFALSE)
gc->nopCMD = FXFALSE; gc->nopCMD = FXFALSE;
GDBG_INFO((84,"grSstIsBusy() => 0x%x\n",busy)); GDBG_INFO((84,"grSstIsBusy() => 0x%x\n",busy));
GR_RETURN( busy ); GR_RETURN( busy );
@@ -1343,11 +1341,6 @@ GR_ENTRY(grSstIdle, void, (void))
/*--------------------------------------------------------------------------- /*---------------------------------------------------------------------------
** grSstOrigin - Set the orgin orientation of the screen. ** grSstOrigin - Set the orgin orientation of the screen.
**
** Returns:
**
** Notes:
**
*/ */
GR_ENTRY(grSstOrigin, void, (GrOriginLocation_t origin )) GR_ENTRY(grSstOrigin, void, (GrOriginLocation_t origin ))
@@ -1397,7 +1390,7 @@ GR_ENTRY(grSstConfigPipeline, void, (GrChipID_t chip, GrSstRegister reg, FxU32 v
switch (chip) { switch (chip) {
case GR_TMU0: case GR_TMU0:
case GR_TMU1: case GR_TMU1:
case GR_TMU2: case GR_TMU2:
hw = SST_TMU(hw,chip); hw = SST_TMU(hw,chip);
/* FALL THRU */ /* FALL THRU */

View File

@@ -16,7 +16,6 @@
** THE UNITED STATES. ** THE UNITED STATES.
** **
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED ** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
**
*/ */
#include "init.h" #include "init.h"
@@ -224,15 +223,14 @@ initEnumHardware( InitHWEnumCallback *cb )
vgDriverInit( &contexts[INIT_VOODOO] ); vgDriverInit( &contexts[INIT_VOODOO] );
vg96DriverInit( &contexts[INIT_VG96] ); vg96DriverInit( &contexts[INIT_VG96] );
/* Mark the library as initialized */ /* Mark the library as initialized */
libInitialized = FXTRUE; libInitialized = FXTRUE;
} }
if ( cb ) { if ( cb ) {
for( device = 0; device < numDevicesInSystem; device++ ) { for( device = 0; device < numDevicesInSystem; device++ ) {
cb( &hwInfo[device] ); cb( &hwInfo[device] );
} }
} }
return; return;
} /* initEnumHardware */ } /* initEnumHardware */
@@ -346,17 +344,15 @@ initGetDeviceInfo( FxU32 devNumber, InitDeviceInfo *info )
-------------------------------------------------------------------*/ -------------------------------------------------------------------*/
FxBool FxBool
initDeviceSelect( FxU32 devNumber ) initDeviceSelect( FxU32 devNumber )
{ {
FxBool rv = FXFALSE;
if ( devNumber < numDevicesInSystem ) { if ( devNumber < numDevicesInSystem ) {
context = &contexts[hwInfo[devNumber].hwClass]; context = &contexts[hwInfo[devNumber].hwClass];
context->info = hwInfo[devNumber]; context->info = hwInfo[devNumber];
rv = FXTRUE; return FXTRUE;
} }
return rv; return FXFALSE;
}/* initDeviceSelect */ }/* initDeviceSelect */

View File

@@ -16,7 +16,6 @@
** THE UNITED STATES. ** THE UNITED STATES.
** **
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED ** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
**
*/ */
#include <3dfx.h> #include <3dfx.h>
@@ -88,16 +87,13 @@ static void *getBufferPtr( InitBuffer_t buffer, int *strideBytes ) {
static void renderBuffer( InitBuffer_t buffer ) { static void renderBuffer( InitBuffer_t buffer ) {
init96RenderBuffer( buffer, context->writeMethod ); init96RenderBuffer( buffer, context->writeMethod );
return;
} }
static void origin( InitOriginLocation_t origin ) { static void origin( InitOriginLocation_t origin ) {
init96Origin( origin, context->writeMethod ); init96Origin( origin, context->writeMethod );
return;
} }
static void ioCtl( FxU32 token, void *argument ) { static void ioCtl( FxU32 token, void *argument ) {
return;
} }
static FxBool control( FxU32 code ) { static FxBool control( FxU32 code ) {

View File

@@ -16,7 +16,6 @@
** THE UNITED STATES. ** THE UNITED STATES.
** **
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED ** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
**
*/ */
#include <3dfx.h> #include <3dfx.h>
@@ -26,6 +25,8 @@
#include <sst1init.h> #include <sst1init.h>
#include <sst.h> #include <sst.h>
#include <stddef.h> /* NULL */
static FxBool setVideo( FxU32 hWnd, static FxBool setVideo( FxU32 hWnd,
GrScreenResolution_t sRes, GrScreenResolution_t sRes,
GrScreenRefresh_t vRefresh, GrScreenRefresh_t vRefresh,
@@ -37,10 +38,11 @@ static FxBool setVideo( FxU32 hWnd,
int *yres, int *yres,
int *fbStride, int *fbStride,
sst1VideoTimingStruct *vidTimings) { sst1VideoTimingStruct *vidTimings) {
FxBool rv;
static int _w[] = {320,320,400,512,640,640,640,640,800,960,856,512}; static int _w[] = {320,320,400,512,640,640,640,640,800,960,856,512};
static int _h[] = {200,240,256,384,200,350,400,480,600,720,480,256}; static int _h[] = {200,240,256,384,200,350,400,480,600,720,480,256};
FxBool rv;
rv = sst1InitVideo( (FxU32*)context->info.hwDep.vgInfo.vgBaseAddr, rv = sst1InitVideo( (FxU32*)context->info.hwDep.vgInfo.vgBaseAddr,
sRes, sRes,
vRefresh, vRefresh,
@@ -115,19 +117,16 @@ static void idle( void ) {
} }
static void *getBufferPtr( InitBuffer_t buffer, int *strideBytes ) { static void *getBufferPtr( InitBuffer_t buffer, int *strideBytes ) {
return 0; return NULL;
} }
static void renderBuffer( InitBuffer_t buffer ) { static void renderBuffer( InitBuffer_t buffer ) {
return;
} }
static void origin( InitOriginLocation_t origin ) { static void origin( InitOriginLocation_t origin ) {
return;
} }
static void ioCtl( FxU32 token, void *argument ) { static void ioCtl( FxU32 token, void *argument ) {
return;
} }
static FxBool control( FxU32 code ) { static FxBool control( FxU32 code ) {

View File

@@ -411,12 +411,6 @@ GR_DIENTRY(_grChromaRangeExt, void , (GrColor_t color, GrColor_t range, GrChroma
#define FN_NAME "_grChromaRangeExt" #define FN_NAME "_grChromaRangeExt"
GR_BEGIN_NOFIFOCHECK("_grChromaRangeExt",85); GR_BEGIN_NOFIFOCHECK("_grChromaRangeExt",85);
#if 0
GR_CHECK_F(myName,
(_GlideRoot.hwConfig.SSTs[_GlideRoot.current_sst].type != GR_SSTTYPE_Voodoo2),
"grChromaRange not supported.");
#endif
INVALIDATE(chromaKey); INVALIDATE(chromaKey);
STOREARG(grChromakeyValue, color); STOREARG(grChromakeyValue, color);

View File

@@ -247,11 +247,11 @@
#include <glidesys.h> #include <glidesys.h>
#include <sst1vid.h> #include <sst1vid.h>
#if ( GLIDE_PLATFORM & GLIDE_SST_SIM) #if (GLIDE_PLATFORM & GLIDE_SST_SIM)
#include <gsim.h> #include <gsim.h>
#endif #endif
#if ( GLIDE_PLATFORM & GLIDE_HW_SST96 ) #if (GLIDE_PLATFORM & GLIDE_HW_SST96)
#include <init.h> #include <init.h>
#endif #endif
@@ -283,8 +283,8 @@ _grInt10Handler() {
#ifdef H3D #ifdef H3D
#include <windows.h> #include <windows.h>
#define F_PATTERN 0 // flippy pattern (sst96) #define F_PATTERN 0 /* flippy pattern (sst96) */
#define T_PATTERN 1 // tippy pattern (sst1) #define T_PATTERN 1 /* tippy pattern (sst1) */
typedef struct patColor_t { unsigned char r,g,b; } patColor; typedef struct patColor_t { unsigned char r,g,b; } patColor;
@@ -304,7 +304,7 @@ static patColor sigPattern[] = { // signature color pattern
static patColor disableColor[2] = {PAT_BLACK,PAT_BLACK}; // turn off adapter static patColor disableColor[2] = {PAT_BLACK,PAT_BLACK}; // turn off adapter
#if ( GLIDE_PLATFORM & GLIDE_HW_SST1 ) #if ( GLIDE_PLATFORM & GLIDE_HW_SST1 )
static patColor enableColor[2] = {PAT_YELLOW,PAT_BLACK}; // use top and bottom mode 1 static patColor enableColor[2] = {PAT_YELLOW,PAT_BLACK}; // use top and bottom mode 1
#elif ( GLIDE_PLATFORM & GLIDE_HW_SST96 ) #elif ( GLIDE_PLATFORM & GLIDE_HW_SST96 )
static patColor enableColor[2] = {PAT_GREEN,PAT_BLACK}; // use pageflip mode static patColor enableColor[2] = {PAT_GREEN,PAT_BLACK}; // use pageflip mode
@@ -400,10 +400,10 @@ void setAutoflip(int enable) {
initAT3DSetTiles(1,gc->state.num_buffers); initAT3DSetTiles(1,gc->state.num_buffers);
} /* setup regs for pageflipping */ } /* setup regs for pageflipping */
#endif #endif
grDepthBufferFunction( GR_CMP_ALWAYS ); grDepthBufferFunction( GR_CMP_ALWAYS );
grDepthMask( FXFALSE ); grDepthMask( FXFALSE );
grColorCombine( GR_COMBINE_FUNCTION_LOCAL, GR_COMBINE_FACTOR_NONE, grColorCombine( GR_COMBINE_FUNCTION_LOCAL, GR_COMBINE_FACTOR_NONE,
GR_COMBINE_LOCAL_CONSTANT, GR_COMBINE_OTHER_NONE, GR_COMBINE_LOCAL_CONSTANT, GR_COMBINE_OTHER_NONE,
FXFALSE ); FXFALSE );
@@ -413,12 +413,12 @@ void setAutoflip(int enable) {
lineRight.x = (float)scrWidth-1; lineRight.x = (float)scrWidth-1;
lineLeft.z = lineRight.z = 0.f; lineLeft.z = lineRight.z = 0.f;
lineLeft.ooz = lineRight.ooz = 65535.f; lineLeft.ooz = lineRight.ooz = 65535.f;
#if ( GLIDE_PLATFORM & GLIDE_HW_SST1 ) #if ( GLIDE_PLATFORM & GLIDE_HW_SST1 )
lineLeft.y = lineRight.y = 2.f; lineLeft.y = lineRight.y = 2.f;
#elif ( GLIDE_PLATFORM & GLIDE_HW_SST96 ) #elif ( GLIDE_PLATFORM & GLIDE_HW_SST96 )
lineLeft.y = lineRight.y = grSstScreenHeight() - H3DHEIGHT_FROM_REZ(gc->grSstRez) + 2.f; lineLeft.y = lineRight.y = grSstScreenHeight() - H3DHEIGHT_FROM_REZ(gc->grSstRez) + 2.f;
#endif #endif
grColorMask(FXTRUE,0); grColorMask(FXTRUE,0);
grDepthBufferFunction( GR_CMP_ALWAYS ); grDepthBufferFunction( GR_CMP_ALWAYS );
grClipWindow(0,0,grSstScreenWidth(),grSstScreenHeight()); grClipWindow(0,0,grSstScreenWidth(),grSstScreenHeight());
@@ -428,7 +428,6 @@ void setAutoflip(int enable) {
grRenderBuffer(GR_BUFFER_BACKBUFFER); grRenderBuffer(GR_BUFFER_BACKBUFFER);
grBufferClear( 0x00, 0, GR_ZDEPTHVALUE_FARTHEST ); grBufferClear( 0x00, 0, GR_ZDEPTHVALUE_FARTHEST );
grBufferSwap(1); grBufferSwap(1);
grBufferClear( 0x00, 0, GR_ZDEPTHVALUE_FARTHEST ); grBufferClear( 0x00, 0, GR_ZDEPTHVALUE_FARTHEST );
grSstOrigin(GR_ORIGIN_UPPER_LEFT); grSstOrigin(GR_ORIGIN_UPPER_LEFT);
@@ -437,24 +436,24 @@ void setAutoflip(int enable) {
grConstantColorValue( patColorToGR(sigPattern[line],format) ); grConstantColorValue( patColorToGR(sigPattern[line],format) );
drawlinefb(&lineLeft, &lineRight); drawlinefb(&lineLeft, &lineRight);
lineLeft.y = ++lineRight.y; lineLeft.y = ++lineRight.y;
grConstantColorValue( 0 ); grConstantColorValue( 0 );
drawlinefb(&lineLeft, &lineRight); drawlinefb(&lineLeft, &lineRight);
lineLeft.y = ++lineRight.y; lineLeft.y = ++lineRight.y;
} }
for (line = 0; line < 2; line++) { for (line = 0; line < 2; line++) {
grConstantColorValue( patColorToGR(enable?(getGetIntKeyValue("\\SOFTWARE\\H3D\\TBMODE")==1?enableColor[line]:enableColor2[line]):disableColor[line],format) ); grConstantColorValue( patColorToGR(enable?(getGetIntKeyValue("\\SOFTWARE\\H3D\\TBMODE")==1?enableColor[line]:enableColor2[line]):disableColor[line],format) );
drawlinefb(&lineLeft, &lineRight); drawlinefb(&lineLeft, &lineRight);
lineLeft.y = ++lineRight.y; lineLeft.y = ++lineRight.y;
grConstantColorValue( 0 ); grConstantColorValue( 0 );
drawlinefb(&lineLeft, &lineRight); drawlinefb(&lineLeft, &lineRight);
lineLeft.y = ++lineRight.y; lineLeft.y = ++lineRight.y;
} }
// wait for adapter sync-up // wait for adapter sync-up
#if ( GLIDE_PLATFORM & GLIDE_HW_SST1 ) #if ( GLIDE_PLATFORM & GLIDE_HW_SST1 )
for(line = 40; line>0; line--) { for(line = 40; line>0; line--) {
#elif ( GLIDE_PLATFORM & GLIDE_HW_SST96 ) #elif ( GLIDE_PLATFORM & GLIDE_HW_SST96 )
for(line = 20; line>0; line--) { for(line = 20; line>0; line--) {
@@ -474,7 +473,7 @@ void setAutoflip(int enable) {
grGlideSetState(&state); // restore app. state grGlideSetState(&state); // restore app. state
// restore // restore
#if (GLIDE_PLATFORM & GLIDE_HW_SST1) #if (GLIDE_PLATFORM & GLIDE_HW_SST1)
if (GR_RESOLUTION_IS_AUTOFLIPPED(gc->grSstRez)) { if (GR_RESOLUTION_IS_AUTOFLIPPED(gc->grSstRez)) {
if (enable==1) { if (enable==1) {
@@ -510,36 +509,36 @@ void setAutoflip(int enable) {
Initialize the selected SST Initialize the selected SST
Initialization has 4 Steps Initialization has 4 Steps
Video Init - Video Init -
In the full screen case this includes setting the requested In the full screen case this includes setting the requested
resolution/refresh state and allocating any necessary OS resolution/refresh state and allocating any necessary OS
resource for the GC. resource for the GC.
In the windowed case, this involves acquiring all necessary In the windowed case, this involves acquiring all necessary
surfaces for rendering, back buffer and memory fifo surfaces for rendering, back buffer and memory fifo
Also perform any work necessary to enable access to 3D Also perform any work necessary to enable access to 3D
registers registers
Command Transport Init: Command Transport Init:
Assuming video registers are in a reset state, initialize Assuming video registers are in a reset state, initialize
the appropriate command transport mechanism. All writes the appropriate command transport mechanism. All writes
to hardware prior to this action are direct writes, to hardware prior to this action are direct writes,
afterwards, most commands will go throught the command afterwards, most commands will go throught the command
transport transport
GC Init - GC Init -
Initialize the current GC based on the user requested Initialize the current GC based on the user requested
open parameters and command transport data reported open parameters and command transport data reported
during initialization. during initialization.
3D State Init - 3D State Init -
Push an initial state onto all of the 3D state registers. Push an initial state onto all of the 3D state registers.
Arguments: Arguments:
hwnd - pointer to a window handle or null. If NULL, then hwnd - pointer to a window handle or null. If NULL, then
the application window handle will be inferred though the application window handle will be inferred though
the GetActiveWindow() api. the GetActiveWindow() api.
resolution - either one of the pre-defined glide resolutions, resolution - either one of the pre-defined glide resolutions,
@@ -567,10 +566,10 @@ void setAutoflip(int enable) {
in undefined behavior. in undefined behavior.
-------------------------------------------------------------------*/ -------------------------------------------------------------------*/
GR_ENTRY(grSstWinOpen, GrContext_t, (FxU32 hWnd, GR_ENTRY(grSstWinOpen, GrContext_t, (FxU32 hWnd,
GrScreenResolution_t resolution, GrScreenResolution_t resolution,
GrScreenRefresh_t refresh, GrScreenRefresh_t refresh,
GrColorFormat_t format, GrColorFormat_t format,
GrOriginLocation_t origin, GrOriginLocation_t origin,
int nColBuffers, int nColBuffers,
int nAuxBuffers)) int nAuxBuffers))
{ {
@@ -578,14 +577,14 @@ GR_ENTRY(grSstWinOpen, GrContext_t, (FxU32 hWnd,
rv = 0x00UL; rv = 0x00UL;
int int
tmu, tmu,
xres, yres, xres, yres,
fbStride; fbStride;
InitFIFOData InitFIFOData
fifoInfo; fifoInfo;
#if (GLIDE_PLATFORM & GLIDE_OS_WIN32) #if (GLIDE_PLATFORM & GLIDE_OS_WIN32)
FARPROC FARPROC
oemInitMapBoard = NULL, oemInitMapBoard = NULL,
oemInitSetVideo = NULL, oemInitSetVideo = NULL,
oemInitVideoTiming = NULL; oemInitVideoTiming = NULL;
OemInitInfo oemi; OemInitInfo oemi;
sst1VideoTimingStruct *sstVideoRez = NULL, tvVidtiming; sst1VideoTimingStruct *sstVideoRez = NULL, tvVidtiming;
@@ -620,7 +619,7 @@ GR_ENTRY(grSstWinOpen, GrContext_t, (FxU32 hWnd,
(initMapBoard(_GlideRoot.current_sst) != NULL))) return FXFALSE; (initMapBoard(_GlideRoot.current_sst) != NULL))) return FXFALSE;
gc->closedP = FXFALSE; gc->closedP = FXFALSE;
} }
#if (GLIDE_PLATFORM & GLIDE_OS_WIN32) && (!defined(GLIDE_DEBUG) || (GLIDE_DEBUG == 0)) #if (GLIDE_PLATFORM & GLIDE_OS_WIN32) && (!defined(GLIDE_DEBUG) || (GLIDE_DEBUG == 0))
/* /*
** load fxoem2x.dll and map board ** load fxoem2x.dll and map board
@@ -633,7 +632,8 @@ GR_ENTRY(grSstWinOpen, GrContext_t, (FxU32 hWnd,
oemi.linearAddress = gc->base_ptr; oemi.linearAddress = gc->base_ptr;
oemi.slaveAddress = NULL; oemi.slaveAddress = NULL;
if ((gc->oemInit = LoadLibrary("fxoem2x.dll")) != NULL) { if ((gc->oemInit = LoadLibrary("fxoem2x.dll")) != NULL) {
if ((oemInitMapBoard = GetProcAddress(gc->oemInit, "_fxoemInitMapBoard@4")) != NULL) { oemInitMapBoard = GetProcAddress(gc->oemInit, "_fxoemInitMapBoard@4");
if (oemInitMapBoard) {
oemInitMapBoard(&oemi); oemInitMapBoard(&oemi);
} }
} }
@@ -649,9 +649,9 @@ GR_ENTRY(grSstWinOpen, GrContext_t, (FxU32 hWnd,
/*------------------------------------------------------ /*------------------------------------------------------
Validate and Parse Arguments Validate and Parse Arguments
------------------------------------------------------*/ ------------------------------------------------------*/
/* /*
FIXME!! jdt FIXME!! jdt
There needs to be one large table of resolutions vs. There needs to be one large table of resolutions vs.
nColBuffers vs. nAuxBuffers that specifies required nColBuffers vs. nAuxBuffers that specifies required
ram and vald/invalid configurations ram and vald/invalid configurations
@@ -678,7 +678,6 @@ GR_ENTRY(grSstWinOpen, GrContext_t, (FxU32 hWnd,
if (resolution == GR_RESOLUTION_NONE) { if (resolution == GR_RESOLUTION_NONE) {
goto BAILOUT; goto BAILOUT;
} }
#endif #endif
#ifdef H3D #ifdef H3D
@@ -701,7 +700,7 @@ GR_ENTRY(grSstWinOpen, GrContext_t, (FxU32 hWnd,
} }
} }
#endif #endif
#if ( !( GLIDE_PLATFORM & GLIDE_SST_SIM ) ) #if ( !( GLIDE_PLATFORM & GLIDE_SST_SIM ) )
/*------------------------------------------------------ /*------------------------------------------------------
Video Init Video Init
@@ -801,13 +800,13 @@ GR_ENTRY(grSstWinOpen, GrContext_t, (FxU32 hWnd,
gc->nopCMD = FXFALSE; gc->nopCMD = FXFALSE;
# if ( GLIDE_PLATFORM & GLIDE_HW_SST1 ) # if ( GLIDE_PLATFORM & GLIDE_HW_SST1 )
_grHints( GR_HINT_FIFOCHECKHINT, _grHints( GR_HINT_FIFOCHECKHINT,
fifoInfo.hwDep.vgFIFOData.memFifoStatusLwm + 0x100 ); fifoInfo.hwDep.vgFIFOData.memFifoStatusLwm + 0x100 );
_grReCacheFifo( 0 ); _grReCacheFifo( 0 );
# elif ( GLIDE_PLATFORM & GLIDE_HW_SST96 ) # elif ( GLIDE_PLATFORM & GLIDE_HW_SST96 )
gc->hwDep.sst96Dep.writesSinceFence = 0; gc->hwDep.sst96Dep.writesSinceFence = 0;
#if (GLIDE_PLATFORM & GLIDE_OS_DOS32) && ( GLIDE_PLATFORM & GLIDE_HW_SST96 ) && GLIDE_DEBUG10 #if (GLIDE_PLATFORM & GLIDE_OS_DOS32) && GLIDE_DEBUG10
/* Set int 10h interrupt handler */ /* Set int 10h interrupt handler */
gc->hwDep.sst96Dep.int10Called = FXFALSE; gc->hwDep.sst96Dep.int10Called = FXFALSE;
gc->hwDep.sst96Dep.prevInt10 = NULL; gc->hwDep.sst96Dep.prevInt10 = NULL;
@@ -816,7 +815,7 @@ GR_ENTRY(grSstWinOpen, GrContext_t, (FxU32 hWnd,
GDBG_INFO((80, "Overriding int 10h interrupt handler\n")); GDBG_INFO((80, "Overriding int 10h interrupt handler\n"));
_dos_setvect(0x10, _grInt10Handler); _dos_setvect(0x10, _grInt10Handler);
#endif #endif
gc->fifoData = fifoInfo; gc->fifoData = fifoInfo;
GDBG_INFO((120, "After Init: fifoPtr = 0x%x\n", GDBG_INFO((120, "After Init: fifoPtr = 0x%x\n",
@@ -863,7 +862,7 @@ GR_ENTRY(grSstWinOpen, GrContext_t, (FxU32 hWnd,
gc->lockPtrs[GR_LFB_WRITE_ONLY] = (FxU32)-1; gc->lockPtrs[GR_LFB_WRITE_ONLY] = (FxU32)-1;
gc->lfbSliOk = 0; gc->lfbSliOk = 0;
gc->fbStride = fbStride; gc->fbStride = fbStride;
/* Initialize the read/write registers to all 0 */ /* Initialize the read/write registers to all 0 */
gc->state.fbi_config.fbzColorPath = 0; gc->state.fbi_config.fbzColorPath = 0;
gc->state.fbi_config.fogMode = 0; gc->state.fbi_config.fogMode = 0;
@@ -878,7 +877,7 @@ GR_ENTRY(grSstWinOpen, GrContext_t, (FxU32 hWnd,
gc->state.fbi_config.stipple = 0; gc->state.fbi_config.stipple = 0;
gc->state.fbi_config.color0 = 0; gc->state.fbi_config.color0 = 0;
gc->state.fbi_config.color1 = 0; gc->state.fbi_config.color1 = 0;
for (tmu = 0; tmu < gc->num_tmu; tmu += 1) for (tmu = 0; tmu < gc->num_tmu; tmu += 1)
{ {
FxU32 textureMode = (FxU32)SST_SEQ_8_DOWNLD; FxU32 textureMode = (FxU32)SST_SEQ_8_DOWNLD;
if ( (_GlideRoot.hwConfig.SSTs[_GlideRoot.current_sst].type == if ( (_GlideRoot.hwConfig.SSTs[_GlideRoot.current_sst].type ==
@@ -902,17 +901,17 @@ GR_ENTRY(grSstWinOpen, GrContext_t, (FxU32 hWnd,
gc->state.tmu_config[tmu].largeLod = G3_LOD_TRANSLATE(GR_LOD_LOG2_1); gc->state.tmu_config[tmu].largeLod = G3_LOD_TRANSLATE(GR_LOD_LOG2_1);
gc->state.tmu_config[tmu].evenOdd = GR_MIPMAPLEVELMASK_BOTH; gc->state.tmu_config[tmu].evenOdd = GR_MIPMAPLEVELMASK_BOTH;
gc->state.tmu_config[tmu].nccTable = GR_NCCTABLE_NCC0; gc->state.tmu_config[tmu].nccTable = GR_NCCTABLE_NCC0;
} }
/*------------------------------------------------------ /*------------------------------------------------------
3D State Init 3D State Init
------------------------------------------------------*/ ------------------------------------------------------*/
GDBG_INFO((gc->myLevel, " 3D State Init\n" )); GDBG_INFO((gc->myLevel, " 3D State Init\n" ));
gc->state.fbi_config.fbzMode = gc->state.fbi_config.fbzMode =
SST_ENRECTCLIP | SST_ENRECTCLIP |
SST_ENZBIAS | SST_ENZBIAS |
SST_DRAWBUFFER_BACK; SST_DRAWBUFFER_BACK;
grDisable(GR_ALLOW_MIPMAP_DITHER); grDisable(GR_ALLOW_MIPMAP_DITHER);
grSstOrigin( origin ); grSstOrigin( origin );
grAlphaBlendFunction( GR_BLEND_ONE , GR_BLEND_ZERO, grAlphaBlendFunction( GR_BLEND_ONE , GR_BLEND_ZERO,
@@ -1048,7 +1047,7 @@ GR_ENTRY(grSstWinOpen, GrContext_t, (FxU32 hWnd,
Shutdown has 4 steps Shutdown has 4 steps
3D Idle 3D Idle
the 3D engine must be idled to make sure that there are no the 3D engine must be idled to make sure that there are no
commands executing in the transport when the registers are commands executing in the transport when the registers are
reset reset
@@ -1086,27 +1085,27 @@ GR_ENTRY(grSstWinClose, FxBool, (GrContext_t context))
--------------------------*/ --------------------------*/
GDBG_INFO(( gc->myLevel, " 3D Idle\n" )); GDBG_INFO(( gc->myLevel, " 3D Idle\n" ));
initIdle(); initIdle();
/*-------------------------- /*--------------------------
GC Reset GC Reset
--------------------------*/ --------------------------*/
GDBG_INFO(( gc->myLevel, " GC Reset\n" )); GDBG_INFO(( gc->myLevel, " GC Reset\n" ));
gc->open = FXFALSE; gc->open = FXFALSE;
gc->closedP = FXTRUE; gc->closedP = FXTRUE;
/*-------------------------- /*--------------------------
Command Transport Disable Command Transport Disable
--------------------------*/ --------------------------*/
GDBG_INFO(( gc->myLevel, " Command Transport Disable\n" )); GDBG_INFO(( gc->myLevel, " Command Transport Disable\n" ));
initDisableTransport(); initDisableTransport();
#if (GLIDE_PLATFORM & GLIDE_OS_DOS32) && (GLIDE_PLATFORM & GLIDE_HW_SST96) && GLIDE_DEBUG10 #if (GLIDE_PLATFORM & GLIDE_OS_DOS32) && (GLIDE_PLATFORM & GLIDE_HW_SST96) && GLIDE_DEBUG10
GDBG_INFO((80, "Restoring int 10h interrupt handler (0x%x)\n", gc->hwDep.sst96Dep.prevInt10)); GDBG_INFO((80, "Restoring int 10h interrupt handler (0x%x)\n", gc->hwDep.sst96Dep.prevInt10));
_dos_setvect(0x10, NULL); _dos_setvect(0x10, NULL);
#endif #endif
/*-------------------------- /*--------------------------
Video Restore Video Restore
--------------------------*/ --------------------------*/
GDBG_INFO(( gc->myLevel, " Restore Video\n" )); GDBG_INFO(( gc->myLevel, " Restore Video\n" ));
initRestoreVideo(); initRestoreVideo();
@@ -1119,7 +1118,7 @@ GR_ENTRY(grSstWinClose, FxBool, (GrContext_t context))
} }
#endif #endif
} }
GR_END(); GR_END();
return FXTRUE; return FXTRUE;
#undef FN_NAME #undef FN_NAME
@@ -1130,13 +1129,13 @@ GR_ENTRY(grSstWinClose, FxBool, (GrContext_t context))
Date: 13-Oct-2000 Date: 13-Oct-2000
Implementor(s): mmcclure Implementor(s): mmcclure
Description: Description:
Allow the application to supply the number of pending buffers Allow the application to supply the number of pending buffers
Arguments: Arguments:
NumPendingBuffers - Sent to force number of pending buffers NumPendingBuffers - Sent to force number of pending buffers
Return: Return:
-------------------------------------------------------------------*/ -------------------------------------------------------------------*/
GR_DIENTRY(grSetNumPendingBuffers, void, (FxI32 NumPendingBuffers)) GR_DIENTRY(grSetNumPendingBuffers, void, (FxI32 NumPendingBuffers))
@@ -1149,16 +1148,16 @@ GR_DIENTRY(grSetNumPendingBuffers, void, (FxI32 NumPendingBuffers))
Date: 18-Jan-98 Date: 18-Jan-98
Implementor(s): atai Implementor(s): atai
Description: Description:
Arguments: Arguments:
Return: Return:
-------------------------------------------------------------------*/ -------------------------------------------------------------------*/
GR_DIENTRY(grSelectContext, FxBool , (GrContext_t context) ) GR_DIENTRY(grSelectContext, FxBool , (GrContext_t context) )
{ {
#define FN_NAME "grSelectContext" #define FN_NAME "grSelectContext"
GR_BEGIN_NOFIFOCHECK(FN_NAME, 80); GR_BEGIN_NOFIFOCHECK(FN_NAME, 80);
return(FXTRUE); return(FXTRUE);
#undef FN_NAME #undef FN_NAME
} /* grSelectConetext */ } /* grSelectConetext */
@@ -1166,15 +1165,15 @@ GR_DIENTRY(grSelectContext, FxBool , (GrContext_t context) )
FxBool FX_CSTYLE FxBool FX_CSTYLE
_grSstControl(GrControl_t code) _grSstControl(GrControl_t code)
{ {
#define FN_NAME "grSstControl" #define FN_NAME "grSstControl"
GDBG_INFO((41, "%s: code = 0x%x, windowsInit = %d\n", FN_NAME, GDBG_INFO((41, "%s: code = 0x%x, windowsInit = %d\n", FN_NAME,
code, _GlideRoot.windowsInit)); code, _GlideRoot.windowsInit));
if (_GlideRoot.windowsInit) { if (_GlideRoot.windowsInit) {
#if (GLIDE_PLATFORM & GLIDE_HW_SST96) #if (GLIDE_PLATFORM & GLIDE_HW_SST96)
/* For VG96, windows haven't been created, so there's no point /* For VG96, windows haven't been created, so there's no point
* trying to control it. * trying to control it.
*/ */
/* Believe it or not, the following code really should be bracketed /* Believe it or not, the following code really should be bracketed
like this. The reason is that GR_BEGIN_NOFIFOCHECK seg faults like this. The reason is that GR_BEGIN_NOFIFOCHECK seg faults
@@ -1187,9 +1186,9 @@ _grSstControl(GrControl_t code)
xRes, yRes, xRes, yRes,
clipLeftRight, clipBottomTop; clipLeftRight, clipBottomTop;
FxU32 nTries; FxU32 nTries;
GR_BEGIN_NOFIFOCHECK(FN_NAME,80); GR_BEGIN_NOFIFOCHECK(FN_NAME,80);
/* We're either cleaning up or closed so forget about this one. */ /* We're either cleaning up or closed so forget about this one. */
if (gc->closedP) goto __done; if (gc->closedP) goto __done;
xRes = initControl(code); xRes = initControl(code);
@@ -1202,24 +1201,24 @@ _grSstControl(GrControl_t code)
} }
} }
#endif #endif
GDBG_INFO((80, "%s: initControl returned 0x%x\n", FN_NAME, xRes)); GDBG_INFO((80, "%s: initControl returned 0x%x\n", FN_NAME, xRes));
if (!xRes) return FXFALSE; if (!xRes) return FXFALSE;
yRes = xRes >> 16; yRes = xRes >> 16;
xRes = xRes & 0xffff; xRes = xRes & 0xffff;
/* !! FIXME +++ this call should properly update the gc->fbStride, /* !! FIXME +++ this call should properly update the gc->fbStride,
this information is known only to the init layer and needs to be this information is known only to the init layer and needs to be
exposed, it is only really necessary to lfblock right now, exposed, it is only really necessary to lfblock right now,
and therefore is returned by initGetBufferPtr */ and therefore is returned by initGetBufferPtr */
gc->state.screen_width = xRes; gc->state.screen_width = xRes;
gc->state.screen_height = yRes; gc->state.screen_height = yRes;
/* Wait for Idle. */ /* Wait for Idle. */
nTries = 0; nTries = 0;
do { do {
if (nTries++ > 999) { if (nTries++ > 999) {
@@ -1229,7 +1228,7 @@ _grSstControl(GrControl_t code)
} }
status = GET(hw->status); status = GET(hw->status);
} while (status & 0x1); } while (status & 0x1);
/* Set ClipRect Via direct writes */ /* Set ClipRect Via direct writes */
@@ -1256,17 +1255,16 @@ _grSstControl(GrControl_t code)
#endif #endif
return ctrlflag; return ctrlflag;
#endif #endif
} }
GDBG_INFO((41, "%s: Returning TRUE\n", FN_NAME)); GDBG_INFO((41, "%s: Returning TRUE\n", FN_NAME));
return FXTRUE; return FXTRUE;
#undef FN_NAME #undef FN_NAME
} /* grSstControl */ } /* grSstControl */
/*--------------------------------------------------------------------------- /*---------------------------------------------------------------------------
** grSstPerfStats ** grSstPerfStats
*/ */
GR_ENTRY(grSstPerfStats, void, (GrSstPerfStats_t *pStats)) GR_ENTRY(grSstPerfStats, void, (GrSstPerfStats_t *pStats))
{ {
@@ -1402,7 +1400,7 @@ GR_ENTRY(grSstIsBusy, FxBool, (void))
} }
if ((busy = initBusy()) == FXFALSE) if ((busy = initBusy()) == FXFALSE)
gc->nopCMD = FXFALSE; gc->nopCMD = FXFALSE;
GDBG_INFO((84,"grSstIsBusy() => 0x%x\n",busy)); GDBG_INFO((84,"grSstIsBusy() => 0x%x\n",busy));
GR_RETURN( busy ); GR_RETURN( busy );
@@ -1418,7 +1416,6 @@ GR_ENTRY(guGammaCorrectionRGB, void, (float r, float g, float b))
/* /*
** FIXME!!! ** FIXME!!!
*/ */
#if 1
GR_BEGIN_NOFIFOCHECK("guGammaCorrectionRGB",80); GR_BEGIN_NOFIFOCHECK("guGammaCorrectionRGB",80);
GDBG_INFO_MORE((gc->myLevel,"(%g,%g,%g)\n",r, g, b)); GDBG_INFO_MORE((gc->myLevel,"(%g,%g,%g)\n",r, g, b));
if (_GlideRoot.hwConfig.SSTs[_GlideRoot.current_sst].type == GR_SSTTYPE_VOODOO) if (_GlideRoot.hwConfig.SSTs[_GlideRoot.current_sst].type == GR_SSTTYPE_VOODOO)
@@ -1426,28 +1423,6 @@ GR_ENTRY(guGammaCorrectionRGB, void, (float r, float g, float b))
else else
initGamma(r); initGamma(r);
GR_END(); GR_END();
#else
GR_BEGIN_NOFIFOCHECK("guGammaCorrectionValue",80);
GDBG_INFO_MORE(gc->myLevel,"(%g %g %g)\n",r, g, b);
GR_CHECK_F(myName,
(_GlideRoot.hwConfig.SSTs[_GlideRoot.current_sst].type != GR_SSTTYPE_Voodoo2)
|| (_GlideRoot.hwConfig.SSTs[_GlideRoot.current_sst].type != GR_SSTTYPE_Voodoo2),
"grGammaCorrectionRGB not supported.");
#if GLIDE_INIT_HAL
fxHalInitGamma(hw, gamma);
#else /* !GLIDE_INIT_HAL */
/* dpc - 5 sep 1997 - FixMe!
* The old way
*
* initGamma(gam);
*/
sst1InitGammaRGB(gc->reg_ptr, r, g, b);
#endif /* !GLIDE_INIT_HAL */
GR_END();
#endif
} /* guGammaCorrectionRGB */ } /* guGammaCorrectionRGB */
/*------------------------------------------------------------------- /*-------------------------------------------------------------------
@@ -1457,7 +1432,7 @@ GR_ENTRY(guGammaCorrectionRGB, void, (float r, float g, float b))
Description: Description:
Arguments: Arguments:
Return: Return:
-------------------------------------------------------------------*/ -------------------------------------------------------------------*/
GR_DIENTRY(grLoadGammaTable, void, (FxU32 nentries, FxU32 *red, FxU32 *green, FxU32 *blue)) GR_DIENTRY(grLoadGammaTable, void, (FxU32 nentries, FxU32 *red, FxU32 *green, FxU32 *blue))
@@ -1466,24 +1441,11 @@ GR_DIENTRY(grLoadGammaTable, void, (FxU32 nentries, FxU32 *red, FxU32 *green, Fx
/* /*
** FIXME!! ** FIXME!!
*/ */
#if 1
GR_BEGIN_NOFIFOCHECK("guGammaCorrectionRGB",80); GR_BEGIN_NOFIFOCHECK("guGammaCorrectionRGB",80);
GDBG_INFO_MORE((gc->myLevel,"(%g,%g,%g)\n",red, green, blue)); GDBG_INFO_MORE((gc->myLevel,"(%g,%g,%g)\n",red, green, blue));
if (_GlideRoot.hwConfig.SSTs[_GlideRoot.current_sst].type == GR_SSTTYPE_VOODOO) if (_GlideRoot.hwConfig.SSTs[_GlideRoot.current_sst].type == GR_SSTTYPE_VOODOO)
initGammaTable(nentries, red, green, blue); initGammaTable(nentries, red, green, blue);
GR_END(); GR_END();
#else
FxU32 max;
GR_BEGIN_NOFIFOCHECK("grLoadGammaTable",80);
grGet(GR_GAMMA_TABLE_ENTRIES, 4, &max);
if (nentries > max)
nentries = max;
sst1InitGammaTable(gc->reg_ptr, nentries, red, green, blue);
GR_END();
#endif
#undef FN_NAME #undef FN_NAME
} }
@@ -1519,7 +1481,7 @@ GR_ENTRY(grFinish, void, (void))
Description: Description:
Arguments: Arguments:
Return: Return:
-------------------------------------------------------------------*/ -------------------------------------------------------------------*/
GR_ENTRY(grFlush, void, (void)) GR_ENTRY(grFlush, void, (void))
@@ -1536,11 +1498,6 @@ GR_ENTRY(grFlush, void, (void))
/*--------------------------------------------------------------------------- /*---------------------------------------------------------------------------
** grSstOrigin - Set the orgin orientation of the screen. ** grSstOrigin - Set the orgin orientation of the screen.
**
** Returns:
**
** Notes:
**
*/ */
GR_STATE_ENTRY(grSstOrigin, void, (GrOriginLocation_t origin )) GR_STATE_ENTRY(grSstOrigin, void, (GrOriginLocation_t origin ))
@@ -1584,7 +1541,7 @@ GR_ENTRY(grSstConfigPipeline, void, (GrChipID_t chip, GrSstRegister reg, FxU32 v
switch (chip) { switch (chip) {
case GR_TMU0: case GR_TMU0:
case GR_TMU1: case GR_TMU1:
case GR_TMU2: case GR_TMU2:
hw = SST_TMU(hw,chip); hw = SST_TMU(hw,chip);
/* FALL THRU */ /* FALL THRU */

View File

@@ -16,7 +16,6 @@
** THE UNITED STATES. ** THE UNITED STATES.
** **
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED ** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
**
*/ */
#include "init.h" #include "init.h"
@@ -228,15 +227,14 @@ initEnumHardware( InitHWEnumCallback *cb )
vgDriverInit( &contexts[INIT_VOODOO] ); vgDriverInit( &contexts[INIT_VOODOO] );
vg96DriverInit( &contexts[INIT_VG96] ); vg96DriverInit( &contexts[INIT_VG96] );
/* Mark the library as initialized */ /* Mark the library as initialized */
libInitialized = FXTRUE; libInitialized = FXTRUE;
} }
if ( cb ) { if ( cb ) {
for( device = 0; device < numDevicesInSystem; device++ ) { for( device = 0; device < numDevicesInSystem; device++ ) {
cb( &hwInfo[device] ); cb( &hwInfo[device] );
} }
} }
return; return;
} /* initEnumHardware */ } /* initEnumHardware */
@@ -350,17 +348,15 @@ initGetDeviceInfo( FxU32 devNumber, InitDeviceInfo *info )
-------------------------------------------------------------------*/ -------------------------------------------------------------------*/
FxBool FxBool
initDeviceSelect( FxU32 devNumber ) initDeviceSelect( FxU32 devNumber )
{ {
FxBool rv = FXFALSE;
if ( devNumber < numDevicesInSystem ) { if ( devNumber < numDevicesInSystem ) {
context = &contexts[hwInfo[devNumber].hwClass]; context = &contexts[hwInfo[devNumber].hwClass];
context->info = hwInfo[devNumber]; context->info = hwInfo[devNumber];
rv = FXTRUE; return FXTRUE;
} }
return rv; return FXFALSE;
}/* initDeviceSelect */ }/* initDeviceSelect */

View File

@@ -16,7 +16,6 @@
** THE UNITED STATES. ** THE UNITED STATES.
** **
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED ** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
**
*/ */
#include <3dfx.h> #include <3dfx.h>
@@ -88,16 +87,13 @@ static void *getBufferPtr( InitBuffer_t buffer, int *strideBytes ) {
static void renderBuffer( InitBuffer_t buffer ) { static void renderBuffer( InitBuffer_t buffer ) {
init96RenderBuffer( buffer, context->writeMethod ); init96RenderBuffer( buffer, context->writeMethod );
return;
} }
static void origin( InitOriginLocation_t origin ) { static void origin( InitOriginLocation_t origin ) {
init96Origin( origin, context->writeMethod ); init96Origin( origin, context->writeMethod );
return;
} }
static void ioCtl( FxU32 token, void *argument ) { static void ioCtl( FxU32 token, void *argument ) {
return;
} }
static FxBool control( FxU32 code ) { static FxBool control( FxU32 code ) {

View File

@@ -16,7 +16,6 @@
** THE UNITED STATES. ** THE UNITED STATES.
** **
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED ** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
**
*/ */
#include <3dfx.h> #include <3dfx.h>
@@ -26,6 +25,8 @@
#include <sst1init.h> #include <sst1init.h>
#include <sst.h> #include <sst.h>
#include <stddef.h> /* NULL */
static FxBool setVideo( FxU32 hWnd, static FxBool setVideo( FxU32 hWnd,
GrScreenResolution_t sRes, GrScreenResolution_t sRes,
GrScreenRefresh_t vRefresh, GrScreenRefresh_t vRefresh,
@@ -37,10 +38,11 @@ static FxBool setVideo( FxU32 hWnd,
int *yres, int *yres,
int *fbStride, int *fbStride,
sst1VideoTimingStruct *vidTimings) { sst1VideoTimingStruct *vidTimings) {
FxBool rv;
static int _w[] = {320,320,400,512,640,640,640,640,800,960,856,512}; static int _w[] = {320,320,400,512,640,640,640,640,800,960,856,512};
static int _h[] = {200,240,256,384,200,350,400,480,600,720,480,256}; static int _h[] = {200,240,256,384,200,350,400,480,600,720,480,256};
FxBool rv;
rv = sst1InitVideo( (FxU32*)context->info.hwDep.vgInfo.vgBaseAddr, rv = sst1InitVideo( (FxU32*)context->info.hwDep.vgInfo.vgBaseAddr,
sRes, sRes,
vRefresh, vRefresh,
@@ -115,19 +117,16 @@ static void idle( void ) {
} }
static void *getBufferPtr( InitBuffer_t buffer, int *strideBytes ) { static void *getBufferPtr( InitBuffer_t buffer, int *strideBytes ) {
return 0; return NULL;
} }
static void renderBuffer( InitBuffer_t buffer ) { static void renderBuffer( InitBuffer_t buffer ) {
return;
} }
static void origin( InitOriginLocation_t origin ) { static void origin( InitOriginLocation_t origin ) {
return;
} }
static void ioCtl( FxU32 token, void *argument ) { static void ioCtl( FxU32 token, void *argument ) {
return;
} }
static FxBool control( FxU32 code ) { static FxBool control( FxU32 code ) {