GSdx
(02-08-2013, 11:44 AM)KrossX Wrote: So, I finished Xenosaga Ep1 and some texture edge bug was annoying me, but meh. I started playing Episode 2 and finally made a GS snap to mess around with. Found a thread about it (oddly enough with a shot at the same place I took it) HERE. Gs snap HERE.

[Image: gsdx_20120425015236.jpg]
(using that thread's image while at it, cuz I'm lazy Tongue )

I've traced it to tfx.fx:244, but I'm too sleepy to do anything about it. The d3d9 part is fine as it doesn't show the issue. The line doesn't seem to have been touched in the... googlecode history, the other wrapps have seen a fix or two though.

Code:
uv = (float4)(((int4)(uv * WH.xyxy) & MskFix.xyxy) | MskFix.zwzw) / WH.xyxy; // <<<<<<<====== EVIL!!

Code:
float4 wrapuv(float4 uv)
{
    if(PS_WMS == PS_WMT)
    {
/*
        if(PS_WMS == 0)
        {
            uv = frac(uv);
        }
        else if(PS_WMS == 1)
        {
            uv = saturate(uv);
        }
        else
*/
        if(PS_WMS == 2)
        {
            uv = clamp(uv, MinMax.xyxy, MinMax.zwzw);
        }
        else if(PS_WMS == 3)
        {
            #if SHADER_MODEL >= 0x400
            uv = (float4)(((int4)(uv * WH.xyxy) & MskFix.xyxy) | MskFix.zwzw) / WH.xyxy; // <<<<<<<====== EVIL!!
            #elif SHADER_MODEL <= 0x300
            uv.x = tex1D(UMSKFIX, uv.x);
            uv.y = tex1D(VMSKFIX, uv.y);
            uv.z = tex1D(UMSKFIX, uv.z);
            uv.w = tex1D(VMSKFIX, uv.w);
            #endif
        }
    }
    else

#EDIT: Perhaps it's a Radeon thing? If someone with an nVIDIA could check the gs_snap, that would be nice.

#EDIT2: Hackzoring... Screenshot

Code:
uv = (float4)(((int4)(uv * WH.xyxy) & MskFix.xyxy) | MskFix.zwzw) / WH.xyxy;
uv.w = uv.y;

There, evil edge lines are gone. Side effect, there's no filtering in that direction now. Biggrin

#EDIT3: Hackzoring 2... Screenshot

Code:
uv.yw += -1.0f / WH.y;
uv = (float4)(((int4)(uv * WH.xyxy) & MskFix.xyxy) | MskFix.zwzw) / WH.xyxy;

This one works nicely. Smile

Are we talking about the lines around the hair? cause Xenosaga had same issue. Would love have that fixed. It by no means a game breaking but it is a eyesore
Nvidia gpu here. DX11 render too
Reply

Sponsored links

Yup, exactly that. That's a hack however, not a propa'fix. Works for me though, so me be happy. Tongue
[Image: nbKSK.jpg]
Reply
Another hackfix! Persona 3 minimap. Screenshot. Smile

Code:
tfx.fx:308

float2 clampuv(float2 uv)
{
    if(PS_WMT == 1 && PS_WMT == 1)
    {
        uv = uv - 0.5/WH.xy; // Hackfix
    }    
    else if(PS_WMS == 2 && PS_WMT == 2)
    {
        uv = clamp(uv, MinF, MinMax.zw);
    }

Half texel issue?
Attached patch for Xenosaga and Persona hackfixes.

#EDIT: It's float2 not float4. Wacko


Attached Files
.zip   Xenosaga_Persona_3.zip (Size: 586 bytes / Downloads: 154)
[Image: nbKSK.jpg]
Reply
The hack results in something very similar to the Wild Arms offset hack. It may work a bit better though, very interesting Smile
Reply
Yup, magic text coords again. XD

Non enclosed Persona 3 hackfix messes up some post processing, so better use option 2 under if. Patch updated.
[Image: nbKSK.jpg]
Reply
Hmm, now you've made it specific to Persona 3. I found the general version more interesting Tongue2
The first version (with uv = uv - 0.5/WH.xyWink helps a lot of games that also like the Wild Arms hack.
Check Disgaea Tongue2
Reply
Problem is, it made the Tales-Abyss post processing to have some bad offset. And then makes the offset hack worsen it. XD

I suppose it could replace the WildArms hack, and be renamed to "ST Half Texel" perhaps?

#EDIT: WildArms hack is still better for, Wild Arms at least. Noticeable at higher internal resolution.
[Image: nbKSK.jpg]
Reply
Alright! Xenosaga + Persona3 patches added to Hacks GUI and all.

Binary + Patch for those them daredevils. Patch is also attached. Note: It's a VS2012 build, so you might need them runtimes.

Persona 3's hack was moved to here:

Code:
    if(!PS_FST)
    {
        st /= q;
    }
+    
+    #if PS_STHALFTEXEL
+    st += - 0.5/WH.xy; // Hackfix, fixes Persona 3 minimap
+    #endif

Now it should be generic enough for rama. Tongue


Attached Files
.zip   Xenosaga_Persona_GUI_Patch.zip (Size: 3,13 KB / Downloads: 126)
[Image: nbKSK.jpg]
Reply
Since the topic is over hacks, I messed a bit with Steambot Chronicles
Code:
        if(fi.TME && fi.TPSM == PSM_PSMCT16S)
        {
            if(fi.FBP == 0x1180)
            {
                skip=1;//1 deletes some of the glitched effects
            }
            else if(fi.FBP == 0)
            {
                skip=100;//deletes most others(too high deletes the buggy sea completely;c, too low causes glitches to be visible)
            }
            else if(g_aggressive && fi.FBP != 0)//Agressive CRC
            {
                skip=19;//"speedhack", makes the game very light, vaporized water can disappear when not looked at directly, possibly some interface still, other value to try: 6 breaks menu background, possibly nothing(?) during gameplay, but it's slower, hence not much of a speedhack anymore
            }
        }
Note: If you use GSdx feature - dynamic CRC to test this, delete "g_aggressive && " couse it doesn't support that command;p, and then disable skip=21; if you want to test the fix without speedhack(as like noted below it's not perfect), need somewhat badass hardware without it through;c.

Like all skipdraw "fixes"(;p), this isn't perfect, sea water has some greenish colors(other water around seems to be normal), some light and shadow effects are also cut off. But otherwise it seems to be ok, at least no awfull, colorfull lines which caused even more of a slowdown and for those who prefer upscalling(or have crappy pc) vs proper fx maybe even better.

This game totally hates VU cycle stealing(same can be said for frameskip, at least for the menus), but loves MTvu and with agressive CRC it works at full speed even on my crappy AMD cpu. Not gonna post a build couse there's no database of crc for this game anyway and would only work for people having same crc as mine(0x9F391882/ntsc-u in case anyone tests and decides to commit it;p). @_@


Update:
Fixed the mountain shadow, also the agressive one destroyed menu earlier, fixed as well, still cannot do anything about greenish(not totally green anyway) water in the sea, everywhere else I saw seem to be normal it seems to be same with skipdraw off anyway(at least from what can one see through the glitches;]), agressive CRC can cause some parts of the interface or text dissappear(mostly gray color under left arm;p) , but it's rare, doesn't bother much seeing the speedgain it gives;p, smaller values could fix it, but it would also rise requirements by alot.

Another update, some changes to skip values, for the most part it seems optimal already ~ details in code comments, now I'll have to actually play it for testing, but feel lazy on playing games lately, if anyone is interested in this game and wants to test, post your game crc and I'll send you a GSdx build with that hackfix. Make note, this game even with this agressive crc "speedhack" is still medicore heavy game, and needs probably around 3ghz of intel icore cpu and decent gpu in pair for somewhat stable full fps with upscalling.

Edit:
some screenies to compare:

Software
   


Hardware + skipdraw + agressive crc(doesn't differ here from non agressive except for fps)
   


Hardware no hacks
   

=============================

@KrossX +1;p, haven't had time to check for any game which those improves yet, but two more checkboxes to mess around when things aren't working are always nice to see;p
Reply
(02-10-2013, 04:28 AM)KrossX Wrote: Alright! Xenosaga + Persona3 patches added to Hacks GUI and all.

Binary + Patch for those them daredevils. Patch is also attached. Note: It's a VS2012 build, so you might need them runtimes.

Persona 3's hack was moved to here:

Code:
    if(!PS_FST)
    {
        st /= q;
    }
+    
+    #if PS_STHALFTEXEL
+    st += - 0.5/WH.xy; // Hackfix, fixes Persona 3 minimap
+    #endif

Now it should be generic enough for rama. Tongue



Kudos on the fix that bug in the hair annoyed me, now the Xenosaga games run perfectly full speed other then the completely random slow down for about 3 seconds that goes right back to full speed after that. Was never able to fiqure what cause that 3 second random slow down wither
Reply




Users browsing this thread: 3 Guest(s)