Commit graph

1615 commits

Author SHA1 Message Date
Albert Liu b6301e1a43 Settings: Always save controller type to settings interface
Fixes Controller1 defaulting to DigitalController type on startup in
FullscreenUI when user had previously shut down the program with
Controller1 set to None.
2021-02-26 09:37:53 -08:00
Connor McLaughlin 0ec2c87a0e Implement RetroAchivements 2021-02-27 00:44:53 +10:00
Albert Liu 3ca3a78b58 Controller: Fix invalid SettingInfos causing crash in FullscreenUI 2021-02-24 17:23:07 -08:00
Connor McLaughlin f023c1bcde FullscreenUI: Add 'Pause on Menu' option 2021-02-25 02:20:33 +10:00
Connor McLaughlin 8318cdb3c1 Move ImGui setup to common, and enable fullscreen UI in Qt 2021-02-24 01:22:03 +10:00
Connor McLaughlin 1fc53ff622 CommonHostInterface: Move settings interface pointer to base class 2021-02-24 01:21:43 +10:00
Connor McLaughlin 229ed5a852 System: Add helpers for reading executables off discs 2021-02-24 01:21:43 +10:00
Connor McLaughlin 7501e89b7a System: Add path/image to game change notification 2021-02-24 01:21:43 +10:00
Connor McLaughlin 91a7775d68 BIOS: Fix size validation for PSExe 2021-02-22 12:22:28 +10:00
Connor McLaughlin ae49215251 Timers: Better predict next event time
Significantly improves performance in Fromage.
2021-02-22 12:21:44 +10:00
Albert Liu 71d748ef04 AnalogController: Fix regression in analog mode toggling 2021-02-21 16:12:41 -08:00
Albert Liu 329e8317b4 Controller: Always check for access byte 2021-02-21 15:20:31 -08:00
Connor McLaughlin 30bcf280d4 Revert "CPU/Recompiler: Use fastmem for constant loads from RAM mirrors in LUT mode"
This reverts commit 67fe97a17c.

