PCSX2 / pcsx2

PCSX2 - The Playstation 2 Emulator
https://pcsx2.net
GNU General Public License v3.0
11.71k stars 1.62k forks source link

Dog's Life (PAL) - Dog gets black after a few seconds #1004

Closed SimplyLiz closed 2 years ago

SimplyLiz commented 8 years ago

2015-11-28 1

Latest rev from today (1.3.1 - 1487)

Just start a new game and walk around for a fews seconds, Jake get's all black, a lot of texture bugs on him.

Btw, he also has a "colored stripe" on his head. This happens right from the beginning. This seems not to be related to the "getting black" issue.

Happens in both OpenGL and DirectX. (though directx has a lot more texture issues.) Doesn't happen in Software Mode though.

willkuer commented 8 years ago

Have you tried higher accuracy in opengl? E.g.something like blending mode or accurate date?

SimplyLiz commented 8 years ago

I've tried "Accurate Date", "Hardware Deth" and Blending Unit Accuracy set to Ultra with no difference, jake still turns black.

willkuer commented 8 years ago

Thanks. What about crc hack level : none vs partial vs full?

SimplyLiz commented 8 years ago

CRC None -> it's even worse. The Textures looks greenish (moldy Oo) like in DirectX. So the crc hack level seems to make it better in openGL :)

i've now tested all combinations of CRC Level / Blending accuracy (and both checkboxes accurate date / hardware depth) and jake always turns black.

8 bit textures also make no difference. Same goes for Resolution (tried native, 1x, 2x, 3x, 4x)

I've now also disable the HW Hacks (skipdraw set to 1). Still turns black.

I've prepared a savestate. Press X to leave smellovision, run forward and watch jake turn black. when you load the savestate in software mode this doesn't happen. http://workupload.com/file/wezuzcAl

willkuer commented 8 years ago

I think it would help more if you create a GS dump. The devs do not necessarily have the game and savestates get invalid from time to time. So please create a gs dump.

SimplyLiz commented 8 years ago

Here you go: http://workupload.com/file/4y4qA2Pr

I've started the game, loaded the savestate, Hold Shift + F8, ran forward until jake was all black and released the button. Hope that helps!

FlatOutPS2 commented 6 years ago

This still happens with latest git build. Jake the dog turns black when moving the character with Direct3D11 and OpenGL hardware renderers, Direct3D9 hardware renderer turns the skin blue-green-ish and it seems to change slower than the other HW renderers. Switching to Software will not fix the issue, but not playing in hardware renderer at all will prevent it.

jpovixwm commented 4 years ago

This issue still occurs as of 3231e7956. All versions of the game are affected: SLUS-21018, SCES-51248 and SLPM-65995. I did some investigation with SLUS-21018, and here's what I've got to share:

The visual glitch is caused by the dog gradually getting dirtier the further it travels. This is why the issue doesn't occur when the dog stands in place. The game constantly checks the distance traveled by the dog, and once it goes over 500.0 units, the value is reset to 0, and the dog is made very slightly more dirty. The subroutine responsible for making the dog dirtier is the one at 001f99c8 (this also handles the dog cleaning process if you go to the dog wash), while the one for checking the distance traveled is at 001f59e0. By modifying the instructions at 001f60b0 and 001f60f8, it is possible to alter the required distance and the amount by which the dog gets dirtier, respectively. For example, when the distance condition is set to 1000.0, the rate at which the dog gets dirtier will be 50% of the original game. And if the instruction responsible for the incrementation is altered so that it increments by 2 rather than by 1, the dog will get dirtier in larger steps at a time. Setting it to 0 will cause the dog to never get dirty, avoiding this graphical bug altogether. Because of how useful it is, I've created this PNACH, which lets you enjoy the game with a HW renderer: patch=0,EE,001F60F8,byte,00.

