131 Commits
Author SHA1 Message Date
Megamouse 358101c47b Fix unused variable warnings 2026-08-20 11:03:16 +02:00
Florin9doi 3d587726a2 spu: Clear the MFC_LSA_offs bits higher than the limit 2026-08-05 15:19:12 +03:00
Elad d3abc6eee3 Improve logging of RawSPU MMIO
Reduce spam and add value.
2026-07-28 12:16:35 +03:00
Arsh Kumar Singh b41b10a031 RawSPU: bound ELF loads; PPUInterpreter: fix modulo 127->128 (#18797)
Two small fixes that stop the emulator from writing past buffer
boundaries.

RawSPU: when loading a program onto an SPU processor, it now checks that
the program actually fits in 256 KB before copying it. Before this, a
corrupted file could write past the buffer into random host memory.

PPUInterpreter: a one-character typo fix. A modulo operation used % 127
instead of % 128 when computing cross-boundary data sizes. This caused
reservation checks to compare the wrong number of bytes on every load
that crossed a cache line. This fix was pointed out by @AniLeo in the
spam PR #18795 (Discovered by Opus 4.7)


The PS3 hardware enforces these limits:
- Each SPU has exactly 256 KB of memory (from Cell Broadband Engine
Handbook v1.1)
- The PPE cache line is 128 bytes — all reservation logic uses this
granularity

Neither fix should affect the usual games. They only applying to
corrupted or malformed files. Will highly appreciate feedback and
suggestions for this PR

Tested on CI: CI passes on my fork 9 of 10 platforms (Mac Intel failed
downloading a dependency).

Title and Desc written by Codex
2026-05-27 15:27:58 +00:00
Elad 786ac95dc0 RawSPU: Add missing MMIO register reads 2025-06-29 21:31:52 +03:00
Elad 85c813d84c RawSPU: Fix race of SPU_MBox_Status_offs (#17303) 2025-06-13 18:56:35 +03:00
RipleyTom cd87a64621 Headers cleanup 2025-02-11 20:38:35 +01:00
elad335 af052b0627 RawSpu: Optimize START register/commands
START MFC proxy commands can be common even after their need, optimize their usage.
2024-10-24 21:03:06 +03:00
Elad Ashkenazi 7c898c3e4e SPU: Improve some logging 2024-08-21 13:32:45 +03:00
Elad Ashkenazi bd5fd66408 SPU: Reduce some logging 2024-08-17 06:38:49 +03:00
Elad Ashkenazi 77e8f9a8ab SPU: Utilize Operating System sleep in detected RCHCNT loop 2024-07-19 14:31:19 +03:00
Megamouse 59c58aa3cf fix some warnings 2023-12-30 19:07:35 +01:00
Eladash 37212a632c SPU: Refactor function discovery 2023-08-30 08:45:29 +03:00
Eladash b5faf5800b SPU LLVM Precompilation
Implement function SPU function discovery in images or random SPU code
2023-08-28 09:03:56 +03:00
Eladash 744a1528cc Optimize memory usage of ELF loader
Do not duplicate shdr memory when it is present in phdr.
2023-08-03 16:19:55 +03:00
Ivan Chikish d34287b2cc Linux: use futex_waitv syscall for atomic waiting
In order to make this possible, some unnecessary features were removed.
2023-08-02 21:46:06 +03:00
Eladash 598fe85243 PPU LLVM/RawSPU: Implement MMIO violation elimination pass 2023-07-06 19:46:36 +03:00
Eladash 48382564d1 SPU: Implement "quintuple" Inbound MBOX storage 2022-09-07 20:42:23 +03:00
Eladash 7698064f5a SPU: Untangle VM lock to avoid deadlocks 2022-09-07 16:05:56 +03:00
Eladash f9a62667cf SPU/PPU Loader: Implement linker/PS3 compiler executable files loading 2022-05-03 20:47:36 +03:00
Eladash daa53b77cf Simplify named_thread construction 2021-05-01 18:08:03 +03:00
Megamouse a16d8ba3ea More random changes 2021-04-11 14:01:51 +03:00
Eladash f43260bd58 Atomic waiting refactoring (#9208)
* Use atomic waitables instead instead of global thread wait as often as possible.
* Add ::is_stopped() and and ::is_paued() which can be used in atomic loops and with atomic wait. (constexpr cpu flags test functions)
* Fix notification bug of sys_spu_thread_group_exit/terminate. (old bug, enhanced by #9117)
* Function time statistics at Emu.Stop() restored. (instead of current "X syscall failed with 0x00000000 : 0")
2021-02-13 17:50:07 +03:00
Eladash 72e6e87d82 Fix SPU ELF loader 2020-12-23 20:50:33 +03:00
Nekotekina eb66302907 atomic.hpp: replace std::atomic with atomic_t
Dual dependency is nothing good.
2020-12-07 17:13:12 +03:00