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

Meta: GSdx HW memory wrapping #1648

Open
1 of 3 tasks
gregory38 opened this issue Nov 4, 2016 · 24 comments
Open
1 of 3 tasks

Meta: GSdx HW memory wrapping #1648

gregory38 opened this issue Nov 4, 2016 · 24 comments

Comments

@gregory38
Copy link
Contributor

gregory38 commented Nov 4, 2016

GS memory is 4MB. Address above 4MB are wrapped back to the start. Some games relies on this behavior. Severals fixes was done to wrap block or page address for the SW renderer. But HW renderer is still broken. I'm not sure it is even doable with an HW renderer but let's keep a trace of impacted game for future reference.

Here a list of game that use this feature.

  • Beyond good and evil
  • Silent hill 3 (FMV)
  • Thrillville (cutscene)
@refractionpcsx2
Copy link
Member

Any ideas of symptoms that will appear to show it happening?

@gregory38
Copy link
Contributor Author

Well depends on how much it overlaps. It could be massive flickering or miss the end of the framebuffer. Check with 1.4 SW renderer :) If it is broken and good now, it is a good hint.

@refractionpcsx2
Copy link
Member

refractionpcsx2 commented Nov 4, 2016

Not sure I have any games that do that :/ I may be of little use here.. lol it's not a common issue I don't think.

Edit: We really should have a "Requires Research" label or something, what do you think?

@gregory38
Copy link
Contributor Author

Yes I think it is quite limited. SW compatibility is rather big (even on 1.4). Note, if game use such crazy features there are potentially extra texture cache issue too.

@refractionpcsx2
Copy link
Member

There were quite a few games doing it with VIF writing to the VU's, Guitar Hero 3 (i think) being an example, where it wrapped around VU memory during the unpacks. There were other games doing it too but I can't remember what.

@FlatOutPS2
Copy link
Contributor

FlatOutPS2 commented Nov 4, 2016

Wouldn't any game with this issue also have the issue in SW like SH3 had?

EDIT Where is Beyond Good & Evil affected?

@gregory38
Copy link
Contributor Author

Yes sw used to have the issue. And potentially still have some. I fixed beyond good&evil with my last commit.

On my dump (lamguage selector) hw is fine but I'm not sure that full game will be fine. On the wiki it said that game got issue (very old report), it could be related.

@AmbientMalice
Copy link
Contributor

Could this be related? #1107 Game is meant to have a blurred menu background when in inventory, but it shows vertical lines instead. Same in SW and HW.

@gregory38
Copy link
Contributor Author

I don't think that SW and HW will behave the same. However did you test latest git with openGL. It could be the feedback write.

@FlatOutPS2
Copy link
Contributor

FlatOutPS2 commented Nov 5, 2016

On my dump (lamguage selector) hw is fine but I'm not sure that full game will be fine. On the wiki it said that game got issue (very old report), it could be related.

Yeah, HW is fine. Software flickered everywhere in the game before you fixed it. It's fine now. The game looks pretty good in HW (needed to unscale point line hack to see press start screen when upscaling, shadows are missing(after switching to software and back a static shadow did appear) and there looks to be a texture cache issue in the sky). I do remember seeing broken graphics like the wiki report described when I tried the demo version a good while ago. So I'll need to check up on that.

EDIT: I do see a larger issue in the demo. Are there any CRC hacks for BG&E?
EDIT2: The demo seems to apply some sort of dithering to the game that makes it look worse. There is only one main issue with the current git version, the sea has serious depth issues in HW that make it hard to play through the level.

@gregory38
Copy link
Contributor Author

I don't think there is any crc hack for BGE. GS dithering is implemented on the SW side not HW.

@FlatOutPS2
Copy link
Contributor

I'll look up the demo issue in the full game to see what the issue exactly is. But I didn't notice any issue that seemed memory wrapping related, In SW memory wrapping flickering affected the whole game. But in HW it's fine except for unrelated issues.

@MonJamp
Copy link
Contributor

MonJamp commented Dec 26, 2016

For Thrillville the cutscene getting cut off may be a separate issue. The memory wrapping on the SW renderer fixes the pause menu cutting off part of the screen but the cutscenes are still the same as on the HW renderer.

@HarmfulBreeze
Copy link
Contributor

Bump? Anything new on this topic?

@FlatOutPS2
Copy link
Contributor

Yes, we're busy wrapping things up.

@refractionpcsx2
Copy link
Member

Pun intended?

@FlatOutPS2
Copy link
Contributor

I don't remember, my memory is acting up.

@MonJamp
Copy link
Contributor

MonJamp commented May 14, 2019

For Thrillville the cutscene getting cut off may be a separate issue. The memory wrapping on the SW renderer fixes the pause menu cutting off part of the screen but the cutscenes are still the same as on the HW renderer.

I never corrected myself... Both issues are fixed by memory wrapping in Thrillville.

Also isn't memory wrapping implemented in the hardware renderers now? Should this issue be closed?

@TheTechnician27
Copy link
Contributor

Say, refraction, is this still an issue? At least for Thrillville, this seems like something that's fixed. The HW mode cutscenes in Thrillville were pretty jank (basically unwatchable) in the 1.5.X days, but as best I can tell, they work flawlessly now (I think the GameDB defaults to bob interlacing to fix the "earthquake" flickering?)

Couldn't say, though, for the first two games.

@refractionpcsx2
Copy link
Member

refractionpcsx2 commented Jan 6, 2024

I think Silent Hill 3 is still an issue, though I'm not 100% sure, we might have fixed it.

Edit: Just checked, SH3 is still an issue, I guess there's still some end of memory wrapping, I know it draws to the end of memory then reads from the beginning of memory (as an offset) and our current code doesn't check this overly well.

@TheTechnician27
Copy link
Contributor

Fair enough. At the very least, I can present (hopefully compelling) evidence that Thrillville's cutscenes are no longer an issue.
Thrillville_SLUS-21413_20240106102259.zip

Thrillville_SLUS-21413_20240106102259

@refractionpcsx2
Copy link
Member

Beyond Good and Evil may also still be a problem. I guess I could look into this at some point...

@TheTechnician27
Copy link
Contributor

TheTechnician27 commented Jan 6, 2024

It's worth noting that #1562, also by Gregory, designates Silent Hill 3 as having this issue fixed. Beyond Good & Evil isn't listed there, so maybe I could poll around on Discord to see if anyone has a copy which they could test (that, or the next time I'm across town, I could pick up a copy at the used games store if the price is right).

@refractionpcsx2
Copy link
Member

There was 2 parts to the memory wrapping, the hardware issue is related but different

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

No branches or pull requests

8 participants