Commit graph

1746 commits

Author SHA1 Message Date
Connor McLaughlin 400ee3d9b3 OpenGLHostDisplay: Fix software cursor rendering 2020-07-01 01:57:25 +10:00
Connor McLaughlin 8cd9e0887e libretro: Use framebuffer view dimensions not texture dimensions 2020-07-01 01:57:25 +10:00
Connor McLaughlin 70f4ce7cde libretro: Add auto analog mode option for controllers 2020-07-01 01:57:25 +10:00
Connor McLaughlin f65a50d84b HostDisplay: Use surface scale for drawing software cursor 2020-07-01 01:57:25 +10:00
Connor McLaughlin bf08385051 WindowInfo: Add surface_scale field 2020-07-01 01:57:25 +10:00
Connor McLaughlin e374853cf5 HostInterface: Better configuration of custom crosshair/software cursor 2020-07-01 01:57:25 +10:00
Connor McLaughlin f0c1dfefe7 Core: Add resources file
Currently includes a crosshair icon.
2020-07-01 00:56:46 +10:00
Connor McLaughlin ed6065d7f5 D3D11HostDisplay: Fix software cursor rendering 2020-07-01 00:56:46 +10:00
Connor McLaughlin 7d88bba764 Common: Add an image helper class 2020-07-01 00:56:46 +10:00
Connor McLaughlin 78cf890c6c Qt: Hook up per-controller-type-settings to UI 2020-07-01 00:56:46 +10:00
Connor McLaughlin bcc6d5d53d Qt: Support float settings in setting widget binder 2020-07-01 00:56:46 +10:00
Connor McLaughlin 0b11a14e24 Qt: Better handling of default settings not in ini 2020-07-01 00:56:46 +10:00
Connor McLaughlin 4dc9e10777 HostInterface: Support per-controller-type settings 2020-07-01 00:56:46 +10:00
Connor McLaughlin f3b2953e40 Common/StringUtil: Add FromChars overload for bool 2020-07-01 00:56:46 +10:00
Connor McLaughlin 38aa485f8f libretro: Analog controller/DualShock support 2020-06-30 03:03:56 +10:00
Connor McLaughlin 51b4776b8f libretro: Work around video driver switching crash in RetroArch 2020-06-30 03:03:56 +10:00
Connor McLaughlin 861b98ed3b libretro: Additional work
- Reliable resolution switching.
 - Hook up logging.
 - Memory cards and controller type settings.
 - Save state support.
 - Direct3D support.
2020-06-30 03:03:56 +10:00
Connor McLaughlin 2a38090e7a HostDisplay: Move most backend logic to FrontendCommon 2020-06-30 03:03:56 +10:00
Connor McLaughlin 936d92dfb8 System: Add option to force start in software mode 2020-06-30 02:44:19 +10:00
Connor McLaughlin 919494079b System: Make saving screenshots to state optional 2020-06-30 02:44:09 +10:00
Connor McLaughlin dc7cc3b67f Common/ByteStream: Fix buffer corruption in MemoryByteStream 2020-06-30 02:44:01 +10:00
Connor McLaughlin e5f56fcd33 MDEC: Slightly reduce block timing
Fixes FMVs in Disney's Treasure Planet.

Probably needs sub-block timing emulated at some point.
2020-06-29 14:45:14 +10:00
Connor McLaughlin 614ea632a5 SPU: Log warning when data is lost due to reg clear 2020-06-29 14:45:03 +10:00
Connor McLaughlin ea1066f76e GL/StreamBuffer: Use glBufferData() on all drivers 2020-06-29 14:44:16 +10:00
Connor McLaughlin 745b53e4cb GL/Context: Fix crash in some GLX drivers 2020-06-27 17:35:08 +10:00
Connor McLaughlin 15afe4f436 GPU/Vulkan: Fix incorrect vkCmdPushConstants() call 2020-06-27 16:26:20 +10:00
Albert Liu 1a45ee3018 CommonHostInterface: Use largeImage fields in Discord presence payload
Fixes application icon not showing up in Discord Rich Presence.
2020-06-26 22:28:48 -07:00
Connor McLaughlin 0b261e836b GPU/Vulkan: Fix shader VRAM copies
Fixes battle transitions in Final Fantasy IX.
2020-06-27 03:00:03 +10:00
Connor McLaughlin 58b0e6859a Frontend: Reset/restore GPU state before saving screenshot
Fixes driver crashes in Vulkan.
2020-06-27 02:59:58 +10:00
Connor McLaughlin b94de1924d GPU/ShaderGen: Round normalized colours before converting to integer
Fixes broken rendering/precision issues on Intel Ivy Bridge GPUs.

