Commit Graph

238 Commits (e4735bcf7a3ef11fee974bfa13bce392d9392b21)

Author SHA1 Message Date
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
5 years ago
Connor McLaughlin 8802177e25 BIOS: Add more revision filenames/hashes 5 years ago
Connor McLaughlin 104b80f111 HostInterface: Move 'System shut down' message to SDL
Only frontend where it makes sense anyway.
5 years ago
Connor McLaughlin 9496c992f7 System: Add an option to preload CD image to RAM 5 years ago
Connor McLaughlin 68d98af497 Qt: Remove usage of QString where possible for settings 5 years ago
Connor McLaughlin bddd098a66
Merge branch 'master' into qt-inisettings 5 years ago
Connor McLaughlin 5c1c467e38 GTE: Add widescreen hack 5 years ago
Albert Liu 9b2740b395 HostInterface: Save tweak/hack defaults to settings file
Fixes tweak/hack defaults not displaying correctly in Qt frontend.
5 years ago
Connor McLaughlin 7ba1bed37b Settings: Leave interlacing on by default
Too many games break without it.
5 years ago
Connor McLaughlin b0b3901722 libretro: Fix DualShock analog mode auto-enable 5 years ago
Connor McLaughlin f396a2c373 Renderers: Make shader cache path a prefix instead of directory 5 years ago
Connor McLaughlin b471d1043a Settings: Load Memory Cards From State -> Load Devices From State
Makes it apply to controllers too.
5 years ago
Connor McLaughlin e374853cf5 HostInterface: Better configuration of custom crosshair/software cursor 5 years ago
Connor McLaughlin 0b11a14e24 Qt: Better handling of default settings not in ini 5 years ago
Connor McLaughlin 4dc9e10777 HostInterface: Support per-controller-type settings 5 years ago
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.
5 years ago
Connor McLaughlin eec37df1e0 Settings: Make the recompiler the default CPU mode 5 years ago
Connor McLaughlin 49d11988bf Core: Add Vulkan GPU renderer 5 years ago
Connor McLaughlin 075380f8e0 Move most helper logic from base HostInterface to FrontendCommon 6 years ago
Connor McLaughlin f9eb3719e3 HostInterface: Add software cursor mode
This will probably need to be extended in the future.
6 years ago
Connor McLaughlin 531c3ad5fa AudioStream: Replace buffer queue with ring buffer
Should achieve a decent overall minimum latency reduction.
6 years ago
Connor McLaughlin 6acd8b27dd Qt: Prevent lag disabling power on buttons when starting 6 years ago
Connor McLaughlin 81a7b147fc System: Add option to disable loading memory cards from save states 6 years ago
Connor McLaughlin b17a5832e5 System: Simplify save state booting
Fixes memory card warning messages on load state.
6 years ago
Connor McLaughlin 2795dea124 HostInterface: Prioritize SCPH-3000 over SCPH-1000 for NTSC-J 6 years ago
Connor McLaughlin 1c50a09c2e HostInterface: Set user directory to Documents\DuckStation 6 years ago
Connor McLaughlin f7a2448dfb HostInterface: Pull compatibility database from program directory
Fixes compatibility list not reading on Linux.
6 years ago
Connor McLaughlin d781de2ce6 GameList: Add support for compatibility database 6 years ago
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.
6 years ago
Connor McLaughlin db9d637f92 HostInterface: Fix mute not applying on startup 6 years ago
Connor McLaughlin c329f58afe HostInterface: Add audio buffer/count/volume/mute settings 6 years ago
Connor McLaughlin 0f5bc7267f HostInterface: Fix hang when switching audio backends 6 years ago
Connor McLaughlin d8ab587153 HostInterface: Modify settings loading interface to support per-frontend settings 6 years ago
Connor McLaughlin b4c31e55e2 HostDisplay: Add integer upscaling option 6 years ago
Connor McLaughlin e37962009e HostInterface: Add log lettings to ini 6 years ago
Connor McLaughlin 59f055f4b9 HostInterface: Make title-based memory cards the default 6 years ago
Connor McLaughlin 940b725c1d Settings: Make DMA performance parameters tweakable 6 years ago
Connor McLaughlin 74e455a5f7 System: Support per-game memory cards 6 years ago
Connor McLaughlin 08c8d1a521 System: Support saving screenshots in save states 6 years ago
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.
6 years ago
Connor McLaughlin f75ea052a6 FrontendCommon: Add input profile support 6 years ago
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.
6 years ago
Connor McLaughlin 6a03bb2d15 HostInterface: Drop std::filesystem requirement 6 years ago
Connor McLaughlin 7779a54bc5 GPU: Rename 'Force Progressive Scan' to 'Disable Interlacing'
It affects rendering as well as display/scanout now, after all.
6 years ago
Connor McLaughlin 6cfad33b8e HostInterface: Set NoNav on FPS window
Prevents it stealing focus in SDL frontend.
6 years ago
Connor McLaughlin fbfd838e22 GPU: Add pixel aspect ratio option
Can display in 4:3, 16:9, 1:1 ratios.
6 years ago
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).
6 years ago
Connor McLaughlin 610abc1a75 BIOS: Make SCPH-3000 BIOS known 6 years ago
Connor McLaughlin b4538b1d2e HostInterface: Add redump BIOS filenames to search list
ps-10x.bin, ps-30x.bin, etc.
6 years ago
Connor McLaughlin e91d760175 HostInterface: Fix crash on startup with controller connected 6 years ago
Connor McLaughlin e7640d5367 HostInterface: Make SetUserDirectory() overridable by frontends 6 years ago
Connor McLaughlin 15c33ebedb CDROM: Add "Enable Region Check" option 6 years ago
Connor McLaughlin 7cd7dec668 HostInterface: Restore pause state after switching renderers
Fixes #148.
6 years ago
Connor McLaughlin 7e36195f44 HostInterface: Enable on-screen FPS/VPS/Speed display via config 6 years ago
Connor McLaughlin 77a60f0c5f HostInterface: Crash fix again for controller switching 6 years ago
Connor McLaughlin 12ddeb675c HostInterface: Fix controller not updating when switched and system running 6 years ago
Connor McLaughlin 6b68512ac1 HostInterface: Add SaveScreenshot() method 6 years ago
Connor McLaughlin 8e20d0d4ff SPU: Add audio dumping support 6 years ago
Connor McLaughlin 198a64eb5e HostInterface: Add a helper function for generating timestamp-based filenames 6 years ago
Connor McLaughlin 8f39a0f154 Qt: Properly implement "Start Fullscreen" 6 years ago
Connor McLaughlin e8a5259e68 Qt: Show save times in save state menu as well 6 years ago
Connor McLaughlin b59e4ffbcb HostInterface: Reset performance counters on unpausing 6 years ago
Connor McLaughlin 69f03959aa Qt: Implement context menu in game list 6 years ago
Connor McLaughlin 635ab72b37 GPU: Implement "Scaled Dithering" option
Fixes #29.
6 years ago
Connor McLaughlin 63064f80c2 HostInterface: Fix default value for Display/CropMode 6 years ago
Connor McLaughlin fcc0ae9571 GPU: Implement "Crop Mode" (none, overscan, all borders) 6 years ago
Connor McLaughlin f35970fcac FrontendCommon: Move input binding and some other logic from Qt to common 6 years ago
Connor McLaughlin 07ba2ecd3d Settings: Simplify resolution scale enumeration 6 years ago
Connor McLaughlin f21cb25426 HostInterface: Recreate system on GPU debug device toggle too 6 years ago
Connor McLaughlin 50a155e775 Settings: Default to relative paths for bios/memcards
Prevents from locking to the directory the first time we run.
6 years ago
Connor McLaughlin e4ff8b0936 Qt: Add power off hotkey and confirmation message 6 years ago
Connor McLaughlin e9dea6e0f7 HostInterface: Add a ConfirmMessage() method 6 years ago
Connor McLaughlin 959a555274 CDROM: Implement asynchronous disc reading 6 years ago
Connor McLaughlin 1ed8243776 HostInterface: Reset counters when starting from state 6 years ago
Connor McLaughlin 1e0e802fa4 HostInterface: Add a helper to display a 'Loading Screen' during long startup 6 years ago
Connor McLaughlin dcc9da3f5e HostInterface: Don't try to resume system without game code 6 years ago
Connor McLaughlin cd2f6d1f68 HostInterface: Only display error when loading resume state if boot anyway flag isn't set 6 years ago
Connor McLaughlin 6a1206dde7 Frontends: Add option for "Increase Timer Resolution" 6 years ago
Connor McLaughlin e01cf0dccb Frontends: Implement auto save on exit/resume 6 years ago
Connor McLaughlin e738b87a25 HostInterface: Add helpers for resume save state 6 years ago
Connor McLaughlin 5f3be68028 HostInterface: Notify host when controller types change 6 years ago
Connor McLaughlin 37d765e8d7 HostInterface: Support switching audio backends 6 years ago
Connor McLaughlin 6a0c15b649 HostInterface: Move timer resolution increase to base class 6 years ago
Connor McLaughlin 1e009133ae Rename 'Default' audio backend to 'SDL' 6 years ago
Connor McLaughlin fd8ed08307 Move more logic from frontend to base HostInterface 6 years ago
Connor McLaughlin f0578bb932 HostInterface: Make helper methods const 6 years ago
Connor McLaughlin 7290e5cad0 HostInterface: Add per-slot save state helper functions 6 years ago
Connor McLaughlin befa2a27d8 HostInterface: Fix crash in SetUserDirectory 6 years ago
Connor McLaughlin b605a84f7d HostInterface: Set user directory for Linux/macOS, portable.txt support 6 years ago
Connor McLaughlin 8eba4b379c Settings: Default to D3D11 renderer on Windows
This point it's less buggy and slightly more performant.
6 years ago
Connor McLaughlin 5aba89091e HostInterface: Fix possible crash in BIOS loading 6 years ago
Connor McLaughlin 5c7ef65a34 HostInterface: Non-standard speeds are <100% too 6 years ago
Connor McLaughlin e098c83342 HostInterface: Disable vsync/audio sync when running at not-100% speed 6 years ago
Connor McLaughlin 70fe43a3ec System: Implement variable emulation speed 6 years ago
Connor McLaughlin c820ddba79 HostInterface: Move throttle and perf stats to System class 6 years ago
Stenzek 057263bda3 HostInterface: Track changes to CPU mode in ApplySettings() 6 years ago
Connor McLaughlin 1b9609ef61 Implement event-based scheduler instead of lock-step components 6 years ago
Connor McLaughlin 624888e131 HostInterface: Default BIOS path to bios subdirectory 6 years ago
Connor McLaughlin faf2308695 Settings: Move set defaults to HostInterface so it can use user paths 6 years ago
Connor McLaughlin b5e73a0be4 HostInterface: Add helper methods for getting paths to save states/memcards 6 years ago
Connor McLaughlin 40799d0f77 HostInterface: Move ModifyResolutionScale() to base class 6 years ago
Connor McLaughlin 4a3478b360 HostInterface: Add function to switch between sw/hw rendering 6 years ago
Connor McLaughlin f2231d6669 HostInterface: Move setting update logic to base class 6 years ago
Connor McLaughlin 82563d94f4 HostInterface: Fix offset OSD messages in Qt frontend 6 years ago
Connor McLaughlin f6fee86f1c HostInterface: Create user directories on startup 6 years ago
Connor McLaughlin b4c06fdcc6 GameList: Auto set cache/database path from user directory 6 years ago
Connor McLaughlin 77b282862f HostInterface: Move running title info to System 6 years ago
Connor McLaughlin b3db3a1cc0 HostInterface: Share settings between SDL and Qt frontends 6 years ago
Connor McLaughlin 2c3a0a6af9 HostInterface: Change working directory to user directory at startup 6 years ago
Connor McLaughlin 53428cb55b HostInterface: Add user directory helpers 6 years ago
Connor McLaughlin 8d4d8e44e4 HostInterface: Saving state message should be OSD not error 6 years ago
Connor McLaughlin 0a5f7fcd75 System: Update running game when media changes from save state 6 years ago
Connor McLaughlin 20b60e0f01 Qt: Update window title/save states from running title 6 years ago
Connor McLaughlin 9562cbea56 Frontends: Add frame time performance counters 6 years ago
Connor McLaughlin 71c1e243fe Remove YBaseLib dependency 6 years ago
Connor McLaughlin 686df4a203 Qt: Improve imgui hidpi scaling 6 years ago
Connor McLaughlin 0590f0935c HostInterface: Fix compile error on Linux 6 years ago
Connor McLaughlin 9de0bf0aaf HostInterface: Most some imgui logic from SDL to core 6 years ago
Connor McLaughlin ea0845d5ad Move controller creation to System class, switch shared_ptr to unique_ptr 6 years ago
Connor McLaughlin efb8033d48 HostInterface: Fix for gcc < 8 6 years ago
Connor McLaughlin 299ee05cd9 HostInterface: Move OSD messages to base class 6 years ago
Connor McLaughlin 0a6b913536 HostInterface: Move performance counters to base class 6 years ago
Connor McLaughlin f11d357ab9 Compile fixes for Android 6 years ago
Connor McLaughlin 48e3683d20 HostInterface: Fix load state on boot not loading state 6 years ago
Connor McLaughlin b2b5e6c793 HostInterface: Reset throttle timer on slowdown
Prevents too slow messages when fast forwarding.
6 years ago
Connor McLaughlin 8fb4f73d17 Settings: Add audio sync and additional cleanup 6 years ago
Connor McLaughlin 3673c6e33c HostInterface: Re-enable audio sync by default 6 years ago
Connor McLaughlin b57f1d4a60 HostInterface: Implement non-vsync based speed throttler
Needed for PAL games.
6 years ago
Connor McLaughlin 246c97ccb3 System: Scaffolding for multi-system/multi-bios 6 years ago
Connor McLaughlin 8c51abaf37 System: Move settings to HostInterface 6 years ago
Connor McLaughlin 98a5c4980d Settings: Use simpleini for settings load/save 6 years ago
Connor McLaughlin ac45f3892c Frontend: Fix broken display texture for OpenGL 6 years ago
Connor McLaughlin 9de9cf3be2 GPU/HW: Add D3D11 renderer and refactor host interface/display 6 years ago
Connor McLaughlin 0092cb1016 Pad: Set up memory cards via settings 6 years ago
Connor McLaughlin 0e6d1d5629 Frontend: Add a powered-off window/welcome screen 6 years ago
Connor McLaughlin f852b8dd90 Further work on SPU implementation 6 years ago
Connor McLaughlin 8362b8e43b UI: Beginning of customizable settings, debug menu 6 years ago
Connor McLaughlin bddbab9d60 Rename to DuckStation 6 years ago