Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GSdx software bug: Xenosaga Episode I NTSC Black screen/box covering during a certain grayscale cutscene #83

Closed
BlackTelomeres opened this issue Jun 30, 2014 · 32 comments
Labels
Milestone

Comments

@BlackTelomeres
Copy link

PCSX2 1.2.1 (r5875)
GSDX32-avx-r5875
Both DirectX9 and DirectX11
Both Hardware Mode and Software Mode but presents slightly differently depending on the resolution you've got the game at in HW mode.

Happens on any plugin configurations I tried and I've heard people mention it before so it probably goes for many/all(?) versions.

When Shion needs to go to sleep in her room to progress the story around an hour or so into the game on the Woglinde (right before the Gnosis come), a "dream" cutscene plays behind a large black box covering either the entire screen or the upper left corner if you increased the resolution sufficiently in HW mode. In SW mode it just covers it all since SW mode uses native resolution.

On the original hardware this cutscene was displayed in grayscale, but in PCSX2's emulation of it, when you see behind the black box by increasing the resolution in HW mode, it is shown in color, which leads me to think it has something to do with an error when trying to apply that grayscale effect.

There are other cutscenes like this in the game so while I haven't gotten to them yet I assume the same issue will probably affect them as well.

The first included image shows what it looks like if you increase the resolution while the cutscene is playing. Obviously if you have it at native resolution there'd be nothing to see--just a black screen, but you can hear things going on in the background so you'll know you're missing something.

xsblackbox2

The second included image shows what it looks like at the same spot on the original PS2 hardware.

xs1originalhardware

@bositman
Copy link
Member

bositman commented Jul 4, 2014

Can you provide a memory card save close to the point of a dream scene?

@BlackTelomeres
Copy link
Author

Here you go:

http://www71.zippyshare.com/v/77351189/file.html

Just rest at the bed in the same room the save loads from. There will be a scene with Shion lying down on it and then the screen will black out for the length of the following cutscene. The surest way to see the cutscene with the black box over the top left instead of just a black screen is, if you're in hardware mode and at a resolution higher than native, to hit F9 twice in order to swap into software mode and then back into hardware mode.

@gigaherz
Copy link
Member

gigaherz commented Jul 4, 2014

Sounds like the game may be trying to do the grayscale as post-processing, and then render the result on top (in the black box, but failing to do so. May be wrong though ;P

@bositman
Copy link
Member

bositman commented Jul 5, 2014

Confirmed with the NTSC version (SLUS 20469)
My findings are the same, if native resolution or software mode is used, you get a black screen with no way to get an actual display.
If you use some scaling, you still get a black screen, unless you pause/resume emulation or switch from HW to SW mode twice (I guess some framebuffer gets cleared). After you do that, you see the display posted in the first screenshot above.
Tested various GSdx hacks with no effect. ZeroGS also gives a black screen.
Here is a video on how it's supposed to look like: http://youtu.be/IAahuQEyJIo?t=9m31s

@bositman bositman added the Bug label Jul 5, 2014
@ramapcsx2
Copy link
Member

Yea, I looked into this years ago when I ran into it myself :p
The problem is probably texture invalidation or another "popular" GSdx issue.
The fact it also happens in software mode makes it interesting.

@gigaherz
Copy link
Member

gigaherz commented Jul 8, 2014

Hmm I was going to give this a GSDX label but then I thought it could possibly be VU/VIF/GIF so I removed it again ;P

@ramapcsx2
Copy link
Member

It can have a GSdx label, just so we check this, should there ever be a GSdx fix ;)

@ramapcsx2
Copy link
Member

A forum thread brought this up and thinking about it, this looks like:

  • wrong framebuffer used for display
  • framebuffer correct but offset wrong (there's many places this could happen)
  • far shot, but gsdx could be using the wrong analog output unit (those 2 "CRT" ones)

@ramapcsx2 ramapcsx2 changed the title Xenosaga Episode I NTSC Black screen/box covering during a certain grayscale cutscene GSdx software bug: Xenosaga Episode I NTSC Black screen/box covering during a certain grayscale cutscene Jan 31, 2015
@bositman
Copy link
Member

Still active even with the new software renderer fixes from 42f5159

@gregory38
Copy link
Contributor

I pushed some SW renderer fixes on latest git. Potentially I fix this issue as a side effect :). If not, a gs dump would be nice.

@bositman
Copy link
Member

bositman commented Oct 6, 2016

Doesn't seem to fix it. SW is completely black, HW is missing the mist effect and has a black square at the top left, but only after you switch to SW and back to HW again (else it's black as well) :P
Here's a dump: http://bositman.pcsx2.net/dumps/xenosaga_dream_sequence_black.rar

@gregory38
Copy link
Contributor

I think there is something wrong in the merge of 2 display. (note on the HW renderer size is likely wrong). Here a screenshot with the alpha value divided by 2. Could you tell me if the top left corner color is correct or too dark.

screenshot - 10082016 - 12 57 07 pm

@gregory38
Copy link
Contributor

Ok, the game uses the loopback write capability of the GS. Which isn't emulated yet.

By the way, are they any game that also suffer of this kind of corner scaling bug?

