Skip to content

GS/CLUT: Handle special case for CSM2 32bit mode switch#14546

Merged
lightningterror merged 1 commit into
masterfrom
gs_delayclutreload
Jul 16, 2026
Merged

GS/CLUT: Handle special case for CSM2 32bit mode switch#14546
lightningterror merged 1 commit into
masterfrom
gs_delayclutreload

Conversation

@refractionpcsx2

Copy link
Copy Markdown
Member

Description of Changes

Changes the behaviour of CLUT storage mode 2 to always load the CLUT from local memory and not in to a temporary buffer.

Rationale behind Changes

This is kind of theoretical based on the behaviour of Breath of Fire - Dragon Quarter when running a GS Dump vs PCSX2, the game will reload the CLUT in Storage Mode 1, then switch to Storage Mode 2, however the data loaded from Mode 1 is in the incorrect order, due to it being correctly swizzled and Mode 2 is sequential, meaning the main colour the text uses on the menu has black holes everywhere.

The running theory is that Mode 2 reads directly from GS memory when loading the texture cache (hence it being slower than CSM 1, along with the swizzle differences). I can't see any other way that this game would have the correct CLUT otherwise.

Ziemas is likely going to run some tests on his PS2 to try and confirm the theory, but this is the best we have for now, the dump run seems clean, to it may hold water.

Suggested Testing Steps

Test Breath of Fire - Dragon Quarter

Did you use AI to help find, test, or implement this issue or feature?

I did ask AI for some possible information on the web w/links that I failed to find and anything which backed up my theory, but didn't really help with any credible information.

Fixes #14543

Breath of Fire - Dragon Quarter
Master:
image

PR:
image

@Heitof Heitof left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No regressions found.

@refractionpcsx2

Copy link
Copy Markdown
Member Author

It has been confirmed that the behaviour here is incorrect and it's not what we thought.

Further testing is being done, but we'll see.

@Mrlinkwii Mrlinkwii removed this from the Release 2.8 milestone Jun 5, 2026
@refractionpcsx2
refractionpcsx2 marked this pull request as draft July 10, 2026 21:05
@refractionpcsx2

refractionpcsx2 commented Jul 11, 2026

Copy link
Copy Markdown
Member Author

I kinda just went "fuck it" and made a non-invasive special case for this game, I don't know of any other games that do it and I really don't want to mess about trying to implement it for all scenarios which will never get used.

@refractionpcsx2
refractionpcsx2 marked this pull request as ready for review July 11, 2026 05:01
@refractionpcsx2 refractionpcsx2 changed the title GS/CLUT: Always reload the CLUT when in Storage Mode 2 GS/CLUT: Handle special case for CSM2 32bit mode switch Jul 14, 2026
@lightningterror
lightningterror merged commit 45fa6a8 into master Jul 16, 2026
29 checks passed
@lightningterror
lightningterror deleted the gs_delayclutreload branch July 16, 2026 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG]: Breath of Fire - Dragon Quarter has a faint corrupted main menu text

5 participants