Misread the logic here - it's masked anyway, so it's fine.
2021-02-19 02:25:27 +10:00
Connor McLaughlin 24c2165bb3 GPU: Allow closing window/app to interrupt shader compilation 2021-02-19 01:48:44 +10:00
Connor McLaughlin 1b544ae350 GameList: Slight optimization to scanning 2021-02-19 01:37:56 +10:00
Connor McLaughlin cacf12c209 FileSystem: Migrate component extractors to std::string_view 2021-02-19 01:37:56 +10:00
Connor McLaughlin d3717e66c3 CPU/Recompiler: Handle self-modifying code within same block
Fixes Spyro 2 and 3 PAL with recompiler.
2021-02-19 01:37:56 +10:00
Connor McLaughlin 67fe97a17c CPU/Recompiler: Use fastmem for constant loads from RAM mirrors in LUT mode 2021-02-19 01:37:56 +10:00
Connor McLaughlin db4f521d92 System: Make some boot error messages translatable 2021-02-18 02:08:48 +10:00
Connor McLaughlin 209827b67c PGXP: Compute PSX values on demand for CPU instructions
Generates shorter code for the recompiler.
2021-02-18 02:08:48 +10:00
Connor McLaughlin 54f5c737ce PGXP: Inline some more functions 2021-02-18 02:08:48 +10:00
Connor McLaughlin 46dbea509a GPU: Fix adaptive downsampling regression 2021-02-18 02:08:47 +10:00
Connor McLaughlin 1b881fc60b PGXP: Combine instr and rtVal parameters for CPU_LUI 2021-02-18 02:08:47 +10:00
Connor McLaughlin bc021ddfd9 CPU/Recompiler: Implement PGXP CPU mode 2021-02-18 02:08:47 +10:00
Connor McLaughlin 0bfa1bf873 PGXP: Fix MFC0/MTC0
Doubt it'll change anything.
2021-02-18 02:08:47 +10:00
Connor McLaughlin a722fd6b53 PGXP: Make mult/div compute results instead of parameters
Lets us call it from the recompiler.
2021-02-18 02:08:47 +10:00
Connor McLaughlin 33a5617ea3 PGXP: Remove some unused parameter from M{F,T}{HI,LO} 2021-02-18 02:08:47 +10:00
Connor McLaughlin efecb44344 PGXP: Combine a couple of instructions 2021-02-18 02:08:47 +10:00
Connor McLaughlin 09805c1f80 FullscreenUI: Fix controller navigation in disc change 2021-02-18 02:08:47 +10:00
Connor McLaughlin d8ce98a1e2 Bump shader cache version 2021-02-14 19:25:14 +10:00
Connor McLaughlin 2c1999e622 CDROM: Simulate holding position for GetlocP
Fixes lockups in Tomb Raider.
2021-02-14 18:36:21 +10:00
Connor McLaughlin 0d13e1013d GPU: Fix incorrect dither offset [3][0]
Fixes dots in sky in Silent Hill.
2021-02-14 18:36:21 +10:00
Connor McLaughlin 5a66639d78 HostDisplay: Add virtual method for getting resolutions 2021-02-14 18:36:21 +10:00
Connor McLaughlin c6c67b7b27 ImGui: Remove close button from debug windows
They can be closed by unchecking the setting instead, and it stays in
sync with the config this way.
2021-02-12 01:01:30 +10:00
Connor McLaughlin de688615ff Qt: Add Clear and Reset buttons to cheat manager 2021-02-12 01:01:30 +10:00
Connor McLaughlin bfa2b72e08 Fix a couple of name typos 2021-02-11 02:17:25 +10:00
Connor McLaughlin 6ab926ab28 System: Make the SBI check a confirm dialog instead of message 2021-02-11 02:04:47 +10:00
Connor McLaughlin ef97131c9d Timers: Handle target = 0 case
Fixes Super Gals! Kotobuki Ran Special - Ikemen Get You Gals Party
hanging at boot.
2021-02-09 01:01:36 +10:00
Connor McLaughlin c043643c4d GPU/HW: Fix typo in –IncludeVRAMDirtyRectangle() name 2021-02-07 20:00:16 +10:00
Connor McLaughlin 4a240958ff GPU/HW: Work around VRAM copy glBlitFramebuffer broken in Mali 2021-02-07 19:59:50 +10:00
Connor McLaughlin a77edc6436 Settings: Default console logging on Android to on 2021-02-07 03:27:37 +10:00
Connor McLaughlin 837fb6128b GPU/HW: Fix mask bit when rendering with transparency and no DSB
Fixes some sprites in Bloody Roar on Mali GPUs.
2021-02-06 20:14:28 +10:00
Connor McLaughlin c03c4cb95a GPU: Elide VRAM copies when they will have no effect
Can provide a performance boost in most games because of the redundant
copy they issue once a frame.
2021-02-06 19:20:14 +10:00
Connor McLaughlin 701edb335a Various warning fixes 2021-02-06 19:19:55 +10:00
Connor McLaughlin f943aa0489
Merge pull request #1582 from MaddTheSane/printfFixes
Logging fixes
2021-02-05 11:47:38 +10:00
C.W. Betts 662d6e9711 Fix possible log formatting errors. 2021-02-04 17:54:51 -07:00
C.W. Betts 2c2af6c751
Update shadergen.cpp
Quiets a warning in Clang about copying variables.

