summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorSND\edgbla_cp <SND\edgbla_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2010-05-08 18:25:22 +0000
committerSND\edgbla_cp <SND\edgbla_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2010-05-08 18:25:22 +0000
commitf6c65d2ead2dcce0c19659c1aedd79bf4bf6c511 (patch)
tree3213444f4fdaf0a1457ccde24caf341025900e05 /plugins
parent85cb5305c337de06976d1a3257864a3ee05ec50a (diff)
downloadpcsxr-f6c65d2ead2dcce0c19659c1aedd79bf4bf6c511.tar.gz
dfxvideo: Dithering logic was fixed. (Final Fantasy 9)
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@47647 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'plugins')
-rw-r--r--plugins/dfxvideo/gpucfg-0.1df/main.c4
-rw-r--r--plugins/dfxvideo/prim.c39
2 files changed, 23 insertions, 20 deletions
diff --git a/plugins/dfxvideo/gpucfg-0.1df/main.c b/plugins/dfxvideo/gpucfg-0.1df/main.c
index 83d00327..67432e02 100644
--- a/plugins/dfxvideo/gpucfg-0.1df/main.c
+++ b/plugins/dfxvideo/gpucfg-0.1df/main.c
@@ -182,7 +182,7 @@ main (int argc, char *argv[])
val=0;
if(pB)
{
- strcpy(t,"\nUseDither");p=strstr(pB,t);if(p) {p=strstr(p,"=");len=1;}
+ strcpy(t,"\nDithering");p=strstr(pB,t);if(p) {p=strstr(p,"=");len=1;}
val = set_limit (p, len, 0, 2);
}
@@ -370,7 +370,7 @@ void SaveConfig(GtkWidget *widget, gpointer user_data)
SetCfgVal(pB,"\nNoStretch",val);
val = gtk_combo_box_get_active (GTK_COMBO_BOX (glade_xml_get_widget (xml, "ditherCombo2")));
- SetCfgVal(pB,"\nUseDither",val);
+ SetCfgVal(pB,"\nDithering",val);
val = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (glade_xml_get_widget (xml, "maintain43")));
SetCfgVal(pB,"\nMaintain43",val);
diff --git a/plugins/dfxvideo/prim.c b/plugins/dfxvideo/prim.c
index 48226a70..0dfc08a6 100644
--- a/plugins/dfxvideo/prim.c
+++ b/plugins/dfxvideo/prim.c
@@ -77,12 +77,7 @@ __inline void UpdateGlobalTP(unsigned short gdata)
GlobalTextABR = (unsigned short)((gdata >> 7) & 0x3);
GlobalTextTP = (gdata >> 9) & 0x3;
if(GlobalTextTP==3) GlobalTextTP=2;
- usMirror =0;
lGPUstatusRet = (lGPUstatusRet & 0xffffe000 ) | (gdata & 0x1fff );
-
- // tekken dithering? right now only if dithering is forced by user
- if(iUseDither==2) iDither=2; else iDither=0;
-
return;
}
else
@@ -92,25 +87,28 @@ __inline void UpdateGlobalTP(unsigned short gdata)
}
else GlobalTextAddrY = (gdata << 4) & 0x100;
- usMirror=gdata&0x3000;
-
- if(iUseDither==2)
- {
- iDither=2;
- }
- else
- {
- if(gdata&200) iDither=iUseDither; else iDither=0;
- }
-
GlobalTextTP = (gdata >> 7) & 0x3; // tex mode (4,8,15)
if(GlobalTextTP==3) GlobalTextTP=2; // seen in Wild9 :(
GlobalTextABR = (gdata >> 5) & 0x3; // blend mode
- lGPUstatusRet&=~0x07ff; // Clear the necessary bits
- lGPUstatusRet|=(gdata & 0x07ff); // set the necessary bits
+ lGPUstatusRet&=~0x000001ff; // Clear the necessary bits
+ lGPUstatusRet|=(gdata & 0x01ff); // set the necessary bits
+
+ switch(iUseDither)
+ {
+ case 0:
+ iDither=0;
+ break;
+ case 1:
+ if(lGPUstatusRet&0x0200) iDither=2;
+ else iDither=0;
+ break;
+ case 2:
+ iDither=2;
+ break;
+ }
}
////////////////////////////////////////////////////////////////////////
@@ -381,6 +379,11 @@ void cmdTexturePage(unsigned char * baseAddr)
{
uint32_t gdata = GETLE32(&((uint32_t*)baseAddr)[0]);
+ lGPUstatusRet&=~0x000007ff;
+ lGPUstatusRet|=(gdata & 0x07ff);
+
+ usMirror=gdata&0x3000;
+
UpdateGlobalTP((unsigned short)gdata);
GlobalTextREST = (gdata&0x00ffffff)>>9;
}