Commit Graph

2801 Commits

Author SHA1 Message Date
Jonathan Li b84b2808f4 baseclasses|gsdx: Move code from baseclasses to GSdx
Moved code seems to be from Gabest. Only the code that is currently used
has been kept.
2018-04-29 02:19:17 +01:00
Jonathan Li 7ea0273119 gsdx: Remove code that does nothing 2018-04-29 02:19:17 +01:00
lightningterror 6496e6db11 Gsdx: Adjust Front Mission 5 crc hacks.
Move CRC hacks do DX level.

Hack that fixes shadows:
Shadows/glitchy black ground textures can be fixed with Preload Frame Data.

Hack that removed vertical stripes:
D3D10/11 correctly emulates texture shuffle but also needs depth support.
2018-04-27 17:59:24 +01:00
lightningterror c8c9731262 GSdx: Update D3D fbmask emulation on texture shuffle.
Improves accuracy on Sly series.

Rendering is still bad and needs a lot more work but
it's a little bit better.
2018-04-24 22:42:59 +01:00
lightningterror 0f5d3d2f1b GSdx: Add Sly 3 demos crc ids.
Regular Demo US,
E3 Demo US.
2018-04-22 23:51:56 +01:00
lightningterror 230a497a12 GSdx-TC: Don't skip depth lookup on Jackie Chan Adv and SVC Chaos.
Don't skip draw calls on Jackie Chan Adv and SVC Chaos,
fixes regressions on Jackie Chan Adv and SVC Chaos.

Gregory: The correct fix would be to trace all textures writes to
be sure of the source. But it is a much bigger work.
2018-04-15 00:42:07 +01:00
lightningterror 6073a26f5d GSdx: Add some missing crc ids.
Add SVC Chaos: SNK vs. Capcom EU/JP,
Add Jackie Chan Adventures EU.
2018-04-15 00:42:07 +01:00
lightningterror 0e39caaad3 GSdx: Adjust Naruto series crc hacks
Purge CRC hacks that removed lighting on maps.
Games: Naruto - Narutimate Hero 3,
Naruto Shippuuden: Narutimate Accel.
2018-04-03 16:01:22 +01:00
lightningterror b6a73f6db3 Gsdx: Add some missing crc ids.
Tenchu Fatal Shadows US,
God Hand EU,
The Getaway EU,
The Getaway Black Monday EU.
2018-04-02 11:39:45 +01:00
lightningterror 4cb164b795 GSdx: Adjust CRC hacks.
Purge Sengoku Basara crc hacks. Texture shuffle is emulated correctly on
d3d11/ogl. d3d9 skips the bad draw call.

Move Eternal Poison crc hack to d3d level. Not needed on ogl since
the game is emulated correctly.

Move hack that removes texture shuffle for Demon Stoneback back to ogl level,
half screen bottom issue remains.

Extent CRC hack for The Getaway and The Getaway Black Monday to work on
EU regions.
2018-04-02 11:39:45 +01:00
lightningterror 014e27bc20 GSdx: Add Quak3 Revolution to Automatic mipmapping. 2018-03-27 15:11:08 +02:00
lightningterror 312db7755b GSdx: Adjust CRC hacks.
Move CRC hack that removed shadows to Aggressive, shadows are misaligned
when upscaling - can be fixed with HPO. We can use the hack as a
speedhack for Aggressive state.

Add correct FBP code for Sly 2 E3 Demo. CRC hack should work properly now.

Purge God of War 1/2 CRC hacks that fixed/removed the vertical red lines.
No longer needed since the issue is fixed accross all renders.
Also useless to be kept for speedhacks.
2018-03-27 15:11:08 +02:00
lightningterror 9769f19ebe GSdx: Remove fbmask handle in GSRendererDX.
It's already handled in texture shuffle code.
2018-03-27 15:11:08 +02:00
lightningterror 0e83b89dbd GSdx-D3D: Texture and channel shuffle improvements.
Texture Shuffle changes:
Always Enable Texture shuffle on D3D10/11.
Previously Texture shuffle was enabled if CRC hack
level was below Full, this was kinda not good since
D3D also relies on CRC hacks on Full so you could either
stick with texture shuffle or crc hacks.

Texture shuffle is not supported on D3D9, however we can do a partial
port where instead of vertical lines with the effect we get the effect
on the entire screen. Better than nothing I suppose.

