Commit graph

195 commits

Author SHA1 Message Date
Connor McLaughlin d9893bb127 System: Add option to use a single memory card for playlists 2020-08-16 00:20:10 +10:00
Connor McLaughlin d1ee6c0da7 GPU/HW: Make settings update slightly safer 2020-08-12 02:27:52 +10:00
Connor McLaughlin 3a020ef87e HostInterface; Fix crash on shutdown if boot fails 2020-08-11 03:01:08 +10:00
Connor McLaughlin 5c6e92cdfc GPU/HW: Disable coordinate clamping when unnecessary 2020-08-10 23:28:37 +10:00
Connor McLaughlin 1d5f810a4b CPU/Recompiler: Disable memory access exceptions by default
This means it'll no longer pass amidog's CPU test in the default config.
But no games rely on this. You can enable it in advanced options if you
want to pass the CPU test.
2020-08-08 23:44:13 +10:00
Connor McLaughlin e5c46a54b7 System: Restore/reset state on recreating GPU/updating settings
Fixes display corruption on RetroArch when switching renderers.
2020-08-06 23:20:52 +10:00
Connor McLaughlin 0c1b637549 PGXP: Add initial implementation 2020-08-02 00:25:07 +10:00
Connor McLaughlin b6f871d2b9
JIT optimizations and refactoring (#675)
* CPU/Recompiler: Use rel32 call where possible for no-args

* JitCodeBuffer: Support using preallocated buffer

* CPU/Recompiler/AArch64: Use bl instead of blr for short branches

* CPU/CodeCache: Allocate recompiler buffer in program space

This means we don't need 64-bit moves for every call out of the
recompiler.

* GTE: Don't store as u16 and load as u32

* CPU/Recompiler: Add methods to emit global load/stores

* GTE: Convert class to namespace

* CPU/Recompiler: Call GTE functions directly

* Settings: Turn into a global variable

* GPU: Replace local pointers with global

* InterruptController: Turn into a global pointer

* System: Replace local pointers with global

* Timers: Turn into a global instance

* DMA: Turn into a global instance

* SPU: Turn into a global instance

* CDROM: Turn into a global instance

* MDEC: Turn into a global instance

* Pad: Turn into a global instance

* SIO: Turn into a global instance

* CDROM: Move audio FIFO to the heap

* CPU/Recompiler: Drop ASMFunctions

No longer needed since we have code in the same 4GB window.

* CPUCodeCache: Turn class into namespace

* Bus: Local pointer -> global pointers

* CPU: Turn class into namespace

* Bus: Turn into namespace

* GTE: Store registers in CPU state struct

Allows relative addressing on ARM.

* CPU/Recompiler: Align code storage to page size

* CPU/Recompiler: Fix relative branches on A64

* HostInterface: Local references to global

* System: Turn into a namespace, move events out

* Add guard pages

* Android: Fix build
2020-07-31 17:09:18 +10:00
Connor McLaughlin 8802177e25 BIOS: Add more revision filenames/hashes 2020-07-31 16:28:15 +10:00
Connor McLaughlin 104b80f111 HostInterface: Move 'System shut down' message to SDL
Only frontend where it makes sense anyway.
2020-07-23 02:45:20 +10:00
Connor McLaughlin 9496c992f7 System: Add an option to preload CD image to RAM 2020-07-22 00:03:22 +10:00
Connor McLaughlin 68d98af497 Qt: Remove usage of QString where possible for settings 2020-07-21 20:10:06 +10:00
Connor McLaughlin bddd098a66
Merge branch 'master' into qt-inisettings 2020-07-21 13:28:18 +10:00
Connor McLaughlin 5c1c467e38 GTE: Add widescreen hack 2020-07-18 00:28:37 +10:00
Albert Liu 9b2740b395 HostInterface: Save tweak/hack defaults to settings file
Fixes tweak/hack defaults not displaying correctly in Qt frontend.
2020-07-16 20:35:18 -07:00
Connor McLaughlin 7ba1bed37b Settings: Leave interlacing on by default
Too many games break without it.
2020-07-14 01:27:57 +10:00
Connor McLaughlin b0b3901722 libretro: Fix DualShock analog mode auto-enable 2020-07-05 00:05:14 +10:00
Connor McLaughlin f396a2c373 Renderers: Make shader cache path a prefix instead of directory 2020-07-04 22:14:07 +10:00
Connor McLaughlin b471d1043a Settings: Load Memory Cards From State -> Load Devices From State
Makes it apply to controllers too.
2020-07-02 00:50:53 +10:00
Connor McLaughlin e374853cf5 HostInterface: Better configuration of custom crosshair/software cursor 2020-07-01 01:57:25 +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
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 eec37df1e0 Settings: Make the recompiler the default CPU mode 2020-06-24 01:39:42 +10:00
Connor McLaughlin 49d11988bf Core: Add Vulkan GPU renderer 2020-06-19 00:18:17 +10:00
Connor McLaughlin 075380f8e0 Move most helper logic from base HostInterface to FrontendCommon 2020-06-09 02:35:37 +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 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 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 2795dea124 HostInterface: Prioritize SCPH-3000 over SCPH-1000 for NTSC-J 2020-05-17 01:08:14 +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 d781de2ce6 GameList: Add support for compatibility database 2020-05-16 20:32:36 +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 db9d637f92 HostInterface: Fix mute not applying on startup 2020-05-13 13:47:12 +10:00
Connor McLaughlin c329f58afe HostInterface: Add audio buffer/count/volume/mute settings 2020-05-10 00:44:37 +10:00
Connor McLaughlin 0f5bc7267f HostInterface: Fix hang when switching audio backends 2020-05-05 03:04:28 +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 b4c31e55e2 HostDisplay: Add integer upscaling option 2020-05-01 01:00:22 +10:00
Connor McLaughlin e37962009e HostInterface: Add log lettings to ini 2020-05-01 00:58:32 +10:00
Connor McLaughlin 59f055f4b9 HostInterface: Make title-based memory cards the default 2020-04-30 01:21:18 +10:00
Connor McLaughlin 940b725c1d Settings: Make DMA performance parameters tweakable 2020-04-29 20:00:22 +10:00
Connor McLaughlin 74e455a5f7 System: Support per-game memory cards 2020-04-27 16:22:25 +10:00
Connor McLaughlin 08c8d1a521 System: Support saving screenshots in save states 2020-04-21 02:50:45 +10:00
Connor McLaughlin 1757932b3a GPU: Implement FIFO and timings
This will cause a slight performance loss. I've left some knobs in which
can be tweaked to mitigate this, but the goal is to be compatible with
all games which require them.
2020-04-19 01:17:28 +10:00
Connor McLaughlin f75ea052a6 FrontendCommon: Add input profile support 2020-04-15 01:44:04 +10:00
Connor McLaughlin 81cf4b469f Frontends: Add shared command line interface
Also provides batch mode and automatic fullscreen switching.

  -help: Displays this information and exits.
  -version: Displays version information and exits.
  -batch: Enables batch mode (exits after powering off)
  -fastboot: Force fast boot for provided filename
  -slowboot: Force slow boot for provided filename
  -resume: Load resume save state. If a boot filename is provided,
    that game's resume state will be loaded, otherwise the most
    recent resume save state will be loaded.
  -state <index>: Loads specified save state by index. If a boot
    filename is provided, a per-game state will be loaded, otherwise
    a global state will be loaded.
  -statefile <filename>: Loads state from the specified filename.
    No boot filename is required with this option.
  -fullscreen: Enters fullscreen mode immediately after starting.
  -nofullscreen: Prevents fullscreen mode from triggering if enabled.
  -portable: Forces "portable mode", data in same directory.
  --: Signals that no more arguments will follow and the remaining
    parameters make up the filename. Use when the filename contains
    spaces or starts with a dash.
2020-04-13 22:17:09 +10:00
Connor McLaughlin 6a03bb2d15 HostInterface: Drop std::filesystem requirement 2020-04-12 21:06:33 +10:00
Connor McLaughlin 7779a54bc5 GPU: Rename 'Force Progressive Scan' to 'Disable Interlacing'
It affects rendering as well as display/scanout now, after all.
2020-04-11 16:37:53 +10:00
Connor McLaughlin 6cfad33b8e HostInterface: Set NoNav on FPS window
Prevents it stealing focus in SDL frontend.
2020-04-11 00:00:37 +10:00
Connor McLaughlin fbfd838e22 GPU: Add pixel aspect ratio option
Can display in 4:3, 16:9, 1:1 ratios.
2020-04-10 15:12:35 +10:00
Connor McLaughlin 3325d2c42c GPU: Add Force NTSC timings option
This option forces NTSC timings for PAL games, causing them to either
run faster (more likely) or smoother (less likely).
2020-04-10 13:35:10 +10:00
Connor McLaughlin 610abc1a75 BIOS: Make SCPH-3000 BIOS known 2020-04-07 11:54:24 +10:00
Connor McLaughlin b4538b1d2e HostInterface: Add redump BIOS filenames to search list
ps-10x.bin, ps-30x.bin, etc.
2020-04-07 11:54:22 +10:00
Connor McLaughlin e91d760175 HostInterface: Fix crash on startup with controller connected 2020-04-06 12:18:33 +10:00
Connor McLaughlin e7640d5367 HostInterface: Make SetUserDirectory() overridable by frontends 2020-04-05 22:59:06 +10:00
Connor McLaughlin 15c33ebedb CDROM: Add "Enable Region Check" option 2020-04-01 01:48:37 +10:00
Connor McLaughlin 7cd7dec668 HostInterface: Restore pause state after switching renderers
Fixes #148.
2020-03-25 01:48:51 +10:00
Connor McLaughlin 7e36195f44 HostInterface: Enable on-screen FPS/VPS/Speed display via config 2020-03-22 13:20:08 +10:00
Connor McLaughlin 77a60f0c5f HostInterface: Crash fix again for controller switching 2020-03-22 13:15:44 +10:00
Connor McLaughlin 12ddeb675c HostInterface: Fix controller not updating when switched and system running 2020-03-22 12:54:26 +10:00
Connor McLaughlin 6b68512ac1 HostInterface: Add SaveScreenshot() method 2020-03-16 00:03:57 +10:00
Connor McLaughlin 8e20d0d4ff SPU: Add audio dumping support 2020-03-15 22:04:17 +10:00
Connor McLaughlin 198a64eb5e HostInterface: Add a helper function for generating timestamp-based filenames 2020-03-15 22:03:53 +10:00
Connor McLaughlin 8f39a0f154 Qt: Properly implement "Start Fullscreen" 2020-03-12 13:53:58 +10:00
Connor McLaughlin e8a5259e68 Qt: Show save times in save state menu as well 2020-03-12 13:51:23 +10:00
Connor McLaughlin b59e4ffbcb HostInterface: Reset performance counters on unpausing 2020-03-03 10:07:16 +10:00
Connor McLaughlin 69f03959aa Qt: Implement context menu in game list 2020-03-02 11:08:16 +10:00
Connor McLaughlin 635ab72b37 GPU: Implement "Scaled Dithering" option
Fixes #29.
2020-03-01 00:05:31 +10:00
Connor McLaughlin 63064f80c2 HostInterface: Fix default value for Display/CropMode 2020-02-28 18:15:37 +10:00
Connor McLaughlin fcc0ae9571 GPU: Implement "Crop Mode" (none, overscan, all borders) 2020-02-28 17:01:01 +10:00
Connor McLaughlin f35970fcac FrontendCommon: Move input binding and some other logic from Qt to common 2020-02-28 17:00:09 +10:00
Connor McLaughlin 07ba2ecd3d Settings: Simplify resolution scale enumeration 2020-02-28 16:59:55 +10:00
Connor McLaughlin f21cb25426 HostInterface: Recreate system on GPU debug device toggle too 2020-02-28 16:59:53 +10:00
Connor McLaughlin 50a155e775 Settings: Default to relative paths for bios/memcards
Prevents from locking to the directory the first time we run.
2020-02-28 16:58:30 +10:00
Connor McLaughlin e4ff8b0936 Qt: Add power off hotkey and confirmation message 2020-02-26 19:26:20 +10:00
Connor McLaughlin e9dea6e0f7 HostInterface: Add a ConfirmMessage() method 2020-02-26 19:25:57 +10:00
Connor McLaughlin 959a555274 CDROM: Implement asynchronous disc reading 2020-02-22 00:24:35 +09:00
Connor McLaughlin 1ed8243776 HostInterface: Reset counters when starting from state 2020-02-22 00:18:27 +09:00
Connor McLaughlin 1e0e802fa4 HostInterface: Add a helper to display a 'Loading Screen' during long startup 2020-02-16 00:15:16 +09:00
Connor McLaughlin dcc9da3f5e HostInterface: Don't try to resume system without game code 2020-02-16 00:15:09 +09:00
Connor McLaughlin cd2f6d1f68 HostInterface: Only display error when loading resume state if boot anyway flag isn't set 2020-02-16 00:14:58 +09:00
Connor McLaughlin 6a1206dde7 Frontends: Add option for "Increase Timer Resolution" 2020-02-16 00:14:51 +09:00
Connor McLaughlin e01cf0dccb Frontends: Implement auto save on exit/resume 2020-02-16 00:14:49 +09:00
Connor McLaughlin e738b87a25 HostInterface: Add helpers for resume save state 2020-02-16 00:14:47 +09:00
Connor McLaughlin 5f3be68028 HostInterface: Notify host when controller types change 2020-02-16 00:14:44 +09:00
Connor McLaughlin 37d765e8d7 HostInterface: Support switching audio backends 2020-02-16 00:14:40 +09:00
Connor McLaughlin 6a0c15b649 HostInterface: Move timer resolution increase to base class 2020-02-16 00:14:37 +09:00
Connor McLaughlin 1e009133ae Rename 'Default' audio backend to 'SDL' 2020-02-16 00:14:35 +09:00
Connor McLaughlin fd8ed08307 Move more logic from frontend to base HostInterface 2020-02-16 00:14:28 +09:00
Connor McLaughlin f0578bb932 HostInterface: Make helper methods const 2020-02-16 00:14:25 +09:00
Connor McLaughlin 7290e5cad0 HostInterface: Add per-slot save state helper functions 2020-02-16 00:14:00 +09:00
Connor McLaughlin befa2a27d8 HostInterface: Fix crash in SetUserDirectory 2020-02-15 23:12:15 +09:00
Connor McLaughlin b605a84f7d HostInterface: Set user directory for Linux/macOS, portable.txt support 2020-02-15 22:36:16 +09:00
Connor McLaughlin 8eba4b379c Settings: Default to D3D11 renderer on Windows
This point it's less buggy and slightly more performant.
2020-02-15 10:21:59 +09:00
Connor McLaughlin 5aba89091e HostInterface: Fix possible crash in BIOS loading 2020-02-14 22:45:54 +09:00
Connor McLaughlin 5c7ef65a34 HostInterface: Non-standard speeds are <100% too 2020-02-12 21:27:43 +09:00
Connor McLaughlin e098c83342 HostInterface: Disable vsync/audio sync when running at not-100% speed 2020-02-11 12:03:25 +09:00