Commit Graph
437 Commits
Author SHA1 Message Date
jpolo1224 1eb63137e3 ARMSX3: Android port of RPCS3, proof of concept
Adds an Android build of the RPCS3 core plus a Compose UI, and fixes several
things that stopped it working on ARM64.

Renderer:
- Emit concrete bounds for runtime sized arrays in uniform blocks when
  VK_EXT_shader_uniform_buffer_unsized_array is missing. Adreno does not have
  the extension, so every game pipeline failed with VK_ERROR_UNKNOWN and only
  overlays drew.
- Probe and request that extension properly instead of chaining its feature
  struct unconditionally.
- Hand VMA the Vulkan function pointers it needs under VK_NO_PROTOTYPES.
- Rebuild the surface and swapchain when the window is lost instead of killing
  the RSX thread.
- Only create a GLES context when the GL renderer is actually selected.

SPU:
- Sum instead of taking an absolute difference in the ARM64 block verification
  checksum. The difference collides on the near identical job binaries an SPU
  job manager streams through one local store address, so a cached block could
  run against another job's code.

Threading:
- Implement thread affinity on Android using sched_setaffinity.
- Add an ARM big.LITTLE core arrangement so SPU and RSX threads land on the
  fast cores.

Misc:
- Detect the host CPU for the LLVM JIT instead of pinning cortex-a34.
- Fall back to the default audio device when cubeb cannot enumerate.
2026-08-06 08:59:52 -04:00
Elad d7ed328f4f Fix vm::writer_lock deadlock-inducing usage on PPU 2026-08-02 15:54:27 +03:00
digant73 5295f3ac18 fix emulator crash on crashed game window closure 2026-08-01 01:58:20 +03:00
Elad 5e8ba021ac SPU/ARM64: Implement RawSPU MMIO on ARM 2026-07-28 12:16:35 +03:00
Elad 5d62ee4b42 Fix possible multi-platform race-condition (depending on kernel)
As well as remove another pthread_self call.
2026-07-17 22:04:57 +03:00
Elad 4e49c5319d Avoid using pthread_self() partially 2026-07-17 22:04:57 +03:00
Elad 45a1da2d89 Disable trap on MacOs 2026-07-17 22:04:57 +03:00
Elad 88f81381e8 MacOS/Thread.cpp: Attempt recovery if pthread_jit_write_protect_np state is invalid 2026-07-01 19:31:41 +03:00
Malcolm a87d175295 SPU LLVM: Retry ARM64 TBL2 register scavenger failures
- Some SPU programs inexplicably fail to compile when TBL2/TBX2 are used.
- As an insane workaround, first try to compile with TBL2/TBX2, if LLVM crashes while compiling, try to compile the same program without TBL2/TBX2.
2026-05-27 02:46:11 +03:00
Elad d7da6a713b RawSPU: Implement 16-bit and 8-bit read MMIO 2026-05-20 20:44:24 +03:00
Megamouse 7d41bbdd2b Fix Disk Usage thread 2026-04-15 13:05:54 +02:00
luci4 bcd9663349 Thread.cpp: Added stack trace and register logging to exception filter (#18564) 2026-04-13 15:47:44 +03:00
Elad a4523651c7 RPCS3: Notify RAM shortage, Log current and peak RAM usage 2026-03-27 20:20:29 +03:00
Elad bb3e2689d4 Thread.cpp: Fix game exit on access violation
Fixes game closing in Twisted Metal.
This commit also aloows to debug such states by using cpu_flag::req_exit as a broker
2026-03-26 13:55:00 +02:00
Megamouse d97851376d Add stacktrace in case of exception 2026-03-06 13:56:04 +01:00
AniandRipleyTom c7d7f2d03b Thread: Move include <thread> to .h
Co-Authored-By: RipleyTom <RipleyTom@users.noreply.github.com>
2026-02-20 19:46:39 +02:00
schm1dtmac 3819b9d57e [macOS] Force max pthread priority, fix throttling 2025-12-21 07:18:43 +02:00
Elad 6b556ca5b0 SaveStates: Fix Gem Thread Reboot 2025-10-14 08:16:02 +03:00
Vestral e066735fe9 Utils fixes for ASLR 2025-04-30 02:56:23 +02:00
DH 95d0cb18e4 Coding style issues fixes
Thanks @Megamouse
2025-03-10 21:09:27 +01:00
DH 798c194025 android stuff 2025-03-10 21:09:27 +01:00
Elad 9677a3a9ea Fix Emulator::IsPaused() to allow measurements during module compilation
Also fix a potential deadlock in access violation handler for non-cpu_thread
2025-01-25 12:47:44 +02:00
Elad 7b8fee7cdb Thread.cpp: Report VM addresses on VM segfault 2025-01-25 12:47:44 +02:00
Elad 6a4b9430c0 Thread.h: Add a few noexcept 2024-12-24 21:31:57 +02:00
Elad 575a245f8d IDM: Implement lock-free smart pointers (#16403)
Replaces `std::shared_pointer` with `stx::atomic_ptr` and `stx::shared_ptr`.

Notes to programmers:

* This pr kills the use of `dynamic_cast`, `std::dynamic_pointer_cast` and `std::weak_ptr` on IDM objects, possible replacement is to save the object ID on the base object, then use idm::check/get_unlocked to the destination type via the saved ID which may be null. Null pointer check is how you can tell type mismatch (as dynamic cast) or object destruction (as weak_ptr locking).
* Double-inheritance on IDM objects should be used with care, `stx::shared_ptr` does not support constant-evaluated pointer offsetting to parent/child type.
* `idm::check/get_unlocked` can now be used anywhere.

Misc fixes:
* Fixes some segfaults with RPCN with interaction with IDM.
* Fix deadlocks in access violation handler due locking recursion.
* Fixes race condition in process exit-spawn on memory containers read.
* Fix bug that theoretically can prevent RPCS3 from booting - fix `id_manager::typeinfo` comparison to compare members instead of `memcmp` which can fail spuriously on padding bytes.
* Ensure all IDM inherited types of base, either has `id_base` or `id_type` defined locally, this allows to make getters such as `idm::get_unlocked<lv2_socket, lv2_socket_raw>()` which were broken before. (requires save-states invalidation)
* Removes broken operator[] overload of `stx::shared_ptr` and `stx::single_ptr` for non-array types.
2024-12-22 20:59:48 +02:00