Many thanks to linkmauve from Dolphin for the idea - seems Dolphin also
had a similar problem a few years ago.
2020-06-26 21:40:53 +10:00
Connor McLaughlin 16ca214d09 GPU/OpenGL: Fix VRAM writes breaking on <GL4.3 2020-06-26 21:39:37 +10:00
Connor McLaughlin 34d7b752d8 GPU/ShaderGen: Enable GL_ARB_shader_storage_buffer_object on <GL4.3 2020-06-26 21:39:12 +10:00
Connor McLaughlin 998ec85b16 CDROM: Log slow sector reads in Release builds too 2020-06-26 17:17:25 +10:00
Connor McLaughlin 737337a526 CDROM: Fix incorrect sector read after incomplete seek->read
Fixes crash in Disney's The Lion King - Simba's Mighty Adventure.
2020-06-26 17:15:41 +10:00
Connor McLaughlin b8a2487abf GPU/HW: Fix incorrect offset application in line upscaler
Fixes green line in pause screen of Spyro.
2020-06-26 03:26:06 +10:00
Albert Liu 788a9a6768 Qt: Reset palette and style when selecting default theme
Fixes palette and style getting stuck when switching to default theme
after having used dark fusion theme earlier in the same session.
2020-06-24 16:08:36 -07:00
Connor McLaughlin ad727c7991 CPU/Recompiler: Check interrupts after mtc0 sr/cause
Fixes Jackie Chan Stuntmaster in Recompiler mode.
2020-06-25 01:33:00 +10:00
Connor McLaughlin b00f50c927 CPU/Recompiler: Emit test/jz instead of bt/jnc for bits < 8
Likely very slightly faster.
2020-06-25 01:33:00 +10:00
Connor McLaughlin 55a2c73097 Qt: Add Dark Fusion theme 2020-06-25 01:33:00 +10:00
Connor McLaughlin a6d976240a Qt: Add theme selection and dark theme 2020-06-25 01:33:00 +10:00
Albert Liu 28d38c9867 LibretroHostInterface: Report aspect ratio setting to frontend 2020-06-23 09:24:50 -07:00
Albert Liu 7c206766ae HostInterface: Save default setting to AspectRatio, not PixelAspectRatio
Fixes inconsistency with default settings saving to PixelAspectRatio,
but loading from AspectRatio instead. PixelAspectRatio was not being
used elsewhere.
2020-06-23 09:24:50 -07:00
Connor McLaughlin 832c7a1192 Vulkan: Support using SSBOs instead texel buffers 2020-06-24 01:40:01 +10:00
Connor McLaughlin 08ef8c1e8d GPU/HW: Support SSBOs instead of texture buffers for VRAM writes 2020-06-24 01:39:53 +10:00
Connor McLaughlin eec37df1e0 Settings: Make the recompiler the default CPU mode 2020-06-24 01:39:42 +10:00
Connor McLaughlin f6aae5e67c Settings: Add 2:1 (VRAM 1:1) display aspect ratio 2020-06-24 01:39:35 +10:00
Connor McLaughlin f32028a736
Merge pull request #566 from ggrtk/analog-controller
ControllerInterface: Customizable axis scaling and deadzone size
2020-06-24 01:33:26 +10:00
Connor McLaughlin 2cfb811569
Merge pull request #565 from lioncash/stamp
timestamp: Correct duplicate conditionals
2020-06-24 01:32:52 +10:00
Connor McLaughlin 84d4423719
Merge pull request #564 from lioncash/leak
file_system: Prevent resource leaks in DeleteDirectory()
2020-06-24 01:31:52 +10:00
Connor McLaughlin da0885af0d
Merge pull request #563 from lioncash/fs
file_system: Correct duplicate conditionals in CreateDirectory()
2020-06-24 01:30:04 +10:00
Connor McLaughlin 4b31034efa
Merge pull request #562 from lioncash/amp
spu: Make use of logical AND within IsPitchModulationEnabled()
2020-06-24 01:29:42 +10:00
Albert Liu 293c2f50cd ControllerInterface: Make axis-to-button deadzone customizable 2020-06-23 08:15:17 -07:00
Albert Liu 6b7c068f83 ControllerInterface: Implement axis scaling for axis-to-axis mappings
This feature allows us to work around analog stick range issues at the
intercardinal directions in certain titles (e.g. Rockman DASH 2) caused
by modern controllers having a tighter logical range of reporting than
PS1 analog controllers.
2020-06-23 08:14:37 -07:00
Lioncash 4c82705e34 timestamp: Correct duplicate conditionals
Previously, the milliseconds field wasn't being used in comparisons on
Windows.
2020-06-23 06:24:06 -04:00
Lioncash 987b11a1d2 timestamp: Implement operator!= in terms of operator==
Same behavior, less code.
2020-06-23 06:20:29 -04:00
Lioncash 83a01c27a2 file_system: Prevent resource leaks in DeleteDirectory()
We need to remember to close the search handle in the error cases.
2020-06-23 06:13:54 -04:00
Lioncash 292a0a6800 file_system: Correct duplicate conditionals in CreateDirectory() 2020-06-23 06:09:38 -04:00
Lioncash 20d17b953b spu: Make use of logical AND within IsPitchModulationEnabled()
It seems awfully suspect to use a bitwise AND here.
2020-06-23 06:00:11 -04:00
Connor McLaughlin 3ca9d578b3
Merge pull request #559 from lioncash/field
bitfield: Make interface fully constexpr
2020-06-23 19:58:06 +10:00
Connor McLaughlin 6de24f620e
Merge pull request #558 from lioncash/psf
system: Correct error dialog in PSF load case
2020-06-23 19:57:19 +10:00
Connor McLaughlin daf9afe221
Merge pull request #560 from lioncash/xy
playstation_mouse: Amend initial x value
2020-06-23 19:56:43 +10:00
Connor McLaughlin e228588823
Merge pull request #561 from lioncash/rectangle
rectangle: Correct assignment of right within SetExtents
2020-06-23 19:56:16 +10:00
Lioncash e064196f25 rectangle: Correct assignment of right within SetExtents
Previously left was being assigned twice in a row.
2020-06-23 05:50:43 -04:00
Lioncash 7a05f8402b playstation_mouse: Amend initial x value
Previously the last host y position was being written to twice, which
seems like a typo.
2020-06-23 05:48:25 -04:00
Lioncash 0abe4c60b4 cd_image: Make use of std::array where applicable
Simplifies array copies.
2020-06-23 05:35:26 -04:00
Lioncash a27aa45e6a bitfield: Make interface fully constexpr
Given C++17 is being used, the entire interface is capable of being
constexpr.
2020-06-23 05:27:40 -04:00
Lioncash 76af96f15b system: Correct error dialog in PSF load case
Corrects the error message to state that the PSF couldn't be loaded
rather than EXE.
2020-06-23 05:13:47 -04:00
Connor McLaughlin 840a80670f CDROM: Reset XA resampler on file switch
Pure guess work, probably won't affect anything.
2020-06-22 15:58:22 +10:00
Connor McLaughlin 9265dd72ba Vulkan/ShaderCache: Skip writing pipeline cache when size matches
Comparing all the data wasn't working, at least for Intel. I'm guessing
there's some modification time field in there which keeps changing.
2020-06-22 15:58:10 +10:00
Connor McLaughlin eaca5eca07 GPU/Vulkan: Use Metal layer instead NSView on macOS. 2020-06-22 15:58:07 +10:00
Connor McLaughlin f846817848 Vulkan: Fix crash when opening settings window -> resizing 2020-06-22 15:58:00 +10:00
Connor McLaughlin 1455e793d5 Vulkan: Fix crash when drag-resizing window 2020-06-22 15:57:54 +10:00
Connor McLaughlin 82a0ad8a10 Qt/Settings: Make GPU adapter more sensible
Add a default entry, rather than leaving it blank.
2020-06-22 15:57:43 +10:00
Connor McLaughlin eb1b6b6272 GPU/HW: Fix D3D11 upscaled line GS 2020-06-22 15:53:05 +10:00
Connor McLaughlin 73cdd676ad GPU/Vulkan: Fix incorrect srcfactor selection 2020-06-21 16:24:37 +10:00
Connor McLaughlin ce75168238 GPU/Vulkan: Don't assume support for dual-source blend 2020-06-21 01:33:15 +10:00
Connor McLaughlin bf60f9dd61 GPU/Vulkan: Use geometry shader for line rendering at >1xIR 2020-06-21 01:33:08 +10:00
Connor McLaughlin 97ef905f10 GPU/Vulkan: Fix race/crash when changing settings live 2020-06-21 01:33:00 +10:00
Connor McLaughlin f54876deb0 Vulkan/Context: Use VK_MVK_macos_surface not VK_EXT_metal_surface
Will change this over some time in the future when I can work on a Mac
again and set up the layer.
2020-06-20 20:37:38 +10:00
Connor McLaughlin fed53b565f GPU/Vulkan: Fix inverted transparency
Fixes FF7 menu, map screen in Porsche Challenge.
2020-06-20 20:22:24 +10:00
Connor McLaughlin a08c398d4b GPU/HW: Provide depth in vertex rather than computing
Fixes mask bit effects in Vulkan (e.g. Silent Hill).
Significantly reduces the number of mask bit refreshes in OpenGL/Vulkan.
2020-06-20 20:21:33 +10:00
Connor McLaughlin 7192b8d83a Vulkan/ShaderCache: Hopefully fix macOS build 2020-06-20 03:39:46 +10:00
Connor McLaughlin 4d827e23c5 Qt: Add GPU/adapter selection to settings 2020-06-20 03:34:19 +10:00
Connor McLaughlin 77291096db Settings: Add GPU adapter option and hook up to D3D11/Vulkan 2020-06-20 03:34:19 +10:00
Connor McLaughlin 1b5f8db2fc Vulkan/Context: Support specifying GPU to use 2020-06-20 03:34:19 +10:00
Connor McLaughlin 4a04800132 Vulkan: Handle potential duplicate GPU/adapter names 2020-06-20 03:34:19 +10:00
Connor McLaughlin 7fce9b102e FrontendCommon: Add GPU enumeration methods to D3D11/Vulkan host displays 2020-06-20 03:34:19 +10:00
Connor McLaughlin 85edbce3ca Qt: Use FrontendCommon D3D11 host display wrapper 2020-06-20 03:34:19 +10:00
Connor McLaughlin 1e26ded73c SDL: Use FrontendCommon D3D11 host display wrapper 2020-06-20 03:34:19 +10:00
Connor McLaughlin 6eb2079088 FrontendCommon: Add D3D11 helper for host display 2020-06-20 03:33:34 +10:00
Connor McLaughlin c023bcd234 Linux build fix 2020-06-19 01:36:46 +10:00
Connor McLaughlin 49a9f01327 Qt: Support Vulkan 2020-06-19 00:18:53 +10:00
Connor McLaughlin d168947ae4 SDL: Support Vulkan 2020-06-19 00:18:51 +10:00
Connor McLaughlin 6aacf0019a FrontendCommon: Add a Vulkan host display interface 2020-06-19 00:18:19 +10:00
Connor McLaughlin 49d11988bf Core: Add Vulkan GPU renderer 2020-06-19 00:18:17 +10:00
Connor McLaughlin 3cd5b7ae74 Core: Add Vulkan renderer types 2020-06-19 00:18:14 +10:00
Connor McLaughlin 1399e95b77 Common: Add a range of Vulkan helper/wrapper classes 2020-06-19 00:18:07 +10:00
Connor McLaughlin 63cc4ab197 CommonHostInterface: Release save state selector before display
This can have GPU objects, so needs to be released first.
2020-06-19 00:16:59 +10:00
Connor McLaughlin bd164d2735 Common/FileSystem: Add {Read,Write}BinaryFile helpers 2020-06-19 00:16:59 +10:00
Connor McLaughlin 0890164987 Common: Add scope_guard.h from Dolphin 2020-06-19 00:16:59 +10:00
Connor McLaughlin 47138aa9cf GPU: Consider interlaced rendering for GPU timings
Fixes menu screen flickering in Chrono Cross, summary screen breakage in
Mr. Driller G.
2020-06-18 17:37:13 +10:00
Albert Liu d005025f8f Qt/AdvancedSettings: Fix swapped widget bindings 2020-06-17 12:34:41 -07:00
Connor McLaughlin 7aa71529d6
Merge pull request #551 from ggrtk/advanced-settings
Qt: Connect tweak/hack settings to Qt frontend
2020-06-18 03:12:13 +10:00
Connor McLaughlin 8daff5e677 Common: Add dimensional_array.h 2020-06-18 03:10:33 +10:00
Connor McLaughlin 0e3fdebb11 Qt: Don't set native window to GL surface
Might be related to the GLX crashes some people are experiencing...
2020-06-18 03:10:33 +10:00
Albert Liu b7d9ce98e8 Qt: Connect tweak/hack settings to Qt frontend 2020-06-16 09:53:18 -07:00
Albert Liu 53a2b8c03d SDL: Update advanced settings description 2020-06-16 09:53:18 -07:00
Albert Liu 8a94fc944a CommonHostInterface: Fix minor log message typo 2020-06-16 09:53:18 -07:00
Connor McLaughlin b141042952
Merge pull request #549 from ggrtk/qt-rebind-all
Qt: Simplify Rebind All behavior
2020-06-15 13:26:48 +10:00
Albert Liu 1b9dbc1a0b Qt: Add help text note about binding rumble 2020-06-14 16:29:25 -07:00
Albert Liu fd4e41bc7d Qt: Simplify Rebind All behavior 2020-06-14 16:06:29 -07:00
Connor McLaughlin 41d66f5c73 Qt: Add icon to executable 2020-06-15 03:29:35 +10:00
Connor McLaughlin 91734e35b0 SDL: Add icon to executable 2020-06-15 03:29:21 +10:00
Connor McLaughlin fc0560087f GPU: Skip primitives where clip area is invalid
Fixes palettes being overwritten/menus being broken in
Yoshimoto Mahjong Club Deluxe.
2020-06-14 01:01:01 +10:00
Connor McLaughlin 16c47f4553 Settings: Change default GPU FIFO size to 16
While this has the potential to be slower, there seems to be quite a few
games which break with the larger FIFO. In some cases, they wait for the
DMA interrupt, then busy wait for the GPU to go idle again. If the FIFO
is larger, this wait time till be longer, breaking things.
2020-06-13 01:40:05 +10:00
Connor McLaughlin bda528d70a GPU: Alter timings to reflect new clock 2020-06-13 01:40:05 +10:00
Connor McLaughlin dad63f2303 GPU: Run draw clock at sysclk * 2 2020-06-13 01:40:05 +10:00
Connor McLaughlin 0dfb9f7d90
Merge pull request #548 from ggrtk/qt-aboutdialog
Qt: Add about dialog
2020-06-12 18:50:06 +10:00
Albert Liu 4f07e30dc0 Qt: Fix broken font in about dialog on Windows 2020-06-11 10:14:27 -07:00
Albert Liu aeead1b0a6 Fix MSVC build 2020-06-11 10:09:02 -07:00
Connor McLaughlin 8d2c7db224 Qt: Source input profiles from program and user directory
This way Linux users as well as Windows users who use the Documents
user directory can use the shipped input profiles.
2020-06-12 02:47:40 +10:00
Albert Liu da9188a771 Qt: Fix broken links in about dialog 2020-06-11 09:36:14 -07:00
Albert Liu 4c29b6f30c Qt: Add about dialog 2020-06-11 09:26:04 -07:00
Connor McLaughlin 2504d187d3 Qt: Add separate menu items for rescan all/scan for new games 2020-06-12 01:49:17 +10:00
Connor McLaughlin 34d27bad4a Timers: Add missing event update after resetting count/target 2020-06-12 01:37:39 +10:00
Connor McLaughlin bdf9c91271 GPU: Fix double shader compilation 2020-06-09 03:04:02 +10:00
Connor McLaughlin 86f0d32e70 CubebAudioStream: Fix crash in PulseAudio on Linux 2020-06-09 03:03:53 +10:00
Connor McLaughlin d7f083559e Add initial libretro implementation 2020-06-09 02:44:42 +10:00
Connor McLaughlin f5fd37c4c4 Qt: Fix compatibility column not showing by default 2020-06-09 02:41:24 +10:00
Connor McLaughlin 075380f8e0 Move most helper logic from base HostInterface to FrontendCommon 2020-06-09 02:35:37 +10:00
Connor McLaughlin 444a09efd4 AudioStream: Don't call FramesAvailable() while locked 2020-06-09 02:05:49 +10:00
Connor McLaughlin 7b4b2d5dc5 GameList: Ignore all whitespace characters in SYSTEM.CNF
Fixes some games not having serials displayed, e.g. Chrono Cross.

