Commit Graph

4574 Commits

Author SHA1 Message Date
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
Jonathan Li 75c803df11 cdvdgigaherz:windows: Refactor to use early returns 2018-02-05 23:31:24 +00:00
Jonathan Li 5c158b4df9 cdvdgigaherz:windows: Avoid unneeded DVD ioctls
Avoid using the IOCTL_DVD_START_SESSION and IOCTL_DVD_END_SESSION ioctls
- it's not necessary to obtain an Authentication Grant ID (AGID) before
requesting the DVD physical format layer descriptor.
2018-02-05 23:31:24 +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
Christian Kenny 94b822df3b Resolve cases where GUI values are not updated when adjusting sliders with the scroll wheel. 2018-02-05 22:49:09 +00:00
Christian Kenny a5db116d00 Remove unused 'About Box' references on Linux and Windows from SPU2-X/CMakeLists, ect. 2018-02-05 22:49:09 +00:00
Christian Kenny 168402217f Make GUI more user-friendly by disabling some options when they aren't used. 2018-02-05 22:49:09 +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 57cbc901b7 SPU2-X: Prevent volume check from altering volume
Fixes issue in Tokyo Xtreme Racer Zero where checking the left master
volume would alter it.
2018-01-12 14:37:40 +01:00
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
Jonathan Li c9abec7cbe cdvdgigaherz: Always read 2352 bytes from CD sectors
For some CDs (i.e. Suikoden), trying to read a 2048 byte "cooked" sector
does not work. However, reading the raw sector and then extracting the
required 2048 bytes works fine, so let's do that.

This also makes it easier to port CD/DVD disk reading to operating
systems that don't provide CD/DVD interface conveniences.
2017-11-24 00:08:26 +00:00
Jonathan Li 0a4ff90bfb cdvdgigaherz: Detect CD track mode correctly
In every CD data sector, byte 15 indicates what the CD track mode is.
2017-11-24 00:08:26 +00: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 96b412ebb8 pcsx2|common|gsnull: Remove GSprintf API
It's not really used, and the OSD uses a different API.

The specified calling convention (stdcall) is also incorrect since
variadic functions are caller-clean, not callee-clean. The compilers
ignore the stdcall and just use cdecl (I think), though it does trigger
a -Wcast-calling-convention on clang.
2017-10-29 01:01:49 +01:00
Jonathan Li 9be61f83df cdvdgigaherz: Fix Q subchannel relative offset calculation
The wrong comparison was used, so all the relative offsets were
completely wrong. Fixes the wrong track issue in the CD player.

Regression introduced in f314c2a4d9.
2017-10-12 23:54:59 +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
Jonathan Li 7ed360e06b gsdx: Prefix std:: to shared_ptr 2017-09-08 09:56:28 +02:00
Jonathan Li 0cde534e30 gsdx: Prefix std:: to min and max 2017-09-08 09:56:28 +02:00
Jonathan Li 54c320c724 gdsx: Prefix std:: to map
Also use auto when appropriate.
2017-09-08 09:56:28 +02:00
Jonathan Li 2ff67f3741 gsdx: Prefix std:: to list
Also use auto when appropriate
2017-09-08 09:56:28 +02:00
Jonathan Li 5415b7ad5b gsdx: Prefix std:: to vector
Also use auto when appropriate
2017-09-08 09:56:28 +02:00
Jonathan Li 2aeb406e38 gsdx: Remove hash_{map,set} macros
Also use auto when appropriate.
2017-09-08 09:56:28 +02:00
Jonathan Li d57b812f36 gsdx: Prefix std:: to string and to_string 2017-09-08 09:56:28 +02:00
lightningterror d158ac5ffe GSdx-ogl:
Comment out driver version detection on amd as it was not working properly.
Rename bools for vendor ids.
2017-09-06 18:08:37 +02:00
lightningterror 481a884d25 GSdx - dx9: Edit Alpha Correction (FBA) tooltip.
Can cause graphical glitches in some games.
2017-09-06 18:05:21 +02:00
lightningterror f14c78cf12 GSdx-ogl: Fix GSdx crashing on Intel igpus
Regression was introduced in #1954
GSdx caused the emulator to crash when the renderer was restarted.

