Commit graph

908 commits

Author SHA1 Message Date
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 15afe4f436 GPU/Vulkan: Fix incorrect vkCmdPushConstants() call 2020-06-27 16:26:20 +10: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
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
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 4b31034efa
Merge pull request #562 from lioncash/amp
spu: Make use of logical AND within IsPitchModulationEnabled()
2020-06-24 01:29:42 +10: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 6de24f620e
Merge pull request #558 from lioncash/psf
system: Correct error dialog in PSF load case
2020-06-23 19:57:19 +10: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 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 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 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 77291096db Settings: Add GPU adapter option and hook up to D3D11/Vulkan 2020-06-20 03:34:19 +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 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
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 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 075380f8e0 Move most helper logic from base HostInterface to FrontendCommon 2020-06-09 02:35:37 +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 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 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
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 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 13c3426148
Merge pull request #506 from ggrtk/analog-controller
Update input profiles and input profile handling
2020-05-28 13:06:40 +10: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 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 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 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 2156236f52 Frontends: Use common GL context wrapper 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 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 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 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