Thanks to @TzakShrike for narrowing down the cause.
2020-06-08 03:05:27 +10:00
Connor McLaughlin a56d7385eb SDL: Support rendering software cursor in D3D11 2020-06-08 02:59:38 +10:00
Connor McLaughlin f9eb3719e3 HostInterface: Add software cursor mode
This will probably need to be extended in the future.
2020-06-08 02:53:55 +10:00
Connor McLaughlin f98bb033ff HostDisplay: Add an interface for setting software cursor 2020-06-08 02:53:37 +10:00
Connor McLaughlin 29d918dbb0 Qt/GameProperties: Implement hash calculation 2020-06-08 01:19:54 +10:00
Connor McLaughlin 8b04b74f27 Common: Add a CD image hasher class 2020-06-08 01:19:35 +10:00
Connor McLaughlin b4e45e865a GPU: Use correct clocks for NTSC region
Fixes sync drift in Bust-a-Move 1/2.
2020-06-07 19:15:06 +10:00
Albert Liu 2490618d0a CMake: Always run gen_scmversion script on rebuilds
Fixes issue where scmversion.cpp would not be regenerated with updated
Git info on rebuilds, causing an outdated version to be displayed in
window titles.
2020-06-07 00:49:14 -07:00
Connor McLaughlin b9bfe30b1e SDL: Fix compilation on older versions 2020-06-07 01:38:38 +10:00
Connor McLaughlin bc9246b444 Qt: Add inline help to audio settings 2020-06-07 01:30:05 +10:00
Connor McLaughlin 531c3ad5fa AudioStream: Replace buffer queue with ring buffer
Should achieve a decent overall minimum latency reduction.
2020-06-07 01:22:03 +10:00
Connor McLaughlin 6acd8b27dd Qt: Prevent lag disabling power on buttons when starting 2020-06-06 03:44:57 +10:00
Connor McLaughlin 009e474c51 AnalogController: Fix inverted motor binding 2020-06-05 22:32:51 +10:00
Connor McLaughlin 88502e130e Settings: Fix memory cards not syncing with disc change in title mode 2020-06-04 02:15:29 +10:00
Connor McLaughlin c8e1881ea9 GPU/HW: Clear dirty rectangle when updating shadow texture
Fixes high GPU usage in Robbit mon Dieu in D3D11, should improve overall
performance slightly when VRAM copies are heavily used.
2020-06-02 21:45:38 +10:00
Connor McLaughlin 9ea163e666 GPU/D3D11: Fix mask test in same vertex batch
Fixes shadows in Bust a Groove 2, probably others.
2020-06-02 20:52:07 +10:00
Connor McLaughlin 3848276fa2 GPU: Improvements to height calculations when interlaced
Fixes screen doubling with interlacing force disabled, as well as
incorrect cropping area when non-interleaved framebuffers are used.
2020-06-02 20:52:07 +10:00
Connor McLaughlin 8eb3ac69b2 SPU: Update ADSR envelope when register changes
Fixes menu sounds in Final Fantasy 7 staying audible for too long.
2020-06-02 01:59:49 +10:00
Connor McLaughlin dcfb929de5 CDROM: Fix double-reads hitting incorrect sector again
Fixes Bedlem / Rise 2 without breaking Vigilante 8 - 2nd Offense.
2020-06-02 00:59:13 +10:00
Connor McLaughlin 5e7fd5aa71 CDROM: Fix integer overflow in seek timing calculation 2020-06-01 22:20:26 +10:00
Connor McLaughlin 1947080d91 CDROM: GetlocL should return an error while seeking
Or more specifically, the coarse seek part. Verified with hardware
tests.
2020-06-01 21:40:28 +10:00
Connor McLaughlin e5fc47a008 Bus: Further tweaks to access timing
Matches closely to my console now.

