..:: PCSX2 Forums ::..

Full Version: GSdx
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563
(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
Yup, exactly that. That's a hack however, not a propa'fix. Works for me though, so me be happy. Tongue
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
The hack results in something very similar to the Wild Arms offset hack. It may work a bit better though, very interesting Smile
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.
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
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.
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
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
[attachment=42442]


Hardware + skipdraw + agressive crc(doesn't differ here from non agressive except for fps)
[attachment=42443]


Hardware no hacks
[attachment=42444]

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

@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
(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
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563