Actual warning text: Loop variable '[qualifiers, name]' of type 'const std::__1::pair<const char *, const char *>' creates a copy from type 'const std::__1::pair<const char *, const char *>'
2021-02-04 13:05:59 -07:00
Connor McLaughlin 626b2ecec1 GPU/Vulkan: Fix a possible layout violation when displaying
Happened in some games, e.g. Driver.
2021-02-02 00:52:23 +10:00
Connor McLaughlin 43bb69fb6b GPU/SW: Fix 576-line scanout of PAL games 2021-02-01 18:39:36 +10:00
Connor McLaughlin 904680f0df Settings: Make integer and linear upscaling mutually exclusive 2021-02-01 18:39:15 +10:00
Connor McLaughlin 23e102b90a GPU: Make display texture 720x576 instead of 1024x512
Some PAL games render in the full permissable 576 height, not 512.
2021-02-01 01:10:32 +10:00
Connor McLaughlin 85b4a02f20 Fix Android build 2021-01-31 17:28:37 +10:00
Connor McLaughlin 55a1d0437d System: Display message on media change 2021-01-31 17:10:27 +10:00
Connor McLaughlin 98b4101cd7 Settings: Expose Save() method to interface 2021-01-31 17:10:27 +10:00
Connor McLaughlin 9d08f2e277 Settings: Fix show resolution not correctly saving to file 2021-01-31 17:10:27 +10:00
Connor McLaughlin e697d9aa33 HostDisplay: Move imgui context creation to base class 2021-01-31 17:10:27 +10:00
Connor McLaughlin ef7d135492 GPU: Fix missing sync when hblank is pending 2021-01-31 16:39:51 +10:00
Connor McLaughlin 9d80c48d6f CPU: Fix icache missing from save state 2021-01-31 16:39:51 +10:00
Albert Liu 2938c946f9 AnalogController: Improve accuracy of rumble configuration 2021-01-30 00:53:43 -08:00
Albert Liu c9c2f1bd21 AnalogController: Handle more config mode 0x46 and 0x47 cases 2021-01-29 23:50:45 -08:00
Connor McLaughlin 3c2b11fccb System: Don't log rewind pending flag when disabled 2021-01-29 01:27:32 +10:00
Connor McLaughlin 84c30703b2 Settings: Disable interlacing by default
The games which require it are auto-disabled by gameini.
2021-01-28 23:52:25 +10:00
Connor McLaughlin 4bb3fb48f9 System: Add a new throttler/pacer which can catch up on lost time
This can result in worse frame pacing, so if you have a decent machine
you'll probably want to turn on "display all frames" in display
settings.