Fixes Otona No Asobi again.
2020-06-01 21:39:33 +10:00
Connor McLaughlin 7d66569d69 GPU/HW: Fix bobbing screen with interlacing disabled
Fixes bobbing screen in Tom and Jerry in House Trap.
2020-06-01 03:26:35 +10:00
Connor McLaughlin f856a8ad65 CDROM: Ignore pending setloc after read/play
Fixes games which send a second Setloc after reading, e.g. Army Men -
Sarge's Heroes.
2020-05-31 17:03:15 +10:00
Connor McLaughlin af1c4f9378 Fix MSVC build 2020-05-31 16:42:51 +10:00
Connor McLaughlin a800f73a8f
Merge pull request #516 from ggrtk/negcon
Controller: Add NeGcon support
2020-05-31 16:41:48 +10:00
Connor McLaughlin bf6faafc54 GameList: Fix cache getting corrupted from unknown games 2020-05-31 16:11:15 +10:00
Albert Liu ee3a96011e Controller: Add NeGcon support 2020-05-30 23:11:02 -07:00
Connor McLaughlin e293c22cde DMA: Run manual channels while halted
Fixes games which have looping linked lists but still expect CD/OTC
reads to work.

Also caps the number of ticks used when looping linked lists are
present, which doesn't steal so much time from the CPU per batch.

