Commit Graph

13801 Commits

Author SHA1 Message Date
4a362ddd33 Core/IOS/Network/Socket: Avoid global system accessor. 2024-01-13 13:18:20 +01:00
Mai
8760aca8ec Merge pull request #12500 from AdmiralCurtiss/globals-fiforecorder
FifoRecorder: Move instance to System.
2024-01-13 06:38:39 -05:00
Mai
d36baf633c Merge pull request #12499 from AdmiralCurtiss/globals-mmiorw
Core/HW/MMIO: Pass System through Read() and Write().
2024-01-13 06:37:49 -05:00
443b4ae745 Core/FifoPlayer: Avoid global System accessor. 2024-01-12 21:54:35 +01:00
637fd49909 FifoRecorder: Move instance to System. 2024-01-12 15:06:06 +01:00
42d61cfc4c Core/HW/MMIO: Pass System through Read() and Write(). 2024-01-12 08:28:01 +01:00
Mai
6725c25600 Merge pull request #12494 from AdmiralCurtiss/globals-wiiipc
Core/IOS/WiiIPC: Refactor to class, move to System.
2024-01-12 02:08:00 -05:00
Mai
ab3655fbea Merge pull request #12496 from AdmiralCurtiss/globals-gba
Core/HW/GBACore: Avoid global System accessor.
2024-01-12 02:05:57 -05:00
bca5b10faf Merge pull request #12489 from JosJuice/optimizable-access-size
PowerPC: Add access size parameter to MMU::IsOptimizableRAMAddress
2024-01-12 07:44:59 +01:00
f7a9ea9d7e Core/HW/GBACore: Avoid global System accessor. 2024-01-12 07:30:20 +01:00
5a633f0bcf Core/IOS/WiiIPC: Add missing variables to savestate. 2024-01-12 06:37:11 +01:00
17753d5168 Core/IOS/WiiIPC: Refactor to class, move to System. 2024-01-12 06:37:10 +01:00
be7f4ab244 Core: Pass sensor bar state into the Wiimote input calculation functions instead of having it access a global. 2024-01-11 06:02:49 +01:00
b972329ed0 PowerPC: Add access size parameter to MMU::IsOptimizableRAMAddress
For correctness, we need to check not only the start address of the
memory access but also the end address.
2024-01-10 18:17:45 +01:00
409d2ecad3 SI_Device: Remove global system accessors
We can pass the system timer instance through to avoid needing the
global accessor.
2024-01-08 11:03:26 -05:00
7398d0b6ef SI_DeviceGBAEmu: Remove global system accessors
We can pass the system timer instance in from the existing system
instance instead of the global accessor.
2024-01-08 10:56:41 -05:00
1f0fe5a99a Core/DSPHLE: Store reference to DSPManager in HLEAccelerator (AX/AXWii). 2024-01-08 10:27:39 +01:00
3a9160100d Core/DSPHLE: Store reference to DSPManager in AESndAccelerator.
Avoids the use of the global System in ReadMemory() and WriteMemory().
2024-01-08 10:23:29 +01:00
e9ab33b871 Core/DSPHLE: Remove global System access in UCodes. 2024-01-08 10:23:29 +01:00
a9bf93cf2a Core/DSPHLE: Remove global System access from CMailHandler. 2024-01-08 10:23:29 +01:00
9be9cbda2f Core/DSPHLE: Store reference to System in DSPHLE instances. 2024-01-08 10:23:28 +01:00
3b0444be6b Core/DSPHLE: Move HLEAccelerator instance into AXUCode. 2024-01-08 03:53:52 +01:00
bfd53c7294 Core/DSPHLE: Make HLEAccelerator state local to GetInputSamples() in AX and AXWii UCodes. 2024-01-08 03:53:52 +01:00
Mai
180d053ec1 Merge pull request #12486 from AdmiralCurtiss/globals-aesndaccel
Core/DSPHLE: Move AESndAccelerator instance into AESndUCode.
2024-01-07 20:36:01 -05:00
f2145c91e7 JitArm64: Update register comments in psq_lXX/psq_stXX
This was also overlooked in 166bd87f70.
2024-01-07 23:01:38 +01:00
d94b00ec36 JitArm64: Remove unnecessary locking of W0 in psq_stXX
It seems like I made a mistake in 166bd87f70. Locking W0 when
jo.memcheck is true is only necessary for load instructions, not store
instructions.
2024-01-07 22:59:51 +01:00
696a6defd2 Merge pull request #12472 from mitaclaw/arm64-flush-mode
Arm64RegCache: Use FlushMode everywhere
2024-01-07 18:45:25 +01:00
2a42977dd3 Core/DSPHLE: Move AESndAccelerator instance into AESndUCode. 2024-01-07 04:49:34 +01:00
fc2ec826d4 FifoPlayer: Move instance to System. 2024-01-05 20:15:18 +01:00
Mai
feb7207a4c Merge pull request #12482 from AdmiralCurtiss/globals-coreinit
Core: Pass System through more of the emulation thread init process.
2024-01-05 01:53:11 -05:00
2155a61176 Core: Pass System through more of the emulation thread init process. 2024-01-05 05:19:29 +01:00
07c035e659 Core/SystemTimers: Refactor to class, move to System. 2024-01-04 23:35:19 +01:00
9c91b5edca Merge pull request #12480 from AdmiralCurtiss/codetrace-system
Core/CodeTrace: Take address from given instruction in GetInstructionAttributes().
2024-01-04 22:00:15 +00:00
0be476cfaf Core/CodeTrace: Take address from given instruction in GetInstructionAttributes().
In all instance this method is called, the instruction comes from SaveCurrentInstruction(), which already sets the address to the PC.
2024-01-04 21:44:54 +01:00
ce19d6a35e Core/Boot: Avoid global system accessor when setting disc. 2024-01-04 21:30:24 +01:00
48eb8b17ef Merge pull request #12475 from Tilka/zelda
DSPHLE/Zelda: fix reverb volume being multiplied by current volume twice
2024-01-02 05:06:21 +00:00
fd1a261e73 Merge pull request #12470 from JosJuice/jitarm64-low-dcbz-for-real
JitArm64: Don't fall back to interpreter on low DCBZ hack
2024-01-01 23:16:30 +01:00
381c2702f6 DSPHLE/Zelda: fix reverb volume being multiplied by current volume twice 2024-01-01 21:53:26 +00:00
6e3a2324a4 Merge pull request #12464 from JosJuice/jit-isi-membase
Jit: Reload RMEM/MEM_REG on ISI exception
2024-01-01 22:09:05 +01:00
07df4ff16e Merge pull request #12471 from mitaclaw/flush-gpr-arm-bug
Fix Logic Inefficiency in Arm64GPRCache::FlushRegisters
2024-01-01 00:46:34 +01:00
4805b02893 Arm64RegCache: Use FlushMode everywhere 2023-12-31 02:09:56 -08:00
01e534a681 Fix Logic Inefficiency in Arm64GPRCache::FlushRegisters
This was introduced in 6a9f565ac4.
2023-12-30 23:44:27 -08:00
465f17a882 PowerPC: Add constants for the two TLB indices
Just for readability.
2023-12-30 14:31:05 +01:00
684b3dfd4a JitArm64: Don't fall back to interpreter on low DCBZ hack
I missed this in 16eb188f1d.
2023-12-30 14:18:49 +01:00
594b55c448 DSPHLE/Zelda: fix use of wrong reverb buffer 2023-12-29 02:45:23 +01:00
ca69c60e1b DSPHLE/Zelda: add another 32-bit getter/setter (NFC) 2023-12-29 02:45:20 +01:00
e212d1c395 Merge pull request #12463 from Dentomologist/netkdrequestdevice_fix_crashes
NetKDRequestDevice: Fix sporadic crashes during emulation shutdown
2023-12-27 21:47:18 +01:00
8fcf9969eb Jit: Reload RMEM/MEM_REG on ISI exception
Aims to fix https://bugs.dolphin-emu.org/issues/13444.
2023-12-27 16:39:00 +01:00
ecf4f1b1f9 NetKDRequestDevice: Fix nullptr dereference crash
Keep a shared_ptr to NetKDTimeDevice inside NetKDRequestDevice.

