Commit Graph
1876 Commits
Author SHA1 Message Date
Antonino Di Guardo dfc0542a9f savedata: scoped filesystem sync 2026-10-01 13:38:26 +00:00
Megamouse 83b1e07299 Fix some log messages 2026-10-01 12:42:01 +02:00
Megamouse 1c460fdd7f input: Fix SDL reconnect: Fix SDL open/close reference count and only try once per second 2026-10-01 07:43:05 +02:00
Megamouse 00fe384258 fs::get_config_dir: set size to 0 on GetEnvironmentVariable failure 2026-09-30 11:35:06 +03:00
Elad 063586ea81 Utilities\cfmt.h: Add binary formatting to fmt::format 2026-09-26 14:35:38 +03:00
Elad a70f698569 vm: Fix confusing enum flags naming 2026-09-26 13:17:00 +03:00
digant73 6e6ffc5058 Fix thread affinity on Linux for thread scheduler different than OS 2026-09-25 23:34:58 +03:00
Antonino Di GuardoandClaude Opus 5 0c382f4fc9 patch_engine: don't emit path-typed patch addresses as hex
save_patches always emitted the address element as fmt::format("0x%.8x"),
but for move_file and hide_file that element is a VFS path: load() keeps the
text in original_offset and skips u32 validation for those two types.
Round-tripping such a patch through save_patches replaced the source path
with 0x00000000.

The entry stays syntactically valid and keeps loading, so the patch is still
listed and can still be toggled in the Patch Manager while silently matching
no file. Re-downloading does not repair it either, since append_patches
discards an incoming patch whose Patch Version is not strictly greater.

Gate the emit on patch_type_uses_hex_offset, the predicate that already
existed for this and was used only on the load side. The numeric branch
keeps using offset rather than original_offset on purpose: an address
modifier is folded into offset at load time and the flat form emitted here
has nowhere to put it.

Co-Authored-By: Claude Opus 5 <[email protected]>
2026-09-24 13:45:26 +02:00
Antonino Di GuardoandClaude Opus 5 dc3c7327d8 patch_engine: make save_patches write atomically
save_patches opened the target with fs::rewrite (write + create + trunc),
then discarded the result of file.write() and returned true unconditionally.
A write that fails part way leaves a truncated file, load() rejects the
whole file on a parse error, and import_patches refuses to write when
load() fails, so every later import returns -1 with no in-app recovery.

75e66ab5e made the patch config and the pad config atomic but missed this
function; save_config, 70 lines up in the same file, already writes through
fs::pending_file and checks the result. Do the same here.

Co-Authored-By: Claude Opus 5 <[email protected]>
2026-09-24 13:45:26 +02:00
Elad 1e0e352f95 Util/stack_trace.cpp: Clean duplicate functions in CallStack dump 2026-09-23 23:13:17 +03:00
Elad 3efbf060a6 sys_fs: Fix SYS_APP_HOME readability control for disc games 2026-09-22 16:16:51 +03:00
Megamouse fb62c6d03a clean up some includes 2026-09-15 22:01:55 +02:00
Megamouse be509deda0 Move emu callbacks to own file
Reduces some System.h includes
2026-09-15 22:01:55 +02:00
Megamouse ca522cf84c fix cctype usage
According to the documentation, we should cast to unsigned char.
Anything negative is undefined behavior.
2026-09-15 17:38:26 +02:00
digant73 b14b6d3cef Fix read file on system attribute 2026-09-15 01:08:48 +03:00
Antonino Di Guardo 028d1e8f4a Fix some VFS issues - #19378 2026-09-10 18:56:40 +00:00
schm1dtmac c19594254e [Mac OS X] Fix sys_ss_random_number_generator & cleanup some dead code (#19382) 2026-09-02 12:00:05 +00:00
Megamouse 4048b7aaef big picture mode: Create tiles multithreaded 2026-09-01 23:20:37 +02:00
Megamouse 5e40242bdd Qt: Don't set game window visibility on boot if resize is enabled 2026-09-01 08:56:47 +02:00
Antonino Di Guardo a99fde6f5b Add BD Drive support for Linux, macOS and FreeBSD (#19233)
Follow up of #18648 and #18345 adding BD Drive support to the remaining supported OSes.
As it happens on Windows, both physical BD Drive and virtual drive (e.g. mounted `.iso` file) are supported.

Code for mac OS and FreeBSD provided by AI.

- key files need to be provided under `<rpcs3>/data/redump` folder (currently it needs to be manually created). This folder is also already the fallback folder for any encrypted ISO file

Fixes #18345
2026-08-31 16:44:29 +02:00
kd-11 78ba581137 vk: Extend copy image API to support 3D offsets and extents 2026-08-18 13:47:28 +03:00
kd-11 91cd82a0c2 gl: Extend copy image API to allow explicit 3D offsets 2026-08-18 13:47:28 +03: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
Megamouse a7fe472583 Allow to skip empty strings in fmt::merge 2026-07-30 02:35:53 +02:00
Megamouse b778355c68 Remove outdated LLVM ifdefs 2026-07-28 21:24:05 +02:00
Elad 5e8ba021ac SPU/ARM64: Implement RawSPU MMIO on ARM 2026-07-28 12:16:35 +03:00
Megamouse 4add14cb72 Fix recording encoder selection
Codecs are identified by name, not by ID.
Let's keep the ID as fallback instead.
2026-07-27 16:18:26 +02:00
Megamouse 7a90d09cfe Qt: move guest memory dump code to own class 2026-07-23 10:58:18 +02:00
caner 5ecfc95c13 Qt: add guest memory dump utility (#19068)
This adds a tool that writes a snapshot of the full PS3 guest address
space to disk for offline analysis.

This tool produces a flat image that any hex editor or script can index
directly by guest address. It dumps allocated PS3 guest memory only, not
RPCS3 host-process memory, host registers, or GPU-side state.

What it does:

1. Pauses emulation and waits up to five seconds for every PPU, SPU, and
RSX thread to settle. If they do not settle, nothing is written.
2. Copies every allocated guest page into an intermediate buffer on a
named worker thread, then writes it to a sparse `guest_memory.bin` whose
file offset equals the PS3 effective address. Reads go through
`vm::g_sudo_addr` so guest protected pages are captured too.
3. Saves each live SPU thread's 256 KB local store to its own file, with
its ID, LV2 ID, PC, and type recorded.
4. Writes `manifest.json`, listing every allocated region with its
addresses and permissions, the storage mode, and the SPU local-store
table.
5. Resumes emulation.

The menu entry is under Utilities next to Memory Viewer and is enabled
while a game is loaded. Free space is checked before writing. If sparse
file setup fails, the incomplete attempt is removed and the user can
choose another destination or cancel. Failed or cancelled dumps remove
their output folder instead of leaving a partial image.

Tested on Windows using an NTFS destination with a build from this
branch: dumped a running game with 479,535,104 allocated guest bytes
across 76 regions and five SPU local stores. The image was sparse, its
offsets matched guest addresses, and emulation resumed cleanly. The
sparse file failure path was also exercised with a temporary local test:
choosing another location reopened the destination picker, while
cancelling aborted the attempt without leaving partial output. Runtime
behavior on Linux and macOS is untested.

The first draft of this implementation was AI assisted. I reviewed and
adjusted the code and tested the Windows/NTFS path myself. I am happy to
rework anything or answer any questions.
2026-07-23 00:08:05 +00: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
Megamouse 1269ebff27 Fix some warnings 2026-07-15 15:19:36 +02: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
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) <[email protected]>
(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