Fixes:
 - Victory Spike
 - Magical Drop III - Yokubari Tokudai-gou!
 - Yuukyuu no Eden - The Eternal Eden
 - Loading screen in World Cup Golf - Professional Edition
2020-05-31 02:43:51 +10:00
Connor McLaughlin 2d067bb101 CDROM: Fix warning log spam on command 2020-05-31 02:41:42 +10:00
Connor McLaughlin de8aef4f44 Qt: Fix pause button repeatedly triggering sometimes 2020-05-31 02:41:31 +10:00
Connor McLaughlin 0672cf4873 CDROM: Implement a heuristic for command cancelling
See note in source. Fixes loading times and slowed down audio in Voice
Idol Collection - Pool Bar Story.
2020-05-30 22:04:15 +10:00
Connor McLaughlin a4f79de7f6 CDROM: Return error for incorrect parameter count 2020-05-30 21:59:03 +10:00
Connor McLaughlin 69a00a64e6 Bus: Adjust memory access and MMIO timing
Hasn't broken anything yet, but needs more thorough testing.
2020-05-30 02:19:12 +10:00
Connor McLaughlin 07e8ab4446 CDROM: Increase seek delay by one sector
Fixes Resident Evil 2.
2020-05-30 02:19:01 +10:00
Connor McLaughlin 38fc843541 GPU/HW: Use upscaled texture coordinates for non-paletted textures
Fixes games which use render-to-texture effects not being upscaled.
2020-05-30 02:19:01 +10:00
Connor McLaughlin fe364d5e8b SDL: Include frame times in status bar 2020-05-30 02:19:01 +10:00
Connor McLaughlin 13c3426148
Merge pull request #506 from ggrtk/analog-controller
Update input profiles and input profile handling
2020-05-28 13:06:40 +10:00
Albert Liu e1e3cf4f5a CommonHostInterface: Simplify input profile saving 2020-05-27 17:49:06 -07:00
Albert Liu f8fea1b215 INISettingsInterface: Return bool on saving settings 2020-05-27 17:48:33 -07:00
Connor McLaughlin 4e8da3cb41 CDROM: Replace sound map assert with error log
I am not aware of any games which use it yet, so have no way of testing
if the implementation is correct.
2020-05-28 03:07:33 +10:00
Connor McLaughlin 06621a9547 SDL: Fix second port controller/memcard type changes 2020-05-28 03:07:18 +10:00
Connor McLaughlin 2dd7f48d97 CDROM: Don't skip pregap for CDDA
Fixes music looping in Treasure Gear.
2020-05-28 02:42:18 +10:00
Connor McLaughlin 2264849151 CDROM: Update position when double-seeking
Doesn't fix anything I'm aware of, but makes sense.
2020-05-28 02:41:53 +10:00
Albert Liu 1f74d46d39 AnalogController: Use proper upper bound when validating axis_code 2020-05-26 23:23:44 -07:00
Connor McLaughlin 51c75554e6 Qt: Fix overlapping options in general settings 2020-05-27 02:13:04 +10:00
Connor McLaughlin 81a7b147fc System: Add option to disable loading memory cards from save states 2020-05-27 02:06:56 +10:00
Connor McLaughlin b17a5832e5 System: Simplify save state booting
Fixes memory card warning messages on load state.
2020-05-27 02:01:11 +10:00
Connor McLaughlin d2c7639dd8 System: Update per-game memory cards on load state
Prevents saves being written to incorrect card after loading.
2020-05-27 00:41:58 +10:00
Connor McLaughlin eb6b490c76 SDL: Ignore unused key modifiers 2020-05-27 00:27:52 +10:00
Connor McLaughlin 445bd02cad GPU/HW: Interlace at native resolution rather than 1x
Also fixes screen bobbing when interlacing is disabled.
2020-05-27 00:27:27 +10:00
Connor McLaughlin 23436f08ba GPU/HW: More improvements to GPUSTAT.31
Fixes True Pinball without breaking intros to Final Fantasy 7/8.
2020-05-26 22:57:58 +10:00
Connor McLaughlin 04f131f979 GPU/OpenGL: Fix 24-bit progressive scanout regression 2020-05-26 21:31:01 +10:00
Connor McLaughlin cb66889856 GPU/OpenGL: Fix non-interleaved interlaced display 2020-05-26 13:44:05 +10:00
Connor McLaughlin e368dbbadc GPU: Implement non-interleaved interlaced rendering
Fixes screen shaking in True Pinball.
2020-05-26 03:18:05 +10:00
Connor McLaughlin 0daea7c2fc GPU/HW: Disable texture buffer based uploads on macOS 2020-05-25 20:26:13 +10:00
Connor McLaughlin e0d9bbced4 GPU/HW: Add UBO extension require if !GL3.2
Might fix errors on Sandy Bridge.
2020-05-25 18:37:32 +10:00
Connor McLaughlin 13df6c3e15 GPU/HW: Fix incorrect version capping for GL<4.3 2020-05-25 18:37:11 +10:00
Connor McLaughlin 0571b75fa5 GL/Context: Print GL_SHADING_LANGUAGE_VERSION on creation 2020-05-25 18:36:52 +10:00
Connor McLaughlin 2156236f52 Frontends: Use common GL context wrapper 2020-05-25 15:02:44 +10:00
Connor McLaughlin 4f4c4f4146 Common: Add GL context wrapper implementation 2020-05-25 15:02:44 +10:00
Connor McLaughlin 1494f2bc75 CDROM: Set m_current_lba to the sector being read
Fixes double-read commands returning incorrect sectors.