Ported some of the code from OpenGL to D3D
( just a copy - paste job :) ),
part of the code misses a dedicated shader but we can still
use it to fix various issues on many games.

List of affected games tested so far:
The Godfather, Final Fight Streetwise, The Suffering Ties that Bind,
Urban Chaos have their vertical lines issues fixed
(highly possible for other games as well), MGS and Stolen see an improvement
but they are still broken without crc hacks. Other games that suffered
similar issues are probably affected as well.

Channel Shuffle changes:
Update Channel Shuffle detection. A lot of games should see an improvement,
MGS, Urban Chaos, Stolen have their top left corner issues resolved.
Other games should be affected as well that use similar logic.
They still miss a shader so some effects are still broken/show glitches
but it's a nice improvement for D3D users.

Shared changes:
Texture Shuffle and Channel shuffle have been moved to their
own dedicated functions. Should make things a bit cleaner.

Move part of the code for Texture Shuffle to GSRendererHW to be shared
across all HW renderers, should aboid copy paste/duplicate code.
2018-03-23 13:38:34 +01:00
lightningterror 2ad5db2279 GSdx Adjust/Replace crc hack for Final Fight Streetwise.
Replace/remove an old crc hack that was used to fix the red vertical
lines issue, the hack is no longer needed. The new hack removes depth
effects on D3D only.
Note: The game has another vertical lines issue that can be fixed with
texture shuffle on D3D.

Add comments to Simple2000Vol114 explaining what the hacks do.
2018-03-22 14:46:31 +01:00
lightningterror 99350d6caa GSdx: Add some missing crc ids.
Sly 2 E3 Demo US, Sly 2 JP.
2018-03-22 14:46:31 +01:00
Christian Kenny 40f7d6c95b GSdx: Add Shox to Automatic Mipmapping 2018-03-19 01:00:26 +05:30
lightningterror 6aaae6970e GSdx: Cleanup hacks in GSRendererHW.
Merge identical code for Spyro Games in to one to avoid duplicate code.

Rename hacks name for Jak series from OO_Jak to OO_JakGames since there
are multiple games added.
2018-03-13 18:56:30 +05:30
lightningterror f4fa115c82 GSdx: Remove GT3/Concept CRC Hacks.
This follows PR #2304.
The CRC hacks are no longer needed due to the partial port of channel
shuffle on D3D.
They cause higher vram spikes  now.
2018-03-13 18:56:30 +05:30
lightningterror bd0947e7a3 GSdx: Add/adjust CRC ids.
This follows PR #2330.

Add some missing regions: Tomb Raider Legend JP,
StarWars Force Unleashed EU, SuperMan Returns EU, Valkyrie Profile 2 FR.

Rename GT3/Concept titles, they were incorrect.

Adjust Harley Davidson region id from NoRegion to US.

Add some missing regions to automatic mipmapping:
FIFA 03 US, FIFA 04 EU, FIFA 05 EU.

Reformat a few comments.
2018-03-13 18:56:30 +05:30
lightningterror 73f1d7d099 GSdx: Rename HW hacks drop list options.
Add "Default" nametag for default list options for the hacks: Sprite,
Round Sprite, GL Advanced settings, HPO.

Should help users know which options are the default ones with less
confusion.
2018-03-04 20:54:10 +05:30
refractionpcsx2 084530eeca
Merge pull request #2122 from PCSX2/target_load
GSdx-TC: Fix load size calculation in target update Fixes #1972 Fixes #2110 Fixes #2138
2018-03-03 03:31:25 +00:00
Jonathan Li fb4f274882 gsdx: Remove inappropriate comment 2018-03-02 23:41:46 +00:00
lightningterror 38aa4e1745 GSdx: GSCrc.cpp reformat comments and whitespaces. 2018-03-02 10:10:31 +05:30
lightningterror 2be9cf060d GSdx: Add/adjust CRC ids.
Add CRC id for FFXII US, SFEX3 EU,
GT4 CH and GT4 Online Beta US.
Adjust BullyCC region from US to EU.

Add Missing regions for Ratchet & Clank,
Ace Combat, Destroy All Humans and Soul Reaver
series to Automatic Mipmapping.
2018-03-02 10:10:31 +05:30
Christian Kenny 10ebe16653 GSdx (OGL HW): Perform a texture shuffle when the address of the framebuffer and the texture are the same.
Tomb Raider: Angel of Darkness relies on this behavior to produce a distance fog effect.

