Commit graph

1168 commits

Author SHA1 Message Date
Connor McLaughlin 7d01bedf07 BIOS: Automatically detect images, improve selection UI 2020-09-23 00:20:50 +10:00
Silent 92d0dabf54
Make path separators in UI more consistent 2020-09-20 00:08:17 +02:00
Connor McLaughlin 25f45fbd23 CPU: Add hack for stale icache reads in interpreter 2020-09-20 01:38:18 +10:00
Connor McLaughlin db84bdb560 CDROM: Apply 4 sector penalty to ReadN..ReadN sequence
Fixes Worms Pinball.
2020-09-20 01:36:49 +10:00
Connor McLaughlin 9736dc7895 CPU: Fix InterpretUncachedBlock()
But this shouldn't be hit during normal execution.
2020-09-20 01:36:49 +10:00
Connor McLaughlin 1d5af57f71 GPU: Halve draw ticks for 480i even with force progressive
Fixes some of the games broken with the enhancement on.
2020-09-20 01:36:49 +10:00
Connor McLaughlin 92da9917a8 MemoryCard: Split into image helper functions 2020-09-19 00:28:47 +10:00
Connor McLaughlin d924130308
AnalogController: Fix Linux build 2020-09-18 00:40:54 +10:00
Connor McLaughlin 7c55940fa8 AnalogController: Fix default value of vibration bias 2020-09-18 00:17:35 +10:00
Connor McLaughlin e6bff275a6 AnalogController: Set vibration strength to 0 on Reset 2020-09-18 00:13:59 +10:00
Connor McLaughlin 915b7d3726 AnalogController: Use nonlinear mapping of vibration strength
Curve from Pokopom: https://github.com/KrossX/Pokopom/blob/master/Pokopom/Input_XInput.cpp#L210
2020-09-17 19:57:10 +10:00
Connor McLaughlin debfd53618 AnalogController: Use range for large motor, add bias
Seems the bias is needed for FF8.
2020-09-17 19:56:27 +10:00
Connor McLaughlin 3bd9f85af8 PostProcessingShaderGen: Use ints instead of bools for options 2020-09-16 11:52:23 +10:00
Silent 1918a5ddd4
STBI: Handle UTF-8 paths correctly 2020-09-14 21:27:22 +02:00
Connor McLaughlin bb6af3c8fc
Merge pull request #845 from CookiePLMonster/fix-resume
Fix issues with a -resume parameter
2020-09-14 00:11:42 +10:00
Connor McLaughlin 441f26706e Qt: Move post processing to its own setting category 2020-09-13 22:27:30 +10:00
Connor McLaughlin a409a5d45d ShaderGen: More GLSL/HLSL aliases 2020-09-13 20:20:47 +10:00
Connor McLaughlin c1006bd0ff PostProcessing: Allow fragment coordinate access from shader 2020-09-13 18:50:40 +10:00
Connor McLaughlin 60ed9e7191 PostProcessingShader: Fix errors in shader parsing 2020-09-13 18:39:40 +10:00
Connor McLaughlin 68d08ddbcb Merge branch 'postprocessing' 2020-09-13 12:14:21 +10:00
Connor McLaughlin 3847be86b0 Fix a bunch of random warnings 2020-09-13 11:54:51 +10:00
Silent 2d90cfc07e
Tidy up SystemBootParameters constructors 2020-09-12 23:05:38 +02:00
Connor McLaughlin 2819715260 FrontendCommon: Add a post processing implementation 2020-09-13 01:23:43 +10:00
Connor McLaughlin 2b4568df6a ShaderGen: Split HW shadergen from base 2020-09-13 01:23:43 +10:00
Connor McLaughlin ccaff2e7cd Settings: Fix incorrect UI for xBR texture filter 2020-09-13 01:21:14 +10:00
Connor McLaughlin 605992f294 Fix Android build 2020-09-12 00:35:38 +10:00
Connor McLaughlin 3625834ea7 GPU/HW: Add loading bar to shader compilation 2020-09-12 00:26:34 +10:00
Connor McLaughlin 6f250a4ff7 GPU/HW: Add JINC2 and xBRZ texture filtering options
Shaders ported from beetle-psx.
2020-09-12 00:26:34 +10:00
Connor McLaughlin 5cc91dc78b HostDisplay: Add alignment setting 2020-09-11 00:18:57 +10:00
Connor McLaughlin 03f052e12e FrontendCommon: Add auto cheat loading option 2020-09-09 23:44:02 +10:00
Connor McLaughlin ddb38ac31d Add pcsxr and libretro cheat list parsing 2020-09-09 22:11:28 +10:00
Connor McLaughlin 45eb30b6cc
Merge pull request #835 from TzakShrike/master
Upgrade region flags. Correct NTSC-U to NTSC-U/C. Add custom U/C flag. Remove outdated icons.qrc file.
2020-09-09 18:28:50 +10:00
Sam Pearman 2ef6b6aa40 Region flag upgrade & correct NTSC-U to NTSC-U/C
Replace references to NTSC-U with the correct NTSC-U/C and adds Canada in user-facing strings.
Replaces all region flags with revised SVGs.
Brings the US flag down to 3:2 to match Europe and Japan.
Adds a custom split US & Canada flag for the U/C region, also 3:2.
Generated PNGs and new HiDPI PNGs for region flags.
Flag PNGs were generated by downscaling using a Lanczos filter to a width of 36/72 pixels, then a 1px grey border added, then a 2/5px transparent border.
2020-09-09 15:54:07 +09:00
Connor McLaughlin 2cecb8bbdb GPU/Vulkan: End render pass in ClearDisplay()
Fixes crash on Mesa/radv.
2020-09-08 11:44:54 +10:00
Connor McLaughlin 9bb278b166 CommonHostInterface: Fix crash on shutdown when using save state selector 2020-09-06 21:03:27 +10:00
Connor McLaughlin 976d4bae79 TimingEvent: Fix crash when invalid save state loaded 2020-09-06 17:47:49 +10:00
Connor McLaughlin 2c36750a0e VulkanHostDisplay: Fix imgui image textures not rendering 2020-09-06 17:47:23 +10:00
Connor McLaughlin fd0a009a7f System: Add missing <cctype> include 2020-09-03 12:25:59 +10:00
Connor McLaughlin 42d49426e8 CPU/Recompiler/AArch64: Fix crash when calling >26-bit away functions 2020-09-03 00:11:40 +10:00
Connor McLaughlin a2eaaf0e89 PGXP: Allocate large storage dynamically
This causes performance issues on ARM otherwise.
2020-09-03 00:11:40 +10:00
Connor McLaughlin 6bbbb96d4b Move GameList to FrontendCommon
Reduces libretro core dependencies further.
2020-09-01 12:46:44 +10:00
Connor McLaughlin 13e3095801 Core: Don't link to imgui for libretro core 2020-09-01 12:22:32 +10:00
Connor McLaughlin e21fc9e253 GPU/Vulkan: Use half width framebuffer for VRAM readbacks 2020-09-01 12:02:04 +10:00
Connor McLaughlin d59eb05d94 Timers: Fix update interval for timer2 IRQs being too low 2020-08-31 22:01:05 +10:00
Connor McLaughlin f187ee4971 TimingEvents: Switch from heap to sorted linked list 2020-08-31 22:00:20 +10:00
Connor McLaughlin 1eac603c79 CPU/Recompiler: AArch64 compile fix 2020-08-30 11:15:02 +10:00
Connor McLaughlin 8d49c71ec1 PGXP: Fix out-of-bounds write in hi/lo 2020-08-30 11:13:27 +10:00
Connor McLaughlin 2b902f6d09
Merge pull request #806 from CookiePLMonster/axis-to-button-map
Allow mapping axes to buttons
2020-08-29 23:35:18 +10:00
Silent 057bf986c4
Allow mapping half axes to buttons
This allows to bind pressure sensitive NeGcon buttons to keyboard,
mouse and controller buttons
2020-08-29 14:19:28 +02:00
Connor McLaughlin 914f3ad447 GameSettings: Add trait for recompiler icache 2020-08-29 22:11:10 +10:00
Connor McLaughlin 19d6037b99 CPU: Implement instruction cache simulation
Implemented for all execution modes. Disabled by default in the cached
interpreter and recompiler, always enabled in the pure interpreter.
2020-08-29 22:07:40 +10:00
Connor McLaughlin efc00a2d0e GameSettings: Make override messages translatable 2020-08-29 21:58:25 +10:00
Connor McLaughlin 3aecf6be27 GameSettings: Rename 'enable' options to 'force'
As per discussion on Discord.
2020-08-29 21:53:53 +10:00
Connor McLaughlin 421c65ea69 GPU/Vulkan: Fix reverse subtract blending with texture filtering
Fixes pointer in Final Fantasy VII with texture filtering.
2020-08-24 00:22:56 +10:00
Connor McLaughlin 8f54711c72 Make additional strings in controller settings translatable 2020-08-24 00:22:49 +10:00
Connor McLaughlin 559dc23e4e CDROM: Set playing bit in status after starting
Fixes menu music in Army Men 3D.
2020-08-24 00:22:49 +10:00
Connor McLaughlin 9254fc9e63 GPU/HW: Fix UB with reverse subtract and texture filtering on 2020-08-24 00:22:49 +10:00
Connor McLaughlin 17b5c749bf libretro: Re-enable hw context switch, add auto option 2020-08-23 14:51:23 +10:00
Connor McLaughlin df14519a97 libretro: Recreate resources after context reset 2020-08-23 14:23:34 +10:00
Connor McLaughlin 32921acc5a Timers: Don't read out of bounds for invalid address 2020-08-23 14:03:36 +10:00
Connor McLaughlin 60eb22537b CPU/Recompiler: Flush caller-saved regs before calling functions
Should provide a very small performance boost.
2020-08-23 14:03:10 +10:00
Connor McLaughlin d3f530f96e CPU/CachedInterpreter: Very slight optmization 2020-08-23 01:41:55 +10:00
Connor McLaughlin d37fba81ed CPU/Interpreter: Fix incorrect downcount comparison 2020-08-23 01:41:55 +10:00
Connor McLaughlin 2768c2c91d System: Fix VRAM sometimes getting lost when loading state 2020-08-22 18:16:35 +10:00
Connor McLaughlin 1d4d1d06a7 CPU/Recompiler: Disable static code buffer on macOS/Haiku 2020-08-22 13:24:57 +10:00
kwyxz 31695c4ff7
Haiku port of duckstation libretro core (#716)
* Haiku build 1st attempt

* fix load on Haiku

* Removed debugging flags

* Added a couple ifndef
2020-08-22 13:20:37 +10:00
Connor McLaughlin ab002e78e1 Support translating strings in emulator core 2020-08-22 13:06:20 +10:00
Connor McLaughlin f852be74e8 Compile fix for Linux/libretro 2020-08-21 00:26:22 +10:00
Connor McLaughlin bca609a2a6 Qt: Add option to disable per-game settings 2020-08-21 00:09:37 +10:00
Connor McLaughlin c3ce9135bf Fix recompiler not auto-disabling with PGXP-CPU mode 2020-08-21 00:09:37 +10:00
Connor McLaughlin 60d3fffec1 Add per-game overrides (mainly for compatibility) 2020-08-21 00:09:37 +10:00
Connor McLaughlin 0d4fe1eb71
Fix Linux build again 2020-08-20 01:21:36 +10:00
Connor McLaughlin 6a17a558bb CPU: Linux compile fix 2020-08-20 01:05:03 +10:00
Connor McLaughlin b17335d812 GTE: Increase z precision in PGXP mode 2020-08-20 00:49:42 +10:00
Connor McLaughlin daa72aba10 CPU: Skip executing nop instructions
Makes PGXP CPU mode quicker, as well as a performance improvement to the
regular interpreter.
2020-08-20 00:49:39 +10:00
Connor McLaughlin 2e9f656546 CPU: Implement PGXP CPU Mode
This is *very* slow. You don't want to enable it if you don't need it.
It is also incompatible with the recompiler and will disable it if the
option is enabled.
2020-08-20 00:49:39 +10:00
Connor McLaughlin e1c29510f1 GPU/OpenGL: Fix incorrect framebuffer clear for interlacing 2020-08-19 00:45:08 +10:00
Connor McLaughlin c9c2c00c1a GPU: Update GPUSTAT.13 with field
Doubt this'll change much..
2020-08-19 00:02:37 +10:00
Connor McLaughlin 6d75f42e12 CDROM: Update last subq even when auto-pausing
Fixes music looping in Fighting Force.
2020-08-18 00:13:21 +10:00
Connor McLaughlin 7c697f363e libretro: Make single cards for playlist the default, fix disabled case
This bug was causing the option to act as if it was disabled anyway.
2020-08-17 11:51:47 +10:00
Connor McLaughlin f65651823e GPU: Simplify hsync handling
Fixes character lighting in Monkey Hero.
2020-08-17 01:22:03 +10:00
Connor McLaughlin 4e62b32d60 Add option to dump the contents of RAM to a file 2020-08-16 23:20:36 +10:00
Connor McLaughlin 10a46a7fd8 OSD: Add option to show display resolution 2020-08-16 00:20:11 +10:00
Connor McLaughlin 26aa627deb GPU/HW: Include resolution in scale change message 2020-08-16 00:20:11 +10:00
Connor McLaughlin f5fb8186c7 Switch some messages to the OSD and increase durations 2020-08-16 00:20:10 +10:00
Connor McLaughlin e0e76b881d System: Bump save state version 2020-08-16 00:20:10 +10:00
Connor McLaughlin d9893bb127 System: Add option to use a single memory card for playlists 2020-08-16 00:20:10 +10:00
Connor McLaughlin dedeee1698 System: Track playlists in save states 2020-08-16 00:20:10 +10:00
Connor McLaughlin 8fa965a1ac GameList: Support playlist entries 2020-08-16 00:20:10 +10:00
Connor McLaughlin d4665e8b22 GPU: Tweaks to ODE handling
Fixes Team Buddies and The Next Tetris.
2020-08-16 00:20:10 +10:00
Connor McLaughlin c5db7db182 Build: Compile source as UTF-8 with MSVC 2020-08-15 00:04:38 +10:00
Connor McLaughlin 025e01ca47 CPU: Fix exceptions clobbering cop0.cause.Ip
Fixes Gran Turismo 2 (PAL).
2020-08-14 23:55:16 +10:00
Connor McLaughlin e6156e2adb GPU/ShaderGen: Move transparent compensation to bilinear function 2020-08-12 02:27:52 +10:00
Connor McLaughlin bb344a4e1e GPU/D3D11: Fix crash/hang when toggling bilinear setting 2020-08-12 02:27:52 +10:00
Connor McLaughlin d1ee6c0da7 GPU/HW: Make settings update slightly safer 2020-08-12 02:27:52 +10:00
Connor McLaughlin 17a1719450 GPU/HW: Fix incorrect texel offset when upscaling
Fixes incorrectly coloured triangles in Tomb Raider.
2020-08-12 02:27:52 +10:00
Connor McLaughlin d733553425 GPU/HW: Don't display a deleted texture in D3D/OpenGL when updating settings 2020-08-11 04:03:11 +10:00
Connor McLaughlin 2130d3b004 GPU/Vulkan: Don't add UV limits as attribute when unused 2020-08-11 03:58:59 +10:00
Connor McLaughlin fba2488bc5 GPU/D3D11: Don't add UV limits to input layout when unused 2020-08-11 03:58:59 +10:00
Connor McLaughlin bf9ac64183 GPU/D3D11: Don't leak input layout objects 2020-08-11 03:48:24 +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 b95ce993e0 GPU/HW: Clamp interpolated UVs to polygon limits
Fixes texture filtering and PGXP issues in some games.
2020-08-10 23:28:37 +10:00
Connor McLaughlin 5b9db71b87 CPU/Recompiler: Fix mid-block software interrupts not updating pc
Fixes Need for Speed: High Stakes hanging at boot.
2020-08-09 04:32:53 +10:00
Connor McLaughlin 223074b78f SPU: Fix activating transfer event with a downcount of 0
Happened when loading states.
2020-08-09 04:29:43 +10:00
Connor McLaughlin 70767dc6bf CPU/Recompiler/AArch64: Use cmn for negative constant comparisons 2020-08-08 23:44:13 +10:00
Connor McLaughlin 901ca71fdc CPU/Recompiler: Add temporary inhibiting of register allocation 2020-08-08 23:44:13 +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 b1377fe0d9 CPU/Recompiler: Add a fast block lookup array
Up to 15% perf improvement.
2020-08-08 23:06:28 +10:00
Connor McLaughlin f6e88353eb CPU/Recompiler: Make generated code invariant to virtual PC 2020-08-08 23:06:28 +10:00
Connor McLaughlin 8d4216068a CPU/Recompiler: Implement div/divu 2020-08-08 23:06:27 +10:00
Connor McLaughlin a2f271c505 CPU: Simplify some exception checks in cop0-3 2020-08-07 17:05:01 +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 359234080a D3D11: Set GS to null when restoring state
Fixes the D3D11 renderer being broken on RetroArch due to it leaving a
geometry shader bound.
2020-08-06 23:19:19 +10:00
Connor McLaughlin 6e586311e8 Common: Add title, modal information to ProgressCallback 2020-08-06 19:32:53 +10:00
Connor McLaughlin 466e4099d4 CDROM: Fix handling of logical seeks to audio sectors
Fixes Wizard's Harmony.
2020-08-05 03:14:04 +10:00
Connor McLaughlin dd9705ef31 GPU/HW: Fix last row of oversized writes not applying
Combined with the wrap changes, fixes Namco Museum motherboard scene.
2020-08-04 14:40:00 +10:00
Connor McLaughlin 0b0bc32afb GPU/HW: Use texture samplers rather than fetching for batches
Enables wrap-around.
2020-08-04 14:40:00 +10:00
Connor McLaughlin 0fc301d654 GPU/HW: Use wrap texture address modes 2020-08-04 14:40:00 +10:00
Connor McLaughlin 231c0b5ff6 GPU/SW: Wrap texture coordinates when sampling 2020-08-04 14:40:00 +10:00
Connor McLaughlin 818892cb1b GPU: Claer interlaced field buffer when enabling
Fixes old frames getting briefly displayed.
2020-08-03 03:26:13 +10:00
Connor McLaughlin 23df239469 GPU/HW: Debug build compile fix 2020-08-03 03:26:00 +10:00
Connor McLaughlin f712c42c21 GPU/HW: Add more details to debug window 2020-08-03 03:06:23 +10:00
Connor McLaughlin 9b7512f7b8 GPU/HW: Implement automatic resolution scale from window size 2020-08-03 03:06:03 +10:00
Connor McLaughlin be6ae8b70b GPU/Vulkan: Work around Mali crash with readbacks 2020-08-03 02:03:33 +10:00
Connor McLaughlin b527118c0a GPU/HW: Fix macOS compile 2020-08-02 18:04:00 +10:00
Connor McLaughlin 92975b2e81 GPU/HW: Tiny performance optimization in polygon loading 2020-08-02 17:32:43 +10:00
Connor McLaughlin 96ba9198ef GPU/HW: Expand lines into triangles before rendering
Fewer batches, consistent upscaling behavior.
2020-08-02 17:17:11 +10:00
Connor McLaughlin 568cfa1865 GPU/OpenGL: Fix possible error on shutdown 2020-08-02 17:16:51 +10:00
Connor McLaughlin 4d9c2c1b6c GPU: Ensure pending time is used in events
Fixes long delay in Syphon Filter.
2020-08-02 14:09:22 +10:00
Connor McLaughlin bd0c403672 GPU/HW: Fix mask bit test regression
Fixes white boxes in Silent Hill. Again.
2020-08-02 13:04:25 +10:00
Connor McLaughlin 0c1b637549 PGXP: Add initial implementation 2020-08-02 00:25:07 +10:00
Connor McLaughlin e9882a10aa System: Move restore/reset graphics API state to System
Fixes frame stepping.
2020-08-01 16:45:07 +10:00
Connor McLaughlin 2eb9384275 Replace more instances of fopen() with FileSystem::OpenFile() 2020-08-01 14:00:22 +10:00
Connor McLaughlin 2885d2e547 CPU/CodeCache: Hopefully fix 32-bit compile errors 2020-08-01 03:53:53 +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 1f9fc6ab74 BIOS: Fix Linux build 2020-07-31 16:34:25 +10:00
Connor McLaughlin 8802177e25 BIOS: Add more revision filenames/hashes 2020-07-31 16:28:15 +10:00
Connor McLaughlin 66e79091d3 BIOS: Use fopen() wrapper from FileSystem 2020-07-31 16:04:10 +10:00
Connor McLaughlin 5634e821c5 CDROM: Reset audio decoder state immediately after pause or seek
Fixes stuttering dialogue in Dino Crisis (control room at beginning of
game).
2020-07-30 01:55:37 +10:00
Connor McLaughlin 5a34a15bf2 CDROM: Include FIFO size in debug window 2020-07-30 01:03:59 +10:00
Connor McLaughlin dd48a1f585 System: Handle large event timing overshoots better
Usually a result of DMA cycle stealing. Instead of adding all time, add
min(all_events.downcount) at a time. 1.5% performance improvement, but
fixes desyncs between the SPU and CD-ROM.
2020-07-30 00:47:19 +10:00
Connor McLaughlin cdab84e210 GPU/Vulkan: Display shader compiling message 2020-07-26 23:59:06 +10:00
Connor McLaughlin 7c54129409
Merge pull request #665 from ggrtk/analog-controller
AnalogController: Expose axis scale setting to frontend
2020-07-26 23:57:40 +10:00
Connor McLaughlin caf9943418 GPU/Vulkan: Possible workaround for Adreno GS shader compiler bug 2020-07-25 15:17:29 +10:00
Albert Liu 79576ca956 AnalogController: Expose axis scale setting to frontend 2020-07-24 19:18:41 -07:00
Connor McLaughlin d711baaa31 GPU/HW: Fix lines being one pixel too short
Fixes lines in screen wipe effect in Vagrant Story.
2020-07-25 02:37:01 +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 8e1c0a4fe4 System: Support loading m3u playlists 2020-07-23 02:36:05 +10:00
Connor McLaughlin d46c104d1b System: Preload CD images to RAM when switching/loading state 2020-07-23 02:35:23 +10:00