Fixes Vigilante 8 - 2nd Offense.
2020-05-24 13:28:12 +10:00
Connor McLaughlin 9f22684cea Qt: Combine resume and power off toolbar buttons 2020-05-23 15:03:15 +10:00
Connor McLaughlin e6d52ce6de Qt: Add Resume button 2020-05-23 15:03:00 +10:00
Connor McLaughlin e24e4c20e1 Qt: Fix pause button getting locked on after restarting game 2020-05-23 15:01:36 +10:00
Connor McLaughlin 237f469baa GPU: Mask variable sprite/rectangle sizes
Fixes broken sprites in Gradius Deluxe Pack (Gradius II).
2020-05-21 12:04:57 +10:00
Connor McLaughlin c583459c6f GPU: Replace coord/size masks with constants 2020-05-21 12:02:19 +10:00
Connor McLaughlin 35a8c5b47c Timers: Don't hang when counter+target = 0 for timer1
This needs proper research into how it behaves with IRQs.
2020-05-21 00:26:07 +10:00
Connor McLaughlin 3c7229dfe2 CDROM: Add 3 sectors read time to seek time
Simulates the drive's inprecise coarse seek then reading subq to get to
the exact sector.

Fixes Waku Waku Derby.
2020-05-20 23:52:35 +10:00
Connor McLaughlin dfe0dcb56c Qt: Split memory card/controller config, make bindings scroll 2020-05-20 23:26:26 +10:00
Connor McLaughlin e7778ea86e Qt: Move OpenURL to QtUtils namespace 2020-05-20 23:25:16 +10:00
Connor McLaughlin d41bf86eaa CDROM: Don't apply logical seek rules to subq-based seeks
Fixes Panekit - Infinitive Crafting Toy Case.
2020-05-20 19:30:46 +10:00
Connor McLaughlin 11c2b5a1e8 Bus: Extend SPU address range to 0x400 bytes 2020-05-20 18:57:33 +10:00
Connor McLaughlin a693437bc9 Bus: Handle unaligned byte writes to SPU 2020-05-20 18:56:41 +10:00
Connor McLaughlin c8a00c58eb Qt: Add Remove Disc option to change disc menu 2020-05-20 02:32:19 +10:00
Connor McLaughlin fa027d9c2a SDL: Add remove disc menu option 2020-05-20 02:26:23 +10:00
Connor McLaughlin 340640821e CDROM: Add delay when swapping discs
Fixes broken disc swap detection in Metal Gear Solid.
2020-05-20 02:26:07 +10:00
Connor McLaughlin 415880fc40 CDROM: Don't restart play/read when current == target
Fixes CDDA locking up Buster Bros. Collection.
2020-05-20 02:05:19 +10:00
Connor McLaughlin 5d46556b7d CDROM: Update position while seeking for GetlocP
Fixes track selection in WipEout.
2020-05-20 01:52:54 +10:00
Connor McLaughlin 7bb087fe73 gen_scmversion: Don't use latest GitHub release tag 2020-05-19 15:31:11 +10:00
Connor McLaughlin 1eecd50f3d SPU: Run SPU when changing regs on voice pending key-on
Fixes menu/cursor sounds with different frequencies in Final Fantasy 7.
2020-05-18 00:59:13 +10:00
Connor McLaughlin 03080351c8 SPU: Reset ADPCM decoder last samples on key on 2020-05-18 00:50:55 +10:00
Connor McLaughlin 096ed21767 GPU: Synchronize before filling/writing with interlaced rendering 2020-05-17 21:51:33 +10:00
Connor McLaughlin 88cc695d0b HostDisplay: Adjust offsets for linear filtering
Fixes line on right of screen in South Park.
2020-05-17 21:10:48 +10:00
Connor McLaughlin 19cebd97da GPU: Further refinements to crop overscan
Fixes flickering line in South Park.
2020-05-17 19:23:48 +10:00
Connor McLaughlin 0ef0c36704 GPU: Align display widths to 4 pixels
Documentation thanks to nocash.

Fixes line on edge in X2 - No Relief, Gunbird.
2020-05-17 18:46:59 +10:00
Connor McLaughlin 664bd06df6 GPU: Don't recursively execute commands
This can happen with interlaced rendering on when a line is pending
scanout and a primitive is drawn.

