summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSND\edgbla_cp <SND\edgbla_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2011-07-26 17:00:47 +0000
committerSND\edgbla_cp <SND\edgbla_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2011-07-26 17:00:47 +0000
commit9cbd44224d555eb5d9fbd044676e92924407b57b (patch)
treefe82f1d1dbf85e40ea27c82aa154c323efec8a76
parentbe2f9d6ef7c59535773efb10f59793b2d4de9eb3 (diff)
downloadpcsxr-9cbd44224d555eb5d9fbd044676e92924407b57b.tar.gz
peopsogl1, vertex accuracy.
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@69230 e17a0e51-4ae3-4d35-97c3-1a29b211df97
-rw-r--r--plugins/peopsxgl/Makefile.am2
-rw-r--r--plugins/peopsxgl/cfg.c5
-rw-r--r--plugins/peopsxgl/draw.c89
-rw-r--r--plugins/peopsxgl/externals.h1
-rw-r--r--plugins/peopsxgl/gpu.c3
-rw-r--r--plugins/peopsxgl/gpucfg/main.c17
-rw-r--r--plugins/peopsxgl/gpucfg/peopsxgl.ui14
-rw-r--r--plugins/peopsxgl/gte_accuracy.c66
-rw-r--r--plugins/peopsxgl/gte_accuracy.h26
-rw-r--r--plugins/peopsxgl/key.h4
-rw-r--r--win32/plugins/peopsxgl/gpuPeopsOpenGL.def2
-rw-r--r--win32/plugins/peopsxgl/gpuPeopsOpenGL.rc150
-rw-r--r--win32/plugins/peopsxgl/gpuPeopsOpenGL.vcproj14
-rw-r--r--win32/plugins/peopsxgl/resource.h4
-rw-r--r--win32/plugins/peopsxgl/winsrc/cfg.c11
15 files changed, 285 insertions, 123 deletions
diff --git a/plugins/peopsxgl/Makefile.am b/plugins/peopsxgl/Makefile.am
index e7478efa..2017472a 100644
--- a/plugins/peopsxgl/Makefile.am
+++ b/plugins/peopsxgl/Makefile.am
@@ -10,7 +10,7 @@ libdir = @libdir@/games/psemu/
lib_LTLIBRARIES = libpeopsxgl.la
libpeopsxgl_la_SOURCES = cfg.c draw.c fps.c gpu.c key.c menu.c \
- prim.c soft.c texture.c
+ prim.c soft.c texture.c gte_accuracy.c
libpeopsxgl_la_LDFLAGS = -module -avoid-version
libpeopsxgl_la_LIBADD = -lX11 -lXxf86vm -lGL -lm
diff --git a/plugins/peopsxgl/cfg.c b/plugins/peopsxgl/cfg.c
index 3dcd0aba..6819327d 100644
--- a/plugins/peopsxgl/cfg.c
+++ b/plugins/peopsxgl/cfg.c
@@ -197,6 +197,10 @@ void ReadConfigFile()
strcpy(t,"\nOGLExtensions");p=strstr(pB,t);if(p) {p=strstr(p,"=");len=1;}
if(p) iUseExts=atoi(p+len);
if(iUseExts>1) iUseExts=1;
+
+ strcpy(t,"\nGteAccuracy");p=strstr(pB,t);if(p) {p=strstr(p,"=");len=1;}
+ if(p) bGteAccuracy=atoi(p+len);
+ if(bGteAccuracy>1) bGteAccuracy=1;
free(pB);
}
@@ -232,6 +236,7 @@ void ReadConfig(void) // read config (linux fil
iFrameReadType=0;
bUse15bitMdec=FALSE;
iShowFPS=0;
+ bGteAccuracy=0;
bKeepRatio=FALSE;
iScanBlend=0;
iVRamSize=0;
diff --git a/plugins/peopsxgl/draw.c b/plugins/peopsxgl/draw.c
index 748824a1..5b64554f 100644
--- a/plugins/peopsxgl/draw.c
+++ b/plugins/peopsxgl/draw.c
@@ -27,6 +27,8 @@
#include "texture.h"
#include "menu.h"
+#include "gte_accuracy.h"
+
#if defined(_MACGL)
// if you use it, you must include it
#include <OpenGL/gl.h>
@@ -121,6 +123,7 @@ int iUsePalTextures=1;
BOOL bSnapShot=FALSE;
BOOL bSmallAlpha=FALSE;
int iShowFPS=0;
+BOOL bGteAccuracy;
// OGL extension support
@@ -1050,10 +1053,21 @@ BOOL offset2(void)
if(CheckCoord2()) return TRUE;
}
- vertex[0].x=lx0+PSXDisplay.CumulOffset.x;
- vertex[1].x=lx1+PSXDisplay.CumulOffset.x;
- vertex[0].y=ly0+PSXDisplay.CumulOffset.y;
- vertex[1].y=ly1+PSXDisplay.CumulOffset.y;
+ if(!getGteVertex(lx0, ly0, &vertex[0].x, &vertex[0].y))
+ {
+ vertex[0].x=lx0;
+ vertex[0].y=ly0;
+ }
+ if(!getGteVertex(lx1, ly1, &vertex[1].x, &vertex[1].y))
+ {
+ vertex[1].x=lx1;
+ vertex[1].y=ly1;
+ }
+
+ vertex[0].x+=PSXDisplay.CumulOffset.x;
+ vertex[1].x+=PSXDisplay.CumulOffset.x;
+ vertex[0].y+=PSXDisplay.CumulOffset.y;
+ vertex[1].y+=PSXDisplay.CumulOffset.y;
return FALSE;
}
@@ -1076,13 +1090,29 @@ BOOL offset3(void)
if(CheckCoord3()) return TRUE;
}
-
- vertex[0].x=lx0+PSXDisplay.CumulOffset.x;
- vertex[1].x=lx1+PSXDisplay.CumulOffset.x;
- vertex[2].x=lx2+PSXDisplay.CumulOffset.x;
- vertex[0].y=ly0+PSXDisplay.CumulOffset.y;
- vertex[1].y=ly1+PSXDisplay.CumulOffset.y;
- vertex[2].y=ly2+PSXDisplay.CumulOffset.y;
+
+ if(!getGteVertex(lx0, ly0, &vertex[0].x, &vertex[0].y))
+ {
+ vertex[0].x=lx0;
+ vertex[0].y=ly0;
+ }
+ if(!getGteVertex(lx1, ly1, &vertex[1].x, &vertex[1].y))
+ {
+ vertex[1].x=lx1;
+ vertex[1].y=ly1;
+ }
+ if(!getGteVertex(lx2, ly2, &vertex[2].x, &vertex[2].y))
+ {
+ vertex[2].x=lx2;
+ vertex[2].y=ly2;
+ }
+
+ vertex[0].x+=PSXDisplay.CumulOffset.x;
+ vertex[1].x+=PSXDisplay.CumulOffset.x;
+ vertex[2].x+=PSXDisplay.CumulOffset.x;
+ vertex[0].y+=PSXDisplay.CumulOffset.y;
+ vertex[1].y+=PSXDisplay.CumulOffset.y;
+ vertex[2].y+=PSXDisplay.CumulOffset.y;
return FALSE;
}
@@ -1108,14 +1138,35 @@ BOOL offset4(void)
if(CheckCoord4()) return TRUE;
}
- vertex[0].x=lx0+PSXDisplay.CumulOffset.x;
- vertex[1].x=lx1+PSXDisplay.CumulOffset.x;
- vertex[2].x=lx2+PSXDisplay.CumulOffset.x;
- vertex[3].x=lx3+PSXDisplay.CumulOffset.x;
- vertex[0].y=ly0+PSXDisplay.CumulOffset.y;
- vertex[1].y=ly1+PSXDisplay.CumulOffset.y;
- vertex[2].y=ly2+PSXDisplay.CumulOffset.y;
- vertex[3].y=ly3+PSXDisplay.CumulOffset.y;
+ if(!getGteVertex(lx0, ly0, &vertex[0].x, &vertex[0].y))
+ {
+ vertex[0].x=lx0;
+ vertex[0].y=ly0;
+ }
+ if(!getGteVertex(lx1, ly1, &vertex[1].x, &vertex[1].y))
+ {
+ vertex[1].x=lx1;
+ vertex[1].y=ly1;
+ }
+ if(!getGteVertex(lx2, ly2, &vertex[2].x, &vertex[2].y))
+ {
+ vertex[2].x=lx2;
+ vertex[2].y=ly2;
+ }
+ if(!getGteVertex(lx3, ly3, &vertex[3].x, &vertex[3].y))
+ {
+ vertex[3].x=lx3;
+ vertex[3].y=ly3;
+ }
+
+ vertex[0].x+=PSXDisplay.CumulOffset.x;
+ vertex[1].x+=PSXDisplay.CumulOffset.x;
+ vertex[2].x+=PSXDisplay.CumulOffset.x;
+ vertex[3].x+=PSXDisplay.CumulOffset.x;
+ vertex[0].y+=PSXDisplay.CumulOffset.y;
+ vertex[1].y+=PSXDisplay.CumulOffset.y;
+ vertex[2].y+=PSXDisplay.CumulOffset.y;
+ vertex[3].y+=PSXDisplay.CumulOffset.y;
return FALSE;
}
diff --git a/plugins/peopsxgl/externals.h b/plugins/peopsxgl/externals.h
index 569be698..6071b7c8 100644
--- a/plugins/peopsxgl/externals.h
+++ b/plugins/peopsxgl/externals.h
@@ -263,6 +263,7 @@ extern BOOL bCheckMask;
extern unsigned short sSetMask;
extern uint32_t lSetMask;
extern int iShowFPS;
+extern BOOL bGteAccuracy;
extern BOOL bSetClip;
extern int iForceVSync;
extern int iUseExts;
diff --git a/plugins/peopsxgl/gpu.c b/plugins/peopsxgl/gpu.c
index 7955a11c..46e98198 100644
--- a/plugins/peopsxgl/gpu.c
+++ b/plugins/peopsxgl/gpu.c
@@ -45,6 +45,7 @@ static int iOldMode=0;
#include "menu.h"
#include "fps.h"
#include "key.h"
+#include "gte_accuracy.h"
#ifdef _WINDOWS
#include "resource.h"
#include "ssave.h"
@@ -687,6 +688,8 @@ long CALLBACK GPUopen(HWND hwndGPU)
InitializeTextureStore(); // init texture mem
+ resetGteVertices();
+
// lGPUstatusRet = 0x74000000;
// with some emus, we could do the OGL init right here... oh my
diff --git a/plugins/peopsxgl/gpucfg/main.c b/plugins/peopsxgl/gpucfg/main.c
index 3d7d9d68..67c47e64 100644
--- a/plugins/peopsxgl/gpucfg/main.c
+++ b/plugins/peopsxgl/gpucfg/main.c
@@ -43,6 +43,7 @@ GtkWidget *window,
*chkAntiAlias,
*chkOGLExtensions,
*chkScreenSmoothing,
+ *chkGteAccuracy,
*chkUseGameFixes,
*tblGameFixes,
*chkCfgFix1,
@@ -125,6 +126,7 @@ void on_btnSave_clicked( GtkObject *object, gpointer user_data ) {
fprintf( out, "\nScreenSmoothing = %i", gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( chkScreenSmoothing ) ) );
fprintf( out, "\nUseFixes = %i", gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( chkUseGameFixes ) ) );
fprintf( out, "\nCfgFixes = %i", cfgFixes );
+ fprintf( out, "\nGteAccuracy = %i", gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( chkGteAccuracy ) ) );
fclose( out );
}
@@ -163,6 +165,7 @@ void on_btnFast_clicked( GtkObject *object, gpointer user_data ) {
gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( chkAntiAlias ), 0 );
gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( chkOGLExtensions ), 1 );
gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( chkScreenSmoothing ), 0 );
+ gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( chkGteAccuracy ), 0 );
}
void on_btnBeautiful_clicked( GtkObject *object, gpointer user_data ) {
@@ -194,6 +197,7 @@ void on_btnBeautiful_clicked( GtkObject *object, gpointer user_data ) {
gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( chkAntiAlias ), 0 );
gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( chkOGLExtensions ), 1 );
gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( chkScreenSmoothing ), 0 );
+ gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( chkGteAccuracy ), 0 );
}
// Callbacks used to toggle the sensitivity of some parts of the GUI
@@ -296,6 +300,7 @@ int main( int argc, char **argv ) {
chkAntiAlias = GTK_WIDGET( gtk_builder_get_object( builder, "chkAntiAlias" ) );
chkOGLExtensions = GTK_WIDGET( gtk_builder_get_object( builder, "chkOGLExtensions" ) );
chkScreenSmoothing = GTK_WIDGET( gtk_builder_get_object( builder, "chkScreenSmoothing" ) );
+ chkGteAccuracy = GTK_WIDGET( gtk_builder_get_object( builder, "chkGteAccuracy" ) );
chkUseGameFixes = GTK_WIDGET( gtk_builder_get_object( builder, "chkUseGameFixes" ) );
tblGameFixes = GTK_WIDGET( gtk_builder_get_object( builder, "tblGameFixes" ) );
chkCfgFix1 = GTK_WIDGET( gtk_builder_get_object( builder, "chkCfgFix1" ) );
@@ -667,6 +672,18 @@ int main( int argc, char **argv ) {
val = 0;
if ( pB ) {
+ strcpy( t, "\nGteAccuracy" );
+ p = strstr( pB, t );
+ if ( p ) {
+ p = strstr( p, "=" );
+ len = 1;
+ val = atoi( p + len );
+ }
+ }
+ gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( chkGteAccuracy ), val );
+
+ val = 0;
+ if ( pB ) {
strcpy( t, "\nUseFixes" );
p = strstr( pB, t );
if ( p ) {
diff --git a/plugins/peopsxgl/gpucfg/peopsxgl.ui b/plugins/peopsxgl/gpucfg/peopsxgl.ui
index b96b6485..5d90a1fa 100644
--- a/plugins/peopsxgl/gpucfg/peopsxgl.ui
+++ b/plugins/peopsxgl/gpucfg/peopsxgl.ui
@@ -8,7 +8,6 @@
<property name="resizable">False</property>
<property name="window_position">center</property>
<property name="type_hint">normal</property>
- <property name="has_separator">False</property>
<child internal-child="vbox">
<object class="GtkVBox" id="dialog-vbox3">
<property name="visible">True</property>
@@ -718,6 +717,19 @@
<property name="position">6</property>
</packing>
</child>
+ <child>
+ <object class="GtkCheckButton" id="chkGteAccuracy">
+ <property name="label" translatable="yes">Gte accuracy</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">7</property>
+ </packing>
+ </child>
</object>
<packing>
<property name="position">4</property>
diff --git a/plugins/peopsxgl/gte_accuracy.c b/plugins/peopsxgl/gte_accuracy.c
new file mode 100644
index 00000000..3af37ab0
--- /dev/null
+++ b/plugins/peopsxgl/gte_accuracy.c
@@ -0,0 +1,66 @@
+/***************************************************************************
+ * Copyright (C) 2011 by Blade_Arma *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA. *
+ ***************************************************************************/
+
+#include "stdafx.h"
+#include "externals.h"
+
+// TODO: use malloc and pointer to the array's center.
+float gteCoords[0x800 * 2][0x800 * 2][2];
+
+void CALLBACK GPUaddVertex(short sx, short sy, long long fx, long long fy, long long fz)
+{
+ if(bGteAccuracy)
+ {
+ if(sx >= -0x800 && sx <= 0x7ff &&
+ sy >= -0x800 && sy <= 0x7ff)
+ {
+ gteCoords[sy + 0x800][sx + 0x800][0] = fx / 65536.0f;
+ gteCoords[sy + 0x800][sx + 0x800][1] = fy / 65536.0f;
+ }
+ }
+}
+
+void resetGteVertices()
+{
+ if(bGteAccuracy)
+ {
+ memset(gteCoords, 0x00, sizeof(gteCoords));
+ }
+}
+
+int getGteVertex(short sx, short sy, float *fx, float *fy)
+{
+ if(bGteAccuracy)
+ {
+ if(sx >= -0x800 && sx <= 0x7ff &&
+ sy >= -0x800 && sy <= 0x7ff)
+ {
+ if(((int)gteCoords[sy + 0x800][sx + 0x800][0]) == sx &&
+ ((int)gteCoords[sy + 0x800][sx + 0x800][1]) == sy)
+ {
+ *fx = gteCoords[sy + 0x800][sx + 0x800][0];
+ *fy = gteCoords[sy + 0x800][sx + 0x800][1];
+
+ return 1;
+ }
+ }
+ }
+
+ return 0;
+}
diff --git a/plugins/peopsxgl/gte_accuracy.h b/plugins/peopsxgl/gte_accuracy.h
new file mode 100644
index 00000000..6f42f21c
--- /dev/null
+++ b/plugins/peopsxgl/gte_accuracy.h
@@ -0,0 +1,26 @@
+/***************************************************************************
+ * Copyright (C) 2011 by Blade_Arma *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA. *
+ ***************************************************************************/
+
+#ifndef _GTE_ACCURACY_H_
+#define _GTE_ACCURACY_H_
+
+extern void resetGteVertices();
+extern int getGteVertex(short sx, short sy, float *fx, float *fy);
+
+#endif // _GTE_ACCURACY_H_
diff --git a/plugins/peopsxgl/key.h b/plugins/peopsxgl/key.h
index 3a523cff..63d25373 100644
--- a/plugins/peopsxgl/key.h
+++ b/plugins/peopsxgl/key.h
@@ -3,7 +3,7 @@
-------------------
begin : Sun Mar 08 2009
copyright : (C) 1999-2009 by Pete Bernert
- web : www.pbernert.com
+ web : www.pbernert.com
***************************************************************************/
/***************************************************************************
@@ -18,4 +18,4 @@
void InitKeyHandler(void);
void ExitKeyHandler(void);
-void ResetStuff(void); \ No newline at end of file
+void ResetStuff(void);
diff --git a/win32/plugins/peopsxgl/gpuPeopsOpenGL.def b/win32/plugins/peopsxgl/gpuPeopsOpenGL.def
index 0434de60..ef8cc98d 100644
--- a/win32/plugins/peopsxgl/gpuPeopsOpenGL.def
+++ b/win32/plugins/peopsxgl/gpuPeopsOpenGL.def
@@ -33,4 +33,4 @@ EXPORTS
GPUsetfix @26
GPUsetframelimit @27
GPUvisualVibration @28
-
+ GPUaddVertex @29
diff --git a/win32/plugins/peopsxgl/gpuPeopsOpenGL.rc b/win32/plugins/peopsxgl/gpuPeopsOpenGL.rc
index 0cad7373..cd659600 100644
--- a/win32/plugins/peopsxgl/gpuPeopsOpenGL.rc
+++ b/win32/plugins/peopsxgl/gpuPeopsOpenGL.rc
@@ -154,81 +154,53 @@ BEGIN
159,10
END
-IDD_CFGDLG DIALOGEX 0, 0, 413, 295
+IDD_CFGDLG DIALOGEX 0, 0, 413, 306
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Configure P.E.Op.S. PSX OpenGL Renderer ..."
FONT 8, "MS Sans Serif"
BEGIN
- CONTROL "Fullscreen mode",IDC_DISPMODE1,"Button",
- BS_AUTORADIOBUTTON,11,11,73,10
- CONTROL "Window mode",IDC_DISPMODE2,"Button",BS_AUTORADIOBUTTON,
- 11,25,63,10
- COMBOBOX IDC_RESOLUTION,150,10,63,64,CBS_DROPDOWNLIST | CBS_SORT |
- WS_VSCROLL | WS_TABSTOP
- COMBOBOX IDC_COLORDEPTH,261,10,36,64,CBS_DROPDOWNLIST |
- WS_VSCROLL | WS_TABSTOP
+ CONTROL "Fullscreen mode",IDC_DISPMODE1,"Button",BS_AUTORADIOBUTTON,11,11,73,10
+ CONTROL "Window mode",IDC_DISPMODE2,"Button",BS_AUTORADIOBUTTON,11,25,63,10
+ COMBOBOX IDC_RESOLUTION,150,10,63,64,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
+ COMBOBOX IDC_COLORDEPTH,261,10,36,64,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
EDITTEXT IDC_WINX,150,24,26,12,ES_AUTOHSCROLL
EDITTEXT IDC_WINY,187,24,26,12,ES_AUTOHSCROLL
- CONTROL "Keep psx aspect ratio",IDC_ARATIO,"Button",
- BS_AUTOCHECKBOX | WS_TABSTOP,306,17,95,12
- COMBOBOX IDC_TEXQUALITY,61,50,159,64,CBS_DROPDOWNLIST |
- WS_VSCROLL | WS_TABSTOP
- COMBOBOX IDC_FILTERTYPE,61,63,159,83,CBS_DROPDOWNLIST |
- WS_VSCROLL | WS_TABSTOP
- COMBOBOX IDC_HIRESTEX,275,50,129,64,CBS_DROPDOWNLIST | WS_VSCROLL |
- WS_TABSTOP
- COMBOBOX IDC_VRAMSIZE,275,63,62,88,CBS_DROPDOWN | WS_VSCROLL |
- WS_TABSTOP
- CONTROL "Show FPS display on startup",IDC_SHOWFPS,"Button",
- BS_AUTOCHECKBOX | WS_TABSTOP,12,94,107,10
+ CONTROL "Keep psx aspect ratio",IDC_ARATIO,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,306,17,95,12
+ COMBOBOX IDC_TEXQUALITY,61,50,159,64,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ COMBOBOX IDC_FILTERTYPE,61,63,159,83,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ COMBOBOX IDC_HIRESTEX,275,50,129,64,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ COMBOBOX IDC_VRAMSIZE,275,63,62,88,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
+ CONTROL "Show FPS display on startup",IDC_SHOWFPS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,94,107,10
PUSHBUTTON "...",IDC_KEYCONFIG,119,94,11,10,0,WS_EX_STATICEDGE
- CONTROL "Use FPS limit",IDC_USELIMIT,"Button",BS_AUTOCHECKBOX |
- WS_TABSTOP,149,89,73,10
- CONTROL "Use Frame skipping",IDC_USESKIP,"Button",
- BS_AUTOCHECKBOX | WS_TABSTOP,149,101,78,10
+ CONTROL "Use FPS limit",IDC_USELIMIT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,149,89,73,10
+ CONTROL "Use Frame skipping",IDC_USESKIP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,149,101,78,10
CONTROL "Auto-detect FPS/Frame skipping limit",IDC_FRAMEAUTO,
"Button",BS_AUTORADIOBUTTON | WS_GROUP,258,89,131,9
- CONTROL "FPS limit (10-200) :",IDC_FRAMEMANUELL,"Button",
- BS_AUTORADIOBUTTON,258,100,72,10
+ CONTROL "FPS limit (10-200) :",IDC_FRAMEMANUELL,"Button",BS_AUTORADIOBUTTON,258,100,72,10
EDITTEXT IDC_FRAMELIMIT,334,99,29,12,ES_AUTOHSCROLL
- COMBOBOX IDC_OFFSCREEN,78,123,130,64,CBS_DROPDOWNLIST |
- WS_VSCROLL | WS_TABSTOP
- COMBOBOX IDC_FRAMETEX,78,136,130,64,CBS_DROPDOWNLIST | WS_VSCROLL |
- WS_TABSTOP
- COMBOBOX IDC_FRAMEREAD,78,149,130,64,CBS_DROPDOWNLIST |
- WS_VSCROLL | WS_TABSTOP
- CONTROL "Alpha MultiPass",IDC_OPAQUE,"Button",BS_AUTOCHECKBOX |
- WS_TABSTOP,219,127,66,10
- CONTROL "Mask bit",IDC_USEMASK,"Button",BS_AUTOCHECKBOX |
- WS_TABSTOP,219,138,47,10
- CONTROL "Advanced blending",IDC_ADVBLEND,"Button",
- BS_AUTOCHECKBOX | WS_TABSTOP,219,149,76,10
- CONTROL "Scanlines",IDC_USESCANLINES,"Button",BS_AUTOCHECKBOX |
- WS_TABSTOP,11,176,46,10
+ COMBOBOX IDC_OFFSCREEN,78,123,130,64,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ COMBOBOX IDC_FRAMETEX,78,136,130,64,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ COMBOBOX IDC_FRAMEREAD,78,149,130,64,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ CONTROL "Alpha MultiPass",IDC_OPAQUE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,219,127,66,10
+ CONTROL "Mask bit",IDC_USEMASK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,219,138,47,10
+ CONTROL "Advanced blending",IDC_ADVBLEND,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,219,149,76,10
+ CONTROL "Scanlines",IDC_USESCANLINES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,176,46,10
EDITTEXT IDC_SCANBLEND,375,175,29,12,ES_AUTOHSCROLL
- CONTROL "Line mode",IDC_USELINES,"Button",BS_AUTOCHECKBOX |
- WS_TABSTOP,11,186,48,10
- CONTROL "Unfiltered framebuffer updates",IDC_FASTMDEC,"Button",
- BS_AUTOCHECKBOX | WS_TABSTOP,11,196,113,10
- CONTROL "Force 15 bit framebuffer updates",IDC_FASTMDEC2,"Button",
- BS_AUTOCHECKBOX | WS_TABSTOP,11,206,121,10
- CONTROL "Color dithering",IDC_DRAWDITHER,"Button",
- BS_AUTOCHECKBOX | WS_TABSTOP,11,216,81,10
- CONTROL "Screen smoothing",IDC_BLUR,"Button",BS_AUTOCHECKBOX |
- WS_TABSTOP,11,226,81,10
- CONTROL "Disable screensaver",IDC_SSAVE,"Button",BS_AUTOCHECKBOX |
- WS_TABSTOP,11,236,81,10
- CONTROL "Special game fixes",IDC_GAMEFIX,"Button",
- BS_AUTOCHECKBOX | WS_TABSTOP,11,246,75,10
+ CONTROL "Line mode",IDC_USELINES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,186,48,10
+ CONTROL "Unfiltered framebuffer updates",IDC_FASTMDEC,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,196,113,10
+ CONTROL "Force 15 bit framebuffer updates",IDC_FASTMDEC2,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,206,121,10
+ CONTROL "Color dithering",IDC_DRAWDITHER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,216,81,10
+ CONTROL "Screen smoothing",IDC_BLUR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,226,81,10
+ CONTROL "Disable screensaver",IDC_SSAVE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,236,81,10
+ CONTROL "Special game fixes",IDC_GAMEFIX,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,246,75,10
PUSHBUTTON "...",IDC_SELFIX,89,246,11,10,0,WS_EX_STATICEDGE
- PUSHBUTTON "Fast",IDC_DEF1,10,272,34,14
- PUSHBUTTON "Nice",IDC_DEF2,49,272,34,14
- DEFPUSHBUTTON "OK",IDOK,113,272,84,14
- PUSHBUTTON "Cancel",IDCANCEL,215,272,84,14
- PUSHBUTTON "Copy settings\n to clipboard",IDC_CLIPBOARD,322,266,87,
- 25,BS_MULTILINE,WS_EX_STATICEDGE
- GROUPBOX "Misc",IDC_STATIC,3,166,406,95
- GROUPBOX "Default settings",IDC_STATIC,3,262,88,30
+ PUSHBUTTON "Fast",IDC_DEF1,10,282,34,14
+ PUSHBUTTON "Nice",IDC_DEF2,49,282,34,14
+ DEFPUSHBUTTON "OK",IDOK,113,282,84,14
+ PUSHBUTTON "Cancel",IDCANCEL,215,282,84,14
+ PUSHBUTTON "Copy settings\n to clipboard",IDC_CLIPBOARD,322,276,87,25,BS_MULTILINE,WS_EX_STATICEDGE
+ GROUPBOX "Misc",IDC_STATIC,3,166,406,104
+ GROUPBOX "Default settings",IDC_STATIC,3,272,88,30
GROUPBOX "Textures",IDC_STATIC,3,41,406,40
RTEXT "Desktop resolution:",IDC_STATIC,81,12,65,9
GROUPBOX "Resolution && Colors",IDC_STATIC,3,1,406,40
@@ -240,44 +212,28 @@ BEGIN
RTEXT "Window size:",IDC_STATIC,85,26,61,9
CTEXT "x",IDC_STATIC,177,26,8,9
RTEXT "Gfx card vram:",IDC_QUALTXT2,225,65,48,9
- RTEXT "Off-Screen drawing:",IDC_STATIC,11,124,64,10,
- SS_CENTERIMAGE
+ RTEXT "Off-Screen drawing:",IDC_STATIC,11,124,64,10,SS_CENTERIMAGE
RTEXT "Texture filtering:",IDC_STATIC,6,65,52,10
- RTEXT "Framebuffer textures:",IDC_STATIC,7,137,68,10,
- SS_CENTERIMAGE
- LTEXT "Some games will need certain special options to work without glitches",
- IDC_STATIC,135,246,242,9,SS_CENTERIMAGE
- LTEXT "Smoother shading in 16 bit color depth",IDC_STATIC,135,
- 216,242,9,SS_CENTERIMAGE
- LTEXT "Small speed up with mdecs",IDC_STATIC,135,196,242,9,
- SS_CENTERIMAGE
- LTEXT "Polygons will not get filled",IDC_STATIC,135,186,89,9,
- SS_CENTERIMAGE
- LTEXT "TV screen alike lines",IDC_STATIC,135,176,69,9,
- SS_CENTERIMAGE
- LTEXT "Accurate psx color emulation",IDC_STATIC,303,149,97,9,
- SS_CENTERIMAGE
- LTEXT "Correct opaque texture areas",IDC_STATIC,302,127,97,9,
- SS_CENTERIMAGE
- LTEXT "Needed by a few games",IDC_STATIC,302,138,97,9,
- SS_CENTERIMAGE
- RTEXT "Scanline brightness (0...255, -1=Monitor dot matrix):",
- IDC_STATIC,210,176,162,9,SS_CENTERIMAGE
- EDITTEXT IDC_CLPEDIT,314,283,6,12,ES_MULTILINE | ES_AUTOVSCROLL |
- ES_AUTOHSCROLL | NOT WS_VISIBLE
+ RTEXT "Framebuffer textures:",IDC_STATIC,7,137,68,10,SS_CENTERIMAGE
+ LTEXT "Some games will need certain special options to work without glitches",IDC_STATIC,135,246,242,9,SS_CENTERIMAGE
+ LTEXT "Smoother shading in 16 bit color depth",IDC_STATIC,135,216,242,9,SS_CENTERIMAGE
+ LTEXT "Small speed up with mdecs",IDC_STATIC,135,196,242,9,SS_CENTERIMAGE
+ LTEXT "Polygons will not get filled",IDC_STATIC,135,186,89,9,SS_CENTERIMAGE
+ LTEXT "TV screen alike lines",IDC_STATIC,135,176,69,9,SS_CENTERIMAGE
+ LTEXT "Accurate psx color emulation",IDC_STATIC,303,149,97,9,SS_CENTERIMAGE
+ LTEXT "Correct opaque texture areas",IDC_STATIC,302,127,97,9,SS_CENTERIMAGE
+ LTEXT "Needed by a few games",IDC_STATIC,302,138,97,9,SS_CENTERIMAGE
+ RTEXT "Scanline brightness (0...255, -1=Monitor dot matrix):",IDC_STATIC,210,176,162,9,SS_CENTERIMAGE
+ EDITTEXT IDC_CLPEDIT,314,293,6,12,ES_MULTILINE | ES_AUTOVSCROLL | ES_AUTOHSCROLL | NOT WS_VISIBLE
LTEXT "MBytes",IDC_QUALTXT3,340,65,27,9
- LTEXT "The complete screen will get smoothed. Very slow on some cards, lotta vram needed",
- IDC_STATIC,135,226,269,9,SS_CENTERIMAGE
- RTEXT "Framebuffer access:",IDC_STATIC,7,150,68,10,
- SS_CENTERIMAGE
- LTEXT "Disable screensavers and power saving modes. Not available in Win95/WinNT",
- IDC_STATIC,135,236,269,9,SS_CENTERIMAGE
- LTEXT "Speed up with mdecs in 32 bit color depth, but less colorful",
- IDC_T14_STATIC2,135,206,268,9,SS_CENTERIMAGE
+ LTEXT "The complete screen will get smoothed. Very slow on some cards, lotta vram needed",IDC_STATIC,135,226,269,9,SS_CENTERIMAGE
+ RTEXT "Framebuffer access:",IDC_STATIC,7,150,68,10,SS_CENTERIMAGE
+ LTEXT "Disable screensavers and power saving modes. Not available in Win95/WinNT",IDC_STATIC,135,236,269,9,SS_CENTERIMAGE
+ LTEXT "Speed up with mdecs in 32 bit color depth, but less colorful",IDC_T14_STATIC2,135,206,268,9,SS_CENTERIMAGE
RTEXT "Hi-Res textures:",IDC_QUALTXT4,223,52,50,9
- COMBOBOX IDC_VSYNC,261,24,36,64,CBS_DROPDOWNLIST | WS_VSCROLL |
- WS_TABSTOP
+ COMBOBOX IDC_VSYNC,261,24,36,64,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
RTEXT "V-Sync:",IDC_STATIC,219,26,39,9,SS_CENTERIMAGE
+ CONTROL "Gte accuracy",IDC_GTEACCURACY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,256,59,10
END
IDD_FIXES DIALOG DISCARDABLE 0, 0, 316, 322
diff --git a/win32/plugins/peopsxgl/gpuPeopsOpenGL.vcproj b/win32/plugins/peopsxgl/gpuPeopsOpenGL.vcproj
index 0184e090..de479eb9 100644
--- a/win32/plugins/peopsxgl/gpuPeopsOpenGL.vcproj
+++ b/win32/plugins/peopsxgl/gpuPeopsOpenGL.vcproj
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="gb2312"?>
<VisualStudioProject
ProjectType="Visual C++"
- Version="9.00"
+ Version="9,00"
Name="gpuPeopsOpenGL"
ProjectGUID="{726BDE88-F2AD-4666-A4BC-5858F973976E}"
RootNamespace="gpuPeopsOpenGL"
@@ -402,6 +402,14 @@
>
</File>
<File
+ RelativePath="..\..\..\plugins\peopsxgl\gte_accuracy.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\plugins\peopsxgl\gte_accuracy.h"
+ >
+ </File>
+ <File
RelativePath="..\..\..\plugins\peopsxgl\key.h"
>
</File>
@@ -515,6 +523,10 @@
</File>
</Filter>
<File
+ RelativePath=".\res\gpu.bmp"
+ >
+ </File>
+ <File
RelativePath="gpuPeopsOpenGL.def"
>
</File>
diff --git a/win32/plugins/peopsxgl/resource.h b/win32/plugins/peopsxgl/resource.h
index 2a71766b..8d59b103 100644
--- a/win32/plugins/peopsxgl/resource.h
+++ b/win32/plugins/peopsxgl/resource.h
@@ -1,5 +1,5 @@
//{{NO_DEPENDENCIES}}
-// Microsoft Developer Studio generated include file.
+// Microsoft Visual C++ generated include file.
// Used by gpuPeopsOpenGL.rc
//
#define IDS_INFO0 1
@@ -84,6 +84,8 @@
#define IDC_T14_STATIC2 1061
#define IDC_FASTMDEC2 1062
#define IDC_QUALTXT4 1063
+#define IDC_GAMEFIX2 1064
+#define IDC_GTEACCURACY 1065
#define IDC_F14_STATIC3 1083
#define IDC_F14_STATIC4 1084
#define IDC_F14_STATIC5 1085
diff --git a/win32/plugins/peopsxgl/winsrc/cfg.c b/win32/plugins/peopsxgl/winsrc/cfg.c
index ed055e7c..99c29b27 100644
--- a/win32/plugins/peopsxgl/winsrc/cfg.c
+++ b/win32/plugins/peopsxgl/winsrc/cfg.c
@@ -178,6 +178,7 @@ BOOL OnInitCfgDialog(HWND hW) // INIT CONFIG DIALOG
if(bUseFastMdec) CheckDlgButton(hW,IDC_FASTMDEC,TRUE);
if(bUse15bitMdec) CheckDlgButton(hW,IDC_FASTMDEC2,TRUE);
if(bUseFixes) CheckDlgButton(hW,IDC_GAMEFIX,TRUE);
+ if(bGteAccuracy) CheckDlgButton(hW,IDC_GTEACCURACY,TRUE);
if(iUseScanLines) CheckDlgButton(hW,IDC_USESCANLINES,TRUE);
if(iShowFPS) CheckDlgButton(hW,IDC_SHOWFPS,TRUE);
if(bKeepRatio) CheckDlgButton(hW,IDC_ARATIO,TRUE);
@@ -326,6 +327,9 @@ void GetSettings(HWND hW)
if(IsDlgButtonChecked(hW,IDC_GAMEFIX))
bUseFixes=TRUE; else bUseFixes=FALSE;
+ if(IsDlgButtonChecked(hW,IDC_GTEACCURACY))
+ bGteAccuracy=TRUE; else bGteAccuracy=FALSE;
+
if(IsDlgButtonChecked(hW,IDC_USESCANLINES))
iUseScanLines=1; else iUseScanLines=0;
@@ -607,6 +611,7 @@ void ReadConfig(void) // read all config vals
bUse15bitMdec=FALSE;
dwCfgFixes=0;
bUseFixes=FALSE;
+ bGteAccuracy=FALSE;
iUseScanLines=0;
iFrameTexType=0;
iFrameReadType=0;
@@ -706,6 +711,9 @@ void ReadConfig(void) // read all config vals
if(RegQueryValueEx(myKey,"UseFixes",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS)
bUseFixes=(BOOL)temp;
size = 4;
+ if(RegQueryValueEx(myKey,"GteAccuracy",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS)
+ bGteAccuracy=(BOOL)temp;
+ size = 4;
if(RegQueryValueEx(myKey,"UseMask",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS)
iUseMask=(int)temp;
size = 4;
@@ -741,6 +749,7 @@ void ReadConfig(void) // read all config vals
size = 4;
if(RegQueryValueEx(myKey,"NoScreenSaver",0,&type,(LPBYTE)&temp,&size)==ERROR_SUCCESS)
iNoScreenSaver=(int)temp;
+
size=7;
RegQueryValueEx(myKey,"GPUKeys",0,&type,(LPBYTE)&szGPUKeys,&size);
@@ -847,6 +856,8 @@ void WriteConfig(void)
RegSetValueEx(myKey,"CfgFixes",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp));
temp=bUseFixes;
RegSetValueEx(myKey,"UseFixes",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp));
+ temp=bGteAccuracy;
+ RegSetValueEx(myKey,"GteAccuracy",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp));
temp=iUseMask;
RegSetValueEx(myKey,"UseMask",0,REG_DWORD,(LPBYTE) &temp,sizeof(temp));
temp=bUseFastMdec;