2513 Commits

Author SHA1 Message Date
Stenzek
de1a1af908
FullscreenUI: Avoid per-frame memory allocations with SmallString 2024-04-09 19:54:25 +10:00
Stenzek
631fca3042
SettingsInterface: Add SmallString overloads 2024-04-09 19:54:25 +10:00
Stenzek
71f50566f3
System: Consider pending ticks when using global ticks 2024-04-07 19:01:48 +10:00
Stenzek
8a1b4d8bee
DMA: Halt linked list transfers during pad transfer
Plenty of games seem to suffer from this issue where they have a linked list
DMA going while polling the controller. Having a large slice size causes the
serial transfer to complete before the silly busy wait in the BIOS poll routine
returns, resulting in it thinking that the controller is disconnected. Some
games are very sensitive to this (e.g. Newman Haas Racing), to the point that
even using a slice size of 1 is insufficient for avoiding the race, probably
due to the linked list layout.

Therefore, without major refactoring to ensure the CPU runs every DMA block,
and the associated performance penalty, we just halt the DMA until the serial
transfers have completed. To reduce the chances of this significantly affecting
timing, we add accumulate the ticks that have been "lost", and allow them to be
"used up" when the transfer does happen.
2024-04-07 18:55:03 +10:00
Stenzek
8bdeb8bdac
MemoryCardImage: Handle 128KB GME files 2024-04-07 17:06:42 +10:00
Stenzek
1ee5f737ed
MemoryCardImage: Report errors to caller 2024-04-07 13:23:00 +10:00
Stenzek
99b0fb5911
GPU/HW: Move pipelines to end of struct
Helps keep the rest in range for ARM32's 4K displacement.
2024-04-06 21:51:52 +10:00
Stenzek
1097eab600
GPU/HW: Don't create shader blend pipelines if disallowed 2024-04-04 13:25:33 +10:00
Stenzek
c2a08bdb1d
CPU/NewRec: Fix ARM32 (again) 2024-04-04 13:25:33 +10:00
Stenzek
a432308908
GPU: Fix GLES compile error 2024-04-04 13:25:33 +10:00
Stenzek
cb6be52404
GameDatabase: Warn if CPU mode is enabled and unnecessary 2024-04-03 22:58:20 +10:00
Stenzek
74f3c8d1aa
GPU/HW: Enable feedback loops for rendering 2024-04-01 18:12:52 +10:00
Stenzek
72ab669e70
GPUDevice: Add support for feedback loops 2024-04-01 13:55:19 +10:00
Stenzek
71a07a5a8e
CPU/NewRec: Fix lwl/lwr on ARM 2024-03-31 23:49:40 +10:00
Stenzek
3ecc19c43f
GPU: Fix HW readback counter 2024-03-31 14:02:44 +10:00
Stenzek
8ebda3cdc8
CPU/NewRec: Fix register corruption in swl/swr 2024-03-31 13:55:19 +10:00
Stenzek
a3013efbca
CPU/NewRec: Fix PGXP desync
Wobbly geometry in Threads of Fate.
2024-03-30 00:46:38 +10:00
Stenzek
f9f9447013
SPU: Ignore End+Mute flag for noise channels
Fixes the noise effects cutting out too early in Motor Toon Grand Prix.
2024-03-29 15:08:14 +10:00
Stenzek
2b7008bd93
GPU/HW: Fix box downsampling with FMVs 2024-03-29 12:37:10 +10:00
Stenzek
c41563c7dc
Pad: Fix unconditional memory card replug on load state 2024-03-29 12:34:42 +10:00
Stenzek
e54ad1956a
GPU/HW: Fix height incorrect doubling in interleaved 480i mode 2024-03-29 12:17:13 +10:00
Stenzek
de1e5b24fb
CDROM: Don't send reports when subq isn't valid 2024-03-26 01:20:33 +10:00
Stenzek
83ebad1129
System: Leave title empty when booting physical audio CDs 2024-03-25 23:24:41 +10:00
Stenzek
7b8704aba1
System: Fix incorrect sanitization of memcard filenames 2024-03-25 23:24:41 +10:00
Stenzek
480c78502f
System: Fix crash toggling debug GPU device
When postfx is enabled.
2024-03-24 22:32:44 +10:00
Stenzek
43fc9f1ef2
Settings: Support saving WebP screenshots 2024-03-24 16:03:00 +10:00
Stenzek
b143d96476
Build: Use deps DLLs on Windows 2024-03-24 16:02:59 +10:00
Stenzek
8c09e9389d
GameDB: Add DisablePGXPPreserveProjFP trait
And add it to Crash Team Racing.
2024-03-23 14:11:28 +10:00
Stenzek
604dd5df40
Qt: Add copy/clear game settings 2024-03-21 00:50:57 +10:00
Stenzek
3085172ffd
FullscreenUI: Update translation strings 2024-03-20 22:48:23 +10:00
Stenzek
9703542775
AudioStream: Re-add SDL backend 2024-03-20 22:46:20 +10:00
Stenzek
e70f0e1bc1
GPU/HW: Use texelFetch() instead of sampler 2024-03-20 21:56:20 +10:00
Stenzek
a4a58c6ba2
SPU: Implement volume sweep phase inversion 2024-03-20 21:55:55 +10:00
Stenzek
2003c9452b
DMA: Properly handle bus errors and DICR transitions 2024-03-18 02:07:42 +10:00
Stenzek
fa6850902a
CPU: Make interrupts actually edge-triggered 2024-03-18 01:46:19 +10:00
Stenzek
e755e15c69
GPU: Fix GLSL compile error 2024-03-17 00:07:18 +10:00
Stenzek
1ab7850ed0
GPU: Rewrite deinterlacing and add adaptive/blend modes 2024-03-16 14:14:15 +10:00
Stenzek
43eb6e20fa
System: Improve screenshot naming 2024-03-16 14:14:15 +10:00
Stenzek
6aa491f863
GPU: Ensure screenshots are saved before shutdown 2024-03-16 14:14:15 +10:00
Stenzek
9211d9f2e3
Path: Add CreateFileURL() 2024-03-16 14:10:35 +10:00
Stenzek
d1a1cab9a9
Bus: Direct KUSEG+KSEG0 isolated cache reads to ICache 2024-03-13 14:14:40 +10:00
Stenzek
3395853ba2
CDROM: Fix overflow in UpdatePositionWhileSeeking() 2024-03-13 14:14:40 +10:00
Stenzek
8fe86ff690
GPU/HW: Fix another buffer unmapping case 2024-03-08 21:16:00 +10:00
Stenzek
7159330f63
GPU/HW: Ensure buffers are unmapped before present
Darn DX11...
2024-03-08 13:43:22 +10:00
Stenzek
25db163347
System: Fix incorrect save state screenshot size 2024-03-08 04:12:50 +10:00
Stenzek
c854b8f85e
Image: Swap stb for libpng/libjpeg 2024-03-07 00:02:35 +10:00
Stenzek
250b1bea8f
GPU: Use Image class for screenshot saving 2024-03-06 23:55:18 +10:00
Stenzek
620d08f72d
Build: Move Image from common to util 2024-03-06 16:09:21 +10:00
Stenzek
f80ead6a21
GameDB: More settings 2024-03-05 00:02:22 +10:00
Stenzek
e2024f6175
System: Change "Auto Load Cheats" to "Enable Cheats" 2024-03-03 14:03:07 +10:00
Stenzek
a1d7d214cf
GPUDevice: Add support for VRR and relaxed vsync 2024-03-03 14:03:07 +10:00
Stenzek
96f29d9b99
System: Warn if compatibility settings are disabled 2024-03-02 21:21:20 +10:00
Stenzek
04b837a418
Qt: Redesign graphics settings panel
Add screenshot format/type.
2024-03-02 21:21:20 +10:00
Stenzek
713d396a7e
GPU/HW: Add quad line detection (Wild Arms 2) 2024-03-02 17:13:19 +10:00
Stenzek
250fb56838
GPU/HW: Switch to indexed draws 2024-03-01 15:33:00 +10:00
Stenzek
b34742cdd2
GPU/HW: Slightly reduce struct size 2024-03-01 13:51:16 +10:00
Stenzek
d50ba989ae
Settings: Use bitfields for bool
Slightly more compact, memory-wise.
2024-03-01 13:42:29 +10:00
Stenzek
f936a36c85
GPUDevice: Add GPUDownloadTexture
Which can also be based in host/client memory.
Use it for screenshots and VRAM downloads.
2024-02-29 18:56:50 +10:00
Stenzek
411213d6a0
GPU: Make VRAM a global object 2024-02-29 17:00:51 +10:00
Stenzek
7340324ed9
CDROM: Accuracy improvements 2024-02-29 17:00:51 +10:00
Stenzek
71094a0e44
CPU: Implement memory breakpoints/watchpoints 2024-02-28 00:02:02 +10:00
Stenzek
ef4389cea8
Qt: Cache CPU register values
That way they don't update while running.
2024-02-27 22:38:43 +10:00
Stenzek
4599109854
CPU/CodeCache: Clear backpatch info for blocks when recompiled 2024-02-27 22:16:59 +10:00
Stenzek
454cceab80
CPU/CodeCache: Move backpatch lookup after RAM check
Saves a map lookup if we're just invalidating code.
2024-02-27 21:04:26 +10:00
Stenzek
eb7b6d217d
System: Ensure GPU is flushed before invalidating on pause 2024-02-27 21:04:26 +10:00
Stenzek
eeef0a92bb
CPU: Make single step go through the "normal" execution path
That way it exits and re-enters the dynarec as expected.
2024-02-27 21:04:25 +10:00
Stenzek
4a70164dac
CMake: Determine host page size at build time
Needed for running on Asahi Linux.
2024-02-25 20:30:41 +10:00
Stenzek
ab83247de3
GLContext: Rename to OpenGLContext 2024-02-25 20:30:41 +10:00
Stenzek
c1381cfda6
System: Gracefully handle memory allocaion failure 2024-02-25 20:30:41 +10:00
Stenzek
ff9dc11a38
CPU/CodeCache: Increase frame delta for manual protected blocks
Reduces stutter in Wild Arms 2.
2024-02-24 15:06:24 +10:00
Stenzek
35cdfc5ef7
CPU: Move PGXP registers earlier in struct 2024-02-24 14:57:31 +10:00
Stenzek
53c0dc8bbc
CPU/NewRec: Speculative execution for mult/div 2024-02-24 14:57:30 +10:00
Stenzek
175d2a17f7
CPU/NewRec: Don't panic on unused opcodes 2024-02-24 14:57:29 +10:00
KamFretoZ
1f6636f62b Qt: Icon updates 2024-02-18 15:44:12 +09:00
Stenzek
1faecd8853
Qt: Fix labels when changing multi-tap controller type 2024-02-15 22:06:01 +09:00
Tobias Jakobi
739729516e Core: Add missing standard library includes 2024-02-06 23:48:45 +10:00
Stenzek
8e7b212b03
System: Clear cheat list on reset 2024-02-06 22:24:33 +09:00
Stenzek
f6dc80cefa
GameDatabase: Use TitleCase for traits 2024-02-04 16:47:26 +10:00
Stenzek
8ffc50a2a5
Data: Remove JSON GameDB 2024-02-04 16:14:05 +10:00
Stenzek
d7a1c447c6
GameDatabase: Switch to YAML 2024-02-04 16:14:05 +10:00
Stenzek
a957fb669d
StringUtil: Fix inequal-length EqualNoCase 2024-02-04 15:22:38 +10:00
Stenzek
c2c3eac749
Build: Use shared webp/zstd/zlib 2024-02-03 19:41:56 +10:00
Stenzek
cdb614a51f
GPU/HW: Fix possible crash (again) 2024-02-03 16:00:24 +10:00
Stenzek
cdea4eb68b
GPU/HW: Fix possible crash on setting change 2024-01-31 20:02:34 +10:00
Stenzek
ad41c81fa8
ImGuiOverlays: Fix incorrect animation when opening state selector 2024-01-31 00:53:30 +10:00
Stenzek
af2042e713
GPU/HW: Fix toggling PGXP depth buffer causing black screen 2024-01-31 00:53:30 +10:00
Stenzek
14e3969736
Misc: Warning fixes 2024-01-26 14:31:03 +10:00
Stenzek
b545234152
CPU/NewRec/AArch32: Fix double condition 2024-01-25 13:42:41 +10:00
Stenzek
4f347bf626
Qt: Add missing display setting help text 2024-01-24 13:56:22 +10:00
Hugo Locurcio
1b8e75e90b
Take widescreen hack into account when determining automatic resolution scale
At widescreen aspect ratios, a greater resolution scale factor is required
to maintain crisp visuals. For instance, a 16:9 output requires ~1.333×
the resolution scale of a 4:3 output (as 16:9 is ~1.333× wider than 4:3).

