Commit Graph

1842 Commits

Author SHA1 Message Date
Elad
88f81381e8 MacOS/Thread.cpp: Attempt recovery if pthread_jit_write_protect_np state is invalid 2026-07-01 19:31:41 +03:00
Elad
5bbce42adc MacOS: Do not leak MAP_JIT on utils::memory_decommit 2026-07-01 19:31:41 +03:00
Elad
9dc9730898 vm: Make vm::g_exec_addr not use MAP_JIT 2026-07-01 19:31:41 +03:00
Elad
99d15190e5 PPU: Cleanup MacOs executable write protection guards 2026-07-01 19:31:41 +03:00
Elad
537ad399bb Utilities/sema.cpp: Minor optimization 2026-07-01 12:52:13 +03:00
Megamouse
8eaa3ec9a2 Propagate src_loc in write_to_ptr and read_from_ptr 2026-06-29 16:14:42 +02:00
Antonino Di Guardo
2af7b58ce4
fix double path delimiter (#18923)
A cosmetic fix. It removes a double delimiter at the end of a path in
`games.yml` when using `VFS games` path.
2026-06-21 19:38:03 +02:00
Megamouse
0735c55bfd Add user agent to curl requests 2026-06-18 21:16:12 +02:00
Megamouse
e5cdae8c5a Use std::string_view in cpu code 2026-06-16 12:07:57 +02:00
Megamouse
fbe9ad0f45 Use more fmt::split_sv 2026-06-16 01:28:35 +02:00
Megamouse
41a7cd29f8 Use std::string_view in input code 2026-06-14 17:41:33 +02:00
Megamouse
5252f47a33 Use more std::move 2026-06-13 19:08:16 +02:00
Rad0van
d25972e196 JIT/AArch64: advertise +i8mm to the LLVM target machine
The PPU/SPU recompilers emit i8mm intrinsics (ummla/smmla, used by the
SPU GBB/GBH gather paths) gated on utils::has_i8mm(). The JIT's MAttrs
list mirrored dotprod/sha3/sve from HWCAP but never added i8mm, and the
resolved -mcpu on Apple silicon is the cortex-a78 fallback (no i8mm), so
the backend aborted with "Cannot select: intrinsic %llvm.aarch64.neon.ummla"
on every game. Mirror i8mm into MAttrs like the other features.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
(cherry picked from commit 52d121fee79cc569c9ac273852edd0e493ae51fc)
2026-06-06 18:34:38 +03:00
Megamouse
44b33f1962 Force renderer to default renderer if not supported 2026-06-02 21:49:09 +02:00
Megamouse
2b9368abf5 Fix potential OOB access in try_to_enum_value 2026-06-02 16:10:21 +02:00
Megamouse
375eb21c07 Fix some format and logger typos 2026-05-31 15:49:32 +02: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
Megamouse
d8710c431d Fix named_thread_group constructor
m_count - 1 could underflow
2026-05-22 09:14:16 +03:00
Megamouse
da599f7286 Fix localization of anaglyph_settings_dialog 2026-05-20 22:26:08 +02:00
Elad
d7da6a713b RawSPU: Implement 16-bit and 8-bit read MMIO 2026-05-20 20:44:24 +03:00
kd-11
a4712a283f C++ things 2026-05-13 11:43:32 +03:00
Megamouse
4312221498 Add anaglyph settings 2026-05-08 21:42:29 +02:00
Antonino Di Guardo
026297334f
Some fixes (#18686)
### FIXES + MINOR IMPROVEMENTS:
- Fixed issue18685: Not a real issue. PR18648 added some logging that made
evident a missing check on the validity of the paths in `games.yml`
before trying to manage the path as a possible ISO file. That missing
check was already present but simply invisible due to missing log
- Fixed `bytes_to_hex()` function used to store file hash hex string: In
some cases the integrity check wrongly reported the check as failed
- Optimized `fs::get_optical_raw_device()` function: Moved under
`_WIN32` block a check valid only on `Windows` and simplified the logic
to detect a CDROM / BD as raw device
- Used `iso_file` objects instead of `fs:file` in `ISO.cpp`: It allows
to use proper `bool()` operator on some checks
2026-05-07 06:38:57 +03:00
Megamouse
a8dd053593 Fix some warnings 2026-04-30 20:41:35 +02:00
digant73
79d0e0eb3c reduce check for raw device 2026-04-30 10:39:10 +03:00
digant73
570b2bddca Avoid to open bd drive if no content is present 2026-04-30 10:39:10 +03:00
Antonino Di Guardo
b212935c70
Add support to play from a BD Drive (currently only on Windows) (#18648)
Follow up of #18345 to add support (currently only on `Windows`; see
notes below) for playing a PS3 disc game directly from a Blu-Ray Disc
Drive.

### HOW IT WORKS:
- The BD drive can be added as any other game so from `VFS games` or
from `Add Games` menu. In case it is selected from `VFS games`, any
attempt to write files is discarded, e.g. file `Disc Games Can Be Put
Here For Automatic Detection.txt`
- It scans the default redump keys folder `<rpcs3>/data/redump` (it
currently needs to be manually created due it is not yet provided by
rpcs3 installation) to find a matching decryption key

### NOTES:
- Support is currently provided on `Windows` where I can fully test it.
I cannot test under other OS. However, the additions needed for the
other OS are limited only on `fs::file.h/cpp`. In particular inside the
following new functions:
  - `bool is_optical_raw_device(const std::string& path);`
- `bool get_optical_raw_device(const std::string& path, std::string*
raw_device = nullptr);`
- Icons etc. are always refreshed (ISO cache cannot be used due `mtime`
on raw device is not available and any cache check would always fail)
- Code in `ISO.h/cpp` needed some rework to properly manage a read on a
raw device (alignment on offset, size and memory is mandatory). The BD
drive needs to be detected as a file, not as a folder

### MINOR FIXES:
- Fixed wrong specifier used in logging on `ISO.h/cpp`
2026-04-29 05:42:49 +03:00
Antonino Di Guardo
e26c80c129
Add ISO integrity check 2026-04-22 15:06:02 +02:00
Megamouse
88175aa84f Check for unknown keys during config validation 2026-04-16 21:28:34 +02:00
Megamouse
50d6396f99 implement config db 2026-04-16 01:18:05 +02: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
aa841ac332 LLVM: Add source location for bitcast error 2026-04-04 01:08:05 +03:00
Elad
bd95c728f0 sys_fs: Implement ENOTDIR 2026-03-31 21:56:30 +02:00
Megamouse
bd2b2c2747 Qt: add recording settings dialog 2026-03-30 09:17:20 +02: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
kd-11
dbb6c87a10 utils: Implement enum size computation 2026-03-16 19:08:07 +03:00
Megamouse
0d80e300a0 Qt: add log level settings 2026-03-06 15:06:25 +01:00
Megamouse
d97851376d Add stacktrace in case of exception 2026-03-06 13:56:04 +01:00
Megamouse
ec00a06caf Fix warning suppression in windows clang 2026-03-05 21:05:15 +01:00
RipleyTom
5ca19eabd5 NP code review
sceNpTrophy fixes

- sceNpTrophyGetTrophyUnlockState: signed 1 was potentially shifted by 31(UB)
- sceNpTrophyUnlockTrophy: used a reader_lock and was missing check for read only context

cellGame fixes

- cellHddGameCheck: missing log parameters
- cellGameDataCheckCreate2: missing log parameter
- cellGameThemeInstall: condition inverted checking for extension + added tolower just in case
- cellGameThemeInstallFromBuffer: OOB access, buf is always filled from the start and then used as a parameter to the CB

sceNp fixes

- sceNpManagerGetTicket: Made accurate from RE
- sceNpDrmGetTimelimit: Fix msec calculation

sceNp2 fixes

-sceNpMatching2ContextStartAsync: avoid capturing ctx
-sceNpMatching2ContextStop: Minor error value swap

rpcn_client fixes

-add_friend: missing log parameter
-handle_friend_notification: misc validation issue

np_handler fixes
-ticket: Missing move in move constructor
-ticket::parse: Misc validation fix
-get_player_history_entry: potential UB fix

np_requests fixes

-Wrong CB event_type set for get_room_member_data_external_list!
-reply_tus_get_data was not copying status data!
-Order of error check in reply_get_room_member_data_external_list was wrong
-Improved logging

np_requests_gui:

-Added missing guards for gui_notifications

upnp_handler fixes

-Highest density of bugs per line of code in the west, let's pretend I never wrote this

signaling_handler fixes

-Swapped to multimap to avoid collisions on timestamps

Misc fixes
2026-03-01 09:20:32 +02:00
Elad
35ccd63dbc Win32/File.cpp: Fix fs::file constraints to avoid crashes 2026-02-28 10:58:25 +02:00
Elad
cc1b4c8fd1 Fix strcpy_trunc type validation 2026-02-28 10:58:25 +02:00
kd-11
759ef0f5b0 rsx: Add border color correction for hardware SNORM formats 2026-02-25 22:44:33 +03:00
Ani
e075170cc4 JITASM: include <mutex> on APPLE
Co-Authored-By: RipleyTom <RipleyTom@users.noreply.github.com>
2026-02-20 19:46:39 +02:00
Ani
c7d7f2d03b Thread: Move include <thread> to .h
Co-Authored-By: RipleyTom <RipleyTom@users.noreply.github.com>
2026-02-20 19:46:39 +02:00
Megamouse
ff992a67c8 win/fs: check file handle with GetFileInformationByHandle when creating fs::file
Some checks failed
Generate Translation Template / Generate Translation Template (push) Has been cancelled
Build RPCS3 / RPCS3 Linux ${{ matrix.os }} ${{ matrix.compiler }} (/rpcs3/.ci/build-linux-aarch64.sh, gcc, rpcs3/rpcs3-ci-jammy-aarch64:1.8, ubuntu-24.04-arm) (push) Has been cancelled
Build RPCS3 / RPCS3 Linux ${{ matrix.os }} ${{ matrix.compiler }} (/rpcs3/.ci/build-linux.sh, gcc, rpcs3/rpcs3-ci-jammy:1.8, ubuntu-24.04) (push) Has been cancelled
Build RPCS3 / RPCS3 Linux ${{ matrix.os }} ${{ matrix.compiler }} (a1d35836e8d45bfc6f63c26f0a3e5d46ef622fe1, rpcs3/rpcs3-binaries-linux-arm64, /rpcs3/.ci/build-linux-aarch64.sh, clang, rpcs3/rpcs3-ci-jammy-aarch64:1.8, ubuntu-24.04-arm) (push) Has been cancelled
Build RPCS3 / RPCS3 Linux ${{ matrix.os }} ${{ matrix.compiler }} (d812f1254a1157c80fd402f94446310560f54e5f, rpcs3/rpcs3-binaries-linux, /rpcs3/.ci/build-linux.sh, clang, rpcs3/rpcs3-ci-jammy:1.8, ubuntu-24.04) (push) Has been cancelled
Build RPCS3 / RPCS3 Mac ${{ matrix.name }} (0, 51ae32f468089a8169aaf1567de355ff4a3e0842, rpcs3/rpcs3-binaries-mac, Intel) (push) Has been cancelled
Build RPCS3 / RPCS3 Mac ${{ matrix.name }} (1, 8e21bdbc40711a3fccd18fbf17b742348b0f4281, rpcs3/rpcs3-binaries-mac-arm64, Apple Silicon) (push) Has been cancelled
Build RPCS3 / RPCS3 Windows (push) Has been cancelled
Build RPCS3 / RPCS3 Windows Clang ${{ matrix.arch }} (aarch64, clang, clangarm64, ARM64, windows-11-arm) (push) Has been cancelled
Build RPCS3 / RPCS3 Windows Clang ${{ matrix.arch }} (x86_64, clang, clang64, X64, windows-2025) (push) Has been cancelled
Build RPCS3 / RPCS3 FreeBSD (push) Has been cancelled
On empty mounted drives CreateFileW may return a valid handle even if the drive is not usable.
We have to check the file handle early. Otherwise other functions may fail later as a result.
2026-02-20 11:25:39 +02:00
Malcolm
b2469039af ARM64: Detect some arm features and let LLVM know if they are or aren't present via attributes
Some checks are pending
Generate Translation Template / Generate Translation Template (push) Waiting to run
Build RPCS3 / RPCS3 Linux ${{ matrix.os }} ${{ matrix.compiler }} (/rpcs3/.ci/build-linux-aarch64.sh, gcc, rpcs3/rpcs3-ci-jammy-aarch64:1.7, ubuntu-24.04-arm) (push) Waiting to run
Build RPCS3 / RPCS3 Linux ${{ matrix.os }} ${{ matrix.compiler }} (/rpcs3/.ci/build-linux.sh, gcc, rpcs3/rpcs3-ci-jammy:1.7, ubuntu-24.04) (push) Waiting to run
Build RPCS3 / RPCS3 Linux ${{ matrix.os }} ${{ matrix.compiler }} (a1d35836e8d45bfc6f63c26f0a3e5d46ef622fe1, rpcs3/rpcs3-binaries-linux-arm64, /rpcs3/.ci/build-linux-aarch64.sh, clang, rpcs3/rpcs3-ci-jammy-aarch64:1.7, ubuntu-24.04-arm) (push) Waiting to run
Build RPCS3 / RPCS3 Linux ${{ matrix.os }} ${{ matrix.compiler }} (d812f1254a1157c80fd402f94446310560f54e5f, rpcs3/rpcs3-binaries-linux, /rpcs3/.ci/build-linux.sh, clang, rpcs3/rpcs3-ci-jammy:1.7, ubuntu-24.04) (push) Waiting to run
Build RPCS3 / RPCS3 Mac ${{ matrix.name }} (0, 51ae32f468089a8169aaf1567de355ff4a3e0842, rpcs3/rpcs3-binaries-mac, Intel) (push) Waiting to run
Build RPCS3 / RPCS3 Mac ${{ matrix.name }} (1, 8e21bdbc40711a3fccd18fbf17b742348b0f4281, rpcs3/rpcs3-binaries-mac-arm64, Apple Silicon) (push) Waiting to run
Build RPCS3 / RPCS3 Windows (push) Waiting to run
Build RPCS3 / RPCS3 Windows Clang ${{ matrix.arch }} (aarch64, clang, clangarm64, ARM64, windows-11-arm) (push) Waiting to run
Build RPCS3 / RPCS3 Windows Clang ${{ matrix.arch }} (x86_64, clang, clang64, X64, windows-2025) (push) Waiting to run
Build RPCS3 / RPCS3 FreeBSD (push) Waiting to run
- On x86, LLVM has robust detection for the CPU name. If a CPU like skylake has AVX disabled, it will fall back to something without AVX (nehalem)
- On ARM, detection is not as robust. For instance, on my snapdragon 8 gen 2, it assumes that we have SVE support, as the cortex-x3 supports SVE.
- If an ARM cpu is paired with other cpus from another generation which doesn't support the same instructions as the cortex-x3, or if the cortex-x3 just has SVE disabled for no apparant reason (in the case of the snapdragon 8 gen 2)
- We need to actually detect that ourselves.
- Beyond SVE also detect support for some instructions that might be useful SPU LLVM when optimized with intrinsics.
2026-02-11 08:19:59 +02:00
RipleyTom
97feb4eed4 Add Message logging 2026-01-30 10:45:55 +02:00