{
windowSetting.bDisplayFullscreen = ConfigGetParamBool(l_ConfigVideoGeneral, "Fullscreen");
windowSetting.uDisplayWidth = ConfigGetParamInt(l_ConfigVideoGeneral, "ScreenWidth");
+#if 1
+ if (windowSetting.uDisplayWidth==800)
+ windowSetting.uDisplayWidth = 640; // no strech
+#endif
windowSetting.uDisplayHeight = ConfigGetParamInt(l_ConfigVideoGeneral, "ScreenHeight");
windowSetting.bVerticalSync = ConfigGetParamBool(l_ConfigVideoGeneral, "VerticalSync");
options.bShowFPS = ConfigGetParamBool(l_ConfigVideoRice, "ShowFPS");
options.mipmapping = ConfigGetParamInt(l_ConfigVideoRice, "Mipmapping");
+ //*SEB* Force to 0 has other setting crash on the Pandora
+ options.mipmapping = 0;
options.fogMethod = ConfigGetParamInt(l_ConfigVideoRice, "FogMethod");
options.forceTextureFilter = ConfigGetParamInt(l_ConfigVideoRice, "ForceTextureFilter");
options.textureEnhancement = ConfigGetParamInt(l_ConfigVideoRice, "TextureEnhancement");
options.colorQuality = ConfigGetParamInt(l_ConfigVideoRice, "ColorQuality");
options.OpenglRenderSetting = ConfigGetParamInt(l_ConfigVideoRice, "OpenGLRenderSetting");
options.anisotropicFiltering = ConfigGetParamInt(l_ConfigVideoRice, "AnisotropicFiltering");
-
+ //*SEB* Force to 0 has mipmapping is already forced to 0
+ options.anisotropicFiltering = 0;
+
CDeviceBuilder::SelectDeviceType((SupportedDeviceType)options.OpenglRenderSetting);
status.isMMXSupported = isMMXSupported();
/* Set the video mode */
m64p_video_mode ScreenMode = bWindowed ? M64VIDEO_WINDOWED : M64VIDEO_FULLSCREEN;
m64p_video_flags flags = M64VIDEOFLAG_SUPPORT_RESIZING;
+#if 1
+ if (CoreVideo_SetVideoMode(800, windowSetting.uDisplayHeight, colorBufferDepth, ScreenMode, flags) != M64ERR_SUCCESS)
+#else
if (CoreVideo_SetVideoMode(windowSetting.uDisplayWidth, windowSetting.uDisplayHeight, colorBufferDepth, ScreenMode, flags) != M64ERR_SUCCESS)
+#endif
{
DebugMessage(M64MSG_ERROR, "Failed to set %i-bit video mode: %ix%i", colorBufferDepth, (int)windowSetting.uDisplayWidth, (int)windowSetting.uDisplayHeight);
CoreVideo_Quit();
GLboolean cullface = glIsEnabled(GL_CULL_FACE);
glDisable(GL_CULL_FACE);
OPENGL_CHECK_ERRORS;
-
glViewportWrapper(0, windowSetting.statusBarHeightToUse, windowSetting.uDisplayWidth, windowSetting.uDisplayHeight);
OPENGL_CHECK_ERRORS;
extern int dlistMtxCount;
extern bool bHalfTxtScale;
+extern float mspervi;
+extern float numvi;
+static int skipframe=0;
+static unsigned int oldtick=0;
+static int oldskip=0;
+extern bool skipping;
+
void DLParser_Process(OSTask * pTask)
{
static int skipframe=0;
}
status.bScreenIsDrawn = true;
- if( options.bSkipFrame )
+/* if( options.bSkipFrame )
{
skipframe++;
if(skipframe%2)
return;
}
}
-
+*/
if( currentRomOptions.N64RenderToTextureEmuType != TXT_BUF_NONE && defaultRomOptions.bSaveVRAM )
{
g_pFrameBufferManager->CheckRenderTextureCRCInRDRAM();
}
+ unsigned int newtick=0;
+ static int count = 0;
+ if( options.bSkipFrame )
+ {
+ skipping=false;
+ newtick = SDL_GetTicks();
+ if (newtick-oldtick>400 || skipframe>4 || numvi==0) {
+ oldtick=newtick; // too long frame delay, something must have gone wrong
+ skipping=false;
+ } else
+ if ((float)(newtick-oldtick)>=mspervi*numvi+3.0f) {
+ skipping=true;
+ }
+ // don't jump frameskipping...
+ if (skipping) {
+ //want to skip, be progress slowly...
+ if (skipframe>oldskip+1)
+ skipping = false;
+ }
+ if (skipping) {
+ skipframe++;
+ status.bScreenIsDrawn = false;
+ TriggerDPInterrupt();
+ TriggerSPInterrupt();
+ return;
+ }
+ oldskip = skipframe;
+ skipframe=0;
+ oldtick=newtick;
+ numvi=0;
+ }
+
g_pOSTask = pTask;
DebuggerPauseCountN( NEXT_DLIST );
{
pF( pEntry->pTexture, pEntry->ti );
+/*printf("Decompress 32bit Texture:\n\tFormat: %s\n\tImage Size:%d\n",
+ pszImgFormat[pEntry->ti.Format], pnImgSize[pEntry->ti.Size]);
+printf("Palette Format: %s (%d)\n", textlutname[pEntry->ti.TLutFmt>>RSP_SETOTHERMODE_SHIFT_TEXTLUT], pEntry->ti.TLutFmt>>RSP_SETOTHERMODE_SHIFT_TEXTLUT);*/
LOG_TEXTURE(
{
DebuggerAppendMsg("Decompress 32bit Texture:\n\tFormat: %s\n\tImage Size:%d\n",
}
else
{
+//printf("ConvertTexture: Unable to decompress %s/%dbpp", pszImgFormat[pEntry->ti.Format], pnImgSize[pEntry->ti.Size]);
TRACE2("ConvertTexture: Unable to decompress %s/%dbpp", pszImgFormat[pEntry->ti.Format], pnImgSize[pEntry->ti.Size]);
}
ptr_VidExt_GL_GetAttribute CoreVideo_GL_GetAttribute = NULL;
ptr_VidExt_GL_SwapBuffers CoreVideo_GL_SwapBuffers = NULL;
+// For Fameskip
+float mspervi = 1000.0f/60.0f; //default is shortest frame
+float numvi = 0.0f;
+bool skipping = false;
+
//---------------------------------------------------------------------------------------
// Forward function declarations
}
g_CritialSection.Lock();
+
+ //framskip, count vi
+ numvi++;
+
if( status.bHandleN64RenderTexture )
g_pFrameBufferManager->CloseRenderTexture(true);
+
+ if (skipping) {
+ g_CritialSection.Unlock();
+ return;
+ }
g_pFrameBufferManager->SetAddrBeDisplayed(*g_GraphicsInfo.VI_ORIGIN_REG);
- if( status.gDlistCount == 0 )
+ if(status.gDlistCount == 0)
{
// CPU frame buffer update
uint32 width = *g_GraphicsInfo.VI_WIDTH_REG;
GenerateCurrentRomOptions();
status.dwTvSystem = CountryCodeToTVSystem(g_curRomInfo.romheader.nCountryID);
- if( status.dwTvSystem == TV_SYSTEM_NTSC )
+ if( status.dwTvSystem == TV_SYSTEM_NTSC ) {
status.fRatio = 0.75f;
- else
- status.fRatio = 9/11.0f;;
+ mspervi=1000.0f/60.0f; //for framskipping
+ } else {
+ status.fRatio = 9/11.0f;
+ mspervi=1000.0f/50.0f; //for framskipping
+ }
InitExternalTextures();