21 Commits

Author SHA1 Message Date
Connor McLaughlin
15652b4c1f SPU: Fix a few cases where SPU interrupts weren't firing 2021-01-10 01:39:21 +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
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
29467d40c8 DMA: Add debug window 2020-10-30 00:44:39 +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
940b725c1d Settings: Make DMA performance parameters tweakable 2020-04-29 20:00:22 +10:00
Connor McLaughlin
9d1eb321ec DMA: Properly handle infinite linked lists, add cycle stealing
Fixes Tekken 2, Hot Wheels Turbo Racing, probably others.
2020-04-29 16:52:15 +10:00
Connor McLaughlin
5dbdc0b60c DMA: Remove timing events
We'll probably need to revert/re-add a variant of this when we
eventually implement chopping. But for now it simplifies things.
2020-03-29 01:12:44 +10:00
Connor McLaughlin
4c59d8a9ea Linux build fix 2020-01-24 16:44:13 +10:00
Connor McLaughlin
1b9609ef61 Implement event-based scheduler instead of lock-step components 2020-01-24 16:23:39 +10:00
Connor McLaughlin
c6119c210a Revert "DMA: Delay GPU transfers by block count"
This reverts commit 0639f4264f0b9b40d99e0e5ce40f4eda91bc881d.

Breaks FF7's FMVs in the top row. Needs GPU timings.
2020-01-11 13:40:04 +10:00
Connor McLaughlin
0639f4264f DMA: Delay GPU transfers by block count
Needs real GPU timings, but fixes NFS5 in the meantime.
2019-12-29 15:34:07 +10:00
Connor McLaughlin
f11d357ab9 Compile fixes for Android 2019-11-28 01:55:33 +10:00
Connor McLaughlin
30fd7a6683 DMA: Support delaying transfers
Fixes Syphon Filter 2/3.
2019-11-15 23:27:56 +10:00
Connor McLaughlin
29674df803 DMA: Simplify address masking 2019-11-11 20:34:41 +10:00
Connor McLaughlin
6f4cf7d5e3 System: Support changing BIOS path 2019-11-11 19:43:39 +10:00
Connor McLaughlin
9b56499afa Refactoring settings/support changing GPU renderer at runtime 2019-10-26 12:55:56 +10:00
Connor McLaughlin
6b4298541c DMA: Fix DICR write breaking FMVs in FF7 2019-10-18 23:52:50 +10:00
Connor McLaughlin
ec8c5d4bb6 DMA: Batch multi-word transfers together 2019-10-13 16:48:11 +10:00
Connor McLaughlin
88ec178380 DMA: Refactoring, support split block transfers 2019-10-13 14:16:49 +10:00
Connor McLaughlin
bddbab9d60 Rename to DuckStation 2019-10-04 13:54:09 +10:00