summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorSND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2010-06-29 12:43:20 +0000
committerSND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2010-06-29 12:43:20 +0000
commitd990e3b4440607521be8d79df828f2c50449bd6e (patch)
tree361843be33c7c4cfdd840d94ef02b4125fbdc791 /plugins
parent3e6470958953dd45ef15fb7c6cf6302084ec2013 (diff)
downloadpcsxr-d990e3b4440607521be8d79df828f2c50449bd6e.tar.gz
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@53840 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'plugins')
-rw-r--r--plugins/dfxvideo/externals.h1
-rw-r--r--plugins/dfxvideo/gpu.c30
-rw-r--r--plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade233
-rw-r--r--plugins/dfxvideo/gpucfg-0.1df/main.c4
-rw-r--r--plugins/dfxvideo/prim.c13
5 files changed, 67 insertions, 14 deletions
diff --git a/plugins/dfxvideo/externals.h b/plugins/dfxvideo/externals.h
index e2cdba09..2c29faf2 100644
--- a/plugins/dfxvideo/externals.h
+++ b/plugins/dfxvideo/externals.h
@@ -206,6 +206,7 @@ extern unsigned short usMirror;
extern int iDither;
extern uint32_t dwCfgFixes;
extern uint32_t dwActFixes;
+extern uint32_t dwEmuFixes;
extern int iUseFixes;
extern int iUseDither;
extern BOOL bDoVSyncUpdate;
diff --git a/plugins/dfxvideo/gpu.c b/plugins/dfxvideo/gpu.c
index b5addb98..7dd359ff 100644
--- a/plugins/dfxvideo/gpu.c
+++ b/plugins/dfxvideo/gpu.c
@@ -105,7 +105,8 @@ PSXDisplay_t PreviousPSXDisplay;
long lSelectedSlot=0;
BOOL bChangeWinMode=FALSE;
BOOL bDoLazyUpdate=FALSE;
-uint32_t lGPUInfoVals[16];
+uint32_t lGPUInfoVals[16];
+static int iFakePrimBusy=0;
////////////////////////////////////////////////////////////////////////
// some misc external display funcs
@@ -824,14 +825,29 @@ uint32_t CALLBACK GPUreadStatus(void) // READ STATUS
{
if(dwActFixes&1)
{
- static int iNumRead=0; // odd/even hack
+ static int iNumRead=0; // odd/even hack
if((iNumRead++)==2)
{
iNumRead=0;
- lGPUstatusRet^=0x80000000; // interlaced bit toggle... we do it on every 3 read status... needed by some games (like ChronoCross) with old epsxe versions (1.5.2 and older)
+ lGPUstatusRet^=0x80000000; // interlaced bit toggle... we do it on every 3 read status... needed by some games (like ChronoCross) with old epsxe versions (1.5.2 and older)
}
}
+ if(iFakePrimBusy) // 27.10.2007 - PETE : emulating some 'busy' while drawing... pfff
+ {
+ iFakePrimBusy--;
+
+ if(iFakePrimBusy&1) // we do a busy-idle-busy-idle sequence after/while drawing prims
+ {
+ GPUIsBusy;
+ GPUIsNotReadyForCommands;
+ }
+ else
+ {
+ GPUIsIdle;
+ GPUIsReadyForCommands;
+ }
+ }
return lGPUstatusRet;
}
@@ -1386,7 +1402,8 @@ ENDVRAM:
{
gpuDataC=gpuDataP=0;
primFunc[gpuCommand]((unsigned char *)gpuDataM);
- }
+ if(dwEmuFixes&0x0001 || dwActFixes&0x0400) // hack for emulating "gpu busy" in some games
+ iFakePrimBusy=4; }
}
}
@@ -1929,4 +1946,7 @@ void CALLBACK GPUshowScreenPic(unsigned char * pMem)
CreatePic(pMem); // create new pic... don't free pMem or something like that... just read from it
}
-////////////////////////////////////////////////////////////////////////
+void CALLBACK GPUsetfix(uint32_t dwFixBits)
+{
+ dwEmuFixes=dwFixBits;
+}
diff --git a/plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2 b/plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2
index e2ef18a5..a4f9d68c 100644
--- a/plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2
+++ b/plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2
@@ -356,7 +356,7 @@
<child>
<widget class="GtkTable" id="table_fixes">
<property name="visible">True</property>
- <property name="n_rows">10</property>
+ <property name="n_rows">11</property>
<property name="n_columns">2</property>
<property name="column_spacing">16</property>
<child>
@@ -665,6 +665,37 @@
<property name="y_options"></property>
</packing>
</child>
+ <child>
+ <widget class="GtkCheckButton" id="checkFix11">
+ <property name="label" translatable="yes">Fake 'gpu busy' states</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ <packing>
+ <property name="top_attach">10</property>
+ <property name="bottom_attach">11</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label1">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Toggle busy flags after drawing</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">10</property>
+ <property name="bottom_attach">11</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
</widget>
</child>
</widget>
diff --git a/plugins/dfxvideo/gpucfg-0.1df/main.c b/plugins/dfxvideo/gpucfg-0.1df/main.c
index 67432e02..c12cceba 100644
--- a/plugins/dfxvideo/gpucfg-0.1df/main.c
+++ b/plugins/dfxvideo/gpucfg-0.1df/main.c
@@ -274,7 +274,7 @@ main (int argc, char *argv[])
val = atoi(p + len);
}
- for (i=0; i<10; i++)
+ for (i=0; i<11; i++)
{
sprintf(tempstr, "checkFix%d", i+1);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (glade_xml_get_widget (xml, tempstr)), (val>>i)&1 );
@@ -399,7 +399,7 @@ void SaveConfig(GtkWidget *widget, gpointer user_data)
val = 0;
- for (i=0; i<10; i++)
+ for (i=0; i<11; i++)
{
sprintf(tempstr, "checkFix%d", i+1);
if( gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (glade_xml_get_widget (xml, tempstr))) )
diff --git a/plugins/dfxvideo/prim.c b/plugins/dfxvideo/prim.c
index 4ffa5214..097f202e 100644
--- a/plugins/dfxvideo/prim.c
+++ b/plugins/dfxvideo/prim.c
@@ -32,12 +32,13 @@ TWin_t TWin;
//unsigned long clutid; // global clut
unsigned short usMirror=0; // sprite mirror
int iDither=0;
-int32_t drawX;
-int32_t drawY;
-int32_t drawW;
-int32_t drawH;
-uint32_t dwCfgFixes;
-uint32_t dwActFixes=0;
+int32_t drawX;
+int32_t drawY;
+int32_t drawW;
+int32_t drawH;
+uint32_t dwCfgFixes;
+uint32_t dwActFixes=0;
+uint32_t dwEmuFixes=0;
int iUseFixes;
int iUseDither=0;
BOOL bDoVSyncUpdate=FALSE;