But, it's sadly needed for Android.
2021-01-28 21:04:23 +10:00
Connor McLaughlin 16a32bf696 Qt: Simplify runahead settings 2021-01-26 03:38:31 +10:00
Connor McLaughlin 1b16ba3d98 Warning fixes 2021-01-26 03:38:31 +10:00
Connor McLaughlin e79dff1731 System: Use hybrid sleep on Android 2021-01-26 03:38:31 +10:00
Connor McLaughlin 24dd49e05d GPU: Fix runahead with MSAA enabled in D3D11/Vulkan 2021-01-26 03:22:23 +10:00
Connor McLaughlin b7752ff30b CDROM: Update position when pausing while seeking instead of erroring
This was causing freezes in FF7 - needs more research.
2021-01-25 01:49:35 +10:00
Connor McLaughlin b3ce2b21c0 System: Prevent using both runahead and rewind concurrently 2021-01-25 01:15:46 +10:00
Connor McLaughlin 3f96473fb5 System: Reuse existing texture/buffers for runahead/rewind 2021-01-25 01:15:46 +10:00
Connor McLaughlin e01d66d18e System: Implement runahead 2021-01-25 01:15:46 +10:00
Connor McLaughlin 516d685dd0 System: Add memory-only save states and rewind 2021-01-25 01:15:45 +10:00
Connor McLaughlin 6c6fdeb15e HostDisplay: Make textures have levels/layers/samples attributes 2021-01-24 20:41:40 +10:00
Connor McLaughlin b62f31fd96 System: Use region from exe/psf when booting 2021-01-24 17:37:09 +10:00
Connor McLaughlin 253b115b11 PSFLoader: Detect region from exe 2021-01-24 17:37:09 +10:00
Connor McLaughlin 10135e08a2 PSFLoader: Support loading minipsfs/libraries 2021-01-24 17:37:09 +10:00
Connor McLaughlin 4433197665 CPU/Recompiler: Fix hang in AArch32/armv7 2021-01-21 13:20:02 +10:00
Connor McLaughlin 4e802e90ca SPU: Move voice key off/on outside sample loop
Should be a very tiny performance boost with no difference in behaviour.
2021-01-20 12:32:37 +10:00
Connor McLaughlin 8c8f29c047 CDROM: Double audio FIFO low watermark size
Gives a better chance to catch up in case of desyncs.
2021-01-20 12:09:44 +10:00
Connor McLaughlin 3c012ec6ef SPU: Consider partial ticks when generating pending samples
Fixes hitches in opening FMV in Soul Blade (Europe).
2021-01-20 12:05:06 +10:00
Connor McLaughlin a927bfbe50 GPU/HW: Flush after each primitive for B-F transparency
Slow, but necessary for some games such as Suikoden II, where it draws
multiple polygons to the same area on screen with different transparency
modes.
2021-01-20 01:08:36 +10:00
Connor McLaughlin d4f52f1ec7 GTE: Force inline a few of the helper functions
Tiny performance improvement.
2021-01-19 00:07:26 +10:00
Connor McLaughlin 914b9bf738 SPU: Drain transfer FIFO when cancelling transfer
The busy bit got stuck on otherwise, which broke the Spanish translation
of Vagrant Story.
2021-01-18 20:43:10 +10:00
Connor McLaughlin 699d599d00 GPU: Clear display when disabling DAC and interlaced
Fixes old output showing up briefly when it's re-enabled.
2021-01-18 03:28:14 +10:00
Connor McLaughlin 29690c4635 GPU/SW: Fix interlaced output getting corrupted when size changes
Fixes glitches in screen when tilting table in Pro Pinball.
2021-01-17 02:45:13 +10:00
Connor McLaughlin e81df6bddd Settings: Disable host refresh rate sync by default 2021-01-16 02:56:04 +10:00
Connor McLaughlin 02948f988d CDROM: Return 0x00 on response FIFO overread
Fixes CyberSled hanging on boot.
2021-01-14 01:51:01 +10:00
Connor McLaughlin ffa3744b3b Settings: Add 20:9 display aspect ratio 2021-01-14 00:45:46 +10:00
Connor McLaughlin d44de3a9dc System: Use SetWaitableTimer() for throttling on Windows 2021-01-14 00:40:25 +10:00
Connor McLaughlin 93959a9d88 CPU: Fix crash with some block cycle counts on ARM
Fixes crash in Capcom vs SNK Pro.
2021-01-13 20:19:24 +10:00
Connor McLaughlin 2b5cfb272c Qt: Add dump VRAM and SPU RAM actions 2021-01-13 19:24:41 +10:00
Connor McLaughlin b5ffbfe826 Qt: Fix audio sliders not applying correctly 2021-01-13 02:37:04 +10:00
Connor McLaughlin a0a24c7752 GPU/Vulkan: Only update sample texture when render area dirty
Fixes crash when using Show VRAM in some games with Vulkan.
2021-01-12 02:19:23 +10:00
Connor McLaughlin 13cba122ef HostDisplay: Move Windows fallback for refresh rate query to HostInterface 2021-01-11 15:24:38 +10:00
Connor McLaughlin fd166a4485 ShaderCache: Add a data version field
We can increment this to prevent people's shader caches from growing too
large with shader changes.
2021-01-11 15:24:38 +10:00
Connor McLaughlin 97971464d1 GPU/ShaderGen: Remove texcoord offset
Doesn't seem to be needed anymore, and causes issues in some games (e.g.
flickering polygons in Evil Dead)
2021-01-11 15:12:16 +10:00
Connor McLaughlin 43d01776dc HostInterface: Add "Sync To Host Refresh Rate" option 2021-01-11 03:50:44 +10:00
Connor McLaughlin bb572741ae HostDisplay: Add GetHostRefreshRate() function
Only implemented in Windows for now.
2021-01-11 03:50:13 +10:00
Connor McLaughlin ce965e89ca Qt/Android: Add help text for resampling, turn on by default 2021-01-11 02:27:14 +10:00
Connor McLaughlin 54f5563321 Qt: Add turbo speed setting 2021-01-11 01:57:10 +10:00
Connor McLaughlin a5f9aa11e1 Settings: Add audio resampling when running at non-standard speed 2021-01-11 01:14:32 +10:00
Connor McLaughlin 54c7fc6b08 AudioStream: Support resampling input 2021-01-11 01:14:32 +10:00
Connor McLaughlin 19032750b4 CDROM: Don't treat no-region discs as audio CDs
Fixes some homebrew games not booting.
2021-01-11 01:05:21 +10:00
Connor McLaughlin 11992bde4e TimingEvents: Use function pointers instead of std::function 2021-01-10 01:45:07 +10:00
Connor McLaughlin 15652b4c1f SPU: Fix a few cases where SPU interrupts weren't firing 2021-01-10 01:39:21 +10:00
Connor McLaughlin df98a0b04e CPU/Recompiler: Fix incorrect speculative byte/halfword reads
Fixes crash on boot in Monkey Magic.
2021-01-10 01:38:35 +10:00
Albert Liu 5ff3299384 Controller: Add method for reading analog input bytes 2021-01-07 15:04:23 -08:00
Connor McLaughlin 419726f4cc Remove libretro core - core will now be maintained by libretro
libretro have agreed to take over maintenance of the core.

