Skip to content

Conversation

@refractionpcsx2
Copy link
Member

@refractionpcsx2 refractionpcsx2 commented Jun 5, 2025

Description of Changes

Makes improvements to the hardware level moving between targets, namely between colour and depth targets.

Also added fixes for moving and invalidating/translating inside block offsets.

Improves texture shuffle detection heuristics to have less false positives.

Rationale behind Changes

While not always 100% correct, in most cases they copy with the respective formats so the swizzling is correct, so we can get away with it, and this fixes a bunch of behaviours.

Block offsets were also not working correctly which caused issues in some transfers/invalidation, which has also been fixed by this PR.

Gunbird Special was reading a C16 texture from memory and happened to have it's alignment position off by 8, which triggered the detection.

Suggested Testing Steps

Test the games listed below with screenshots, but also just check the following as they showed differences is numbers only, but be sure nothing broke:

Armored Core 2 & 3, Astro Boy, Baldurs Gate DA 1 & 2, Critical Velocity (watch out for seizures during videos), Dark Chronicle/Dark Cloud 2, Devil May Cry, Dog's Life, FIFA 2002, Flower Sun and Rain, Ghost in the Shell, Gradius V, Hokuto no Ken, Justice League Heroes, Kenran Butousai, Warship Gunner 2, Sakura Taisen/Wars games, Star Wars Racer (vs master, might be broken anyway), Street Fighter 3 3rd Strike, Thrilleville, Transformers The Game, True Crime NYC, Ultraman Fighting Evolution 2.

Also check the Baldur's Gate games and Total Immersion Racing for the block offset fix.

Test Gunbird Special (gsdump also in the linked issue) and I guess smoke test some games you know to have a bunch of post processing.

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

No.

Fixes #3988 shadows for Kunoichi/Nightshade and removes the need for a CRC for the Sakura Wars games.
Fixes #12785 Star Trek Shattered Universe rendering.
Fixes #12791

Kunoichi:

Master:
image

PR:
image

Star Trek - Shattered Universe:

Master:
image

PR:
image

Bonus:
Kenran Butousai when upscaled: Ignore the speed, that's just because of how I was taking the screenshots, it'll be faster if anything.

Master:
image

PR:
image

Software for reference:
image

Baldur's Gate Dark Aliiance:
Master:
image
PR:
image

Fixes #12791

Gunbird Special:

Master:
image

PR:
image

Copy link
Member

@JordanTheToaster JordanTheToaster left a comment

Choose a reason for hiding this comment

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

Tested many game and no breaky.

@lightningterror lightningterror merged commit e5616cf into master Jun 8, 2025
24 checks passed
@lightningterror lightningterror deleted the gs_improveshuffledetect branch June 8, 2025 11:51
@lightningterror lightningterror changed the title GS/HW: Fix bug in target preloading causing misaligned base addresses GS/HW: Improvements to HW moving (C<->Z), fix bug in target preloading causing misaligned base addresses. Jun 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

5 participants