Fixes screen transitions in Slap Happy Rhythm Busters.
2020-05-17 17:58:48 +10:00
Connor McLaughlin 0bdac9e4be SDL: Add disable interlacing to quick settings menu 2020-05-17 17:58:32 +10:00
Connor McLaughlin c475923bdd SDL: Add log level settings to debug menu 2020-05-17 14:12:36 +10:00
Connor McLaughlin 8fd3a83ea8 Settings: Save DMA timing hacks to ini 2020-05-17 14:12:35 +10:00
Connor McLaughlin 2185bbec73 GPU: Display state in debug window 2020-05-17 14:11:42 +10:00
Connor McLaughlin 597aa20d83 GPU: Don't panic when FIFO is non-empty with VRAM->CPU copy
This probably is not a good state to be in though, since the DMA request
gets turned off and will never resume until it's copied out.
2020-05-17 14:05:31 +10:00
Connor McLaughlin 7d887edf17 DMA: Write correct terminator at end of OTC
Fixes NBA Live 96.
2020-05-17 13:58:26 +10:00
Connor McLaughlin 2795dea124 HostInterface: Prioritize SCPH-3000 over SCPH-1000 for NTSC-J 2020-05-17 01:08:14 +10:00
Connor McLaughlin b25ed6c151 GPU: Fix interlaced rendering in vblank breaking 2020-05-17 01:02:20 +10:00
Connor McLaughlin 93031fc27f SDL: Re-add frame step hotkey
Needs porting to Qt at some point.
2020-05-17 01:00:44 +10:00
Connor McLaughlin 1c50a09c2e HostInterface: Set user directory to Documents\DuckStation 2020-05-17 00:22:16 +10:00
Connor McLaughlin f7a2448dfb HostInterface: Pull compatibility database from program directory
Fixes compatibility list not reading on Linux.
2020-05-16 22:18:05 +10:00
Connor McLaughlin 4c9cdbb147 Qt/GameProperties: Disable all fields when code is missing 2020-05-16 21:19:34 +10:00
Connor McLaughlin 525bfda672 Build: Copy data directory with VS solution too 2020-05-16 20:55:00 +10:00
Connor McLaughlin 9ff8cf009a Qt: Fix tab order in game properties dialog 2020-05-16 20:32:36 +10:00
Connor McLaughlin 4e66b12727 Qt: Hook up export compatibility info to game properties 2020-05-16 20:32:36 +10:00
Connor McLaughlin 669934eb1a GameList: Support exporting XML snippets for compatibility info 2020-05-16 20:32:36 +10:00
Connor McLaughlin f671840a18 Qt: Add compatibility stars to game list 2020-05-16 20:32:36 +10:00
Connor McLaughlin b2a2366287 Qt: Add game properties dialog 2020-05-16 20:32:36 +10:00
Connor McLaughlin d781de2ce6 GameList: Add support for compatibility database 2020-05-16 20:32:36 +10:00
Connor McLaughlin 6ebd9236c5 CDImage: Add track info accessors 2020-05-16 20:32:36 +10:00
Connor McLaughlin 47c2b29395 Build: Use bin directory for cmake, fix Windows/cmake build 2020-05-16 13:10:31 +10:00
Connor McLaughlin a937a09b5c CPU: Fix broken exception logging from YBaseLib removal 2020-05-16 01:02:18 +10:00
Connor McLaughlin 214e852a54 CDROM: Add time to read sector to seek time
Fixes Yuukyuu Gensoukyoku Ensemble 1.
2020-05-16 01:01:31 +10:00
Connor McLaughlin 110aa8bd93 CDROM: Reset read sector buffer on INT1
Fixes GetlocL -> DMA out returning incorrect data.

