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

FBW-based Screen Clear Issue #3180

Closed
5 tasks done
tadanokojin opened this issue Dec 21, 2019 · 5 comments · Fixed by #8036
Closed
5 tasks done

FBW-based Screen Clear Issue #3180

tadanokojin opened this issue Dec 21, 2019 · 5 comments · Fixed by #8036

Comments

@tadanokojin
Copy link
Member

tadanokojin commented Dec 21, 2019

Games Tested:

  • Evil Dead: Fist Full of Boomstick (dump)
  • Tom And Jerry: War of The Whiskers (dump)
  • Narc (dump)
  • State of Emergency 2 (dump)
  • Singstar (dump)

Games Not Tested (but potentially have the same issue):

  • State of Emergency
  • Brave: The Search for Spirit Dancer
  • The Powerpuff Girls: Relish Rampage

Example of the Issue:
image

Cause:
Caused by a screen clear where the game attempts to clear a 32-bit GS texture by setting the frame buffer width to 1 and then drawing a 64x2048 quad with flat shading in order to clear the buffer to a specific color (often a pink color).

Basically because of how GS memory works, it is possible on the GS to write to the framebuffer with FBW of 1 and then starting writing again with a larger FBW value. However since the cache does not emulate this behavior, what results is a larger line on the left hand of the screen.
_00454_f5001_rt1_03200_C_32

Here is an example of the incoming vertices:

VERTEX COORDS (XYZ)
	v0: 0.0000, 0.0000, 0
	v1: 64.0000, 2048.0000, 0

VERTEX COLOR (RGBA)
	v0: 000, 000, 000, 000
	v1: 239, 061, 239, 061

Here is an example FRAME register setting for the clear:

FRAME
	FBP (*32):0x2e00
	FBW:1
	PSM:0x0
	FBMSK:0x0

Here is an example of the FRAME register setting for a latter draw:

FRAME
	FBP (*32):0x2e00
	FBW:10
	PSM:0xa
	FBMSK:0x0

Previously, Superman Returns was the only game known to have this issue.

@iMineLink
Copy link
Contributor

I'm positive with the FBW conversion in the texture cache to tackle this issue, given also the fact that the clear is a solid rectangle draw, thus the conversion might be extremely optimized in this case.

@tadanokojin tadanokojin changed the title VIS Games - FBW-based Screen Clear Issue FBW-based Screen Clear Issue Sep 16, 2020
@seta-san
Copy link
Contributor

it's possible Zone of Enders: second runner suffers from this too
Number 2 graphical bug in cutscene on game engine

@tadanokojin
Copy link
Member Author

provide a gs dump so I can confirm

@seta-san
Copy link
Contributor

provide a gs dump so I can confirm

gsdx_20201210133535.gs.zip

@coornio
Copy link
Contributor

coornio commented Mar 9, 2022

Here's a more modern dump from 1.7.2427. The shadows are now in the correct place, though the issue is still present. Here's a new picture too:

gs_20220309233833

gs_20220309233833.gs.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants