My favorites | Sign in
Project Home Downloads Wiki Issues Source
Repository:
Checkout   Browse   Changes   Clones  
Revision: c46e00654c3c
Author:  skidau <skidau>
Date:  May 28, 2012
Committer:  skidau <skidau>
Commit Date:  May 28, 2012
Review scores:
+6 
 
Positive:
rdrag...@optonline.net,
KrossX3,
hatarumo...@hotmail.com,
captg...@hotmail.com,
William7...@live.com,
kostamar...@gmail.com
Neutral:
f3r....@gmail.com
 

Log message

Removed the speed hack for invalidating paletted textures.  Fixes the mini-map
in the GC version of ZTP.
Created a separate case for EFB to Texture with the same behaviour as the old
system.  Fixes the issues found with that option like the blurred screen in
Pandora's Tower and the missing outline in DBZBT3.

Affected files

    expand all   collapse all
Modify/Source/Core/VideoCommon/Src/TextureCacheBase.cppdiff
Comment by project member skidau, May 28, 2012
Test build:

http://www.mediafire.com/file/4eceb5bzbhg2rtp/Dolphin-Hashless-686-Win32.zip
http://www.mediafire.com/file/wq2x82a818fbtjs/Dolphin-Hashless-686-x64.zip

Comment by KrossX3, May 28, 2012
Files blocked for ToS violation... WUT?! O.o
Comment by KrossX3, May 28, 2012
Weird black things on LostWinds and the missing shadows in Tales of Graces are fixed. =D
Comment by f3r....@gmail.com, May 28, 2012
The minimap pointer in ZTP wii it's ok now and Pandora Tower bluriness is also fixed, only tested these two.
Comment by cloud101...@gmail.com, May 28, 2012
Pandora Tower blur & missing text is fixed.
But occasionally super lag (freeze > 3 sec) from time to time.
Comment by project member skidau, May 28, 2012
For the mediafire links above, copy the URL to the clipboard and manually paste it into the address bar of the browser.  Clicking the link directly will show the Terms of Service page.
Comment by captg...@hotmail.com, May 28, 2012
Looks like the problems i mentioned with Mario Kart DD, Pikmin 2 and Metroid Prime are all fixed. Phantasy Star Online 1&2 still has missing text where master does not.
Comment by William7...@live.com, May 29, 2012


Comment by project member kostamar...@gmail.com, May 29, 2012
A shadow's tale still has problem with the shadows (efb to ram issue). ZTP has issue with the map(the mini map is fixed btw), when you zoom in it flickers all over the screen. In pokepark2 i am getting a failed to compile pixel shader error when entering gameplay.
//Pixel Shader for TEV stages
//11 TEV stages, 7 texgens, XXX IND stages
uniform sampler2D  samp0 : register(s0), samp1 : register(s1), samp2 : register(s2), samp3 : register(s3), samp4 : register(s4), samp5 : register(s5), samp6 : register(s6), samp7 : register(s7);