Given the above, I was able to gain control over how the dog is made dirtier, which allowed me to easily reproduce this issue with the dog standing still, which I hope will make the GS dumps I captured easier to work with and analyze. The issue manifests itself only if a HW renderer is used while the dog gets dirtier. A GS dump I captured with the SW renderer, where the glitch doesn't occur, can be replayed with GSdx's HW renderers and the glitch cannot be reproduced. In the opposite case, when the dump was captured in HW mode, the glitch now will reproduce when the dump is replayed in SW mode. I'm also including a third GS dump, captured using HW mode in 2x resolution. This has interesting effects, because you can see the textures from the ground located behind the dog, get applied to the dog itself. And once again, this dump shows the same problem if replayed in SW mode. (Update: enabling "Large Framebuffer" fixes this particular behavior) I've also included a save state which makes it trivial to reproduce this issue. After loading the state, just move the dog a bit and that's it. Or, if you want the dog to stay in place, then just write a float greater than ~4000 to 0x20aca5b4, 5000.0 will do. This save state has the incrementing instruction altered so that it increments by 0x100, and the distance threshold is at around 4000, so writing 5000.0 to the memory at that address will instantly make the dog visibly dirty.

Download: https://workupload.com/file/CBTEWWG2S9M

Update: the "Preload Frame Data" hack appears to alleviate this issue somewhat, at least when you use the save state I provided, but not so much with the vanilla game.

Update: use these codes to work around this bug when using a hardware renderer:

patch=0,EE,001F60B0,short,471C
patch=0,EE,001F60B4,short,4000
patch=0,EE,001F60F8,byte,50

This will bump the distance threshold to 40000.0, and the incrementation to 80, making the dog's texture updates happen 80 times less frequently, but each update will be 80x stronger than default. Only works with "Preload Frame Data", and only for native resolution. In general, it seems that each update further deteriorates the dog's texture, thus making the updates less frequent helps a lot. I think it may be a "off-by-one" type of bug somewhere in GSdx, but that's just a wild guess, as I have no idea how any of this works. I'd say that whenever the game attempts to blend the dog's textures with a "dirt" texture, some calculation goes off, and the resulting texture gets a bit more dark than what it should be. Make the updates frequent enough, and the textures would quickly become pitch black.

tadanokojin commented 4 years ago

Thanks for patch, debug and dumps. I'll take a look when I get a moment.

Dogmander commented 3 years ago

@jpovixwm Could you give me a quick explanation on how to fix this issue with the vanilla game or whatever, as I'm not really sure how to use cheats or patches in PCSX2 that much.

RedDevilus commented 3 years ago

Is MTVU disabled?

Dogmander commented 3 years ago

I have it disabled, yes. As if I have it enabled it seems to hang after the main cutscenes I think.

RedDevilus commented 3 years ago

MTVU is fixed in 1.7 but it seems to be a CLUT issue from what i hear.

Dogmander commented 3 years ago

Okay, but all I'm trying to do is just fix the black jake issue

refractionpcsx2 commented 3 years ago

GSdx32-AVX2clutoffset3.zip it's a long shot but you could give this version of GSDX a try

Dogmander commented 3 years ago

What will that version do?

refractionpcsx2 commented 3 years ago

Well, that fixes some CLUT issues, so if it's a CLUT problem, it might stop him turning black. No guarantees though

Dogmander commented 3 years ago

Okay, I'll try it

Dogmander commented 3 years ago

Nope, Jake still turns black? Any way I can fix this? image

tadanokojin commented 3 years ago

Play in SW until it's fixed or mess about with patches. It's not a clut issue.

Dogmander commented 3 years ago

How can I use the patches? Is it a cheat code or something?

Dogmander commented 3 years ago

Play in SW until it's fixed or mess about with patches. It's not a clut issue.

I'm using the NTSC-U version of the game btw

tadanokojin commented 3 years ago

This is an issue tracker, it's not really the purview of this issue to explain how the patch system works. Go ask the forums how to use it. This is for tracking the issue and for providing debugging and other information that helps debug it not for asking how to use the emulator.

Dogmander commented 3 years ago

Okay, sorry. Also, there is another issue that makes Jake have a stripe on his forehead for some reason. You might also want to check this issue out too. image

One more issue, when loading into the game. The book turns partly black. image

tadanokojin commented 3 years ago

Thanks I'll keep it in mind. I suspect it's all related.

Dogmander commented 3 years ago

Yeah, this game has a lot of graphical issues, which is a shame since this is one of my favorite games and these graphical issues are pretty annoying.

Dogmander commented 3 years ago

Has anyone had any progress resolving this issue?

refractionpcsx2 commented 2 years ago

With the latest master, if you enable Preload Frame, we're nearly there, but I think the remaining issue is because preload frame is pretty janky

image

Edit: Here's a higher resolution screenshot

image

Dogmander commented 2 years ago

With the latest master, if you enable Preload Frame and Texture in RT, we're nearly there, but I think the remaining issue is because preload frame is pretty janky