This improves visuals at widescreen aspect ratios when the widescreen hack
is enabled, especially for ultrawide.
2024-01-22 14:41:19 +10:00
athenavr
5e2c6d24b9
Add independent settings for NeGcon axes (#3094)
* Add independent settings for NeGcon axes

* TOSQUASH coverage of the full NeGcon twisting range
2024-01-22 14:41:19 +10:00
Stenzek
37e8d1ab86
GPU/HW: Fix VRAM write replacements 2024-01-22 14:41:19 +10:00
Stenzek
a7b7ce2720
System: Fix crash with replacement precaching 2024-01-22 14:41:19 +10:00
Stenzek
a231fd4f22
Settings: Fix Match Window on Android 2024-01-22 14:41:19 +10:00
Stenzek
150ab8f4af
GPU: Add host/hardware stats 2024-01-22 14:41:19 +10:00
Stenzek
884c851079
CPU: Fix GTE control register disassembly 2024-01-21 02:45:09 +10:00
Stenzek
f66866ed73
GPUDevice: Use Error class for initialization errors 2024-01-21 00:18:33 +10:00
Stenzek
429cb4f351
Qt: Allow toggling fullscreen when VM is paused 2024-01-21 00:07:32 +10:00
Stenzek
b98ac8722a
FullscreenUI: Move functionality to Host 2024-01-20 20:29:33 +10:00
Stenzek
bc04854ed3
GPU/HW: Bump shader cache version 2024-01-20 02:14:56 +10:00
Stenzek
687e212dfe
GPU/HW: Shader compile fix 2024-01-20 02:14:36 +10:00
Stenzek
37276472eb
Qt: Tidy up Enhancement settings 2024-01-19 21:40:44 +10:00
Stenzek
f369724b7c
dep/imgui: Update to v1.90.1 2024-01-19 21:22:26 +10:00
Hugo Locurcio
cc94b76037
Add debanding option to improve gradient smoothness with truecolor
This option only has an effect if true color is also enabled.
2024-01-19 01:05:21 +01:00
Stenzek
5f9eef585f
Achievements: Wrap long achievement descriptions 2024-01-14 01:44:21 +10:00
Stenzek
eae4f73f94
Achievements: Open cheevo details in browser when selected 2024-01-14 01:44:21 +10:00
Stenzek
da9e3064c2
Achievements: Display missable/progression/win icons 2024-01-14 01:44:21 +10:00
Stenzek
e86cf51a48
GPU/HW: Handle palette VRAM wrapping
Fixes block colours in The Next Tetris.
2024-01-13 13:54:51 +10:00
Stenzek
73cee9f705
Settings: Add UserResources to EmuFolders
Allowing some resources, such as fonts/sounds to be overridden by the
user.
2024-01-10 22:46:57 +10:00
Stenzek
fcbae6cef3
GPU/HW: Fix off-by-one in dirty rect checks
Fixes transitions in Crash 3.
2024-01-08 15:49:05 +10:00
Stenzek
32f5482ad2
CPU: Inhibit debug dispatcher when COP0 BP is invalid 2024-01-01 15:25:48 +10:00
Stenzek
cc84952fdc
AnalogController: Minimum deadzone/activation threshold should be 1% 2023-12-31 19:42:52 +10:00
Stenzek
12b9cf1898
GPU: Fix crash when trying to postprocess surfaceless 2023-12-31 19:40:45 +10:00
Connor McLaughlin
e60654de38
Merge pull request #3080 from tobiasjakobi/different-types-fix
CPU/Recompiler: Fix build error
2023-12-28 18:54:36 +10:00
Stenzek
6d3e3f78da
System: Shorten libcrypt error on Android 2023-12-28 15:37:22 +10:00
Stenzek
958b033a66
PostProcessing: Fix assertion on some shader/texture formats 2023-12-28 15:31:03 +10:00
Stenzek
98d5b98ab1
GPU/HW: Fix incorrect pipeline layout with texture buffers disabled 2023-12-27 02:03:50 +10:00
Stenzek
044eb589f9
Settings: Expose disable texture buffers/copy to self options 2023-12-27 01:44:08 +10:00
Tobias Jakobi
dbe29bd5ca CPU/Recompiler: Fix build error
Build currently fails on a GCC 13.2.x with:

/var/tmp/portage/games-emulation/duckstation-9999/work/duckstation/src/core/cpu_recompiler_code_generator.cpp: In member function ‘bool CPU::Recompiler::CodeGenerator::Compile_Bitwise(CPU::Instruction, const CPU::CodeCache::InstructionInfo&)’:
/var/tmp/portage/games-emulation/duckstation-9999/work/duckstation/src/core/cpu_recompiler_code_generator.cpp:1330:81: error: operands to ‘?:’ have different types ‘BitField<unsigned int, CPU::Reg, 16, 5>’ and ‘BitField<unsigned int, CPU::Reg, 21, 5>’
 1330 |                                PGXP::PackMoveArgs(dest, lhs.HasConstantValue(0) ? instruction.r.rt : instruction.r.rs)),
      |                                                         ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/var/tmp/portage/games-emulation/duckstation-9999/work/duckstation/src/core/cpu_recompiler_code_generator.cpp:1362:81: error: operands to ‘?:’ have different types ‘BitField<unsigned int, CPU::Reg, 16, 5>’ and ‘BitField<unsigned int, CPU::Reg, 21, 5>’
 1362 |                                PGXP::PackMoveArgs(dest, lhs.HasConstantValue(0) ? instruction.r.rt : instruction.r.rs)),
      |                                                         ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2023-12-26 13:07:28 +01:00