@ramapcsx2
Copy link
Member

Devil May Cry:
http://i.imgur.com/19RAfP0.png

@FlatOutPS2
Copy link
Contributor

Devil May Cry:

Here's the related issue:
#694

@gregory38
Copy link
Contributor

So yeah, the game just do a color => luminance conversion. I will implement it on openGL first. SW won't be too difficult (but SSE/AVX is slower to code)

@bositman
Copy link
Member

bositman commented Oct 8, 2016

It's supposed to be black and white as seen here: http://youtu.be/IAahuQEyJIo?t=9m31s

@gregory38
Copy link
Contributor

@bositman thank for the confirmation. It will be fixed before Monday ;)

@bositman
Copy link
Member

bositman commented Oct 8, 2016

Wow I remember the time when we were like "omg this might get fixed one day if we find what's wrong and the planets align" :P You've reached guru level on GSdx ;)

@gregory38
Copy link
Contributor

gregory38 commented Oct 8, 2016

I need to double check the math, but I think I'm close of the result (a bit too light)
screenshot - 10082016 - 10 40 52 pm

I will try to spot the upscaling bug first.

gregory38 added a commit that referenced this issue Oct 8, 2016
gregory38 added a commit that referenced this issue Oct 9, 2016
@gregory38
Copy link
Contributor

Branch for the HW renderer:
https://github.com/PCSX2/pcsx2/tree/greg/feedback-write

I will give a look at SW renderer before the PR. But it is more complex than expected (and will suck the perf). So maybe I won't do it.

@gregory38
Copy link
Contributor

See PR #1614 and right on time :p

@jcdenton2k
Copy link

jcdenton2k commented Oct 9, 2016

Small thing. Would it be possible to make this an option in the UI?

Like 'render grayscale as either grayscale or color'? Just a thought.

Also related issue:
http://wiki.pcsx2.net/index.php/Blood_Will_Tell

That game has a similar grayscale (and later sepia) post-processing effect during specific sequences. On original hardware it even pops up a tutorial explicitly telling the player the game is in grayscale because of the story and not to adjust their TV. Thought it was a nice touch ;)

If this issue gets 'fixed' I'll rip my ISO from the disc again (gotta dig it out) and test it if needed.

@gregory38
Copy link
Contributor

You must be kidding right.

Blood will tell uses a channel shuffle effect to remove the color (done with special texturing). Whereas Xenosage does a YUV conversion with the display converter.

Those games use those effect to improve the immersion why do you want to remove it. We already have enough option.

@jcdenton2k
Copy link

I just thought it would be interesting. An enhancement, if you will. Like how we upscale games to make them look better than on original hardware.
It was just a suggestion. The important thing is to implement the correct 'accurate' behavior so that the game plays as intended.

@gregory38 gregory38 added this to the Release 1.6 milestone Oct 14, 2016
@gregory38 gregory38 added the GS label Oct 14, 2016
@gregory38
Copy link
Contributor

@jcdenton2k
I prefer the game is grayscale so no.

@Delliser
Copy link

Hello,

Not-really-tech-savvy-person here. I understand, reading the conversation, this bug's resolved. Nonetheless, downloading a new pcsx2 build from the official website does not work (i assume the bugfix isn't in the public release yet.
Downloading the last developer version nets me a "savestate corrupted" error, while trying to load the savestate I made during the cutscene.
What I'm doing wrong, and how can I fix it?

Sincerest apologies for asking this here. I understand this would be better asked by pm, but I can't seem to find a PM function on this site.

@FlatOutPS2
Copy link
Contributor

FlatOutPS2 commented Oct 16, 2016

@Delliser This hasn't been fixed for the Direct3D Hardware renderers. You might need to change renderer.
Savestates made in older PCSX2 versions are not always compatible with new versions. So you'll need to use regular memory card savegames.

@Delliser
Copy link

@FlatOutPS2 Thanks for your prompt response. I've tried both direct3d and opengl, hardware and software, to no avail. Maybe I just overlooked one of them, I'll try again. Unfortunately this game suffers from a problem which boots you to bios when using some specific save points, so I haven't got a memory card save near the bug occurrance point. I'll retry later, in the next part of the game where a dream sequence comes up, with both dev pcsx2 and regular one, so as to see if it works for me or I need to do something more.

@Delliser
Copy link

I confirm the fix. Played with the dev version, the second dream cutscene (which I assume uses the same graphical functionality) works correctly. Do not remember if I've used OpenGL hardware or software, but it worked.

@trostboot
Copy link
Contributor

trostboot commented Jan 11, 2017

@gregory38 Is this intended to still be broken on the D3D software renderers? It works on OGL HW and SW, but why is there a difference in SW renderers between D3D and OGL?

@gregory38
Copy link
Contributor

It is not intended but it is expected. SW renderer doesn't do all the rendering on the CPU. The basic present/merge/interlace/post-processing drawing are done on the GPU. The improvement were done on the merge part hence only in openGL.

LibretroAdmin pushed a commit to libretro/pcsx2 that referenced this issue Mar 30, 2023
LibretroAdmin pushed a commit to libretro/pcsx2 that referenced this issue Mar 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

9 participants