It may have affected older gpus from nvidia/amd
with older OpenGL support as well.
2017-09-06 17:14:21 +02:00
lightningterror 91d8e7c7c6 GSdx-Windows: Grey out OSD and Shader Configuration
Grey out OSD Configuration button for Direct3D
since only OpenGL supports the feature atm.
Grey out Shader Configuration button in Core Benchmark.
2017-08-31 21:11:43 +05:30
Jonathan Li 854f3d5b85 lilypad: Fix Lock Direction/Input/Both features
Regression was introduced in 2ea078beb5.

Coverity CID 178405.
2017-08-30 22:25:06 +01:00
Jonathan Li fecf8e3ed2 gsdx:ogl: Call swap interval function on rendering thread
The swap interval function must be called on the same thread that
rendering takes place on. This fixes an issue where the turbo speed and
frame limiter hotkeys fail to disable vsync when the OpenGL renderer is
used.
2017-08-30 21:08:54 +01:00
Alessandro Vetere a0aa585afd GSdx GSTextureCache: Using FastList instead of std::list. Various other improvements.
Using range loops where possible (correctly).
Using auto where possible (minimize code changes whenever it's decided to change back to a std container).
Use more efficient erase pattern (where possible).
Minor code tweaks.
2017-08-30 11:43:18 +02:00
Alessandro Vetere b2508dcb59 GSdx GSDevice: Using FastList instead of std::list. Using range loops (correctly). Using auto instead of declaring iterator type. 2017-08-30 11:43:18 +02:00
Alessandro Vetere 965334350f GSdx GSTextureCacheSW: Ported erase iterator trick. Using FastList instead of std::list. Using range loops. Using more efficient erase pattern. 2017-08-30 11:43:18 +02:00
Alessandro Vetere 676c7b89c7 GSdx GSFastList: Introducing the custom container template class. 2017-08-30 11:43:18 +02:00
Alessandro Vetere b431d172b7 GSdx GSDirtyRect: std::vector instead of std::list, to speedup linear scan. Improved const-ness. Using range loop. 2017-08-30 11:43:18 +02:00
Alessandro Vetere f8e89b694a GSdx GSLocalMemory: Reserve space required in the std::vector before adding elements to it. 2017-08-30 11:43:18 +02:00
Alessandro Vetere 3300470a29 GSdx GSCodeBuffer: std::vector instead of std::list, to speedup linear scan. Using range loop on destruction. 2017-08-30 11:43:18 +02:00
Alessandro Vetere 798d6a9134 GSdx GSDevice11: Fix unsigned warning under VS2015 with DEBUG build enabled. 2017-08-30 11:43:18 +02:00
Akash 8fe8cad8f9 GSdx-D3D11: Avoid undefined behavior in swapchain
PCSX2 sends a negative value (-1) to GSdx when adaptive mode is
specified for Vsync, this mode is exclusive to OpenGL at the moment
and is unimplemented on the D3D11 renderer. Also the present function
of swapchain only accepts values from 0 to 4 as parameter, hence
passing negative values to the function is undefined behavior.

So let's fallback to standard synchronization method on D3D11 when
PCSX2 requests for adaptive mode.
2017-08-25 22:40:42 +01:00
lightningterror 420f111611 GSdx: Add missing CRC for GT3 2017-08-16 17:35:32 +05:30
Gregory Hainaut c4bf09ad32 glsl: extension must be declared first
Mesa follows this rule of the standard.

Issue #2037

Shader compile fines now but SSO interface seems to be broken.
2017-08-12 15:37:29 +02:00
Gregory Hainaut 8c37418e44 onepad: print a more accurate message when only a single pad is detected 2017-08-10 22:00:33 +02:00
Gregory Hainaut d6c27c190d onepad: fallback on 2nd gamepad for the 2nd player
Close #2039
2017-08-10 22:00:28 +02:00
orbea 590b75453c Add Horipad One config 2017-08-09 17:56:18 -07:00
Gregory Hainaut 17d2d9217b gsdx ogl: test adaptive/late vsync driver support
Supported on GLX (but not Linux free driver) and WGL
2017-08-05 11:00:39 +02:00
Gregory Hainaut 2e4643a398 gsdx ogl: factorize SetVSync
Move common logic into base class
Add API to handle late Vsync (only stub)
2017-08-05 10:59:48 +02:00
Gregory Hainaut 2204885fbb gsdx ogl: factorize common context init code 2017-08-05 10:56:54 +02:00
lightningterror 66a87ce4d0 GSdx: Add missing CRC for Tomb Raider Underworld 2017-07-29 20:10:46 +05:30
Akash 31400b29c3 Merge pull request #2017 from lightningterror/dbzbt3-crcfixup
GSdx: Adjust CRC hack for DBZ BT3
2017-07-27 00:23:25 +05:30
lightningterror f5b4ccf741 GSdx: Adjust CRC for DBZ BT3
Fix CRC hacks on PAL version.
PAL version will no longer experience very high brightness/contrast
issues on stages in hw mode caused by an incorrect CRC hack.
Moved a CRC hack back to OpenGL mode only for the PAL version
because texture shuffling does not work properly on PAL games.
2017-07-26 20:19:44 +02:00
Jonathan Li 4e19f7adbf lilypad: Fix button detection issue in Kung Fu Panda
Kung Fu Panda becomes stuck at an autosave warning screen since it
cannot detect button presses correctly. This fixes the issue, though
potentially it may negatively affect some other games (see #1831,
unfortunately no game titles weren't mentioned).

The issue was introduced in commit 3075ec2203

Closes #1965.
2017-07-24 00:46:00 +01:00
Akash bd5e54e825 GSdx-Windows: Fix Shadeboost text bug
Forgot to replace `IDC_TEXT` with `IDC_VALUE` macros, due to this the
text containing the name of the options was being updated with the
current value of the option instead of updating the text designated for
holding the values.
2017-07-23 22:50:40 +01:00
puzzo888 1d983a6818 Update GSCrc.cpp (#2018)
gsdx crc: add Front Mission 5 CRC
2017-07-22 11:32:15 +02:00
Gregory Hainaut 390568ade9 onepad: add a first time wizard to notify that plugin auto-map the Gamepad/Joystick
It should avoid some bug reports of not-working-as-expected GUI

v2: English improvement
v3: ditto
v4: :)
2017-07-22 11:31:35 +02:00
Akash c3ff1074bb GSdx: Rework framebuffer height calculation
DBY isn't an offset to the frame memory but rather an offset to read
output circuit inside the frame memory, hence the top offset should also
be calculated for the total height of the frame memory. Fixes software
mode regression in Beyond Good and Evil.

Also handle cases when GetFrameRect() is called without any paramerer to
avoid an illegal value access violation on the DISP register.
2017-07-13 17:53:29 +02:00
Gregory Hainaut c5d35d434c glsl: reduce geometry shader complexity
output 1 strip of 2 triangles instead of 2 strips of 1 triangle.

Potentially it would reduce the geometry shader overhead. And it
might avoid a middle line in sprite in some AMD GPU/driver/OS
bad combination
2017-07-12 22:04:03 +02:00
Gregory Hainaut 38010432ee gsdx ogl: handle float integral coordinate for depth sampling
Fix depth effect regression on Nemo (issue #1979)
2017-07-12 22:03:47 +02:00
Jonathan Li 45ac69a1f6 gsdx:d3d11: Fix sprite geometry shader
Sprites always use flat shading.

Fixes #1980
2017-07-02 22:54:36 +01:00
Gregory Hainaut b8f7e12bc0 onepad: Add platform:Linux on game db entries that miss it
SDL doc:
"Mappings not belonging to the current platform or with no platform
field specified will be ignored (i.e. mappings for Linux will be ignored
in Windows, etc)."

Issue #1978
2017-07-02 16:55:50 +02:00
Gregory Hainaut 392816fae3 gsdx: store vsync state into an integer
allow to support late vsync (Adaptive vsync).
2017-07-02 15:14:45 +02:00
Gregory Hainaut 36fd2b6854 gsdx: remove the unused GSsetFrameLimit API 2017-07-02 15:09:47 +02:00
lightningterror 358954d69e GSdx-ogl: Printing console messages v2 (#1954)
GSdx-ogl: Console messages v2

Follow up to
commit/ec63b04719fd9c05a6aeeacb55dc1c54f5ef145b

Add intel broken driver wiki link message in console (OpenGL).
Print intel / amd buggy driver message once in console (OpenGL).
Pring texture barrier and viewpoint array info once in console (OpenGL).
2017-07-02 13:56:45 +02:00
lightningterror f88972013f GSdx: Remove/move DBZ:BT3 CRC
Enables character outlines to partially work on Full CRC.
DX9 has a small issue where a small black line at the bottom shakes when outlines are enabled.
You can either use Aggressive crc or x,y offset to fix the issue.

Removed unnecessary crc hack that caused shadows on stationary objects (trees) to move on Direct3D in a weird
motion blur type way when the player moved slightly.
2017-06-29 16:54:11 +02:00
Akash f2de553d63 GSdx: Cleanup warnings on MSVC
* Cast return value of IsEof() to bool. (Avoids int -> bool performance
warning error)
* Cast field and index to the required parameter type of AppendRawData.
2017-06-29 16:48:50 +02:00
Gregory Hainaut 7d75a73105 cmake: blacklist GCC 7.0 and GCC 7.1 (based on a small testcase)
GCC bug => https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80799

Close #1937
2017-06-29 14:51:50 +02:00
Jonathan Li 4a562401dc gsdx:d3d11: Fix incorrect geometry shader use
The sprite geometry shader was still being used even if the sprites were
converted on the CPUs.

Convert all sprites using the GPU - the fix isn't ideal, but it'll
likely have to do unless someone feels like porting over more of the
OpenGL changes to the D3D11 renderer.

Closes #1921.
2017-06-13 01:11:45 +01:00
Jonathan Li f8787ca6b9 gsdx: Fix variable initialisation issue
Class member variables are initialised in order of declaration in the
class definition. Move native_buffer to the top of the class definition
to avoid initialising m_width and m_height to random values.
2017-06-05 01:12:41 +01:00
Akash 23fa0657a7 GSdx-HW: Move scaling code to separate subroutine
Move the custom resolution scaling code to a separate subroutine and
allow future RT buffer resize calls when the buffer size isn't enough.

(Example: when a game's CRTC/Framebuffer size changes. The older code
didn't consider such cases)
2017-06-04 17:10:25 +02:00
Akash a04d9fa388 GSdx-HW: Revamp buffer size calculation
Added a more robust buffer size calculation mechanism for custom
resolutions. Improves performance in higher resolutions for games
which don't need a big buffer. There's a great boost in performance
at GS limited scenarios.

I don't even feel there's a need for the large framebuffer option right
now, For future - I plan on making the large framebuffer enabled version
as the default as the overhead is there only at situations when it's
necessary. Until then keeping the original code just to be on the safe
side in case any issue pops up.
2017-06-04 17:10:25 +02:00
Akash 266c114c1e GSdx-OGL: Extend ICO workaround to PAL videomode 2017-06-03 14:52:42 +02:00
Jonathan Li 11ed4de0aa gsdx: windows: Port xz dump readback
Also modernize and std:: a bit while I'm at it.
2017-06-03 14:52:01 +02:00
Jonathan Li 742b0edaa8 gsdx: Fix GS dump readback EOF handling
An EOF only occurs after attempting to read past the end of the file.
Account for this correctly, which fixes a potential infinite loop when
reading back an xz compressed GS dump.
2017-06-03 14:52:01 +02:00
Jonathan Li a6ed698fca unix: Remove LZMA_SUPPORTED define 2017-06-03 14:52:01 +02:00
Jonathan Li 3912f3330f windows: Link GSdx to liblzma (xz) 2017-06-03 14:52:01 +02:00
Jonathan Li 97d99632a6 gsdx: Use std::vector for xz dump output buffer
By default, Windows has a 1MB stack size limit per thread, so array
cannot be used...
2017-06-03 14:52:01 +02:00
Akash 49840bb621 GSdx: Implement SYNCV register bitfields
Add the bitfield structure of the undocumented SYNCV register,
potentially might be useful in proper height determination of the output
circuit for some weird games which still get it wrong but still haven't
figured out how it might be useful. Maybe some sort of black magic
formula with the vertical synchronization values?

The differential phase value seems to closely resemble the display
height value of the video modes (480 for NTSC, 576 for PAL) but after
some investigating into the differential phase, I have no clue on how
they might be even related. Hopefully the mystery will be unveiled in
the near future.
2017-05-24 13:44:52 +02:00
Jonathan Li e8f35f0bab onepad: Remove use of "using namespace std"
"using namespace std" was causing ambiguity issues and compile errors on
FreeBSD. Remove it.
2017-05-23 01:11:49 +00:00
Gregory Hainaut 802f1029e9 gsdx: dump gsdump in xz format directly
Reduce disk space. Easy to share.

It would be nice to port the code to Windows.
libzma code was taken from https://git.tukaani.org/xz.git

Note: only short dumps are supported so far. Big dump will freeze the interface during the compression.
Or will suck all the RAM.
Note2: a multithreaded encoder would badly impact the compression ratio

Thanks to Turtleli for all review comments
2017-05-21 23:45:35 +02:00
Gregory Hainaut 53b2fdf31c linux: requires liblzma (xz) to build GSdx 2017-05-21 23:45:35 +02:00
Gregory Hainaut 5c7d9d08e2 gsdx: defer init of GSUtil global object
Close #1935
2017-05-21 14:39:22 +02:00
Gregory Hainaut 9cb8c70434 gsdx linux: port to latest GTK3 API
* replace gtk_table by gtk_grid
  => it still misses some paddings
* Use 3.22 monitor API to query screen size
  => need to be tested
* directly add scrolled windows into a container without bothering with
  the viewport.

Code compile fine but wasn't tested.

v2: disable the code until I (or someone) get a chance to test and fix it.
2017-05-13 10:39:06 +02:00
Gregory Hainaut b15ab1b1cf gsdx: use = default instead of trivial constructor/destructor
reported by clang-tidy
2017-05-13 10:38:35 +02:00
Gregory Hainaut 595ad99a5b Cmake: what should have been the previous commit 2017-05-12 19:38:51 +02:00
Gregory Hainaut 05763b3669 cmake: better gcc + gsdx integration
Only set fabi-version on older GCC (5.0 and below)
Disable broken optimization for GCC7+ (until we find a better solution)
2017-05-11 23:14:06 +02:00
Gregory Hainaut ec63b04719 gsdx: only print once OpenGL status message
All credits go to @lightningterror

Fix #1882
2017-05-11 22:35:31 +02:00
Gregory Hainaut 0939424574 onepad: be sure m_unique_id is set even in case of early return
not important as the object will be deleted but please coverity
2017-05-11 21:47:39 +02:00
Gregory Hainaut 806ede241a onepad: remove useless code
reported by Coverity (I forgot to remove the code)
2017-05-11 21:46:28 +02:00
Akash 984fcfda2e Counters: Update videomode enum with proper prefix
Thanks to @colepcsx2 (https://github.com/PCSX2/pcsx2/pull/1896#commitcomment-21858717) for pointing it out!

I also updated the prefix in the inferior video mode detection of GSdx, I'm not even sure why we need the videomode info on the plugin side, might be useful someday.
2017-05-11 11:23:10 +02:00
orbea 2dcc85d64c Allow building the player with the legacy GSdx. 2017-05-11 09:50:01 +02:00
Akash 7a3239cba0 GSDX: Remove redundant parenthesis from combobox text
The third parameter of the GSSetting constructor already encloses the
text in parenthesis, so the right bracket here just messed up things.
2017-05-07 19:31:37 +01:00
Akash 5f449151a1 GSDX: Add missing grayouts to Shadeboost options
The shadeboost options text (Contrast, Brightness, Saturation) were not
grayed out when shadeboost was disabled, it was sort of inconsistent
compared to the behavior of external shader, so added grayouts to them
when shadeboost is disabled.

Also changed "OpenGL Very Advanced Custom Settings" to "OpenGL Advanced
Settings", the verbosity didn't help much in my opinion.
2017-05-07 19:31:37 +01:00
Gregory Hainaut ecd7107ccb onepad: move KeyName in the dialog and remove the now useless dialog.h
Note: use C++ construct to avoid C buffer.
2017-05-03 16:42:03 +02:00
Gregory Hainaut a71a549fa3 onepad: create a LUT for the pad key => SDL key mapping
Initial plan was to allow to remap the logical (SDL) key.
Unfortunately I feel some issues with the current enum.
* button/axis overlap
* trigger/axis must be handled differently

Nevertheless, code is easier this way
2017-05-03 12:33:42 +02:00
Gregory Hainaut 7597b31215 onepad: replace conf pointer by g_conf object 2017-05-03 12:03:56 +02:00
Gregory Hainaut db4f28f4ca onepad: replace key_status pointer by g_key_status object 2017-05-03 12:03:56 +02:00
Gregory Hainaut b09a82fb94 onepad: remove dead code 2017-05-03 12:03:56 +02:00
Gregory Hainaut 36528bb723 onepad: allow to save/reload SDL2 mapping from OnePAD2.ini file
SDL_GAMECONTROLLERCONFIG is nice but limited to a single entry. (Note it can still be used)

Option name is SDL2. Here an example

SDL2 = 03000000a306000020f6000011010000,PS2700 Rumble Pad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a4,start:b9,x:b0,y:b3,platform:Linux,
2017-05-03 12:03:56 +02:00
Gregory Hainaut 03899a6240 onepad: drop useless goto statement 2017-05-03 12:03:56 +02:00
Gregory Hainaut d8f88ee1e3 onepad: s/set_keyboad_key/set_keyboard_key/ 2017-05-03 12:03:56 +02:00
Gregory Hainaut 2159245224 onepad: add DUALSHOCK4 USB Wireless Adapator mapping
Close #1924
2017-05-02 10:07:17 +02:00
Jonathan Li 1d364f1991 spu2-x: Remove outdated website text file 2017-04-30 23:31:08 +01:00
Gregory Hainaut dc00af8829 psx|spu2x|gsdx: shift negative value is undefined in C standard
Instead does the negation after the shift

v2: assert shift <= 15 in clamp_mix
2017-04-30 21:20:23 +02:00
Gregory Hainaut 627212290e spu2x: comment unused variable 2017-04-30 21:20:23 +02:00
Gregory Hainaut d9e43b5d8d gsdx egl: rewrite the EGL implementation
Split code in 2 parts
* Base class (GSWndEGL) that implement the core EGL and GL context
* Derived class (GSWndEGL_X11/GSWndEGL_WL) that implement the backend to handle native resources

Note: Most backend code is only useful for GSopen1/PS1 mode. GSopen2 only requires
the AttachNativeWindow implementation

Code is based around EGL_EXT_platform extension that allow to select the platform at runtime.
Note: I think the extension was integrated in EGL 1.5

The X11 backend was mostly converted to XCB
The wayland backend is only a placeholder for future code

I don't know if MS windows is/could be supported with EGL_EXT_platform API

Code validated on Mesa. Proprietary drivers aren't yet tested.
2017-04-30 14:04:24 +02:00
Jonathan Li a3b3b4f657 gsdx: Fix uptr size on Windows x64 build 2017-04-29 23:22:02 +01:00
Gregory Hainaut 413d1828eb gsdx: call XInitThread on Linux dump replay 2017-04-29 13:05:28 +02:00
Gregory Hainaut 4b5aabe6b0 onepad: move an ok button to the right corner 2017-04-28 23:24:49 +02:00
Gregory Hainaut 5b4c948e43 onepad: clean the gamepad/joystick interface
Remove return of empty function
Use final/override qualifier
Remove useless virtual

Thanks turtleli for the advices
2017-04-28 11:27:19 +02:00
Gregory Hainaut f91faacc53 onepad: remove autorepeat deadcode
a9af374 onepad: don't touch autorepeat setup
2017-04-28 11:27:19 +02:00
Gregory Hainaut e408b3ab02 onepad: replace pthred/queue with std::mutex/mt_queue
v2: based on turtleli feedback
rename m_q into m_queue
add includes
2017-04-28 11:27:19 +02:00
Gregory Hainaut 7d771229e2 onepad: add a GUI list box to select joypad based on UID
Note: remove the cancel management of the small modal
It is easier, it doesn't always work anyway
2017-04-28 11:27:19 +02:00
Gregory Hainaut 31d8142a0d onepad: plug uid instead of the index
ini must be recreated
2017-04-28 11:27:19 +02:00
Gregory Hainaut 3cff588eff onepad: add an unique identifier 2017-04-28 11:27:19 +02:00
Gregory Hainaut a50766384b onepad: use range loop for hash iteration 2017-04-28 11:27:19 +02:00
Gregory Hainaut c183de5662 onepad: add hot-plugging support
Note: pad to player mapping is done later

v2: remove the useless print
2017-04-28 11:27:19 +02:00
Gregory Hainaut 1b369520ed onepad: drop the pad if an error was detected
v2:
init m_no_error in gamepad constructor
2017-04-28 11:27:19 +02:00
Gregory Hainaut 2e09c7faf3 onepad: Move init/destroy code to constructor/destructor
* prefix remaining member with m_
* Use array for m_effect_id
* Properly Destroy/Close Haptic/Joystick/Game Controller
 (except on older SDL versions which are buggy)
2017-04-28 11:27:19 +02:00
Gregory Hainaut 4b24cfa5ea onepad: use external resource to support more joysticks 2017-04-28 11:27:19 +02:00
Gregory Hainaut 9da843c994 onepad: plug SDL2 API game controller 2017-04-28 11:27:19 +02:00