Fixes FoxKids.com - Micro Maniacs Racing.
2020-05-16 00:33:03 +10:00
Connor McLaughlin e1157bff65 CDROM: Don't delay CDDA report, only skip index 0
Fixes music in Advanced V.G.
2020-05-16 00:27:09 +10:00
Connor McLaughlin 14b2506d7d HostInterface: Disable true color/enable scaled dithering by default
Too many games are broken with it enabled. The number which break with
scaled dithering is much smaller.
2020-05-15 01:41:58 +10:00
Connor McLaughlin bf3c83658a GPU: More accurate texture blending in non-true-colour-mode
Fixes Silent Hill loading animation, Advanced V.G. intro fade-out, and
probably others.
2020-05-15 01:32:22 +10:00
Connor McLaughlin c114873ed8 GPU: Fix height underflow in CRTC calculations 2020-05-14 01:25:43 +10:00
Connor McLaughlin 3472e37d21 GPU: Synchronize before clearing FIFO 2020-05-14 01:25:10 +10:00
Connor McLaughlin c0ea35ccdc GPU: Fix parameters not applying on startup 2020-05-14 01:24:39 +10:00
Connor McLaughlin d461d7c87a SPU: Fix reverb write regression from e07d3c9d 2020-05-13 13:47:33 +10:00
Connor McLaughlin db9d637f92 HostInterface: Fix mute not applying on startup 2020-05-13 13:47:12 +10:00
Connor McLaughlin e07d3c9db2 SPU: Fix array bounds overflow in register reads 2020-05-13 12:37:13 +10:00
Connor McLaughlin 777809b3b0 CDROM: Fix XA filter change not applying immediately
Fixes audio getting cut off in PaRappa the Rapper - The Hip Hop Hero,
underwater music in R-Type Delta.
2020-05-13 00:14:20 +10:00
Connor McLaughlin d6f6154380 CDROM: Read last delivered sector when pausing and reading without seek
Fixes Adidas Pro Soccer, Bedlem, Rise 2.
2020-05-13 00:13:57 +10:00
Connor McLaughlin d866bd9cb8 CDROM: Reset XA resampler state on read
Should get rid of pops when switching files.
2020-05-12 12:36:10 +10:00
Connor McLaughlin 634880b5e3 SPU: Clamp before applying main volume not after
Fixes popping in Monkey Magic.
2020-05-12 02:15:18 +10:00
Connor McLaughlin 81f297456c GPU: Fix mismatched scanout between hardware/software renderers 2020-05-12 01:35:06 +10:00
Connor McLaughlin 37d9f6344d CDROM: Ignore Read/Play command without setloc/param
Fixes title screen music in Monkey Magic.
2020-05-11 22:55:14 +10:00
Connor McLaughlin 65c42cd30e GPU: Don't use field offset for ODE in vblank 2020-05-11 22:26:10 +10:00
Connor McLaughlin 2bc1c67236 GPU/HW: Fix extra column being added with unaligned 24-bit scanout
Fixes pink lines in FMVs of NASCAR Thunder 2004.
2020-05-11 22:03:35 +10:00
Connor McLaughlin 6477e5fb54 CommonHostInterface: Add volume up/down/mute hotkeys 2020-05-10 00:54:23 +10:00
Connor McLaughlin 5aacfa7be3 Qt: Hook up audio settings (buffer size/count, volume, mute) 2020-05-10 00:44:56 +10:00
Connor McLaughlin c329f58afe HostInterface: Add audio buffer/count/volume/mute settings 2020-05-10 00:44:37 +10:00
Connor McLaughlin b6fbdf9aeb AudioStream: Support changing output volume 2020-05-10 00:44:23 +10:00
Connor McLaughlin f17c2c44d0 GPU/HW: Fix red bleeding when writing VRAM with mask bit set
Fixes menu screen in Twisted Metal 4.
2020-05-09 14:38:06 +10:00
Connor McLaughlin f679f8d063 GTE: Fix buggy MVMVA instruction 2020-05-09 13:48:45 +10:00
Connor McLaughlin 9959440a3a SPU: Align starting addresses to two words
Fixes interrupts firing early and occasional broken speech in Valkyrie
Profile.
2020-05-08 21:36:47 +10:00
Connor McLaughlin 712168cf45 CDImage: Better handle sequential reading into lead-out area 2020-05-08 17:35:55 +10:00
Connor McLaughlin 684e83168e CDROM: Prevent successful seeking to the lead-out area of the disc 2020-05-08 15:41:45 +10:00
Connor McLaughlin c3c8df14ea CDImage: Set SubQ control for lead-out to last index SubQ 2020-05-08 15:41:16 +10:00
Connor McLaughlin 9539ce032b AnalogController: Show controller number in OSD messages 2020-05-08 15:32:39 +10:00
Connor McLaughlin 95468901f2 AnalogController: Add analog toggle button 2020-05-08 15:13:07 +10:00
Connor McLaughlin 5b389ae13d CDROM: Synthesize lead-out area and stop reading when reached 2020-05-08 10:51:49 +10:00
Connor McLaughlin c67e877d82 CommonHostInterface: Fix -state command line parameter not working 2020-05-08 00:57:46 +10:00
Connor McLaughlin 85707f809c Pad: Fix OSD error message when save state memory cards mismatch 2020-05-08 00:49:04 +10:00
Connor McLaughlin df66d86b27 CDImage: Log errno when fopen() fails 2020-05-06 23:42:08 +10:00
Connor McLaughlin 26e0177caa SDL: Fix browse button not showing on hidpi displays 2020-05-05 03:04:56 +10:00
Connor McLaughlin 0f5bc7267f HostInterface: Fix hang when switching audio backends 2020-05-05 03:04:28 +10:00
Connor McLaughlin 257c86930f GPU/OpenGL: Fix GLES again 2020-05-03 19:38:27 +10:00
Connor McLaughlin 8139230d05 GPU/OpenGL: Shader compile fix 2020-05-03 18:33:33 +10:00
Connor McLaughlin e058beb4b0 GPU/HW: Fix oversized VRAM copies writing out of bounds
Fixes jittering in Duke Nukem - Land of the Babes water effect.
2020-05-03 18:09:34 +10:00
Connor McLaughlin 91d7212b36 GPU/OpenGL: Fix swapped log statement 2020-05-03 18:09:31 +10:00
Connor McLaughlin 9446587e8f GPU/HW: Mask bit handling in hardware renderers
Fixes:
 - Menu effect in Ghost in the Shell
 - Incorrect text colours in menu of Dragon Quest VII
 - Fade effect in TwinBee RPG
 - Fog in Silent Hill
 - Water in Duke Nukem - Land of the Babes
 - Shadows in Ultraman - Fighting Evolution

and probably others.
2020-05-03 17:11:31 +10:00
Connor McLaughlin a5ecff0893 Qt: Set clear alpha to zero for OpenGL display
Fixes transparent windows in Wayland.
2020-05-03 02:59:00 +10:00
Connor McLaughlin 456ddc037a GPU/OpenGL: Remove testing code which broke ES 2020-05-03 02:52:36 +10:00
Connor McLaughlin edb12234d9 Common/GL/Texture: Fix potential crash on older drivers 2020-05-02 16:52:04 +10:00
Connor McLaughlin 620210cfc9 GPU/OpenGL: Use explicit bindings where possible 2020-05-02 16:01:16 +10:00
Connor McLaughlin 9dc82a738f GPU/OpenGL: Fix incorrect fragcolor binding 2020-05-02 15:13:17 +10:00
Connor McLaughlin 2d6bdc1f82 Qt: Fix rumble not stopping on power off 2020-05-01 16:42:47 +10:00
Connor McLaughlin 1ed86f4897 Frontends: Add Discord Presence support 2020-05-01 01:01:53 +10:00
Connor McLaughlin d8ab587153 HostInterface: Modify settings loading interface to support per-frontend settings 2020-05-01 01:01:50 +10:00
Connor McLaughlin 0ec44327d1 SDL: Add integer upscaling option 2020-05-01 01:00:35 +10:00
Connor McLaughlin 55fc3fffd9 Qt: Add integer upscaling option 2020-05-01 01:00:29 +10:00
Connor McLaughlin b4c31e55e2 HostDisplay: Add integer upscaling option 2020-05-01 01:00:22 +10:00
Connor McLaughlin 98bb1de31f Qt: Add help to GPU options in settings 2020-05-01 01:00:05 +10:00
Connor McLaughlin 101e1bfd73 Qt: Add advanced settings 2020-05-01 00:59:31 +10:00
Connor McLaughlin a3792a74ed Qt: Switch to Windows instead of Console subsystem 2020-05-01 00:58:46 +10:00
Connor McLaughlin 59d0e4aa21 SDL: Switch to Windows instead of Console subsystem 2020-05-01 00:58:38 +10:00
Connor McLaughlin e37962009e HostInterface: Add log lettings to ini 2020-05-01 00:58:32 +10:00
Connor McLaughlin c2ab611097 Common/Log: Properly release console when disabling 2020-05-01 00:58:24 +10:00
Connor McLaughlin 4702110474 Common/Log: Add file output 2020-05-01 00:58:02 +10:00