image

Edit: Here's a higher resolution screenshot

image

That's definite an improvement, but still not perfect, but it's good to see progress nonetheless

refractionpcsx2 commented 2 years ago

okay, did some messing around, and the mud and Jakes body texture are fine if you set blending accuracy to "Ultra" or "minimal".

One of the hw/sw mix blends is breaking this

refractionpcsx2 commented 2 years ago

If anybody wants to go ahead and try #5540 it will now work there with basic blending (which is the most ideal). Of course you still need Preload Frame to solve the random black squares and the funny colours on his head, but it looks much better, I would say that's all issues resolved now (videos need SW FMV switch, annoyingly)

image

Levan7 commented 2 years ago

Still getting this issue on v1.7.2431 build

refractionpcsx2 commented 2 years ago

Still getting this issue on v1.7.2431 build

You need to enable Preload Frame HW Renderer hack, and not go nuts with the upscaling (this really screws with it)

Levan7 commented 2 years ago

@refractionpcsx2 It worked thank you and sorry if this information was in the thread and missed.

Dogmander commented 2 years ago

Speaking of preload frame, shouldn’t that be added as an automatic fix in gamedb?

On Fri, Mar 11, 2022 at 1:20 PM Levan7 @.***> wrote:

@refractionpcsx2 https://github.com/refractionpcsx2 It worked thank you and sorry if this information was in the thread and missed.

— Reply to this email directly, view it on GitHub https://github.com/PCSX2/pcsx2/issues/1004#issuecomment-1065367237, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIHEONVBWCDFTPITK4D2AE3U7OFF7ANCNFSM4BVLGDCQ . You are receiving this because you commented.Message ID: @.***>

RedDevilus commented 2 years ago

When the GS HW fixes gets added, then it will be possible for the GameDB. But a lot of games will need to be reviewed.

refractionpcsx2 commented 2 years ago

yes, wait for #5593 to be merged

Dogmander commented 2 years ago

👍

On Fri, Mar 11, 2022 at 3:26 PM refractionpcsx2 @.***> wrote:

yes, wait for #5593 https://github.com/PCSX2/pcsx2/pull/5593 to be merged

— Reply to this email directly, view it on GitHub https://github.com/PCSX2/pcsx2/issues/1004#issuecomment-1065491682, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIHEONRKJDWINTENBTHPGFLU7OT7PANCNFSM4BVLGDCQ . You are receiving this because you commented.Message ID: @.***>

Tecloudwoo commented 2 years ago

No news about a fix with upscaling? Texture replacement is possible for the main character?

How to fix this?

refractionpcsx2 commented 2 years ago

Upscaling works, though I think some scales are still problematic, not much we can do about that, just pick another one

Tecloudwoo commented 2 years ago

Ok, but this is a hardware mode issue with upscaling. The dog become darker. It's not linked with the sun effect?

Do you have errors concerning this in the console?

refractionpcsx2 commented 2 years ago

No? As long as you don't have manual hw fixes enabled in the GS settings, it should be dealt with.

Tecloudwoo commented 2 years ago

No? As long as you don't have manual hw fixes enabled in the GS settings, it should be dealt with.

Which hw fixes do you use for this game with the last version of PCSX2?

refractionpcsx2 commented 2 years ago

clampModes: vuClampMode: 3 # Fixes minor SPS on characters. gsHWFixes: preloadFrameData: 1 # Fixes bad textures on Jake. halfPixelOffset: 1 # Fixes double image.

Tecloudwoo commented 2 years ago

3 1 2

I don't have the numbers but this is my captures. Is this correct?

refractionpcsx2 commented 2 years ago

why are you setting it manually? the gamedb does it automatically. set everything back to global (or filled for checkboxes).

All you need to change is your internal resolution to either 3 or 5.

Tecloudwoo commented 2 years ago

Because I search the best configuration .. thank you for your help image

refractionpcsx2 commented 1 year ago

Just a quick note to say the going black in Smell-o-vision seems to be fixed with #7267

Tecloudwoo commented 1 year ago

Just a quick note to say the going black in Smell-o-vision seems to be fixed with #7267

Hey, thank you, this fix is in the last main branch ? Everything is fixed?

refractionpcsx2 commented 1 year ago

I think so, yep!

It's possible certain upscales might still make it explode, I don't know, I didn't test that, but other than that, it should be fine!