This commit is contained in:
zilmar 2015-03-04 06:01:46 +11:00
commit 59c53e4f72
6 changed files with 98 additions and 15 deletions

View File

@ -1216,15 +1216,15 @@ Good Name=F-ZERO X (U)
Internal Name=F-ZERO X
depthmode=1
[53CCAD28-AEA6EDA2-C:45]
Good Name=F1 Racing Championship (B)
[3CECBCB8-6126BF07-C:50]
Good Name=F1 Racing Championship (E) (M5)
Internal Name=F1RacingChampionship
buff_clear=0
depthmode=0
swapmode=0
[3CECBCB8-6126BF07-C:50]
Good Name=F1 Racing Championship (E) (M5)
[53CCAD28-AEA6EDA2-C:45]
Good Name=F1 Racing Championship (U)
Internal Name=F1RacingChampionship
buff_clear=0
depthmode=0
@ -2303,7 +2303,7 @@ Internal Name=EVANGELION
depthmode=1
[D094B170-D7C4B5CC-C:45]
Good Name=NFL Blitz (U) (V1.0)
Good Name=NFL Blitz (U)
Internal Name=NFL BLITZ
lodmode=2
@ -2313,7 +2313,7 @@ Internal Name=NFL BLITZ SPECIAL ED
lodmode=2
[15A00969-34E5A285-C:45]
Good Name=NFL Blitz 2000 (U)
Good Name=NFL Blitz 2000 (U) (V1.0)
Internal Name=blitz2k
lodmode=2

View File

@ -2202,12 +2202,6 @@ Emulate Clear=0
Primary Frame Buffer=0
Self Texture=0
[53CCAD28-AEA6EDA2-C:45]
Good Name=F1 Racing Championship (B)
Internal Name=F1RacingChampionship
Status=Issues (plugin)
Plugin Note=[video] errors:resolution issues
[3CECBCB8-6126BF07-C:50]
Good Name=F1 Racing Championship (E) (M5)
Internal Name=F1RacingChampionship
@ -2220,6 +2214,18 @@ Primary Frame Buffer=0
RDRAM Size=8
Self Texture=0
[53CCAD28-AEA6EDA2-C:45]
Good Name=F1 Racing Championship (U)
Internal Name=F1RacingChampionship
Status=Issues (plugin)
Plugin Note=[video] errors:resolution issues
Clear Frame=0
Culling=1
Emulate Clear=0
Primary Frame Buffer=0
RDRAM Size=8
Self Texture=0
[6DFF4C37-B1B763FD-C:4A]
Good Name=Famista 64 (J)
Internal Name=̧нÀ 64
@ -7028,7 +7034,16 @@ AiCountPerBytes=800
Clear Frame=0
[665FD963-B5CC6612-C:44]
Good Name=Turok - Dinosaur Hunter (G)
Good Name=Turok - Dinosaur Hunter (G) (V1.0)
Internal Name=TUROK_DINOSAUR_HUNTE
Status=Compatible
Core Note=(see GameFAQ)
Plugin Note=[video] (see GameFAQ)
AiCountPerBytes=800
Clear Frame=0
[665FC793-6934A73B-C:44]
Good Name=Turok - Dinosaur Hunter (G) (V1.1)/(v1.2)
Internal Name=TUROK_DINOSAUR_HUNTE
Status=Compatible
Core Note=(see GameFAQ)

View File

@ -41,6 +41,15 @@
#include "Util.h"
#include "Debugger.h"
/*
* required to include OpenGL library without errors
* Dependency on OpenGL in this module is limited to just `glGetError`.
*/
#ifdef _WIN32
#include <windows.h>
#endif
#include <GL/gl.h>
GLIDE64_DEBUGGER _debugger;
#define SX(x) ((x)*rdp.scale_1024)
@ -1018,3 +1027,52 @@ void output (float x, float y, int scale, const char *fmt, ...)
x+=8;
}
}
static const char * GL_errors[7 + 1] = {
"GL_NO_ERROR", /* "There is no current error." */
"GL_INVALID_ENUM", /* "Invalid parameter." */
"GL_INVALID_VALUE", /* "Invalid enum parameter value." */
"GL_INVALID_OPERATION", /* "Illegal call." */
"GL_STACK_OVERFLOW",
"GL_STACK_UNDERFLOW",
"GL_OUT_OF_MEMORY", /* "Unable to allocate memory." */
"GL_UNKNOWN_ERROR" /* ??? */
};
int grDisplayGLError(const char* message)
{
GLenum status;
unsigned int error_index;
int failure;
status = glGetError();
failure = 1;
if (status == GL_NO_ERROR)
error_index = failure = 0;
else
error_index =
(status < GL_INVALID_ENUM) /* to avoid underflow when subtracting */
? ( 7 ) /* our own, made-up "GL_UNKNOWN_ERROR" error */
: (status - GL_INVALID_ENUM) + 1;
if (error_index > 7)
error_index = 7;
#if !0
/*
* In most cases, we don't want to spam the screen to repeatedly say that
* there were no OpenGL errors yet, though sometimes one may need verbosity.
*/
if (failure == 0)
return (failure);
#endif
#ifdef _WIN32
MessageBoxA(NULL, message, GL_errors[error_index], MB_ICONERROR);
#else
fprintf(stderr, "%s\n%s\n\n", GL_errors[error_index], message);
#endif
return (failure);
}

View File

@ -135,3 +135,5 @@ void debug_cacheviewer ();
void debug_mouse ();
void debug_keys ();
void output (float x, float y, int scale, const char *fmt, ...);
extern int grDisplayGLError( const char * message );

View File

@ -1890,6 +1890,10 @@ void CALL UpdateScreen (void)
if (fullscreen && (*gfx.VI_ORIGIN_REG > width))
update_screen_count++;
#if defined(_DEBUG) || 0
grDisplayGLError("UpdateScreen");
#endif
#ifdef FPS
// vertical interrupt has occurred, increment counter
vi_count ++;

View File

@ -2115,6 +2115,10 @@ grBufferSwap( FxU32 swap_interval )
for (i = 0; i < nb_fb; i++)
fbs[i].buff_clear = 1;
#ifdef _DEBUG
grFinish();
#endif
// VP debugging
#ifdef VPDEBUG
dump_stop();
@ -2572,13 +2576,13 @@ grErrorSetCallback( GrErrorCallbackFnc_t /*fnc*/ )
FX_ENTRY void FX_CALL
grFinish(void)
{
display_warning("grFinish");
glFinish();
}
FX_ENTRY void FX_CALL
grFlush(void)
{
display_warning("grFlush");
glFlush();
}
FX_ENTRY void FX_CALL