uniform float4 color[4] : register(c0);
uniform float4 k[4] : register(c4);
uniform float4 alphaRef[1] : register(c8);
uniform float4 texdim[8] : register(c9);
uniform float4 czbias[2] : register(c17);
uniform float4 cindscale[2] : register(c19);
uniform float4 cindmtx[6] : register(c21);
uniform float4 cfog[3] : register(c27);
typedef struct { float4 col; float4 cosatt; float4 distatt; float4 pos; float4 dir; } Light;
typedef struct { Light lights[8]; } s_cLights;
uniform s_cLights cLights : register(c30);
typedef struct { float4 C0, C1, C2, C3; } s_cmtrl;
uniform s_cmtrl cmtrl : register(c70);
void main(
  out float4 ocol0 : COLOR0,
  in float4 rawpos : VPOS,
  in float4 colors_0 : COLOR0,
  in float4 colors_1 : COLOR1,
  in float4 uv0 : TEXCOORD0,
  in float4 uv1 : TEXCOORD1,
  in float4 uv2 : TEXCOORD2,
  in float4 uv3 : TEXCOORD3,
  in float4 uv4 : TEXCOORD4,
  in float4 uv5 : TEXCOORD5,
  in float4 uv6 : TEXCOORD6        ) {
float zCoord = czbias[1].x + (uv2.w / uv3.w) * czbias[1].y;
  float4 c0 = color[1], c1 = color[2], c2 = color[3], prev = float4(0.0f, 0.0f, 0.0f, 0.0f), textemp = float4(0.0f, 0.0f, 0.0f, 0.0f), rastemp = float4(0.0f, 0.0f, 0.0f, 0.0f), konsttemp = float4(0.0f, 0.0f, 0.0f, 0.0f);
  float3 comp16 = float3(1.0f, 255.0f, 0.0f), comp24 = float3(1.0f, 255.0f, 255.0f*255.0f);
  float4 alphabump=float4(0.0f,0.0f,0.0f,0.0f);
  float3 tevcoord=float3(0.0f, 0.0f, 0.0f);
  float2 wrappedcoord=float2(0.0f,0.0f), tempcoord=float2(0.0f,0.0f);
  float4 cc0=float4(0.0f,0.0f,0.0f,0.0f), cc1=float4(0.0f,0.0f,0.0f,0.0f);
  float4 cc2=float4(0.0f,0.0f,0.0f,0.0f), cprev=float4(0.0f,0.0f,0.0f,0.0f);
  float4 crastemp=float4(0.0f,0.0f,0.0f,0.0f),ckonsttemp=float4(0.0f,0.0f,0.0f,0.0f);

  float3 _norm0 = normalize(float3(uv4.w,uv5.w,uv6.w));

float3 pos = float3(uv0.w,uv1.w,uv7.w);
float4 mat, lacc;
float3 ldir, h;
float dist, dist2, attn;
{
mat = cmtrl.C2;
lacc = cmtrl.C0;
lacc.w = 1.0f;
ldir = cLights.lights[0].pos.xyz - pos.xyz;
dist2 = dot(ldir, ldir);
dist = sqrt(dist2);
ldir = ldir / dist;
attn = max(0.0f, dot(ldir, cLights.lights[0].dir.xyz));
attn = max(0.0f, dot(cLights.lights[0].cosatt.xyz, float3(1.0f, attn, attn*attn))) / dot(cLights.lights[0].distatt.xyz, float3(1.0f,dist,dist2));
lacc.xyz += attn * max(0.0f,dot(ldir, _norm0)) * cLights.lights[0].col.xyz;

ldir = cLights.lights[1].pos.xyz - pos.xyz;
dist2 = dot(ldir, ldir);
dist = sqrt(dist2);
ldir = ldir / dist;
attn = max(0.0f, dot(ldir, cLights.lights[1].dir.xyz));
attn = max(0.0f, dot(cLights.lights[1].cosatt.xyz, float3(1.0f, attn, attn*attn))) / dot(cLights.lights[1].distatt.xyz, float3(1.0f,dist,dist2));
lacc.xyz += attn * max(0.0f,dot(ldir, _norm0)) * cLights.lights[1].col.xyz;

ldir = cLights.lights[2].pos.xyz - pos.xyz;
dist2 = dot(ldir, ldir);
dist = sqrt(dist2);
ldir = ldir / dist;
attn = max(0.0f, dot(ldir, cLights.lights[2].dir.xyz));
attn = max(0.0f, dot(cLights.lights[2].cosatt.xyz, float3(1.0f, attn, attn*attn))) / dot(cLights.lights[2].distatt.xyz, float3(1.0f,dist,dist2));
lacc.xyz += attn * max(0.0f,dot(ldir, _norm0)) * cLights.lights[2].col.xyz;

colors_0 = mat * saturate(lacc);
}
float4 clipPos = float4(rawpos.x, rawpos.y, uv2.w, uv3.w);
uv0.xy = uv0.xy * texdim[0].zw;
uv1.xy = uv1.xy * texdim[1].zw;
uv2.xy = uv2.xy * texdim[2].zw;
uv3.xy = uv3.xy * texdim[3].zw;
uv4.xy = uv4.xy * texdim[4].zw;
uv5.xy = uv5.xy * texdim[5].zw;
uv6.xy = uv6.xy * texdim[6].zw;
// TEV stage 0
textemp = float4(1.0f, 1.0f, 1.0f, 1.0f);
konsttemp = float4(k[1].aaa, k[0].a);
ckonsttemp = frac(konsttemp * (255.0f/256.0f)) * (256.0f/255.0f);
// color combine
c0.rgb = saturate((ckonsttemp.rgb));
// alpha combine
prev.a = saturate(prev.a+float4(0.0f, 0.0f, 0.0f, 0.0f).a);

// TEV done
// TEV stage 1
textemp = float4(1.0f, 1.0f, 1.0f, 1.0f);
konsttemp = float4(k[0].rgb, k[0].a);
ckonsttemp = frac(konsttemp * (255.0f/256.0f)) * (256.0f/255.0f);
cc0 = frac(c0 * (255.0f/256.0f)) * (256.0f/255.0f);
// color combine
c1.rgb = saturate((konsttemp.rgb)+float3(0.5f, 0.5f, 0.5f)*(float3(1.0f, 1.0f, 1.0f)-(cc0.rgb)));
// alpha combine
prev.a = saturate(prev.a+float4(0.0f, 0.0f, 0.0f, 0.0f).a);

// TEV done
// TEV stage 2
tevcoord.xy = uv1.xy;
textemp=tex2D(samp1,tevcoord.xy * texdim[1].xy).rgba;
konsttemp = float4(k[0].rgb, k[3].a);
ckonsttemp = frac(konsttemp * (255.0f/256.0f)) * (256.0f/255.0f);
// color combine
c0.rgb = saturate((konsttemp.rgb)+float3(0.5f, 0.5f, 0.5f)*(float3(1.0f, 1.0f, 1.0f)-(textemp.rgb)));
// alpha combine
prev.a = saturate(textemp.a*ckonsttemp.a);

// TEV done
// TEV stage 3
tevcoord.xy = uv6.xy;
textemp=tex2D(samp6,tevcoord.xy * texdim[6].xy).rgba;
cc0 = frac(c0 * (255.0f/256.0f)) * (256.0f/255.0f);
cc1 = frac(c1 * (255.0f/256.0f)) * (256.0f/255.0f);
// color combine
c0.rgb = saturate(lerp((cc1.rgb), (cc0.rgb), (textemp.rgb)));
// alpha combine
prev.a = saturate(prev.a+float4(0.0f, 0.0f, 0.0f, 0.0f).a);

// TEV done
// TEV stage 4
tevcoord.xy = uv2.xy;
textemp=tex2D(samp2,tevcoord.xy * texdim[2].xy).rgba;
konsttemp = float4(k[2].rgb, k[3].g);
ckonsttemp = frac(konsttemp * (255.0f/256.0f)) * (256.0f/255.0f);
cc0 = frac(c0 * (255.0f/256.0f)) * (256.0f/255.0f);
// color combine
c0.rgb = saturate(lerp((cc0.rgb), (ckonsttemp.rgb), (textemp.rgb)));
// alpha combine
prev.a = saturate(prev.a+textemp.a*ckonsttemp.a);

// TEV done
// TEV stage 5
tevcoord.xy = uv3.xy;
textemp=tex2D(samp3,tevcoord.xy * texdim[3].xy).rgba;
konsttemp = float4(k[1].rgb, k[0].a);
ckonsttemp = frac(konsttemp * (255.0f/256.0f)) * (256.0f/255.0f);
cc0 = frac(c0 * (255.0f/256.0f)) * (256.0f/255.0f);
// color combine
c0.rgb = saturate(lerp((ckonsttemp.rgb), (cc0.rgb), (textemp.rgb)));
// alpha combine
prev.a = saturate(prev.a+float4(0.0f, 0.0f, 0.0f, 0.0f).a);

// TEV done
// TEV stage 6
tevcoord.xy = uv4.xy;
textemp=tex2D(samp4,tevcoord.xy * texdim[4].xy).rgba;
konsttemp = float4(k[2].rgb, k[0].a);
ckonsttemp = frac(konsttemp * (255.0f/256.0f)) * (256.0f/255.0f);
cc0 = frac(c0 * (255.0f/256.0f)) * (256.0f/255.0f);
// color combine
c0.rgb = saturate(lerp((ckonsttemp.rgb), (cc0.rgb), (textemp.rgb)));
// alpha combine
prev.a = saturate(prev.a+float4(0.0f, 0.0f, 0.0f, 0.0f).a);

// TEV done
// TEV stage 7
tevcoord.xy = uv5.xy;
textemp=tex2D(samp5,tevcoord.xy * texdim[5].xy).rgba;
konsttemp = float4(k[3].rgb, k[0].a);
ckonsttemp = frac(konsttemp * (255.0f/256.0f)) * (256.0f/255.0f);
cc0 = frac(c0 * (255.0f/256.0f)) * (256.0f/255.0f);
// color combine
c0.rgb = saturate(lerp((ckonsttemp.rgb), (cc0.rgb), (textemp.rgb)));
// alpha combine
prev.a = saturate(prev.a+float4(0.0f, 0.0f, 0.0f, 0.0f).a);

// TEV done
// TEV stage 8
tevcoord.xy = uv0.xy;
textemp=tex2D(samp0,tevcoord.xy * texdim[0].xy).rgba;
cc2 = frac(c2 * (255.0f/256.0f)) * (256.0f/255.0f);
// color combine
c1.rgb = saturate((textemp.rgb)*(cc2.rgb));
// alpha combine
prev.a = saturate(prev.a+float4(0.0f, 0.0f, 0.0f, 0.0f).a);

// TEV done
// TEV stage 9
textemp = float4(1.0f, 1.0f, 1.0f, 1.0f);
cc0 = frac(c0 * (255.0f/256.0f)) * (256.0f/255.0f);
cc1 = frac(c1 * (255.0f/256.0f)) * (256.0f/255.0f);
// color combine
prev.rgb = saturate(2.0f*((cc0.rgb)*(cc1.rgb)));
// alpha combine
prev.a = saturate(prev.a+float4(0.0f, 0.0f, 0.0f, 0.0f).a);

// TEV done
// TEV stage 10
rastemp = colors_0.rgba;
crastemp = frac(rastemp * (255.0f/256.0f)) * (256.0f/255.0f);
textemp = float4(1.0f, 1.0f, 1.0f, 1.0f);
cprev = frac(prev * (255.0f/256.0f)) * (256.0f/255.0f);
// color combine
c0.rgb = saturate((crastemp.rgb)*(cprev.rgb));
// alpha combine
prev.a = saturate(crastemp.a*cprev.a);

// TEV done
prev.rgb = c0.rgb;
prev.a = prev.a;
prev = frac(4.0f + prev * (255.0f/256.0f)) * (256.0f/255.0f);
  float ze = cfog[1].x / (cfog[1].y - (zCoord / cfog[1].w));
  float fog = saturate(ze - cfog[1].z);
  fog = 1.0f - pow(2.0f, -8.0f * fog * fog);
  prev.rgb = lerp(prev.rgb,cfog[0].rgb,fog);
  ocol0 = prev;
}

Comment by project member skidau, May 29, 2012
kosta, would you please try enabling real XFB at the part where it flickers?

I am continuing to look into the other issues.  Thanks for all of the reports, everyone.  Much appreciated.
Comment by project member kostamar...@gmail.com, May 29, 2012
The map flickers and moves all around the screen when you zoom in (right, left, up, down), without being stable at a certain point (i suppose i didn't explained it correctly, you should probably try it yourself to understand :-/). Real xfb doesn't help.
Comment by f3r....@gmail.com, May 29, 2012
cloud101 the lag that you mention is the when the emulator is clearing the code cache and in The Last Story is even worst. At least in my pc it is about 15 sec lag. the first time it happened I thought that the emulation has halted but then I figured out that was due to clearing code cache.

Sign in to write a code review
Powered by Google Project Hosting