Please see their fork at https://github.com/libretro/duckstation if you
wish to continue to use it.
2021-01-08 01:37:59 +10:00
Connor McLaughlin 24c373245e MemoryCard: Make formatting OSD message translatable 2021-01-07 12:15:57 +10:00
Connor McLaughlin f832dca975 Bus: Don't force inline EXP1/EXP2 access 2021-01-06 01:02:30 +10:00
Connor McLaughlin f3cdfe97a7 Bus/EXP2: Support openbios putc address 2021-01-06 00:56:35 +10:00
Connor McLaughlin 845cd37835 DMA: Determine slice size based on whether pad is transmitting
Plenty of games seem to suffer from this issue where they have
a linked list DMA going while polling the controller. Using a
too-large slice size will result in the serial timing being off,
and the game thinking the controller is disconnected. So we
don't hurt performance too much for the general case, we reduce
this to equal CPU and DMA time when the controller is
transferring, but otherwise leave it at the higher size.
2021-01-06 00:15:42 +10:00
Connor McLaughlin 98a4e59f52 Qt: Fix some strings not being translatable 2021-01-06 00:15:42 +10:00
Connor McLaughlin a6e1b3c4ad
Merge pull request #1389 from ggrtk/ps3-bios-size
BIOS: Add check for older BIOS from PS3
2021-01-05 17:59:57 +10:00
Connor McLaughlin cdefcf7359 HostInterface: Log when all enhancements are disabled by config 2021-01-05 17:58:55 +10:00
Albert Liu 79012d5288 BIOS: Add check for older BIOS from PS3
Same revision number as newer PS3, but different file size and 512KB
hash.
2021-01-04 23:54:42 -08:00
Connor McLaughlin 8f5c20bdf5 BIOS: Improve robustness of BIOS searching
Always prefer a known BIOS image over an unknown image. Hopefully this
will stop people getting crashes on startup due to other files in the
BIOS directory confusing it.
2021-01-05 12:22:18 +10:00
Connor McLaughlin 5cd261a5b2 BIOS: Only match PS1 and PS2 BIOS images exactly 2021-01-05 12:22:13 +10:00
Connor McLaughlin 73f6521452 SPU: Check voice addresses on IRQ re-enable
NASCAR 2001 music depends on the IRQ firing multiple times, when the
voice address is still set to the IRQ address.
2021-01-05 00:46:41 +10:00
Connor McLaughlin e3262fc0a4 CPU: Compile fix for debug builds 2021-01-05 00:46:41 +10:00
Connor McLaughlin 35fdae0d95
Merge pull request #1372 from ggrtk/analog-controller-refactor
AnalogController: Refactor data transfer implementation
2021-01-05 00:45:37 +10:00
Connor McLaughlin affffca3da GPU/HW: Set max resolution scale to 32
The UI is intentionally left at 16x. Going too high **will** make you
run out VRAM and your system will start acting strangely. But for those
people who really want to do it, you can go 32x in Vulkan with the SDL
frontend, or by setting it in the ini.
2021-01-04 03:11:14 +10:00
Connor McLaughlin 9ff8130e40 fixup! CPU: Make trace-to-file toggleable at runtime and in release builds 2021-01-04 03:11:14 +10:00
Connor McLaughlin bf1d51b5d8 CPU: Make trace-to-file toggleable at runtime and in release builds 2021-01-04 03:11:14 +10:00
Albert Liu 04884257d6 AnalogController: Refactor data transfer implementation 2021-01-03 09:09:49 -08:00
Connor McLaughlin 0de34d7bf7 DMA: Increase precision for large transfers
Also gets rid of the delay on the GPU side for writing to VRAM (doesn't
make sense), and it's not needed since we slice the block transfers now.