Closes #2215
2018-02-22 00:20:54 +05:30
FlatOutPS2 c1fd01545a GSdx: Remove GT4/Tourist Trophy CRC hacks
Removes GT4/Tourist Trophy CRC hacks. The hack had already been moved to
aggressive due to VRAM spike issues, but is no longer necessary at all
due to the in-game brightness/contrast setting issue being moved to
behind the frame buffer conversion hack for Direct3D and being resolved for OpenGL.
2018-02-21 17:08:48 +05:30
lightningterror 768a4412d5 Gsdx: Adjust Ikkitousen CRC hacks.
Move hacks that disabled shadows to DX level since OpenGL renders
shadows properly with Depth Emulation.

Some other upscaling issues appear with the disabled hack like a small
black border on the bottom of the screen or some ui elements but those
can be fixed with TC X,Y Offset hack.
2018-02-21 17:06:16 +05:30
Akash b10c357065 GSdx-TC: Fix load size calculation in target update
Previously, the calculation for the size of data to be loaded was done
based on the rendering target buffer size and scaling multiplier, which
was totally wrong. This led to different resolutions having different
load sizes while the size of the real GS memory is common regardless of
the scaling variancies.

Hence use the default rendering target buffer size for the load size
independent of the scaling values. I've also removed a buffer height saturation
code which seemed unreliable.

Note: The accurate version of the code can be enabled using the macro
provided in config.h (which is more intensive on resources), the current
code goes along with the approach of maintaining a decent performance
level along with a formidable accuracy.
2018-02-06 18:00:22 +05:30
Jonathan Li f64488f818 gsdx:d3d: Fix fbmask conversion on texture shuffle
Port of 6580f4922f.
2018-02-06 00:03:25 +00:00
lightningterror 85c59fdb5e GSdx: Adjust DBZ BT2 CRC hack and id, add R&C3 EU to Automatic Mipmap.
Adjust region id for BT2.
Move the sky texture(depth) hack back to Partial level only for the EU
regions.  Effect is still not rendered correctly and causes a half
screen bottom issue.

Add R&C3 EU to Automatic Mipmapping.
2018-02-05 23:03:19 +00:00
lightningterror 86a8cbf402 GSdx: Change Skipdraw Maximum limit value.
Previously the limit was 1000, now 10000 in the GUI. It should help in
some rare cases where a higher number is needed without the need of ini
editing and value reset issues caused by the GUI.
2018-02-05 23:03:19 +00:00
lightningterror 4aa25c4971 GSdx: Disable Merge Sprite on native resolution.
Previously if HW hacks were enabled Merge Sprite was active(if checked) on
native resolution even if the GUI option was disabled, which in result
caused glitches in games on native resolution.

This should address that issue.
2018-01-13 23:18:57 +05:30
FlatOutPS2 fe27d3b25a GSdx: Add Dark Cloud CRCs to automatic mipmapping 2018-01-12 13:28:43 +05:30
lightningterror 9dc7930ff2 GSdx: Merge CRC hacks of Wild Arms 4 and 5
It's better to avoid duplicate code so let's merge these two together
as well.
2018-01-12 13:25:40 +05:30
lightningterror fbdd0f4394 GSdx: Remove/move/merge CRC hacks.
Remove Aggressive CRC hacks for SSX 3. Was used to remove the red lines
on older versions but no longer needed since the issue has been fixed.
Offered 1fps or less speed bump but it's not worth keeping for such a
minimal increase.

Merge all FFX CRC hacks in to one. They share the same code so it's
better to have one to avoid duplicate code.

Move CRC hack for Bleach Blade Battlers to Aggressive. It removes the
character shading. It can be used as a speed hack since the gains are
quite good from it. Around 15-30%.
2018-01-10 08:10:56 +05:30
lightningterror 29ef586f91 GSdx: Move CRC hacks for Soul Calibur 2&3 to DX level.
Add missing CRC ids for Soul Calibur 2 and 3.
Move CRC hacks to DX level. They are not needed anymore on OpenGL since
Depth Emulation fixes depth issues (shadows).
2018-01-09 20:36:14 +05:30
lightningterror 687c0b45e2 Gsdx: Tekken 5 Channel effect and CRC Hacks
Move CRC hack to Partial that fix the half screen
bottom issue since the effect is not rendered correctly.