This allows the KDDownload task to finish its work without potentially
trying to dereference nullptr, which can potentially come from either
GetIOS() or GetDeviceByName() if EmulationKernel's destructor has
started running.
2023-12-24 16:46:08 -08:00
dd1f5f9726 NetKDRequestDevice: Fix use-after-free crash
Explicitly shut down work queues in NetKDRequestDevice's destructor to
prevent their threads from accessing members after they've been freed.

This crash would occur sporadically if NetKDRequestDevice's periodic
download or mail checks happened to overlap with emulation shutdown in
the wrong way.

An example sequence of events that could cause the crash:
* m_scheduler_timer_thread queues a periodic Download event in
  m_scheduler_work_queue, then waits for m_shutdown_event.
* A request to stop emulation results in s_ios being reset by the CPU
  thread. This triggers NetKDRequestDevice's destructor which sets
  m_shutdown_event and joins m_scheduler_timer_thread.
* m_scheduler_timer_thread wakes from m_shutdown_event and returns from
  its thread function, ending the thread.
* The CPU thread resumes execution at the end of NetKDRequestDevice's
  destructor and begins destroying NetKDRequestDevice's members in
  reverse declaration order.
* m_http is declared after m_scheduler_work_queue and is therefore
  destroyed earlier.
* m_scheduler_work_queue's destructor calls its Shutdown function, which
  by default finishes the work items in the queue.
* The queued Download event calls KDDownload which calls m_http.Get()
  which calls Fetch() which passes garbage data from the freed m_curl
  into curl_easy_setopt().
* Curl promptly crashes.

Shutting down the work queues manually in the destructor prevents the
above because m_http and the other members don't get freed until after
the queue threads finish.
2023-12-24 15:04:35 -08:00