Commit Graph

246 Commits (57c1ca97f78bc10bac7dca27a957344778ba1ced)

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 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.
5 years ago
Connor McLaughlin 8e1c0a4fe4 System: Support loading m3u playlists 5 years ago
Connor McLaughlin d46c104d1b System: Preload CD images to RAM when switching/loading state 5 years ago
Connor McLaughlin f28ef01d24 CDROM: Move audio FIFO to CDROM class and skip sectors when unempty
Fixes cutscene audio in Nickelodeon Rugrats - Search for Reptar.
5 years ago
Connor McLaughlin 9496c992f7 System: Add an option to preload CD image to RAM 5 years ago
Connor McLaughlin 93528db388 System: Use existing CD media when loading state where possible 5 years ago
Connor McLaughlin 5c1c467e38 GTE: Add widescreen hack 5 years ago
Connor McLaughlin a5fe740e30 Fix a bunch of compiler warnings 5 years ago
Connor McLaughlin b0b3901722 libretro: Fix DualShock analog mode auto-enable 5 years ago
Connor McLaughlin 4dc9e10777 HostInterface: Support per-controller-type settings 5 years ago
Connor McLaughlin 936d92dfb8 System: Add option to force start in software mode 5 years ago
Connor McLaughlin 919494079b System: Make saving screenshots to state optional 5 years ago
Connor McLaughlin 58b0e6859a Frontend: Reset/restore GPU state before saving screenshot
Fixes driver crashes in Vulkan.
5 years ago
Lioncash 76af96f15b system: Correct error dialog in PSF load case
Corrects the error message to state that the PSF couldn't be loaded
rather than EXE.
5 years ago
Connor McLaughlin 49d11988bf Core: Add Vulkan GPU renderer 5 years ago
Connor McLaughlin bdf9c91271 GPU: Fix double shader compilation 6 years ago
Connor McLaughlin 075380f8e0 Move most helper logic from base HostInterface to FrontendCommon 6 years ago
Connor McLaughlin b4e45e865a GPU: Use correct clocks for NTSC region
Fixes sync drift in Bust-a-Move 1/2.
6 years ago
Connor McLaughlin b17a5832e5 System: Simplify save state booting
Fixes memory card warning messages on load state.
6 years ago
Connor McLaughlin d2c7639dd8 System: Update per-game memory cards on load state
Prevents saves being written to incorrect card after loading.
6 years ago
Connor McLaughlin 9539ce032b AnalogController: Show controller number in OSD messages 6 years ago
Connor McLaughlin 9d1eb321ec DMA: Properly handle infinite linked lists, add cycle stealing
Fixes Tekken 2, Hot Wheels Turbo Racing, probably others.
6 years ago
Connor McLaughlin e20fd61f0b System: Add option to use per-game memory cards with game title as filename 6 years ago
Connor McLaughlin 74e455a5f7 System: Support per-game memory cards 6 years ago
Connor McLaughlin e6bd6587fd Controller: Add emulation of Namco GunCon 6 years ago
Connor McLaughlin 92255c8ddd System: Don't drop audio buffers when time lost 6 years ago
Connor McLaughlin 08c8d1a521 System: Support saving screenshots in save states 6 years ago
Connor McLaughlin 205297ac27 System: PSF (Portable Sound Format) loading support 6 years ago
Connor McLaughlin a43a0a14cc CPU/CodeCache: Don't leak blocks on shutdown 6 years ago
Connor McLaughlin 6775100170 GPU: Drop OpenGL ES renderer
We can put this through the normal GL renderer instead.
6 years ago
Connor McLaughlin 08567fedf4 CDROM: Fix crash when loading save state from different system 6 years ago
Connor McLaughlin a9109c7552 System: Don't insert blank memory card if path unspecified 6 years ago
Connor McLaughlin 88f1edd48d System: Include console region in save state
Fixes #149.
6 years ago
Connor McLaughlin 40d6be7142 System: Frame pacing improvements 6 years ago
Connor McLaughlin cbb9b96537 System: Include buffer swap time in frame time measurement 6 years ago
Connor McLaughlin 86eefbd5d7 System: Fix a possible assertion failure loading state 6 years ago
Connor McLaughlin 3effa1238f CDROM: Return correct SCEx string based on disc region
Fixes SCEI/SCEE displaying as SCEE in BIOS.
6 years ago
Connor McLaughlin e0a339ca96 GameList: Seperate disc region and console region 6 years ago
Connor McLaughlin 69f03959aa Qt: Implement context menu in game list 6 years ago
Connor McLaughlin 49c7767ed4 System: Check save state version when loading
Fixes #34.
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 c26b9bc54c System: UpdateCPUExecutionMode -> SetCPUExecutionMode 6 years ago
Connor McLaughlin 1b9609ef61 Implement event-based scheduler instead of lock-step components 6 years ago
Connor McLaughlin 4a3478b360 HostInterface: Add function to switch between sw/hw rendering 6 years ago
Connor McLaughlin abf48b6cc2 Qt: Update GPU settings when enhancements are changed 6 years ago
Connor McLaughlin 77b282862f HostInterface: Move running title info to System 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 71c1e243fe Remove YBaseLib dependency 6 years ago
Connor McLaughlin e0086156ca System: Compile fix for Linux 6 years ago
Connor McLaughlin ad21f48a67 Fix Android build after controller changes 6 years ago
Connor McLaughlin 1d2bd11b02 Frontend: Add controller settings 6 years ago
Connor McLaughlin c65279f944 System: Create controllers dynamically based on config 6 years ago
Connor McLaughlin ea0845d5ad Move controller creation to System class, switch shared_ptr to unique_ptr 6 years ago
Connor McLaughlin cda2394287 System: Fix loading of EXEs with sp=0 (leave unchanged) 6 years ago
Connor McLaughlin fb0aad0917 System: Include SIO in save state 6 years ago
Connor McLaughlin da14b10e72 Split MemoryCard and PadDevice (now Controller) 6 years ago
Connor McLaughlin 315f2b701a Stub out SIO controller
Fixes WipEout booting.
6 years ago
Connor McLaughlin c284d3835f GPU: Add a simplified OpenGL ES renderer
Seems this is the only way to get semi-decent performance out of Mali
drivers :/
6 years ago
Connor McLaughlin 8b9d44f4dc System: Use game code for automatic region detection 6 years ago
Connor McLaughlin dec475db62 GameList: Support homebrew/psexe files 6 years ago
Connor McLaughlin 22e8b6b0a7 System: Fall back to software when D3D11 selected on Linux 6 years ago
Connor McLaughlin 889bd73ac8 CPU: Add settings for execution mode 6 years ago
Connor McLaughlin 5217088d82 CPU: Refactor load delay handling
Now works when mixing interpreter and recompiler code.
6 years ago
Connor McLaughlin 1d6c4a3af1 CPU: Basic recompiler implementation for x64 (lui, ori, addiu)
Disabled by default.
6 years ago
Connor McLaughlin b9089cac95 System: Fix EXE loading again 6 years ago
Connor McLaughlin f1289d6161 Settings: Hook up console region 6 years ago
Connor McLaughlin 77fe883901 System: Default to NTSC region for BIOS boot if auto 6 years ago
Connor McLaughlin 246c97ccb3 System: Scaffolding for multi-system/multi-bios 6 years ago
Connor McLaughlin a47492382c System: Add "fast boot" option (skip boot logo) 6 years ago
Connor McLaughlin 30fd7a6683 DMA: Support delaying transfers
Fixes Syphon Filter 2/3.
6 years ago
Connor McLaughlin 6f4cf7d5e3 System: Support changing BIOS path 6 years ago
Connor McLaughlin 8c51abaf37 System: Move settings to HostInterface 6 years ago
Connor McLaughlin 36b7690056 Frontend: Add settings window 6 years ago
Connor McLaughlin 5d26c2177f GPU/HW: Don't crash when switching to incompatible renderer 6 years ago
Connor McLaughlin 9de9cf3be2 GPU/HW: Add D3D11 renderer and refactor host interface/display 6 years ago
Connor McLaughlin c52c0608ae GPU: Move resolution scale to hardware backend only 6 years ago
Connor McLaughlin 12ce777e30 Frontend: Add toggle for software rendering 6 years ago
Connor McLaughlin 0092cb1016 Pad: Set up memory cards via settings 6 years ago
Connor McLaughlin 540e942a46 Add basic software GPU renderer 6 years ago
Connor McLaughlin 9b56499afa Refactoring settings/support changing GPU renderer at runtime 6 years ago
Connor McLaughlin c8bbd25f59 MDEC: Refactor buffer handling, fixes FF9 FMVs 6 years ago
Connor McLaughlin 9d5f3c1306 CPU: Support stalling CPU for bus activity such as DMA 6 years ago
Connor McLaughlin 0324ae2fd7 CDROM: Initial debug windows 6 years ago
Connor McLaughlin aa792da823 CDROM: Implement XA-ADPCM decoding 6 years ago
Connor McLaughlin 88ec178380 DMA: Refactoring, support split block transfers 6 years ago
Connor McLaughlin 2d9d999713 Add debug window for MDEC 6 years ago
Connor McLaughlin 0f68c8c5d3 Add debugging for GPU/Timers 6 years ago
Connor McLaughlin d88da93a55 SPU: Save state support 6 years ago
Connor McLaughlin f852b8dd90 Further work on SPU implementation 6 years ago
Connor McLaughlin d373b5d3a9 Timers: Fix oneshot/toggle modes 6 years ago
Connor McLaughlin 162a0df922 Frontend: Display emulation speed 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