Move CRC hack to Aggressive. These hacks are only
needed when running upscaled resolution. They skip the
blur effect which cause ghosting and some other screen issues.
Side effect is they also remove the channel effect on OpenGL
which is emulated correctly so let's put them on Aggressive.

Comment out a hack, it's unknown what the hack does atm.
If there are new issues then it will be added back.

Added comments what the hacks do.

Partial port for channel shuffle effect to Direct3D for Tekken5.
The effect is skipped and not rendered but now the top left
screen glitch has been resolved.
Note: At least Minimum CRC level is required for this to work.
2017-12-13 13:31:49 +01:00
lightningterror 41051f3cfe GSdx: Add hidden option to disable Nvidia hack
Add hidden option "UserHacks_DisableNVhack" to disable
the Nvidia hack on Direct3D which added black lines on the right
and bottom of the screen. Could be useful for Intel and AMD GPUs.

A better solution would be to add Vendor Id detection instead,
but this will do for now.

To disable the Nvidia hack add UserHacks_DisableNVhack=1 in GSdx.ini
2017-12-10 21:37:00 +05:30
lightningterror a74a5d95ab GSdx: Remove/move CRC hacks for Simpsons Game
Remove CRC hacks no longer needed.
Move CRC hacks to Aggressive level. Can be used as a performance hack.
2017-11-28 16:59:13 +05:30
lightningterror 3c74f0f907 GSdx: Extend support of "Preload Frame Data" for Direct3D.
Fixes glitchy water in Rogue Galaxy in Direct3D when the hack is
enabled.
Fixes Test Drive car reflection in Direct3D when the hack is enabled.

OTher games are affected as well.
2017-11-27 11:01:43 +01:00
lightningterror 6d49bf6fc6 GSdx: Automatic HW Mipmapping option
Adds automatic HW mipmapping support.
It relies on CRC ids so if a game does
not have their CRC id but needs mipmapping
it will not work until the id is added.

Add GUI menu and tooltip for Automatic mipmap
"Automatic (Default)"
This option will be default option from now on.

Rename "Very Slow" text option to "Slow" for full mipmap
as it caused the text not to fit properly in the menu.

Credits also go to @RedPanda4552 and @ssakash for helping
with the code.
2017-11-20 09:54:56 +01:00
lightningterror 431b4f6f17 GSdx: Rearrange HW Hacks
Rearrange the two columns of HW hacks, new arrangement
is done in alphabetical order on Windows and Linux.

Rename some hacks on Linux to match the windows version.

Some other minor tweaks as well.
2017-11-20 09:54:32 +01:00
Christian Kenny 5956493684 GSdx: Remove CRC hack for James Bond Everything or Nothing. Thes hack was used to avoid a VRAM spike, but isn't needed anymore. 2017-11-19 12:58:48 +05:30
lightningterror b31c23b37b GSdx: Add/move CRC hacks for Street Fighter EX3
Add missing CRC ids.
Move CRC hacks to OpenGL since the effects aren't emulated properly atm.
2017-11-13 16:04:42 +05:30
Akash 6299d9efa9 GSdx-Capture: Grayout configure button for codecs
The following patch grays out the configure button when there's no
configuration dialog available for the selected codec. What's the use in
clicking it when no dialog pops up? :P (I've been tricked by it lots of
times)
2017-11-11 12:50:22 +05:30
Akash 849c2f36d9 GSdx-Capture: Format event commands in switch-case
Use switch-case over chained if statements for the event commands, makes
the code more readable in my opinion.
2017-11-11 12:50:22 +05:30
lightningterror 1cbd4c5387 GSdx: Add CPU Frame buffer Conversion Hack
Add HW Hack that enables Framebuffer Conversion on the CPU instead of the GPU.
Can fix broken textures on games but at the cost of slower performance.
List of games: Harry Potter games, FIFA Street games.
Games like Call of Duty, Kung fu Panda might also be affected as well as others
especially on Direct3D.
Add HW Hack GUI option on Windows/Linux for 4-bit and 8-bit Framebuffer conversion hack
named "Frame Buffer Conversion".
2017-11-02 10:38:07 +01:00
Jonathan Li fe2dfdb3b9 gsdx: Remove "using namespace std" 2017-09-08 09:56:28 +02:00
Jonathan Li 82d1aba67f gsdx: Prefix std:: to ostringstream, pair, codecvt* 2017-09-08 09:56:28 +02:00