Stenzek
62d2f12236
Settings: Expose exclusive fullscreen control 2023-12-25 23:44:15 +10:00
Silent
8d491d3faa
System: Mark the VM as Stopping in ShutdownSystem unconditionally
Fixes an issue where Discord RPC didn't revert to "No Game Running"
on shutdown.
2023-12-23 15:27:10 +01:00
Silent
d08a40bcd8
DiscordRPC: Show session time in Discord Rich Presence 2023-12-23 15:19:22 +01:00
Stenzek
8fe6ef1fa8
CPU/NewRec: Allocate callee-saved registers before caller-saved 2023-12-21 02:00:19 +10:00
Stenzek
b7c3c76014
CPU/NewRec/RISCV64: Implement PGXP 2023-12-21 02:00:19 +10:00
Stenzek
36643fe78b
GameList: Add "File Size" field 2023-12-20 23:40:28 +10:00
Stenzek
bbd021bd5f
DMA: Memory wraparound is unlikely 2023-12-20 22:44:50 +10:00
Stenzek
48a1282a08
GPU/HW: Fix incorrect layout for non-buffer VRAM write 2023-12-20 22:42:32 +10:00
Stenzek
dc5e4120cd
GPUDevice: Improve texture pooling 2023-12-20 22:42:32 +10:00
Stenzek
5ef2ba0eb2
GPU/HW: Add fallback path for no-texture-buffers
Yay, old Mali drivers without SSBOs...
2023-12-19 22:38:36 +10:00
Stenzek
f5ddd7ba32
DMA: Template transfer functions
~20% speedup in FMV playback on a Ryzen 9 7950X3D. CPUs hate branches.
2023-12-19 22:38:36 +10:00
Stenzek
b9665e83a3
MSBuild: Only link with Zydis in Debug builds 2023-12-19 22:38:35 +10:00
Stenzek
cf45047463
CI/Windows: Use Clang-CL instead of MSVC 2023-12-19 22:38:35 +10:00
Stenzek
21bbe5c76c
CPU/CodeCache: Fix page error when rewinding 2023-12-19 22:38:27 +10:00
Stenzek
6a7dea6908
CPU/CodeCache: Fix rewinding on Apple Silicon 2023-12-18 21:01:57 +10:00
Stenzek
7829abc014
MSBuild: We don't need WinPixEventRuntime in Release builds 2023-12-18 20:50:36 +10:00
Stenzek
df08e122c3
System: Fix rewind throttling at half speed 2023-12-18 20:50:36 +10:00
Stenzek
87d24d3259
System: Fix crash on emptying rewind buffer 2023-12-18 20:50:36 +10:00
Stenzek
e6be0532cb
System: Fix incorrect rewind VRAM estimation 2023-12-18 20:50:35 +10:00
Stenzek
8842a46a90
CPU: Fix namespacing in disassembler 2023-12-17 13:40:38 +10:00
Stenzek
73968ac526
SaveStateSelectorUI: Decouple current slot from list 2023-12-17 13:33:51 +10:00
Stenzek
cffb383c10
CPU: Add disassembly of GTE instructions 2023-12-17 00:38:11 +10:00
Stenzek
6328d08c14
System: Don't unconditionally refresh save state UI 2023-12-17 00:09:15 +10:00
Stenzek
e93fec49bb
Achievements: Reload settings after hardcode disabled 2023-12-16 21:12:05 +10:00
Stenzek
fb0ad26de8
Achievements: Fix incorrect fallback message 2023-12-15 23:54:31 +10:00
Stenzek
aa658047f6
CPU/Recompiler: Fix jal/jalr to load delayed register
NewRec already handled this correctly.
2023-12-15 21:46:30 +10:00
Stenzek
87a7c09466
GPU/HW: Improve heuristics for draw/write when copying 2023-12-15 16:05:44 +10:00
Stenzek
a499e21453
CPU/CodeCache: Don't try to compile direct double branches
Invalidation nightmare.
2023-12-15 13:46:48 +10:00
Stenzek
98a96db1bd
GPU: Remove redundant fields 2023-12-14 20:23:49 +10:00
Stenzek
23d5b20da6
GPU/HW: Split dirty rect into draw/write
Significant performance improvement in Persona 2.
2023-12-14 20:23:49 +10:00
Stenzek
5218ac6944
GPU/HW: Fix incorrect mask in VRAM offset calc 2023-12-14 20:23:48 +10:00