Fixes palette corruption in Vigilante 8, and missing rider in
Championship Motocross 2001 featuring Ricky Carmichael.
2021-01-03 16:11:42 +10:00
Connor McLaughlin c9ef3ec1a3 DMA: Clear state on shutdown
Fix a rare crash where the GPU starting after a second boot accesses
uninitalized DMA fields.
2021-01-03 14:48:02 +10:00
Connor McLaughlin 2ec26e54b7 GPU/HW: Disable downsampling when using 24-bit display
It's dropped to 1x first anyway.
2021-01-03 12:18:21 +10:00
Connor McLaughlin 40257e5b20 GPU/HW: Don't set m_pgxp_depth_buffer when PGXP is disabled
Fixes text corruption in Castlevania when PGXP is disabled and depth
buffer is enabled.
2021-01-01 17:49:20 +10:00
Connor McLaughlin c9240eea72 CPU/Recompiler: Use PGXP interpreter for fallback
Fixes holes in geometry with PGXP enabled in Threads of Fate.
2021-01-01 17:16:55 +10:00
Connor McLaughlin 4e87b30b40 System: Skip throttler phase reset when running at <100% 2021-01-01 14:08:09 +10:00
Connor McLaughlin 04a187afb2 CDROM: Fix read error/unlicensed flag getting set on all discs
Regression from 75aa52ab06.
2021-01-01 03:00:16 +10:00
Connor McLaughlin 75aa52ab06 CDROM: Fail reads immediately for audio/unlicensed CDs
Fixes first track being unavailable on audio CDs in Vib-Ribbon.
2021-01-01 01:38:14 +10:00
Connor McLaughlin 9294bf6be3 CDROM: Keep target location even after failed seeks 2021-01-01 01:37:51 +10:00
Connor McLaughlin 187de65f50 CDROM: Reset disc position to start after switching discs 2021-01-01 00:01:13 +10:00
Connor McLaughlin 5690aef057 CDROM: Send seek error when read+seeking to audio sector
Fixes hang in Vib-Ribbon when using an audio CD.
2020-12-31 03:19:51 +10:00
Connor McLaughlin f911e90e17 CDROM: Hopefully fix crash in debug window when reading lead-out 2020-12-31 02:10:49 +10:00
Connor McLaughlin 02377b1a92 CPU/CodeCache: Fix possible crash on invalidate->recompile->overflow 2020-12-31 02:10:49 +10:00
Connor McLaughlin 3cb2cd8235 GPU: Add adaptive and box downsampling modes 2020-12-30 17:41:39 +10:00
Connor McLaughlin 59e8363075 D3D11: Support mipmaps in wrapper textures 2020-12-30 17:39:40 +10:00
Connor McLaughlin 68ce959d70 Settings: Add option to temporarily disable all enhancements 2020-12-30 17:39:29 +10:00
Connor McLaughlin 40f241dde3 PlaystationMouse: Fix incorrect translation context for help 2020-12-30 17:03:59 +10:00
PugsyMAME 3284a18ad3
Add new Cheat Type F4, Find & Replace Bytes (#1345)
* Add new Cheat Type F4, Find & Replace Bytes

Also knows as 'AOB' apparently. Information about how it works will be in the next chtdb.txt header or you can read/ask about it on the discord channel.

* Add new Cheat Type F4, Find & Replace Bytes 

Also knows as 'AOB' apparently. Information about how it works will be in the next chtdb.txt header or you can read/ask about it on the discord channel.

* Added error trapping for cheat type F4

As suggested
2020-12-30 00:55:49 +10:00
Connor McLaughlin a894b295b6 CPU/CodeCache: Fix assertion failure when patching in double branch 2020-12-29 22:49:52 +10:00
Albert Liu 11fbf26045 HostDisplay: Use floats internally for draw rectangle calculation 2020-12-29 01:33:41 -08:00
Albert Liu e0f3a4f17b HostDisplay: Calculate draw rectangle in terms of horizontal scale 2020-12-29 01:33:40 -08:00
Albert Liu b824844043 HostDisplay: Fix framebuffer screenshot scaling 2020-12-29 01:33:40 -08:00
Albert Liu d9096ca12d BIOS: Prevent patching incompatible BIOSes 2020-12-27 16:14:28 -08:00
Albert Liu 0e2276fc7a BIOS: Add support for loading PS2 BIOSes 2020-12-27 15:32:41 -08:00
Albert Liu 4db29f9399 HostInterface: Check all console regions when looking for any BIOS 2020-12-27 15:32:41 -08:00